]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdbserver/ChangeLog
gdbserver: start turning the target ops vector into a class
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 * target.h (class process_target): New class definition.
4 (struct process_stratum_target) <pt>: New field with type
5 'process_target*'.
6 * linux-low.h (class linux_process_target): Define as a derived
7 class of 'process_target'.
8 * linux-low.cc (linux_target_ops): Add a linux_process_target*
9 as the 'pt' field.
10 * lynx-low.h (class lynx_process_target): Define as a derived
11 class of 'process_target'.
12 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
13 as the 'pt' field.
14 * nto-low.h (class nto_process_target): Define as a derived
15 class of 'process_target'.
16 * nto-low.cc (nto_target_ops): Add an nto_process_target*
17 as the 'pt' field.
18 * win32-low.h (class win32_process_target): Define as a derived
19 class of 'process_target'.
20 * win32-low.cc (win32_target_ops): Add a win32_process_target*
21 as the 'pt' field.
22
23 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
24
25 * configure: Regenerate.
26
27 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
28 Andrew Burgess <andrew.burgess@embecosm.com>
29
30 * linux-riscv-low.cc: New file.
31 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
32 and nat/riscv-linux-tdesc.c.
33 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
34 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
35 Define.
36
37 2020-02-14 Tom Tromey <tom@tromey.com>
38
39 * acinclude.m4: Don't include acx_configure_dir.m4.
40 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
41 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
42 (all, install-only, uninstall, clean-info, clean)
43 (maintainer-clean): Don't recurse.
44 (subdir_do, all-lib): Remove.
45 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
46 (GNULIB_H): Remove.
47 (generated_files): Update.
48 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
49 * configure: Rebuild.
50 * configure.ac: Don't configure gnulib or libiberty.
51 (GNULIB): Update.
52
53 2020-02-14 Eli Zaretskii <eliz@gnu.org>
54
55 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
56 preparing the command line for CreateProcess.
57 (win32_create_inferior): Reflect the program name in debugging
58 output that shows the process and its command line.
59
60 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
61
62 * Makefile.in: Rename source files from .c to .cc.
63 * %.c: Rename to %.cc.
64 * configure.ac: Rename server.c to server.cc.
65 * configure: Re-generate.
66
67 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
68
69 * Makefile.in: Rename gdbsupport source files from .c to .cc.
70
71 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
72
73 * win32-low.c (win32_create_inferior): Set signal_pid.
74
75 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
76 Pedro Alves <palves@redhat.com>
77
78 Skip building gdbserver in a cross-configuration.
79 * configure.srv: Set $gdbserver_host depending on whether $target
80 is $host. Use $gdbserver_host instead of $host.
81
82 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
83
84 * configure: Re-generate.
85
86 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
87
88 * configure: Re-generate.
89
90 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
91
92 * acinclude.m4: Update warning.m4 path.
93
94 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
95
96 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
97 (handle_exception): Set siginfo_er.
98 (win32_xfer_siginfo): New function.
99
100 2020-02-07 Tom Tromey <tom@tromey.com>
101 Pedro Alves <palves@redhat.com>
102
103 * README: Update build documentation.
104 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
105 host, not target.
106 * configure.ac: Update paths.
107 * configure: Rebuild.
108 * acinclude.m4: Update paths.
109 * Makefile.in: Update include paths.
110 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
111 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
112 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
113 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
114 (%-generated.c): Update paths.
115 * Move entire directory from ../gdb/gdbserver.
116
117 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
118
119 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
120
121 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
122
123 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
124 assignment instead of srv_linux_obj.
125
126 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
127
128 * server.c (handle_qxfer_libraries): Write segment-address with
129 paddress.
130
131 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
132
133 * Makefile.in (install-strip): New target.
134 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
135 * aclocal.m4: Regenerate.
136 * configure: Regenerate.
137 * configure.ac: Add AM_PROG_INSTALL_STRIP.
138
139 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
140
141 * Makefile.in (SFILES): Adjust paths to point to real files.
142 (OBS): Move waitstatus.o to target/waitstatus.o.
143 (TAGS): Transform paths appropriately.
144 (%.o): Rename to...
145 (nat/%.o): ... this pattern rule.
146 (%.o): Rename to...
147 (target/%.o): ... this pattern rule.
148 * configure.srv: Adjust paths throughout to include nat/ prefix
149 with the revant files.
150 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
151 * configure: Regenerate.
152
153 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
154
155 * Makefile.in (TAGS): Remove config files from the recipe.
156
157 2020-01-14 Tom Tromey <tom@tromey.com>
158
159 * configure: Rebuild.
160 * configure.ac: Remove any checks that were added to common.m4.
161 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
162 lib-link.m4.
163
164 2020-01-14 Tom Tromey <tom@tromey.com>
165
166 * server.h: Include config.h.
167 * gdbreplay.c: Include config.h.
168 * configure: Rebuild.
169 * configure.ac: Don't source common.host.
170 * acinclude.m4: Update path.
171 * Makefile.in (INCSUPPORT): New variable.
172 (INCLUDE_CFLAGS): Add INCSUPPORT.
173 (SFILES): Update paths.
174 (version-generated.c): Update path to create-version.sh.
175 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
176
177 2020-01-14 Tom Tromey <tom@tromey.com>
178
179 * configure.ac (LIBS): Use WIN32APILIBS.
180 (USE_WIN32API): Don't define.
181 * configure: Rebuild.
182
183 2020-01-14 Tom Tromey <tom@tromey.com>
184
185 * configure: Rebuild.
186
187 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
188
189 * Makefile.in (%-generated.c): Remove rule for files from
190 regformats/i386.
191
192 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
193
194 * configure: Re-generate.
195
196 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
197
198 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
199 Define to static.
200 * tracepoint.c (stop_tracing, flush_trace_buffer,
201 about_to_request_buffer_space, get_trace_state_variable_value,
202 set_trace_state_variable_value, gdb_collect): Add declaration.
203
204 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
205
206 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
207 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
208 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
209 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
210 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
211 static.
212
213 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
214
215 * inferiors.c: Include gdbsupport/common-inferior.h.
216
217 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
218
219 * hostio-errno.c: Include hostio.h.
220
221 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
222
223 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
224 prerequisite.
225
226 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
227
228 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
229 * linux-arm-tdesc.h: Include arch/arm.h.
230
231 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
232
233 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
234
235 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
236
237 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
238 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
239
240 2020-01-10 Pedro Alves <palves@redhat.com>
241
242 * fork-child.c (post_fork_inferior): Pass target down to
243 startup_inferior.
244 * inferiors.c (switch_to_thread): Add process_stratum_target
245 parameter.
246 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
247 * nto-low.c (nto_target_ops): Now a process_stratum_target.
248 * linux-low.c (linux_target_ops): Now a process_stratum_target.
249 * remote-utils.c (prepare_resume_reply): Pass the target to
250 switch_to_thread.
251 * target.c (the_target): Now a process_stratum_target.
252 (done_accessing_memory): Pass the target to switch_to_thread.
253 (set_target_ops): Ajust to use process_stratum_target.
254 * target.h (struct target_ops): Rename to ...
255 (struct process_stratum_target): ... this.
256 (the_target, set_target_ops): Adjust.
257 (prepare_to_access_memory): Adjust comment.
258 * win32-low.c (child_xfer_memory): Adjust to use
259 process_stratum_target.
260 (win32_target_ops): Now a process_stratum_target.
261
262 2020-01-06 Eli Zaretskii <eliz@gnu.org>
263 Pedro Alves <palves@redhat.com>
264
265 * win32-low.c (get_child_debug_event): Extract the fatal exception
266 from the exit status and convert to the equivalent Posix signal
267 number.
268 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
269 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
270
271 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
272
273 * Makefile.in: Use INSTALL_PROGRAM_ENV.
274
275 2020-01-01 Joel Brobecker <brobecker@adacore.com>
276
277 * server.c (gdbserver_version): Change copyright year to 2020.
278 * gdbreplay.c (gdbreplay_version): Likewise.
279
280 2019-12-19 Christian Biesinger <cbiesinger@google.com>
281
282 * configure: Regenerate.
283 * configure.ac: Quote variable arguments of test.
284
285 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
286
287 * Makefile.in: Fix build with GNU Make 3.81
288
289 2019-12-16 Tom Tromey <tromey@adacore.com>
290
291 * server.c (get_exec_file): Constify result.
292
293 2019-12-10 Christian Biesinger <cbiesinger@google.com>
294
295 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
296 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
297 * config.in: Regenerate.
298 * configure: Regenerate.
299 * configure.ac: Don't check for strerror.
300 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
301 Call safe_strerror instead of strerror.
302 * server.h (strerror): Remove this now-unnecessary declaration.
303 * tracepoint.c (init_named_socket): Call safe_strerror instead of
304 strerror.
305 (gdb_agent_helper_thread): Likewise.
306 * utils.c (perror_with_name): Likewise.
307
308 2019-11-26 Tom Tromey <tom@tromey.com>
309
310 * configure, config.in: Rebuild.
311
312 2019-11-26 Tom Tromey <tom@tromey.com>
313
314 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
315 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
316 gdb_sigmask.
317 * configure, config.in: Rebuild.
318
319 2019-11-26 Tom Tromey <tom@tromey.com>
320
321 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
322 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
323 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
324 * acinclude.m4: Include ax_pthread.m4.
325 * config.in, configure: Rebuild.
326
327 2019-11-26 Christian Biesinger <cbiesinger@google.com>
328
329 * debug.c (debug_set_output): Call safe_strerror instead of
330 strerror.
331 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
332 (linux_kill_one_lwp): Likewise.
333 (linux_detach_one_lwp): Likewise.
334 (linux_wait_for_event_filtered): Likewise.
335 (store_register): Likewise.
336 * lynx-low.c (lynx_attach): Likewise.
337 * mem-break.c (insert_memory_breakpoint): Likewise.
338 (remove_memory_breakpoint): Likewise.
339 (delete_fast_tracepoint_jump): Likewise.
340 (set_fast_tracepoint_jump): Likewise.
341 (uninsert_fast_tracepoint_jumps_at): Likewise.
342 (reinsert_fast_tracepoint_jumps_at): Likewise.
343 * nto-low.c (nto_xfer_memory): Likewise.
344 (nto_resume): Likewise.
345
346 2019-11-20 Luis Machado <luis.machado@linaro.org>
347
348 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
349 instead of register count.
350 * tdesc.c (tdesc_contains_feature): New function.
351 * tdesc.h (tdesc_contains_feature): New prototype.
352
353 2019-11-15 Christian Biesinger <cbiesinger@google.com>
354
355 * Makefile.in: Add safe-strerror.c.
356 * configure: Regenerate.
357 * configure.ac: Don't source common.host.
358
359 2019-11-15 Christian Biesinger <cbiesinger@google.com>
360
361 * config.in: Regenerate.
362 * configure: Regenerate.
363
364 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
365
366 * ax.c (ax_printf): Handle size_t_arg.
367
368 2019-11-06 Christian Biesinger <cbiesinger@google.com>
369
370 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
371 * mi/mi-main.c (output_cores): Likewise.
372 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
373 (linux_xfer_osdata_modules): Likewise.
374 * remote.c (register_remote_support_xml): Likewise.
375 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
376 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
377
378 2019-11-01 Christian Biesinger <cbiesinger@google.com>
379
380 * configure: Regenerate.
381 * configure.ac: Remove check for strerror_r.
382
383 2019-10-31 Christian Biesinger <cbiesinger@google.com>
384
385 * config.in: Regenerate.
386 * configure: Regenerate.
387 * configure.ac: Also check for strerror_r.
388
389 2019-10-31 Christian Biesinger <cbiesinger@google.com>
390
391 * ax.h (debug_agent): Remove duplicate declaration.
392
393 2019-10-26 Tom de Vries <tdevries@suse.de>
394
395 * linux-aarch64-low.c: Fix typos in comments.
396 * linux-arm-low.c: Same.
397 * linux-low.c: Same.
398 * linux-ppc-low.c: Same.
399 * proc-service.c: Same.
400 * regcache.h: Same.
401 * server.c: Same.
402 * tracepoint.c: Same.
403 * win32-low.c: Same.
404
405 2019-10-25 Tom Tromey <tromey@adacore.com>
406
407 * utils.c (xstrdup): Remove.
408
409 2019-10-23 Tom Tromey <tom@tromey.com>
410
411 * configure, config.in: Rebuild.
412
413 2019-10-23 Tom Tromey <tom@tromey.com>
414
415 * configure: Rebuild.
416 * acinclude.m4: Use m4_include, not sinclude.
417
418 2019-10-17 Tom Tromey <tromey@adacore.com>
419
420 * configure: Rebuild.
421 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
422 in AC_CONFIG_FILES invocation.
423 * Makefile.in (stamp-h, Makefile): Use new-style config.status
424 invocation.
425
426 2019-10-16 Christian Biesinger <cbiesinger@google.com>
427
428 * server.c: Include xml-builtin.h.
429 (get_xml_features): Don't declare xml_builtins here.
430
431 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
432
433 * Makefile.in: Remove references to vec-ipa.o.
434
435 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
436
437 * Makefile.in: Remove references to vec.c.
438
439 2019-10-02 Christian Biesinger <cbiesinger@google.com>
440
441 * server.c (server_waiting): Change to bool.
442 (extended_protocol): Likewise.
443 (response_needed): Likewise.
444 (exit_requested): Likewise.
445 (run_once): Likewise.
446 (report_no_resumed): Likewise.
447 (non_stop): Likewise.
448 (disable_packet_vCont): Likewise.
449 (disable_packet_Tthread): Likewise.
450 (disable_packet_qC): Likewise.
451 (disable_packet_qfThreadInfo): Likewise.
452 (handle_general_set): Update.
453 (handle_detach): Update.
454 (handle_monitor_command): Update.
455 (handle_query): Update.
456 (captured_main): Update.
457 (process_serial_event): Update.
458 * server.h (server_waiting): Change to bool.
459 (disable_packet_vCont): Likewise.
460 (disable_packet_Tthread): Likewise.
461 (disable_packet_qC): Likewise.
462 (disable_packet_qfThreadInfo): Likewise.
463 (run_once): Likewise.
464 (non_stop): Likewise.
465 * target.c (target_stop_and_wait): Update.
466
467 2019-10-02 Tom Tromey <tromey@adacore.com>
468
469 * Makefile.in (SFILES): Add common-inferior.c.
470 (OBS): Add common-inferior.o.
471 * server.c (startup_with_shell): Don't define.
472
473 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
474
475 * linux-low.c (linux_low_read_btrace): Update for change to
476 std::vector.
477
478 2019-09-20 Christian Biesinger <cbiesinger@google.com>
479
480 * debug.c (debug_threads): Remove comment in favor of the header.
481 * debug.h (using_threads): Add declaration.
482 (debug_threads): Add comment.
483 * linux-aarch64-low.c: Include debug.h and remove declaration of
484 debug_threads.
485 * nto-low.c: Likewise.
486 * remote-utils.c: Likewise.
487 * thread-db.c: Likewise.
488
489 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
490
491 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
492 and powerpc-cell64l-ipa.o.
493 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
494 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
495 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
496 (spu*-*-*): Remove.
497
498 * spu-low.c: Remove file.
499
500 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
501 (parse_spufs_run): Remove.
502 (ppc_get_pc): Remove Cell/B.E. support.
503 (ppc_set_pc): Likewise.
504 (ppc_breakpoint_at): Likewise.
505 (ppc_arch_setup): Likewise.
506 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
507 tdesc_powerpc_cell32l.
508 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
509 or init_registers_powerpc_cell32l.
510 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
511 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
512 or init_registers_powerpc_cell32l.
513 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
514 (init_registers_powerpc_cell32l): Remove prototype.
515 (init_registers_powerpc_cell64l): Likewise.
516
517 * target.h (struct target_ops): Remove qxfer_spu member.
518 * server.c (handle_qxfer_spu): Remove.
519 (qxfer_packets): Remove entry for "spu".
520 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
521 * linux-low.c (SPUFS_MAGIC): Remove.
522 (spu_enumerate_spu_ids): Remove.
523 (linux_qxfer_spu): Remove.
524 (linux_target_ops): Remove qxfer_spu member.
525 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
526 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
527 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
528
529 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
530
531 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
532 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
533 * config.in: Regenerate.
534 * configure: Regenerate.
535
536 2019-08-15 Tom Tromey <tromey@adacore.com>
537
538 * target.c (target_write_memory): Use gdb::byte_vector.
539
540 2019-08-15 Tom Tromey <tromey@adacore.com>
541
542 * tracepoint.c (write_inferior_data_pointer)
543 (write_inferior_integer, write_inferior_int8)
544 (write_inferior_uinteger, m_tracepoint_action_download)
545 (r_tracepoint_action_download, x_tracepoint_action_download)
546 (l_tracepoint_action_download, clear_inferior_trace_buffer)
547 (download_agent_expr, download_tracepoint_1)
548 (download_trace_state_variables, upload_fast_traceframes): Update.
549 * server.c (gdb_write_memory): Update.
550 * remote-utils.c (relocate_instruction): Update.
551 * proc-service.c (ps_pdwrite): Update.
552 * mem-break.c (remove_memory_breakpoint)
553 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
554 (uninsert_fast_tracepoint_jumps_at)
555 (reinsert_fast_tracepoint_jumps_at): Update.
556 * linux-x86-low.c (append_insns)
557 (i386_install_fast_tracepoint_jump_pad)
558 (amd64_write_goto_address, i386_write_goto_address): Update.
559 * linux-s390-low.c (append_insns, s390_write_goto_address):
560 Update.
561 * linux-ppc-low.c (ppc_relocate_instruction)
562 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
563 (ppc_write_goto_address): Update.
564 * linux-aarch64-low.c (append_insns): Update.
565 * target.h (struct target_ops): Update.
566 (write_inferior_memory): Don't declare.
567 * target.c (target_write_memory): Rename from
568 write_inferior_memory. Remove old target_write_memory.
569
570 2019-08-15 Tom Tromey <tromey@adacore.com>
571
572 * target.c (write_inferior_memory): Use std::vector.
573
574 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
575
576 PR build/24886
577 * configure.ac: Drop enable-libmcheck support.
578 * configure, config.in: Rebuild.
579 * acinclude.m4: Don't include it.
580
581 2019-07-19 Alan Hayward <alan.hayward@arm.com>
582
583 * configure.srv: Remove Arm xml files.
584
585 2019-07-19 Alan Hayward <alan.hayward@arm.com>
586
587 * configure.srv: Add new files. Remove xml generated files.
588 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
589 registers.
590 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
591 * linux-aarch32-tdesc.c: New file.
592 * linux-aarch32-tdesc.h: New file.
593 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
594 * linux-arm-low.c (init_registers_arm, tdesc_arm)
595 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
596 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
597 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
598 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
599 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
600 (arm_read_description): Call arm_linux_read_description.
601 (initialize_low_arch): Don't init registers.
602 * linux-arm-tdesc.c: New file.
603 * linux-arm-tdesc.h: New file.
604
605 2019-07-10 Alan Hayward <alan.hayward@arm.com>
606
607 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
608 Move counter inside for.
609 (arm_read_description): Check ptrace earlier.
610 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
611
612 2019-07-09 Tom Tromey <tom@tromey.com>
613
614 * configure: Rebuild.
615 * configure.ac: Change common to gdbsupport.
616 * acinclude.m4: Change common to gdbsupport.
617 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
618 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
619 common to gdbsupport.
620 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
621 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
622 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
623 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
624 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
625 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
626 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
627 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
628 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
629 common to gdbsupport.
630
631 2019-07-04 Alan Hayward <alan.hayward@arm.com>
632
633 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
634 defines.
635 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
636
637 2019-07-04 Alan Hayward <alan.hayward@arm.com>
638
639 * configure.srv: Remove legacy xml.
640 * linux-aarch64-low.c (initialize_low_arch): Remove
641 initialize_low_tdesc call.
642 * linux-aarch64-tdesc-selftest.c: Remove file.
643 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
644 * linux-x86-low.c (initialize_low_arch): Remove
645 initialize_low_tdesc call.
646 * linux-x86-tdesc-selftest.c: Remove file.
647 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
648
649 2019-06-20 Tom de Vries <tdevries@suse.de>
650
651 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
652 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
653
654 2019-06-19 Tom de Vries <tdevries@suse.de>
655
656 * debug.h (debug_write): Change return type to ssize_t.
657 * debug.c (debug_write): Same.
658
659 2019-06-14 Tom Tromey <tom@tromey.com>
660
661 * configure.ac: Use new path to gnulib.
662 * configure: Rebuild.
663 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
664 to gnulib.
665
666 2019-06-11 Tom Tromey <tom@tromey.com>
667
668 * Makefile.in (SFILES): Add alloc.c.
669 (OBS): Add alloc.o.
670 (IPA_OBJS): Add alloc-ipa.o.
671 (alloc-ipa.o): New target.
672 (%.o: ../%.c): New pattern rule.
673
674 2019-06-10 Tom Tromey <tromey@adacore.com>
675
676 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
677 end warning with a newline.
678 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
679 newline.
680 * thread-db.c (attach_thread): Don't end warning with a newline.
681 (thread_db_notice_clone): Likewise.
682 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
683 newline.
684 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
685 end warning with a newline.
686
687 2019-06-04 Pedro Alves <palves@redhat.com>
688
689 * server.c (captured_main): Use make_unique_xstrdup.
690
691 2019-06-02 Tom Tromey <tom@tromey.com>
692
693 * gdbreplay.c (fromhex): Remove.
694 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
695
696 2019-05-29 Tom Tromey <tromey@adacore.com>
697
698 * configure: Rebuild.
699
700 2019-05-06 Kevin Buettner <kevinb@redhat.com>
701
702 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
703 sign extension code on 32-bit builds.
704
705 2019-05-03 Eli Zaretskii <eliz@gnu.org>
706
707 * remote-utils.c:
708 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
709
710 2019-04-19 Tom Tromey <tom@tromey.com>
711
712 * server.c (struct vstop_notif): Derive from notif_event.
713 <base>: Remove.
714 (queue_stop_reply): Update.
715 (remove_all_on_match_ptid): Change type. Rewrite.
716 (discard_queued_stop_replies): Rewrite.
717 (in_queued_stop_replies_ptid): Change type.
718 (in_queued_stop_replies): Rewrite.
719 (notif_stop): Update.
720 (queue_stop_reply_callback): Update.
721 (captured_main): Don't call initialize_notif.
722 (push_stop_notification): Update.
723 * notif.c (notif_write_event, handle_notif_ack)
724 (notif_event_enque, notif_push): Update.
725 (notif_event_xfree, initialize_notif): Remove.
726 * notif.h (struct notif_event): Include <list>, not
727 "common/queue.h".
728 (struct notif_server) <queue>: Now a std::list.
729 (notif_event_p): Remove typedef.
730 (initialize_notif): Don't declare.
731 (struct notif_event): Add virtual destructor.
732
733 2019-04-17 Alan Hayward <alan.hayward@arm.com>
734
735 * ax.c (ax_vdebug): Call debug_printf.
736 * debug.c (debug_write): New function.
737 * debug.h (debug_write): New declaration.
738 * linux-low.c (sigchld_handler): Call debug_write.
739
740 2019-04-17 Alan Hayward <alan.hayward@arm.com>
741
742 * debug.c (debug_set_output): New function.
743 (debug_vprintf): Send output to debug_file.
744 (debug_flush): Likewise.
745 * debug.h (debug_set_output): New declaration.
746 * server.c (handle_monitor_command): Add debug-file option.
747 (captured_main): Likewise.
748
749 2019-04-17 Alan Hayward <alan.hayward@arm.com>
750
751 * debug.c (remote_debug): Add definition.
752 * debug.h (remote_debug): Add declaration.
753 * hostio.c (remote_debug): Remove declaration.
754 * remote-utils.c (struct ui_file): Likewise.
755 (remote_debug): Likewise.
756 * remote-utils.h (remote_debug): Likewise,
757 * server.c (remote_debug): Remove definition.
758
759 2019-04-10 Kevin Buettner <kevinb@redhat.com>
760
761 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
762 when using a 64-bit gdbserver.
763
764 2019-04-09 Tom Tromey <tromey@adacore.com>
765
766 * linux-low.c (select_event_lwp): Use find_thread_in_random.
767
768 2019-04-08 Tom Tromey <tom@tromey.com>
769
770 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
771 throw.
772 (linux_resume_one_lwp): Likewise.
773
774 2019-04-08 Tom Tromey <tom@tromey.com>
775
776 * gdbreplay.c: Update.
777 * linux-low.c: Update.
778 * server.c: Update.
779
780 2019-04-08 Tom Tromey <tom@tromey.com>
781
782 * server.c: Use C++ exception handling.
783 * linux-low.c: Use C++ exception handling.
784 * gdbreplay.c: Use C++ exception handling.
785
786 2019-04-08 Tom Tromey <tom@tromey.com>
787
788 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
789 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
790 (captured_main, main): Update.
791 * gdbreplay.c (main): Update.
792
793 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
794
795 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
796 value in argument pointer, return 1 if the entry is found and 0
797 otherwise. Move comment.
798 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
799 * linux-low.h (linux_get_auxv): Declare.
800 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
801
802 2019-04-05 Tom Tromey <tromey@adacore.com>
803
804 * server.c (gdbserver_usage): Use upper-case for metasyntactic
805 variables.
806
807 2019-03-28 Alan Hayward <alan.hayward@arm.com>
808
809 * linux-low.c (AT_HWCAP2): Add define if not already included.
810
811 2019-03-26 Alan Hayward <alan.hayward@arm.com>
812
813 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
814 (aarch64_arch_setup): Call linux_get_hwcap.
815 * linux-arm-low.c (arm_get_hwcap): Remove function.
816 (arm_read_description): Call linux_get_hwcap.
817 * linux-low.c (linux_get_auxv): New function.
818 (linux_get_hwcap): Likewise.
819 (linux_get_hwcap2): Likewise.
820 * linux-low.h (linux_get_hwcap): New declaration.
821 (linux_get_hwcap2): Likewise.
822 * linux-ppc-low.c (ppc_get_auxv): Remove function.
823 (ppc_arch_setup): Call linux_get_hwcap.
824 * linux-s390-low.c (s390_get_hwcap): Remove function.
825 (s390_arch_setup): Call linux_get_hwcap.
826
827 2019-03-22 Alan Hayward <alan.hayward@arm.com>
828 Jiong Wang <jiong.wang@arm.com>
829
830 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
831 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
832 to fail.
833 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
834
835 2019-03-22 Alan Hayward <alan.hayward@arm.com>
836 Jiong Wang <jiong.wang@arm.com>
837
838 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
839 (aarch64_get_hwcap): New function.
840 (aarch64_arch_setup): Read APIA hwcap.
841
842 2019-03-22 Alan Hayward <alan.hayward@arm.com>
843 Jiong Wang <jiong.wang@arm.com>
844
845 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
846 (initialize_low_tracepoint): Likewise.
847 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
848 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
849 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
850 (aarch64_linux_read_description): Likewise.
851 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
852
853 2019-03-12 John Baldwin <jhb@FreeBSD.org>
854
855 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
856 i386_create_target_description for 'segments' parameter.
857 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
858 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
859 * win32-i386-low.c (i386_arch_setup): Likewise.
860
861 2019-03-12 Tom Tromey <tromey@adacore.com>
862
863 * linux-low.c (iterate_over_lwps): Update.
864
865 2019-03-06 Tom Tromey <tom@tromey.com>
866
867 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
868 (captured_main): Use SCOPE_EXIT.
869
870 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
871
872 * configure.srv: Use '$enable_unittest' instead of '$development'
873 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
874 case.
875
876 2019-02-27 Tom Tromey <tromey@adacore.com>
877
878 * gdbreplay.c (logchar): Handle \r\n.
879
880 2019-02-07 Alan Hayward <alan.hayward@arm.com>
881
882 * linux-low.c (linux_attach): Add process before lwp.
883 * server.c (attach_inferior): Check if already attached.
884
885 2019-02-07 Tom Tromey <tom@tromey.com>
886
887 * x86-tdesc.h: Rename include guard.
888 * x86-low.h: Add include guard.
889 * wincecompat.h: Rename include guard.
890 * win32-low.h: Add include guard.
891 * utils.h: Rename include guard.
892 * tracepoint.h: Rename include guard.
893 * tdesc.h: Rename include guard.
894 * target.h: Rename include guard.
895 * server.h: Rename include guard.
896 * remote-utils.h: Rename include guard.
897 * regcache.h: Rename include guard.
898 * nto-low.h: Rename include guard.
899 * notif.h: Add include guard.
900 * mem-break.h: Rename include guard.
901 * lynx-low.h: Add include guard.
902 * linux-x86-tdesc.h: Add include guard.
903 * linux-s390-tdesc.h: Add include guard.
904 * linux-ppc-tdesc-init.h: Add include guard.
905 * linux-low.h: Add include guard.
906 * linux-aarch64-tdesc.h: Add include guard.
907 * linux-aarch32-low.h: Add include guard.
908 * inferiors.h: Rename include guard.
909 * i387-fp.h: Rename include guard.
910 * hostio.h: Rename include guard.
911 * gdbthread.h: Rename include guard.
912 * gdb_proc_service.h: Rename include guard.
913 * event-loop.h: Rename include guard.
914 * dll.h: Rename include guard.
915 * debug.h: Rename include guard.
916 * ax.h: Rename include guard.
917
918 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
919
920 PR gdb/23985
921 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
922 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
923
924 2019-01-25 Tom Tromey <tom@tromey.com>
925
926 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
927
928 2019-01-25 Tom Tromey <tom@tromey.com>
929
930 * win32-low.c: Fix common/ includes.
931 * win32-i386-low.c: Fix common/ includes.
932 * tracepoint.c: Fix common/ includes.
933 * thread-db.c: Fix common/ includes.
934 * target.h: Fix common/ includes.
935 * symbol.c: Fix common/ includes.
936 * spu-low.c: Fix common/ includes.
937 * server.h: Fix common/ includes.
938 * server.c: Fix common/ includes.
939 * remote-utils.c: Fix common/ includes.
940 * regcache.h: Fix common/ includes.
941 * regcache.c: Fix common/ includes.
942 * nto-x86-low.c: Fix common/ includes.
943 * notif.h: Fix common/ includes.
944 * mem-break.h: Fix common/ includes.
945 * lynx-low.c: Fix common/ includes.
946 * lynx-i386-low.c: Fix common/ includes.
947 * linux-x86-tdesc-selftest.c: Fix common/ includes.
948 * linux-x86-low.c: Fix common/ includes.
949 * linux-low.c: Fix common/ includes.
950 * inferiors.h: Fix common/ includes.
951 * i387-fp.c: Fix common/ includes.
952 * hostio.c: Fix common/ includes.
953 * hostio-errno.c: Fix common/ includes.
954 * gdbthread.h: Fix common/ includes.
955 * gdbreplay.c: Fix common/ includes.
956 * fork-child.c: Fix common/ includes.
957 * event-loop.c: Fix common/ includes.
958 * ax.c:
959 (enum gdb_agent_op): Fix common/ includes.
960
961 2019-01-21 Tom Tromey <tom@tromey.com>
962
963 * tracepoint.c: Fix includes.
964 * remote-utils.c: Fix includes.
965 * linux-x86-low.c: Fix includes.
966
967 2019-01-01 Joel Brobecker <brobecker@adacore.com>
968
969 * gdbreplay.c (gdbreplay_version): Update copyright year in
970 version message.
971 * server.c (gdbserver_version): Likewise.
972
973 2018-12-05 Alan Hayward <alan.hayward@arm.com>
974
975 * linux-low.c (add_lwp): Switch ordering.
976
977 2018-11-29 Tom Tromey <tom@tromey.com>
978
979 * win32-low.c (win32_join): Take pid, not process.
980 * target.h (struct target_ops) <join>: Change argument type.
981 (join_inferior): Change argument name.
982 * spu-low.c (spu_join): Take pid, not process.
983 * server.c (handle_detach): Preserve pid before destroying
984 process.
985 * lynx-low.c (lynx_join): Take pid, not process.
986 * linux-low.c (linux_join): Take pid, not process.
987
988 2018-11-23 Alan Hayward <alan.hayward@arm.com>
989
990 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
991 (aarch64_cannot_fetch_register): Likewise.
992 (struct linux_target_ops): Update references.
993
994 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
995
996 * linux-ppc-low.c: Include nat/linux-ptrace.h.
997
998 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
999
1000 * configure.srv (ipa_ppc_linux_regobj): Add
1001 powerpc-isa207-htm-vsx32l-ipa.o and
1002 powerpc-isa207-htm-vsx64l-ipa.o.
1003 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1004 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1005 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1006 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1007 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1008 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1009 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1010 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1011 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1012 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1013 (init_registers_powerpc_isa207_htm_vsx32l)
1014 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1015 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1016 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1017 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1018 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1019 (ppc_store_tm_ctarregset): New functions.
1020 (ppc_regsets): Add entries for HTM regsets.
1021 (ppc_arch_setup): Set htm in features struct when needed. Set
1022 sizes for the HTM regsets.
1023 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1024 (initialize_low_arch): Call
1025 init_registers_powerpc_isa207_htm_vsx32l and
1026 init_registers_powerpc_isa207_htm_vsx64l.
1027 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1028 PPC_TDESC_ISA207_HTM_VSX.
1029 (initialize_low_tracepoint): Call
1030 init_registers_powerpc_isa207_htm_vsx32l and
1031 init_registers_powerpc_isa207_htm_vsx64l.
1032
1033 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1034
1035 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1036 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1037 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1038 (ppc_store_pmuregset): New functions.
1039 (ppc_regsets): Add entries for ebb and pmu regsets.
1040 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1041 pmu regsets are available. Set sizes for these regsets.
1042
1043 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1044
1045 * configure.srv (ipa_ppc_linux_regobj): Add
1046 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1047 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1048 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1049 rs6000/powerpc-isa207-vsx32l.xml, and
1050 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1051 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1052 <PPC_TDESC_ISA207_VSX>: New enum value.
1053 (init_registers_powerpc_isa207_vsx32l): Declare.
1054 (init_registers_powerpc_isa207_vsx64l): Declare.
1055 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1056 (ppc_store_tarregset): New function.
1057 (ppc_regsets): Add entry for the TAR regset.
1058 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1059 size for the TAR regsets.
1060 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1061 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1062 and init_registers_powerpc_isa207_vsx64l.
1063 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1064 (initialize_low_tracepoint): Call
1065 init_registers_powerpc_isa207_vsx32l and
1066 init_registers_powerpc_isa207_vsx64l.
1067
1068 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1069 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1070
1071 * configure.srv (ipa_ppc_linux_regobj): Add
1072 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1073 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1074 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1075 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1076 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1077 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1078 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1079 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1080 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1081 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1082 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1083 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1084 (ppc_hwcap): Add comment.
1085 (ppc_hwcap2): New global.
1086 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1087 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1088 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1089 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1090 when needed. Set sizes for the the DSCR and PPR regsets.
1091 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1092 (initialize_low_arch): Call
1093 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1094 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1095 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1096 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1097 (initialize_low_tracepoint): Call
1098 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1099 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1100
1101 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1102
1103 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1104
1105 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1106 Simon Marchi <simark@simark.ca>
1107
1108 * acinclude.m4: Include "../selftest.m4".
1109 * configure: Regenerate.
1110 * configure.ac: Use "GDB_AC_SELFTEST".
1111 * configure.srv: Use "$enable_unittests" instead of
1112 "$development" when checking whether unit tests have been
1113 enabled.
1114 * server.c (captured_main): Update message informing that
1115 selftests have been disabled.
1116
1117 2018-10-04 Tom Tromey <tom@tromey.com>
1118
1119 * configure: Rebuild.
1120
1121 2018-10-04 Tom Tromey <tom@tromey.com>
1122
1123 * server.c (handle_status): Rename inner "thread".
1124 (process_serial_event): Declare "res" in 'm' case.
1125 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1126 (iterate_over_lwps): Rename inner "thread".
1127 (linux_qxfer_libraries_svr4): Rename inner "len".
1128 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1129
1130 2018-10-01 Gary Benson <gbenson@redhat.com>
1131
1132 * gdb_proc_service.h: Moved common code to
1133 common/gdb_proc_service.h.
1134
1135 2018-10-01 Gary Benson <gbenson@redhat.com>
1136
1137 * gdb_proc_service.h: Synchronize comments and whitespace with
1138 GDB's version of this file.
1139
1140 2018-09-25 Tom Tromey <tom@tromey.com>
1141
1142 * configure: Rebuild.
1143 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1144
1145 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1146
1147 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1148 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1149 ($(IPA_LIB)): Sort IPA_OBJS.
1150
1151 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1152
1153 * Makefile.in: Remove references to $(ADD_DEPS).
1154
1155 2018-09-16 Tom Tromey <tom@tromey.com>
1156
1157 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1158 variables.
1159 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1160 variables.
1161
1162 2018-09-05 Tom Tromey <tom@tromey.com>
1163
1164 * configure: Rebuild.
1165
1166 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 PR build/23399
1169 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1170
1171 2018-08-27 Tom Tromey <tom@tromey.com>
1172
1173 PR build/23087:
1174 * configure: Rebuild.
1175
1176 2018-08-27 Tom Tromey <tom@tromey.com>
1177
1178 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1179 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1180 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1181 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1182 (s390x_emit_stack_adjust): Add casts to unsigned char.
1183
1184 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1185
1186 PR gdb/23374
1187 PR gdb/23375
1188 * server.h (struct client_state) <disable_randomization>:
1189 Initialize to 1.
1190
1191 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1194 variable.
1195 (mips_supply_ptrace_register): Likewise.
1196
1197 2018-07-22 Tom Tromey <tom@tromey.com>
1198
1199 * configure: Rebuild.
1200
1201 2018-07-22 Tom Tromey <tom@tromey.com>
1202
1203 * win32-low.c (win32_create_inferior): Remove unused variables.
1204 * gdbreplay.c (remote_open): Remove unused variable.
1205 * remote-utils.c (remote_prepare): Remove unused variable.
1206 * x86-tdesc.h (X86_TDESC_H): Define.
1207 (amd64_expedite_regs): Define conditionally.
1208 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1209 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1210 * remote-utils.c (readchar): Remove unused variable.
1211
1212 2018-07-13 Pedro Alves <palves@redhat.com>
1213
1214 * linux-low.c (linux_kill): Change parameter to process_info
1215 pointer instead of pid. Adjust.
1216 * lynx-low.c (lynx_kill): Likewise.
1217 * nto-low.c (nto_kill): Likewise.
1218 * spu-low.c (spu_kill): Likewise.
1219 * win32-low.c (win32_kill): Likewise.
1220 * server.c (handle_v_kill, kill_inferior_callback)
1221 (detach_or_kill_for_exit): Adjust.
1222 * target.c (kill_inferior): Change parameter to process_info
1223 pointer instead of pid. Adjust.
1224 * target.h (struct target_ops) <kill>: Change parameter to
1225 process_info pointer instead of pid. Adjust all implementations
1226 and callers.
1227 (kill_inferior): Likewise.
1228
1229 2018-07-13 Pedro Alves <palves@redhat.com>
1230
1231 * linux-low.c (linux_detach, linux_join): Change parameter to
1232 process_info pointer instead of pid. Adjust.
1233 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1234 * nto-low.c (nto_detach): Likewise.
1235 * spu-low.c (spu_detach, spu_join): Likewise.
1236 * win32-low.c (win32_detach, win32_join): Likewise.
1237 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1238 * target.h (struct target_ops) <detach, join>: Change parameter to
1239 process_info pointer instead of pid. Adjust all implementations
1240 and callers.
1241 (detach_inferior, join_inferior): Rename 'pid' parameter to
1242 'proc'.
1243
1244 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1245 Jan Kratochvil <jan.kratochvil@redhat.com>
1246 Paul Fertser <fercerpav@gmail.com>
1247 Tsutomu Seki <sekiriki@gmail.com>
1248
1249 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1250 (OBS): Add 'common/netstuff.o'.
1251 (GDBREPLAY_OBS): Likewise.
1252 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1253 (remote_open): Implement support for IPv6
1254 connections.
1255 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1256 and 'wspiapi.h'.
1257 (handle_accept_event): Accept connections from IPv6 sources.
1258 (remote_prepare): Handle IPv6-style hostnames; implement
1259 support for IPv6 connections.
1260 (remote_open): Implement support for printing connections from
1261 IPv6 sources.
1262
1263 2018-07-11 Pedro Alves <palves@redhat.com>
1264
1265 PR gdb/23377
1266 * mem-break.c (any_persistent_commands): Add process_info
1267 parameter and use it instead of relying on the current process.
1268 Change return type to bool.
1269 * mem-break.h (any_persistent_commands): Add process_info
1270 parameter and change return type to bool.
1271 * server.c (handle_detach): Remove require_running_or_return call.
1272 Look up the process_info for the process we're about to detach.
1273 If not found, return back error to GDB. Adjust
1274 any_persistent_commands call to pass down a process pointer.
1275
1276 2018-07-11 Pedro Alves <palves@redhat.com>
1277
1278 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1279 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1280 instead of collect_register_by_name.
1281 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1282 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1283
1284 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1285 Pedro Alves <palves@redhat.com>
1286
1287 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1288
1289 2018-07-03 Tom Tromey <tom@tromey.com>
1290
1291 * linux-low.c: Update.
1292 * lynx-low.c: Update.
1293 * mem-break.c: Update.
1294 * nto-low.c: Update.
1295 * remote-utils.c: Update.
1296 * server.c: Update.
1297 * spu-low.c: Update.
1298 * target.c: Update.
1299 * win32-low.c: Update.
1300
1301 2018-07-03 Tom Tromey <tom@tromey.com>
1302
1303 * server.c: Update.
1304
1305 2018-07-03 Tom Tromey <tom@tromey.com>
1306
1307 * linux-low.c: Update.
1308
1309 2018-07-03 Tom Tromey <tom@tromey.com>
1310
1311 * target.c: Update.
1312
1313 2018-07-03 Tom Tromey <tom@tromey.com>
1314
1315 * linux-low.c: Update.
1316 * linux-mips-low.c: Update.
1317 * lynx-low.c: Update.
1318 * nto-low.c: Update.
1319 * remote-utils.c: Update.
1320 * server.c: Update.
1321 * spu-low.c: Update.
1322 * target.c: Update.
1323 * thread-db.c: Update.
1324
1325 2018-07-03 Tom Tromey <tom@tromey.com>
1326
1327 * linux-low.c: Update.
1328 * linux-mips-low.c: Update.
1329 * lynx-low.c: Update.
1330 * mem-break.c: Update.
1331 * nto-low.c: Update.
1332 * remote-utils.c: Update.
1333 * server.c: Update.
1334 * spu-low.c: Update.
1335 * target.c: Update.
1336 * tracepoint.c: Update.
1337
1338 2018-07-03 Tom Tromey <tom@tromey.com>
1339
1340 * linux-low.c: Update.
1341 * linux-ppc-low.c: Update.
1342 * linux-x86-low.c: Update.
1343 * proc-service.c: Update.
1344 * server.c: Update.
1345 * spu-low.c: Update.
1346 * thread-db.c: Update.
1347 * win32-low.c: Update.
1348
1349 2018-07-03 Tom Tromey <tom@tromey.com>
1350
1351 * linux-low.c: Update.
1352 * lynx-low.c: Update.
1353 * nto-low.c: Update.
1354 * remote-utils.c: Update.
1355 * spu-low.c: Update.
1356 * thread-db.c: Update.
1357 * win32-low.c: Update.
1358
1359 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1360
1361 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1362 parameter in call to 'amd64_create_target_description'.
1363
1364 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1365
1366 * x86-tdesc.h: Remove executable permission flag.
1367
1368 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1369
1370 * configure.ac: Remove AC_PREREQ, add missing quoting.
1371 * configure: Re-generate.
1372 * config.in: Re-generate.
1373 * aclocal.m4: Re-generate.
1374
1375 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1376
1377 * tracepoint.h (current_traceframe): Remove declaration.
1378
1379 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1380
1381 * linux-aarch64-low.c (is_sve_tdesc): New function.
1382 (aarch64_sve_regs_copy_to_regcache): Likewise.
1383 (aarch64_sve_regs_copy_from_regcache): Likewise.
1384 (aarch64_regs_info): Add SVE checks.
1385 (initialize_low_arch): Initialize SVE.
1386
1387 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1388
1389 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1390
1391 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1392
1393 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1394 (initialize_low_tracepoint): Likewise
1395 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1396 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1397 param.
1398 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1399 checks.
1400 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1401
1402 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1403
1404 * server.h (PBUFSIZ): Increase size
1405
1406 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1407
1408 * regcache.c (regcache::raw_compare): New function.
1409 * regcache.h (regcache::raw_compare): New declaration.
1410
1411 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1412
1413 * regcache.c (new_register_cache): Use new.
1414 (free_register_cache): Use delete.
1415 (register_data): Use const.
1416 (supply_register): Move body inside regcache.
1417 (regcache::raw_supply): New override function.
1418 (collect_register): Move body inside regcache.
1419 (regcache::raw_collect): New override function.
1420 (regcache::get_register_status): New override function.
1421 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1422
1423 2018-06-09 Tom Tromey <tom@tromey.com>
1424
1425 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1426 declare queue.
1427 (event_queue): Use std::queue.
1428 (gdb_event_xfree): Remove.
1429 (initialize_event_loop, process_event, wait_for_event): Update.
1430
1431 2018-06-08 Stan Cox <scox@redhat.com>
1432
1433 * win32-low.c (win32_create_inferior): last_ptid and last_status
1434 moved to client_state.
1435
1436 2018-06-08 Pedro Alves <palves@redhat.com>
1437
1438 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1439 common/common-exceptions.o, common/common-utils.o,
1440 common/errors.o, common/print-utils.o and utils.o.
1441 * gdbreplay.c: Include "common-defs.h" instead of the two
1442 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1443 string.h or alloca.h.
1444 (perror_with_name): Delete.
1445 (remote_open): Use xstrdup instead of strdup.
1446 (main): Rename to ...
1447 (captured_main): ... this.
1448 (main): New.
1449
1450 2018-06-08 Tom Tromey <tom@tromey.com>
1451
1452 * linux-low.c (linux_low_read_btrace): Update.
1453
1454 2018-06-04 Stan Cox <scox@redhat.com>
1455
1456 * server.h (struct client_state): New.
1457 * server.c (cont_thread, general_thread, multi_process)
1458 (report_fork_events, report_vfork_events, report_exec_events)
1459 (report_thread_events, swbreak_feature, hwbreak_feature)
1460 (vCont_supported, disable_randomization, pass_signals)
1461 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1462 Moved to client_state.
1463 * remote-utils.c (remote_debug, noack_mode)
1464 (transport_is_reliable): Moved to client_state.
1465 * tracepoint.c (current_traceframe): Moved to client_state.
1466
1467 Update all callers.
1468 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1469 linux-low.c, remote-utils.h, target.c: Use client_state.
1470
1471 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1472
1473 * configure.srv: Add new c/h file.
1474
1475 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1476
1477 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1478 null VQ.
1479
1480 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1481
1482 * gdb.arch/mips-fpregset-core.exp: New test.
1483 * gdb.arch/mips-fpregset-core.c: New test source.
1484
1485 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1486
1487 PR server/23198
1488 * hostio.c (require_int): Do not report overflow for integers
1489 between 0xfffffff and 0x7fffffff.
1490
1491 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1492
1493 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1494 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1495 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1496 functions.
1497 (the_low_target): Wire them.
1498
1499 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1500
1501 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1502 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1503 mode. Call collect_register_by_name with vscr using
1504 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1505 (ppc_store_vrregset): Add and set vscr_offset variable as in
1506 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1507 vscr_offset.
1508
1509 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1510
1511 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1512 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1513 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1514
1515 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1516
1517 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1518 (ppc_store_vsxregset): Likewise.
1519 (ppc_fill_vrregset): Likewise.
1520 (ppc_store_vrregset): Likewise.
1521 (ppc_fill_evrregset): Likewise.
1522 (ppc_store_evrregset): Likewise.
1523 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1524 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1525 needed.
1526
1527 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1528
1529 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1530 wordsize of the inferior. Call ppc_linux_target_wordsize.
1531
1532 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1533
1534 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1535 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1536 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1537 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1538 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1539 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1540 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1541 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1542 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1543 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1544 (tdesc_powerpc_e500l): Remove.
1545 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1546 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1547 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1548 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1549 linux-ppc-tdesc.h.
1550 (ppc_arch_setup): Remove target description matching code. Fill a
1551 ppc_linux_features struct and call ppc_linux_match_description
1552 with it.
1553
1554 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1555
1556 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1557 width of the requested register exceeds the width of the
1558 `ptrace' data type.
1559 (mips_cannot_store_register): Likewise.
1560
1561 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1562
1563 * linux-mips-low.c (mips_fetch_register): New function. Update
1564 preceding comment.
1565 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1566 (the_low_target): Wire `mips_fetch_register'.
1567
1568 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1569
1570 * lynx-i386-low.c (LYNXOS_178): New macro.
1571 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1572 the layout on LynxOS-178.
1573 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1574 handle floating point registers that are not supported by
1575 LynxOS-178.
1576
1577 2018-05-10 Tom Tromey <tom@tromey.com>
1578
1579 * configure: Rebuild.
1580
1581 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1582
1583 PR server/23158:
1584 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1585 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1586 Use it to set the expedite_regs field in the given tdesc.
1587 * x86-tdesc.h: New file.
1588 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1589 Adjust following the addition of the new expedite_regs parameter
1590 to init_target_desc.
1591 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1592 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1593 (i386_linux_read_description, amd64_linux_read_description):
1594 Adjust following the addition of the new expedite_regs parameter
1595 to init_target_desc.
1596 * lynx-i386-low.c: #include "x86-tdesc.h".
1597 (lynx_i386_arch_setup): Adjust following the addition of the new
1598 expedite_regs parameter to init_target_desc.
1599 * nto-x86-low.c: #include "x86-tdesc.h".
1600 (nto_x86_arch_setup): Adjust following the addition of the new
1601 expedite_regs parameter to init_target_desc.
1602 * win32-i386-low.c: #include "x86-tdesc.h".
1603 (i386_arch_setup): Adjust following the addition of the new
1604 expedite_regs parameter to init_target_desc.
1605
1606 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1607
1608 PR server/23158:
1609 * win32-low.c (win32_create_inferior): Add call to my_wait
1610 setting last_status global.
1611
1612 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1613
1614 PR server/23158:
1615 * win32-low.c (create_process): Only call gdb_tilde_expand if
1616 inferior_cwd is not NULL.
1617
1618 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1619
1620 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1621 registers to the cache if their values have changed.
1622 (i387_xsave_to_cache): Provide default values for x87 control
1623 registers when these features are available, but disabled.
1624 * regcache.c (supply_register_by_name_zeroed): New function.
1625 * regcache.h (supply_register_by_name_zeroed): Declare new
1626 function.
1627
1628 2018-05-07 Tom Tromey <tom@tromey.com>
1629
1630 * configure: Rebuild.
1631
1632 2018-05-04 Tom Tromey <tom@tromey.com>
1633
1634 * configure: Rebuild.
1635
1636 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1637 Pedro Alves <palves@redhat.com>
1638
1639 * linux-aarch64-low.c (aarch64_stopped_data_address):
1640 Likewise.
1641
1642 2018-04-27 Tom Tromey <tom@tromey.com>
1643
1644 * configure: Rebuild.
1645
1646 2018-04-23 Tom Tromey <tom@tromey.com>
1647
1648 * configure: Rebuild.
1649
1650 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1651
1652 * Makefile.in (depcomp): Add "..".
1653 (all_deps_files): New and use it.
1654
1655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1656
1657 * configure.srv (aarch64*-*-linux*): Don't include xml.
1658 (i[34567]86-*-cygwin*): Likewise.
1659 (i[34567]86-*-linux*): Likewise.
1660 (i[34567]86-*-lynxos*): Likewise.
1661 (i[34567]86-*-mingw32ce*): Likewise.
1662 (i[34567]86-*-mingw*): Likewise.
1663 (i[34567]86-*-nto*): Likewise.
1664 (tic6x-*-uclinux): Likewise.
1665 (x86_64-*-linux*): Likewise.
1666 (x86_64-*-mingw*): Likewise.
1667 (x86_64-*-cygwin*): Likewise.
1668
1669 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1670
1671 * tdesc.c: Remove xml parameter.
1672
1673 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1674
1675 * server.c (get_features_xml): Remove cast.
1676 * tdesc.c (void target_desc::accept): Fill in function.
1677 (tdesc_get_features_xml): Remove old xml creation.
1678 (print_xml_feature::visit_pre): Add xml vistor.
1679 * tdesc.h (struct target_desc): Make xmltarget mutable.
1680 (tdesc_get_features_xml): Remove declaration.
1681
1682 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1683
1684 * tdesc.c (tdesc_architecture_name): Add new function.
1685 (tdesc_osabi_name): Likewise.
1686 (tdesc_get_features_xml): Use new functions.
1687
1688 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1689
1690 * tdesc.c (tdesc_create_flags): Remove.
1691 (tdesc_add_flag): Likewise.
1692 (tdesc_named_type): Likewise.
1693 (tdesc_create_union): Likewise.
1694 (tdesc_create_struct): Likewise.
1695 (tdesc_create_vector): Likewise.
1696 (tdesc_add_bitfield): Likewise.
1697 (tdesc_add_field): Likewise.
1698 (tdesc_set_struct_size): Likewise.
1699
1700 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1701
1702 * tdesc.c (~target_desc): Remove implictly deleted items.
1703 (init_target_desc): Iterate all features.
1704 (tdesc_get_features_xml): Use vector.
1705 (tdesc_create_feature): Create feature.
1706 * tdesc.h (tdesc_feature) Remove
1707 (target_desc): Add features.
1708
1709 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1710
1711 * Makefile.in: Add common/tdesc.c
1712 * tdesc.c (init_target_desc): init all reg_defs from register
1713 vector.
1714 (tdesc_create_reg): Create tdesc_reg.
1715 * tdesc.h (tdesc_feature): Add register vector.
1716
1717 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1718
1719 * tdesc.h (struct target_desc) <features>: Change type to
1720 std::vector<std::string>.
1721 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1722 changes.
1723 (tdesc_get_features_xml): Likewise.
1724 (tdesc_create_feature): Likewise.
1725
1726 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1727
1728 * regcache.c (find_register_by_number): Return a ref.
1729 (find_regno): Use references.
1730 (register_size): Likewise.
1731 (register_data): Likewise.
1732 * tdesc.c (target_desc::~target_desc): Remove free calls.
1733 (target_desc::operator==): Use std::vector compare.
1734 (init_target_desc): Use reference.
1735 (tdesc_create_reg): Use reg constructors.
1736 * tdesc.h (struct target_desc): Replace pointer with object.
1737
1738 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1739
1740 * regcache.c (find_register_by_number): Make static.
1741 (find_regno): Use find_register_by_number
1742 * regcache.h (struct reg): Remove declaration.
1743
1744 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1745
1746 * tdesc.c (target_desc::~target_desc): Move to here.
1747 (target_desc::operator==): Likewise.
1748 * tdesc.h (target_desc::~target_desc): Move from here.
1749 (target_desc::operator==): Likewise.
1750
1751 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1752
1753 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1754
1755 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1756
1757 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1758 S390_TDESC_GS.
1759 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1760 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1761 and init_registers_s390_gs_linux64.
1762
1763 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1764
1765 * linux-s390-low.c (s390_fill_gs): Remove function.
1766 (s390_fill_gsbc): Remove function.
1767 (s390_regsets): Set fill functions for the guarded storage regsets
1768 to NULL.
1769
1770 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1771
1772 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1773 the word size. Add comment.
1774 (s390_get_wordsize): New function.
1775 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1776 pswm with it. Instead, use s390_get_wordsize to determine the
1777 word size first and derive the correct tdesc from that directly.
1778
1779 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1780
1781 * Makefile.in: Include silent-rules.mk.
1782 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1783 (COMPILE): Add ECHO_CXX.
1784 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1785 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1786 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1787 (version-generated.c): Add ECHO_GEN.
1788 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1789 (IPAGENT_COMPILE): Add ECHO_CXX.
1790 (%-generated.c): Add ECHO_REGDAT.
1791
1792 2018-03-14 Tom Tromey <tom@tromey.com>
1793
1794 PR cli/14977:
1795 * ax.c (ax_printf): Special case for NULL.
1796
1797 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1798
1799 * linux-low.c (linux_qxfer_libraries_svr4): Use
1800 xml_escape_text_append.
1801
1802 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1803
1804 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1805
1806 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1807
1808 * server.c (handle_general_set): Remove unnecessary xstrdup.
1809
1810 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1811
1812 * server.c (parse_debug_format_options): Adjust to
1813 delim_string_to_char_ptr_vec changes.
1814 * thread-db.c (thread_db_load_search): Adjust to
1815 dirnames_to_char_ptr_vec changes.
1816
1817 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1818
1819 * target.h (target_enable_btrace, target_disable_btrace)
1820 (target_read_btrace, target_read_btrace_conf): Turn macro into
1821 inline function. Throw error if target method is not defined.
1822 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1823 check for btrace target method. Be prepared to handle exceptions
1824 from btrace target methods.
1825
1826 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1827
1828 * server.c (captured_main): Change order of error message printed
1829 when the current working directory cannot be found.
1830
1831 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1832
1833 * server.c: Include "filenames.h" and "pathstuff.h".
1834 (program_name): Delete variable.
1835 (program_path): New anonymous class.
1836 (get_exec_wrapper): Use "program_path" instead of
1837 "program_name".
1838 (handle_v_run): Likewise.
1839 (captured_main): Likewise.
1840 (process_serial_event): Likewise.
1841
1842 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1843
1844 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1845 (OBJS): Add "pathstuff.o".
1846 * server.c (current_directory): New global variable.
1847 (captured_main): Initialize "current_directory".
1848
1849 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1850
1851 * tdesc.c: Use common/tdesc.h.
1852 * tdesc.h: Likewise.
1853
1854 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1855 Simon Marchi <simon.marchi@ericsson.com>
1856
1857 * Makefile.in: Switch order of make rules.
1858
1859 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1860
1861 * Makefile.in: Add common directory in build.
1862 * configure.ac: Add common reference.
1863 * configure: Regenerate.
1864
1865 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1866
1867 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1868 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1869 * spu-low.c (spu_target_ops): Likewise.
1870 * win32-low.c (win32_target_ops): Likewise.
1871 * server.c (supported_btrace_packets): Report packets unconditionally.
1872 * target.h (target_ops) <supports_btrace>: Remove.
1873 (target_supports_btrace): Remove.
1874
1875 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1876
1877 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1878 (handle_btrace_disable): Change return type to void. Use exceptions
1879 to report errors.
1880 (handle_btrace_general_set): Catch exception and copy message to
1881 return message.
1882
1883 2018-02-08 Tom Tromey <tom@tromey.com>
1884
1885 * linux-low.c (install_software_single_step_breakpoints): Use
1886 make_scoped_restore.
1887 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1888 (do_restore_current_thread_cleanup): Remove.
1889 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1890 declare.
1891
1892 2018-02-08 Tom Tromey <tom@tromey.com>
1893
1894 * mem-break.c (set_raw_breakpoint_at): Use
1895 gdb::unique_xmalloc_ptr.
1896
1897 2018-01-30 Pedro Alves <palves@redhat.com>
1898
1899 PR gdb/13211
1900 * target.c (target_terminal::terminal_state): Rename to ...
1901 (target_terminal::m_terminal_state): ... this.
1902
1903 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1904
1905 * linux-low.c (handle_extended_wait): Surround call to
1906 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1907
1908 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1911 linux_ptrace_attach_fail_reason_string now returning an
1912 std::string.
1913 (linux_attach): Likewise.
1914 * thread-db.c (attach_thread): Likewise.
1915
1916 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1917
1918 PR gdb/21559
1919 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1920 checking for fs_base/gs_base fields in struct user_regs_struct.
1921 * configure: Regenerate.
1922
1923 2018-01-16 Yao Qi <yao.qi@linaro.org>
1924
1925 PR gdb/18749
1926 * linux-low.c (fetch_register): Call supply_register instead of
1927 error.
1928
1929 2018-01-08 Yao Qi <yao.qi@linaro.org>
1930 Simon Marchi <simon.marchi@ericsson.com>
1931
1932 * Makefile.in (OBS): Remove selftest.o.
1933 * configure.ac: Set srv_selftest_objs if $development is true.
1934 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1935 * configure: Re-generated.
1936 * server.c (captured_main): Wrap variable selftest_filter with
1937 GDB_SELF_TEST.
1938
1939 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1940
1941 * server.c (parse_debug_format_options): Return std::string.
1942 (handle_monitor_command, captured_main): Adjust.
1943
1944 2018-01-05 Pedro Alves <palves@redhat.com>
1945
1946 PR gdb/18653
1947 * server.c (captured_main): Pass quiet=false to
1948 save_original_signals_state.
1949
1950 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1951
1952 * gdbreplay.c (gdbreplay_version): Update copyright year in
1953 version message.
1954 * server.c (gdbserver_version): Likewise.
1955
1956 2017-12-08 Tom Tromey <tom@tromey.com>
1957
1958 * ax.c (ax_printf): Update.
1959
1960 2017-12-07 Yao Qi <yao.qi@linaro.org>
1961
1962 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1963 aarch64_linux_read_description.
1964 * linux-amd64-ipa.c (idx2mask): New array.
1965 (get_ipa_tdesc): Move idx2mask out.
1966 (initialize_low_tracepoint): Initialize target descriptions.
1967 * linux-i386-ipa.c (idx2mask): New array.
1968 (get_ipa_tdesc): Move idx2mask out.
1969 (initialize_low_tracepoint): Initialize target descriptions.
1970
1971 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1972
1973 * tdesc.c (struct tdesc_type): Change return type.
1974 (tdesc_add_flag): Change parameter type.
1975 (tdesc_add_bitfield): Likewise.
1976 (tdesc_add_field): Likewise.
1977 (tdesc_set_struct_size): Likewise.
1978
1979 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1980
1981 * regcache.c (registers_to_string): Remove unused variable.
1982
1983 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1984
1985 * inferiors.c (for_each_inferior_with_data): Remove.
1986 * inferiors.h (for_each_inferior_with_data): Remove.
1987 * server.c (handle_qxfer_threads_worker): Change parameter type.
1988 (handle_qxfer_threads_proper): Use for_each_thread.
1989
1990 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1991
1992 * inferiors.c (for_each_inferior): Remove.
1993 (clear_inferiors): Use for_each_thread.
1994 * inferiors.h (for_each_inferior): Remove.
1995 * linux-low.c (linux_wait_for_event_filtered): Use
1996 for_each_thread.
1997 (linux_stabilize_threads): Likewise.
1998 * regcache.c (regcache_release): Likewise.
1999 * server.c (gdb_wants_all_threads_stopped): Likewise.
2000 (clear_pending_status_callback): Remove.
2001 (handle_status): Use for_each_thread.
2002 (captured_main): Likewise.
2003 * win32-low.c (child_init_thread_list): Likewise.
2004 (win32_clear_inferiors): Likewise.
2005 (fake_breakpoint_event): Likewise.
2006
2007 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2008
2009 * inferiors.h (find_inferior): Remove.
2010 * inferiors.c (find_inferior): Remove.
2011
2012 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2013
2014 * linux-low.c (resume_status_pending_p): Update comment.
2015 (need_step_over_p): Update comment.
2016
2017 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2018
2019 * linux-low.c (proceed_one_lwp): Return void, change parameter
2020 type.
2021 (unsuspend_and_proceed_one_lwp): Likewise.
2022 (proceed_all_lwps): Use for_each_thread.
2023 (unstop_all_lwps): Likewise.
2024
2025 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2026
2027 * linux-low.c (linux_resume_one_thread): Return void, take
2028 parameter directly.
2029 (linux_resume): Use for_each_thread.
2030
2031 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2032
2033 * linux-low.c (send_sigstop_callback): Return void, change
2034 parameter type. Rename to...
2035 (send_sigstop): ... this.
2036 (suspend_and_send_sigstop_callback): Return void, change parameter
2037 type. Rename to...
2038 (suspend_and_send_sigstop): ... this.
2039 (stop_all_lwps): Use for_each_thread.
2040
2041 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * linux-low.c (lwp_running): Return bool, remove unused
2044 argument.
2045 (linux_stabilize_threads): Use find_thread.
2046
2047 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2048
2049 * linux-low.c (select_singlestep_lwp_callback): Remove.
2050 (count_events_callback): Remove.
2051 (select_event_lwp_callback): Remove.
2052 (select_event_lwp): Use find_thread/for_each_thread.
2053
2054 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2055
2056 * linux-low.c (not_stopped_callback): Return bool, take filter
2057 argument directly.
2058 (linux_wait_for_event_filtered): Use find_thread.
2059 (linux_wait_1): Likewise.
2060
2061 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2062
2063 * linux-low.c (same_lwp): Remove.
2064 (find_lwp_pid): Use find_thread.
2065
2066 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2067
2068 * linux-low.c (delete_lwp_callback): Remove.
2069 (linux_mourn): Use for_each_thread.
2070
2071 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2072
2073 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2074 args parameter, don't check for pid.
2075 (linux_detach): Use for_each_thread.
2076
2077 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2078
2079 * linux-low.c (struct counter): Remove.
2080 (second_thread_of_pid_p): Remove.
2081 (last_thread_of_process_p): Use find_thread.
2082
2083 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2084
2085 * inferiors.c (find_inferior_in_random): Remove.
2086 * inferiors.h (find_inferior_in_random): Remove.
2087 * linux-low.c (status_pending_p_callback): Return bool, accept
2088 parameter ptid directly.
2089 (linux_wait_for_event_filtered): Use find_thread_in_random.
2090 (linux_wait_1): Likewise.
2091
2092 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2093
2094 * inferiors.c (find_inferior_id): Remove.
2095 (find_thread_ptid): Move implemention from find_inferior_id to
2096 here.
2097 * inferiors.h (find_inferior_id): Remove.
2098 * server.c (handle_status): Use find_thread_ptid.
2099 (process_serial_event): Likewise.
2100 * thread-db.c (find_one_thread): Likewise.
2101 (thread_db_thread_handle): Likewise.
2102 * win32-low.c (thread_rec): Likewise.
2103 (child_delete_thread): Likewise.
2104 (win32_thread_alive): Likewise.
2105 (get_child_debug_event): Likewise.
2106
2107 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2108
2109 * linux-mips-low.c (update_watch_registers_callback): Return
2110 void, remove pid_p parameter, don't check for pid.
2111 (mips_insert_point, mips_remove_point): Use for_each_thread.
2112
2113 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2114
2115 * lynx.low (lynx_delete_thread_callback): Remove.
2116 (lynx_mourn): Use for_each_thread.
2117
2118 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2119
2120 * regcache.c (regcache_invalidate_one): Remove.
2121 (regcache_invalidate_pid): use for_each_thread.
2122
2123 2017-11-26 Tom Tromey <tom@tromey.com>
2124
2125 * linux-low.c (linux_create_inferior): Update.
2126
2127 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2128
2129 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2130
2131 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2132
2133 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2134 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2135 * linux-aarch64-tdesc-selftest.c: New file.
2136 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2137
2138 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2139
2140 * configure.srv: Add new file.
2141 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2142 * linux-aarch64-tdesc-selftest.c: New file.
2143 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2144
2145 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2146
2147 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2148 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2149 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2150
2151 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2152
2153 * configure.srv: Add new files.
2154 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2155 aarch64_linux_read_description.
2156 * linux-aarch64-low.c (aarch64_linux_read_description):
2157 Merge with aarch64_arch_setup.
2158 (aarch64_arch_setup): Call aarch64_linux_read_description.
2159 * linux-aarch64-tdesc.c: New file.
2160 * linux-aarch64-tdesc.h: New file.
2161
2162 2017-11-24 Yao Qi <yao.qi@linaro.org>
2163
2164 * configure.srv: Set $srv_regobj for tic6x-linux.
2165 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2166 (tic6x_read_description): Move some code to tic6x_arch_setup.
2167 (tic6x_tdesc_test): New function.
2168 (initialize_low_arch): Call selftests::register_test.
2169
2170 2017-11-22 Yao Qi <yao.qi@linaro.org>
2171
2172 * remote-utils.c (prepare_resume_reply): Use memcpy.
2173
2174 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2175
2176 * linux-low.c (kill_one_lwp_callback): Return void, take
2177 argument directly, don't filter on pid.
2178 (linux_kill): Use for_each_thread.
2179
2180 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2181
2182 * linux-low.c (need_step_over_p): Return bool, remove dummy
2183 argument.
2184 (linux_resume, proceed_all_lwps): Use find_thread.
2185
2186 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2187
2188 * linux-low.c (resume_status_pending_p): Return bool, remove
2189 flag_p argument.
2190 (linux_resume): Use find_thread.
2191
2192 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * linux-low.c (struct thread_resume_array): Remove.
2195 (linux_set_resume_request): Return void, take arguments
2196 directly.
2197 (linux_resume): Use for_each_thread.
2198
2199 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2200
2201 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2202 return bool, remove data argument.
2203 (linux_stabilize_threads): Use find_thread.
2204
2205 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2206
2207 * linux-low.c (unsuspend_one_lwp): Remove.
2208 (unsuspend_all_lwps): Use for_each_thread, inline code from
2209 unsuspend_one_lwp.
2210
2211 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2212
2213 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2214 * linux-low.c (struct iterate_over_lwps_args): Remove.
2215 (iterate_over_lwps_filter): Remove.
2216 (iterate_over_lwps): Use find_thread.
2217
2218 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2221 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2222 code from reset_lwp_ptrace_options_callback.
2223
2224 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2225
2226 * linux-arm-low.c (struct update_registers_data): Remove.
2227 (update_registers_callback): Return void, take arguments
2228 directly, don't check thread's pid.
2229 (arm_insert_point, arm_remove_point): Use for_each_thread.
2230
2231 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * win32-low.c (continue_one_thread): Return void, take argument
2234 directly.
2235 (child_continue): Use for_each_thread.
2236
2237 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * win32-i386-low.c (update_debug_registers_callback): Rename
2240 to ...
2241 (update_debug_registers): ... this, return void, remove pid_p arg.
2242 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2243
2244 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2245
2246 * inferiors.h (struct process_info): Add constructor, initialize
2247 fields..
2248 <syscalls_to_catch>: Change type to std::vector<int>.
2249 * inferiors.c (add_process): Allocate process_info with new.
2250 (remove_process): Free process_info with delete.
2251 * linux-low.c (handle_extended_wait): Adjust.
2252 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2253 * server.c (handle_general_set): Adjust.
2254
2255 2017-11-16 Pedro Alves <palves@redhat.com>
2256
2257 * remote-utils.c (remote_close): Block SIGIO signals instead of
2258 uninstalling the SIGIO handler.
2259
2260 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2261
2262 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2263
2264 2017-11-16 Yao Qi <yao.qi@linaro.org>
2265
2266 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2267 (tic6x_store_gregset): Likewise.
2268 (tic6x_usrregs_info): Move it up.
2269
2270 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2271
2272 * Makefile.in: Update arch rules.
2273 * configure.srv: Explicitly mark arch/ files.
2274
2275 2017-11-13 Andreas Schwab <schwab@suse.de>
2276
2277 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2278 function.
2279 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2280
2281 2017-11-06 Pedro Alves <palves@redhat.com>
2282
2283 * config.in, configure: Regenerate.
2284
2285 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2286
2287 * target.c (struct thread_search): Remove.
2288 (thread_search_callback): Remove.
2289 (prepare_to_access_memory): Use for_each_thread instead of
2290 find_inferior. Inline code from thread_search_callback.
2291
2292 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2293
2294 * server.c (struct visit_actioned_threads_data): Remove.
2295 (visit_actioned_threads): Change prototype to take arguments
2296 directly.
2297 (resume): Use find_thread instead of find_inferior.
2298
2299 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2300
2301 * server.c (queue_stop_reply_callback): Change prototype, return
2302 void.
2303 (find_status_pending_thread_callback): Remove.
2304 (handle_status): Replace find_inferior with find_thread and
2305 for_each_thread.
2306
2307 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2308
2309 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2310 with REGNO.
2311 (aarch64_store_gregset): Likewise.
2312 (aarch64_fill_fpregset): Likewise.
2313 (aarch64_store_fpregset): Likewise.
2314
2315 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2316
2317 * gdbthread.h (find_thread, for_each_thread): New functions.
2318 * inferiors.c (thread_of_pid): Remove.
2319 (find_any_thread_of_pid): Use find_thread.
2320 * linux-low.c (num_lwps): Use for_each_thread.
2321
2322 2017-10-17 Yao Qi <yao.qi@linaro.org>
2323
2324 * Makefile.in: Remove one rule.
2325 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2326
2327 2017-10-17 Yao Qi <yao.qi@linaro.org>
2328
2329 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2330 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2331
2332 2017-10-17 Yao Qi <yao.qi@linaro.org>
2333
2334 * configure.srv: Rename arm.o with arch/arm.o.
2335
2336 2017-10-17 Yao Qi <yao.qi@linaro.org>
2337
2338 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2339 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2340 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2341 (arch-i386.o, arch-amd64.o): Remove rules.
2342 (arch/%.o): New rule.
2343 Update POSTCOMPILE and COMPILE.pre.
2344 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2345 * configure: Re-generated.
2346 * configure.srv: Replace arch-i386.o with arch/i386.o.
2347 Replace arch-amd64.o with arch/amd64.o.
2348
2349 2017-10-16 Yao Qi <yao.qi@linaro.org>
2350
2351 * configure: Regenerated.
2352
2353 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2354
2355 * inferiors.h: (struct inferior_list): Remove.
2356 (struct inferior_list_entry); Remove.
2357 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2358 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2359 get_first_inferior): Remove.
2360 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2361 find_inferior_id, find_inferior_in_random): Change signature.
2362 * inferiors.c (all_threads): Change type to
2363 std::list<thread_info *>.
2364 (get_thread): Remove macro.
2365 (find_inferior, find_inferior_id): Change signature, implement
2366 using find_thread.
2367 (find_inferior_in_random): Change signature, implement using
2368 find_thread_in_random.
2369 (for_each_inferior, for_each_inferior_with_data): Change
2370 signature, implement using for_each_thread.
2371 (add_inferior_to_list, remove_inferior): Remove.
2372 (add_thread, get_first_thread, thread_of_pid,
2373 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2374 (get_first_inferior, one_inferior_p, clear_inferior_list):
2375 Remove.
2376 (clear_inferiors, get_thread_process): Update.
2377 * gdbthread.h: Include <list>.
2378 (struct thread_info) <entry>: Remove field.
2379 <id>: New field.
2380 (all_threads): Change type to std::list<thread_info *>.
2381 (get_first_inferior): Add doc.
2382 (find_thread, for_each_thread, find_thread_in_random): New
2383 functions.
2384 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2385 * linux-arm-low.c (update_registers_callback): Update.
2386 * linux-low.c (second_thread_of_pid_p): Update.
2387 (kill_one_lwp_callback, linux_detach_lwp_callback,
2388 delete_lwp_callback, status_pending_p_callback, same_lwp,
2389 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2390 iterate_over_lwps, not_stopped_callback,
2391 resume_stopped_resumed_lwps, count_events_callback,
2392 select_singlestep_lwp_callback, select_event_lwp_callback,
2393 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2394 suspend_and_send_sigstop_callback, wait_for_sigstop,
2395 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2396 lwp_running, linux_set_resume_request, resume_status_pending_p,
2397 need_step_over_p, start_step_over, linux_resume_one_thread,
2398 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2399 reset_lwp_ptrace_options_callback): Update.
2400 * linux-mips-low.c (update_watch_registers_callback): Update.
2401 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2402 Update.
2403 (free_register_cache_thread_one): Remove.
2404 (regcache_release): Update.
2405 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2406 handle_qxfer_threads_worker): Update.
2407 (handle_query): Update, use list iterator.
2408 (visit_actioned_threads, handle_pending_status,
2409 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2410 clear_pending_status_callback, set_pending_status_callback,
2411 find_status_pending_thread_callback, handle_status,
2412 process_serial_event): Update.
2413 * target.c (thread_search_callback): Update.
2414 * thread-db.c (thread_db_get_tls_address): Update.
2415 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2416 Update.
2417 * win32-i386-low.c (update_debug_registers_callback): Update.
2418 * win32-low.c (delete_thread_info, child_delete_thread,
2419 continue_one_thread, suspend_one_thread,
2420 get_child_debug_event): Adjust.
2421
2422 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2425 * inferiors.h: Include <list>.
2426 (struct process_info) <entry>: Remove field.
2427 <pid>: New field.
2428 (pid_of): Change macro to function.
2429 (ptid_of, lwpid_of): Remove macro.
2430 (all_processes): Change type to std::list<process_info *>.
2431 (ALL_PROCESSES): Remove macro.
2432 (for_each_process, find_process): New function.
2433 * inferiors.c (all_processes): Change type to
2434 std::list<process_info *>.
2435 (find_thread_process): Adjust.
2436 (add_process): Likewise.
2437 (remove_process): Likewise.
2438 (find_process_pid): Likewise.
2439 (get_first_process): Likewise.
2440 (started_inferior_callback): Remove.
2441 (have_started_inferiors_p): Adjust.
2442 (attached_inferior_callback): Remove.
2443 (have_attached_inferiors_p): Adjust.
2444 * linux-low.c (check_zombie_leaders): Likewise.
2445 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2446 (x86_linux_update_xmltarget): Adjust.
2447 * server.c (handle_query): Likewise.
2448 (gdb_reattached_process): Remove.
2449 (handle_status): Adjust.
2450 (kill_inferior_callback): Likewise.
2451 (detach_or_kill_inferior): Remove.
2452 (print_started_pid): Likewise.
2453 (print_attached_pid): Likewise.
2454 (detach_or_kill_for_exit): Update.
2455 (process_serial_event): Likewise.
2456 * linux-arm-low.c (arm_new_fork): Likewise.
2457
2458 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2459
2460 * dll.h: Include <list>.
2461 (struct dll_info): Add constructor.
2462 <entry>: Remove field.
2463 (all_dlls): Change type to std::list<dll_info>.
2464 * dll.c: Include <algorithm>.
2465 (get_dll): Remove macro.
2466 (all_dlls): Change type to std::list<dll_info *>.
2467 (free_one_dll): Remove.
2468 (match_dll): Likewise.
2469 (loaded_dll): Adjust.
2470 (unloaded_dll): Adjust to all_dlls type change, use
2471 std::find_if. Inline code from match_dll.
2472 (clear_dlls): Adjust to all_dlls type change.
2473 * server.c (emit_dll_description): Remove.
2474 (handle_qxfer_libraries): Adjust to all_dlls type change,
2475 integrate emit_dll_description's functionality.
2476
2477 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 * linux-low.h (struct linux_target_ops) <delete_process>: New
2480 field.
2481 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2482 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2483 (struct linux_target_ops): Add delete_process callback.
2484 * linux-arm-low.c (arm_delete_process): New.
2485 (struct linux_target_ops): Add delete_process callback.
2486 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2487 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2488 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2489 * linux-mips-low.c (mips_linux_delete_process): New.
2490 (struct linux_target_ops): Add delete_process callback.
2491 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2492 * linux-s390-low.c (struct linux_target_ops): Likewise.
2493 * linux-sh-low.c (struct linux_target_ops): Likewise.
2494 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2495 * linux-tile-low.c (struct linux_target_ops): Likewise.
2496 * linux-x86-low.c (x86_linux_delete_process): New.
2497 (struct linux_target_ops): Add delete_process callback.
2498 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2499
2500 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2501
2502 * linux-aarch64-low.c (the_low_target): Add thread delete
2503 callback.
2504 * linux-arm-low.c (arm_delete_thread): New function.
2505 (the_low_target): Add thread delete callback.
2506 * linux-bfin-low.c (the_low_target): Likewise.
2507 * linux-crisv32-low.c (the_low_target): Likewise.
2508 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2509 set.
2510 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2511 field.
2512 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2513 * linux-mips-low.c (mips_linux_delete_thread): New function.
2514 (the_low_target): Add thread delete callback.
2515 * linux-ppc-low.c (the_low_target): Likewise.
2516 * linux-s390-low.c (the_low_target): Likewise.
2517 * linux-sh-low.c (the_low_target): Likewise.
2518 * linux-tic6x-low.c (the_low_target): Likewise.
2519 * linux-tile-low.c (the_low_target): Likewise.
2520 * linux-x86-low.c (the_low_target): Likewise.
2521 * linux-xtensa-low.c (the_low_target): Likewise.
2522
2523 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2524
2525 * win32-low.c: Include "common-inferior.h".
2526
2527 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2528
2529 * inferiors.c (set_inferior_cwd): New function.
2530 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2531 (handle_query): Inform that QSetWorkingDir is supported.
2532 * win32-low.c (create_process): Pass the inferior's cwd to
2533 CreateProcess.
2534
2535 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2536
2537 * inferiors.c (current_inferior_cwd): New global variable.
2538 (get_inferior_cwd): New function.
2539 * inferiors.h (struct process_info) <cwd>: New field.
2540
2541 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2542
2543 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2544 (OBS): Add gdb_tilde_expand.o.
2545
2546 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2547
2548 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2549 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2550
2551 2017-09-29 Pedro Alves <palves@redhat.com>
2552
2553 * ax.c (gdb_parse_agent_expr): Constify.
2554 * ax.h (gdb_parse_agent_expr): Constify.
2555 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2556 Constify.
2557 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2558 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2559 * remote-utils.h (read_ptid): Constify.
2560 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2561 (process_point_options, process_serial_event): Constify.
2562 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2563 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2564 (cmd_qtbuffer): Constify.
2565
2566 2017-09-29 Pedro Alves <palves@redhat.com>
2567
2568 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2569 fails.
2570
2571 2017-09-29 Pedro Alves <palves@redhat.com>
2572
2573 * linux-low.c (handle_extended_wait): Pass parent thread instead
2574 of process to thread_db_notice_clone.
2575 * linux-low.h (thread_db_notice_clone): Replace parent process
2576 parameter with parent thread parameter.
2577 * thread-db.c (find_one_thread): Add comment.
2578 (thread_db_notice_clone): Replace parent process parameter with
2579 parent thread parameter. Temporarily switch to the parent thread.
2580
2581 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2582
2583 * gdbthread.h: Include "common-gdbthread.h".
2584 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2585 "if" when validating the ptid.
2586 * remote-utils.c: Include "gdbthread.h".
2587 (prepare_resume_reply): Use "switch_to_thread".
2588 * target.c (done_accessing_memory): Likewise.
2589
2590 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2591
2592 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2593 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2594 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2595 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2596 s390x-gs-linux64-ipa.o to ipa_obj.
2597 * linux-s390-low.c (HWCAP_S390_GS): New define.
2598 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2599 New functions.
2600 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2601 (s390_arch_setup): Check for guarded-storage support and choose
2602 appropriate tdesc.
2603 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2604 init_registers_s390x_gs_linux64.
2605 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2606 enum value.
2607 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2608 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2609
2610 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2611
2612 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2613
2614 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2615
2616 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2617 (thread_db_thread_handle): Declare.
2618 * linux-low.c (linux_target_ops): Initialize thread_handle.
2619 * server.c (handle_qxfer_threads_worker): Add support for
2620 "handle" attribute.
2621 * target.h (struct target_ops): Add new function pointer,
2622 thread_handle.
2623 (target_thread_handle): Define.
2624 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2625 field in lwp.
2626 (thread_db_thread_handle): New function.
2627
2628 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2629
2630 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2631 * linux-low.h (thread_db_notice_clone): Declare.
2632 * thread-db.c (thread_db_notice_clone): New function.
2633
2634 2017-09-21 Pedro Alves <palves@redhat.com>
2635
2636 * server.c (gdb_read_memory, handle_status, process_serial_event)
2637 (handle_serial_event, handle_target_event): Adjust to
2638 set_desired_thread prototype change.
2639 * target.c (set_desired_thread): Remove 'use_general' parameter
2640 and adjust.
2641 * target.h (set_desired_thread): Remove 'use_general' parameter.
2642
2643 2017-09-20 Tom Tromey <tom@tromey.com>
2644
2645 * target.c (target_terminal::terminal_state): Define.
2646 (target_terminal::init): Rename from target_terminal_init.
2647 (target_terminal::inferior): Rename from
2648 target_terminal_inferior.
2649 (target_terminal::ours): Rename from target_terminal_ours.
2650 (target_terminal::ours_for_output, target_terminal::info): New.
2651
2652 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * server.c (accumulate_file_name_length): Remove.
2655 (emit_dll_description): Adjust to std::string change.
2656 (handle_qxfer_libraries): Use std::string to hold document.
2657
2658 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2661 return type of xml_escape_text.
2662 * server.c (emit_dll_description): Likewise.
2663
2664 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2665
2666 * server.c (captured_main): Accept argument for --selftest.
2667 Update run_tests call.
2668 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2669 when registering selftests.
2670
2671 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2672
2673 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2674 instead of "VEC" for "target_desc.reg_defs".
2675 (regcache_cpy): Likewise.
2676 (registers_to_string): Likewise.
2677 (registers_from_string): Likewise.
2678 (find_regno): Likewise.
2679 (supply_regblock): Likewise.
2680 (regcache_raw_read_unsigned): Likewise.
2681 * tdesc.c (init_target_desc): Likewise.
2682 (tdesc_create_reg): Likewise.
2683 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2684 (struct target_desc) <reg_defs>: Convert to "std::vector".
2685 (target_desc): Do not initialize "reg_defs".
2686 (~target_desc): Update code to use "std::vector" instead of "VEC"
2687 for "target_desc.reg_defs".
2688 (operator==): Likewise.
2689
2690 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2691
2692 * inferiors.h (thread_to_gdb_id): Remove.
2693 * inferiors.c (thread_to_gdb_id): Remove.
2694 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2695 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2696 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2697 Likewise.
2698 * nto-low.c (nto_fetch_registers, nto_store_registers,
2699 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2700
2701 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 * inferiors.h (gdb_id_to_thread_id): Remove.
2704 * inferiors.c (gdb_id_to_thread_id): Remove.
2705 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2706 removal. Move pid declaration closer to where it's used.
2707
2708 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2709
2710 * server.c (handle_detach): New function.
2711 (process_serial_event): Move code out, call handle_detach.
2712
2713 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2714
2715 * server.c (require_running): Rename to ...
2716 (require_running_or_return): ... this ...
2717 (require_running_or_break): ... and this.
2718 (handle_query, process_serial_event): Adjust.
2719
2720 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2721
2722 * linux-low.c (linux_set_resume_request): Remove unused
2723 variables.
2724
2725 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2726
2727 * server.c (first_thread_of): Remove.
2728 (process_serial_event): Replace usage of first_thread_of with
2729 find_any_thread_of_pid.
2730 * tracepoint.c (same_process_p): Remove.
2731 (gdb_agent_about_to_close): Replace usage of same_process_p with
2732 find_any_thread_of_pid.
2733 * linux-x86-low.c (same_process_callback): Remove.
2734 (x86_arch_setup_process_callback): Replace usage of
2735 same_process_callback with find_any_thread_of_pid.
2736 * thread-db.c (any_thread_of): Remove.
2737 (switch_to_process): Replace usage of any_thread_of with
2738 find_any_thread_of_pid.
2739 * inferiors.c (thread_pid_matches_callback): Remove.
2740 (find_thread_process): Adjust to use find_any_thread_of_pid.
2741
2742 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2743
2744 * regcache.c (get_thread_regcache): Guard calls to "memset"
2745 with "!VEC_empty".
2746
2747 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2748
2749 * linux-low.c (handle_extended_wait): Use
2750 "allocate_target_description" instead of "XNEW".
2751 * linux-x86-low.c (initialize_low_arch): Likewise.
2752
2753 2017-09-05 Yao Qi <yao.qi@linaro.org>
2754
2755 * configure.srv (srv_i386_regobj): Remove.
2756 (srv_amd64_regobj): Remove.
2757 (srv_regobj): Set it to "" for x86 non-linux targets.
2758 * linux-x86-tdesc.c (i386_linux_read_description):
2759 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2760 (init_registers_i386): Remove the declaration.
2761 (tdesc_i386): Remove the declaration.
2762 (lynx_i386_arch_setup): Call i386_create_target_description.
2763 * nto-x86-low.c: Likewise.
2764 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2765 [!__x86_64__]: include arch/i386.h.
2766 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2767
2768 2017-09-05 Yao Qi <yao.qi@linaro.org>
2769
2770 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2771 i386/amd64-XXX-linux from it.
2772
2773 2017-09-05 Yao Qi <yao.qi@linaro.org>
2774
2775 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2776 false.
2777 (ipa_amd64_linux_regobj): Remove.
2778 (ipa_x32_linux_regobj): Remove.
2779
2780 2017-09-05 Yao Qi <yao.qi@linaro.org>
2781
2782 * Makefile.in (arch-amd64.o): New rule.
2783 * configure.srv: Append arch-amd64.o.
2784 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2785 (get_ipa_tdesc): Call amd64_linux_read_description.
2786 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2787 and init_registers_amd64_XXX.
2788 * linux-x86-low.c (x86_linux_read_description): Call
2789 amd64_linux_read_description.
2790 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2791 (initialize_low_arch): Don't call init_registers_x32_XXX and
2792 init_registers_amd64_XXX.
2793 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2794 and tdesc_amd64_XXX.
2795 [__x86_64__] (amd64_tdesc_test): New function.
2796 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2797 and init_registers_amd64_XXX.
2798 * linux-x86-tdesc.c: Include arch/amd64.h.
2799 (xcr0_to_tdesc_idx): New function.
2800 (i386_linux_read_description): New function.
2801 (amd64_get_ipa_tdesc_idx): New function.
2802 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2803 (amd64_get_ipa_tdesc): Declare.
2804
2805 2017-09-05 Yao Qi <yao.qi@linaro.org>
2806
2807 * configure.srv (srv_i386_linux_xmlfiles): Remove
2808 i386/i386-XXX-linux.xml from it.
2809
2810 2017-09-05 Yao Qi <yao.qi@linaro.org>
2811
2812 * configure.srv: Set srv_i386_linux_regobj empty if $development
2813 is false.
2814 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2815 initialize_low_tdesc.
2816 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2817 with #if initialize_low_tdesc.
2818 * linux-x86-tdesc-selftest.c: New file.
2819 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2820
2821 2017-09-05 Yao Qi <yao.qi@linaro.org>
2822
2823 * Makefile.in (arch-i386.o): New rule.
2824 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2825 (x86_64-*-linux*): Likewise.
2826 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2827 include arch/i386.h.
2828 (i386_linux_read_description): Remove code and call
2829 i386_create_target_description.
2830 * tdesc.c (allocate_target_description): New function.
2831 * tdesc.h (set_tdesc_architecture): Remove declaration.
2832 (set_tdesc_osabi): Likewise.
2833
2834 2017-09-05 Yao Qi <yao.qi@linaro.org>
2835
2836 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2837 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2838 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2839 .xmltarget.
2840 * server.c (get_features_xml): Call tdesc_get_features_xml.
2841 * tdesc.c (set_tdesc_architecture): New function.
2842 (set_tdesc_osabi): New function.
2843 (tdesc_get_features_xml): New function.
2844 (tdesc_create_feature): Add an argument.
2845 * tdesc.h (struct target_desc) <features>: New field.
2846 <arch, osabi>: New field.
2847 (~target_desc): xfree features, arch, and osabi.
2848 (target_desc::oerator==): Don't compare .xmltarget.
2849 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2850 (set_tdesc_osabi): Likewise.
2851 (tdesc_get_features_xml): Likewise.
2852
2853 2017-09-05 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-x86-tdesc.c: Include selftest.h.
2856 (i386_tdesc_test): New function.
2857 (initialize_low_tdesc): Call selftests::register_test.
2858 * tdesc.h: Include regdef.h.
2859 (target_desc): Override operator == and !=.
2860
2861 2017-09-05 Yao Qi <yao.qi@linaro.org>
2862
2863 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2864 (ipa_obj): Likewise.
2865 * linux-i386-ipa.c: Include common/x86-xstate.h
2866 (get_ipa_tdesc): Call i386_linux_read_description.
2867 (initialize_low_tracepoint): Don't call init_registers_XXX
2868 functions, call initialize_low_tdesc instead.
2869 * linux-x86-low.c (x86_linux_read_description): Call
2870 i386_linux_read_description.
2871 (initialize_low_arch): Don't call init_registers_i386_XXX
2872 functions, call initialize_low_tdesc.
2873 * linux-x86-tdesc.c: New file.
2874 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2875 (i386_get_ipa_tdesc_idx): Declare.
2876 (i386_get_ipa_tdesc): Declare.
2877 (initialize_low_tdesc): Declare.
2878
2879 2017-09-05 Yao Qi <yao.qi@linaro.org>
2880
2881 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2882 instead of 0.
2883
2884 2017-09-05 Yao Qi <yao.qi@linaro.org>
2885
2886 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2887 * regcache.c (get_thread_regcache): Use VEC_length.
2888 (init_register_cache): Likewise.
2889 (regcache_cpy): Likewise.
2890 (registers_to_string): Iterate reg_defs via VEC_iterate.
2891 (find_regno): Likewise.
2892 (find_register_by_number): Use VEC_index.
2893 (register_size): Call find_register_by_number.
2894 (register_data): Call find_register_by_number.
2895 (supply_regblock): Use VEC_length.
2896 (regcache_raw_read_unsigned): Likewise.
2897 * tdesc.c (init_target_desc): Iterate reg_defs via
2898 VEC_iterate.
2899 (default_description): Update initializer.
2900 (copy_target_description): Don't update field num_registers.
2901 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2902 <num_registers>: Remove.
2903
2904 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2905
2906 * Makefile.in (.SECONDARY): Define target.
2907
2908 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2909
2910 * linux-low.c (linux_wait_1): Adjust.
2911 * server.c (queue_stop_reply_callback): Adjust.
2912
2913 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2914
2915 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2916 QEnvironmentUnset and QEnvironmentReset packets.
2917 (handle_query): Inform remote that QEnvironmentHexEncoded,
2918 QEnvironmentUnset and QEnvironmentReset are supported.
2919
2920 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2921
2922 * inferiors.h (inferior_target_data): Rename to ...
2923 (thread_target_data): ... this.
2924 (inferior_regcache_data): Rename to ...
2925 (thread_regcache_data): ... this.
2926 (set_inferior_regcache_data): Rename to ...
2927 (set_thread_regcache_data): ... this.
2928 * inferiors.c (inferior_target_data): Rename to ...
2929 (thread_target_data): ... this.
2930 (inferior_regcache_data): Rename to ...
2931 (thread_regcache_data): ... this.
2932 (set_inferior_regcache_data): Rename to ...
2933 (set_thread_regcache_data): ... this.
2934 (free_one_thread): Update.
2935 * linux-low.h (get_thread_lwp): Update.
2936 * regcache.c (get_thread_regcache): Update.
2937 (regcache_invalidate_thread): Update.
2938 (free_register_cache_thread): Update.
2939 * win32-i386-low.c (update_debug_registers_callback): Update.
2940 (win32_get_current_dr): Update.
2941 * win32-low.c (thread_rec): Update.
2942 (delete_thread_info): Update.
2943 (continue_one_thread): Update.
2944 (suspend_one_thread): Update.
2945
2946 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2947
2948 * inferiors.c (set_inferior_target_data): Remove.
2949 * inferiors.h (set_inferior_target_data): Remove.
2950
2951 2017-08-18 Yao Qi <yao.qi@linaro.org>
2952
2953 * Makefile.in (OBS): Add selftest.o.
2954 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2955 * configure, config.in: Re-generated.
2956 * server.c: Include common/sefltest.h.
2957 (captured_main): Handle option --selftest.
2958
2959 2017-08-09 Yao Qi <yao.qi@linaro.org>
2960
2961 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2962 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2963 i386-avx-mpx.o and i386-mmx.o.
2964 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2965 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2966 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2967 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2968 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2969 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2970 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2971 i386/amd64-avx-mpx.xml.
2972
2973 2017-08-09 Yao Qi <yao.qi@linaro.org>
2974
2975 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2976 and x32-avx-avx512.o.
2977 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2978 i386/x32-avx-avx512.xml.
2979
2980 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2981
2982 * tracepoint.h (enum class fast_tpoint_collect_result): New
2983 enumeration.
2984 (fast_tracepoint_collecting): Change return type to
2985 fast_tpoint_collect_result.
2986 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2987 * linux-low.h: Include tracepoint.h.
2988 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2989 fast_tpoint_collect_result.
2990 * linux-low.c (handle_tracepoints): Adjust.
2991 (linux_fast_tracepoint_collecting): Change return type to
2992 fast_tpoint_collect_result.
2993 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2994 linux_wait_1, stuck_in_jump_pad_callback,
2995 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2996 proceed_one_lwp): Adjust to type change.
2997
2998 2017-07-10 Yao Qi <yao.qi@linaro.org>
2999
3000 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3001
3002 2017-06-29 Yao Qi <yao.qi@linaro.org>
3003
3004 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3005 Remove.
3006 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3007
3008 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3009
3010 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3011
3012 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3013
3014 * linux-low.c (linux_create_inferior): Adjust code to access the
3015 environment information via 'gdb_environ' class.
3016 * lynx-low.c (lynx_create_inferior): Likewise.
3017 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3018 (get_environ): Return a pointer to 'our_environ'.
3019 (captured_main): Initialize 'our_environ'.
3020 * server.h (get_environ): Adjust prototype.
3021 * spu-low.c (spu_create_inferior): Adjust code to access the
3022 environment information via 'gdb_environ' class.
3023
3024 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3025
3026 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3027 usage of "register" keyword.
3028
3029 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3030
3031 * configure: Re-generate.
3032
3033 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3034
3035 * configure: Re-generate.
3036
3037 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3038
3039 * Makefile.in (COMPILE.pre): Add "-x c++".
3040
3041 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3042
3043 * fork-child.c: Conditionally include <signal.h>.
3044
3045 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3046
3047 * server.c (handle_general_set): Handle new packet
3048 "QStartupWithShell".
3049 (handle_query): Add "QStartupWithShell" to the list of supported
3050 packets.
3051 (gdbserver_usage): Add help text explaining the
3052 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3053 options.
3054 (captured_main): Recognize and act upon the presence of the new
3055 CLI options.
3056
3057 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3058 Pedro Alves <palves@redhat.com>
3059
3060 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3061 * configure: Regenerate.
3062 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3063 "fork-inferior.o".
3064 (i[34567]86-*-lynxos*): Likewise.
3065 (spu*-*-*): Likewise.
3066 * fork-child.c: New file.
3067 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3068 and "environ.h".
3069 (linux_ptrace_fun): New function.
3070 (linux_create_inferior): Adjust function prototype to reflect
3071 change on "target.h". Adjust function code to use
3072 "fork_inferior".
3073 (linux_request_interrupt): Delete "signal_pid".
3074 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3075 (lynx_ptrace_fun): New function.
3076 (lynx_create_inferior): Adjust function prototype to reflect
3077 change on "target.h". Adjust function code to use
3078 "fork_inferior".
3079 * nto-low.c (nto_create_inferior): Adjust function prototype and
3080 code to reflect change on "target.h". Update comments.
3081 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3082 "common-terminal.h" and "environ.h".
3083 (terminal_fd): Moved to fork-child.c.
3084 (old_foreground_pgrp): Likewise.
3085 (restore_old_foreground_pgrp): Likewise.
3086 (last_status): Make it global.
3087 (last_ptid): Likewise.
3088 (our_environ): New variable.
3089 (startup_with_shell): Likewise.
3090 (program_name): Likewise.
3091 (program_argv): Rename to...
3092 (program_args): ...this.
3093 (wrapper_argv): New variable.
3094 (start_inferior): Delete function.
3095 (get_exec_wrapper): New function.
3096 (get_exec_file): Likewise.
3097 (get_environ): Likewise.
3098 (prefork_hook): Likewise.
3099 (post_fork_inferior): Likewise.
3100 (postfork_hook): Likewise.
3101 (postfork_child_hook): Likewise.
3102 (handle_v_run): Update code to deal with arguments coming from the
3103 remote host. Update calls from "start_inferior" to
3104 "create_inferior".
3105 (captured_main): Likewise. Initialize environment variable. Call
3106 "have_job_control".
3107 * server.h (post_fork_inferior): New prototype.
3108 (get_environ): Likewise.
3109 (last_status): Declare.
3110 (last_ptid): Likewise.
3111 (signal_pid): Likewise.
3112 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3113 (spu_ptrace_fun): New function.
3114 (spu_create_inferior): Adjust function prototype to reflect change
3115 on "target.h". Adjust function code to use "fork_inferior".
3116 * target.c (target_terminal_init): New function.
3117 (target_terminal_inferior): Likewise.
3118 (target_terminal_ours): Likewise.
3119 * target.h: Include <vector>.
3120 (struct target_ops) <create_inferior>: Update prototype.
3121 (create_inferior): Update macro.
3122 * utils.c (gdb_flush_out_err): New function.
3123 * win32-low.c (win32_create_inferior): Adjust function prototype
3124 and code to reflect change on "target.h".
3125
3126 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3127
3128 * inferiors.c (switch_to_thread): New function.
3129
3130 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3131
3132 * Makefile.in (SFILE): Add "common/job-control.c".
3133 (OBS): Add "job-control.o".
3134
3135 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3136
3137 * Makefile: Remove "@host_makefile_frag@".
3138
3139 2017-05-05 Pedro Alves <palves@redhat.com>
3140
3141 * configure: Regenerate.
3142
3143 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3144
3145 * configure: Regenerate.
3146
3147 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3148
3149 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3150 software_single_step change of return type to
3151 std::vector<CORE_ADDR>.
3152 * linux-low.c (install_software_single_step_breakpoints):
3153 Likewise.
3154 * linux-low.h (install_software_single_step_breakpoints):
3155 Likewise.
3156
3157 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3158
3159 * remote-utils.c: Include "gdb_termios.h" instead of
3160 "terminal.h".
3161 * terminal.h: Delete file.
3162
3163 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3164
3165 * server.c: Include <vector>.
3166 <program_argv, wrapper_argv>: Convert to std::vector.
3167 (start_inferior): Rewrite function to use C++.
3168 (handle_v_run): Likewise. Update code that calculates the argv
3169 based on the vRun packet; use C++.
3170 (captured_main): Likewise.
3171
3172 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3173
3174 * server.c (handle_v_cont): Initialize thread_resume::thread
3175 with null_ptid.
3176
3177 2017-04-05 Pedro Alves <palves@redhat.com>
3178
3179 * configure: Regenerate.
3180
3181 2017-04-05 Pedro Alves <palves@redhat.com>
3182
3183 * gdbreplay.c (sync_error): Constify.
3184 * linux-x86-low.c (push_opcode): Constify.
3185
3186 2017-04-05 Pedro Alves <palves@redhat.com>
3187
3188 * win32-low.c (get_child_debug_event)
3189 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3190 Report TARGET_WAITKIND_SPURIOUS instead.
3191
3192 2017-04-05 Pedro Alves <palves@redhat.com>
3193
3194 * remote-utils.c (remote_prepare, remote_open): Constify.
3195 * remote-utils.h (remote_prepare, remote_open): Constify.
3196 * server.c (captured_main): Constify 'port' handling.
3197
3198 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3199
3200 * Makefile.in (clean): Clear .deps.
3201
3202 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3203
3204 * .gitignore: Remove generated files, replace with wildcard.
3205 * (clean): Replace removal of generated files with wildcard.
3206 (version.c): Replace with...
3207 (version-generated.c): ...this.
3208 (xml-builtin.c): Replace with...
3209 (xml-builtin-generated.c): ...this.
3210 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3211 (%.c: *regformats*): Replace with...
3212 (%-generated.c: *regformats*): ...this.
3213
3214 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3215
3216 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3217 (xtensa_fill_gregset): Call collect_register_by_name for
3218 threadptr register.
3219 (xtensa_store_gregset): Call supply_register_by_name for
3220 threadptr register.
3221
3222 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3223
3224 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3225 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3226 (xtensa_store_gregset): Call supply_register for all registers in
3227 a0_regnum..a0_regnum + C0_NREGS range.
3228
3229 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3230
3231 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3232 (ax-ipa.o: ax.c): Remove.
3233 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3234 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3235 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3236 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3237 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3238
3239 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3242 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3243 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3244 (errors-ipa.o: ../common/errors.c): Remove.
3245 (format-ipa.o: ../common/format.c): Remove.
3246 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3247
3248 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3249
3250 * Makefile.in (%-ipa.o: %.c): New rule.
3251 (tracepoint-ipa.o: tracepoint.c): Remove.
3252 (utils-ipa.o: utils.c): Remove.
3253 (remote-utils-ipa.o: remote-utils.c): Remove.
3254 (regcache-ipa.o: regcache.c): Remove.
3255 (i386-linux-ipa.o: i386-linux.c): Remove.
3256 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3257 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3258 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3259 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3260 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3261 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3262 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3263 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3264 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3265 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3266 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3267 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3268 (aarch64-ipa.o: aarch64.c): Remove.
3269 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3270 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3271 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3272 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3273 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3274 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3275 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3276 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3277 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3278 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3279 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3280 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3281 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3282 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3283 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3284 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3285 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3286 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3287 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3288 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3289 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3290 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3291 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3292 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3293 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3294 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3295 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3296 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3297 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3298 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3299 (tdesc-ipa.o: tdesc.c): Remove.
3300 (x32-linux-ipa.o: x32-linux.c): Remove.
3301 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3302 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3303
3304 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3305
3306 * Makefile.in (%.o: ../arch/%.c): New rule.
3307 (arm.o: ../arch/arm.c): Remove.
3308 (arm-linux.o: ../arch/arm-linux.c): Remove.
3309 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3310 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3311
3312 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3313
3314 * Makefile.in (%.o: ../nat/%.c): New rule.
3315 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3316 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3317 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3318 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3319 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3320 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3321 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3322 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3323 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3324 (linux-personality.o: ../nat/linux-personality.c): Remove.
3325 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3326 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3327 (x86-linux.o: ../nat/x86-linux.c): Remove.
3328 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3329 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3330
3331 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3332
3333 * Makefile.in (%.o: ../common/%.c): New rule.
3334 (signals.o: ../common/signals.c): Remove.
3335 (print-utils.o: ../common/print-utils.c): Remove.
3336 (rsp-low.o: ../common/rsp-low.c): Remove.
3337 (common-utils.o: ../common/common-utils.c): Remove.
3338 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3339 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3340 (vec.o: ../common/vec.c): Remove.
3341 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3342 (xml-utils.o: ../common/xml-utils.c): Remove.
3343 (ptid.o: ../common/ptid.c): Remove.
3344 (buffer.o: ../common/buffer.c): Remove.
3345 (format.o: ../common/format.c): Remove.
3346 (filestuff.o: ../common/filestuff.c): Remove.
3347 (agent.o: ../common/agent.c): Remove.
3348 (errors.o: ../common/errors.c): Remove.
3349 (environ.o: ../common/environ.c): Remove.
3350 (common-debug.o: ../common/common-debug.c): Remove.
3351 (cleanups.o: ../common/cleanups.c): Remove.
3352 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3353 (fileio.o: ../common/fileio.c): Remove.
3354 (common-regcache.o: ../common/common-regcache.c): Remove.
3355 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3356 (new-op.o: ../common/new-op.c): Remove.
3357 (btrace-common.o: ../common/btrace-common.c): Remove.
3358
3359 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3360
3361 * Makefile.in (%.o: ../target/%.c): New rule.
3362 (waitstatus.o: ../target/waitstatus.c): Remove.
3363
3364 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3365
3366 * Makefile.in
3367 (%.c: ../regformats/%.dat,
3368 (%.c: ../regformats/arm/%.dat,
3369 (%.c: ../regformats/i386/%.dat,
3370 (%.c: ../regformats/rs6000/%.dat): New rules.
3371 (aarch64.c): Remove.
3372 (reg-arm.c): Remove.
3373 (arm-with-iwmmxt.c): Remove.
3374 (arm-with-vfpv2.c): Remove.
3375 (arm-with-vfpv3.c): Remove.
3376 (arm-with-neon.c): Remove.
3377 (reg-bfin.c): Remove.
3378 (reg-cris.c): Remove.
3379 (reg-crisv32.c): Remove.
3380 (i386.c): Remove.
3381 (i386-linux.c): Remove.
3382 (i386-avx.c): Remove.
3383 (i386-avx-linux.c): Remove.
3384 (i386-avx-avx512.c): Remove.
3385 (i386-avx-avx512-linux.c): Remove.
3386 (i386-mpx.c): Remove.
3387 (i386-mpx-linux.c): Remove.
3388 (i386-avx-mpx-avx512-pku.c): Remove.
3389 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3390 (i386-avx-mpx.c): Remove.
3391 (i386-avx-mpx-linux.c): Remove.
3392 (i386-mmx.c): Remove.
3393 (i386-mmx-linux.c): Remove.
3394 (reg-ia64.c): Remove.
3395 (reg-m32r.c): Remove.
3396 (reg-m68k.c): Remove.
3397 (reg-cf.c): Remove.
3398 (mips-linux.c): Remove.
3399 (mips-dsp-linux.c): Remove.
3400 (mips64-linux.c): Remove.
3401 (mips64-dsp-linux.c): Remove.
3402 (nios2-linux.c): Remove.
3403 (powerpc-32.c): Remove.
3404 (powerpc-32l.c): Remove.
3405 (powerpc-altivec32l.c): Remove.
3406 (powerpc-cell32l.c): Remove.
3407 (powerpc-vsx32l.c): Remove.
3408 (powerpc-isa205-32l.c): Remove.
3409 (powerpc-isa205-altivec32l.c): Remove.
3410 (powerpc-isa205-vsx32l.c): Remove.
3411 (powerpc-e500l.c): Remove.
3412 (powerpc-64l.c): Remove.
3413 (powerpc-altivec64l.c): Remove.
3414 (powerpc-cell64l.c): Remove.
3415 (powerpc-vsx64l.c): Remove.
3416 (powerpc-isa205-64l.c): Remove.
3417 (powerpc-isa205-altivec64l.c): Remove.
3418 (powerpc-isa205-vsx64l.c): Remove.
3419 (s390-linux32.c): Remove.
3420 (s390-linux32v1.c): Remove.
3421 (s390-linux32v2.c): Remove.
3422 (s390-linux64.c): Remove.
3423 (s390-linux64v1.c): Remove.
3424 (s390-linux64v2.c): Remove.
3425 (s390-te-linux64.c): Remove.
3426 (s390-vx-linux64.c): Remove.
3427 (s390-tevx-linux64.c): Remove.
3428 (s390x-linux64.c): Remove.
3429 (s390x-linux64v1.c): Remove.
3430 (s390x-linux64v2.c): Remove.
3431 (s390x-te-linux64.c): Remove.
3432 (s390x-vx-linux64.c): Remove.
3433 (s390x-tevx-linux64.c): Remove.
3434 (tic6x-c64xp-linux.c): Remove.
3435 (tic6x-c64x-linux.c): Remove.
3436 (tic6x-c62x-linux.c): Remove.
3437 (reg-sh.c): Remove.
3438 (reg-sparc64.c): Remove.
3439 (reg-spu.c): Remove.
3440 (amd64.c): Remove.
3441 (amd64-linux.c): Remove.
3442 (amd64-avx.c): Remove.
3443 (amd64-avx-linux.c): Remove.
3444 (amd64-avx-avx512.c): Remove.
3445 (amd64-avx-avx512-linux.c): Remove.
3446 (amd64-mpx.c): Remove.
3447 (amd64-mpx-linux.c): Remove.
3448 (amd64-avx-mpx-avx512-pku.c): Remove.
3449 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3450 (amd64-avx-mpx.c): Remove.
3451 (amd64-avx-mpx-linux.c): Remove.
3452 (x32.c): Remove.
3453 (x32-linux.c): Remove.
3454 (x32-avx.c): Remove.
3455 (x32-avx-linux.c): Remove.
3456 (x32-avx-avx512.c): Remove.
3457 (x32-avx-avx512-linux.c): Remove.
3458 (reg-xtensa.c): Remove.
3459 (reg-tilegx.c): Remove.
3460 (reg-tilegx32.c): Remove.
3461
3462 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3463
3464 * Makefile.in (SFILES): Add "common/environ.c".
3465 (OBJS): Add "common/environ.h".
3466
3467 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3468
3469 * configure.ac: Check if the fs_base and gs_base members of
3470 `struct user_regs_struct' exist.
3471 * config.in: Regenerated.
3472 * configure: Likewise.
3473
3474 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3475
3476 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3477 target_read_memory.
3478 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3479 (get_next_pcs_syscall_next_pc): Likewise.
3480
3481 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3482
3483 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3484 * nto-x86-low.c: Likewise.
3485
3486 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3487
3488 * Makefile.in: Include disable-implicit-rules.mk.
3489
3490 2016-11-23 Pedro Alves <palves@redhat.com>
3491
3492 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3493 (debug_vprintf): Use std::chrono::steady_clock instead of
3494 gettimeofday. Use '.' instead of ':'.
3495 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3496 (get_timestamp): Use std::chrono::steady_clock instead of
3497 gettimeofday.
3498
3499 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3500
3501 * Makefile.in: Fix whitespace formatting.
3502
3503 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3504
3505 * Makefile.in (SFILES, OBS): Flatten list and order
3506 alphabetically.
3507
3508 2016-11-23 Pedro Alves <palves@redhat.com>
3509
3510 * event-loop.c (handle_file_event): Use warning.
3511 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3512 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3513 Use warning.
3514
3515 2016-11-23 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3518 output.
3519 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3520 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3521 debug_printf and debug_flush for debug output.
3522 * server.c (handle_general_set): Likewise.
3523 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3524 output.
3525
3526 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3527
3528 * Makefile.in (.c.o): Replace rule with ...
3529 (%.o: %.c): ... this one.
3530
3531 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3532
3533 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3534 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3535 make.
3536 * configure.ac: Remove checks for the make program.
3537 * configure: Re-generate.
3538
3539 2016-10-28 Pedro Alves <palves@redhat.com>
3540
3541 * Makefile.in (CXX_DIALECT): Get from configure.
3542 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3543 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3544 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3545 * config.in: Regenerate.
3546 * configure: Regenerate.
3547
3548 2016-10-27 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-low.c (linux_supports_range_stepping): Return true if
3551 can_software_single_step return true.
3552
3553 2016-10-27 Yao Qi <yao.qi@linaro.org>
3554
3555 * inferiors.c (find_inferior_in_random): New function.
3556 * inferiors.h (find_inferior_in_random): Declare.
3557 * linux-low.c (linux_wait_for_event_filtered): Call
3558 find_inferior_in_random instead of find_inferior.
3559
3560 2016-10-27 Yao Qi <yao.qi@linaro.org>
3561
3562 * linux-low.c (linux_wait_1): If single-step breakpoints are
3563 inserted, remove them.
3564
3565 2016-10-26 Pedro Alves <palves@redhat.com>
3566
3567 * linux-low.c (handle_extended_wait): Link parent/child fork
3568 threads.
3569 (linux_wait_1): Unlink them.
3570 (linux_set_resume_request): Ignore resume requests for
3571 already-resumed and unhandled fork child threads.
3572 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3573 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3574 New functions.
3575 (handle_v_requests) <vCont>: Don't call require_running.
3576 * server.h (in_queued_stop_replies): New declaration.
3577
3578 2016-10-24 Yao Qi <yao.qi@linaro.org>
3579
3580 PR server/20733
3581 * linux-aarch64-low.c (append_insns): Cast the return value to
3582 'uint32_t *'.
3583
3584 2016-10-10 Yao Qi <yao.qi@linaro.org>
3585
3586 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3587
3588 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3589
3590 * target.c (target_supports_multi_process): New function, moved
3591 from...
3592 * target.h (target_supports_multi_process): ... here. Remove
3593 macro.
3594
3595 2016-10-05 Tom Tromey <tom@tromey.com>
3596
3597 PR remote/20655:
3598 * tracepoint.c (handle_tracepoint_bkpts): Check
3599 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3600
3601 2016-10-05 Yao Qi <yao.qi@linaro.org>
3602
3603 * configure.srv: Update the path of arm-*.xml files.
3604
3605 2016-10-05 Terry Guo <terry.guo@arm.com>
3606 Yao Qi <yao.qi@linaro.org>
3607
3608 * Makefile.in: Adjust the path of rules.
3609 * configure.srv: Update the path of xml files.
3610 * regformats/arm-with-iwmmxt.dat: Regenerated.
3611 * regformats/arm-with-neon.dat: Likewise.
3612 * regformats/arm-with-vfpv2.dat: Likewise.
3613 * regformats/arm-with-vfpv3.dat Likewise.
3614
3615 2016-09-30 Yao Qi <yao.qi@linaro.org>
3616
3617 PR gdbserver/20627
3618 * target.c (target_stop_and_wait): Don't call
3619 target_continue_no_signal, use resume_stop instead.
3620
3621 2016-09-26 Yao Qi <yao.qi@linaro.org>
3622
3623 * linux-low.c (linux_wait_1): Call debug_exit.
3624
3625 2016-09-23 Pedro Alves <palves@redhat.com>
3626
3627 * Makefile.in (SFILES): Add common/new-op.c.
3628 (OBS): Add common/new-op.o.
3629 (new-op.o): New rule.
3630
3631 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * .gitinore: Ignore more files.
3634
3635 2016-09-21 Yao Qi <yao.qi@linaro.org>
3636
3637 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3638 23.
3639
3640 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3641
3642 * server.c (start_inferior): Call target_mourn_inferior instead of
3643 mourn_inferior; pass ptid_t argument to it.
3644 (resume): Likewise.
3645 (handle_target_event): Likewise.
3646 * target.c (target_mourn_inferior): New function.
3647 * target.h (mourn_inferior): Delete macro.
3648
3649 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3650
3651 * linux-low.c (lwp_is_stepping): New function.
3652
3653 2016-09-06 Carl Love <cel@us.ibm.com>
3654
3655 * server.c (start_inferior): Fixed comment, requested comment change
3656 didn't get updated correctly. Removed reference to ptrace () call as
3657 it is only true on Linux systems.
3658
3659 2016-09-06 Carl Love <cel@us.ibm.com>
3660
3661 * server.c (start_inferior): Do not call
3662 function target_post_create_inferior () if the
3663 inferior process has already exited.
3664
3665 2016-09-05 Pedro Alves <palves@redhat.com>
3666
3667 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3668 (COMPILE.pre, CC_LD): Use CXX directly.
3669 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3670 * acinclude.m4: Don't include build-with-cxx.m4.
3671 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3672 * configure: Regenerate.
3673
3674 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3675
3676 PR gdb/19495
3677 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3678 call writing data to own_buf.
3679
3680 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3681
3682 * target.c (mywait): Call target_wait instead of
3683 the_target->wait.
3684 (target_wait): New function.
3685
3686 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3687
3688 * server.c (start_inferior): New variable 'ptid'. Replace calls
3689 to the_target->resume by target_continue{,_no_signal}, depending
3690 on the case.
3691 * target.c (target_stop_and_wait): Call target_continue_no_signal
3692 instead of the_target->resume.
3693 (target_continue): New function.
3694
3695 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3696
3697 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3698
3699 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3700
3701 PR server/20491
3702 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3703 ps_prochandle.
3704 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3705 * linux-arm-low.c (ps_get_thread_area): Likewise.
3706 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3707 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3708 * linux-mips-low.c (ps_get_thread_area): Likewise.
3709 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3710 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3711 * linux-x86-low.c (ps_get_thread_area): Likewise.
3712 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3713
3714 2016-08-19 Pedro Alves <palves@redhat.com>
3715
3716 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3717
3718 2016-08-19 Pedro Alves <palves@redhat.com>
3719
3720 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3721 comment. Use memcpy instead of casting through unsigned long.
3722
3723 2016-08-19 Pedro Alves <palves@redhat.com>
3724
3725 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3726 allocating around 0x80000000.
3727
3728 2016-08-19 Pedro Alves <palves@redhat.com>
3729
3730 PR gdb/20415
3731 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3732 (x32-avx512-linux-ipa.o): New rules.
3733 * configure.ac (x86_64-*-linux*): New x32 check.
3734 * configure.srv (ipa_x32_linux_regobj): New.
3735 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3736 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3737 descriptions.
3738 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3739 descriptions.
3740 * configure: Regenerate.
3741
3742 2016-08-09 Pedro Alves <palves@redhat.com>
3743
3744 PR gdb/18653
3745 * Makefile.in (OBS): Add signals-state-save-restore.o.
3746 (signals-state-save-restore.o): New rule.
3747 * config.in: Regenerate.
3748 * configure: Regenerate.
3749 * linux-low.c: Include "signals-state-save-restore.h".
3750 (linux_create_inferior): Call
3751 restore_original_signals_state.
3752 * server.c: Include "dispositions-save-restore.h".
3753 (captured_main): Call save_original_signals_state.
3754
3755 2016-08-05 Pedro Alves <palves@redhat.com>
3756
3757 * configure: Regenerate.
3758
3759 2016-08-04 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-low.c (regsets_fetch_inferior_registers): Check
3762 errno is ESRCH or not.
3763
3764 2016-08-02 Yao Qi <yao.qi@linaro.org>
3765
3766 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3767 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3768 (thread_db_load_search): Update.
3769 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3770 td_ta_set_event and td_ta_event_getmsg.
3771
3772 2016-07-26 Pedro Alves <palves@redhat.com>
3773
3774 PR server/20414
3775 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3776 of unsigned long for 64-bit registers and use uint32_t instead of
3777 unsigned int for 32-bit registers.
3778
3779 2016-07-26 Pedro Alves <palves@redhat.com>
3780
3781 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3782 to 'ptrace'.
3783
3784 2016-07-21 Tom Tromey <tom@tromey.com>
3785
3786 * configure: Rebuild.
3787
3788 2016-07-21 Yao Qi <yao.qi@linaro.org>
3789
3790 * mem-break.c (find_gdb_breakpoint): Cast bp to
3791 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3792
3793 2016-07-21 Yao Qi <yao.qi@linaro.org>
3794
3795 * server.c (handle_v_requests): Support s and S actions
3796 if target_supports_software_single_step return true.
3797
3798 2016-07-21 Yao Qi <yao.qi@linaro.org>
3799
3800 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3801 is resume_step, call maybe_hw_step.
3802 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3803 and unstop them.
3804 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3805 breakpoints or not.
3806 (proceed_one_lwp): If resume request is resume_step, install
3807 reinsert breakpoints and call maybe_hw_step.
3808
3809 2016-07-21 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-low.c (proceed_one_lwp): Declare.
3812 (linux_resume_one_thread): Remove local variable 'step'.
3813 Lift code enqueue signal. Call proceed_one_lwp instead of
3814 linux_resume_one_lwp.
3815
3816 2016-07-21 Yao Qi <yao.qi@linaro.org>
3817
3818 * linux-low.c (linux_resume_one_thread): Call
3819 enqueue_pending_signal.
3820
3821 2016-07-21 Yao Qi <yao.qi@linaro.org>
3822
3823 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3824 * inferiors.c (do_restore_current_thread_cleanup): New function.
3825 (make_cleanup_restore_current_thread): Likewise.
3826 * linux-low.c (install_software_single_step_breakpoints): Call
3827 make_cleanup_restore_current_thread. Switch current_thread to
3828 thread.
3829
3830 2016-07-21 Yao Qi <yao.qi@linaro.org>
3831
3832 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3833 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3834 (clone_one_breakpoint): Likewise.
3835 (delete_reinsert_breakpoints): Change parameter to thread.
3836 Callers updated.
3837 (has_reinsert_breakpoints): Likewise.
3838 (uninsert_reinsert_breakpoints): Likewise.
3839 (reinsert_reinsert_breakpoints): Likewise.
3840 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3841 (delete_reinsert_breakpoints): Likewise.
3842 (reinsert_reinsert_breakpoints): Likewise.
3843 (uninsert_reinsert_breakpoints): Likewise.
3844 (has_reinsert_breakpoints): Likewise.
3845
3846 2016-07-21 Yao Qi <yao.qi@linaro.org>
3847
3848 * inferiors.c (get_thread_process): Make parameter const.
3849 * inferiors.h (get_thread_process): Update declaration.
3850 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3851 Add new parameters child_thread and parent_thread. Callers
3852 updated.
3853 * mem-break.h (clone_all_breakpoints): Update declaration.
3854
3855 2016-07-21 Yao Qi <yao.qi@linaro.org>
3856
3857 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3858 <command_list, handler>: Remove.
3859 (struct gdb_breakpoint): New.
3860 (struct other_breakpoint): New.
3861 (struct reinsert_breakpoint): New.
3862 (is_gdb_breakpoint): New function.
3863 (any_persistent_commands): Update command_list if
3864 is_gdb_breakpoint returns true.
3865 (set_breakpoint): Create breakpoints according to their types.
3866 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3867 (set_gdb_breakpoint_1): Likewise.
3868 (set_gdb_breakpoint): Likewise.
3869 (clear_breakpoint_conditions): Change parameter type to
3870 'struct gdb_breakpoint *'.
3871 (clear_breakpoint_commands): Likewise.
3872 (clear_breakpoint_conditions_and_commands): Likewise.
3873 (add_condition_to_breakpoint): Likewise.
3874 (add_breakpoint_condition): Likewise.
3875 (add_commands_to_breakpoint): Likewise.
3876 (check_breakpoints): Check other_breakpoint.
3877 (clone_one_breakpoint): Clone breakpopint according to its type.
3878 * mem-break.h (struct gdb_breakpoint): Declare.
3879 (set_gdb_breakpoint): Update declaration.
3880 (clear_breakpoint_conditions_and_commands): Likewise.
3881 (add_breakpoint_condition): Likewise.
3882 (add_breakpoint_commands): Likewise.
3883 * server.c (process_point_options): Change parameter type to
3884 'struct gdb_breakpoint *'.
3885
3886 2016-07-21 Yao Qi <yao.qi@linaro.org>
3887
3888 * mem-break.c (set_breakpoint_at): Rename it to ...
3889 (set_breakpoint_type_at): ... it.
3890 (set_breakpoint_at): Call set_breakpoint_type_at.
3891 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3892 * mem-break.h (set_breakpoint_at): Update comments.
3893
3894 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3895
3896 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3897 to buf parameter.
3898 (nios2_store_gregset): Likewise.
3899
3900 2016-07-01 Pedro Alves <palves@redhat.com>
3901 Antoine Tremblay <antoine.tremblay@ericsson.com>
3902
3903 * linux-low.c: Change interface to take the target lwp_info
3904 pointer directly and return void. Handle detaching from a zombie
3905 thread.
3906 (linux_detach_lwp_callback): New function.
3907 (linux_detach): Detach from the leader thread after detaching from
3908 the clone threads.
3909
3910 2016-06-28 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3913 for variable new_offset.
3914 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3915 (aarch64_ftrace_insn_reloc_cb): Likewise.
3916 (aarch64_ftrace_insn_reloc_tb): Likewise.
3917 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3918 PRIx64 instead of PRIx32.
3919
3920 2016-06-28 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3923 (the_low_target): Install arm_get_syscall_trapinfo.
3924
3925 2016-06-28 Yao Qi <yao.qi@linaro.org>
3926
3927 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3928 function.
3929 (the_low_target): Install aarch64_get_syscall_trapinfo.
3930
3931 2016-06-28 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3934 Callers updated.
3935 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3936 Remove parameter sysno.
3937 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3938 sysret.
3939
3940 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3941
3942 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3943 (s390_emit_ne_goto): Likewise.
3944 (s390_emit_lt_goto): Likewise.
3945 (s390_emit_le_goto): Likewise.
3946 (s390_emit_gt_goto): Likewise.
3947 (s390_emit_ge_goto): Likewise.
3948 (s390x_emit_eq_goto): Likewise.
3949 (s390x_emit_ne_goto): Likewise.
3950 (s390x_emit_lt_goto): Likewise.
3951 (s390x_emit_le_goto): Likewise.
3952 (s390x_emit_gt_goto): Likewise.
3953 (s390x_emit_ge_goto): Likewise.
3954 (s390_emit_ops_impl): Mark variable static.
3955 (s390x_emit_ops): Likewise.
3956
3957 2016-06-17 Yao Qi <yao.qi@linaro.org>
3958
3959 * linux-low.c (handle_extended_wait): Call
3960 uninsert_reinsert_breakpoints for the parent process. Remove
3961 reinsert breakpoints from the child process. Reinsert them to
3962 the parent process when vfork is done.
3963 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3964 (reinsert_reinsert_breakpoints): New function.
3965 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3966 (reinsert_reinsert_breakpoints): Declare.
3967
3968 2016-06-17 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-low.c (handle_extended_wait): If the parent is doing
3971 step-over, remove the reinsert breakpoints from the forked child.
3972
3973 2016-06-17 Yao Qi <yao.qi@linaro.org>
3974
3975 * linux-low.c (unsuspend_all_lwps): Declare.
3976 (linux_low_filter_event): If thread exited, call finish_step_over.
3977 If step-over is finished, unsuspend other threads.
3978
3979 2016-06-17 Yao Qi <yao.qi@linaro.org>
3980
3981 * linux-low.c (linux_resume_one_lwp_throw): Assert
3982 has_reinsert_breakpoints returns false.
3983 * mem-break.c (delete_disabled_breakpoints): Assert
3984 bp type isn't reinsert_breakpoint.
3985
3986 2016-06-17 Yao Qi <yao.qi@linaro.org>
3987
3988 * linux-low.c (maybe_hw_step): New function.
3989 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3990 (finish_step_over): Switch current_thread to lwp temporarily,
3991 and assert has_reinsert_breakpoints returns true.
3992 (proceed_one_lwp): Call maybe_hw_step.
3993 * mem-break.c (has_reinsert_breakpoints): New function.
3994 * mem-break.h (has_reinsert_breakpoints): Declare.
3995
3996 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3997
3998 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3999
4000 2016-05-17 Yao Qi <yao.qi@linaro.org>
4001
4002 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4003 instead of find_inferior.
4004
4005 2016-05-05 Yao Qi <yao.qi@linaro.org>
4006
4007 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4008 Initialize res to zero.
4009
4010 2016-05-05 Yao Qi <yao.qi@linaro.org>
4011
4012 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4013 to uint32_t.
4014
4015 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4016
4017 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4018 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4019 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4020
4021 2016-04-28 Par Olsson <par.olsson@windriver.com>
4022 Simon Marchi <simon.marchi@ericsson.com>
4023
4024 * tracepoint.c (write_inferior_int8): New function.
4025 (cmd_qtenable_disable): Write enable flag using
4026 write_inferior_int8.
4027
4028 2016-04-25 Yao Qi <yao.qi@linaro.org>
4029
4030 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4031 (need_step_over_p): Return zero if the LWP has pending signals
4032 can be delivered on software single step target.
4033
4034 2016-04-25 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4037 return instead of error.
4038
4039 2016-04-22 Yao Qi <yao.qi@linaro.org>
4040
4041 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4042 to 23.
4043
4044 2016-04-22 Yao Qi <yao.qi@linaro.org>
4045
4046 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4047 signal when stepping over breakpoint with software single
4048 step.
4049
4050 2016-04-21 Pedro Alves <palves@redhat.com>
4051
4052 * linux-s390-low.c (s390_collect_ptrace_register)
4053 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4054 add casts.
4055 (s390_check_regset): Use void * instead of gdb_byte *.
4056
4057 2016-04-20 Pedro Alves <palves@redhat.com>
4058
4059 * configure: Renegerate.
4060
4061 2016-04-20 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4064 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4065 number 16.
4066 (arm_store_gregset): Likewise.
4067
4068 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4069
4070 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4071 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4072 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4073 (amd64-avx-mpx-linux.c): New rules.
4074 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4075 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4076 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4077 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4078 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4079 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4080 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4081 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4082 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4083 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4084 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4085 * linux-x86-low.c (x86_linux_read_description): Add case for
4086 X86_XSTATE_AVX_MPX_MASK.
4087 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4088 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4089 init_registers_i386_avx_mpx_linux.
4090 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4091 (initialize_low_tracepoint): Call
4092 init_registers_i386_avx_mpx_linux.
4093 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4094 (initialize_low_tracepoint): Call
4095 init_registers_amd64_avx_mpx_linux.
4096 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4097 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4098 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4099 declarations.
4100
4101 2016-04-18 Pedro Alves <palves@redhat.com>
4102
4103 * configure: Regenerate.
4104
4105 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4106
4107 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4108 (aarch64_emit_sub): Likewise.
4109
4110 2016-04-12 Pedro Alves <palves@redhat.com>
4111
4112 * utils.c (prepare_to_throw_exception): Delete.
4113
4114 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4115
4116 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4117
4118 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4119
4120 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4121
4122 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4123
4124 * linux-aarch64-ipa.c: Add <elf.h> include.
4125 * linux-ppc-ipa.c: Add <elf.h> include.
4126 * linux-s390-ipa.c: Add <elf.h> include.
4127
4128 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4129
4130 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4131 (get_raw_reg_ptr): Likewise.
4132 (get_trace_state_variable_value_ptr): Likewise.
4133 (set_trace_state_variable_value_ptr): Likewise.
4134 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4135 char *.
4136
4137 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4138 Marcin Kościelnicki <koriakin@0x04.net>
4139
4140 PR/17221
4141 * linux-ppc-low.c (emit_insns): New function.
4142 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4143 (ppc_emit_prologue): New function.
4144 (ppc_emit_epilogue): New function.
4145 (ppc_emit_add): New function.
4146 (ppc_emit_sub): New function.
4147 (ppc_emit_mul): New function.
4148 (ppc_emit_lsh): New function.
4149 (ppc_emit_rsh_signed): New function.
4150 (ppc_emit_rsh_unsigned): New function.
4151 (ppc_emit_ext): New function.
4152 (ppc_emit_zero_ext): New function.
4153 (ppc_emit_log_not): New function.
4154 (ppc_emit_bit_and): New function.
4155 (ppc_emit_bit_or): New function.
4156 (ppc_emit_bit_xor): New function.
4157 (ppc_emit_bit_not): New function.
4158 (ppc_emit_equal): New function.
4159 (ppc_emit_less_signed): New function.
4160 (ppc_emit_less_unsigned): New function.
4161 (ppc_emit_ref): New function.
4162 (ppc_emit_const): New function.
4163 (ppc_emit_reg): New function.
4164 (ppc_emit_pop): New function.
4165 (ppc_emit_stack_flush): New function.
4166 (ppc_emit_swap): New function.
4167 (ppc_emit_stack_adjust): New function.
4168 (ppc_emit_call): New function.
4169 (ppc_emit_int_call_1): New function.
4170 (ppc_emit_void_call_2): New function.
4171 (ppc_emit_if_goto): New function.
4172 (ppc_emit_goto): New function.
4173 (ppc_emit_eq_goto): New function.
4174 (ppc_emit_ne_goto): New function.
4175 (ppc_emit_lt_goto): New function.
4176 (ppc_emit_le_goto): New function.
4177 (ppc_emit_gt_goto): New function.
4178 (ppc_emit_ge_goto): New function.
4179 (ppc_write_goto_address): New function.
4180 (ppc_emit_ops_impl): New static variable.
4181 (ppc64v1_emit_prologue): New function.
4182 (ppc64v2_emit_prologue): New function.
4183 (ppc64_emit_epilogue): New function.
4184 (ppc64_emit_add): New function.
4185 (ppc64_emit_sub): New function.
4186 (ppc64_emit_mul): New function.
4187 (ppc64_emit_lsh): New function.
4188 (ppc64_emit_rsh_signed): New function.
4189 (ppc64_emit_rsh_unsigned): New function.
4190 (ppc64_emit_ext): New function.
4191 (ppc64_emit_zero_ext): New function.
4192 (ppc64_emit_log_not): New function.
4193 (ppc64_emit_bit_and): New function.
4194 (ppc64_emit_bit_or): New function.
4195 (ppc64_emit_bit_xor): New function.
4196 (ppc64_emit_bit_not): New function.
4197 (ppc64_emit_equal): New function.
4198 (ppc64_emit_less_signed): New function.
4199 (ppc64_emit_less_unsigned): New function.
4200 (ppc64_emit_ref): New function.
4201 (ppc64_emit_const): New function.
4202 (ppc64v1_emit_reg): New function.
4203 (ppc64v2_emit_reg): New function.
4204 (ppc64_emit_pop): New function.
4205 (ppc64_emit_stack_flush): New function.
4206 (ppc64_emit_swap): New function.
4207 (ppc64v1_emit_call): New function.
4208 (ppc64v2_emit_call): New function.
4209 (ppc64v1_emit_int_call_1): New function.
4210 (ppc64v2_emit_int_call_1): New function.
4211 (ppc64v1_emit_void_call_2): New function.
4212 (ppc64v2_emit_void_call_2): New function.
4213 (ppc64_emit_if_goto): New function.
4214 (ppc64_emit_eq_goto): New function.
4215 (ppc64_emit_ne_goto): New function.
4216 (ppc64_emit_lt_goto): New function.
4217 (ppc64_emit_le_goto): New function.
4218 (ppc64_emit_gt_goto): New function.
4219 (ppc64_emit_ge_goto): New function.
4220 (ppc64v1_emit_ops_impl): New static variable.
4221 (ppc64v2_emit_ops_impl): New static variable.
4222 (ppc_emit_ops): New function.
4223 (linux_low_target): Wire in ppc_emit_ops.
4224
4225 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4226 Marcin Kościelnicki <koriakin@0x04.net>
4227
4228 PR/17221
4229 * Makefile.in: Add powerpc-*-ipa.o
4230 * configure.srv: Add ipa_obj for powerpc*-linux.
4231 * linux-ppc-ipa.c: New file.
4232 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4233 includes.
4234 (PPC_FIELD): New macro.
4235 (PPC_SEXT): New macro.
4236 (PPC_OP6): New macro.
4237 (PPC_BO): New macro.
4238 (PPC_LI): New macro.
4239 (PPC_BD): New macro.
4240 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4241 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4242 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4243 (ppc_get_thread_area): New function.
4244 (is_elfv2_inferior): New function.
4245 (gen_ds_form): New function.
4246 (GEN_STD): New macro.
4247 (GEN_STDU): New macro.
4248 (GEN_LD): New macro.
4249 (GEN_LDU): New macro.
4250 (gen_d_form): New function.
4251 (GEN_ADDI): New macro.
4252 (GEN_ADDIS): New macro.
4253 (GEN_LI): New macro.
4254 (GEN_LIS): New macro.
4255 (GEN_ORI): New macro.
4256 (GEN_ORIS): New macro.
4257 (GEN_LWZ): New macro.
4258 (GEN_STW): New macro.
4259 (GEN_STWU): New macro.
4260 (gen_xfx_form): New function.
4261 (GEN_MFSPR): New macro.
4262 (GEN_MTSPR): New macro.
4263 (GEN_MFCR): New macro.
4264 (GEN_MTCR): New macro.
4265 (GEN_SYNC): New macro.
4266 (GEN_LWSYNC): New macro.
4267 (gen_x_form): New function.
4268 (GEN_OR): New macro.
4269 (GEN_MR): New macro.
4270 (GEN_LWARX): New macro.
4271 (GEN_STWCX): New macro.
4272 (GEN_CMPW): New macro.
4273 (gen_md_form): New function.
4274 (GEN_RLDICL): New macro.
4275 (GEN_RLDICR): New macro.
4276 (gen_i_form): New function.
4277 (GEN_B): New macro.
4278 (GEN_BL): New macro.
4279 (gen_b_form): New function.
4280 (GEN_BNE): New macro.
4281 (GEN_LOAD): New macro.
4282 (GEN_STORE): New macro.
4283 (gen_limm): New function.
4284 (gen_atomic_xchg): New function.
4285 (gen_call): New function.
4286 (ppc_relocate_instruction): New function.
4287 (ppc_install_fast_tracepoint_jump_pad): New function.
4288 (ppc_get_min_fast_tracepoint_insn_len): New function.
4289 (ppc_get_ipa_tdesc_idx): New function.
4290 (the_low_target): Wire in the new functions.
4291 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4292 tdescs.
4293 * linux-ppc-tdesc.h: New file.
4294
4295 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4296
4297 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4298 (alloc_jump_pad_buffer): New function.
4299 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4300 (alloc_jump_pad_buffer): New function.
4301 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4302 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4303 (alloc_jump_pad_buffer): New function.
4304 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4305 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4306 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4307 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4308
4309 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4310
4311 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4312 * linux-amd64-ipa.c: Likewise.
4313 * linux-i386-ipa.c: Likewise.
4314 * linux-s390-ipa.c: Likewise.
4315 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4316 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4317 set_trace_state_variable_value_ptr.
4318 (struct ipa_sym_addresses): Likewise.
4319 (symbol_list): Likewise.
4320 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4321 accessing gdb_collect directly.
4322 (gdb_collect_ptr_type): New typedef.
4323 (get_raw_reg_ptr_type): New typedef.
4324 (get_trace_state_variable_value_ptr_type): New typedef.
4325 (set_trace_state_variable_value_ptr_type): New typedef.
4326 (gdb_collect_ptr): New global.
4327 (get_raw_reg_ptr): New global.
4328 (get_trace_state_variable_value_ptr): New global.
4329 (set_trace_state_variable_value_ptr): New global.
4330 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4331 accessing get_raw_reg directly.
4332 (get_get_tsv_func_addr): Likewise for
4333 get_trace_state_variable_value_ptr.
4334 (get_set_tsv_func_addr): Likewise for
4335 set_trace_state_variable_value_ptr.
4336 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4337
4338 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4339
4340 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4341
4342 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4343
4344 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4345 packets.
4346 (relocate_instruction): Remove own_buf.
4347 * server.c (own_buf): Make global.
4348 (handle_v_requests): Make global.
4349 * server.h (own_buf): New declaration.
4350 (handle_v_requests): New prototype.
4351
4352 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4353
4354 PR 18377
4355 * linux-s390-low.c (add_insns): New function.
4356 (s390_emit_prologue): New function.
4357 (s390_emit_epilogue): New function.
4358 (s390_emit_add): New function.
4359 (s390_emit_sub): New function.
4360 (s390_emit_mul): New function.
4361 (s390_emit_lsh): New function.
4362 (s390_emit_rsh_signed): New function.
4363 (s390_emit_rsh_unsigned): New function.
4364 (s390_emit_ext): New function.
4365 (s390_emit_log_not): New function.
4366 (s390_emit_bit_and): New function.
4367 (s390_emit_bit_or): New function.
4368 (s390_emit_bit_xor): New function.
4369 (s390_emit_bit_not): New function.
4370 (s390_emit_equal): New function.
4371 (s390_emit_less_signed): New function.
4372 (s390_emit_less_unsigned): New function.
4373 (s390_emit_ref): New function.
4374 (s390_emit_if_goto): New function.
4375 (s390_emit_goto): New function.
4376 (s390_write_goto_address): New function.
4377 (s390_emit_litpool): New function.
4378 (s390_emit_const): New function.
4379 (s390_emit_call): New function.
4380 (s390_emit_reg): New function.
4381 (s390_emit_pop): New function.
4382 (s390_emit_stack_flush): New function.
4383 (s390_emit_zero_ext): New function.
4384 (s390_emit_swap): New function.
4385 (s390_emit_stack_adjust): New function.
4386 (s390_emit_set_r2): New function.
4387 (s390_emit_int_call_1): New function.
4388 (s390_emit_void_call_2): New function.
4389 (s390_emit_eq_goto): New function.
4390 (s390_emit_ne_goto): New function.
4391 (s390_emit_lt_goto): New function.
4392 (s390_emit_le_goto): New function.
4393 (s390_emit_gt_goto): New function.
4394 (s390_emit_ge_goto): New function.
4395 (s390x_emit_prologue): New function.
4396 (s390x_emit_epilogue): New function.
4397 (s390x_emit_add): New function.
4398 (s390x_emit_sub): New function.
4399 (s390x_emit_mul): New function.
4400 (s390x_emit_lsh): New function.
4401 (s390x_emit_rsh_signed): New function.
4402 (s390x_emit_rsh_unsigned): New function.
4403 (s390x_emit_ext): New function.
4404 (s390x_emit_log_not): New function.
4405 (s390x_emit_bit_and): New function.
4406 (s390x_emit_bit_or): New function.
4407 (s390x_emit_bit_xor): New function.
4408 (s390x_emit_bit_not): New function.
4409 (s390x_emit_equal): New function.
4410 (s390x_emit_less_signed): New function.
4411 (s390x_emit_less_unsigned): New function.
4412 (s390x_emit_ref): New function.
4413 (s390x_emit_if_goto): New function.
4414 (s390x_emit_const): New function.
4415 (s390x_emit_call): New function.
4416 (s390x_emit_reg): New function.
4417 (s390x_emit_pop): New function.
4418 (s390x_emit_stack_flush): New function.
4419 (s390x_emit_zero_ext): New function.
4420 (s390x_emit_swap): New function.
4421 (s390x_emit_stack_adjust): New function.
4422 (s390x_emit_int_call_1): New function.
4423 (s390x_emit_void_call_2): New function.
4424 (s390x_emit_eq_goto): New function.
4425 (s390x_emit_ne_goto): New function.
4426 (s390x_emit_lt_goto): New function.
4427 (s390x_emit_le_goto): New function.
4428 (s390x_emit_gt_goto): New function.
4429 (s390x_emit_ge_goto): New function.
4430 (s390_emit_ops): New function.
4431 (struct linux_target_ops): Fill in emit_ops hook.
4432
4433 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4434
4435 PR 18377
4436 * Makefile.in: Add s390 IPA files.
4437 * configure.srv: Build IPA for s390.
4438 * linux-s390-ipa.c: New file.
4439 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4440 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4441 (tdesc_s390_linux32): Likewise.
4442 (init_registers_s390_linux32v1): Likewise.
4443 (tdesc_s390_linux32v1): Likewise.
4444 (init_registers_s390_linux32v2): Likewise.
4445 (tdesc_s390_linux32v2): Likewise.
4446 (init_registers_s390_linux64): Likewise.
4447 (tdesc_s390_linux64): Likewise.
4448 (init_registers_s390_linux64v1): Likewise.
4449 (tdesc_s390_linux64v1): Likewise.
4450 (init_registers_s390_linux64v2): Likewise.
4451 (tdesc_s390_linux64v2): Likewise.
4452 (init_registers_s390_te_linux64): Likewise.
4453 (tdesc_s390_te_linux64): Likewise.
4454 (init_registers_s390_vx_linux64): Likewise.
4455 (tdesc_s390_vx_linux64): Likewise.
4456 (init_registers_s390_tevx_linux64): Likewise.
4457 (tdesc_s390_tevx_linux64): Likewise.
4458 (init_registers_s390x_linux64): Likewise.
4459 (tdesc_s390x_linux64): Likewise.
4460 (init_registers_s390x_linux64v1): Likewise.
4461 (tdesc_s390x_linux64v1): Likewise.
4462 (init_registers_s390x_linux64v2): Likewise.
4463 (tdesc_s390x_linux64v2): Likewise.
4464 (init_registers_s390x_te_linux64): Likewise.
4465 (tdesc_s390x_te_linux64): Likewise.
4466 (init_registers_s390x_vx_linux64): Likewise.
4467 (tdesc_s390x_vx_linux64): Likewise.
4468 (init_registers_s390x_tevx_linux64): Likewise.
4469 (tdesc_s390x_tevx_linux64): Likewise.
4470 (have_hwcap_s390_vx): New static variable.
4471 (s390_arch_setup): Fill have_hwcap_s390_vx.
4472 (s390_get_thread_area): New function.
4473 (s390_ft_entry_gpr_esa): New const.
4474 (s390_ft_entry_gpr_zarch): New const.
4475 (s390_ft_entry_misc): New const.
4476 (s390_ft_entry_fr): New const.
4477 (s390_ft_entry_vr): New const.
4478 (s390_ft_main_31): New const.
4479 (s390_ft_main_64): New const.
4480 (s390_ft_exit_fr): New const.
4481 (s390_ft_exit_vr): New const.
4482 (s390_ft_exit_misc): New const.
4483 (s390_ft_exit_gpr_esa): New const.
4484 (s390_ft_exit_gpr_zarch): New const.
4485 (append_insns): New function.
4486 (s390_relocate_instruction): New function.
4487 (s390_install_fast_tracepoint_jump_pad): New function.
4488 (s390_get_min_fast_tracepoint_insn_len): New function.
4489 (s390_get_ipa_tdesc_idx): New function.
4490 (struct linux_target_ops): Wire in the above functions.
4491 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4492 * linux-s390-tdesc.h: New file.
4493
4494 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4495
4496 * linux-s390-low.c (s390_supports_tracepoints): New function.
4497 (struct linux_target_ops): Fill supports_tracepoints hook.
4498
4499 2016-03-18 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-low.c (lwp_signal_can_be_delivered): New function.
4502 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4503
4504 2016-03-18 Yao Qi <yao.qi@linaro.org>
4505
4506 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4507 0 if signal is enqueued. Remove 'signal' from one debugging
4508 message. Move one debugging message to some lines below.
4509 Remove code setting 'signal' to 0.
4510
4511 2016-03-18 Yao Qi <yao.qi@linaro.org>
4512
4513 * linux-low.c (linux_low_filter_event): Remove redundant
4514 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4515
4516 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4517
4518 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4519 (struct linux_target_ops): Wire in the above.
4520
4521 2016-03-03 Yao Qi <yao.qi@linaro.org>
4522
4523 * linux-low.c: Update comments to start_step_over.
4524
4525 2016-03-03 Yao Qi <yao.qi@linaro.org>
4526
4527 PR server/19736
4528 * linux-low.c (handle_extended_wait): Set child suspended
4529 if event_lwp->bp_reinsert isn't zero.
4530
4531 2016-03-02 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4534 enqueue_pending_signal.
4535
4536 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4537
4538 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4539 is actually loaded.
4540
4541 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4542
4543 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4544 (s390_regmap_3264) [!__s390x__]: New global.
4545 (s390_collect_ptrace_register): Skip map entries containing -1.
4546 (s390_supply_ptrace_register): Ditto.
4547 (s390_fill_gprs_high): New function.
4548 (s390_store_gprs_high): New function.
4549 (s390_regsets): Add NT_S390_HIGH_GPRS.
4550 (s390_get_hwcap): Enable on 31-bit.
4551 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4552 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4553 Detect NT_S390_HIGH_GPRS.
4554 (s390_usrregs_info_3264): Enable on 31-bit.
4555 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4556 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4557
4558 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4559
4560 PR gdb/13808
4561 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4562 * configure.srv: Ditto.
4563 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4564 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4565 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4566 (init_registers_amd64_linux): Remove prototype.
4567 (tdesc_amd64_linux): Remove declaration.
4568 (get_ipa_tdesc): New function.
4569 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4570 initialize remaining tdescs.
4571 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4572 (init_registers_i386_linux): Remove prototype.
4573 (tdesc_i386_linux): Remove declaration.
4574 (get_ipa_tdesc): New function.
4575 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4576 initialize remaining tdescs.
4577 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4578 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4579 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4580 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4581 (x86_get_ipa_tdesc_idx): New function.
4582 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4583 * linux-x86-tdesc.h: New file.
4584 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4585 (target_get_ipa_tdesc_idx): New macro.
4586 * tracepoint.c (ipa_tdesc_idx): New macro.
4587 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4588 (symbol_list): Add ipa_tdesc_idx.
4589 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4590 (ipa_tdesc): Remove.
4591 (ipa_tdesc_idx): New variable.
4592 (get_context_regcache): Use get_ipa_tdesc.
4593 (gdb_collect): Ditto.
4594 (gdb_probe): Ditto.
4595 * tracepoint.h (get_ipa_tdesc): New prototype.
4596 (ipa_tdesc): Remove.
4597
4598 2016-02-24 Pedro Alves <palves@redhat.com>
4599
4600 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4601 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4602 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4603 Factor out common code between the USE_SIGTRAP_SIGINFO and
4604 !USE_SIGTRAP_SIGINFO blocks.
4605 (linux_low_filter_event): Call save_stop_reason instead of
4606 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4607 Update comments.
4608 (linux_wait_1): Update comments.
4609
4610 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4611
4612 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4613 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4614 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4615 ppc_insert_point, ppc_remove_point.
4616
4617 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4618
4619 * linux-s390-low.c (s390_supports_z_point_type): New function.
4620 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4621
4622 2016-02-16 Yao Qi <yao.qi@linaro.org>
4623
4624 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4625 PC. Get pc from regcache_read_pc.
4626
4627 2016-02-12 Yao Qi <yao.qi@linaro.org>
4628
4629 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4630 or linux_get_pc_32bit.
4631 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4632
4633 2016-02-12 Yao Qi <yao.qi@linaro.org>
4634
4635 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4636 arm_linux_get_next_pcs_fixup.
4637
4638 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4639
4640 * tracepoint.c (x_tracepoint_action_download): Change
4641 write_inferior_data_ptr to write_inferior_data_pointer.
4642 (cmd_qtstart): Likewise.
4643 (write_inferior_data_ptr): Remove.
4644 (download_agent_expr): Change write_inferior_data_ptr to
4645 write_inferior_data_pointer.
4646 (download_tracepoint_1): Likewise.
4647 (download_tracepoint): Likewise.
4648 (download_trace_state_variables): Likewise.
4649
4650 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4651 Marcin Kościelnicki <koriakin@0x04.net>
4652
4653 * tracepoint.c (struct tracepoint_action_ops): Remove.
4654 (struct tracepoint_action): Remove ops.
4655 (m_tracepoint_action_download, r_tracepoint_action_download)
4656 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4657 size and offset accordingly.
4658 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4659 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4660 (tracepoint_action_send, tracepoint_action_download): New functions.
4661 Helpers for trace action handlers.
4662 (add_tracepoint_action): Remove setup actions ops.
4663 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4664
4665 2016-02-10 Yao Qi <yao.qi@linaro.org>
4666
4667 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4668
4669 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4670
4671 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4672 to AC_OUTPUT.
4673 * configure: Regenerate.
4674
4675 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4676
4677 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4678 void * to gdb_byte *.
4679 * linux-low.c (siginfo_fixup): Likewise.
4680 (linux_xfer_siginfo): Likewise.
4681 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4682 Likewise.
4683 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4684
4685 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4686
4687 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4688 to srv_tgtobj.
4689 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4690 to srv_tgtobj.
4691 * linux-x86-low.c [__x86_64__]: Include
4692 "nat/amd64-linux-siginfo.h".
4693 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4694 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4695 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4696 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4697 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4698 (cpt_si_fd, si_timerid, si_overrun): Move from
4699 nat/amd64-linux-siginfo.c.
4700 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4701
4702 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4703
4704 * server.c (skip_to_semicolon): Remove.
4705 (process_point_options): Use strchrnul instead of
4706 skip_to_semicolon.
4707
4708 2016-01-26 Yao Qi <yao.qi@linaro.org>
4709
4710 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4711 * linux-low.c (install_software_single_step_breakpoints): Don't
4712 call regcache_read_pc.
4713 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4714 argument pc.
4715
4716 2016-01-26 Yao Qi <yao.qi@linaro.org>
4717
4718 * linux-low.c (install_software_single_step_breakpoints): Call
4719 regcache_read_pc instead of get_pc.
4720
4721 2016-01-26 Yao Qi <yao.qi@linaro.org>
4722
4723 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4724 (unblock_async_io): Rename to ...
4725 (block_unblock_async_io): ... it. New function.
4726 (enable_async_io): Don't install SIGIO handler. Unblock it
4727 instead.
4728 (disable_async_io): Don't ignore SIGIO. Block it instead.
4729 (initialize_async_io): Install SIGIO handler. Don't call
4730 unblock_async_io.
4731
4732 2016-01-26 Yao Qi <yao.qi@linaro.org>
4733
4734 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4735 first character is '\003', call *the_target->request_interrupt.
4736
4737 2016-01-25 Yao Qi <yao.qi@linaro.org>
4738
4739 * remote-utils.c (new_thread_notify): Remove.
4740 (dead_thread_notify): Likewise.
4741 * remote-utils.h (new_thread_notify): Remove declaration.
4742 (dead_thread_notify): Likewise.
4743
4744 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4745
4746 * gdb.trace/pending.exp: Fix expected message on continue.
4747
4748 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4749
4750 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4751 it works properly on big-endian machines where sizeof (CORE_ADDR)
4752 != sizeof (void *).
4753
4754 2016-01-21 Pedro Alves <palves@redhat.com>
4755
4756 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4757 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4758 * configure: Regenerate.
4759
4760 2016-01-21 Yao Qi <yao.qi@linaro.org>
4761
4762 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4763 is_thumb and set it according to CPSR saved on the stack.
4764 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4765 arm_sigreturn_next_pc.
4766
4767 2016-01-18 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-low.c (linux_set_pc_64bit): New function.
4770 (linux_get_pc_64bit): New function.
4771 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4772 Declare.
4773 * linux-sparc-low.c (debug_threads): Remove declaration.
4774 (sparc_get_pc): Remove.
4775 (the_low_target): Use linux_get_pc_64bit instead of
4776 sparc_get_pc.
4777 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4778 (the_low_target): Use linux_get_pc_64bit and
4779 linux_set_pc_64bit.
4780
4781 2016-01-18 Yao Qi <yao.qi@linaro.org>
4782
4783 * linux-arm-low.c (debug_threads): Remove declaration.
4784 (arm_get_pc, arm_set_pc): Remove.
4785 (the_low_target): Use linux_get_pc_32bit and
4786 linux_set_pc_32bit.
4787 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4788 (the_low_target): Use linux_get_pc_32bit and
4789 linux_set_pc_32bit.
4790 * linux-cris-low.c (debug_threads): Remove declaration.
4791 (cris_get_pc, cris_set_pc,): Remove.
4792 (the_low_target): Use linux_get_pc_32bit and
4793 linux_set_pc_32bit.
4794 * linux-crisv32-low.c (debug_threads): Remove declaration.
4795 (cris_get_pc, cris_set_pc): Remove.
4796 (the_low_target): Use linux_get_pc_32bit and
4797 linux_set_pc_32bit.
4798 * linux-low.c: Include inttypes.h.
4799 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4800 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4801 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4802 (the_low_target): Use linux_get_pc_32bit and
4803 linux_set_pc_32bit.
4804 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4805 (the_low_target): Use linux_get_pc_32bit and
4806 linux_set_pc_32bit.
4807 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4808 (the_low_target): Use linux_get_pc_32bit and
4809 linux_set_pc_32bit.
4810 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4811 (the_low_target): Use linux_get_pc_32bit and
4812 linux_set_pc_32bit.
4813 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4814 (the_low_target): Use linux_get_pc_32bit and
4815 linux_set_pc_32bit.
4816
4817 2016-01-18 Gary Benson <gbenson@redhat.com>
4818
4819 * configure.ac (AC_FUNC_FORK): New check.
4820 * config.in: Regenerate.
4821 * configure: Likewise.
4822
4823 2016-01-14 Yao Qi <yao.qi@linaro.org>
4824
4825 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4826 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4827 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4828 arm_get_next_pcs_ctor.
4829
4830 2016-01-12 Josh Stone <jistone@redhat.com>
4831 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4832
4833 * inferiors.h: Include "gdb_vecs.h".
4834 (struct process_info): Add syscalls_to_catch.
4835 * inferiors.c (remove_process): Free syscalls_to_catch.
4836 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4837 syscall_return stops.
4838 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4839 * server.c (handle_general_set): Handle QCatchSyscalls.
4840 (handle_query): Report support for QCatchSyscalls.
4841 * target.h (struct target_ops): Add supports_catch_syscall.
4842 (target_supports_catch_syscall): New macro.
4843 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4844 (struct lwp_info): Add syscall_state.
4845 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4846 Maintain syscall_state and syscalls_to_catch across exec.
4847 (get_syscall_trapinfo): New function, proxy to the_low_target.
4848 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4849 (linux_low_filter_event): Toggle syscall_state entry/return for
4850 syscall traps, and set it ignored for all others.
4851 (gdb_catching_syscalls_p): New function.
4852 (gdb_catch_this_syscall_p): New function.
4853 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4854 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4855 (linux_supports_catch_syscall): New function.
4856 (linux_target_ops): Install it.
4857 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4858 (the_low_target): Install it.
4859
4860 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4861
4862 * acinclude.m4: Include new ../warning.m4 file.
4863 * configure: Regenerated.
4864 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4865
4866 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4867
4868 * ax.c (is_goto_target): Mark static.
4869 * linux-low.c (register_addr): Likewise.
4870 (linux_fetch_registers, linux_store_registers): Likewise.
4871 * mem-break.c (any_persistent_commands): Fix old prototype.
4872 (add_commands_to_breakpoint): Mark static.
4873 * regcache.c (find_register_by_name): Delete unused func.
4874 * remote-utils.c (hex_or_minus_one): Mark static.
4875 * server.c (monitor_show_help): Mark static.
4876 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4877 handle_v_requests): Likewise.
4878
4879 2016-01-12 Pedro Alves <palves@redhat.com>
4880
4881 Remove use of the registered trademark symbol throughout.
4882
4883 2016-01-08 Yao Qi <yao.qi@linaro.org>
4884
4885 * remote-utils.c (getpkt): If c is '\003', call target hook
4886 request_interrupt.
4887
4888 2016-01-06 Yao Qi <yao.qi@linaro.org>
4889
4890 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4891 linux-aarch32-low.c.
4892 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4893 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4894 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4895 (thumb2_breakpoint): Declare.
4896 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4897 linux-aarch32-low.h.
4898 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4899 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4900 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4901
4902 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4903
4904 * gdbreplay.c (gdbreplay_version): Change copyright year in
4905 version message.
4906 * server.c (gdbserver_version): Likewise.
4907
4908 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4909
4910 * server.c (crc32_table): Delete.
4911 (crc32): Use libiberty's xcrc32 function.
4912
4913 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4914
4915 * lynx-low.c (lynx_delete_thread_callback): New function.
4916 (lynx_mourn): Properly delete our process and all of its
4917 threads. Remove call to clear_inferiors.
4918
4919 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4920
4921 * target.c (thread_search_callback): Add check that
4922 the thread_stopped target callback is not NULL before
4923 calling it.
4924
4925 2015-12-21 Yao Qi <yao.qi@linaro.org>
4926
4927 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4928 arm breakpoint.
4929
4930 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4931
4932 * server.c (handle_query): Call target_supports_software_single_step.
4933
4934 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4935
4936 * linux-low.c (single_step): New function.
4937 (linux_resume_one_lwp_throw): Call single_step.
4938 (start_step_over): Likewise.
4939
4940 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4941
4942 * Makefile.in (SFILES): Append arch/arm-linux.c,
4943 arch/arm-get-next-pcs.c.
4944 (arm-linux.o): New rule.
4945 (arm-get-next-pcs.o): New rule.
4946 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4947 arm-linux.o.
4948 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4949 to linux-aarch32-low.c.
4950 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4951 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4952 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4953 (thumb2_breakpoint_len): Likewise.
4954 (arm_is_thumb_mode): Make non-static.
4955 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4956 from linux-aarch32-low.c.
4957 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4958 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4959 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4960 (thumb2_breakpoint_len): Likewise.
4961 (arm_is_thumb_mode): New declaration.
4962 * linux-arm-low.c: Include arch/arm-linux.h
4963 aarch/arm-get-next-pcs.h, sys/syscall.h.
4964 (get_next_pcs_ops): New struct.
4965 (get_next_pcs_addr_bits_remove): New function.
4966 (get_next_pcs_is_thumb): New function.
4967 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4968 (arm_sigreturn_next_pc): Likewise.
4969 (get_next_pcs_syscall_next_pc): Likewise.
4970 (arm_gdbserver_get_next_pcs): Likewise.
4971 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4972 Initialize.
4973 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4974 * server.h: Include gdb_vecs.h.
4975
4976 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4977
4978 * Makefile.in (SFILES): Append common/common-regcache.c.
4979 (OBS): Append common-regcache.o.
4980 (common-regcache.o): New rule.
4981 * regcache.c (init_register_cache): Initialize cache to
4982 REG_UNAVAILABLE.
4983 (regcache_raw_read_unsigned): New function.
4984 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4985 register_status enum.
4986
4987 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4988
4989 * linux-aarch64-low.c (the_low_targets): Rename
4990 breakpoint_reinsert_addr to get_next_pcs.
4991 * linux-arm-low.c (the_low_targets): Likewise.
4992 * linux-bfin-low.c (the_low_targets): Likewise.
4993 * linux-cris-low.c (the_low_targets): Likewise.
4994 * linux-crisv32-low.c (the_low_targets): Likewise.
4995 * linux-low.c (can_software_single_step): Likewise.
4996 (install_software_single_step_breakpoints): New function.
4997 (start_step_over): Use install_software_single_step_breakpoints.
4998 * linux-low.h: New CORE_ADDR vector.
4999 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5000 get_next_pcs.
5001 * linux-mips-low.c (the_low_targets): Likewise.
5002 * linux-nios2-low.c (the_low_targets): Likewise.
5003 * linux-sparc-low.c (the_low_targets): Likewise.
5004
5005 2015-12-17 Pedro Alves <palves@redhat.com>
5006
5007 * linux-low.c (linux_kill_one_lwp): Remove references to
5008 LinuxThreads.
5009 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5010 to 'kill'.
5011 (linux_init_signals): Delete.
5012 (initialize_low): Adjust.
5013 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5014
5015 2015-12-16 Pedro Alves <palves@redhat.com>
5016
5017 * configure.ac (compiler warning flags): When testing a
5018 -Wno-foo option, check whether -Wfoo works instead.
5019 * configure: Regenerate.
5020
5021 2015-12-11 Don Breazeal <donb@codesourcery.com>
5022
5023 * server.c (process_serial_event): Don't exit from gdbserver
5024 in remote mode if there are still active inferiors.
5025
5026 2015-12-11 Yao Qi <yao.qi@linaro.org>
5027
5028 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5029 arm_breakpoint_at if the process is 32-bit.
5030
5031 2015-12-11 Yao Qi <yao.qi@linaro.org>
5032
5033 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5034 arm breakpoint.
5035
5036 2015-12-07 Yao Qi <yao.qi@linaro.org>
5037
5038 * configure.srv: Append arm.o to srv_tgtobj for
5039 aarch64*-*-linux* target.
5040 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5041 from linux-arm-low.c.
5042 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5043 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5044 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5045 (thumb2_breakpoint_len): Likewise.
5046 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5047 (arm_breakpoint_kinds): Likewise.
5048 (arm_breakpoint_kind_from_pc): Likewise.
5049 (arm_sw_breakpoint_from_kind): Likewise.
5050 (arm_breakpoint_kind_from_current_state): Likewise.
5051 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5052 (arm_sw_breakpoint_from_kind): Declare.
5053 (arm_breakpoint_kind_from_current_state): Declare.
5054 (arm_breakpoint_at): Declare.
5055 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5056 arm_sw_breakpoint_from_kind if process is 32-bit.
5057 (aarch64_breakpoint_kind_from_pc): New function.
5058 (aarch64_breakpoint_kind_from_current_state): New function.
5059 (the_low_target): Initialize fields breakpoint_kind_from_pc
5060 and breakpoint_kind_from_current_state.
5061 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5062 linux-aarch32-low.c.
5063 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5064 (arm_breakpoint, arm_breakpoint_len): Likewise.
5065 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5066 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5067 (arm_is_thumb_mode): Likewise.
5068 (arm_breakpoint_at): Likewise.
5069 (arm_breakpoint_kind_from_pc): Likewise.
5070 (arm_sw_breakpoint_from_kind): Likewise.
5071 (arm_breakpoint_kind_from_current_state): Likewise.
5072
5073 Revert:
5074 2015-08-04 Yao Qi <yao.qi@linaro.org>
5075
5076 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5077 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5078 * server.c (extended_protocol): Remove "static".
5079 * server.h (extended_protocol): Declare it.
5080
5081 2015-12-04 Josh Stone <jistone@redhat.com>
5082
5083 * target.h (struct target_ops) <arch_setup>: Rename to ...
5084 (struct target_ops) <post_create_inferior>: ... this.
5085 (target_arch_setup): Rename to ...
5086 (target_post_create_inferior): ... this, calling post_create_inferior.
5087 * server.c (start_inferior): Update target_arch_setup calls to
5088 target_post_create_inferior.
5089 * linux-low.c (linux_low_ptrace_options): Forward declare.
5090 (linux_arch_setup): Update its comment for general use.
5091 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5092 (struct linux_target_ops): Use linux_post_create_inferior.
5093 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5094 to post_create_inferior.
5095 * nto-low.c (struct nto_target_ops): Likewise.
5096 * spu-low.c (struct spu_target_ops): Likewise.
5097 * win32-low.c (struct win32_target_ops): Likewise.
5098
5099 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5100
5101 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5102
5103 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5104
5105 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5106 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5107 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5108 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5109 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5110 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5111 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5112 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5113 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5114 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5115 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5116 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5117
5118 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5119
5120 * linux-low.c (linux_look_up_symbols): Don't call
5121 linux_supports_traceclone.
5122 * linux-low.h (thread_db_init): Remove use_events argument.
5123 * thread-db.c (thread_db_use_event): Remove global variable.
5124 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5125 (struct thread_db) <td_create_bp>: Remove field.
5126 (thread_db_create_event): Remove function.
5127 (thread_db_enable_reporting): Likewise.
5128 (find_one_thread): Don't check for thread_db_use_events.
5129 (attach_thread): Likewise.
5130 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5131 (try_thread_db_load_1): Don't check for thread_db_use_events.
5132 (thread_db_init): Remove use_events argument and thread events
5133 handling.
5134 (remove_thread_event_breakpoints): Remove function.
5135 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5136
5137 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5138
5139 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5140 New function.
5141 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5142 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5144 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5145 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5146 Initialize.
5147 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5148 New function.
5149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5150 * linux-low.c (can_hardware_single_step): Use
5151 supports_hardware_single_step.
5152 (can_software_single_step): New function.
5153 (start_step_over): Call can_software_single_step.
5154 (linux_supports_hardware_single_step): New function.
5155 (struct target_ops) <supports_software_single_step>: Initialize.
5156 * linux-low.h (struct linux_target_ops)
5157 <supports_hardware_single_step>: Initialize.
5158 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5160 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5161 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5162 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5163 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5164 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5165 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5166 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5167 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5168 Initialize.
5169 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5170 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5171 Initialize.
5172 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5174 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5175 New function.
5176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5177 * target.h (struct target_ops): <supports_software_single_step>:
5178 New field.
5179 (target_supports_software_single_step): New macro.
5180
5181 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5182
5183 * linux-low.c (linux_wait_1): Fix pc advance condition.
5184 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5185 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5186
5187 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5188
5189 * linux-arm-low.c (arm_is_thumb_mode): New function.
5190 (arm_breakpoint_at): Use arm_is_thumb_mode.
5191 (arm_breakpoint_kind_from_current_state): New function.
5192 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5193 Initialize.
5194 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5195 (linux_breakpoint_kind_from_current_state): New function.
5196 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5197 * linux-low.h (struct linux_target_ops)
5198 <breakpoint_kind_from_current_state>: New field.
5199 * target.h (struct target_ops): Likewise.
5200 (target_breakpoint_kind_from_current_state): New macro.
5201
5202 2015-11-30 Pedro Alves <palves@redhat.com>
5203
5204 * linux-low.c (linux_resume): Wake up the event loop before
5205 returning.
5206
5207 2015-11-30 Pedro Alves <palves@redhat.com>
5208
5209 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5210 check.
5211 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5212 to -1.
5213 * target.c (struct thread_search): New structure.
5214 (thread_search_callback): New function.
5215 (prev_general_thread): New global.
5216 (prepare_to_access_memory, done_accessing_memory): New functions.
5217 * target.h (prepare_to_access_memory, done_accessing_memory):
5218 Replace macros with function declarations.
5219
5220 2015-11-30 Pedro Alves <palves@redhat.com>
5221
5222 PR 14618
5223 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5224 report TARGET_WAITKIND_NO_RESUMED.
5225 * remote-utils.c (prepare_resume_reply): Handle
5226 TARGET_WAITKIND_NO_RESUMED.
5227 * server.c (report_no_resumed): New global.
5228 (handle_query) <qSupported>: Handle "no-resumed+". Report
5229 "no-resumed+" support.
5230 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5231 return error if the client doesn't support no-resumed events.
5232 (push_stop_notification): New function.
5233 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5234 events if the client supports them.
5235
5236 2015-11-30 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.c (thread_still_has_status_pending_p): Don't check
5239 vCont;t here.
5240 (lwp_resumed): New function.
5241 (status_pending_p_callback): Return early if the LWP is not
5242 supposed to be resumed.
5243
5244 2015-11-30 Pedro Alves <palves@redhat.com>
5245
5246 * linux-low.c (handle_extended_wait): Assert that the LWP's
5247 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5248 thread create events, leave the new child's status pending.
5249 (linux_low_filter_event): If GDB wants to hear about thread exit
5250 events, leave the LWP marked dead and don't delete it.
5251 (linux_wait_for_event_filtered): Don't check for thread exit.
5252 (filter_exit_event): New function.
5253 (linux_wait_1): Use it, when returning an exit event.
5254 (linux_resume_one_lwp_throw): Assert that the LWP's
5255 waitstatus is TARGET_WAITKIND_IGNORE.
5256 * remote-utils.c (prepare_resume_reply): Handle
5257 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5258 * server.c (report_thread_events): New global.
5259 (handle_general_set): Handle QThreadEvents.
5260 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5261 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5262 TARGET_WAITKIND_THREAD_EXITED.
5263 * server.h (report_thread_events): Declare.
5264
5265 2015-11-30 Pedro Alves <palves@redhat.com>
5266
5267 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5268 the thread's last_resume_kind was resume_stop.
5269
5270 2015-11-30 Pedro Alves <palves@redhat.com>
5271
5272 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5273 before returning.
5274
5275 2015-11-30 Pedro Alves <palves@redhat.com>
5276
5277 * server.c (handle_v_requests): Handle vCtrlC.
5278
5279 2015-11-30 Pedro Alves <palves@redhat.com>
5280
5281 * gdbthread.h (find_any_thread_of_pid): Declare.
5282 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5283 functions.
5284 * server.c (handle_query): If current_thread is NULL, look for
5285 another thread of the selected process.
5286
5287 2015-11-26 Daniel Colascione <dancol@dancol.org>
5288 Simon Marchi <simon.marchi@ericsson.com>
5289
5290 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5291 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5292 name in reply.
5293 * target.h (struct target_ops) <thread_name>: New field.
5294 (target_thread_name): New macro.
5295
5296 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5297
5298 * regcache.h (regcache_invalidate_pid): Add declaration.
5299 * regcache.c (regcache_invalidate_pid): New function, extracted
5300 from regcache_invalidate.
5301 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5302 Add trivial documentation comment.
5303 * lynx-low.c: Use regcache_invalidate_pid instead of
5304 regcache_invalidate.
5305
5306 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5307
5308 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5309 and Elf64_auxv_t if the target is Android.
5310
5311 2015-11-22 Doug Evans <xdje42@gmail.com>
5312
5313 * target.h: #include <sys/types.h>.
5314
5315 2015-11-19 Pedro Alves <palves@redhat.com>
5316
5317 * linux-low.c (linux_process_qsupported): Change prototype.
5318 Adjust.
5319 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5320 Change prototype.
5321 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5322 and adjust to loop over all features.
5323 * server.c (handle_query) <qSupported>: Adjust to call
5324 target_process_qsupported once, passing it a vector of unprocessed
5325 features.
5326 * target.h (struct target_ops) <process_qsupported>: Change
5327 prototype.
5328 (target_process_qsupported): Adjust.
5329
5330 2015-11-19 Pedro Alves <palves@redhat.com>
5331
5332 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5333 mode.
5334 * configure: Regenerate.
5335
5336 2015-11-19 Pedro Alves <palves@redhat.com>
5337
5338 * configure: Regenerate.
5339
5340 2015-11-19 Yao Qi <yao.qi@linaro.org>
5341
5342 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5343 type to uint32_t.
5344
5345 2015-11-19 Yao Qi <yao.qi@linaro.org>
5346
5347 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5348 (struct aarch64_operand): Move enum out.
5349
5350 2015-11-19 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5353 struct user_fpsimd_state *.
5354 (aarch64_store_fpregset): Likewise.
5355
5356 2015-11-19 Yao Qi <yao.qi@linaro.org>
5357
5358 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5359 struct user_pt_regs *.
5360 (aarch64_store_gregset): Likewise.
5361
5362 2015-11-18 Pedro Alves <palves@redhat.com>
5363
5364 * Makefile.in (all_object_files): Add $IPA_OBJS.
5365
5366 2015-11-17 Pedro Alves <palves@redhat.com>
5367
5368 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5369 GDB_SIGNAL_0 and gdb_signal_to_string.
5370
5371 2015-11-17 Pedro Alves <palves@redhat.com>
5372
5373 * win32-low.c (handle_output_debug_string): Remove parameter.
5374 (win32_kill): Remove our_status local and adjust call to
5375 handle_output_debug_string.
5376 (get_child_debug_event): Adjust call to
5377 handle_output_debug_string.
5378
5379 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5380
5381 * linux-mips-low.c (mips_fill_gregset): Add cast.
5382 (mips_store_gregset): Likewise.
5383 (mips_fill_fpregset): Likewise.
5384 (mips_store_fpregset): Likewise.
5385
5386 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5387
5388 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5389 priv.
5390
5391 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5392
5393 * linux-mips-low.c (mips_linux_new_thread): Change type of
5394 watch_type to enum target_hw_bp_type.
5395
5396 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5397
5398 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5399 Change return type to arm_hwbp_type.
5400
5401 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5402
5403 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5404 (arm_store_gregset): Likewise.
5405 * linux-arm-low.c (arm_get_hwcap): Likewise.
5406 (arm_read_description): Likewise.
5407
5408 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5409
5410 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5411
5412 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5413
5414 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5415 (ppc_fill_vsxregset): Likewise.
5416 (ppc_store_vsxregset): Likewise.
5417 (ppc_fill_vrregset): Likewise.
5418 (ppc_store_vrregset): Likewise.
5419 (ppc_fill_evrregset): Likewise.
5420 (ppc_store_evrregset): Likewise.
5421
5422 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5423
5424 * linux-ppc-low.c (ppc_usrregs_info): Remove
5425 forward-declaration.
5426 (ppc_arch_setup): Move lower in file.
5427
5428 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5429
5430 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5431 (ps_pdwrite): Likewise.
5432
5433 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5434
5435 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5436 to after assert checks.
5437
5438 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5439
5440 * proc-service.c (ps_pdread): Add/adjust casts.
5441 (ps_pdwrite): Add/adjust casts.
5442
5443 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5444
5445 * server.c (handle_search_memory_1): Cast return value of
5446 memmem.
5447
5448 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5449
5450 * server.c (write_qxfer_response): Change type of data to
5451 gdb_byte *.
5452
5453 2015-10-29 Pedro Alves <palves@redhat.com>
5454
5455 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5456
5457 2015-10-29 Pedro Alves <palves@redhat.com>
5458
5459 * tracepoint.c (clear_installed_tracepoints): Add casts.
5460
5461 2015-10-29 Pedro Alves <palves@redhat.com>
5462
5463 * server.c (handle_v_cont, process_serial_event): Add enum
5464 gdb_signal casts to signal parsing code.
5465
5466 2015-10-29 Pedro Alves <palves@redhat.com>
5467
5468 * linux-low.h (NULL_REGSET): Define.
5469 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5470 * linux-arm-low.c (arm_regsets): Likewise.
5471 * linux-crisv32-low.c (cris_regsets): Likewise.
5472 * linux-m68k-low.c (m68k_regsets): Likewise.
5473 * linux-mips-low.c (mips_regsets): Likewise.
5474 * linux-nios2-low.c (nios2_regsets): Likewise.
5475 * linux-ppc-low.c (ppc_regsets): Likewise.
5476 * linux-s390-low.c (s390_regsets): Likewise.
5477 * linux-sh-low.c (sh_regsets): Likewise.
5478 * linux-sparc-low.c (sparc_regsets): Likewise.
5479 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5480 * linux-tile-low.c (tile_regsets): Likewise.
5481 * linux-x86-low.c (x86_regsets): Likewise.
5482 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5483
5484 2015-10-29 Pedro Alves <palves@redhat.com>
5485
5486 * linux-low.h (NULL_REGSET): Define.
5487 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5488 * linux-arm-low.c (arm_regsets): Likewise.
5489 * linux-crisv32-low.c (cris_regsets): Likewise.
5490 * linux-m68k-low.c (m68k_regsets): Likewise.
5491 * linux-mips-low.c (mips_regsets): Likewise.
5492 * linux-nios2-low.c (nios2_regsets): Likewise.
5493 * linux-ppc-low.c (ppc_regsets): Likewise.
5494 * linux-s390-low.c (s390_regsets): Likewise.
5495 * linux-sh-low.c (sh_regsets): Likewise.
5496 * linux-sparc-low.c (sparc_regsets): Likewise.
5497 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5498 * linux-tile-low.c (tile_regsets): Likewise.
5499 * linux-x86-low.c (x86_regsets): Likewise.
5500 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5501
5502 2015-10-26 Doug Evans <dje@google.com>
5503
5504 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5505
5506 2015-10-26 Doug Evans <dje@google.com>
5507
5508 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5509
5510 2015-10-26 Doug Evans <dje@google.com>
5511
5512 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5513 for debug_printf.
5514 (attach_thread, find_new_threads_callback): Ditto.
5515
5516 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5517
5518 * mem-break.h (set_breakpoint_data): Remove.
5519
5520 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5521
5522 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5523 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5524 (initialize_low): Remove set_breakpoint_data call.
5525 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5526 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5527 (initialize_low): Remove set_breakpoint_data call.
5528 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5529 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5530 (initialize_low): Remove set_breakpoint_data call.
5531
5532 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5533
5534 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5535 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5536 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5537 * target.h (target_breakpoint_kind_from_pc): New macro.
5538
5539 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5540
5541 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5542 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5543 the default breakpoint kind.
5544
5545 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5546
5547 * linux-arm-low.c (arm_supports_z_point_type): Add software
5548 breakpoint support.
5549
5550 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5551
5552 * linux-arm-low.c: Refactor breakpoint definitions.
5553 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5554 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5555
5556 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5557
5558 * Makefile.in: Add arm.c/o.
5559 * configure.srv: Likewise.
5560 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5561 (arm_breakpoint_kind_from_pc): New function.
5562 (arm_sw_breakpoint_from_kind): Return proper kind.
5563 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5564
5565 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5566
5567 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5568 removal.
5569 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5570 (struct raw_breakpoint) <size>: Remove.
5571 (struct raw_breakpoint) <kind>: Add.
5572 (bp_size): New function.
5573 (bp_opcode): Likewise.
5574 (find_raw_breakpoint_at): Adjust for kind.
5575 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5576 (remove_memory_breakpoint): Adjust for kind call bp_size.
5577 (set_raw_breakpoint_at): Adjust for kind.
5578 (set_breakpoint): Likewise.
5579 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5580 (delete_raw_breakpoint): Adjust for kind.
5581 (delete_breakpoint): Likewise.
5582 (find_gdb_breakpoint): Likewise.
5583 (set_gdb_breakpoint_1): Likewise.
5584 (set_gdb_breakpoint): Likewise.
5585 (delete_gdb_breakpoint_1): Likewise.
5586 (delete_gdb_breakpoint): Likewise.
5587 (uninsert_raw_breakpoint): Likewise.
5588 (reinsert_raw_breakpoint): Likewise.
5589 (set_breakpoint_data): Remove.
5590 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5591 (check_mem_read): Adjust for kind call bp_size.
5592 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5593 (clone_one_breakpoint): Adjust for kind.
5594 * mem-break.h (set_gdb_breakpoint): Likewise.
5595 (delete_gdb_breakpoint): Likewise.
5596 * server.c (process_serial_event): Likewise.
5597
5598 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5599
5600 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5601 (struct linux_target_ops) <breakpoint>: Remove.
5602 (struct linux_target_ops) <breakpoint_len>: Remove.
5603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5605 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5606 (arm_sw_breakpoint_from_kind): New function.
5607 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5608 (struct linux_target_ops) <breakpoint>: Remove.
5609 (struct linux_target_ops) <breakpoint_len>: Remove.
5610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5612 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5613 (struct linux_target_ops) <breakpoint>: Remove.
5614 (struct linux_target_ops) <breakpoint_len>: Remove.
5615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5617 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5618 (struct linux_target_ops) <breakpoint>: Remove.
5619 (struct linux_target_ops) <breakpoint_len>: Remove.
5620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5622 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5623 and sw_breakpoint_from_kind to increment the pc.
5624 (linux_breakpoint_kind_from_pc): New function.
5625 (linux_sw_breakpoint_from_kind): New function.
5626 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5627 (initialize_low): Call breakpoint_kind_from_pc and
5628 sw_breakpoint_from_kind to replace breakpoint_data/len.
5629 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5630 New field.
5631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5632 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5633 (struct linux_target_ops) <breakpoint>: Remove.
5634 (struct linux_target_ops) <breakpoint_len>: Remove.
5635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5637 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5638 (struct linux_target_ops) <breakpoint>: Remove.
5639 (struct linux_target_ops) <breakpoint_len>: Remove.
5640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5641 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5642 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5643 (struct linux_target_ops) <breakpoint>: Remove.
5644 (struct linux_target_ops) <breakpoint_len>: Remove.
5645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5647 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5648 (struct linux_target_ops) <breakpoint>: Remove.
5649 (struct linux_target_ops) <breakpoint_len>: Remove.
5650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5652 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5663 (struct linux_target_ops) <breakpoint>: Remove.
5664 (struct linux_target_ops) <breakpoint_len>: Remove.
5665 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5666 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5667 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5668 (struct linux_target_ops) <breakpoint>: Remove.
5669 (struct linux_target_ops) <breakpoint_len>: Remove.
5670 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5671 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5672 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5673 (struct linux_target_ops) <breakpoint>: Remove.
5674 (struct linux_target_ops) <breakpoint_len>: Remove.
5675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5677 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5678 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5679 (struct linux_target_ops) <breakpoint>: Remove.
5680 (struct linux_target_ops) <breakpoint_len>: Remove.
5681 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5682 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5683 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5684 (struct linux_target_ops) <breakpoint>: Remove.
5685 (struct linux_target_ops) <breakpoint_len>: Remove.
5686 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5687 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5688
5689 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5690
5691 * linux-cris-low.c (cris_get_pc): Remove void arg.
5692
5693 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5694
5695 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5696 variable name.
5697
5698 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5699
5700 * inferiors.c (thread_pid_matches_callback): New function.
5701 (find_thread_process): New function.
5702 (remove_thread): Reset current_thread.
5703 (remove_process): Assert threads have been removed first.
5704
5705 2015-10-15 Yao Qi <yao.qi@linaro.org>
5706
5707 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5708 if it is 3.
5709 (aarch64_remove_point): Likewise.
5710 * regcache.c (regcache_register_size): New function.
5711
5712 2015-10-12 Yao Qi <yao.qi@linaro.org>
5713
5714 * linux-aarch64-low.c: Update all callers as emit_load_store
5715 is renamed to aarch64_emit_load_store.
5716
5717 2015-10-12 Yao Qi <yao.qi@linaro.org>
5718
5719 * linux-aarch64-low.c: Update all callers of function renaming
5720 from emit_insn to aarch64_emit_insn.
5721
5722 2015-10-12 Yao Qi <yao.qi@linaro.org>
5723
5724 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5725 arch/aarch64-insn.h.
5726 (struct aarch64_memory_operand): Likewise.
5727 (ENCODE): Likewise.
5728 (emit_insn): Move to arch/aarch64-insn.c.
5729 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5730 (emit_load_store): Move to arch/aarch64-insn.c.
5731 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5732 (can_encode_int32): Remove.
5733
5734 2015-10-12 Yao Qi <yao.qi@linaro.org>
5735
5736 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5737 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5738 (aarch64_relocate_instruction): Likewise.
5739 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5740 (struct aarch64_insn_visitor): Likewise.
5741
5742 2015-10-12 Yao Qi <yao.qi@linaro.org>
5743
5744 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5745 (struct aarch64_insn_visitor): New.
5746 (struct aarch64_insn_relocation_data): New.
5747 (aarch64_ftrace_insn_reloc_b): New function.
5748 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5749 (aarch64_ftrace_insn_reloc_cb): Likewise.
5750 (aarch64_ftrace_insn_reloc_tb): Likewise.
5751 (aarch64_ftrace_insn_reloc_adr): Likewise.
5752 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5753 (aarch64_ftrace_insn_reloc_others): Likewise.
5754 (visitor): New.
5755 (aarch64_relocate_instruction): Use visitor.
5756
5757 2015-10-12 Yao Qi <yao.qi@linaro.org>
5758
5759 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5760 int. Add argument buf.
5761 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5762 aarch64_relocate_instruction.
5763
5764 2015-10-12 Yao Qi <yao.qi@linaro.org>
5765
5766 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5767 argument insn. Remove local variable insn. Don't call
5768 target_read_uint32.
5769 (aarch64_install_fast_tracepoint_jump_pad): Call
5770 target_read_uint32.
5771
5772 2015-09-30 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5775 (emit_load_store_pair): Likewise.
5776
5777 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5778
5779 * dll.c (match_dll): Add cast(s).
5780 (unloaded_dll): Likewise.
5781 * linux-low.c (second_thread_of_pid_p): Likewise.
5782 (delete_lwp_callback): Likewise.
5783 (count_events_callback): Likewise.
5784 (select_event_lwp_callback): Likewise.
5785 (linux_set_resume_request): Likewise.
5786 * server.c (accumulate_file_name_length): Likewise.
5787 (emit_dll_description): Likewise.
5788 (handle_qxfer_threads_worker): Likewise.
5789 (visit_actioned_threads): Likewise.
5790 * thread-db.c (any_thread_of): Likewise.
5791 * tracepoint.c (same_process_p): Likewise.
5792 (match_blocktype): Likewise.
5793 (build_traceframe_info_xml): Likewise.
5794
5795 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5796
5797 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5798 assignment.
5799 (gdb_unparse_agent_expr): Likewise.
5800 * hostio.c (require_data): Likewise.
5801 (handle_pread): Likewise.
5802 * linux-low.c (disable_regset): Likewise.
5803 (fetch_register): Likewise.
5804 (store_register): Likewise.
5805 (get_dynamic): Likewise.
5806 (linux_qxfer_libraries_svr4): Likewise.
5807 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5808 (set_fast_tracepoint_jump): Likewise.
5809 (uninsert_fast_tracepoint_jumps_at): Likewise.
5810 (reinsert_fast_tracepoint_jumps_at): Likewise.
5811 (validate_inserted_breakpoint): Likewise.
5812 (clone_agent_expr): Likewise.
5813 * regcache.c (init_register_cache): Likewise.
5814 * remote-utils.c (putpkt_binary_1): Likewise.
5815 (decode_M_packet): Likewise.
5816 (decode_X_packet): Likewise.
5817 (look_up_one_symbol): Likewise.
5818 (relocate_instruction): Likewise.
5819 (monitor_output): Likewise.
5820 * server.c (handle_search_memory): Likewise.
5821 (handle_qxfer_exec_file): Likewise.
5822 (handle_qxfer_libraries): Likewise.
5823 (handle_qxfer): Likewise.
5824 (handle_query): Likewise.
5825 (handle_v_cont): Likewise.
5826 (handle_v_run): Likewise.
5827 (captured_main): Likewise.
5828 * target.c (write_inferior_memory): Likewise.
5829 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5830 * tracepoint.c (init_trace_buffer): Likewise.
5831 (add_tracepoint_action): Likewise.
5832 (add_traceframe): Likewise.
5833 (add_traceframe_block): Likewise.
5834 (cmd_qtdpsrc): Likewise.
5835 (cmd_qtdv): Likewise.
5836 (cmd_qtstatus): Likewise.
5837 (response_source): Likewise.
5838 (response_tsv): Likewise.
5839 (cmd_qtnotes): Likewise.
5840 (gdb_collect): Likewise.
5841 (initialize_tracepoint): Likewise.
5842
5843 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5844
5845 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5846 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5847 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5848 <NOP>: New.
5849 (enum aarch64_condition_codes): New enum.
5850 (w0): New static global.
5851 (fp): Likewise.
5852 (lr): Likewise.
5853 (struct aarch64_memory_operand) <type>: New
5854 MEMORY_OPERAND_POSTINDEX type.
5855 (postindex_memory_operand): New helper function.
5856 (emit_ret): New function.
5857 (emit_load_store_pair): New function, factored out of emit_stp
5858 with support for MEMORY_OPERAND_POSTINDEX.
5859 (emit_stp): Rewrite using emit_load_store_pair.
5860 (emit_ldp): New function.
5861 (emit_load_store): Likewise.
5862 (emit_ldr): Mention post-index instruction in comment.
5863 (emit_ldrh): New function.
5864 (emit_ldrb): New function.
5865 (emit_ldrsw): Mention post-index instruction in comment.
5866 (emit_str): Likewise.
5867 (emit_subs): New function.
5868 (emit_cmp): Likewise.
5869 (emit_and): Likewise.
5870 (emit_orr): Likewise.
5871 (emit_orn): Likewise.
5872 (emit_eor): Likewise.
5873 (emit_mvn): Likewise.
5874 (emit_lslv): Likewise.
5875 (emit_lsrv): Likewise.
5876 (emit_asrv): Likewise.
5877 (emit_mul): Likewise.
5878 (emit_sbfm): Likewise.
5879 (emit_sbfx): Likewise.
5880 (emit_ubfm): Likewise.
5881 (emit_ubfx): Likewise.
5882 (emit_csinc): Likewise.
5883 (emit_cset): Likewise.
5884 (emit_nop): Likewise.
5885 (emit_ops_insns): New helper function.
5886 (emit_pop): Likewise.
5887 (emit_push): Likewise.
5888 (aarch64_emit_prologue): New function.
5889 (aarch64_emit_epilogue): Likewise.
5890 (aarch64_emit_add): Likewise.
5891 (aarch64_emit_sub): Likewise.
5892 (aarch64_emit_mul): Likewise.
5893 (aarch64_emit_lsh): Likewise.
5894 (aarch64_emit_rsh_signed): Likewise.
5895 (aarch64_emit_rsh_unsigned): Likewise.
5896 (aarch64_emit_ext): Likewise.
5897 (aarch64_emit_log_not): Likewise.
5898 (aarch64_emit_bit_and): Likewise.
5899 (aarch64_emit_bit_or): Likewise.
5900 (aarch64_emit_bit_xor): Likewise.
5901 (aarch64_emit_bit_not): Likewise.
5902 (aarch64_emit_equal): Likewise.
5903 (aarch64_emit_less_signed): Likewise.
5904 (aarch64_emit_less_unsigned): Likewise.
5905 (aarch64_emit_ref): Likewise.
5906 (aarch64_emit_if_goto): Likewise.
5907 (aarch64_emit_goto): Likewise.
5908 (aarch64_write_goto_address): Likewise.
5909 (aarch64_emit_const): Likewise.
5910 (aarch64_emit_call): Likewise.
5911 (aarch64_emit_reg): Likewise.
5912 (aarch64_emit_pop): Likewise.
5913 (aarch64_emit_stack_flush): Likewise.
5914 (aarch64_emit_zero_ext): Likewise.
5915 (aarch64_emit_swap): Likewise.
5916 (aarch64_emit_stack_adjust): Likewise.
5917 (aarch64_emit_int_call_1): Likewise.
5918 (aarch64_emit_void_call_2): Likewise.
5919 (aarch64_emit_eq_goto): Likewise.
5920 (aarch64_emit_ne_goto): Likewise.
5921 (aarch64_emit_lt_goto): Likewise.
5922 (aarch64_emit_le_goto): Likewise.
5923 (aarch64_emit_gt_goto): Likewise.
5924 (aarch64_emit_ge_got): Likewise.
5925 (aarch64_emit_ops_impl): New static global variable.
5926 (aarch64_emit_ops): New target function, return
5927 &aarch64_emit_ops_impl.
5928 (struct linux_target_ops): Install it.
5929
5930 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5931
5932 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5933 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5934 aarch64-ipa.o.
5935 * linux-aarch64-ipa.c: New file.
5936 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5937 and endian.h.
5938 (aarch64_get_thread_area): New target method.
5939 (extract_signed_bitfield): New helper function.
5940 (aarch64_decode_ldr_literal): New function.
5941 (enum aarch64_opcodes): New enum.
5942 (struct aarch64_register): New struct.
5943 (struct aarch64_operand): New struct.
5944 (x0): New static global.
5945 (x1): Likewise.
5946 (x2): Likewise.
5947 (x3): Likewise.
5948 (x4): Likewise.
5949 (w2): Likewise.
5950 (ip0): Likewise.
5951 (sp): Likewise.
5952 (xzr): Likewise.
5953 (aarch64_register): New helper function.
5954 (register_operand): Likewise.
5955 (immediate_operand): Likewise.
5956 (struct aarch64_memory_operand): New struct.
5957 (offset_memory_operand): New helper function.
5958 (preindex_memory_operand): Likewise.
5959 (enum aarch64_system_control_registers): New enum.
5960 (ENCODE): New macro.
5961 (emit_insn): New helper function.
5962 (emit_b): New function.
5963 (emit_bcond): Likewise.
5964 (emit_cb): Likewise.
5965 (emit_tb): Likewise.
5966 (emit_blr): Likewise.
5967 (emit_stp): Likewise.
5968 (emit_ldp_q_offset): Likewise.
5969 (emit_stp_q_offset): Likewise.
5970 (emit_load_store): Likewise.
5971 (emit_ldr): Likewise.
5972 (emit_ldrsw): Likewise.
5973 (emit_str): Likewise.
5974 (emit_ldaxr): Likewise.
5975 (emit_stxr): Likewise.
5976 (emit_stlr): Likewise.
5977 (emit_data_processing_reg): Likewise.
5978 (emit_data_processing): Likewise.
5979 (emit_add): Likewise.
5980 (emit_sub): Likewise.
5981 (emit_mov): Likewise.
5982 (emit_movk): Likewise.
5983 (emit_mov_addr): Likewise.
5984 (emit_mrs): Likewise.
5985 (emit_msr): Likewise.
5986 (emit_sevl): Likewise.
5987 (emit_wfe): Likewise.
5988 (append_insns): Likewise.
5989 (can_encode_int32_in): New helper function.
5990 (aarch64_relocate_instruction): New function.
5991 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5992 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5993 (struct linux_target_ops): Install aarch64_get_thread_area,
5994 aarch64_install_fast_tracepoint_jump_pad and
5995 aarch64_get_min_fast_tracepoint_insn_len.
5996
5997 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5998
5999 * Makefile.in (aarch64-insn.o): New rule.
6000 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6001
6002 2015-09-21 Yao Qi <yao.qi@linaro.org>
6003
6004 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6005
6006 2015-09-21 Yao Qi <yao.qi@linaro.org>
6007
6008 * tracepoint.c (max_jump_pad_size): Remove.
6009
6010 2015-09-18 Yao Qi <yao.qi@linaro.org>
6011
6012 * linux-aarch64-low.c: Don't include sys/uio.h.
6013 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6014
6015 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6016
6017 * tracepoint.c (eval_result_type): Change prototype.
6018 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6019
6020 2015-09-15 Pedro Alves <palves@redhat.com>
6021
6022 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6023 Check whether to report exec events instead of checking whether
6024 multiprocess is enabled.
6025
6026 2015-09-15 Pedro Alves <palves@redhat.com>
6027
6028 PR remote/18965
6029 * remote-utils.c (prepare_resume_reply): Merge
6030 TARGET_WAITKIND_VFORK_DONE switch case with the
6031 TARGET_WAITKIND_FORKED case.
6032
6033 2015-09-15 Yao Qi <yao.qi@linaro.org>
6034
6035 * server.c (handle_query): Check string comparison using
6036 "else if" instead of "if".
6037
6038 2015-09-15 Yao Qi <yao.qi@linaro.org>
6039
6040 * server.c (vCont_supported): New global variable.
6041 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6042 matches. Append ";vContSupported+" to own_buf.
6043 (handle_v_requests): Append ";s;S" to own_buf if target supports
6044 hardware single step or vCont_supported is false.
6045 (capture_main): Set vCont_supported to zero.
6046
6047 2015-09-15 Yao Qi <yao.qi@linaro.org>
6048
6049 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6050 it to ...
6051 (linux_supports_hardware_single_step): ... New function.
6052 (linux_target_ops): Update.
6053 * lynx-low.c (lynx_target_ops): Set field
6054 supports_hardware_single_step to target_can_do_hardware_single_step.
6055 * nto-low.c (nto_target_ops): Likewise.
6056 * spu-low.c (spu_target_ops): Likewise.
6057 * win32-low.c (win32_target_ops): Likewise.
6058 * target.c (target_can_do_hardware_single_step): New function.
6059 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6060 Remove. <supports_hardware_single_step>: New field.
6061 (target_supports_conditional_breakpoints): Remove.
6062 (target_supports_hardware_single_step): New macro.
6063 (target_can_do_hardware_single_step): Declare.
6064 * server.c (handle_query): Use target_supports_hardware_single_step
6065 instead of target_supports_conditional_breakpoints.
6066
6067 2015-09-15 Yao Qi <yao.qi@linaro.org>
6068
6069 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6070 function.
6071 (struct linux_target_ops the_low_target): Install
6072 aarch64_linux_siginfo_fixup.
6073
6074 2015-09-11 Don Breazeal <donb@codesourcery.com>
6075 Luis Machado <lgustavo@codesourcery.com>
6076
6077 * linux-low.c (linux_mourn): Static declaration.
6078 (linux_arch_setup): Move in front of
6079 handle_extended_wait.
6080 (linux_arch_setup_thread): New function.
6081 (handle_extended_wait): Handle exec events. Call
6082 linux_arch_setup_thread. Make event_lwp argument a
6083 pointer-to-a-pointer.
6084 (check_zombie_leaders): Do not check stopped threads.
6085 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6086 (linux_low_filter_event): Add lwp and thread for exec'ing
6087 non-leader thread if leader thread has been deleted.
6088 Refactor code into linux_arch_setup_thread and call it.
6089 Pass child lwp pointer by reference to handle_extended_wait.
6090 (linux_wait_for_event_filtered): Update comment.
6091 (linux_wait_1): Prevent clobbering exec event status.
6092 (linux_supports_exec_events): New function.
6093 (linux_target_ops) <supports_exec_events>: Initialize new member.
6094 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6095 new member.
6096 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6097 * server.c (report_exec_events): New global variable.
6098 (handle_query): Handle qSupported query for exec-events feature.
6099 (captured_main): Initialize report_exec_events.
6100 * server.h (report_exec_events): Declare new global variable.
6101 * target.h (struct target_ops) <supports_exec_events>: New
6102 member.
6103 (target_supports_exec_events): New macro.
6104 * win32-low.c (win32_target_ops) <supports_exec_events>:
6105 Initialize new member.
6106
6107 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6108
6109 * linux-low.c (linux_low_enable_btrace): Remove.
6110 (linux_target_ops): Replace linux_low_enable_btrace with
6111 linux_enable_btrace.
6112
6113 2015-09-03 Yao Qi <yao.qi@linaro.org>
6114
6115 * linux-aarch64-low.c (aarch64_insert_point): Call
6116 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6117 returns true.
6118
6119 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6120
6121 * linux-low.c (check_stopped_by_breakpoint): Use
6122 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6123
6124 2015-08-27 Pedro Alves <palves@redhat.com>
6125
6126 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6127
6128 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6129
6130 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6131 the XNEW-family equivalent.
6132 (compile_bytecodes): Likewise.
6133 * dll.c (loaded_dll): Likewise.
6134 * event-loop.c (append_callback_event): Likewise.
6135 (create_file_handler): Likewise.
6136 (create_file_event): Likewise.
6137 * hostio.c (handle_open): Likewise.
6138 * inferiors.c (add_thread): Likewise.
6139 (add_process): Likewise.
6140 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6141 * linux-arm-low.c (arm_new_process): Likewise.
6142 (arm_new_thread): Likewise.
6143 * linux-low.c (add_to_pid_list): Likewise.
6144 (linux_add_process): Likewise.
6145 (handle_extended_wait): Likewise.
6146 (add_lwp): Likewise.
6147 (enqueue_one_deferred_signal): Likewise.
6148 (enqueue_pending_signal): Likewise.
6149 (linux_resume_one_lwp_throw): Likewise.
6150 (linux_resume_one_thread): Likewise.
6151 (linux_read_memory): Likewise.
6152 (linux_write_memory): Likewise.
6153 * linux-mips-low.c (mips_linux_new_process): Likewise.
6154 (mips_linux_new_thread): Likewise.
6155 (mips_add_watchpoint): Likewise.
6156 * linux-x86-low.c (initialize_low_arch): Likewise.
6157 * lynx-low.c (lynx_add_process): Likewise.
6158 * mem-break.c (set_raw_breakpoint_at): Likewise.
6159 (set_breakpoint): Likewise.
6160 (add_condition_to_breakpoint): Likewise.
6161 (add_commands_to_breakpoint): Likewise.
6162 (clone_agent_expr): Likewise.
6163 (clone_one_breakpoint): Likewise.
6164 * regcache.c (new_register_cache): Likewise.
6165 * remote-utils.c (look_up_one_symbol): Likewise.
6166 * server.c (queue_stop_reply): Likewise.
6167 (start_inferior): Likewise.
6168 (queue_stop_reply_callback): Likewise.
6169 (handle_target_event): Likewise.
6170 * spu-low.c (fetch_ppc_memory): Likewise.
6171 (store_ppc_memory): Likewise.
6172 * target.c (set_target_ops): Likewise.
6173 * thread-db.c (thread_db_load_search): Likewise.
6174 (try_thread_db_load_1): Likewise.
6175 * tracepoint.c (add_tracepoint): Likewise.
6176 (add_tracepoint_action): Likewise.
6177 (create_trace_state_variable): Likewise.
6178 (cmd_qtdpsrc): Likewise.
6179 (cmd_qtro): Likewise.
6180 (add_while_stepping_state): Likewise.
6181 * win32-low.c (child_add_thread): Likewise.
6182 (get_image_name): Likewise.
6183
6184 2015-08-25 Yao Qi <yao.qi@linaro.org>
6185
6186 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6187
6188 2015-08-25 Yao Qi <yao.qi@linaro.org>
6189
6190 * Makefile.in (aarch64-linux.o): New rule.
6191 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6192 srv_tgtobj.
6193 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6194 (aarch64_init_debug_reg_state): Make it extern.
6195 (aarch64_linux_prepare_to_resume): Remove.
6196
6197 2015-08-25 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6200 lwp_arch_private_info and ptid_of_lwp.
6201
6202 2015-08-25 Yao Qi <yao.qi@linaro.org>
6203
6204 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6205 Find proc_info by find_process_pid. All callers updated.
6206
6207 2015-08-25 Yao Qi <yao.qi@linaro.org>
6208
6209 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6210 Remove.
6211 (debug_reg_change_callback): Remove.
6212 (aarch64_notify_debug_reg_change): Remove.
6213
6214 2015-08-25 Yao Qi <yao.qi@linaro.org>
6215
6216 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6217 Call current_lwp_ptid.
6218
6219 2015-08-25 Yao Qi <yao.qi@linaro.org>
6220
6221 * linux-aarch64-low.c (debug_reg_change_callback): Use
6222 debug_printf.
6223
6224 2015-08-25 Yao Qi <yao.qi@linaro.org>
6225
6226 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6227
6228 2015-08-25 Yao Qi <yao.qi@linaro.org>
6229
6230 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6231
6232 2015-08-25 Yao Qi <yao.qi@linaro.org>
6233
6234 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6235 the code.
6236
6237 2015-08-25 Yao Qi <yao.qi@linaro.org>
6238
6239 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6240 Remove.
6241 (debug_reg_change_callback): Remove argument entry and add argument
6242 lwp. Remove local variable thread. Don't print thread id in the
6243 debugging output. Don't check whether pid of thread equals to pid.
6244 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6245 iterate_over_lwps instead find_inferior.
6246
6247 2015-08-24 Pedro Alves <palves@redhat.com>
6248
6249 * inferiors.c (get_first_process): New function.
6250 * inferiors.h (get_first_process): New declaration.
6251 * remote-utils.c (read_ptid): Default to the first process in the
6252 list, instead of to the current thread's process.
6253
6254 2015-08-24 Pedro Alves <palves@redhat.com>
6255
6256 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6257 * event-loop.c: Likewise.
6258 * remote-utils.c: Likewise.
6259 * tracepoint.c: Likewise.
6260
6261 2015-08-24 Pedro Alves <palves@redhat.com>
6262
6263 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6264 ptid_get_lwp.
6265
6266 2015-08-21 Pedro Alves <palves@redhat.com>
6267
6268 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6269 instead of literal 1.
6270
6271 2015-08-21 Pedro Alves <palves@redhat.com>
6272
6273 * tdesc.c (default_description): Explicitly zero-initialize.
6274
6275 2015-08-21 Pedro Alves <palves@redhat.com>
6276
6277 PR gdb/18749
6278 * inferiors.c (remove_thread): Discard any pending stop reply for
6279 this thread.
6280 * server.c (remove_all_on_match_pid): Rename to ...
6281 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6282 instead of a pid.
6283 (discard_queued_stop_replies): Change parameter to a ptid. Now
6284 extern.
6285 (handle_v_kill, kill_inferior_callback, captured_main)
6286 (process_serial_event): Adjust.
6287 * server.h (discard_queued_stop_replies): Declare.
6288
6289 2015-08-21 Pedro Alves <palves@redhat.com>
6290
6291 * linux-low.c (wait_for_sigstop): Always switch to no thread
6292 selected if the previously current thread dies.
6293 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6294 process instead of the current thread's.
6295 * remote-utils.c (input_interrupt): Don't check if there's no
6296 current thread.
6297 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6298 current thread to the general thread fails, error out.
6299 (handle_qxfer_auxv, handle_qxfer_libraries)
6300 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6301 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6302 (handle_query): Check if there's a thread selected instead of
6303 checking whether there's any thread in the thread list.
6304 (handle_qxfer_threads, handle_qxfer_btrace)
6305 (handle_qxfer_btrace_conf): Don't error out early if there's no
6306 thread in the thread list.
6307 (handle_v_cont, myresume): Don't set the current thread to the
6308 continue thread.
6309 (process_serial_event) <Hg handling>: Also set thread_id if the
6310 previous general thread is still alive.
6311 (process_serial_event) <g/G handling>: If setting the current
6312 thread to the general thread fails, error out.
6313 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6314 thread's lwp instead of the current thread's.
6315 * target.c (set_desired_thread): If the desired thread was not
6316 found, leave the current thread pointing to NULL. Return an int
6317 (boolean) indicating success.
6318 * target.h (set_desired_thread): Change return type to int.
6319
6320 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6321
6322 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6323 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6324 #includes.
6325 (ps_get_thread_area): New function.
6326
6327 2015-08-19 Gary Benson <gbenson@redhat.com>
6328
6329 * hostio.c (handle_pread): Do not attempt to read more data
6330 than hostio_reply_with_data can fit in a packet.
6331
6332 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6333
6334 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6335
6336 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6337
6338 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6339
6340 2015-08-06 Pedro Alves <palves@redhat.com>
6341
6342 * tracepoint.c (expr_eval_result): Now an int.
6343
6344 2015-08-06 Pedro Alves <palves@redhat.com>
6345
6346 * gdbthread.h (struct regcache): Forward declare.
6347 (struct thread_info) <regcache_data>: Now a struct regcache
6348 pointer.
6349 * inferiors.c (inferior_regcache_data)
6350 (set_inferior_regcache_data): Now work with struct regcache
6351 pointers.
6352 * inferiors.h (struct regcache): Forward declare.
6353 (inferior_regcache_data, set_inferior_regcache_data): Now work
6354 with struct regcache pointers.
6355 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6356 (free_register_cache_thread): Remove struct regcache pointer
6357 casts.
6358
6359 2015-08-06 Pedro Alves <palves@redhat.com>
6360
6361 * server.c (captured_main): On error, print the exception message
6362 to stderr, and if run_once is set, throw a quit.
6363
6364 2015-08-06 Pedro Alves <palves@redhat.com>
6365
6366 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6367 the current thread.
6368
6369 2015-08-06 Pedro Alves <palves@redhat.com>
6370
6371 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6372 reading beyond the passed in buffer length.
6373
6374 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6375
6376 * tracepoint.c (symbol_list) <required>: Remove.
6377
6378 2015-08-06 Pedro Alves <palves@redhat.com>
6379
6380 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6381 count if stopping and suspending threads.
6382 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6383 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6384 (linux_detach): Complete an ongoing step-over.
6385 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6386 throughout.
6387 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6388 (linux_wait_1): If passing a signal to the inferior after
6389 finishing a step-over, unsuspend and re-resume all lwps. If we
6390 see a single-step event but the thread should be continuing, don't
6391 pass the trap to gdb.
6392 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6393 internal_error instead of gdb_assert.
6394 (enqueue_pending_signal): New function.
6395 (check_ptrace_stopped_lwp_gone): Add debug output.
6396 (start_step_over): Use internal_error instead of gdb_assert.
6397 (complete_ongoing_step_over): New function.
6398 (linux_resume_one_thread): Don't resume a suspended thread.
6399 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6400 it stepping.
6401
6402 2015-08-06 Pedro Alves <palves@redhat.com>
6403
6404 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6405 (linux_thread_alive): Use lwp_is_marked_dead.
6406 (extended_event_reported): Delete.
6407 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6408 instead of extended_event_reported.
6409 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6410 as well.
6411 (lwp_is_marked_dead): New function.
6412 (lwp_running): Use lwp_is_marked_dead.
6413 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6414 comment.
6415
6416 2015-08-06 Pedro Alves <palves@redhat.com>
6417
6418 * linux-low.c (linux_wait_1): Move fork event output out of the
6419 !report_to_gdb check. Pass event_child->waitstatus to
6420 target_waitstatus_to_string instead of ourstatus.
6421
6422 2015-08-04 Yao Qi <yao.qi@linaro.org>
6423
6424 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6425 if current_thread is 32 bit.
6426
6427 2015-08-04 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6430 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6431 * server.c (extended_protocol): Remove "static".
6432 * server.h (extended_protocol): Declare it.
6433
6434 2015-08-04 Yao Qi <yao.qi@linaro.org>
6435
6436 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6437 both aarch64 and aarch32.
6438 (aarch64_set_pc): Likewise.
6439
6440 2015-08-04 Yao Qi <yao.qi@linaro.org>
6441
6442 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6443 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6444 arm-with-neon.xml to srv_xmlfiles.
6445 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6446 (is_64bit_tdesc): New function.
6447 (aarch64_linux_read_description): New function.
6448 (aarch64_arch_setup): Call aarch64_linux_read_description.
6449 (regs_info): Rename to regs_info_aarch64.
6450 (aarch64_regs_info): Return right regs_info.
6451 (initialize_low_arch): Call initialize_low_arch_aarch32.
6452
6453 2015-08-04 Yao Qi <yao.qi@linaro.org>
6454
6455 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6456 * linux-aarch32-low.c: New file.
6457 * linux-aarch32-low.h: New file.
6458 * linux-arm-low.c (arm_fill_gregset): Move it to
6459 linux-aarch32-low.c.
6460 (arm_store_gregset): Likewise.
6461 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6462 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6463 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6464 (regs_info): Rename to regs_info_arm.
6465 (arm_regs_info): Return regs_info_aarch32 if
6466 have_ptrace_getregset is 1 and target description is
6467 arm_with_neon or arm_with_vfpv3.
6468 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6469 Call initialize_low_arch_aarch32 instead.
6470
6471 2015-08-04 Yao Qi <yao.qi@linaro.org>
6472
6473 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6474 * linux-low.c: ... here.
6475 * linux-low.h (have_ptrace_getregset): Declare it.
6476
6477 2015-08-04 Pedro Alves <palves@redhat.com>
6478
6479 * thread-db.c (struct thread_db): Use new typedefs.
6480 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6481 CHK calls.
6482 (disable_thread_event_reporting): Cast result of dlsym to
6483 destination function pointer type.
6484 (thread_db_mourn): Use td_ta_delete_ftype.
6485
6486 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6487
6488 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6489 arch variant.
6490 (CDX_BREAKPOINT): Define for R2.
6491 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6492 (the_low_target): Add comments.
6493
6494 2015-07-30 Yao Qi <yao.qi@linaro.org>
6495
6496 * linux-arm-low.c (arm_hwcap): Remove it.
6497 (arm_read_description): New local variable arm_hwcap. Don't
6498 set arm_hwcap to zero.
6499
6500 2015-07-30 Yao Qi <yao.qi@linaro.org>
6501
6502 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6503 Use regcache->tdesc instead.
6504 (arm_store_wmmxregset): Likewise.
6505 (arm_fill_vfpregset): Likewise.
6506 (arm_store_vfpregset): Likewise.
6507
6508 2015-07-30 Yao Qi <yao.qi@linaro.org>
6509
6510 * linux-arm-low.c: Include arch/arm.h.
6511 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6512 (arm_store_gregset): Likewise.
6513
6514 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6515
6516 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6517 ptrace's 4th parameter.
6518
6519 2015-07-27 Yao Qi <yao.qi@linaro.org>
6520
6521 * configure.srv (case aarch64*-*-linux*): Don't set
6522 srv_linux_usrregs.
6523
6524 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6525
6526 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6527 sys/ptrace.h.
6528 * linux-arm-low.c: Likewise.
6529 * linux-cris-low.c: Likewise.
6530 * linux-crisv32-low.c: Likewise.
6531 * linux-low.c: Likewise.
6532 * linux-m68k-low.c: Likewise.
6533 * linux-mips-low.c: Likewise.
6534 * linux-nios2-low.c: Likewise.
6535 * linux-s390-low.c: Likewise.
6536 * linux-sparc-low.c: Likewise.
6537 * linux-tic6x-low.c: Likewise.
6538 * linux-tile-low.c: Likewise.
6539 * linux-x86-low.c: Likewise.
6540
6541 2015-07-24 Pedro Alves <palves@redhat.com>
6542
6543 * config.in: Regenerate.
6544 * configure: Regenerate.
6545
6546 2015-07-24 Pedro Alves <palves@redhat.com>
6547
6548 * acinclude.m4: Include ../ptrace.m4.
6549 * configure.ac: Call GDB_AC_PTRACE.
6550 * config.in, configure: Regenerate.
6551
6552 2015-07-24 Yao Qi <yao.qi@linaro.org>
6553
6554 * linux-low.c (linux_create_inferior): Remove setting to
6555 proc->priv->new_inferior.
6556 (linux_attach): Likewise.
6557 (linux_low_filter_event): Likewise.
6558 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6559
6560 2015-07-24 Yao Qi <yao.qi@linaro.org>
6561
6562 * linux-low.c (linux_arch_setup): New function.
6563 (linux_low_filter_event): If proc->tdesc is NULL and
6564 proc->attached is true, call the_low_target.arch_setup.
6565 Otherwise, keep status pending, and return.
6566 (linux_resume_one_lwp_throw): Don't call get_pc if
6567 thread->while_stepping isn't NULL. Don't call
6568 get_thread_regcache if proc->tdesc is NULL.
6569 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6570 (linux_target_ops): Install arch_setup.
6571 * server.c (start_inferior): Call the_target->arch_setup.
6572 * target.h (struct target_ops) <arch_setup>: New field.
6573 (target_arch_setup): New marco.
6574 * lynx-low.c (lynx_target_ops): Update.
6575 * nto-low.c (nto_target_ops): Update.
6576 * spu-low.c (spu_target_ops): Update.
6577 * win32-low.c (win32_target_ops): Update.
6578
6579 2015-07-24 Yao Qi <yao.qi@linaro.org>
6580
6581 * linux-low.c (linux_add_process): Don't set
6582 proc->priv->new_inferior.
6583 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6584 (linux_attach): Likewise.
6585
6586 2015-07-24 Yao Qi <yao.qi@linaro.org>
6587
6588 * server.c (start_inferior): Code refactor.
6589
6590 2015-07-24 Yao Qi <yao.qi@linaro.org>
6591
6592 * server.c (process_serial_event): Set general_thread.
6593
6594 2015-07-21 Yao Qi <yao.qi@linaro.org>
6595
6596 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6597 aarch64_linux_get_debug_reg_capacity.
6598
6599 2015-07-17 Yao Qi <yao.qi@linaro.org>
6600
6601 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6602 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6603 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6604 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6605 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6606 (AARCH64_HWP_ALIGNMENT): Likewise.
6607 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6608 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6609 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6610 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6611 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6612 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6613 (struct aarch64_debug_reg_state): Likewise.
6614 (struct arch_lwp_info): Likewise.
6615 (aarch64_align_watchpoint): Likewise.
6616 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6617 (aarch64_watchpoint_length): Likewise.
6618 (aarch64_point_encode_ctrl_reg): Likewise
6619 (aarch64_point_is_aligned): Likewise.
6620 (aarch64_align_watchpoint): Likewise.
6621 (aarch64_linux_set_debug_regs):
6622 (aarch64_dr_state_insert_one_point): Likewise.
6623 (aarch64_dr_state_remove_one_point): Likewise.
6624 (aarch64_handle_breakpoint): Likewise.
6625 (aarch64_handle_aligned_watchpoint): Likewise.
6626 (aarch64_handle_unaligned_watchpoint): Likewise.
6627 (aarch64_handle_watchpoint): Likewise.
6628
6629 2015-07-17 Yao Qi <yao.qi@linaro.org>
6630
6631 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6632 and don't aarch64_get_debug_reg_state. All callers update.
6633 (aarch64_handle_aligned_watchpoint): Likewise.
6634 (aarch64_handle_unaligned_watchpoint): Likewise.
6635 (aarch64_handle_watchpoint): Likewise.
6636 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6637 (aarch64_remove_point): Likewise.
6638
6639 2015-07-17 Yao Qi <yao.qi@linaro.org>
6640
6641 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6642 debug_printf.
6643 (aarch64_handle_unaligned_watchpoint): Likewise.
6644
6645 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6646
6647 Revert the previous 3 commits:
6648 Move gdb_regex* to common/
6649 Move linux_find_memory_regions_full & co.
6650 gdbserver build-id attribute generator
6651
6652 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6653 Jan Kratochvil <jan.kratochvil@redhat.com>
6654
6655 gdbserver build-id attribute generator.
6656 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6657 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6658 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6659 (find_phdr): New.
6660 (get_dynamic): Use find_pdhr to traverse program headers.
6661 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6662 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6663 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6664 (get_hex_build_id): New.
6665 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6666 to reply XML document.
6667
6668 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6669 Jan Kratochvil <jan.kratochvil@redhat.com>
6670
6671 * target.c: Include target/target-utils.h and fcntl.h.
6672 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6673 (target_fileio_read_stralloc): New functions.
6674
6675 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6676
6677 * Makefile.in (OBS): Add gdb_regex.o.
6678 (gdb_regex.o): New.
6679 * config.in: Rebuilt.
6680 * configure: Rebuilt.
6681
6682 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6683 Jan Kratochvil <jan.kratochvil@redhat.com>
6684
6685 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6686 * Makefile.in (OBS): Add target-utils.o.
6687 (linux-maps.o, target-utils.o): New.
6688 * configure.srv (srv_linux_obj): Add linux-maps.o.
6689
6690 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6691
6692 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6693 function, return 1.
6694 (the_low_target): Install it.
6695
6696 2015-07-14 Pedro Alves <palves@redhat.com>
6697
6698 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6699 Instead, ignore ECHILD, and throw an error for other errnos.
6700
6701 2015-07-10 Pedro Alves <palves@redhat.com>
6702
6703 * event-loop.c (struct callback_event) <data>: Change type to
6704 gdb_client_data instance instead of gdb_client_data pointer.
6705 (append_callback_event): Adjust.
6706
6707 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6708
6709 * linux-aarch64-low.c: Add comments for each linux_target_ops
6710 method. Remove comments already covered in target_ops and
6711 linux_target_ops definitions.
6712 (the_low_target): Add comments for each unimplemented method.
6713
6714 2015-07-09 Yao Qi <yao.qi@linaro.org>
6715
6716 * linux-aarch64-low.c (aarch64_regmap): Remove.
6717 (aarch64_usrregs_info): Remove.
6718 (regs_info): Set field usrregs to NULL.
6719
6720 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6721
6722 * linux-low.c: Include "rsp-low.h"
6723 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6724 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6725 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6726 (handle_btrace_enable_pt): New.
6727 (handle_btrace_general_set): Support "pt".
6728 (handle_btrace_conf_general_set): Support "pt:size".
6729
6730 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6731
6732 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6733 Z_PACKET_SW_BP.
6734
6735 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6736
6737 * linux-aarch64-low.c: Remove comment about endianness.
6738 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6739 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6740 memcmp.
6741
6742 2015-06-24 Gary Benson <gbenson@redhat.com>
6743
6744 * linux-i386-ipa.c (stdint.h): Do not include.
6745 * lynx-i386-low.c (stdint.h): Likewise.
6746 * lynx-ppc-low.c (stdint.h): Likewise.
6747 * mem-break.c (stdint.h): Likewise.
6748 * thread-db.c (stdint.h): Likewise.
6749 * tracepoint.c (stdint.h): Likewise.
6750 * win32-low.c (stdint.h): Likewise.
6751
6752 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6753
6754 * server.c (write_qxfer_response): Update call to
6755 remote_escape_output.
6756
6757 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6758 Jan Kratochvil <jan.kratochvil@redhat.com>
6759
6760 Merge multiple hex conversions.
6761 * gdbreplay.c (tohex): Rename to 'fromhex'.
6762 (logchar): Use fromhex.
6763
6764 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6765
6766 * server.c (handle_qxfer_libraries): Set `version' attribute for
6767 <library-list>.
6768
6769 2015-06-10 Gary Benson <gbenson@redhat.com>
6770
6771 * target.h (struct target_ops) <multifs_open>: New field.
6772 <multifs_unlink>: Likewise.
6773 <multifs_readlink>: Likewise.
6774 * linux-low.c (nat/linux-namespaces.h): New include.
6775 (linux_target_ops): Initialize the_target->multifs_open,
6776 the_target->multifs_unlink and the_target->multifs_readlink.
6777 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6778 * hostio.c (hostio_fs_pid): New static variable.
6779 (hostio_handle_new_gdb_connection): New function.
6780 (handle_setfs): Likewise.
6781 (handle_open): Use the_target->multifs_open as appropriate.
6782 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6783 (handle_readlink): Use the_target->multifs_readlink as
6784 appropriate.
6785 (handle_vFile): Handle vFile:setfs packets.
6786 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6787 after target_handle_new_gdb_connection.
6788
6789 2015-06-10 Gary Benson <gbenson@redhat.com>
6790
6791 * configure.ac (AC_CHECK_FUNCS): Add setns.
6792 * config.in: Regenerate.
6793 * configure: Likewise.
6794 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6795 (linux-namespaces.o): New rule.
6796 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6797
6798 2015-06-09 Gary Benson <gbenson@redhat.com>
6799
6800 * hostio.c (handle_open): Process mode argument with
6801 fileio_to_host_mode.
6802
6803 2015-06-01 Yao Qi <yao.qi@linaro.org>
6804
6805 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6806 * linux-x86-low.c: Likewise.
6807
6808 2015-05-28 Don Breazeal <donb@codesourcery.com>
6809
6810 * linux-low.c (handle_extended_wait): Initialize
6811 thread_info.last_resume_kind for new fork children.
6812
6813 2015-05-15 Pedro Alves <palves@redhat.com>
6814
6815 * target.h (target_handle_new_gdb_connection): Rewrite using if
6816 wrapped in do/while.
6817
6818 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6819
6820 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6821 * configure, config.in: Regenerate.
6822 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6823 Declare typedef.
6824
6825 2015-05-12 Don Breazeal <donb@codesourcery.com>
6826
6827 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6828 PTRACE_EVENT_VFORK_DONE.
6829 (linux_low_ptrace_options, extended_event_reported): Add vfork
6830 events.
6831 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6832 and "vforkdone" for RSP 'T' Stop Reply Packet.
6833 * server.h (report_vfork_events): Declare
6834 global variable.
6835
6836 2015-05-12 Don Breazeal <donb@codesourcery.com>
6837
6838 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6839 (the_low_target) <new_fork>: Initialize new member.
6840 * linux-arm-low.c (arm_new_fork): New function.
6841 (the_low_target) <new_fork>: Initialize new member.
6842 * linux-low.c (handle_extended_wait): Call new target function
6843 new_fork.
6844 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6845 * linux-mips-low.c (mips_add_watchpoint): New function
6846 extracted from mips_insert_point.
6847 (the_low_target) <new_fork>: Initialize new member.
6848 (mips_linux_new_fork): New function.
6849 (mips_insert_point): Call mips_add_watchpoint.
6850 * linux-x86-low.c (x86_linux_new_fork): New function.
6851 (the_low_target) <new_fork>: Initialize new member.
6852
6853 2015-05-12 Don Breazeal <donb@codesourcery.com>
6854
6855 * linux-low.c (handle_extended_wait): Implement return value,
6856 rename argument 'event_child' to 'event_lwp', handle
6857 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6858 (linux_low_ptrace_options): New function.
6859 (linux_low_filter_event): Call linux_low_ptrace_options,
6860 use different argument fo linux_enable_event_reporting,
6861 use return value from handle_extended_wait.
6862 (extended_event_reported): New function.
6863 (linux_wait_1): Call extended_event_reported and set
6864 status to report fork events.
6865 (linux_write_memory): Add pid to debug message.
6866 (reset_lwp_ptrace_options_callback): New function.
6867 (linux_handle_new_gdb_connection): New function.
6868 (linux_target_ops): Initialize new structure member.
6869 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6870 * lynx-low.c: Initialize new structure member.
6871 * remote-utils.c (prepare_resume_reply): Implement stop reason
6872 "fork" for "T" stop message.
6873 * server.c (handle_query): Call handle_new_gdb_connection.
6874 * server.h (report_fork_events): Declare global flag.
6875 * target.h (struct target_ops) <handle_new_gdb_connection>:
6876 New member.
6877 (target_handle_new_gdb_connection): New macro.
6878 * win32-low.c: Initialize new structure member.
6879
6880 2015-05-12 Don Breazeal <donb@codesourcery.com>
6881
6882 * mem-break.c (APPEND_TO_LIST): Define macro.
6883 (clone_agent_expr): New function.
6884 (clone_one_breakpoint): New function.
6885 (clone_all_breakpoints): New function.
6886 * mem-break.h: Declare new functions.
6887
6888 2015-05-12 Don Breazeal <donb@codesourcery.com>
6889
6890 * linux-low.c (linux_supports_fork_events): New function.
6891 (linux_supports_vfork_events): New function.
6892 (linux_target_ops): Initialize new structure members.
6893 (initialize_low): Call linux_check_ptrace_features.
6894 * lynx-low.c (lynx_target_ops): Initialize new structure
6895 members.
6896 * server.c (report_fork_events, report_vfork_events):
6897 New global flags.
6898 (handle_query): Add new features to qSupported packet and
6899 response.
6900 (captured_main): Initialize new global variables.
6901 * target.h (struct target_ops) <supports_fork_events>:
6902 New member.
6903 <supports_vfork_events>: New member.
6904 (target_supports_fork_events): New macro.
6905 (target_supports_vfork_events): New macro.
6906 * win32-low.c (win32_target_ops): Initialize new structure
6907 members.
6908
6909 2015-05-12 Gary Benson <gbenson@redhat.com>
6910
6911 * server.c (handle_qxfer_exec_file): Use current process
6912 if annex is empty.
6913
6914 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6915
6916 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6917 Remove HAVE_PTRACE_GETREGS conditionals.
6918 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6919 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6920
6921 2015-05-08 Yao Qi <yao.qi@linaro.org>
6922
6923 * linux-low.c (linux_supports_conditional_breakpoints): New
6924 function.
6925 (linux_target_ops): Install new target method.
6926 * lynx-low.c (lynx_target_ops): Install NULL hook for
6927 supports_conditional_breakpoints.
6928 * nto-low.c (nto_target_ops): Likewise.
6929 * spu-low.c (spu_target_ops): Likewise.
6930 * win32-low.c (win32_target_ops): Likewise.
6931 * server.c (handle_query): Check
6932 target_supports_conditional_breakpoints.
6933 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6934 New field.
6935 (target_supports_conditional_breakpoints): New macro.
6936
6937 2015-05-06 Pedro Alves <palves@redhat.com>
6938
6939 PR server/18081
6940 * server.c (start_inferior): If the process exits, mourn it.
6941
6942 2015-04-21 Gary Benson <gbenson@redhat.com>
6943
6944 * hostio.c (fileio_open_flags_to_host): Factored out to
6945 fileio_to_host_openflags in common/fileio.c. Single use
6946 updated.
6947
6948 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6949
6950 * linux-xtensa-low.c (xtensa_fill_gregset)
6951 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6952 XCHAL_HAVE_LOOP.
6953
6954 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6955
6956 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6957 (regs_info): Replace usrregs pointer with NULL.
6958
6959 2015-04-17 Gary Benson <gbenson@redhat.com>
6960
6961 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6962 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6963 * server.c (handle_qxfer_exec_file): New function.
6964 (qxfer_packets): Add exec-file entry.
6965 (handle_query): Report qXfer:exec-file:read as supported packet.
6966
6967 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6968
6969 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6970
6971 2015-04-09 Gary Benson <gbenson@redhat.com>
6972
6973 * hostio-errno.c (errno_to_fileio_error): Remove function.
6974 Update caller to use remote_fileio_to_fio_error.
6975
6976 2015-04-09 Yao Qi <yao.qi@linaro.org>
6977
6978 * linux-low.c (linux_insert_point): Call
6979 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6980 (linux_remove_point): Call remove_memory_breakpoint if type is
6981 raw_bkpt_type_sw.
6982 * linux-x86-low.c (x86_insert_point): Don't call
6983 insert_memory_breakpoint.
6984 (x86_remove_point): Don't call remove_memory_breakpoint.
6985
6986 2015-04-01 Pedro Alves <palves@redhat.com>
6987 Cleber Rosa <crosa@redhat.com>
6988
6989 * server.c (gdbserver_usage): Reorganize and extend the usage
6990 message.
6991
6992 2015-03-24 Pedro Alves <palves@redhat.com>
6993
6994 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6995 output. Also dump TRAP_TRACE.
6996 (linux_low_filter_event): In debug output, distinguish a
6997 resume_stop SIGSTOP from a delayed SIGSTOP.
6998
6999 2015-03-24 Gary Benson <gbenson@redhat.com>
7000
7001 * linux-x86-low.c (x86_linux_new_thread): Moved to
7002 nat/x86-linux.c.
7003 (x86_linux_prepare_to_resume): Likewise.
7004
7005 2015-03-24 Gary Benson <gbenson@redhat.com>
7006
7007 * Makefile.in (x86-linux-dregs.o): New rule.
7008 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7009 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7010 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7011 (x86_linux_dr_get): Likewise.
7012 (x86_linux_dr_set): Likewise.
7013 (update_debug_registers_callback): Likewise.
7014 (x86_linux_dr_set_addr): Likewise.
7015 (x86_linux_dr_get_addr): Likewise.
7016 (x86_linux_dr_set_control): Likewise.
7017 (x86_linux_dr_get_control): Likewise.
7018 (x86_linux_dr_get_status): Likewise.
7019 (x86_linux_update_debug_registers): Likewise.
7020
7021 2015-03-24 Gary Benson <gbenson@redhat.com>
7022
7023 * linux-x86-low.c (x86_linux_update_debug_registers):
7024 New function, factored out from...
7025 (x86_linux_prepare_to_resume): ...this.
7026
7027 2015-03-24 Gary Benson <gbenson@redhat.com>
7028
7029 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7030 (x86_linux_dr_set): Likewise.
7031 (update_debug_registers_callback): Likewise.
7032 (x86_linux_dr_set_addr): Likewise.
7033 (x86_linux_dr_get_addr): Likewise.
7034 (x86_linux_dr_set_control): Likewise.
7035 (x86_linux_dr_get_control): Likewise.
7036 (x86_linux_dr_get_status): Likewise.
7037 (x86_linux_prepare_to_resume): Likewise.
7038
7039 2015-03-24 Gary Benson <gbenson@redhat.com>
7040
7041 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7042 Use perror_with_name. Pass string through gettext.
7043 (x86_linux_dr_set): Likewise.
7044
7045 2015-03-24 Gary Benson <gbenson@redhat.com>
7046
7047 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7048 (x86_linux_dr_set_addr): ...this.
7049 (x86_dr_low_get_addr): Rename to...
7050 (x86_linux_dr_get_addr): ...this.
7051 (x86_dr_low_set_control): Rename to...
7052 (x86_linux_dr_set_control): ...this.
7053 (x86_dr_low_get_control): Rename to...
7054 (x86_linux_dr_get_control): ...this.
7055 (x86_dr_low_get_status): Rename to...
7056 (x86_linux_dr_get_status): ...this.
7057 (x86_dr_low): Update with new function names.
7058
7059 2015-03-24 Gary Benson <gbenson@redhat.com>
7060
7061 * Makefile.in (x86-linux.o): New rule.
7062 * configure.srv: Add x86-linux.o to relevant targets.
7063 * linux-low.c (lwp_set_arch_private_info): New function.
7064 (lwp_arch_private_info): Likewise.
7065 * linux-x86-low.c: Include nat/x86-linux.h.
7066 (arch_lwp_info): Removed structure.
7067 (update_debug_registers_callback):
7068 Use lwp_set_debug_registers_changed.
7069 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7070 and lwp_set_debug_registers_changed.
7071 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7072
7073 2015-03-24 Gary Benson <gbenson@redhat.com>
7074
7075 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7076 * linux-arm-low.c (arm_new_thread): Likewise.
7077 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7078 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7079 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7080 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7081
7082 2015-03-24 Gary Benson <gbenson@redhat.com>
7083
7084 * linux-low.c (ptid_of_lwp): New function.
7085 (lwp_is_stopped): Likewise.
7086 (lwp_stop_reason): Likewise.
7087 * linux-x86-low.c (update_debug_registers_callback):
7088 Use lwp_is_stopped.
7089 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7090 lwp_stop_reason.
7091
7092 2015-03-24 Gary Benson <gbenson@redhat.com>
7093
7094 * linux-low.h (linux_stop_lwp): Remove declaration.
7095
7096 2015-03-24 Gary Benson <gbenson@redhat.com>
7097
7098 * linux-low.h: Include nat/linux-nat.h.
7099 * linux-low.c (iterate_over_lwps_args): New structure.
7100 (iterate_over_lwps_filter): New function.
7101 (iterate_over_lwps): Likewise.
7102 * linux-x86-low.c (update_debug_registers_callback):
7103 Update signature to what iterate_over_lwps expects.
7104 Remove PID check that iterate_over_lwps now performs.
7105 (x86_dr_low_set_addr): Use iterate_over_lwps.
7106 (x86_dr_low_set_control): Likewise.
7107
7108 2015-03-24 Gary Benson <gbenson@redhat.com>
7109
7110 * linux-x86-low.c (x86_debug_reg_state): New function.
7111 (x86_linux_prepare_to_resume): Use the above.
7112
7113 2015-03-24 Gary Benson <gbenson@redhat.com>
7114
7115 * linux-low.c (current_lwp_ptid): New function.
7116 * linux-x86-low.c: Include nat/linux-nat.h.
7117 (x86_dr_low_get_addr): Use current_lwp_ptid.
7118 (x86_dr_low_get_control): Likewise.
7119 (x86_dr_low_get_status): Likewise.
7120
7121 2015-03-20 Pedro Alves <palves@redhat.com>
7122
7123 * tracepoint.c (cmd_qtstatus): Make "str" const.
7124
7125 2015-03-20 Pedro Alves <palves@redhat.com>
7126
7127 * server.c (handle_general_set): Make "req_str" const.
7128
7129 2015-03-19 Pedro Alves <palves@redhat.com>
7130
7131 * linux-low.c (linux_resume_one_lwp): Rename to ...
7132 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7133 instead call perror_with_name.
7134 (check_ptrace_stopped_lwp_gone): New function.
7135 (linux_resume_one_lwp): Reimplement as wrapper around
7136 linux_resume_one_lwp_throw that swallows errors if the LWP is
7137 gone.
7138
7139 2015-03-19 Pedro Alves <palves@redhat.com>
7140
7141 * linux-low.c (count_events_callback, select_event_lwp_callback):
7142 No longer check whether the thread has resume_stop as last resume
7143 kind.
7144
7145 2015-03-19 Pedro Alves <palves@redhat.com>
7146
7147 * linux-low.c (count_events_callback, select_event_lwp_callback):
7148 Use the lwp's status_pending_p field, not the thread's.
7149
7150 2015-03-19 Pedro Alves <palves@redhat.com>
7151
7152 * linux-low.c (select_event_lwp_callback): Update comments to
7153 no longer mention SIGTRAP.
7154
7155 2015-03-18 Gary Benson <gbenson@redhat.com>
7156
7157 * server.c (handle_query): Do not report vFile:fstat as supported.
7158
7159 2015-03-11 Gary Benson <gbenson@redhat.com>
7160
7161 * hostio.c (sys/types.h): New include.
7162 (sys/stat.h): Likewise.
7163 (common-remote-fileio.h): Likewise.
7164 (handle_fstat): New function.
7165 (handle_vFile): Handle vFile:fstat packets.
7166
7167 2015-03-11 Gary Benson <gbenson@redhat.com>
7168
7169 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7170 struct stat.st_blocks and struct stat.st_blksize.
7171 * configure: Regenerate.
7172 * config.in: Likewise.
7173 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7174 (OBS): Add common-remote-fileio.o.
7175 (common-remote-fileio.o): New rule.
7176
7177 2015-03-09 Pedro Alves <palves@redhat.com>
7178
7179 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7180 'struct sockaddr' pointer in 'accept' call.
7181
7182 2015-03-09 Pedro Alves <palves@redhat.com>
7183
7184 Revert:
7185 2015-03-07 Pedro Alves <palves@redhat.com>
7186 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7187 or <winsock2.h> here. Instead include "gdb_socket.h".
7188 (remote_open): Use union gdb_sockaddr_u.
7189 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7190 or <winsock2.h> here. Instead include "gdb_socket.h".
7191 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7192 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7193 or <sys/un.h>.
7194 (init_named_socket, gdb_agent_helper_thread): Use union
7195 gdb_sockaddr_u.
7196
7197 2015-03-07 Pedro Alves <palves@redhat.com>
7198
7199 * configure.ac (build_warnings): Move
7200 -Wdeclaration-after-statement to the C-specific set.
7201 * configure: Regenerate.
7202
7203 2015-03-07 Pedro Alves <palves@redhat.com>
7204
7205 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7206 or <winsock2.h> here. Instead include "gdb_socket.h".
7207 (remote_open): Use union gdb_sockaddr_u.
7208 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7209 or <winsock2.h> here. Instead include "gdb_socket.h".
7210 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7211 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7212 or <sys/un.h>.
7213 (init_named_socket, gdb_agent_helper_thread): Use union
7214 gdb_sockaddr_u.
7215
7216 2015-03-07 Pedro Alves <palves@redhat.com>
7217
7218 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7219 instead.
7220
7221 2015-03-06 Yao Qi <yao.qi@linaro.org>
7222
7223 * linux-aarch64-low.c (aarch64_insert_point): Use
7224 show_debug_regs as a boolean.
7225 (aarch64_remove_point): Likewise.
7226
7227 2015-03-05 Pedro Alves <palves@redhat.com>
7228
7229 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7230 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7231 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7232 * nto-low.c (nto_target_ops): Likewise.
7233 * spu-low.c (spu_target_ops): Likewise.
7234 * win32-low.c (win32_target_ops): Likewise.
7235
7236 2015-03-04 Pedro Alves <palves@redhat.com>
7237
7238 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7239 Decide whether a breakpoint triggered based on the SIGTRAP's
7240 siginfo.si_code.
7241 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7242 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7243 (linux_low_filter_event): Check for breakpoints before checking
7244 watchpoints.
7245 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7246 siginfo.si_code.
7247 (linux_stopped_by_sw_breakpoint)
7248 (linux_supports_stopped_by_sw_breakpoint)
7249 (linux_stopped_by_hw_breakpoint)
7250 (linux_supports_stopped_by_hw_breakpoint): New functions.
7251 (linux_target_ops): Install new target methods.
7252
7253 2015-03-04 Pedro Alves <palves@redhat.com>
7254
7255 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7256 * server.c (swbreak_feature, hwbreak_feature): New globals.
7257 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7258 (captured_main): Clear swbreak_feature and hwbreak_feature.
7259 * server.h (swbreak_feature, hwbreak_feature): Declare.
7260 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7261 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7262 supports_stopped_by_hw_breakpoint>: New fields.
7263 (target_supports_stopped_by_sw_breakpoint)
7264 (target_stopped_by_sw_breakpoint)
7265 (target_supports_stopped_by_hw_breakpoint)
7266 (target_stopped_by_hw_breakpoint): Declare.
7267
7268 2015-03-04 Pedro Alves <palves@redhat.com>
7269
7270 enum lwp_stop_reason -> enum target_stop_reason
7271 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7272 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7273 (linux_wait_1, stuck_in_jump_pad_callback)
7274 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7275 (linux_stopped_by_watchpoint):
7276 * linux-low.h (enum lwp_stop_reason): Delete.
7277 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7278 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7279
7280 2015-03-04 Yao Qi <yao.qi@linaro.org>
7281
7282 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7283
7284 2015-03-03 Gary Benson <gbenson@redhat.com>
7285
7286 * hostio.c (handle_vFile): Fix prefix lengths.
7287
7288 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7289
7290 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7291 ptr_bits.
7292
7293 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7294
7295 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7296 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7297 (clean): Add "rm -f" for above C files.
7298 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7299 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7300 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7301 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7302 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7303 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7304 (init_registers_s390x_vx_linux64)
7305 (init_registers_s390x_tevx_linux64)
7306 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7307 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7308 declarations.
7309 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7310 (s390_store_vxrs_high): New functions.
7311 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7312 NT_S390_VXRS_HIGH.
7313 (s390_arch_setup): Add logic for selecting one of the new target
7314 descriptions. Activate the new vector regsets if applicable.
7315 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7316 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7317 and init_registers_s390x_tevx_linux64.
7318
7319 2015-03-01 Pedro Alves <palves@redhat.com>
7320
7321 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7322 parameter.
7323
7324 2015-02-27 Pedro Alves <palves@redhat.com>
7325
7326 * linux-x86-low.c (u_debugreg_offset): New function.
7327 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7328
7329 2015-02-27 Pedro Alves <palves@redhat.com>
7330
7331 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7332 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7333 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7334 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7335 (ps_lsetfpregs, ps_getpid)
7336 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7337 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7338 (ps_lsetxregs, ps_plog): Declare.
7339
7340 2015-02-27 Pedro Alves <palves@redhat.com>
7341
7342 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7343 IP_AGENT_EXPORT_FUNC.
7344 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7345 IP_AGENT_EXPORT_FUNC.
7346 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7347 (IP_AGENT_EXPORT): Delete.
7348 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7349 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7350 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7351 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7352 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7353 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7354 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7355 (traceframe_read_count, traceframe_write_count)
7356 (traceframes_created, trace_state_variables, get_raw_reg)
7357 (get_trace_state_variable_value, set_trace_state_variable_value)
7358 (ust_loaded, helper_thread_id, cmd_buf): Use
7359 IPA_SYM_EXPORTED_NAME.
7360 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7361 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7362 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7363 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7364 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7365 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7366 EXTERN_C_PUSH/EXTERN_C_POP.
7367 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7368 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7369 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7370 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7371 (traceframe_write_count, traceframe_read_count)
7372 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7373 (about_to_request_buffer_space, get_trace_state_variable_value)
7374 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7375 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7376 EXTERN_C_PUSH/EXTERN_C_POP.
7377 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7378 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7379 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7380 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7381 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7382 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7383 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7384 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7385 Define.
7386 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7387 (IP_AGENT_EXPORT_VAR_DECL): Define.
7388 (tracing): Declare.
7389 (gdb_agent_get_raw_reg): Declare.
7390
7391 2015-02-27 Tom Tromey <tromey@redhat.com>
7392 Pedro Alves <palves@redhat.com>
7393
7394 Rename symbols whose names are reserved C++ keywords throughout.
7395
7396 2015-02-27 Pedro Alves <palves@redhat.com>
7397
7398 * Makefile.in (COMPILER): New, get it from autoconf.
7399 (CXX): Get from autoconf instead.
7400 (COMPILE.pre): Use COMPILER.
7401 (CC-LD): Rename to ...
7402 (CC_LD): ... this. Use COMPILER.
7403 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7404 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7405 * acinclude.m4: Include build-with-cxx.m4.
7406 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7407 Disable -Werror by default if building in C++ mode.
7408 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7409 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7410 the C++ compiler. Save/restore CXXFLAGS too.
7411 * configure: Regenerate.
7412
7413 2015-02-27 Pedro Alves <palves@redhat.com>
7414
7415 * acinclude.m4: Include libiberty.m4.
7416 * configure.ac: Call libiberty_INIT.
7417 * config.in, configure: Regenerate.
7418
7419 2015-02-26 Pedro Alves <palves@redhat.com>
7420
7421 * linux-low.c (linux_wait_1): When incrementing the PC past a
7422 program breakpoint always use the_low_target.breakpoint_len as
7423 increment, rather than the maximum between that and
7424 the_low_target.decr_pc_after_break.
7425
7426 2015-02-23 Pedro Alves <palves@redhat.com>
7427
7428 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7429 thread was doing a step-over; always adjust the PC if
7430 we stepped over a permanent breakpoint.
7431 (linux_wait_1): If we stepped over breakpoint that was on top of a
7432 permanent breakpoint, manually advance the PC past it.
7433
7434 2015-02-23 Pedro Alves <palves@redhat.com>
7435
7436 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7437 modes.
7438 (x86_fill_gregset, x86_store_gregset): Use it when handling
7439 $orig_eax.
7440
7441 2015-02-20 Pedro Alves <palves@redhat.com>
7442
7443 * thread-db.c: Include "nat/linux-procfs.h".
7444 (thread_db_init): Skip listing new threads if the kernel supports
7445 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7446
7447 2015-02-20 Pedro Alves <palves@redhat.com>
7448
7449 * linux-low.c (status_pending_p_callback): Use ptid_match.
7450
7451 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7452
7453 PR breakpoints/16812
7454 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7455 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7456 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7457
7458 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7459
7460 PR breakpoints/15956
7461 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7462
7463 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7464
7465 * linux-low.c (linux_low_btrace_conf): Print size.
7466 * server.c (handle_btrace_conf_general_set): New.
7467 (hanle_general_set): Call handle_btrace_conf_general_set.
7468 (handle_query): Report Qbtrace-conf:bts:size as supported.
7469
7470 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7471
7472 * linux-low.c (linux_low_enable_btrace): Update parameters.
7473 (linux_low_btrace_conf): New.
7474 (linux_target_ops)<to_btrace_conf>: Initialize.
7475 * server.c (current_btrace_conf): New.
7476 (handle_btrace_enable): Rename to ...
7477 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7478 to target_enable_btrace. Update comment. Update users.
7479 (handle_qxfer_btrace_conf): New.
7480 (qxfer_packets): Add btrace-conf entry.
7481 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7482 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7483 (target_ops)<read_btrace_conf>: New.
7484 (target_enable_btrace): Update parameters.
7485 (target_read_btrace_conf): New.
7486
7487 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7488
7489 * server.c (handle_btrace_general_set): Remove call to
7490 target_supports_btrace.
7491 (supported_btrace_packets): New.
7492 (handle_query): Call supported_btrace_packets.
7493 * target.h: include btrace-common.h.
7494 (btrace_target_info): Removed.
7495 (supports_btrace, target_supports_btrace): Update parameters.
7496
7497 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7498
7499 * Makefile.in (SFILES): Add common/btrace-common.c.
7500 (OBS): Add common/btrace-common.o.
7501 (btrace-common.o): Add build rules.
7502 * linux-low: Include btrace-common.h.
7503 (linux_low_read_btrace): Use struct btrace_data. Call
7504 btrace_data_init and btrace_data_fini.
7505
7506 2015-02-06 Pedro Alves <palves@redhat.com>
7507
7508 * thread-db.c (find_new_threads_callback): Add debug output.
7509
7510 2015-02-04 Pedro Alves <palves@redhat.com>
7511
7512 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7513 (resume_stopped_resumed_lwps): New function.
7514 (linux_wait_for_event_filtered): Use it.
7515
7516 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7517
7518 * Makefile.in (SFILES): Add linux-personality.c.
7519 (linux-personality.o): New rule.
7520 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7521 list of objects to be built.
7522 * linux-low.c: Include nat/linux-personality.h.
7523 (linux_create_inferior): Remove code to disable address space
7524 randomization (moved to ../nat/linux-personality.c). Create
7525 cleanup to disable address space randomization.
7526
7527 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7528
7529 * Makefile.in (posix-strerror.o): New rule.
7530 (mingw-strerror.o): Likewise.
7531 * configure: Regenerated.
7532 * configure.ac: Source file ../common/common.host. Initialize new
7533 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7534
7535 2015-01-14 Yao Qi <yao@codesourcery.com>
7536
7537 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7538 (ppc-linux.o): New rule.
7539 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7540 * configure.ac: AC_CHECK_FUNCS(getauxval).
7541 * config.in: Re-generated.
7542 * configure: Re-generated.
7543 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7544 ppc64_64bit_inferior_p
7545
7546 2015-01-14 Yao Qi <yao@codesourcery.com>
7547
7548 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7549 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7550 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7551 (PT_ORIG_R3, PT_TRAP): Likewise.
7552 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7553 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7554 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7555
7556 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7557
7558 * i387-fp.c (i387_cache_to_xsave): In look over
7559 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7560 zmmh_low_space field by use of zmmh_high_space.
7561
7562 2015-01-09 Pedro Alves <palves@redhat.com>
7563
7564 * linux-low.c (step_over_bkpt): Move higher up in the file.
7565 (handle_extended_wait): Don't store the stop_pc here.
7566 (get_stop_pc): Adjust comments and rename to ...
7567 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7568 stopped for a software breakpoint or hardware breakpoint.
7569 (thread_still_has_status_pending_p): New function.
7570 (status_pending_p_callback): Use
7571 thread_still_has_status_pending_p. If the event is no longer
7572 interesting, resume the LWP.
7573 (handle_tracepoints): Add assert.
7574 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7575 (wstatus_maybe_breakpoint): New function.
7576 (cancel_breakpoint): Delete function.
7577 (check_stopped_by_watchpoint): New function, factored out from
7578 linux_low_filter_event.
7579 (lp_status_maybe_breakpoint): Delete function.
7580 (linux_low_filter_event): Remove filter_ptid argument.
7581 Leave thread group exits pending here. Store the LWP's stop PC.
7582 Always leave events pending.
7583 (linux_wait_for_event_filtered): Pull all events out of the
7584 kernel, and leave them all pending.
7585 (count_events_callback, select_event_lwp_callback): Consider all
7586 events.
7587 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7588 (select_event_lwp): Only give preference to the stepping LWP in
7589 all-stop mode. Adjust comments.
7590 (ignore_event): New function.
7591 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7592 references to cancel_breakpoints. Adjust to renames. Also give
7593 equal priority to all LWPs that have had events in non-stop mode.
7594 If reporting a software breakpoint event, unadjust the LWP's PC.
7595 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7596 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7597 Adjust.
7598 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7599 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7600 (linux_stopped_by_watchpoint): Adjust.
7601 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7602 * linux-low.h (enum lwp_stop_reason): New.
7603 (struct lwp_info) <stop_pc>: Adjust comment.
7604 <stopped_by_watchpoint>: Delete field.
7605 <stop_reason>: New field.
7606 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7607 * mem-break.c (software_breakpoint_inserted_here)
7608 (hardware_breakpoint_inserted_here): New function.
7609 * mem-break.h (software_breakpoint_inserted_here)
7610 (hardware_breakpoint_inserted_here): Declare.
7611 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7612 (cancel_breakpoints): Delete.
7613 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7614 (upload_fast_traceframes): Remove references to
7615 cancel_breakpoints.
7616
7617 2015-01-09 Pedro Alves <palves@redhat.com>
7618
7619 * thread-db.c (find_new_threads_callback): Ignore thread if the
7620 kernel thread ID is -1.
7621
7622 2015-01-09 Pedro Alves <palves@redhat.com>
7623
7624 * linux-low.c (linux_attach_fail_reason_string): Move to
7625 nat/linux-ptrace.c, and rename.
7626 (linux_attach_lwp): Update comment.
7627 (attach_proc_task_lwp_callback): New function.
7628 (linux_attach): Adjust to rename and use
7629 linux_proc_attach_tgid_threads.
7630 (linux_attach_fail_reason_string): Delete declaration.
7631
7632 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7633
7634 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7635 * server.c (gdbserver_version): Likewise.
7636
7637 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7638
7639 * remote-utils.c: Include ctype.h.
7640 (input_interrupt): Explicitly handle the case when the char
7641 received is the NUL byte. Improve the printing of non-ASCII
7642 characters.
7643
7644 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7645
7646 * linux-low.c (linux_low_filter_event): Update call to
7647 linux_enable_event_reporting following the addition of
7648 a new parameter to that function.
7649
7650 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7651
7652 PR server/17457
7653 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7654 (AARCH64_FPCR_REGNO): Likewise.
7655 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7656 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7657 (aarch64_store_fpregset): Likewise.
7658
7659 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7660
7661 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7662 Remove FIXME comment about assumption about N.
7663
7664 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7665
7666 * configure.ac: If large-file support is disabled in GDBserver,
7667 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7668 * configure: Regenerate.
7669
7670 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7671
7672 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7673 warning upon ENODATA from ptrace.
7674 * linux-s390-low.c (s390_store_tdb): New.
7675 (s390_regsets): Add regset for NT_S390_TDB.
7676
7677 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7678
7679 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7680 without a fill_function.
7681 * linux-s390-low.c (s390_fill_last_break): Remove.
7682 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7683 (s390_arch_setup): Use regset's size instead of fill_function for
7684 loop end condition.
7685
7686 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7687
7688 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7689 the regset's store function when ptrace returned an error.
7690 * regcache.c (get_thread_regcache): Invalidate register cache
7691 before fetching inferior's registers.
7692
7693 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7694
7695 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7696 while-loop as for-loop.
7697 (regsets_store_inferior_registers): Likewise.
7698
7699 2014-11-28 Yao Qi <yao@codesourcery.com>
7700
7701 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7702 * config.in, configure: Re-generate.
7703 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7704 is defined.
7705
7706 2014-11-21 Yao Qi <yao@codesourcery.com>
7707
7708 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7709 (AC_CHECK_HEADERS): Remove malloc.h.
7710 * configure: Re-generated.
7711 * config.in: Re-generated.
7712 * server.h: Don't include alloca.h and malloc.h.
7713 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7714 Don't include malloc.h.
7715
7716 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7717
7718 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7719 corresponding ERRNO check in same block.
7720
7721 2014-11-12 Pedro Alves <palves@redhat.com>
7722
7723 * server.c (cont_thread): Update comment.
7724 (start_inferior, attach_inferior): No longer clear cont_thread.
7725 (handle_v_cont): No longer set cont_thread.
7726 (captured_main): Clear cont_thread each time a GDB connects.
7727
7728 2014-11-12 Pedro Alves <palves@redhat.com>
7729
7730 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7731 thread, and don't resume all threads if the Hc thread has exited.
7732
7733 2014-11-12 Pedro Alves <palves@redhat.com>
7734
7735 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7736 the process group instead of to a specific LWP.
7737
7738 2014-10-15 Pedro Alves <palves@redhat.com>
7739
7740 PR server/17487
7741 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7742 parameter.
7743 (arm_set_thread_context): Delete.
7744 (the_low_target): Adjust.
7745 * win32-i386-low.c (debug_registers_changed)
7746 (debug_registers_used): Delete.
7747 (update_debug_registers_callback): New function.
7748 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7749 needing to update their debug registers.
7750 (win32_get_current_dr): New function.
7751 (x86_dr_low_get_addr, x86_dr_low_get_control)
7752 (x86_dr_low_get_status): Fetch the debug register from the thread
7753 record's context.
7754 (i386_initial_stuff): Adjust.
7755 (i386_get_thread_context): Remove current_event parameter. Don't
7756 clear debug_registers_changed nor copy DR values to
7757 debug_reg_state.
7758 (i386_set_thread_context): Delete.
7759 (i386_prepare_to_resume): New function.
7760 (i386_thread_added): Mark the thread as needing to update irs
7761 debug registers.
7762 (the_low_target): Remove i386_set_thread_context and install
7763 i386_prepare_to_resume.
7764 * win32-low.c (win32_get_thread_context): Adjust.
7765 (win32_set_thread_context): Use SetThreadContext
7766 directly.
7767 (win32_prepare_to_resume): New function.
7768 (win32_require_context): New function, factored out from ...
7769 (thread_rec): ... this.
7770 (continue_one_thread): Call win32_prepare_to_resume on each thread
7771 we're about to continue.
7772 (win32_resume): Call win32_prepare_to_resume on the event thread.
7773 * win32-low.h (struct win32_thread_info)
7774 <debug_registers_changed>: New field.
7775 (struct win32_target_ops): Change prototype of set_thread_context,
7776 delete set_thread_context and add prepare_to_resume.
7777 (win32_require_context): New declaration.
7778
7779 2014-10-08 Gary Benson <gbenson@redhat.com>
7780
7781 * server.h: Do not include common-exceptions.h.
7782
7783 2014-10-08 Gary Benson <gbenson@redhat.com>
7784
7785 * server.h: Do not include cleanups.h.
7786
7787 2014-09-30 James Hogan <james.hogan@imgtec.com>
7788
7789 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7790 mips64-dsp-linux.c.
7791
7792 2014-09-23 Yao Qi <yao@codesourcery.com>
7793
7794 * linux-low.c (lp_status_maybe_breakpoint): New function.
7795 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7796 (count_events_callback): Likewise.
7797 (select_event_lwp_callback): Likewise.
7798 (cancel_breakpoints_callback): Likewise.
7799
7800 2014-09-19 Don Breazeal <donb@codesourcery.com>
7801
7802 * linux-low.c (handle_extended_wait): Call
7803 linux_ptrace_get_extended_event.
7804 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7805 linux_is_extended_waitstatus.
7806
7807 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7808
7809 * Makefile.in (CPPFLAGS): Define.
7810 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7811 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7812
7813 2014-09-16 Gary Benson <gbenson@redhat.com>
7814
7815 * inferiors.h (current_inferior): Renamed as...
7816 (current_thread): New variable. All uses updated.
7817 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7818 (maybe_move_out_of_jump_pad): Likewise.
7819 (cancel_breakpoint): Likewise.
7820 (linux_low_filter_event): Likewise.
7821 (wait_for_sigstop): Likewise.
7822 (linux_resume_one_lwp): Likewise.
7823 (need_step_over_p): Likewise.
7824 (start_step_over): Likewise.
7825 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7826 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7827 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7828 and save_inferior as saved_thread.
7829 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7830 saved_thread.
7831 (regcache_invalidate_thread): Likewise.
7832 * remote-utils.c (prepare_resume_reply): Likewise.
7833 * thread-db.c (thread_db_get_tls_address): Likewise.
7834 (disable_thread_event_reporting): Likewise.
7835 (remove_thread_event_breakpoints): Likewise.
7836 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7837 as saved_thread.
7838 * target.h (set_desired_inferior): Renamed as...
7839 (set_desired_thread): New declaration. All uses updated.
7840 * server.c (myresume): Updated comment to reference thread instead
7841 of inferior.
7842 (handle_serial_event): Likewise.
7843 (handle_target_event): Likewise.
7844
7845 2014-09-12 Tom Tromey <tromey@redhat.com>
7846 Gary Benson <gbenson@redhat.com>
7847
7848 * regcache.h: Include common-regcache.h.
7849 (regcache_read_pc): Don't declare.
7850 * regcache.c (get_thread_regcache_for_ptid): New function.
7851
7852 2014-09-11 Tom Tromey <tromey@redhat.com>
7853 Gary Benson <gbenson@redhat.com>
7854
7855 * symbol.c: New file.
7856 * Makefile.in (SFILES): Add symbol.c.
7857 (OBS): Add symbol.o.
7858
7859 2014-09-11 Gary Benson <gbenson@redhat.com>
7860
7861 * target.c (target_stop_ptid, target_continue_ptid): New
7862 functions.
7863
7864 2014-09-11 Tom Tromey <tromey@redhat.com>
7865 Gary Benson <gbenson@redhat.com>
7866
7867 * target.h: Include target/target.h.
7868 * target.c (target_read_memory, target_read_uint32)
7869 (target_write_memory): New functions.
7870
7871 2014-09-11 Gary Benson <gbenson@redhat.com>
7872
7873 * server.h (debug_hw_points): Don't declare.
7874 * server.c (debug_hw_points): Don't define. Replace all uses
7875 with show_debug_regs.
7876 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7877 all uses with show_debug_regs.
7878
7879 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7880
7881 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7882 endianness into account.
7883 (ppc_supply_ptrace_register): Likewise.
7884
7885 2014-09-03 James Hogan <james.hogan@imgtec.com>
7886
7887 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7888 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7889
7890 2014-09-03 Gary Benson <gbenson@redhat.com>
7891
7892 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7893 ALL_DEBUG_ADDRESS_REGISTERS.
7894
7895 2014-09-02 Gary Benson <gbenson@redhat.com>
7896
7897 * i386-low.h: Renamed as...
7898 * x86-low.h: New file. All type, function and variable name
7899 prefixes changed from "i386_" to "x86_". All references updated.
7900 * i386-low.c: Renamed as...
7901 * x86-low.c: New file. All type, function and variable name
7902 prefixes changed from "i386_" to "x86_". All references updated.
7903
7904 2014-09-02 Gary Benson <gbenson@redhat.com>
7905
7906 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7907 (x86_linux_new_thread): Likewise.
7908
7909 2014-08-29 Gary Benson <gbenson@redhat.com>
7910
7911 * server.h (setjmp.h): Do not include.
7912 (toplevel): Do not declare.
7913 (common-exceptions.h): Include.
7914 (cleanups.h): Likewise.
7915 * server.c (toplevel): Do not define.
7916 (exit_code): New static global.
7917 (detach_or_kill_for_exit_cleanup): New function.
7918 (main): New function. Original main renamed to...
7919 (captured_main): New function.
7920 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7921
7922 2014-08-29 Gary Benson <gbenson@redhat.com>
7923
7924 * Makefile.in (SFILES): Add common/common-exceptions.c.
7925 (OBS): Add common-exceptions.o.
7926 (common-exceptions.o): New rule.
7927 * utils.c (prepare_to_throw_exception): New function.
7928
7929 2014-08-29 Gary Benson <gbenson@redhat.com>
7930
7931 * config.in: Regenerate.
7932 * configure: Likewise.
7933
7934 2014-08-29 Gary Benson <gbenson@redhat.com>
7935
7936 * Makefile.in (SFILES): Add common/cleanups.c.
7937 (OBS): cleanups.o.
7938 (cleanups.o): New rule.
7939
7940 2014-08-29 Gary Benson <gbenson@redhat.com>
7941
7942 * utils.c (internal_vwarning): New function.
7943
7944 2014-08-28 Gary Benson <gbenson@redhat.com>
7945
7946 * utils.h (fatal): Remove declaration.
7947 * utils.c (fatal): Remove function.
7948
7949 2014-08-28 Gary Benson <gbenson@redhat.com>
7950
7951 * tracepoint.c (gdb_agent_init): Replace fatal with
7952 perror_with_name.
7953 (initialize_tracepoint): Likewise.
7954
7955 2014-08-28 Gary Benson <gbenson@redhat.com>
7956
7957 * remote-utils.c (remote_prepare): Replace fatal with error.
7958
7959 2014-08-28 Gary Benson <gbenson@redhat.com>
7960
7961 * linux-low.c (linux_async): Replace fatal with warning.
7962 Tidy up and return.
7963 (linux_start_non_stop): Return -1 if linux_async failed.
7964
7965 2014-08-28 Gary Benson <gbenson@redhat.com>
7966
7967 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7968 gdb_assert.
7969 (i386_dr_low_get_addr): Remove vague comment.
7970 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7971 gdb_assert.
7972
7973 2014-08-28 Gary Benson <gbenson@redhat.com>
7974
7975 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7976 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7977 internal_error.
7978 (linux_resume_one_lwp): Likewise.
7979 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7980 gdb_assert.
7981 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7982 with internal_error.
7983 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7984 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7985 (find_register_by_name): Replace fatal with internal_error.
7986 (find_regno): Likewise.
7987 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7988 * thread-db.c (thread_db_create_event): Likewise.
7989 (thread_db_load_search): Likewise.
7990 (try_thread_db_load_1): Likewise.
7991 * tracepoint.c (get_jump_space_head): Replace fatal with
7992 internal_error.
7993 (claim_trampoline_space): Likewise.
7994 (have_fast_tracepoint_trampoline_buffer): Likewise.
7995 (cmd_qtstart): Likewise.
7996 (stop_tracing): Likewise.
7997 (fast_tracepoint_collecting): Likewise.
7998 (target_malloc): Likewise.
7999 (download_tracepoint): Likewise.
8000 (download_trace_state_variables): Replace check with gdb_assert.
8001 (upload_fast_traceframes): Replace fatal with internal_error.
8002
8003 2014-08-19 Tom Tromey <tromey@redhat.com>
8004 Gary Benson <gbenson@redhat.com>
8005
8006 * Makefile.in (SFILES): Add common/common-debug.c.
8007 (OBS): Add common-debug.o.
8008 (common-debug.o): New rule.
8009 * debug.h (debug_printf): Don't declare.
8010 * debug.c (debug_printf): Renamed and rewritten as...
8011 (debug_vprintf): New function.
8012
8013 2014-08-19 Gary Benson <gbenson@redhat.com>
8014
8015 * utils.h: Do not include print-utils.h.
8016
8017 2014-08-19 Tom Tromey <tromey@redhat.com>
8018 Gary Benson <gbenson@redhat.com>
8019
8020 * server.h: Add static assertion.
8021 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8022
8023 2014-08-19 Tom Tromey <tromey@redhat.com>
8024 Gary Benson <gbenson@redhat.com>
8025
8026 * Makefile.in (SFILES): Add common/errors.c.
8027 (OBS): Add errors.o.
8028 (IPA_OBS): Add errors-ipa.o.
8029 (errors.o): New rule.
8030 (errors-ipa.o): Likewise.
8031 * utils.h (perror_with_name, error, warning): Don't declare.
8032 * utils.c (warning): Renamed and rewritten as...
8033 (vwarning): New function.
8034 (error): Renamed and rewritten as...
8035 (verror): New function.
8036 (internal_error): Renamed and rewritten as...
8037 (internal_verror): New function.
8038
8039 2014-08-07 Gary Benson <gbenson@redhat.com>
8040
8041 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8042 * configure: Regenerate.
8043 * config.in: Likewise.
8044 * server.h: Do not include errno.h.
8045 * event-loop.c: Likewise.
8046 * hostio-errno.c: Likewise.
8047 * linux-low.c: Likewise.
8048 * remote-utils.c: Likewise.
8049 * spu-low.c: Likewise.
8050 * utils.c: Likewise.
8051 * gdbreplay.c: Unconditionally include errno.h.
8052
8053 2014-08-07 Gary Benson <gbenson@redhat.com>
8054
8055 * server.h: Do not include string.h.
8056 * event-loop.c: Likewise.
8057 * linux-low.c: Likewise.
8058 * regcache.c: Likewise.
8059 * remote-utils.c: Likewise.
8060 * spu-low.c: Likewise.
8061 * utils.c: Likewise.
8062
8063 2014-08-07 Gary Benson <gbenson@redhat.com>
8064
8065 * server.h: Do not include gdb_assert.h.
8066
8067 2014-08-07 Gary Benson <gbenson@redhat.com>
8068
8069 * server.h: Do not include common-utils.h.
8070
8071 2014-08-07 Gary Benson <gbenson@redhat.com>
8072
8073 * server.h: Do not include ptid.h.
8074 * notif.h: Likewise.
8075
8076 2014-08-07 Gary Benson <gbenson@redhat.com>
8077
8078 * server.h: Do not include gdb_locale.h.
8079
8080 2014-08-07 Gary Benson <gbenson@redhat.com>
8081
8082 * server.h: Do not include gdb/signals.h.
8083 * win32-low.c: Likewise.
8084
8085 2014-08-07 Gary Benson <gbenson@redhat.com>
8086
8087 * server.h: Do not include pathmax.h.
8088
8089 2014-08-07 Gary Benson <gbenson@redhat.com>
8090
8091 * server.h: Do not include libiberty.h.
8092 * linux-bfin-low.c: Likewise.
8093
8094 2014-08-07 Gary Benson <gbenson@redhat.com>
8095
8096 * server.h: Do not include ansidecl.h.
8097
8098 2014-08-07 Gary Benson <gbenson@redhat.com>
8099
8100 * linux-x86-low.c: Do not include stddef.h.
8101 * lynx-ppc-low.c: Likewise.
8102 * tracepoint.c: Likewise.
8103
8104 2014-08-07 Gary Benson <gbenson@redhat.com>
8105
8106 * server.h: Do not include stdarg.h.
8107 * nto-low.c: Likewise.
8108
8109 2014-08-07 Gary Benson <gbenson@redhat.com>
8110
8111 * server.h: Do not include stdlib.h.
8112 * inferiors.c: Likewise.
8113 * linux-low.c: Likewise.
8114 * regcache.c: Likewise.
8115 * spu-low.c: Likewise.
8116 * tracepoint.c: Likewise.
8117 * utils.c: Likewise.
8118
8119 2014-08-07 Gary Benson <gbenson@redhat.com>
8120
8121 * server.h: Do not include stdio.h.
8122 * linux-low.c: Likewise.
8123 * remote-utils.c: Likewise.
8124 * spu-low.c: Likewise.
8125 * utils.c: Likewise.
8126 * wincecompat.c: Likewise.
8127
8128 2014-08-06 Gary Benson <gbenson@redhat.com>
8129
8130 * regcache.c (init_register_cache): Move conditionals inside if.
8131
8132 2014-08-06 Gary Benson <gbenson@redhat.com>
8133
8134 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8135
8136 2014-07-31 Gary Benson <gbenson@redhat.com>
8137
8138 * ax.h: Do not include server.h.
8139 * gdbthread.h: Likewise.
8140 * lynx-low.h: Likewise.
8141 * notif.h: Likewise.
8142
8143 2014-07-30 Gary Benson <gbenson@redhat.com>
8144
8145 * server.h: Include common-defs.h.
8146 Do not include config.h or build-gnulib-gdbserver/config.h.
8147
8148 2014-07-30 Gary Benson <gbenson@redhat.com>
8149
8150 * hostio-errno.c: Move server.h to top of includes list.
8151 * inferiors.c: Likewise.
8152 * linux-x86-low.c: Likewise.
8153 * notif.c: Include server.h.
8154
8155 2014-07-24 Tom Tromey <tromey@redhat.com>
8156 Gary Benson <gbenson@redhat.com>
8157
8158 * server.h (CORE_ADDR): Now unsigned.
8159
8160 2014-07-16 Pedro Alves <palves@redhat.com>
8161
8162 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8163
8164 2014-07-15 Pedro Alves <palves@redhat.com>
8165
8166 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8167 copy.
8168
8169 2014-07-11 Pedro Alves <palves@redhat.com>
8170
8171 * linux-low.c (kill_wait_lwp): New function, based on
8172 kill_one_lwp_callback, but use my_waitpid directly.
8173 (kill_one_lwp_callback, linux_kill): Use it.
8174
8175 2014-06-23 Pedro Alves <palves@redhat.com>
8176
8177 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8178 before setting DR0..DR3.
8179
8180 2014-06-20 Gary Benson <gbenson@redhat.com>
8181
8182 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8183 * configure: Regenerated.
8184 * config.in: Likewise.
8185
8186 2014-06-20 Gary Benson <gbenson@redhat.com>
8187
8188 * Makefile.in (SFILES): Update locations for files moved
8189 from common to nat.
8190 (object file files): Reordered.
8191
8192 2014-06-20 Gary Benson <gbenson@redhat.com>
8193
8194 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8195 (i386_dr_low_set_addr): Likewise.
8196 (i386_dr_low_get_addr): Likewise.
8197 (i386_dr_low_can_set_control): Likewise.
8198 (i386_dr_low_set_control): Likewise.
8199 (i386_dr_low_get_control): Likewise.
8200 (i386_dr_low_get_status): Likewise.
8201 (i386_get_debug_register_length): Likewise.
8202 * linux-x86-low.c (i386_dr_low_set_addr):
8203 Changed signature. Made static.
8204 (i386_dr_low_get_addr): Likewise.
8205 (i386_dr_low_set_control): Likewise.
8206 (i386_dr_low_get_control): Likewise.
8207 (i386_dr_low_get_status): Likewise.
8208 (i386_dr_low): New global variable.
8209 * win32-i386-low.c (i386_dr_low_set_addr):
8210 Changed signature. Made static.
8211 (i386_dr_low_get_addr): Likewise.
8212 (i386_dr_low_set_control): Likewise.
8213 (i386_dr_low_get_control): Likewise.
8214 (i386_dr_low_get_status): Likewise.
8215 (i386_dr_low): New global variable.
8216
8217 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8218
8219 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8220 * Makefile.in (AR, AR_FLAGS): Define.
8221 * configure: Regenerate.
8222
8223 2014-06-19 Gary Benson <gbenson@redhat.com>
8224
8225 * Makefile.in (i386-dregs.o): New rule.
8226 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8227 * i386-low.c (target.h): Remove include.
8228 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8229 (DR_CONTROL_SHIFT): Likewise.
8230 (DR_CONTROL_SIZE): Likewise.
8231 (DR_RW_EXECUTE): Likewise.
8232 (DR_RW_WRITE): Likewise.
8233 (DR_RW_READ): Likewise.
8234 (DR_RW_IORW): Likewise.
8235 (DR_LEN_1): Likewise.
8236 (DR_LEN_2): Likewise.
8237 (DR_LEN_4): Likewise.
8238 (DR_LEN_8): Likewise.
8239 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8240 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8241 (DR_ENABLE_SIZE): Likewise.
8242 (DR_LOCAL_SLOWDOWN): Likewise.
8243 (DR_GLOBAL_SLOWDOWN): Likewise.
8244 (DR_CONTROL_RESERVED): Likewise.
8245 (I386_DR_CONTROL_MASK): Likewise.
8246 (I386_DR_VACANT): Likewise.
8247 (I386_DR_LOCAL_ENABLE): Likewise.
8248 (I386_DR_GLOBAL_ENABLE): Likewise.
8249 (I386_DR_DISABLE): Likewise.
8250 (I386_DR_SET_RW_LEN): Likewise.
8251 (I386_DR_GET_RW_LEN): Likewise.
8252 (I386_DR_WATCH_HIT): Likewise.
8253 (i386_wp_op_t): Likewise.
8254 (i386_show_dr): Likewise.
8255 (i386_length_and_rw_bits): Likewise.
8256 (i386_insert_aligned_watchpoint): Likewise.
8257 (i386_remove_aligned_watchpoint): Likewise.
8258 (i386_handle_nonaligned_watchpoint): Likewise.
8259 i386_update_inferior_debug_regs(): Likewise.
8260 (i386_dr_insert_watchpoint): Likewise.
8261 (i386_dr_remove_watchpoint): Likewise.
8262 (i386_dr_region_ok_for_watchpoint): Likewise.
8263 (i386_dr_stopped_data_address): Likewise.
8264 (i386_dr_stopped_by_watchpoint): Likewise.
8265
8266 2014-06-19 Gary Benson <gbenson@redhat.com>
8267
8268 * i386-low.c (i386_dr_show): Renamed to
8269 i386_show_dr and made static. All uses updated.
8270 (i386_dr_length_and_rw_bits): Renamed to
8271 i386_length_and_rw_bits and made static.
8272 All uses updated.
8273 (i386_dr_insert_aligned_watchpoint): Renamed to
8274 i386_insert_aligned_watchpoint and made static.
8275 All uses updated.
8276 (i386_dr_remove_aligned_watchpoint): Renamed to
8277 i386_remove_aligned_watchpoint and made static.
8278 All uses updated.
8279 (i386_dr_update_inferior_debug_regs): Renamed to
8280 i386_update_inferior_debug_regs and made static.
8281 All uses updated.
8282
8283 2014-06-18 Gary Benson <gbenson@redhat.com>
8284
8285 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8286 (i386_dr_low_can_set_control): Likewise.
8287 (i386_get_debug_register_length): Likewise.
8288 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8289 (i386_dr_low_can_set_control): Likewise.
8290 (i386_get_debug_register_length): Likewise.
8291
8292 2014-06-17 Gary Benson <gbenson@redhat.com>
8293
8294 * i386-low.h (i386-dregs.h): New include.
8295 (DR_FIRSTADDR): Now in i386-dregs.h.
8296 (DR_LASTADDR): Likewise.
8297 (DR_NADDR): Likewise.
8298 (DR_STATUS): Likewise.
8299 (DR_CONTROL): Likewise.
8300 (i386_debug_reg_state): Likewise.
8301 (i386_dr_insert_watchpoint): Likewise.
8302 (i386_dr_remove_watchpoint): Likewise.
8303 (i386_dr_region_ok_for_watchpoint): Likewise.
8304 (i386_dr_stopped_data_address): Likewise.
8305 (i386_dr_stopped_by_watchpoint): Likewise.
8306 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8307
8308 2014-06-18 Gary Benson <gbenson@redhat.com>
8309
8310 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8311 i386_dr_insert_watchpoint.
8312 (i386_low_remove_watchpoint): Renamed to
8313 i386_dr_remove_watchpoint.
8314 (i386_low_region_ok_for_watchpoint): Renamed to
8315 i386_dr_region_ok_for_watchpoint.
8316 (i386_low_stopped_data_address): Renamed to
8317 i386_dr_stopped_data_address.
8318 (i386_low_stopped_by_watchpoint): Renamed to
8319 i386_dr_stopped_by_watchpoint.
8320 * i386-low.c (i386_show_dr): Renamed to
8321 i386_dr_show and made nonstatic. All uses updated.
8322 (i386_length_and_rw_bits): Renamed to
8323 i386_dr_length_and_rw_bits and made nonstatic.
8324 All uses updated.
8325 (i386_insert_aligned_watchpoint): Renamed to
8326 i386_dr_insert_aligned_watchpoint and made nonstatic.
8327 All uses updated.
8328 (i386_remove_aligned_watchpoint): Renamed to
8329 i386_dr_remove_aligned_watchpoint and made nonstatic.
8330 All uses updated.
8331 (i386_update_inferior_debug_regs): Renamed to
8332 i386_dr_update_inferior_debug_regs and made nonstatic.
8333 All uses updated.
8334 (i386_low_insert_watchpoint): Renamed to
8335 i386_dr_insert_watchpoint. All uses updated.
8336 (i386_low_remove_watchpoint): Renamed to
8337 i386_dr_remove_watchpoint. All uses updated.
8338 (i386_low_region_ok_for_watchpoint): Renamed to
8339 i386_dr_region_ok_for_watchpoint. All uses updated.
8340 (i386_low_stopped_data_address): Renamed to
8341 i386_dr_stopped_data_address. All uses updated.
8342 (i386_low_stopped_by_watchpoint): Renamed to
8343 i386_dr_stopped_by_watchpoint. All uses updated.
8344
8345 2014-06-18 Gary Benson <gbenson@redhat.com>
8346
8347 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8348 (i386_dr_low_can_set_control): Likewise.
8349 (i386_insert_aligned_watchpoint): New check.
8350
8351 2014-06-18 Gary Benson <gbenson@redhat.com>
8352
8353 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8354 Renamed to state.
8355
8356 2014-06-18 Gary Benson <gbenson@redhat.com>
8357
8358 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8359 instead of fatal and error.
8360 (i386_handle_nonaligned_watchpoint): Likewise.
8361
8362 2014-06-18 Gary Benson <gbenson@redhat.com>
8363
8364 * i386-low.c (i386_get_debug_register_length): New macro.
8365 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8366 (i386_show_dr): Use debug_printf instead of fprintf. Use
8367 phex to format values.
8368
8369 2014-06-18 Gary Benson <gbenson@redhat.com>
8370
8371 * i386-low.h: Comment changes.
8372 * i386-low.c: Likewise.
8373
8374 2014-06-18 Gary Benson <gbenson@redhat.com>
8375
8376 * i386-low.c: Whitespace changes.
8377
8378 2014-06-12 Tom Tromey <tromey@redhat.com>
8379
8380 * utils.c (freeargv): Remove.
8381
8382 2014-06-12 Tom Tromey <tromey@redhat.com>
8383
8384 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8385 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8386 (parse_debug_format_options): Likewise.
8387 (gdbserver_usage): Likewise.
8388 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8389 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8390 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8391 against libiberty.
8392 ($(LIBGNU)): Depend on libiberty.
8393 (all-lib): Recurse into all subdirs.
8394 (install-only): Invoke "install" target in subdirs.
8395 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8396 targets.
8397 * configure: Rebuild.
8398 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8399 for vasprintf, vsnprintf, or gettimeofday.
8400 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8401 srv_tgtobj.
8402
8403 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8404
8405 * development.sh: Delete.
8406 * Makefile.in (config.status): Adjust dependency on development.sh.
8407 * configure.ac: Adjust development.sh source call.
8408 * configure: Regenerate.
8409
8410 2014-06-02 Pedro Alves <palves@redhat.com>
8411
8412 * ax.c (gdb_free_agent_expr): New function.
8413 * ax.h (gdb_free_agent_expr): New declaration.
8414 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8415 list.
8416 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8417 static.
8418 (clear_breakpoint_conditions_and_commands): New function.
8419 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8420 (clear_breakpoint_conditions_and_commands): New declaration.
8421
8422 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8423
8424 * linux-aarch64-low.c (asm/ptrace.h): Include.
8425
8426 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8427
8428 Fix TLS access for -static -pthread.
8429 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8430 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8431 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8432
8433 2014-05-20 Pedro Alves <palves@redhat.com>
8434
8435 * linux-aarch64-low.c (aarch64_insert_point)
8436 (aarch64_remove_point): No longer check whether the type is
8437 supported here. Adjust to new interface.
8438 (the_low_target): Install aarch64_supports_z_point_type as
8439 supports_z_point_type method.
8440 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8441 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8442 instead of a Z packet char. Adjust.
8443 (arm_supports_z_point_type): New function.
8444 (arm_insert_point, arm_remove_point): Adjust to new interface.
8445 (the_low_target): Install arm_supports_z_point_type.
8446 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8447 (cris_insert_point, cris_remove_point): Adjust to new interface.
8448 Don't check whether the type is supported here.
8449 (the_low_target): Install cris_supports_z_point_type.
8450 * linux-low.c (linux_supports_z_point_type): New function.
8451 (linux_insert_point, linux_remove_point): Adjust to new interface.
8452 * linux-low.h (struct linux_target_ops) <insert_point,
8453 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8454 raw_breakpoint pointer parameter.
8455 <supports_z_point_type>: New method.
8456 * linux-mips-low.c (mips_supports_z_point_type): New function.
8457 (mips_insert_point, mips_remove_point): Adjust to new interface.
8458 Use mips_supports_z_point_type.
8459 (the_low_target): Install mips_supports_z_point_type.
8460 * linux-ppc-low.c (the_low_target): Install NULL as
8461 supports_z_point_type method.
8462 * linux-s390-low.c (the_low_target): Install NULL as
8463 supports_z_point_type method.
8464 * linux-sparc-low.c (the_low_target): Install NULL as
8465 supports_z_point_type method.
8466 * linux-x86-low.c (x86_supports_z_point_type): New function.
8467 (x86_insert_point): Adjust to new insert_point interface. Use
8468 insert_memory_breakpoint. Adjust to new
8469 i386_low_insert_watchpoint interface.
8470 (x86_remove_point): Adjust to remove_point interface. Use
8471 remove_memory_breakpoint. Adjust to new
8472 i386_low_remove_watchpoint interface.
8473 (the_low_target): Install x86_supports_z_point_type.
8474 * lynx-low.c (lynx_target_ops): Install NULL as
8475 supports_z_point_type callback.
8476 * nto-low.c (nto_supports_z_point_type): New.
8477 (nto_insert_point, nto_remove_point): Adjust to new interface.
8478 (nto_target_ops): Install nto_supports_z_point_type.
8479 * mem-break.c: Adjust intro comment.
8480 (struct raw_breakpoint) <raw_type, size>: New fields.
8481 <inserted>: Update comment.
8482 <shlib_disabled>: Delete field.
8483 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8484 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8485 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8486 (raw_bkpt_type_to_target_hw_bp_type): New function.
8487 (find_enabled_raw_code_breakpoint_at): New function.
8488 (find_raw_breakpoint_at): New type and size parameters. Use them.
8489 (insert_memory_breakpoint): New function, based off
8490 set_raw_breakpoint_at.
8491 (remove_memory_breakpoint): New function.
8492 (set_raw_breakpoint_at): Reimplement.
8493 (set_breakpoint): New, based on set_breakpoint_at.
8494 (set_breakpoint_at): Reimplement.
8495 (delete_raw_breakpoint): Go through the_target->remove_point
8496 instead of assuming memory breakpoints.
8497 (find_gdb_breakpoint_at): Delete.
8498 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8499 (find_gdb_breakpoint): New function.
8500 (set_gdb_breakpoint_at): Delete.
8501 (z_type_supported): New function.
8502 (set_gdb_breakpoint_1): New function, loosely based off
8503 set_gdb_breakpoint_at.
8504 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8505 (delete_gdb_breakpoint_at): Delete.
8506 (delete_gdb_breakpoint_1): New function, loosely based off
8507 delete_gdb_breakpoint_at.
8508 (delete_gdb_breakpoint): New function.
8509 (clear_gdb_breakpoint_conditions): Rename to ...
8510 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8511 breakpoint.
8512 (add_condition_to_breakpoint): Make static.
8513 (add_breakpoint_condition): Take a struct breakpoint pointer
8514 instead of an address. Adjust.
8515 (gdb_condition_true_at_breakpoint): Rename to ...
8516 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8517 z_type parameter.
8518 (gdb_condition_true_at_breakpoint): Reimplement.
8519 (add_breakpoint_commands): Take a struct breakpoint pointer
8520 instead of an address. Adjust.
8521 (gdb_no_commands_at_breakpoint): Rename to ...
8522 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8523 parameter. Return true if no breakpoint was found. Change debug
8524 output.
8525 (gdb_no_commands_at_breakpoint): Reimplement.
8526 (run_breakpoint_commands): Rename to ...
8527 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8528 and change return type to boolean.
8529 (run_breakpoint_commands): New function.
8530 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8531 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8532 breakpoint. Go through the_target->remove_point instead of
8533 assuming memory breakpoint.
8534 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8535 software and hardware breakpoints.
8536 (reinsert_raw_breakpoint): Go through the_target->insert_point
8537 instead of assuming memory breakpoint.
8538 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8539 software and hardware breakpoints.
8540 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8541 Check both software and hardware breakpoints.
8542 (validate_inserted_breakpoint): Assert the breakpoint is a
8543 software breakpoint. Set the inserted flag to -1 instead of
8544 setting shlib_disabled.
8545 (delete_disabled_breakpoints): Adjust.
8546 (validate_breakpoints): Only validate software breakpoints.
8547 Adjust to inserted flag change.
8548 (check_mem_read, check_mem_write): Skip breakpoint types other
8549 than software breakpoints. Adjust to inserted flag change.
8550 * mem-break.h (enum raw_bkpt_type): New enum.
8551 (raw_breakpoint, struct process_info): Forward declare.
8552 (Z_packet_to_target_hw_bp_type): Delete declaration.
8553 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8554 (set_gdb_breakpoint, delete_gdb_breakpoint)
8555 (clear_breakpoint_conditions): New declarations.
8556 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8557 (breakpoint_inserted_here): Update comment.
8558 (add_breakpoint_condition, add_breakpoint_commands): Replace
8559 address parameter with a breakpoint pointer parameter.
8560 (gdb_breakpoint_here): Update comment.
8561 (delete_gdb_breakpoint_at): Delete.
8562 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8563 * server.c (process_point_options): Take a struct breakpoint
8564 pointer instead of an address. Adjust.
8565 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8566 delete_gdb_breakpoint.
8567 * spu-low.c (spu_target_ops): Install NULL as
8568 supports_z_point_type method.
8569 * target.h: Include mem-break.h.
8570 (struct target_ops) <prepare_to_access_memory>: Update comment.
8571 <supports_z_point_type>: New field.
8572 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8573 instead of a char. Also take a raw breakpoint pointer.
8574 * win32-arm-low.c (the_low_target): Install NULL as
8575 supports_z_point_type.
8576 * win32-i386-low.c (i386_supports_z_point_type): New function.
8577 (i386_insert_point, i386_remove_point): Adjust to new interface.
8578 (the_low_target): Install i386_supports_z_point_type.
8579 * win32-low.c (win32_supports_z_point_type): New function.
8580 (win32_insert_point, win32_remove_point): Adjust to new interface.
8581 (win32_target_ops): Install win32_supports_z_point_type.
8582 * win32-low.h (struct win32_target_ops):
8583 <supports_z_point_type>: New method.
8584 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8585 instead of a char. Also take a raw breakpoint pointer.
8586
8587 2014-05-20 Pedro Alves <palves@redhat.com>
8588
8589 * mem-break.h: Include break-common.h.
8590 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8591 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8592 (Z_packet_to_target_hw_bp_type): New declaration.
8593 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8594 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8595 (Z_PACKET_ACCESS_WP): Delete macros.
8596 (Z_packet_to_hw_type): Delete function.
8597 * i386-low.h: Don't include break-common.h here.
8598 (Z_packet_to_hw_type): Delete declaration.
8599 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8600 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8601 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8602 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8603 * linux-aarch64-low.c: Don't include break-common.h here.
8604 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8605 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8606 (Z_packet_to_target_hw_bp_type): Delete function.
8607 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8608 function.
8609 (mips_insert_point, mips_remove_point): Use
8610 Z_packet_to_target_hw_bp_type.
8611
8612 2014-05-20 Pedro Alves <palves@redhat.com>
8613
8614 * linux-aarch64-low.c: Include break-common.h.
8615 (enum target_point_type): Delete.
8616 (Z_packet_to_point_type): Rename to ...
8617 (Z_packet_to_target_hw_bp_type): ... this, and return a
8618 target_hw_bp_type instead.
8619 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8620 instead of an enum target_point_type.
8621 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8622 breakpoint type.
8623 (aarch64_dr_state_insert_one_point)
8624 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8625 (aarch64_handle_aligned_watchpoint)
8626 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8627 Take an enum target_hw_bp_type instead of an enum
8628 target_point_type.
8629 (aarch64_supports_z_point_type): New function.
8630 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8631 use Z_packet_to_target_hw_bp_type.
8632
8633 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8634
8635 * configure.ac: Only use -Werror by default when DEVELOPMENT
8636 is true.
8637 * configure: Regenerate.
8638
8639 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8640
8641 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8642 * linux-x86-low.c (X86_64_USER_REGS): New.
8643 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8644
8645 2014-04-28 Yao Qi <yao@codesourcery.com>
8646
8647 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8648 name.
8649
8650 2014-04-25 Pedro Alves <palves@redhat.com>
8651
8652 PR server/16255
8653 * linux-low.c (linux_attach_fail_reason_string): New function.
8654 (linux_attach_lwp): Delete.
8655 (linux_attach_lwp_1): Rename to ...
8656 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8657 argument. Remove "initial" parameter. Return int instead of
8658 void. Don't error or warn here.
8659 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8660 failure to attach to the tgid. Call warning when failing to
8661 attach to an lwp.
8662 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8663 argument. Remove "initial" parameter. Return int instead of
8664 void. Don't error or warn here.
8665 (linux_attach_fail_reason_string): New declaration.
8666 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8667 interface change. Use linux_attach_fail_reason_string.
8668
8669 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8670 Walfred Tedeschi <walfred.tedeschi@intel.com>
8671
8672 * Makefile.in: Added rules to handle new files
8673 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8674 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8675 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8676 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8677 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8678 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8679 x32-avx512-linux.o.
8680 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8681 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8682 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8683 i386/x32-avx512.xml.
8684 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8685 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8686 i386/x32-avx512-linux.xml.
8687 * i387-fp.c (num_avx512_k_registers): New constant for number
8688 of K registers.
8689 (num_avx512_zmmh_low_registers): New constant for number of
8690 lower ZMM registers (0-15).
8691 (num_avx512_zmmh_high_registers): New constant for number of
8692 higher ZMM registers (16-31).
8693 (num_avx512_ymmh_registers): New contant for number of higher
8694 YMM registers (ymm16-31 added by avx521 on x86_64).
8695 (num_avx512_xmm_registers): New constant for number of higher
8696 XMM registers (xmm16-31 added by AVX512 on x86_64).
8697 (struct i387_xsave): Add space for AVX512 registers.
8698 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8699 Add code to handle AVX512 registers.
8700 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8701 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8702 prototypei from generated file.
8703 (tdesc_amd64_avx512_linux): Likewise.
8704 (init_registers_x32_avx512_linux): Likewise.
8705 (tdesc_x32_avx512_linux): Likewise.
8706 (init_registers_i386_avx512_linux): Likewise.
8707 (tdesc_i386_avx512_linux): Likewise.
8708 (x86_64_regmap): Add AVX512 registers.
8709 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8710 mask.
8711 (initialize_low_arch): Add code to initialize AVX512 registers.
8712
8713 2014-04-23 Pedro Alves <palves@redhat.com>
8714
8715 * mem-break.c (find_gdb_breakpoint_at): Make static.
8716 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8717
8718 2014-04-23 Pedro Alves <palves@redhat.com>
8719
8720 * i386-low.c: Don't include break-common.h here.
8721 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8722 prototype to take target_hw_bp_type as argument instead of a Z
8723 packet char.
8724 * i386-low.h: Include break-common.h here.
8725 (Z_packet_to_hw_type): Declare.
8726 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8727 prototypes.
8728 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8729 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8730 (x86_remove_point): Convert the packet number to a
8731 target_hw_bp_type before calling i386_low_remove_watchpoint.
8732 * win32-i386-low.c (i386_insert_point): Convert the packet number
8733 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8734 (i386_remove_point): Convert the packet number to a
8735 target_hw_bp_type before calling i386_low_remove_watchpoint.
8736
8737 2014-04-23 Pedro Alves <palves@redhat.com>
8738
8739 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8740
8741 2014-04-10 Pedro Alves <palves@redhat.com>
8742
8743 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8744 Check if the condition or command is NULL before checking if the
8745 breakpoint is known. On success, return true.
8746 * mem-break.h (add_breakpoint_condition): Document return.
8747 (add_breakpoint_commands): Add describing comment.
8748 * server.c (skip_to_semicolon): New function.
8749 (process_point_options): Use it.
8750
8751 2014-04-09 Pedro Alves <palves@redhat.com>
8752
8753 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8754 to lwpid_of.
8755
8756 2014-02-27 Pedro Alves <palves@redhat.com>
8757
8758 PR 12702
8759 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8760 macros.
8761 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8762 output.
8763 (last_thread_of_process_p): Take a PID argument instead of a
8764 thread pointer.
8765 (linux_wait_for_lwp): Delete.
8766 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8767 functions.
8768 (linux_low_filter_event): New function, party factored out from
8769 linux_wait_for_event.
8770 (linux_wait_for_event): Rename to ...
8771 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8772 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8773 sigsuspend. Check for zombie leaders.
8774 (linux_wait_for_event): Reimplement as wrapper around
8775 linux_wait_for_event_filtered.
8776 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8777 a normal or signal exit is seen, it's the whole process exiting.
8778 (wait_for_sigstop): No longer a for_each_inferior callback.
8779 Rewrite on top of linux_wait_for_event_filtered.
8780 (stop_all_lwps): Call wait_for_sigstop directly.
8781 * server.c (resume, handle_target_event): Handle
8782 TARGET_WAITKIND_NO_RESUMED.
8783
8784 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8785
8786 * win32-low.c (psapi_get_dll_name,
8787 * win32_CreateToolhelp32Snapshot): Delete.
8788 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8789 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8790 Delete.
8791 (handle_load_dll): Add function description.
8792 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8793
8794 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8795
8796 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8797 Add comment.
8798 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8799 base address when calling win32_add_one_solib.
8800 (handle_load_dll): Delete local variable load_addr.
8801 Remove 0x1000 offset applied to DLL base address when calling
8802 win32_add_one_solib.
8803 (handle_unload_dll): Add comment.
8804
8805 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8806
8807 * win32-low.c (win32_add_all_dlls): Renames
8808 win32_ensure_ntdll_loaded. Rewrite function documentation.
8809 Adjust implementation to always load all DLLs.
8810 Add 0x1000 offset to DLL base address when calling
8811 win32_add_one_solib.
8812 (child_initialization_done): New static global.
8813 (do_initial_child_stuff): Set child_initialization_done to
8814 zero during child initialization, and 1 after. Replace call
8815 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8816 Add comment.
8817 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8818 (handle_unload_dll): Add function documentation.
8819 (get_child_debug_event): Ignore load and unload DLL events
8820 during child initialization.
8821
8822 2014-02-20 Doug Evans <dje@google.com>
8823
8824 Remove global all_lwps.
8825 * inferiors.h (ptid_of): Move here from linux-low.h.
8826 (pid_of, lwpid_of): Ditto.
8827 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8828 parameter is a struct thread_info * now.
8829 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8830 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8831 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8832 directly.
8833 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8834 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8835 * linux-arm-low.c (update_registers_callback): Update, "entry"
8836 parameter is a struct thread_info * now.
8837 Fetch lwpid from current_inferior directly.
8838 (arm_insert_point): Pass &all_threads to find_inferior instead of
8839 &all_lwps.
8840 (arm_remove_point): Ditto.
8841 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8842 (arm_prepare_to_resume): Fetch pid from thread.
8843 (arm_read_description): Fetch lwpid from current_inferior directly.
8844 * linux-low.c (all_lwps): Delete.
8845 (delete_lwp): Delete call to remove_inferior.
8846 (handle_extended_wait): Fetch lwpid from thread.
8847 (add_lwp): Don't set lwp->entry.id. Remove call to
8848 add_inferior_to_list.
8849 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8850 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8851 (kill_one_lwp_callback): Ditto.
8852 (linux_kill): Don't dereference NULL pointer.
8853 Fetch ptid,lwpid from thread.
8854 (get_detach_signal): Fetch ptid from thread.
8855 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8856 Simplify call to regcache_invalidate_thread.
8857 (delete_lwp_callback): Update, "entry" parameter is a
8858 struct thread_info * now. Fetch pid from thread.
8859 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8860 (status_pending_p_callback): Update, "entry" parameter is a
8861 struct thread_info * now. Fetch ptid from thread.
8862 (find_lwp_pid): Update, "entry" parameter is a
8863 struct thread_info * now.
8864 (linux_wait_for_lwp): Fetch pid from thread.
8865 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8866 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8867 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8868 (dequeue_one_deferred_signal): Ditto.
8869 (cancel_breakpoint): Fetch ptid from current_inferior.
8870 (linux_wait_for_event): Pass &all_threads to find_inferior,
8871 not &all_lwps. Fetch ptid, lwpid from thread.
8872 (count_events_callback): Update, "entry" parameter is a
8873 struct thread_info * now.
8874 (select_singlestep_lwp_callback): Ditto.
8875 (select_event_lwp_callback): Ditto.
8876 (cancel_breakpoints_callback): Ditto.
8877 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8878 not &all_lwps.
8879 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8880 (unsuspend_one_lwp): Update, "entry" parameter is a
8881 struct thread_info * now.
8882 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8883 not &all_lwps.
8884 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8885 Fetch lwpid from thread, not lwp.
8886 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8887 Pass &all_threads to find_inferior, not &all_lwps.
8888 (send_sigstop): Fetch lwpid from thread, not lwp.
8889 (send_sigstop_callback): Update, "entry" parameter is a
8890 struct thread_info * now.
8891 (suspend_and_send_sigstop_callback): Ditto.
8892 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8893 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8894 struct thread_info * now.
8895 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8896 from thread, lwp.
8897 (lwp_running): Update, "entry" parameter is a
8898 struct thread_info * now.
8899 (stop_all_lwps): Fetch ptid from thread.
8900 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8901 (linux_resume_one_lwp): Fetch lwpid from thread.
8902 (linux_set_resume_request): Update, "entry" parameter is a
8903 struct thread_info * now. Fetch pid, lwpid from thread.
8904 (resume_status_pending_p): Update, "entry" parameter is a
8905 struct thread_info * now.
8906 (need_step_over_p): Ditto. Fetch lwpid from thread.
8907 (start_step_over): Fetch lwpid from thread.
8908 (linux_resume_one_thread): Update, "entry" parameter is a
8909 struct thread_info * now. Fetch lwpid from thread.
8910 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8911 (proceed_one_lwp): Update, "entry" parameter is a
8912 struct thread_info * now. Fetch lwpid from thread.
8913 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8914 struct thread_info * now.
8915 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8916 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8917 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8918 directly.
8919 (regsets_store_inferior_registers): Ditto.
8920 (fetch_register, store_register): Ditto.
8921 (linux_read_memory, linux_write_memory): Ditto.
8922 (linux_request_interrupt): Ditto.
8923 (linux_read_auxv): Ditto.
8924 (linux_xfer_siginfo): Ditto.
8925 (linux_qxfer_spu): Ditto.
8926 (linux_qxfer_libraries_svr4): Ditto.
8927 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8928 moved to inferiors.h.
8929 (get_lwp): Delete.
8930 (get_thread_lwp): Update.
8931 (struct lwp_info): Delete member "entry". Simplify comment for
8932 member "thread".
8933 (all_lwps): Delete.
8934 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8935 current_inferior directly.
8936 (update_watch_registers_callback): Update, "entry" parameter is a
8937 struct thread_info * now. Fetch pid from thread.
8938 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8939 (mips_insert_point): Fetch lwpid from current_inferior.
8940 Pass &all_threads to find_inferior, not &all_lwps.
8941 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8942 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8943 directly.
8944 (mips_stopped_data_address): Ditto.
8945 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8946 directly.
8947 * linux-tile-low.c (tile_arch_setup): Ditto.
8948 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8949 (update_debug_registers_callback): Update, "entry" parameter is a
8950 struct thread_info * now. Fetch pid from thread.
8951 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8952 Pass &all_threads to find_inferior, not &all_lwps.
8953 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8954 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8955 Pass &all_threads to find_inferior, not &all_lwps.
8956 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8957 (i386_dr_low_get_status): Ditto.
8958 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8959 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8960 (x86_linux_read_description): Ditto.
8961 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8962
8963 2014-02-20 Doug Evans <dje@google.com>
8964
8965 * inferiors.c (get_first_inferior): Fix buglet.
8966
8967 2014-02-19 Doug Evans <dje@google.com>
8968
8969 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8970 * inferiors.c (add_thread): Change result type to struct thread_info *.
8971 All callers updated.
8972 (add_lwp): Call add_thread here instead of in callers.
8973 All callers updated.
8974 * linux-low.h (get_lwp_thread): Rewrite.
8975 (struct lwp_info): New member "thread".
8976
8977 2014-02-19 Doug Evans <dje@google.com>
8978
8979 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8980 All callers updated.
8981
8982 2014-02-19 Doug Evans <dje@google.com>
8983
8984 * inferiors.c (add_thread): Fix whitespace.
8985
8986 2014-02-19 Doug Evans <dje@google.com>
8987
8988 * dll.c (clear_dlls): Replace accessing list implemention details
8989 with API function.
8990 * gdbthread.h (get_first_thread): Declare.
8991 * inferiors.c (for_each_inferior_with_data): New function.
8992 (get_first_thread): New function.
8993 (find_thread_ptid): Simplify.
8994 (get_first_inferior): New function.
8995 (clear_list): Delete.
8996 (one_inferior_p): New function.
8997 (clear_inferior_list): New function.
8998 (clear_inferiors): Update.
8999 * inferiors.h (for_each_inferior_with_data): Declare.
9000 (clear_inferior_list): Declare.
9001 (one_inferior_p): Declare.
9002 (get_first_inferior): Declare.
9003 * linux-low.c (linux_wait_for_event): Replace accessing list
9004 implemention details with API function.
9005 * server.c (target_running): Ditto.
9006 (accumulate_file_name_length): New function.
9007 (emit_dll_description): New function.
9008 (handle_qxfer_libraries): Replace accessing list implemention
9009 details with API function.
9010 (handle_qxfer_threads_worker): New function.
9011 (handle_qxfer_threads_proper): Replace accessing list implemention
9012 details with API function.
9013 (handle_query): Ditto.
9014 (visit_actioned_threads_callback_ftype): New typedef.
9015 (visit_actioned_threads_data): New struct.
9016 (visit_actioned_threads): Rewrite to be find_inferior callback.
9017 (resume): Call find_inferior.
9018 (handle_status): Replace accessing list implemention
9019 details with API function.
9020 (process_serial_event): Replace accessing list implemention details
9021 with API function.
9022 * target.c (set_desired_inferior): Replace accessing list implemention
9023 details with API function.
9024 * tracepoint.c (same_process_p): New function.
9025 (gdb_agent_about_to_close): Replace accessing list implemention
9026 details with API function.
9027 * win32-low.c (child_delete_thread): Replace accessing list
9028 implemention details with API function.
9029 (match_dll_by_basename): New function.
9030 (dll_is_loaded_by_basename): New function.
9031 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9032 details call to dll_is_loaded_by_basename.
9033
9034 2014-02-19 Doug Evans <dje@google.com>
9035
9036 * dll.h (struct dll_info): Add comment.
9037 * gdbthread.h (struct thread_info): Add comment.
9038 (current_ptid): Simplify.
9039 * inferiors.c (add_process): Update.
9040 (remove_process): Update.
9041 * inferiors.h (struct process_info): Rename member "head" to "entry".
9042 * linux-low.c (delete_lwp): Update.
9043 (add_lwp): Update.
9044 (last_thread_of_process_p): Update.
9045 (kill_one_lwp_callback, linux_kill): Update.
9046 (status_pending_p_callback): Update.
9047 (wait_for_sigstop): Update. Simplify read of ptid.
9048 (start_step_over): Update.
9049 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9050 (get_lwp_thread): Update.
9051 (struct lwp_info): Rename member "head" to "entry".
9052 * regcache.h (inferior_list_entry): Delete.
9053 * server.c (kill_inferior_callback): Update.
9054 (detach_or_kill_inferior_callback): Update.
9055 (print_started_pid): Update.
9056 (print_attached_pid): Update.
9057 (process_serial_event): Simplify read of ptid.
9058 * thread-db.c (thread_db_create_event): Update.
9059 (thread_db_get_tls_address): Update.
9060 * win32-low.c (current_inferior_ptid): Simplify.
9061
9062 2014-02-19 Tom Tromey <tromey@redhat.com>
9063
9064 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9065 argument.
9066 (target_supports_btrace): Update.
9067
9068 2014-02-14 Yao Qi <yao@codesourcery.com>
9069
9070 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9071 (rsp-low-ipa.o): New target.
9072
9073 2014-02-12 Tom Tromey <tromey@redhat.com>
9074
9075 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9076 convert_ascii_to_int.
9077 * regcache.c (registers_to_string): Likewise.
9078 * remote-utils.c (decode_M_packet): Likewise.
9079 * server.c (process_serial_event): Likewise.
9080
9081 2014-02-12 Tom Tromey <tromey@redhat.com>
9082
9083 * server.c (handle_query, handle_v_run): Use hex2bin, not
9084 unhexify.
9085 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9086
9087 2014-02-12 Tom Tromey <tromey@redhat.com>
9088
9089 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9090 convert_int_to_ascii.
9091 * regcache.c (registers_to_string, collect_register_as_string):
9092 Likewise.
9093 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9094 Likewise.
9095 * server.c (process_serial_event): Likewise.
9096 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9097 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9098
9099 2014-02-12 Tom Tromey <tromey@redhat.com>
9100
9101 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9102 bin2hex, not hexify.
9103 * tracepoint.c (cmd_qtstatus): Likewise.
9104
9105 2014-02-12 Tom Tromey <tromey@redhat.com>
9106
9107 * remote-utils.c (monitor_output): Pass explicit length to
9108 hexify.
9109
9110 2014-02-12 Tom Tromey <tromey@redhat.com>
9111
9112 * tracepoint.c: Include rsp-low.h.
9113 * server.c: Include rsp-low.h.
9114 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9115 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9116 declare.
9117 * remote-utils.c: Include rsp-low.h.
9118 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9119 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9120 (convert_int_to_ascii, convert_ascii_to_int): Move to
9121 common/rsp-low.c.
9122 * regcache.c: Include rsp-low.h.
9123 * ax.c: Include rsp-low.h.
9124 * Makefile.in (SFILES): Add common/rsp-low.c.
9125 (OBS): Add rsp-low.o.
9126 (rsp-low.o): New target.
9127
9128 2014-02-12 Tom Tromey <tromey@redhat.com>
9129
9130 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9131 Include print-utils.h.
9132 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9133 (plongest, thirty_two, phex_nz): Remove.
9134 * Makefile.in (SFILES): Add common/print-utils.c.
9135 (OBS): Add print-utils.o.
9136 (print-utils-ipa.o): New target.
9137 (print-utils.o): New target.
9138 (IPA_OBJS): Add print-utils-ipa.o.
9139
9140 2014-02-06 Tom Tromey <tromey@redhat.com>
9141
9142 * Makefile.in (SFILES): Fix indentation.
9143
9144 2014-02-05 Doug Evans <dje@google.com>
9145
9146 * linux-low.c (linux_wait_for_event): Improve comment.
9147 (linux_wait_1): Keep current_inferior in sync with event_child.
9148
9149 2014-01-22 Doug Evans <dje@google.com>
9150
9151 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9152
9153 2014-01-22 Doug Evans <dje@google.com>
9154
9155 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9156 * configure: Regenerate.
9157 * config.in: Regenerate.
9158 * Makefile.in (SFILES): Add debug.c.
9159 (OBS): Add debug.o.
9160 * debug.c: New file.
9161 * debug.h: New file.
9162 * linux-aarch64-low.c (*): Update all debugging printfs to use
9163 debug_printf instead of fprintf.
9164 * linux-arm-low.c (*): Ditto.
9165 * linux-cris-low.c (*): Ditto.
9166 * linux-crisv32-low.c (*): Ditto.
9167 * linux-m32r-low.c (*): Ditto.
9168 * linux-sparc-low.c (*): Ditto.
9169 * linux-x86.c (*): Ditto.
9170 * linux-low.c (*): Ditto.
9171 (linux_wait_1): Add calls to debug_enter, debug_exit.
9172 (linux_wait): Remove redundant debugging printf.
9173 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9174 (linux_resume, unstop_all_lwps): Ditto.
9175 * mem-break.c (*): Update all debugging printfs to use
9176 debug_printf instead of fprintf.
9177 * remote-utils.c (*): Ditto.
9178 * thread-db.c (*): Ditto.
9179 * server.c #include <ctype.h>, "gdb_vecs.h".
9180 (debug_threads): Moved to debug.c.
9181 (*): Update all debugging printfs to use debug_printf instead of
9182 fprintf.
9183 (start_inferior): Replace call to fflush with call to debug_flush.
9184 (monitor_show_help): Mention set debug-format.
9185 (parse_debug_format_options): New function.
9186 (handle_monitor_command): Handle "monitor set debug-format".
9187 (gdbserver_usage): Mention --debug-format.
9188 (main): Parse --debug-format.
9189 * server.h (debug_threads): Declaration moved to debug.h.
9190 #include "debug.h".
9191 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9192 trace_debug_1 that uses debug_printf.
9193 (tracepoint_look_up_symbols): Update all debugging printfs to use
9194 debug_printf instead of fprintf.
9195
9196 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9197
9198 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9199 sys/ptrace.h.
9200
9201 2014-01-17 Pedro Alves <palves@redhat.com>
9202
9203 PR build/16445
9204 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9205 defined after including gdb_proc_service.h.
9206
9207 2014-01-16 Doug Evans <dje@google.com>
9208
9209 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9210 (match_dll): Use it.
9211
9212 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9213
9214 * target.h (target_ops) <read_btrace>: Change parameters and
9215 return type to allow error reporting.
9216 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9217 trace reading errors on.
9218 * linux-low.c (linux_low_read_btrace): Pass trace reading
9219 errors on.
9220 (linux_low_disable_btrace): New.
9221
9222 2014-01-15 Doug Evans <dje@google.com>
9223
9224 * inferiors.c (thread_id_to_gdb_id): Delete.
9225 * inferiors.h (thread_id_to_gdb_id): Delete.
9226
9227 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9228
9229 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9230 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9231 versions.
9232
9233 2014-01-08 Pedro Alves <palves@redhat.com>
9234
9235 * server.c (handle_status): Don't discard previous queued stop
9236 replies or thread's pending status here.
9237 (main) <disconnection>: Do it here instead.
9238
9239 2014-01-08 Pedro Alves <palves@redhat.com>
9240
9241 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9242 * server.c (visit_actioned_threads, handle_pending_status): New
9243 function.
9244 (handle_v_cont): Factor out parts to ...
9245 (resume): ... this new function. If in all-stop, and a thread
9246 being resumed has a pending status, report it without actually
9247 resuming.
9248 (myresume): Adjust to use the new 'resume' function.
9249 (clear_pending_status_callback, set_pending_status_callback)
9250 (find_status_pending_thread_callback): New functions.
9251 (handle_status): Handle the case of multiple threads having
9252 interesting statuses to report. Report threads' real last signal
9253 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9254 with an interesting thread to report the status for, instead of
9255 always reporting the status of the first thread.
9256
9257 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9258
9259 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9260 * gdbreplay.c (gdbreplay_version): Likewise.
9261
9262 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9263
9264 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9265 iov.iov_len with the real length in use.
9266
9267 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9268
9269 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9270 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9271 for all targets that use win32-low.c.
9272 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9273 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9274
9275 2013-12-13 Pedro Alves <palves@redhat.com>
9276
9277 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9278 if equal to TARGET_WAITKIND_LOADED.
9279 * win32-low.c (cached_status): New static global.
9280 (win32_wait): Add declaration.
9281 (do_initial_child_stuff): Flush all initial pending debug events
9282 up to the initial breakpoint.
9283 (win32_wait): If CACHED_STATUS was set, return that instead
9284 of doing a real wait. Remove the code resuming the execution
9285 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9286 during the initial phase. Also remove the code changing
9287 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9288 TARGET_WAITKIND_STOPPED.
9289
9290 2013-12-11 Yao Qi <yao@codesourcery.com>
9291
9292 * notif.c (handle_notif_ack): Return 0 if no notification
9293 matches.
9294
9295 2013-11-20 Doug Evans <dje@google.com>
9296
9297 * linux-low.c (linux_set_resume_request): Fix comment.
9298
9299 2013-11-20 Doug Evans <dje@google.com>
9300
9301 * linux-low.c (resume_status_pending_p): Tweak comment.
9302
9303 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9304
9305 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9306 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9307 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9308 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9309 (srv_amd64_regobj): Add amd64-mpx.o.
9310 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9311 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9312 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9313 * i387-fp.c (num_pl_bnd_register) Added constant.
9314 (num_pl_bnd_cfg_registers) Added constant.
9315 (struct i387_xsave) Added reserved area and MPX fields.
9316 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9317 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9318 function.
9319 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9320 (init_registers_amd64_mpx_linux): Declare new function.
9321 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9322 (x86_64_regmap): Add MPX registers.
9323 (x86_linux_read_description): Add MPX case.
9324 (initialize_low_arch): Initialize MPX targets.
9325
9326 2013-11-18 Tom Tromey <tromey@redhat.com>
9327
9328 * configure: Rebuild.
9329 * configure.ac: Don't check for stdlib.h.
9330 * gdbreplay.c: Unconditionally include stdlib.h.
9331
9332 2013-11-18 Tom Tromey <tromey@redhat.com>
9333
9334 * config.in: Rebuild.
9335 * configure: Rebuild.
9336 * configure.ac: Don't use AC_HEADER_DIRENT.
9337
9338 2013-11-18 Tom Tromey <tromey@redhat.com>
9339
9340 * server.h: Don't check HAVE_STRING_H.
9341 * gdbreplay.c: Don't check HAVE_STRING_H.
9342 * configure: Rebuild.
9343
9344 2013-11-18 Tom Tromey <tromey@redhat.com>
9345
9346 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9347 LIBGNU.
9348
9349 2013-11-08 Tom Tromey <tromey@redhat.com>
9350
9351 * configure, config.in: Rebuild.
9352 * configure.ac: Remove unused configury.
9353
9354 2013-11-08 Tom Tromey <tromey@redhat.com>
9355
9356 * acinclude.m4: Include common.m4, codeset.m4.
9357 * configure, config.in: Rebuild.
9358 * configure.ac: Use GDB_AC_COMMON.
9359
9360 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9361
9362 * linux-s390-low.c (HWCAP_S390_TE): New define.
9363 (s390_arch_setup): Consider the TE field in the HWCAP for
9364 determining 'have_regset_tdb'.
9365
9366 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9367
9368 PR gdb/16014
9369 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9370 call to sizeof.
9371
9372 2013-10-02 Pedro Alves <palves@redhat.com>
9373
9374 * server.c (process_serial_event): Don't output "GDBserver
9375 exiting" if GDB is connected through stdio.
9376 * target.c (mywait): Likewise, be silent if GDB is connected
9377 through stdio.
9378
9379 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9380
9381 * lynx-low.c (lynx_add_threads_after_attach): New function.
9382 (lynx_attach): Remove call to add_thread. Add call to
9383 lynx_add_threads_after_attach instead.
9384
9385 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9386
9387 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9388 * config.in, configure: Regenerated.
9389
9390 2013-09-18 Yao Qi <yao@codesourcery.com>
9391
9392 PR server/15959
9393 * server.c (start_inferior): Clear 'resume_info'.
9394
9395 2013-09-16 Jiong Wang <jiwang@tilera.com>
9396
9397 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9398 for each register.
9399
9400 2013-09-16 Jiong Wang <jiwang@tilera.com>
9401
9402 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9403 linux-tile-low.o to srv_tgtobj.
9404
9405 2013-09-16 Will Newton <will.newton@linaro.org>
9406
9407 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9408 out regs.
9409
9410 2013-09-06 Pedro Alves <palves@redhat.com>
9411
9412 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9413 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9414 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9415 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9416 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9417 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9418
9419 2013-09-06 Pedro Alves <palves@redhat.com>
9420
9421 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9422 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9423
9424 2013-09-06 Pedro Alves <palves@redhat.com>
9425
9426 * linux-amd64-ipa.c: Include tracepoint.h.
9427 * linux-i386-ipa.c: Include tracepoint.h.
9428
9429 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9430
9431 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9432 (ps_get_thread_area): New function.
9433
9434 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9435
9436 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9437 (initialize_low_arch): Call init_registers_crisv32 rather than
9438 init_register_crisv32.
9439
9440 2013-09-05 Pedro Alves <palves@redhat.com>
9441
9442 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9443 to ...
9444 * hostio.h: ... this new file.
9445 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9446 win32-low.c: Include hostio.h.
9447
9448 2013-09-05 Pedro Alves <palves@redhat.com>
9449
9450 * server.h (gdb_client_data, handler_func, callback_handler_func)
9451 (delete_file_handler, add_file_handler, append_callback_event)
9452 (delete_callback_event, start_event_loop, initialize_event_loop):
9453 Move to event-loop.h and include it.
9454 * event-loop.h: New file.
9455
9456 2013-09-05 Pedro Alves <palves@redhat.com>
9457
9458 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9459 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9460 (loaded_dll, unloaded_dll): Move to ...
9461 * dll.h: ... this new file.
9462 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9463
9464 2013-09-05 Pedro Alves <palves@redhat.com>
9465
9466 * server.h (current_process, get_thread_process, all_processes)
9467 (add_inferior_to_list, for_each_inferior, current_inferior)
9468 (remove_inferior, add_process, remove_process, find_process_pid)
9469 (have_started_inferiors_p, have_attached_inferiors_p)
9470 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9471 (clear_inferiors, find_inferior, find_inferior_id)
9472 (inferior_target_data, set_inferior_target_data)
9473 (inferior_regcache_data, set_inferior_regcache_data): Move to
9474 inferiors.h, and include it.
9475 * inferiors.h: New file.
9476
9477 2013-09-05 Pedro Alves <palves@redhat.com>
9478
9479 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9480 Move ...
9481 * ax.h: ... here.
9482
9483 2013-09-05 Pedro Alves <palves@redhat.com>
9484
9485 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9486 tracepoint.h.
9487 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9488 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9489 (handle_tracepoint_general_set, handle_tracepoint_query)
9490 (tracepoint_finished_step, tracepoint_was_hit)
9491 (release_while_stepping_state_list, current_traceframe)
9492 (in_readonly_region, traceframe_read_mem)
9493 (fetch_traceframe_registers, traceframe_read_sdata)
9494 (traceframe_read_info, struct fast_tpoint_collect_status)
9495 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9496 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9497 (supply_fast_tracepoint_registers)
9498 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9499 (ipa_tdesc, claim_trampoline_space)
9500 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9501 (agent_mem_read, agent_get_trace_state_variable_value)
9502 (agent_set_trace_state_variable_value, agent_tsv_read)
9503 (agent_mem_read_string, get_raw_reg_func_addr)
9504 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9505 * tracepoint.h: ... this new file.
9506
9507 2013-09-05 Pedro Alves <palves@redhat.com>
9508
9509 * server.h (perror_with_name, error, fatal, warning, paddress)
9510 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9511 include it.
9512 * utils.h: New file.
9513
9514 2013-09-05 Pedro Alves <palves@redhat.com>
9515
9516 * server.h (remote_debug, noack_mode, transport_is_reliable)
9517 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9518 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9519 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9520 (write_enn, initialize_async_io, enable_async_io)
9521 (disable_async_io, check_remote_input_interrupt_request)
9522 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9523 (dead_thread_notify, prepare_resume_reply)
9524 (decode_address_to_semicolon, decode_address, decode_m_packet)
9525 (decode_M_packet, decode_X_packet, decode_xfer_write)
9526 (decode_search_memory_packet, unhexify, hexify)
9527 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9528 (look_up_one_symbol, relocate_instruction)
9529 (monitor_output): Move to remote-utils.h, and include it.
9530 * remote-utils.h: New file.
9531
9532 2013-09-05 Pedro Alves <palves@redhat.com>
9533
9534 * server.h (_): Delete.
9535
9536 2013-09-02 Pedro Alves <palves@redhat.com>
9537
9538 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9539 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9540 allocated.
9541 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9542
9543 2013-09-02 Pierre Muller <muller@sourceware.org>
9544
9545 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9546 or WriteProcessMemory complete successfully and handle
9547 ERROR_PARTIAL_COPY error.
9548
9549 2013-09-02 Pedro Alves <palves@redhat.com>
9550
9551 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9552 error instead of EIO.
9553
9554 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9555
9556 PR server/15604
9557 * linux-low.c: Include filestuff.h.
9558 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9559 * lynx-low.c: Include filestuff.h.
9560 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9561 * server.c: Include filestuff.h.
9562 (main): Call notice_open_fds.
9563 * spu-low.c: Include filestuff.h.
9564 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9565
9566 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9567
9568 * Makefile.in: Explain why ../target and ../nat are not
9569 listed as include file search paths.
9570 (linux-waitpid.o): New object file rule.
9571 * configure.srv (srv_native_linux_obj): New variable.
9572 Replace all occurrences of linux native object files with
9573 $srv_native_linux_obj.
9574 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9575 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9576 (linux_enable_event_reporting): Remove declaration.
9577 (my_waitpid): Moved to common/linux-waitpid.c.
9578 (linux_wait_for_event): Pass ptid when calling
9579 linux_enable_event_reporting.
9580 (linux_supports_tracefork_flag): Remove.
9581 (linux_enable_event_reporting): Likewise.
9582 (linux_tracefork_grandchild): Remove.
9583 (STACK_SIZE): Moved to common/linux-ptrace.c.
9584 (linux_tracefork_child): Remove.
9585 (linux_test_for_tracefork): Remove.
9586 (linux_look_up_symbols): Call linux_supports_traceclone.
9587 (initialize_low): Remove call to linux_test_for_tracefork.
9588 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9589 common/linux-ptrace.h.
9590 (PTRACE_TYPE_ARG4): Likewise.
9591 Include linux-ptrace.h.
9592
9593 2013-08-21 Pedro Alves <palves@redhat.com>
9594
9595 * config.in: Renegerate.
9596
9597 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9598
9599 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9600 (SFILES): Remove $(srcdir)/common/target-common.c and
9601 add $(srcdir)/target/waitstatus.c.
9602 (OBS): Remove target-common.o and add waitstatus.o.
9603 (server_h): Remove $(srcdir)/../common/target-common.h and
9604 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9605 and $(srcdir)/../target/waitstatus.h.
9606 (target-common.o): Remove.
9607 (waitstatus.o): New target object file.
9608 * target.h: Do not include target-common.h and
9609 include target/resume.h, target/wait.h and
9610 target/waitstatus.h.
9611
9612 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9613
9614 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9615 to PTRACE_TYPE_ARG3.
9616 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9617 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9618 PTRACE_TYPE_ARG4.
9619 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9620 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9621
9622 2013-07-27 Jie Zhang <jie@codesourcery.com>
9623 Daniel Jacobowitz <dan@codesourcery.com>
9624 Yao Qi <yao@codesourcery.com>
9625
9626 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9627 (mips-linux-watch.o): New rule.
9628 (mips_linux_watch_h): New variable.
9629 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9630 srv_tgtobj.
9631 * linux-mips-low.c: Include mips-linux-watch.h.
9632 (struct arch_process_info, struct arch_lwp_info): New.
9633 (update_watch_registers_callback): New function.
9634 (mips_linux_new_process, mips_linux_new_thread) New functions.
9635 (mips_linux_prepare_to_resume, mips_insert_point): New
9636 functions.
9637 (mips_remove_point, mips_stopped_by_watchpoint): New
9638 functions.
9639 (rsp_bp_type_to_target_hw_bp_type): New function.
9640 (mips_stopped_data_address): New function.
9641 (the_low_target): Add watchpoint support functions.
9642
9643 2013-07-27 Yao Qi <yao@codesourcery.com>
9644
9645 * i386-low.c: Include break-common.h.
9646 (enum target_hw_bp_type): Remove.
9647
9648 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9649
9650 * Makefile.in (SFILES): /common/target-common.c.
9651 (OBS): Add target-common.o.
9652 (server_h): Add $(srcdir)/../common/target-common.h.
9653 (target-common.o): New target.
9654 * server.c (queue_stop_reply_callback): Free
9655 status string after use.
9656 * target.c (target_waitstatus_to_string): Remove.
9657 * target.h: Include target-common.h.
9658 (resume_kind): Likewise.
9659 (target_waitkind): Likewise.
9660 (target_waitstatus): Likewise.
9661 (TARGET_WNOHANG): Likewise.
9662
9663 2013-07-04 Yao Qi <yao@codesourcery.com>
9664
9665 * Makefile.in (host_alias): Use @host_noncanonical@.
9666 (target_alias): Use @target_noncanonical@.
9667 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9668 ACX_NONCANONICAL_HOST.
9669 * configure: Regenerated.
9670
9671 Revert:
9672 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9673
9674 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9675 * configure: Rebuild.
9676 * Makefile.in (version_host, version_target): Get from configure.
9677 (version.c): Use $(version_host) and $(version_target).
9678
9679 2013-07-03 Pedro Alves <palves@redhat.com>
9680
9681 * Makefile.in (config.status): Depend on development.sh.
9682 * acinclude.m4: Include libmcheck.m4.
9683 * configure: Regenerate.
9684
9685 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9686
9687 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9688 attribute inside the parentheses.
9689 (winapi_DebugSetProcessKillOnExit): Ditto.
9690 (winapi_DebugBreakProcess): Ditto.
9691 (winapi_GenerateConsoleCtrlEvent): Ditto.
9692
9693 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9694
9695 * notif.h (notif_event): Add a dummy member to avoid compiler
9696 errors.
9697
9698 2013-07-01 Pedro Alves <palves@redhat.com>
9699
9700 * hostio.c (HOSTIO_PATH_MAX): Define.
9701 (require_filename, handle_open, handle_unlink, handle_readlink):
9702 Use it.
9703
9704 2013-07-01 Pedro Alves <palves@redhat.com>
9705
9706 * server.h: Include "pathmax.h".
9707 * linux-low.c: Don't include sys/param.h.
9708 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9709 MAXPATHLEN.
9710 * win32-low.c: Don't include sys/param.h.
9711 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9712
9713 2013-07-01 Pedro Alves <palves@redhat.com>
9714
9715 * event-loop.c: Don't check HAVE_UNISTD_H before including
9716 <unistd.h>.
9717 * gdbreplay.c: Likewise.
9718 * remote-utils.c: Likewise.
9719 * server.c: Likewise.
9720 * configure.ac: Don't check for unistd.h.
9721 * configure: Regenerate.
9722
9723 2013-06-28 Tom Tromey <tromey@redhat.com>
9724
9725 * Makefile.in (version.c): Use version.in, not
9726 common/version.in.
9727
9728 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9729
9730 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9731 * configure: Rebuild.
9732 * Makefile.in (version_host, version_target): Get from configure.
9733 (version.c): Use $(version_host) and $(version_target).
9734
9735 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9736
9737 Fix trace-status to output user name without trailing colon.
9738 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9739
9740 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9741
9742 Fix trace-status to output proper start-time and stop-time.
9743 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9744 output start time and stop time in hex as gdb expects.
9745
9746 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9747
9748 * tracepoint.c (build_traceframe_info_xml): Output trace state
9749 variables present in the trace buffer.
9750
9751 2013-06-24 Tom Tromey <tromey@redhat.com>
9752
9753 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9754 create-version.sh.
9755 (version.o): Remove.
9756 * gdbreplay.c: Include version.h.
9757 (version, host_name): Don't declare.
9758 * server.h: Include version.h.
9759 (version, host_name): Don't declare.
9760
9761 2013-06-12 Pedro Alves <palves@redhat.com>
9762
9763 * linux-x86-low.c (linux_is_elf64): Delete global.
9764 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9765 with local linux_pid_exe_is_elf_64_file use.
9766
9767 2013-06-11 Pedro Alves <palves@redhat.com>
9768
9769 * linux-low.c (regset_disabled, disable_regset): New functions.
9770 (regsets_fetch_inferior_registers)
9771 (regsets_store_inferior_registers): Use them.
9772 (initialize_regsets_info); Don't allocate the disabled_regsets
9773 array here.
9774 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9775 comment.
9776
9777 2013-06-11 Pedro Alves <palves@redhat.com>
9778
9779 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9780 xmalloc.
9781
9782 2013-06-11 Pedro Alves <palves@redhat.com>
9783
9784 * linux-x86-low.c (initialize_low_arch): Call
9785 init_registers_x32_avx_linux.
9786
9787 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9788
9789 Fix compatibility with Android Bionic.
9790 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9791 it is not empty.
9792
9793 2013-06-07 Pedro Alves <palves@redhat.com>
9794
9795 PR server/14823
9796 * Makefile.in (OBS): Add tdesc.o.
9797 (IPA_OBJS): Add tdesc-ipa.o.
9798 (tdesc-ipa.o): New rule.
9799 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9800 interface.
9801 * linux-low.c (new_inferior): Delete.
9802 (disabled_regsets, num_regsets): Delete.
9803 (linux_add_process): Adjust to set the new per-process
9804 new_inferior flag.
9805 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9806 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9807 was a stop. When calling arch_setup, switch the current inferior
9808 to the thread that got an event.
9809 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9810 (regsets_fetch_inferior_registers)
9811 (regsets_store_inferior_registers): New regsets_info parameter.
9812 Adjust to use it.
9813 (linux_register_in_regsets): New regs_info parameter. Adjust to
9814 use it.
9815 (register_addr, fetch_register, store_register): New usrregs_info
9816 parameter. Adjust to use it.
9817 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9818 parameter regs_info. Adjust to use it.
9819 (linux_fetch_registers): Get the current inferior's regs_info, and
9820 adjust to use it.
9821 (linux_store_registers): Ditto.
9822 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9823 (initialize_low): Don't initialize the target_regsets here. Call
9824 initialize_low_arch.
9825 * linux-low.h (target_regsets): Delete declaration.
9826 (struct regsets_info): New.
9827 (struct usrregs_info): New.
9828 (struct regs_info): New.
9829 (struct process_info_private) <new_inferior>: New field.
9830 (struct linux_target_ops): Delete the num_regs, regmap, and
9831 regset_bitmap fields. New field regs_info.
9832 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9833 * i387-fp.c (num_xmm_registers): Delete.
9834 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9835 calls to new interface.
9836 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9837 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9838 Infer the number of xmm registers from the regcache's target
9839 description.
9840 * i387-fp.h (num_xmm_registers): Delete.
9841 * inferiors.c (add_thread): Don't install the thread's regcache
9842 here.
9843 * proc-service.c (gregset_info): Fetch the current inferior's
9844 regs_info. Adjust to use it.
9845 * regcache.c: Include tdesc.h.
9846 (register_bytes, reg_defs, num_registers)
9847 (gdbserver_expedite_regs): Delete.
9848 (get_thread_regcache): If the thread doesn't have a regcache yet,
9849 create one, instead of aborting gdbserver.
9850 (regcache_invalidate_one): Rename to ...
9851 (regcache_invalidate_thread): ... this.
9852 (regcache_invalidate_one): New.
9853 (regcache_invalidate): Only invalidate registers of the current
9854 process.
9855 (init_register_cache): Add target_desc parameter, and use it.
9856 (new_register_cache): Ditto. Assert the target description has a
9857 non zero registers_size.
9858 (regcache_cpy): Add assertions. Adjust.
9859 (realloc_register_cache, set_register_cache): Delete.
9860 (registers_to_string, registers_from_string): Adjust.
9861 (find_register_by_name, find_regno, find_register_by_number)
9862 (register_cache_size): Add target_desc parameter, and use it.
9863 (free_register_cache_thread, free_register_cache_thread_one)
9864 (regcache_release, register_cache_size): New.
9865 (register_size): Add target_desc parameter, and use it.
9866 (register_data, supply_register, supply_register_zeroed)
9867 (supply_regblock, supply_register_by_name, collect_register)
9868 (collect_register_as_string, collect_register_by_name): Adjust.
9869 * regcache.h (struct target_desc): Forward declare.
9870 (struct regcache) <tdesc>: New field.
9871 (init_register_cache, new_register_cache): Add target_desc
9872 parameter.
9873 (regcache_invalidate_thread): Declare.
9874 (regcache_invalidate_one): Delete declaration.
9875 (regcache_release): Declare.
9876 (find_register_by_number, register_cache_size, register_size)
9877 (find_regno): Add target_desc parameter.
9878 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9879 declarations.
9880 * remote-utils.c: Include tdesc.h.
9881 (outreg, prepare_resume_reply): Adjust.
9882 * server.c: Include tdesc.h.
9883 (gdbserver_xmltarget): Delete declaration.
9884 (get_features_xml, process_serial_event): Adjust.
9885 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9886 declare.
9887 (struct process_info) <tdesc>: New field.
9888 (ipa_tdesc): Declare.
9889 * tdesc.c: New file.
9890 * tdesc.h: New file.
9891 * tracepoint.c: Include tdesc.h.
9892 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9893 (get_context_regcache): Adjust to pass ipa_tdesc down.
9894 (do_action_at_tracepoint): Adjust to get the register cache size
9895 from the context regcache's description.
9896 (traceframe_walk_blocks): Adjust to get the register cache size
9897 from the current trace frame's description.
9898 (traceframe_get_pc): Adjust to get current trace frame's
9899 description and pass it down.
9900 (gdb_collect): Adjust to get the register cache size from the
9901 IPA's description.
9902 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9903 (gdbserver_xmltarget): Delete.
9904 (initialize_low_tracepoint): Set the ipa's target description.
9905 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9906 (initialize_low_tracepoint): Set the ipa's target description.
9907 * linux-x86-low.c: Include tdesc.h.
9908 [__x86_64__] (is_64bit_tdesc): New.
9909 (ps_get_thread_area, x86_get_thread_area): Use it.
9910 (i386_cannot_store_register): Rename to ...
9911 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9912 (i386_cannot_fetch_register): Rename to ...
9913 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9914 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9915 to new interface.
9916 (target_regsets): Rename to ...
9917 (x86_regsets): ... this.
9918 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9919 interface.
9920 (x86_siginfo_fixup): Use is_64bit_tdesc.
9921 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9922 (tdesc_x32_avx_linux, tdesc_x32_linux)
9923 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9924 Declare.
9925 (x86_linux_update_xmltarget): Delete.
9926 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9927 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9928 (AMD64_LINUX_USER64_CS): New.
9929 (x86_linux_read_description): New, based on
9930 x86_linux_update_xmltarget.
9931 (same_process_callback): New.
9932 (x86_arch_setup_process_callback): New.
9933 (x86_linux_update_xmltarget): New.
9934 (x86_regsets_info): New.
9935 (amd64_linux_regs_info): New.
9936 (i386_linux_usrregs_info): New.
9937 (i386_linux_regs_info): New.
9938 (x86_linux_regs_info): New.
9939 (x86_arch_setup): Reimplement.
9940 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9941 (x86_emit_ops): Ditto.
9942 (the_low_target): Adjust. Install x86_linux_regs_info,
9943 x86_cannot_fetch_register, and x86_cannot_store_register.
9944 (initialize_low_arch): New.
9945 * linux-ia64-low.c (tdesc_ia64): Declare.
9946 (ia64_fetch_register): Adjust.
9947 (ia64_usrregs_info, regs_info): New globals.
9948 (ia64_regs_info): New function.
9949 (the_low_target): Adjust.
9950 (initialize_low_arch): New function.
9951 * linux-sparc-low.c (tdesc_sparc64): Declare.
9952 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9953 Adjust.
9954 (sparc_arch_setup): New function.
9955 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9956 (the_low_target): Adjust.
9957 (initialize_low_arch): New function.
9958 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9959 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9960 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9961 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9962 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9963 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9964 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9965 (tdesc_powerpc_isa205_vsx64l): Declare.
9966 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9967 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9968 (ppc_set_pc, ppc_get_hwcap): Adjust.
9969 (ppc_usrregs_info): Forward declare.
9970 (!__powerpc64__) ppc_regmap_adjusted: New global.
9971 (ppc_arch_setup): Adjust to the current process'es target
9972 description.
9973 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9974 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9975 (ppc_store_evrregset): Adjust.
9976 (target_regsets): Rename to ...
9977 (ppc_regsets): ... this, and make static.
9978 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9979 (ppc_regs_info): New function.
9980 (the_low_target): Adjust.
9981 (initialize_low_arch): New function.
9982 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9983 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9984 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9985 (tdesc_s390x_linux64v2): Declare.
9986 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9987 (s390_fill_gregset, s390_store_last_break): Adjust.
9988 (target_regsets): Rename to ...
9989 (s390_regsets): ... this, and make static.
9990 (s390_get_pc, s390_set_pc): Adjust.
9991 (s390_get_hwcap): New target_desc parameter, and use it.
9992 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9993 (s390_arch_setup): Adjust to set the current process'es target
9994 description. Don't adjust the regmap.
9995 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9996 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9997 (regs_info_3264): New globals.
9998 (s390_regs_info): New function.
9999 (the_low_target): Adjust.
10000 (initialize_low_arch): New function.
10001 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10002 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10003 [__mips64] (init_registers_mips_linux)
10004 (init_registers_mips_dsp_linux): Delete defines.
10005 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10006 (have_dsp): New global.
10007 (mips_read_description): New, based on mips_arch_setup.
10008 (mips_arch_setup): Reimplement.
10009 (get_usrregs_info): New function.
10010 (mips_cannot_fetch_register, mips_cannot_store_register)
10011 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10012 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10013 (target_regsets): Rename to ...
10014 (mips_regsets): ... this, and make static.
10015 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10016 (dsp_regs_info, regs_info): New globals.
10017 (mips_regs_info): New function.
10018 (the_low_target): Adjust.
10019 (initialize_low_arch): New function.
10020 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10021 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10022 Declare.
10023 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10024 (arm_read_description): New, with bits factored from
10025 arm_arch_setup.
10026 (arm_arch_setup): Reimplement.
10027 (target_regsets): Rename to ...
10028 (arm_regsets): ... this, and make static.
10029 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10030 (arm_regs_info): New function.
10031 (the_low_target): Adjust.
10032 (initialize_low_arch): New function.
10033 * linux-m68k-low.c (tdesc_m68k): Declare.
10034 (target_regsets): Rename to ...
10035 (m68k_regsets): ... this, and make static.
10036 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10037 (m68k_regs_info): New function.
10038 (m68k_arch_setup): New function.
10039 (the_low_target): Adjust.
10040 (initialize_low_arch): New function.
10041 * linux-sh-low.c (tdesc_sharch): Declare.
10042 (target_regsets): Rename to ...
10043 (sh_regsets): ... this, and make static.
10044 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10045 (sh_regs_info, sh_arch_setup): New functions.
10046 (the_low_target): Adjust.
10047 (initialize_low_arch): New function.
10048 * linux-bfin-low.c (tdesc_bfin): Declare.
10049 (bfin_arch_setup): New function.
10050 (bfin_usrregs_info, regs_info): New globals.
10051 (bfin_regs_info): New function.
10052 (the_low_target): Adjust.
10053 (initialize_low_arch): New function.
10054 * linux-cris-low.c (tdesc_cris): Declare.
10055 (cris_arch_setup): New function.
10056 (cris_usrregs_info, regs_info): New globals.
10057 (cris_regs_info): New function.
10058 (the_low_target): Adjust.
10059 (initialize_low_arch): New function.
10060 * linux-cris-low.c (tdesc_crisv32): Declare.
10061 (cris_arch_setup): New function.
10062 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10063 (cris_regs_info): New function.
10064 (the_low_target): Adjust.
10065 (initialize_low_arch): New function.
10066 * linux-m32r-low.c (tdesc_m32r): Declare.
10067 (m32r_arch_setup): New function.
10068 (m32r_usrregs_info, regs_info): New globals.
10069 (m32r_regs_info): Adjust.
10070 (initialize_low_arch): New function.
10071 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10072 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10073 (tic6x_usrregs_info): Forward declare.
10074 (tic6x_read_description): New function, based on ...
10075 (tic6x_arch_setup): ... this. Reimplement.
10076 (target_regsets): Rename to ...
10077 (tic6x_regsets): ... this, and make static.
10078 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10079 (tic6x_regs_info): New function.
10080 (the_low_target): Adjust.
10081 (initialize_low_arch): New function.
10082 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10083 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10084 (target_regsets): Rename to ...
10085 (xtensa_regsets): ... this, and make static.
10086 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10087 globals.
10088 (xtensa_arch_setup, xtensa_regs_info): New functions.
10089 (the_low_target): Adjust.
10090 (initialize_low_arch): New function.
10091 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10092 (nios2_arch_setup): Set the current process'es tdesc.
10093 (target_regsets): Rename to ...
10094 (nios2_regsets): ... this.
10095 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10096 (nios2_regs_info): New function.
10097 (the_low_target): Adjust.
10098 (initialize_low_arch): New function.
10099 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10100 (aarch64_arch_setup): Set the current process'es tdesc.
10101 (target_regsets): Rename to ...
10102 (aarch64_regsets): ... this.
10103 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10104 (aarch64_regs_info): New function.
10105 (the_low_target): Adjust.
10106 (initialize_low_arch): New function.
10107 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10108 globals.
10109 (target_regsets): Rename to ...
10110 (tile_regsets): ... this.
10111 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10112 (tile_regs_info): New function.
10113 (tile_arch_setup): Set the current process'es tdesc.
10114 (the_low_target): Adjust.
10115 (initialize_low_arch): New function.
10116 * spu-low.c (tdesc_spu): Declare.
10117 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10118 * win32-arm-low.c (tdesc_arm): Declare.
10119 (arm_arch_setup): New function.
10120 (the_low_target): Install arm_arch_setup instead of
10121 init_registers_arm.
10122 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10123 (init_windows_x86): Rename to ...
10124 (i386_arch_setup): ... this. Set `win32_tdesc'.
10125 (the_low_target): Adjust.
10126 * win32-low.c (win32_tdesc): New global.
10127 (child_add_thread): Don't create the thread cache here.
10128 (do_initial_child_stuff): Set the new process'es tdesc.
10129 * win32-low.h (struct target_desc): Forward declare.
10130 (win32_tdesc): Declare.
10131 * lynx-i386-low.c (tdesc_i386): Declare global.
10132 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10133 * lynx-low.c (lynx_tdesc): New global.
10134 (lynx_add_process): Set the new process'es tdesc.
10135 * lynx-low.h (struct target_desc): Forward declare.
10136 (lynx_tdesc): Declare global.
10137 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10138 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10139 * nto-low.c (nto_tdesc): New global.
10140 (do_attach): Set the new process'es tdesc.
10141 * nto-low.h (struct target_desc): Forward declare.
10142 (nto_tdesc): Declare.
10143 * nto-x86-low.c (tdesc_i386): Declare.
10144 (nto_x86_arch_setup): Set `nto_tdesc'.
10145
10146 2013-06-04 Gary Benson <gbenson@redhat.com>
10147
10148 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10149 to qSupported response when appropriate.
10150 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10151 with nonzero-length annex.
10152 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10153 arguments supplied in annex.
10154
10155 2013-05-31 Doug Evans <dje@google.com>
10156
10157 PR server/15594
10158 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10159 64 bits in 64-cross-32 environment.
10160
10161 2013-05-28 Pedro Alves <palves@redhat.com>
10162
10163 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10164 (aarch64-without-fpu.c): Delete rule.
10165 * configure.srv (aarch64*-*-linux*): Remove references to
10166 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10167 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10168 declaration.
10169
10170 2013-05-24 Pedro Alves <palves@redhat.com>
10171
10172 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10173 instead of strchr/decode_address. Error if the range isn't split
10174 with a ','. Don't assume there's be a ':' in the action.
10175
10176 2013-05-23 Yao Qi <yao@codesourcery.com>
10177 Pedro Alves <palves@redhat.com>
10178
10179 * linux-low.c (lwp_in_step_range): New function.
10180 (linux_wait_1): If the thread was range stepping and stopped
10181 outside the stepping range, report the stop to GDB. Otherwise,
10182 continue stepping. Add range stepping debug output.
10183 (linux_set_resume_request): Copy the step range from the resume
10184 request to the lwp.
10185 (linux_supports_range_stepping): New.
10186 (linux_target_ops) <supports_range_stepping>: Set to
10187 linux_supports_range_stepping.
10188 * linux-low.h (struct linux_target_ops)
10189 <supports_range_stepping>: New field.
10190 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10191 * linux-x86-low.c (x86_supports_range_stepping): New.
10192 (the_low_target) <supports_range_stepping>: Set to
10193 x86_supports_range_stepping.
10194 * server.c (handle_v_cont): Handle 'r' action.
10195 (handle_v_requests): Append ";r" if the target supports range
10196 stepping.
10197 * target.h (struct thread_resume) <step_range_start,
10198 step_range_end>: New fields.
10199 (struct target_ops) <supports_range_stepping>:
10200 New field.
10201 (target_supports_range_stepping): New macro.
10202
10203 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10204
10205 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10206 confusion in comment.
10207
10208 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10209
10210 * lynx-low.c (struct process_info_private): New type.
10211 (lynx_add_process): New function.
10212 (lynx_create_inferior, lynx_attach): Replace calls to
10213 add_process by calls to lynx_add_process.
10214 (lynx_resume): If PTID is null, then try using
10215 current_process()->private->last_wait_event_ptid.
10216 Add comments.
10217 (lynx_clear_inferiors): Delete. The contents of that function
10218 has been inlined in lynx_mourn;
10219 (lynx_wait_1): Save the ptid in the process's private data.
10220 (lynx_mourn): Free the process' private data. Replace call
10221 to lynx_clear_inferiors by call to clear_inferiors.
10222
10223 2013-05-17 Yao Qi <yao@codesourcery.com>
10224
10225 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10226 the right place.
10227
10228 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10229
10230 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10231 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10232 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10233 PT_TEXT_END_ADDR guards. Update comments.
10234 (linux_target_op) <read_offsets>: Conditionally define to
10235 linux_read_offsets if the target is UCLIBC and if it defines
10236 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10237
10238 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10239 Andrew Jenner <andrew@codesourcery.com>
10240
10241 * Makefile.in (SFILES): Add linux-nios2-low.c.
10242 (clean): Add action to delete nios2-linux.c.
10243 (nios2-linux.c): New rule.
10244 * configure.srv: Add nios2*-*-linux*.
10245 * linux-nios2-low.c: New.
10246
10247 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10248
10249 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10250
10251 2013-04-25 Hui Zhu <hui@codesourcery.com>
10252
10253 PR gdb/15186
10254 * ax.c (ax_printf): Add fflush.
10255
10256 2013-04-22 Tom Tromey <tromey@redhat.com>
10257
10258 * Makefile.in (SFILES): Add filestuff.c.
10259 (OBS): Add filestuff.o.
10260 (filestuff.o): New target.
10261 * config.in, configure: Rebuild.
10262 * configure.ac: Check for fdwalk, pipe2.
10263
10264 2013-04-17 Pedro Alves <palves@redhat.com>
10265
10266 * configure.ac (USE_THREAD_DB): Delete variable.
10267 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10268 Don't AC_SUBST USE_THREAD_DB.
10269 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10270 * config.in, configure: Regenerate.
10271
10272 2013-04-16 Pedro Alves <palves@redhat.com>
10273
10274 * linux-low.h (struct lwp_info) <thread_known>: Move under
10275 the USE_THREAD_DB #ifdef.
10276
10277 2013-04-16 Pedro Alves <palves@redhat.com>
10278
10279 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10280 (linux-low.o): Delete rule.
10281 * linux-low.h: Always include "gdb_thread_db.h" instead of
10282 conditionally including thread_db.h.
10283 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10284 HAVE_THREAD_DB_H.
10285
10286 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10287
10288 * Makefile.in (install-only): Fix make install regression.
10289
10290 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10291
10292 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10293 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10294 installation.
10295 * gdbserver.1: Remove.
10296
10297 2013-03-22 Pedro Alves <palves@redhat.com>
10298
10299 * linux-low.c (handle_extended_wait): Don't call
10300 linux_enable_event_reporting.
10301
10302 2013-03-15 Tony Theodore <tonyt@logyst.com>
10303
10304 PR build/9098:
10305 * Makefile.in (SHELL): Use @SHELL@.
10306
10307 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10308
10309 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10310 compiler warning.
10311
10312 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10313
10314 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10315 Remove extraneous NULL element.
10316
10317 2013-03-13 Yao Qi <yao@codesourcery.com>
10318
10319 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10320 'V' block in trace frame.
10321
10322 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10323
10324 * target.h (struct target_ops): Add btrace ops.
10325 (target_supports_btrace): New macro.
10326 (target_enable_btrace): New macro.
10327 (target_disable_btrace): New macro.
10328 (target_read_btrace): New macro.
10329 * gdbthread.h (struct thread_info): Add btrace field.
10330 * server.c: Include btrace-common.h.
10331 (handle_btrace_general_set): New function.
10332 (handle_btrace_enable): New function.
10333 (handle_btrace_disable): New function.
10334 (handle_general_set): Call handle_btrace_general_set.
10335 (handle_qxfer_btrace): New function.
10336 (struct qxfer qxfer_packets[]): Add btrace entry.
10337 * inferiors.c (remove_thread): Disable btrace.
10338 * linux-low: Include linux-btrace.h.
10339 (linux_low_enable_btrace): New function.
10340 (linux_low_read_btrace): New function.
10341 (linux_target_ops): Add btrace ops.
10342 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10343 Add srv_linux_btrace=yes.
10344 (x86_64-*-linux*): Add linux-btrace.o.
10345 Add srv_linux_btrace=yes.
10346 * configure.ac: Define HAVE_LINUX_BTRACE.
10347 * config.in: Regenerated.
10348 * configure: Regenerated.
10349
10350 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10351
10352 * server.c (handle_qxfer): Preserve error message if -3 is
10353 returned.
10354 (qxfer): Document the -3 return value.
10355
10356 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10357
10358 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10359 (linux_btrace_h): New variable.
10360 (linux-btrace.o): New rule.
10361
10362 2013-03-08 Stan Shebs <stan@codesourcery.com>
10363 Hafiz Abid Qadeer <abidh@codesourcery.com>
10364
10365 * tracepoint.c (trace_buffer_size): New global.
10366 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10367 (init_trace_buffer): Change to one-argument function. Allocate
10368 trace buffer memory.
10369 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10370 handle QTBuffer:size packet.
10371 (cmd_bigqtbuffer_size): New function.
10372 (initialize_tracepoint): Call init_trace_buffer with
10373 DEFAULT_TRACE_BUFFER_SIZE.
10374 * server.c (handle_query): Add QTBuffer:size in the
10375 supported packets.
10376
10377 2013-03-07 Yao Qi <yao@codesourcery.com>
10378
10379 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10380 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10381 of -1.
10382 (cmd_qtsp): Adjust condition. Do post increment.
10383 Set cur_action and cur_step_action back to 0.
10384
10385 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10386
10387 PR server/15236
10388 * linux-low.c (linux_write_memory): Return early success if LEN is
10389 zero.
10390
10391 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10392
10393 * configure.srv: Add x86_64-*-cygwin* as target.
10394
10395 2013-02-28 Tom Tromey <tromey@redhat.com>
10396
10397 * configure.ac: Invoke AC_SYS_LARGEFILE.
10398 * configure, config.in: Rebuild.
10399
10400 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10401
10402 * win32-low.c: Throughout, fix format strings and casts of
10403 printf-like functions to avoid type related warnings on all
10404 platforms.
10405 (get_child_debug_event): Print dwDebugEventCode as hex since
10406 that's how it's usually documented.
10407
10408 2013-02-28 Yao Qi <yao@codesourcery.com>
10409
10410 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10411 pulongest.
10412
10413 2013-02-27 Jiong Wang <jiwang@tilera.com>
10414
10415 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10416 (reg-tilegx32.c): New rule.
10417 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10418 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10419 different register info initializer according to elf class.
10420 (init_registers_tilgx32): New function. The tilegx32 register info
10421 initializer.
10422 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10423 (tile_store_gregset): Likewise.
10424
10425 2013-02-27 Yao Qi <yao@codesourcery.com>
10426
10427 * server.c (process_point_options): Print debug message when
10428 debug_threads is true.
10429
10430 2013-02-26 Yao Qi <yao@codesourcery.com>
10431
10432 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10433
10434 2013-02-19 Pedro Alves <palves@redhat.com>
10435 Kai Tietz <ktietz@redhat.com>
10436
10437 PR gdb/15161
10438
10439 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10440 instead of strtoul to extract address from packet.
10441 (process_serial_event) <'z'>: Likewise.
10442
10443 2013-02-18 Yao Qi <yao@codesourcery.com>
10444
10445 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10446
10447 2013-02-14 Pedro Alves <palves@redhat.com>
10448
10449 Plug memory leak.
10450
10451 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10452 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10453
10454 2013-02-14 Pedro Alves <palves@redhat.com>
10455
10456 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10457
10458 2013-02-14 Pedro Alves <palves@redhat.com>
10459
10460 * tracepoint.c (save_string): Delete.
10461 (add_tracepoint_action): Use savestring instead of save_string.
10462
10463 2013-02-12 Pedro Alves <palves@redhat.com>
10464
10465 * linux-xtensa-low.c: Ditto.
10466 * xtensa-xtregs.c: Ditto.
10467
10468 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10469
10470 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10471 thread_db.
10472
10473 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10474
10475 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10476 aarch64_num_wp_regs and aarch64_num_bp_regs to
10477 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10478
10479 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10480
10481 * linux-aarch64-low.c (ps_get_thread_area): Replace
10482 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10483
10484 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10485 Marcus Shawcroft <marcus.shawcroft@arm.com>
10486 Nigel Stephens <nigel.stephens@arm.com>
10487 Yufeng Zhang <yufeng.zhang@arm.com>
10488
10489 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10490 (aarch64.c, aarch64-without-fpu.c): New targets.
10491 * configure.srv (aarch64*-*-linux*): New.
10492 * linux-aarch64-low.c: New file.
10493
10494 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10495
10496 * linux-low.c (handle_extended_wait, linux_create_inferior)
10497 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10498 (dequeue_one_deferred_signal, linux_resume_one_thread)
10499 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10500 (linux_tracefork_grandchild, linux_test_for_tracefork)
10501 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10502 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10503 where the argument is 0.
10504
10505 2013-01-25 Yao Qi <yao@codesourcery.com>
10506
10507 * event-loop.c: Include "queue.h".
10508 (gdb_event_p): New typedef.
10509 (struct gdb_event) <next_event>: Remove.
10510 (event_queue): Change to QUEUE(gdb_event_p).
10511 (async_queue_event): Remove.
10512 (gdb_event_xfree): New.
10513 (initialize_event_loop): New.
10514 (process_event): Use API from QUEUE.
10515 (wait_for_event): Likewise.
10516 * server.c (main): Call initialize_event_loop.
10517 * server.h (initialize_event_loop): Declare.
10518
10519 2013-01-18 Yao Qi <yao@codesourcery.com>
10520
10521 * ax.h (struct eval_agent_expr_context): New.
10522 (gdb_eval_agent_expr): Update declaration.
10523 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10524 TFRAME. Add new argument CTX.
10525 * server.h (struct eval_agent_expr_context): Declare.
10526 (agent_mem_read, agent_tsv_read): Update declaration.
10527 (agent_mem_read_string): Likewise.
10528 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10529 (add_traceframe_block): Add new argument TPOINT.
10530 Increase TPOINT->traceframe_usage.
10531 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10532 eval_tracepoint_agent_expr.
10533 (condition_true_at_tracepoint): Likewise.
10534 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10535 (agent_mem_read_string, agent_tsv_read): Likewise.
10536
10537 2013-01-16 Yao Qi <yao@codesourcery.com>
10538
10539 * linux-low.c (linux_resume_one_lwp): Don't check
10540 'lwp->bp_reinsert != 0'.
10541
10542 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10543 Pedro Alves <palves@redhat.com>
10544
10545 * lynx-low.c (ptrace_request_to_str): Define a temporary
10546 macro and use it to simplify this function's implementation.
10547
10548 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10549
10550 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10551 sets errno.
10552
10553 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10554
10555 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10556
10557 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10558
10559 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10560
10561 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10562
10563 * lynx-low.c (lynx_resume): Use the resume_info parameter
10564 to determine the ptid for the lynx_ptrace call, unless
10565 it is equal to minus_one_ptid, in which case we use the
10566 ptid of the current_inferior.
10567 (lynx_wait_1): After having received a thread create/exit
10568 event, resume the inferior's execution using the signaling
10569 thread's ptid, rather than the old ptid.
10570
10571 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10572
10573 * lynx-low.c (lynx_resume): Delete variable ret.
10574
10575 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10576
10577 * gdbreplay.c (gdbreplay_version): Update copyright year.
10578 * server.c (gdbserver_version): Likewise.
10579
10580 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10581
10582 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10583 new thread.
10584
10585 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10586
10587 * lynx-low.c (ptrace_request_to_str): Add handling for
10588 PTRACE_GETTRACESIG.
10589
10590 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10591
10592 * lynx-low.c (lynx_attach): Delete variable new_process.
10593
10594 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10595
10596 * lynx-low.c (lynx_create_inferior): Delete variable
10597 new_process.
10598
10599 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10600
10601 * lynx-low.c (ptrace_request_to_str): Do not handle
10602 PTRACE_GETTHREADLIST if this macro does not exist.
10603
10604 2012-12-15 Yao Qi <yao@codesourcery.com>
10605
10606 * Makefile.in (OBS): Add notif.o.
10607 * notif.c, notif.h: New.
10608 * server.c: Include "notif.h".
10609 (struct vstop_notif) <next>: Remove.
10610 <base>: New field.
10611 (queue_stop_reply): Update.
10612 (push_event, send_next_stop_reply): Remove.
10613 (discard_queued_stop_replies): Update.
10614 (notif_stop): New variable.
10615 (handle_v_stopped): Remove.
10616 (handle_v_requests): Don't call handle_v_stopped. Call
10617 handle_ack_notif instead.
10618 (queue_stop_reply_callback): Call notif_event_enque instead
10619 of queue_stop_reply.
10620 (handle_status): Don't call send_next_stop_reply, call
10621 notif_write_event instead.
10622 (kill_inferior_callback): Likewise.
10623 (detach_or_kill_inferior_callback): Likewise.
10624 (main): Call initialize_notif.
10625 (process_serial_event): Call QUEUE_is_empty.
10626 (handle_target_event): Call notif_push instead of push event.
10627 * server.h (push_event): Remove declaration.
10628
10629 2012-12-10 Tom Tromey <tromey@redhat.com>
10630
10631 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10632 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10633 macros.
10634 (.c.o): Rewrite.
10635 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10636 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10637 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10638 (amd64-linux-ipa.o, ax.o): Rewrite.
10639 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10640 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10641 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10642 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10643 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10644 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10645 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10646 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10647 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10648 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10649 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10650 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10651 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10652 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10653 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10654 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10655 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10656 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10657 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10658 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10659 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10660 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10661 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10662 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10663 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10664 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10665 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10666 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10667 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10668 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10669 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10670 (reg-tilegx.o): Remove.
10671 (all_object_files): New macro.
10672 Include .deps files.
10673 * aclocal.m4, configure: Rebuild.
10674 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10675 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10676 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10677
10678 2012-12-05 Tom Tromey <tromey@redhat.com>
10679
10680 PR gdb/14917:
10681 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10682
10683 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10684
10685 * configure.ac: Check for linux/perf_event.h.
10686 * config.in: Regenerated.
10687 * configure: Regenerated.
10688
10689 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10690
10691 * hostio.c (handle_readlink): Decrease buffer size
10692 parameter passed to readlink by one byte.
10693
10694 2012-11-26 Yao Qi <yao@codesourcery.com>
10695
10696 * configure.ac (build_warnings): Append '-Wempty-body'.
10697 * configure: Regenerated.
10698 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10699 body.
10700
10701 2012-11-15 Pierre Muller <muller@sourceware.org>
10702
10703 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10704 * config.in: Regenerate.
10705 * configure: Regenerate.
10706 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10707 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10708 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10709 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10710 header.
10711 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10712 instead of <sys/wait.h> header.
10713 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10714
10715 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10716
10717 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10718 (various make rules): Remove -DGDBSERVER
10719
10720 2012-11-09 Yao Qi <yao@codesourcery.com>
10721
10722 * spu-low.c (current_ptid): Move it to ..
10723 * gdbthread.h: ... here. New.
10724 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10725 * server.c (myresume, process_serial_event): Likewise.
10726 * thread-db.c (thread_db_find_new_threads): Likewise.
10727 * tracepoint.c (run_inferior_command): Likewise.
10728
10729 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10730
10731 * server.c (handle_search_memory_1): Include access length in
10732 warning message.
10733
10734 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10735
10736 * linux-crisv32-low.c: Fix compile errors.
10737
10738 2012-09-04 Yao Qi <yao@codesourcery.com>
10739
10740 * tracepoint.c (cmd_qtsv): Adjust debug message.
10741 Don't check CUR_TPOINT.
10742
10743 2012-08-28 Yao Qi <yao@codesourcery.com>
10744
10745 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10746 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10747 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10748 Remove declarations of xmalloc, xreallloc, xstrdup and
10749 freeargv.
10750 * Makefile.in (libiberty_h): New.
10751 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10752 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10753
10754 2012-08-23 Yao Qi <yao@codesourcery.com>
10755
10756 * server.h: Remove declaration of 'xsnprintf'.
10757
10758 2012-08-22 Keith Seitz <keiths@redhat.com>
10759
10760 * server.h: Include build-gnulib-gbserver/config.h.
10761 * gdbreplay.c: Likewise.
10762
10763 2012-08-08 Doug Evans <dje@google.com>
10764
10765 * Makefile.in (SFILES): Add gdb_vecs.c.
10766 (OBS): Add gdb_vecs.o.
10767 (gdb_vecs_h, host_defs_h): New variables.
10768 (thread-db.o): Add $(gdb_vecs_h) dependency.
10769 (gdb_vecs.o): New rule.
10770 * thread-db.c: #include "gdb_vecs.h".
10771 (thread_db_load_search): Use a vector to iterate over path elements.
10772 Handle text appearing after "$pdir".
10773
10774 * configure.ac: Add check for strstr.
10775 * config.in: Regenerate.
10776 * configure: Regenerate.
10777
10778 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10779
10780 * hostio.c (handle_pread): If pread fails, fall back to attempting
10781 lseek/read.
10782 (handle_pwrite): Likewise for pwrite.
10783
10784 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10785
10786 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10787 between unsupported TYPE and unimplementable ADDR/LEN combination.
10788 (arm_insert_point): Act on new return value.
10789
10790 2012-07-31 Pedro Alves <palves@redhat.com>
10791
10792 * server.c (process_point_options): Only skip tokens if we find
10793 one that is unrecognized. Don't treat 'X' specially while
10794 skipping unrecognized tokens.
10795
10796 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10797
10798 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10799 to 4-byte-align HW breakpoint addresses for Thumb.
10800
10801 2012-07-27 Yao Qi <yao@codesourcery.com>
10802
10803 PR remote/14161.
10804
10805 * server.h: Declare gdb_agent_about_to_close.
10806 * target.c (kill_inferior): Include "agent.h".
10807 New. Send command 'kill'.
10808 * target.h (kill_inferior): Removed macro.
10809 * tracepoint.c (gdb_agent_about_to_close): New.
10810 (gdb_agent_helper_thread): Handle command 'close'.
10811 Wait endlessly until the inferior stops.
10812 Install gdb_agent_remove_socket to atexit hook.
10813 (agent_socket_name): New static variable.
10814 (gdb_agent_socket_init): Replace local variable 'name' with
10815 'agent_socket_name'.
10816 (gdb_agent_remove_socket): New.
10817
10818 2012-07-27 Yao Qi <yao@codesourcery.com>
10819
10820 * server.c (process_point_options): Stop at 'X' when parsing.
10821
10822 2012-07-19 Michael Eager <eager@eagercon.com>
10823
10824 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10825 to hw_execute.
10826 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10827 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10828 hardware breakpoint.
10829
10830 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10831
10832 * gdbserver/linux-low.c (initialize_low): Call
10833 linux_ptrace_init_warnings.
10834
10835 2012-07-02 Doug Evans <dje@google.com>
10836
10837 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10838 pointer to int.
10839
10840 2012-07-02 Stan Shebs <stan@codesourcery.com>
10841
10842 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10843 (ax.o): Add it to build rule.
10844 (ax-ipa.o): Ditto.
10845 (OBS): Add format.o.
10846 (IPA_OBS): Add format.o.
10847 * server.c (handle_query): Claim support for breakpoint commands.
10848 (process_point_options): Add command case.
10849 (process_serial_event): Leave running if there are printfs in
10850 effect.
10851 * mem-break.h (any_persistent_commands): Declare.
10852 (add_breakpoint_commands): Declare.
10853 (gdb_no_commands_at_breakpoint): Declare.
10854 (run_breakpoint_commands): Declare.
10855 * mem-break.c (struct point_command_list): New struct.
10856 (struct breakpoint): New field command_list.
10857 (any_persistent_commands): New function.
10858 (add_commands_to_breakpoint): New function.
10859 (add_breakpoint_commands): New function.
10860 (gdb_no_commands_at_breakpoint): New function.
10861 (run_breakpoint_commands): New function.
10862 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10863 locally.
10864 * ax.c: Include format.h.
10865 (ax_printf): New function.
10866 (gdb_eval_agent_expr): Add printf opcode.
10867
10868 2012-06-13 Yao Qi <yao@codesourcery.com>
10869
10870 * server.c (start_inferior): Remove duplicated writes to fields
10871 'last_resume_kind' and 'last_status' of 'current_inferior'.
10872
10873 2012-06-12 Yao Qi <yao@codesourcery.com>
10874 Pedro Alves <palves@redhat.com>
10875
10876 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10877 comment.
10878 * server.c (handle_v_cont): Extend comment.
10879
10880 2012-06-11 Yao Qi <yao@codesourcery.com>
10881
10882 * linux-low.c (linux_attach): Add 'static'.
10883
10884 2012-06-06 Yao Qi <yao@codesourcery.com>
10885
10886 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10887
10888 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10889
10890 Fix gcc -flto compilation warning.
10891 * server.c (main): Make variable multi_mode and attach volatile.
10892
10893 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10894
10895 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10896 if the platform doesn't know about it.
10897
10898 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10899
10900 * Makefile.in (SFILES): Add linux-tile-low.c.
10901 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10902 * configure.srv: Handle tilegx-*-linux*.
10903 * linux-tile-low.c: New file.
10904
10905 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10906
10907 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10908
10909 2012-05-24 Pedro Alves <palves@redhat.com>
10910
10911 PR gdb/7205
10912
10913 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10914
10915 2012-05-24 Pedro Alves <palves@redhat.com>
10916
10917 PR gdb/7205
10918
10919 Replace target_signal with gdb_signal throughout.
10920
10921 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10922
10923 * linux-low.c (linux_store_registers): Avoid the copying sequence
10924 when no data has been retrieved by ptrace.
10925
10926 2012-05-22 Will Deacon <will.deacon@arm.com>
10927
10928 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10929 Include asm/ptrace.h.
10930 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10931 already defined.
10932
10933 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10934
10935 * linux-low.c (linux_store_registers): Don't re-retrieve data
10936 with ptrace that has already been obtained from /proc. Always
10937 copy any data retrieved with ptrace to the buffer supplied.
10938
10939 2012-05-11 Yao Qi <yao@codesourcery.com>
10940 Pedro Alves <palves@redhat.com>
10941
10942 * linux-low.c (enum stopping_threads_kind): New.
10943 (stopping_threads): Change type to `enum stopping_threads_kind'.
10944 (handle_extended_wait): If stopping and suspending threads, leave
10945 the new_lwp suspended too.
10946 (linux_wait_for_event): Adjust.
10947 (stop_all_lwps): Set `stopping_threads' to
10948 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10949 whether we're suspending threads or just stopping them. Assert no
10950 recursion happens.
10951
10952 2012-04-29 Yao Qi <yao@codesourcery.com>
10953
10954 * server.h: Move some code to ...
10955 * gdbthread.h: ... here. New.
10956 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10957 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10958 (nto-low.o, win32-low.o): Likewise.
10959 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10960 * regcache.c, remote-utils.c, server.c: Likewise.
10961 * target.c, tracepoint.c, win32-low.c: Likewise.
10962
10963 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10964
10965 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10966 (PTRACE_ARG4_TYPE): Likewise.
10967 (PTRACE_XFER_TYPE): Likewise.
10968 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10969 ptrace to PTRACE_ARG3_TYPE.
10970 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10971 (PTRACE_ARG4_TYPE): Likewise.
10972 (PTRACE_XFER_TYPE): Likewise.
10973 (linux_detach_one_lwp): Cast fourth argument of
10974 ptrace to long then PTRACE_ARG4_TYPE.
10975 (regsets_fetch_inferior_registers): Cast third argument of
10976 ptrace to long then PTRACE_ARG3_TYPE.
10977 (regsets_store_inferior_registers): Likewise.
10978
10979 2012-04-20 Pedro Alves <palves@redhat.com>
10980
10981 * configure: Regenerate.
10982
10983 2012-04-19 Pedro Alves <palves@redhat.com>
10984
10985 * Makefile.in (GNULIB_BUILDDIR): New.
10986 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10987 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10988 (all, install-only, uninstall, clean-info, all-lib, clean): No
10989 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10990 (maintainer-clean realclean distclean): Use subdir_do.
10991 (subdir_do): New.
10992 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10993 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10994 * acinclude.m4: Include acx_configure_dir.m4.
10995 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10996 calls. Call AC_PROG_RANLIB. Configure gnulib using
10997 ACX_CONFIGURE_DIR.
10998 (GNULIB): New.
10999 (GNULIB_STDINT_H): Adjust.
11000 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11001 * gdbreplay.c: Include build-gnulib/config.h.
11002 * server.h: Likewise.
11003 * aclocal.m4: Regenerate.
11004 * config.in: Regenerate.
11005 * configure: Regenerate.
11006
11007 2012-04-19 Pedro Alves <palves@redhat.com>
11008
11009 * Makefile.in (LIBGNU, INCGNU): Adjust.
11010 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11011 (all, install-only, uninstall, clean-info, all-lib, clean)
11012 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11013 * configure.ac: Adjust AC_OUTPUT output.
11014 * aclocal.m4: Regenerate.
11015 * configure: Regenerate.
11016
11017 2012-04-19 Pedro Alves <palves@redhat.com>
11018
11019 * Makefile.in (generated_files): New.
11020 (server_h): Remove the explicit dependency on config.h, and depend
11021 on $generated_files.
11022
11023 2012-04-19 Pedro Alves <palves@redhat.com>
11024
11025 * Makefile.in (INCGNU): Add -Ignulib.
11026
11027 2012-04-19 Pedro Alves <palves@redhat.com>
11028
11029 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11030 (INCGNU): ... this, and spell out -I here.
11031 (GNULIB_LIB): Rename to ...
11032 (LIBGNU): ... this.
11033 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11034
11035 2012-04-19 Pedro Alves <palves@redhat.com>
11036
11037 * config.in: Regenerate.
11038
11039 2012-04-19 Pedro Alves <palves@redhat.com>
11040
11041 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11042 * server.h (memmem): Remove declaration.
11043 * config.in: Regenerate.
11044 * configure: Regenerate.
11045
11046 2012-04-19 Yao Qi <yao@codesourcery.com>
11047
11048 * Makefile.in (SFILES): Add common/vec.c.
11049 (OBS): Add vec.o.
11050 (vec.o): New rule.
11051
11052 2012-04-19 Yao Qi <yao@codesourcery.com>
11053
11054 * remote-utils.c (prepare_resume_reply): Replace with macro
11055 target_core_of_thread.
11056 * server.c (handle_qxfer_threads_proper): Likewise.
11057 * target.h (traget_core_of_thread): New macro.
11058
11059 2012-04-18 Pedro Alves <palves@redhat.com>
11060
11061 * aclocal.m4: Regenerate.
11062 * configure: Regenerate.
11063
11064 2012-04-16 Yao Qi <yao@codesourcery.com>
11065
11066 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11067 duplicated on address.
11068
11069 2012-04-16 Yao Qi <yao@codesourcery.com>
11070
11071 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11072 (struct tracepoint_action_ops) <send>: New field.
11073 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11074 (agent_expr_send, x_tracepoint_action_send): New.
11075 (l_tracepoint_action_send): New.
11076 (cmd_qtdp): Download and install tracepoint
11077 according to `use_agent'.
11078 (run_inferior_command): Add one more parameter `len'.
11079 Update callers.
11080 (tracepoint_send_agent): New.
11081 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11082
11083 2012-04-16 Yao Qi <yao@codesourcery.com>
11084
11085 * tracepoint.c (download_tracepoints): Moved to ...
11086 (cmd_qtstart): ... here.
11087
11088 2012-04-14 Yao Qi <yao@codesourcery.com>
11089
11090 * tracepoint.c: Include inttypes.h.
11091 (struct collect_memory_action): Use sized types.
11092 (struct tracepoint): Likewise.
11093 (cmd_qtdp, stop_tracing): Update print specifiers.
11094 (cmd_qtp, response_tracepoint): Likewise.
11095 (collect_data_at_tracepoint): Likewise.
11096 (collect_data_at_step): Likewise.
11097
11098 2012-04-14 Yao Qi <yao@codesourcery.com>
11099
11100 Import gnulib module inttypes.
11101 * aclocal.m4, config.in, configure: Regenerated.
11102
11103 2012-04-14 Yao Qi <yao@codesourcery.com>
11104
11105 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11106 Makefile and config.status at last.
11107
11108 2012-04-13 Yao Qi <yao@codesourcery.com>
11109
11110 * tracepoint.c: Include stdint.h unconditionally.
11111
11112 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11113
11114 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11115 on BFD_HAVE_SYS_PROCFS_TYPE.
11116 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11117 * configure: Regenerate.
11118 * config.in: Likewise.
11119
11120 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11121
11122 * Makefile.in (clean): Also remove x32.c x32-linux.c
11123 x32-avx.c x32-avx-linux.c.
11124 (x32.o): New target.
11125 (x32.c): Likewise.
11126 (x32-linux.o): Likewise.
11127 (x32-linux.c): Likewise.
11128 (x32-avx.o): Likewise.
11129 (x32-avx.c): Likewise.
11130 (x32-avx-linux.o): Likewise.
11131 (x32-avx-linux.c): Likewise.
11132
11133 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11134 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11135 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11136 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11137 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11138 i386/x32-avx-linux.xml.
11139
11140 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11141 (init_registers_x32_avx_linux): Likwise.
11142 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11143 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11144
11145 2012-04-13 Pedro Alves <palves@redhat.com>
11146
11147 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11148 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11149 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11150 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11151 the sub-make.
11152
11153 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11154
11155 * linux-x86-low.c (compat_x32_clock_t): New.
11156 (compat_x32_siginfo_t): Likewise.
11157 (compat_x32_siginfo_from_siginfo): Likewise.
11158 (siginfo_from_compat_x32_siginfo): Likewise.
11159 (linux_is_elf64): Likewise.
11160 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11161 and siginfo_from_compat_x32_siginfo for x32.
11162 (x86_arch_setup): Set linux_is_elf64.
11163
11164 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11165
11166 PR gdb/13969
11167 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11168 e_machine field.
11169 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11170 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11171 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11172 compatible with process.
11173
11174 2012-04-12 Yao Qi <yao@codesourcery.com>
11175
11176 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11177 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11178 (install-only, install-info, clean): Handle sub dir gnulib.
11179 (all-lib, am--refresh): New targets.
11180 (memmem.o): Remove target.
11181 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11182 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11183 (AC_REPLACE_FUNCS): Remove memmem.
11184 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11185 (AC_OUTPUT): Generate Makefile in gnulib/.
11186 * aclocal.m4, config.in, configure: Regenerated.
11187
11188 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11189
11190 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11191
11192 2012-04-05 Pedro Alves <palves@redhat.com>
11193
11194 -Werror=strict-aliasing
11195
11196 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11197 pointer.
11198
11199 2012-04-04 Pedro Alves <palves@redhat.com>
11200
11201 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11202 (sparc_store_gregset_from_stack, sparc_store_gregset)
11203 (sparc_breakpoint_at): Fix formatting.
11204
11205 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11206
11207 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11208 are available.
11209 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11210 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11211 * config.in: Regenerate.
11212 * configure: Likewise.
11213
11214 2012-03-29 Pedro Alves <palves@redhat.com>
11215
11216 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11217 Correct ptrace arguments.
11218
11219 2012-03-28 Pedro Alves <palves@redhat.com>
11220
11221 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11222 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11223 (IA64_FR1_REGNUM): New defines.
11224 (ia64_fetch_register): New.
11225 (the_low_target): Install it.
11226 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11227 field.
11228 * linux-low.c (linux_fetch_registers): Try the
11229 the_low_target.fetch_register hook first.
11230
11231 * linux-arm-low.c (the_low_target): Adjust.
11232 * linux-bfin-low.c (the_low_target): Adjust.
11233 * linux-cris-low.c (the_low_target): Adjust.
11234 * linux-crisv32-low.c (the_low_target): Adjust.
11235 * linux-m32r-low.c (the_low_target): Adjust.
11236 * linux-m68k-low.c (the_low_target): Adjust.
11237 * linux-mips-low.c (the_low_target): Adjust.
11238 * linux-ppc-low.c (the_low_target): Adjust.
11239 * linux-s390-low.c (the_low_target): Adjust.
11240 * linux-sh-low.c (the_low_target): Adjust.
11241 * linux-sparc-low.c (the_low_target): Adjust.
11242 * linux-tic6x-low.c (the_low_target): Adjust.
11243 * linux-x86-low.c (the_low_target): Adjust.
11244 * linux-xtensa-low.c (the_low_target): Adjust.
11245
11246 2012-03-26 Pedro Alves <palves@redhat.com>
11247
11248 * server.c (handle_qxfer_libraries): Don't bail early if
11249 the_target->qxfer_libraries_svr4 is not NULL.
11250
11251 2012-03-26 Pedro Alves <palves@redhat.com>
11252
11253 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11254
11255 2012-03-23 Pedro Alves <palves@redhat.com>
11256
11257 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11258 "library-list-svr4" element's start tag when the the DSO list is
11259 empty.
11260
11261 2012-03-23 Pedro Alves <palves@redhat.com>
11262
11263 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11264 a variable whose type size is the same as the inferior's pointer
11265 size.
11266
11267 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11268
11269 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11270 struct siginfo.
11271 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11272 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11273 * linux-low.h: Include <signal.h>.
11274 (struct siginfo): Remove forward declaration.
11275 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11276 struct siginfo.
11277
11278 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11279
11280 * .gitignore: Ignore more files.
11281
11282 2012-03-19 Pedro Alves <palves@redhat.com>
11283 Jan Kratochvil <jan.kratochvil@redhat.com>
11284
11285 * server.c (cont_thread, general_thread): Add describing comments.
11286 (start_inferior): Clear `cont_thread'.
11287 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11288 of a process.
11289
11290 2012-03-15 Yao Qi <yao@codesourcery.com>
11291
11292 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11293 handling to ...
11294 (cmd_qtdp): ... here.
11295
11296 2012-03-15 Yao Qi <yao@codesourcery.com>
11297
11298 * tracepoint.c (struct tracepoint_action_ops): New.
11299 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11300 (m_tracepoint_action_download): New.
11301 (r_tracepoint_action_download): New.
11302 (x_tracepoint_action_download): New.
11303 (l_tracepoint_action_download): New.
11304 (add_tracepoint_action): Install `action->ops' according type.
11305 (download_tracepoint_1): Move code `download' function pointer
11306 of various tracepoint_action_ops.
11307
11308 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11309
11310 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11311 linux_ptrace_attach_warnings.
11312
11313 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11314
11315 * Makefile.in (linux-ptrace.o): New.
11316 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11317 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11318 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11319 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11320 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11321 of these targets.
11322 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11323
11324 2012-03-08 Yao Qi <yao@codesourcery.com>
11325 Pedro Alves <palves@redhat.com>
11326
11327 Fix PR server/13392.
11328 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11329 offset of JMP insn.
11330 * tracepoint.c (remove_tracepoint): New.
11331 (cmd_qtdp): Call remove_tracepoint when failed to install.
11332
11333 2012-03-07 Pedro Alves <palves@redhat.com>
11334
11335 * linux-low.c (get_detach_signal): New.
11336 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11337 Pass on pending signals to PTRACE_DETACH. Check the result of the
11338 ptrace call.
11339 * server.c (program_signals, program_signals_p): New.
11340 (handle_general_set): Handle QProgramSignals.
11341 * server.h (program_signals, program_signals_p): Declare.
11342
11343 2012-03-05 Pedro Alves <palves@redhat.com>
11344 Jan Kratochvil <jan.kratochvil@redhat.com>
11345
11346 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11347 New comment why.
11348
11349 2012-03-03 Yao Qi <yao@codesourcery.com>
11350
11351 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11352 agent_look_up_symbols.
11353
11354 2012-03-03 Yao Qi <yao@codesourcery.com>
11355
11356 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11357 (linux-x86-low.o): Likewise.
11358 * server.h: Remove in_process_agent_loaded.
11359 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11360 common/agent.c.
11361 Update callers.
11362
11363 2012-03-03 Yao Qi <yao@codesourcery.com>
11364
11365 * tracepoint.c (gdb_agent_capability): New global.
11366 (in_process_agent_loaded_ust): Renamed to
11367 `in_process_agent_supports_ust'.
11368 Update callers.
11369 (in_process_agent_supports_ust): Call agent_capability_check.
11370 (clear_installed_tracepoints): Assert that agent supports
11371 agent.
11372
11373 2012-03-03 Yao Qi <yao@codesourcery.com>
11374
11375 * linux-low.c (linux_supports_agent): New.
11376 (linux_target_ops): Initialize field `supports_agent' with
11377 linux_supports_agent.
11378 * target.h (struct target_ops) <supports_agent>: New.
11379 (target_supports_agent): New macro.
11380 * server.c (handle_general_set): Handle packet 'QAgent'.
11381 (handle_query): Send `QAgent+'.
11382 * Makefile.in (server.o): Depends on agent.h.
11383
11384 2012-03-03 Yao Qi <yao@codesourcery.com>
11385
11386 * Makefile.in (OBS): Add agent.o.
11387 Add new rule for agent.o.
11388 Track dependence of tracepoint.c on agent.h.
11389 * tracepoint.c (run_inferior_command_1):
11390 (run_inferior_command): Call agent_run_command.
11391 (gdb_ust_connect_sync_socket): Deleted. Move it to
11392 common/agent.c.
11393 (resume_thread, stop_thread): Likewise.
11394 (gdb_ust_socket_init): Renamed to ...
11395 (gdb_agent_socket_init): ... New.
11396 (gdb_ust_thread): Renamed to ...
11397 (gdb_agent_helper_thread): ... New.
11398 (gdb_ust_init): Move some code to ...
11399 (gdb_agent_init): ... here. New.
11400 [HAVE_UST]: Call gdb_ust_init.
11401 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11402 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11403 * config.in, configure: Regenerated.
11404
11405 2012-03-02 Pedro Alves <palves@redhat.com>
11406
11407 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11408 * linux-low.c (struct simple_pid_list): New.
11409 (stopped_pids): New a struct simple_pid_list pointer.
11410 (add_to_pid_list, pull_pid_from_list): New.
11411 (handle_extended_wait): Don't assume the first signal new children
11412 report is SIGSTOP. Adjust call to pull_pid_from_list.
11413 (linux_wait_for_lwp): Adjust.
11414
11415 2012-03-02 Yao Qi <yao@codesourcery.com>
11416
11417 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11418 debug log.
11419
11420 2012-03-02 Yao Qi <yao@codesourcery.com>
11421
11422 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11423 `stop_pc' and `tpoint'. Update caller.
11424
11425 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11426
11427 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11428 * linux-low.c (use_linux_regsets): New macro.
11429 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11430 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11431 (linux_register_in_regsets): New function.
11432 (usr_fetch_inferior_registers): Skip registers covered by
11433 regsets.
11434 (usr_store_inferior_registers): Likewise.
11435 (usr_fetch_inferior_registers): New macro.
11436 (usr_store_inferior_registers): Likewise.
11437 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11438 (linux_store_registers): Likewise.
11439 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11440 prototype.
11441 (init_registers_mips64_dsp_linux): Likewise.
11442 (init_registers_mips_linux): New macro.
11443 (init_registers_mips_dsp_linux): Likewise.
11444 (mips_dsp_num_regs): Likewise.
11445 (DSP_BASE, DSP_CONTROL): New fallback macros.
11446 (mips_base_regs): New macro.
11447 (mips_regmap): Use it. Fix the size.
11448 (mips_dsp_regmap): New variable.
11449 (mips_dsp_regset_bitmap): Likewise.
11450 (mips_arch_setup): New function.
11451 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11452 than mips_regmap.
11453 (mips_cannot_store_register): Likewise.
11454 (the_low_target): Update .arch_setup, .num_regs and .regmap
11455 initializers. Add .regset_bitmap initializer.
11456 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11457 initializer.
11458 * linux-bfin-low.c (the_low_target): Likewise.
11459 * linux-cris-low.c (the_low_target): Likewise.
11460 * linux-crisv32-low.c (the_low_target): Likewise.
11461 * linux-ia64-low.c (the_low_target): Likewise.
11462 * linux-m32r-low.c (the_low_target): Likewise.
11463 * linux-m68k-low.c (the_low_target): Likewise.
11464 * linux-ppc-low.c (the_low_target): Likewise.
11465 * linux-s390-low.c (the_low_target): Likewise.
11466 * linux-sh-low.c (the_low_target): Likewise.
11467 * linux-sparc-low.c (the_low_target): Likewise.
11468 * linux-tic6x-low.c (the_low_target): Likewise.
11469 * linux-x86-low.c (the_low_target): Likewise.
11470 * linux-xtensa-low.c (the_low_target): Likewise.
11471 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11472 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11473 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11474 srv_xmlfiles.
11475 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11476 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11477
11478 2012-02-29 Yao Qi <yao@codesourcery.com>
11479 Pedro Alves <palves@redhat.com>
11480
11481 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11482 `step_over_finished' is true.
11483
11484 2012-02-27 Pedro Alves <palves@redhat.com>
11485
11486 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11487 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11488
11489 2012-02-27 Pedro Alves <palves@redhat.com>
11490
11491 PR server/9684
11492 * linux-low.c (pid_is_stopped): New.
11493 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11494
11495 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11496
11497 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11498 of conditions.
11499
11500 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11501
11502 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11503
11504 2012-02-24 Luis Machado <lgustavo@codesourcery>
11505
11506 * server.c (handle_query): Advertise support for target-side
11507 breakpoint condition evaluation.
11508 (process_point_options): New function.
11509 (process_serial_event): When inserting a breakpoint, check for
11510 a target-side condition that should be evaluated.
11511
11512 * mem-break.c: Include regcache.h and ax.h.
11513 (point_cond_list_t): New data structure.
11514 (breakpoint) <cond_list>: New field.
11515 (find_gdb_breakpoint_at): Make non-static.
11516 (delete_gdb_breakpoint_at): Clear any target-side
11517 conditions.
11518 (clear_gdb_breakpoint_conditions): New function.
11519 (add_condition_to_breakpoint): Likewise.
11520 (add_breakpoint_condition): Likewise.
11521 (gdb_condition_true_at_breakpoint): Likewise.
11522 (gdb_breakpoint_here): Return result directly instead
11523 of going through a local variable.
11524
11525 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11526 (clear_gdb_breakpoint_conditions): Likewise.
11527 (add_breakpoint_condition): Likewise.
11528 (gdb_condition_true_at_breakpoint): Likewise.
11529
11530 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11531 (need_step_over_p): Take target-side breakpoint condition into
11532 consideration.
11533
11534 2012-02-24 Luis Machado <lgustavo@codesourcery>
11535
11536 * server.h: Include tracepoint.h.
11537 (agent_mem_read, agent_get_trace_state_variable_value,
11538 agent_set_trace_state_variable_value,
11539 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11540 get_set_tsv_func_addr): New prototypes.
11541
11542 * ax.h: New include file.
11543 * ax.c: New source file.
11544
11545 * tracepoint.c: Include ax.h.
11546 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11547 agent_expr, eval_result_type): Move to ax.h.
11548 (parse_agent_expr): Rename to ...
11549 (gdb_parse_agent_expr): ... this, make it non-static and move
11550 to ax.h.
11551 (unparse_agent_expr) Rename to ...
11552 (gdb_unparse_agent_expr): ... this, make it non-static and move
11553 to ax.h.
11554 (eval_agent_expr): Rename to ...
11555 (eval_tracepoint_agent_expr): ... this.
11556 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11557 forward declarations.
11558 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11559 (agent_get_trace_state_variable_value): New function.
11560 (agent_set_trace_state_variable_value): New function.
11561 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11562 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11563 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11564 (condition_true_at_tracepoint): Likewise.
11565 (parse_agent_expr): Rename to ...
11566 (gdb_parse_agent_expr): ... this and move to ax.c.
11567 (unparse_agent_expr): Rename to ...
11568 (gdb_unparse_agent_expr): ... this and move to ax.c.
11569 (gdb_agent_op_name): Move to ax.c.
11570 (eval_agent_expr): Rename to ...
11571 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11572 and move to ax.c.
11573 (eval_tracepoint_agent_expr): New function.
11574 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11575 non-static.
11576 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11577 ax.c.
11578 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11579 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11580 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11581 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11582 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11583 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11584 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11585 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11586 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11587 (compile_bytecodes): Remove forward declaration.
11588 (is_goto_target): Move to ax.c.
11589 (compile_bytecodes): Move to ax.c and call
11590 agent_get_trace_state_variable_value (...) and
11591 agent_set_trace_state_variable_value (...).
11592
11593 * Makefile.in: Update ax.c and IPA dependencies.
11594
11595 2012-02-24 Pedro Alves <palves@redhat.com>
11596
11597 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11598 (cmd_bigqtbuffer_circular): ... this. Only handle
11599 'QTBuffer:circular:'.
11600 (handle_tracepoint_general_set): Adjust.
11601
11602 2012-02-16 Yao Qi <yao@codesourcery.com>
11603
11604 * inferiors.c: Move code to ...
11605 * dll.c: .... here. New.
11606 * server.h: Declare clear_dlls.
11607 * Makefile.in (SFILES): Add dll.c.
11608 (OBS): Add dll.o
11609 (dll.o): New rule.
11610
11611 2012-02-11 Yao Qi <yao@codesourcery.com>
11612
11613 * server.c: (handle_monitor_command): Add a new parameter
11614 `own_buf'.
11615 (handle_query): Update caller.
11616
11617 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11618
11619 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11620 * configure, config.in: Regenerate.
11621 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11622 is not defined.
11623
11624 2012-02-02 Pedro Alves <palves@redhat.com>
11625
11626 Try SIGKILL first, then PTRACE_KILL.
11627 * linux-low.c (linux_kill_one_lwp): New.
11628 (linux_kill_one_lwp): Rename to ...
11629 (kill_one_lwp_callback): ... this. Use the new
11630 linux_kill_one_lwp.
11631
11632 2012-02-02 Pedro Alves <palves@redhat.com>
11633
11634 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11635 inferior.
11636
11637 2012-01-27 Pedro Alves <palves@redhat.com>
11638
11639 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11640 (elf_64_file_p): Make static.
11641 (linux_pid_exe_is_elf_64_file): New.
11642 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11643 Delete declarations.
11644 (linux_pid_exe_is_elf_64_file): Declare.
11645 * linux-x86-low.c (x86_arch_setup): Use
11646 linux_pid_exe_is_elf_64_file.
11647
11648 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11649
11650 * linux-low.c (linux_wait_for_event_1): Rename to ...
11651 (linux_wait_for_event): ... here and merge it with former
11652 linux_wait_for_event - new variable wait_ptid, use it.
11653 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11654
11655 2012-01-23 Pedro Alves <palves@redhat.com>
11656
11657 * server.c (main): Avoid yet another case of infinite loop while
11658 detaching/killing after a longjmp.
11659
11660 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11661
11662 Code cleanup.
11663 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11664
11665 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11666
11667 * hostio.c (handle_readlink): New function.
11668 (handle_vFile): Call it to handle "vFile:readlink" packets.
11669
11670 2012-01-20 Pedro Alves <palves@redhat.com>
11671 Ulrich Weigand <ulrich.weigand@linaro.org>
11672
11673 * server.c (handle_v_requests): Only support vAttach and vRun to
11674 start multiple processes when in extended protocol mode.
11675
11676 2012-01-17 Pedro Alves <palves@redhat.com>
11677
11678 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11679 memalign plus mprotect to allocate the scratch buffer.
11680
11681 2012-01-13 Pedro Alves <palves@redhat.com>
11682
11683 * server.c (attach_inferior): Clear `cont_thread'.
11684
11685 2012-01-13 Pedro Alves <palves@redhat.com>
11686
11687 * server.c (main): Avoid infinite loop while detaching/killing
11688 after a longjmp.
11689
11690 2012-01-09 Doug Evans <dje@google.com>
11691
11692 * server.c (start_inferior): Set last_ptid in --wrapper case.
11693
11694 2012-01-06 Yao Qi <yao@codesourcery.com>
11695
11696 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11697 defined.
11698 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11699
11700 2012-01-04 Yao Qi <yao@codesourcery.com>
11701
11702 * tracepoint.c (cmd_qtdp): Print debug message
11703 for static tracepoint.
11704
11705 2012-01-04 Yao Qi <yao@codesourcery.com>
11706
11707 * tracepoint.c (trace_vdebug): Differentiate debug message
11708 between gdbserver and IPA.
11709
11710 2012-01-03 Yao Qi <yao@codesourcery.com>
11711
11712 * tracepoint.c (tracepoint_was_hit): Don't collect for
11713 static tracepoint.
11714
11715 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11716
11717 * terminal.h: Reformat copyright header.
11718
11719 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11720
11721 * server.c (gdbserver_version): Update copyright year.
11722 * gdbreplay.c (gdbreplay_version): Likewise.
11723
11724 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11725
11726 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11727
11728 Revert:
11729 2011-12-18 Hui Zhu <teawater@gmail.com>
11730 * linux-low.c (linux_create_inferior): Save return value to ret.
11731
11732 2011-12-18 Hui Zhu <teawater@gmail.com>
11733
11734 * linux-low.c (linux_create_inferior): Save return value to ret.
11735
11736 2011-12-16 Doug Evans <dje@google.com>
11737
11738 * linux-low.c (linux_create_inferior): If stdio connection,
11739 redirect stdin from /dev/null, stdout to stderr.
11740 * remote-utils.c (remote_is_stdio): New static global.
11741 (remote_connection_is_stdio): New function.
11742 (remote_prepare): Handle stdio connection.
11743 (remote_open): Ditto.
11744 (remote_close): Don't close stdin for stdio connections.
11745 (read_prim,write_prim): New functions. Replace all calls to
11746 read/write to these.
11747 * server.c (main): Watch for "-" argument. Move call to
11748 remote_prepare before start_inferior.
11749 * server.h (STDIO_CONNECTION_NAME): New macro.
11750 (remote_connection_is_stdio): Declare.
11751
11752 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11753 in debugging output.
11754
11755 2011-12-15 Yao Qi <yao@codesourcery.com>
11756
11757 * tracepoint.c: Include sys/syscall.h.
11758 (gdb_ust_thread): Remove preprocessor conditional.
11759
11760 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11761
11762 * linux-low.c (linux_detach_one_lwp): Call
11763 the_low_target.prepare_to_resume before detaching.
11764
11765 2011-12-14 Yao Qi <yao@codesourcery.com>
11766
11767 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11768 of write.
11769
11770 2011-12-14 Yao Qi <yao@codesourcery.com>
11771
11772 * i386-low.c (i386_low_stopped_data_address): Initialize local
11773 variable `control'.
11774
11775 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11776
11777 PR remote/13492
11778
11779 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11780 DR_CONTROL unless necessary. Extend comments.
11781 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11782 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11783
11784 2011-12-13 Yao Qi <yao@codesourcery.com>
11785
11786 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11787 macros.
11788 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11789
11790 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11791
11792 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11793 Print new debug message for such case.
11794
11795 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11796
11797 Fix overlapping memcpy.
11798 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11799 the read_inferior_memory transfer.
11800 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11801 write_inferior_memory transfer.
11802 (set_fast_tracepoint_jump): New variable buf. Use it for the
11803 read_inferior_memory and write_inferior_memory transfers.
11804 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11805 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11806 Use it for the write_inferior_memory transfer.
11807 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11808 buffers.
11809
11810 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11811
11812 * linux-low.c (fetch_register, store_register): Make code
11813 consistent, fix formatting.
11814
11815 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11816
11817 * linux-low.c (usr_store_inferior_registers): Factor out code
11818 to handle individual registers into...
11819 (store_register): ... this new function.
11820
11821 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11822
11823 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11824 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11825 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11826 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11827 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11828 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11829 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11830 (srv_xmlfiles): Add new XML files.
11831
11832 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11833 and <sys/uio.h>.
11834 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11835 (init_registers_s390_linux32v1): Add prototype.
11836 (init_registers_s390_linux32v2): Likewise.
11837 (init_registers_s390_linux64v1): Likewise.
11838 (init_registers_s390_linux64v2): Likewise.
11839 (init_registers_s390x_linux64v1): Likewise.
11840 (init_registers_s390x_linux64v2): Likewise.
11841 (s390_num_regs): Increment to 52.
11842 (s390_regmap): Add orig_r2 register.
11843 (s390_num_regs_3264): Increment to 68.
11844 (s390_regmap_3264): Add orig_r2 register.
11845 (s390_collect_ptrace_register): Handle orig_r2 register.
11846 (s390_supply_ptrace_register): Likewise.
11847 (s390_fill_last_break): New function.
11848 (s390_store_last_break): Likewise.
11849 (s390_fill_system_call): New function.
11850 (s390_store_system_call): Likewise.
11851 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11852 register sets.
11853 (s390_check_regset): New function.
11854 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11855 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11856 Update target_regsets for available register sets.
11857
11858 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11859 Jan Kratochvil <jan.kratochvil@redhat.com>
11860
11861 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11862 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11863 New.
11864 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11865 * linux-low.h (struct process_info_private): New member r_debug.
11866 * server.c (handle_qxfer_libraries): Call
11867 the_target->qxfer_libraries_svr4.
11868 (handle_qxfer_libraries_svr4): New function.
11869 (qxfer_packets): New entry "libraries-svr4".
11870 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11871 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11872 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11873 PACKET_qXfer_libraries_svr4.
11874
11875 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11876
11877 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11878 PSW address/mask between 8-byte and 16-byte formats.
11879 (s390_supply_ptrace_register): Likewise.
11880 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11881 basic addressing mode bit.
11882
11883 2011-11-24 Stan Shebs <stan@codesourcery.com>
11884
11885 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11886
11887 2011-11-17 Stan Shebs <stan@codesourcery.com>
11888
11889 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11890 (tracing_start_time): New global.
11891 (tracing_stop_time): New global.
11892 (tracing_user_name): New global.
11893 (tracing_notes): New global.
11894 (tracing_stop_note): New global.
11895 (cmd_qtstart): Set traceframe_usage, start_time.
11896 (stop_tracing): Set stop_time.
11897 (cmd_qtstatus): Report additional status.
11898 (cmd_qtp): New function.
11899 (handle_tracepoint_query): Call it.
11900 (cmd_qtnotes): New function.
11901 (handle_tracepoint_general_set): Call it.
11902 (get_timestamp): Rename from tsv_get_timestamp.
11903
11904 2011-11-14 Stan Shebs <stan@codesourcery.com>
11905 Kwok Cheung Yeung <kcy@codesourcery.com>
11906
11907 * linux-x86-low.c (small_jump_insn): New.
11908 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11909 trampoline and error message, build a trampoline and issue a small
11910 jump instruction to it.
11911 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11912 trampoline and error message.
11913 (x86_get_min_fast_tracepoint_insn_len): New.
11914 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11915 * linux-low.h (struct linux_target_ops): Add arguments to
11916 install_fast_tracepoint_jump_pad operation, add new operation.
11917 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11918 arguments.
11919 (linux_get_min_fast_tracepoint_insn_len): New function.
11920 (linux_target_op): Add new operation.
11921 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11922 (gdb_trampoline_buffer_end): Ditto.
11923 (gdb_trampoline_buffer_error): Ditto.
11924 (struct ipa_sym_addresses): Add fields for new IPA variables.
11925 (symbol_list): Add entries for new IPA variables.
11926 (struct tracepoint): Add fields to hold the address range of the
11927 trampoline used by the tracepoint.
11928 (trampoline_buffer_head): New static variable.
11929 (trampoline_buffer_tail): Ditto.
11930 (claim_trampoline_space): New function.
11931 (have_fast_tracepoint_trampoline_buffer): New function.
11932 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11933 structure.
11934 (install_fast_tracepoint): Ditto, also add error buffer argument.
11935 (cmd_qtminftpilen): New function.
11936 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11937 (fast_tracepoint_from_trampoline_address): New function.
11938 (fast_tracepoint_collecting): Handle trampoline as part of jump
11939 pad space.
11940 (set_trampoline_buffer_space): New function.
11941 (initialize_tracepoint): Initialize new IPA variables.
11942 * target.h (struct target_ops): Add arguments to
11943 install_fast_tracepoint_jump_pad operation, add new
11944 get_min_fast_tracepoint_insn_len operation.
11945 (target_get_min_fast_tracepoint_insn_len): New.
11946 (install_fast_tracepoint_jump_pad): Add arguments.
11947 * server.h (IPA_BUFSIZ): Define.
11948 * linux-i386-ipa.c: Include extra header files.
11949 (initialize_fast_tracepoint_trampoline_buffer): New function.
11950 (initialize_low_tracepoint): Call it.
11951 * server.h (set_trampoline_buffer_space): Declare.
11952 (claim_trampoline_space): Ditto.
11953 (have_fast_tracepoint_trampoline_buffer): Ditto.
11954
11955 2011-11-14 Yao Qi <yao@codesourcery.com>
11956
11957 * server.c (handle_query): Handle InstallInTrace for qSupported.
11958 * tracepoint.c (add_tracepoint): Sort list.
11959 (install_tracepoint, download_tracepoint): New.
11960 (cmd_qtdp): Call them to install and download tracepoints.
11961 (sort_tracepoints): Removed.
11962 (cmd_qtstart): Update.
11963
11964 2011-11-14 Yao Qi <yao@codesourcery.com>
11965
11966 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11967 * mem-break.h: Declare.
11968 * tracepoint.c (cmd_qtstart): Move some code to ...
11969 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11970 New.
11971 (download_tracepoints): Move some code to ...
11972 (download_tracepoint_1): ... here. New.
11973
11974 2011-11-08 Yao Qi <yao@codesourcery.com>
11975
11976 * remote-utils.c (relocate_instruction): A comment fix.
11977
11978 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11979
11980 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11981 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11982 dr_status_mirror and dr_control_mirror from debug_reg_state.
11983 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11984 (i386_initial_stuff): Remove use of deleted globals.
11985 (i386_get_thread_context, i386_set_thread_context,
11986 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11987 from debug_reg_state.
11988
11989 2011-11-05 Yao Qi <yao@codesourcery.com>
11990
11991 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11992 address as TPOINT's.
11993
11994 2011-11-02 Stan Shebs <stan@codesourcery.com>
11995
11996 * tracepoint.c (agent_mem_read_string): New function.
11997 (eval_agent_expr): Call it for tracenz.
11998 * server.c (handle_query): Report support for tracenz.
11999
12000 2011-11-02 Yao Qi <yao@codesourcery.com>
12001
12002 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12003
12004 2011-11-02 Yao Qi <yao@codesourcery.com>
12005
12006 * target.h: Fix a typo in comment.
12007
12008 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12009
12010 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12011 clobber the breakpoints' shadows with fast tracepoint jumps.
12012 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12013 * target.c (write_inferior_memory): Also pass MYADDR down to
12014 check_mem_write.
12015
12016 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12017
12018 * configure.ac: Check support for personality routine.
12019 * configure: Regenerate.
12020 * config.in: Likewise.
12021 * linux-low.c: Include <sys/personality.h>.
12022 Define ADDR_NO_RANDOMIZE if necessary.
12023 (linux_create_inferior): Disable address space randomization when
12024 forking inferior, if requested.
12025 (linux_supports_disable_randomization): New function.
12026 (linux_target_ops): Install it.
12027 * server.h (disable_randomization): Declare.
12028 * server.c (disable_randomization): New global variable.
12029 (handle_general_set): Handle QDisableRandomization.
12030 (handle_query): Likewise for qSupported.
12031 (main): Support --disable-randomization and --no-disable-randomization
12032 command line arguments.
12033 * target.h (struct target_ops): Add supports_disable_randomization.
12034 (target_supports_disable_randomization): New macro.
12035
12036 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12037
12038 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12039 ifdef check.
12040 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12041 [!PT_GETDSBT] (target_loadmap): New definition.
12042 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12043 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12044 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12045 and PT_GETDSBT to LINUX_LOADMAP.
12046 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12047 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12048
12049 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12050
12051 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12052 (arm_linux_hwbp_cap): New static variable.
12053 (arm_linux_get_hwbp_cap): Replace by ...
12054 (arm_linux_init_hwbp_cap): ... this new function.
12055 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12056 (arm_linux_get_hw_watchpoint_count): Likewise.
12057 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12058 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12059 (arm_prepare_to_resume): Use perror_with_name instead of error.
12060
12061 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12062
12063 * linux-arm-low.c: Include <signal.h>.
12064 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12065 (struct arm_linux_hwbp_cap): New data type.
12066 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12067 (struct arm_linux_hw_breakpoint): New data type.
12068 (MAX_BPTS, MAX_WPTS): Define.
12069 (struct arch_process_info, struct arch_lwp_info): New data types.
12070 (arm_linux_get_hwbp_cap): New function.
12071 (arm_linux_get_hw_breakpoint_count): Likewise.
12072 (arm_linux_get_hw_watchpoint_count): Likewise.
12073 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12074 (arm_hwbp_control_initialize): Likewise.
12075 (arm_hwbp_control_is_enabled): Likewise.
12076 (arm_hwbp_control_is_initialized): Likewise.
12077 (arm_hwbp_control_disable): Likewise.
12078 (arm_linux_hw_breakpoint_equal): Likewise.
12079 (arm_linux_hw_point_initialize): Likewise.
12080 (struct update_registers_data): New data structure.
12081 (update_registers_callback: New function.
12082 (arm_insert_point): Likewise.
12083 (arm_remove_point): Likewise.
12084 (arm_stopped_by_watchpoint): Likewise.
12085 (arm_stopped_data_address): Likewise.
12086 (arm_new_process): Likewise.
12087 (arm_new_thread): Likewise.
12088 (arm_prepare_to_resume): Likewise.
12089 (the_low_target): Register arm_insert_point, arm_remove_point,
12090 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12091 arm_new_thread, and arm_prepare_to_resume.
12092
12093 2011-09-15 Stan Shebs <stan@codesourcery.com>
12094
12095 * server.h (struct emit_ops): Add compare-goto fields.
12096 * tracepoint.c (gdb_agent_op_sizes): New table.
12097 (emit_eq_goto): New function.
12098 (emit_ne_goto): New function.
12099 (emit_lt_goto): New function.
12100 (emit_le_goto): New function.
12101 (emit_gt_goto): New function.
12102 (emit_ge_goto): New function.
12103 (is_goto_target): New function.
12104 (compile_bytecodes): Recognize special cases of compare-goto
12105 combinations and call specialized emitters for them.
12106 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12107 (amd64_emit_ne_goto): New function.
12108 (amd64_emit_lt_goto): New function.
12109 (amd64_emit_le_goto): New function.
12110 (amd64_emit_gt_goto): New function.
12111 (amd64_emit_ge_goto): New function.
12112 (amd64_emit_ops): Add the new functions.
12113 (i386_emit_eq_goto): New function.
12114 (i386_emit_ne_goto): New function.
12115 (i386_emit_lt_goto): New function.
12116 (i386_emit_le_goto): New function.
12117 (i386_emit_gt_goto): New function.
12118 (i386_emit_ge_goto): New function.
12119 (i386_emit_ops): Add the new functions.
12120
12121 2011-09-08 Stan Shebs <stan@codesourcery.com>
12122
12123 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12124 (i386_emit_epilogue): Restore %ebx.
12125
12126 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12127
12128 * server.c (step_thread): Remove definition.
12129 (process_serial_event): Don't handle Hs.
12130 * server.h (step_thread): Remove declaration.
12131 * target.c (set_desired_inferior): Remove use of step_thread.
12132
12133 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12134
12135 * linux-low.c: Include linux-procfs.h.
12136 (linux_attach_lwp_1): Update comments.
12137 (linux_attach): Scan for existing threads when attaching to a
12138 process that is the tgid.
12139 * Makefile.in: Update dependencies.
12140
12141 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12142
12143 * configure.srv: Add linux-procfs.o dependencies.
12144
12145 2011-08-14 Yao Qi <yao@codesourcery.com>
12146
12147 * target.h (struct target_ops): Fix indent.
12148 * win32-low.c (win32_target_ops): Fix comment.
12149
12150 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12151 Yao Qi <yao@codesourcery.com>
12152
12153 * Makefile.in (clean): Remove tic6x-*.c files.
12154 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12155 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12156 (tic6x-c64xp-linux.c): Likewise.
12157 * configure.srv: Add support for tic6x-*-uclinux.
12158 * linux-tic6x-low.c: New.
12159 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12160
12161 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12162 Yao Qi <yao@codesourcery.com>
12163
12164 * target.h (struct target_ops): Add read_loadmap.
12165 * linux-low.c (struct target_loadseg): New type.
12166 (struct target_loadmap): New type.
12167 (linux_read_loadmap): New function.
12168 (linux_target_ops): Add linux_read_loadmap.
12169 * server.c (handle_query): Support qXfer:fdpic:read packet.
12170 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12171 to NULL.
12172
12173 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12174
12175 * win32-low.c: Include <stdint.h>.
12176
12177 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12178
12179 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12180 to the inferior here.
12181 (i386_remove_aligned_watchpoint): Ditto.
12182 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12183 fit part of the watchpoint in the debug registers.
12184 (i386_update_inferior_debug_regs): New.
12185 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12186 registers, and only update the inferior on success.
12187 (i386_low_remove_watchpoint): Ditto.
12188
12189 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12190
12191 * linux-low.c (compare_ints, unique, list_threads, show_process,
12192 linux_core_of_thread): Delete.
12193 (linux_target_ops): Change linux_core_of_thread to
12194 linux_common_core_of_thread.
12195 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12196 * utils.c (malloc_failure): Change type of argument.
12197 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12198 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12199 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12200 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12201 (IPA_OBJS): Add common-utils-ipa.o.
12202 (ptid_h, linux_osdata_h): New macros.
12203 (server_h): Add common/common-utils.h, common/xml-utils.h,
12204 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12205 common/ptid.h.
12206 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12207 ptid.o, buffer.o): New rules.
12208 (linux-low.o): Add common/linux-osdata.h as a dependency.
12209 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12210 * configure.ac: Add AC_HEADER_DIRENT check.
12211 * config.in: Regenerate.
12212 * configure: Regenerate.
12213 * remote-utils.c (xml_escape_text): Delete.
12214 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12215 buffer_xml_printf): Move to common/buffer.c.
12216 * server.c (main): Remove call to initialize_inferiors.
12217 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12218 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12219 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12220 internal_error, gdb_assert, gdb_assert_fail): Delete.
12221 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12222 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12223 common/buffer.h.
12224 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12225 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12226 initialize_inferiors): Delete.
12227
12228 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12229
12230 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12231 symbol error.
12232
12233 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12234
12235 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12236 assertion.
12237 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12238
12239 2011-05-26 Yao Qi <yao@codesourcery.com>
12240
12241 * Makefile.in (thread-db.o): Track dependence to
12242 common/gdb_thread_db.h.
12243 * thread-db.c: include gdb_thread_db.h from right place.
12244
12245 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12246
12247 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12248 __FILE__ and __LINE__ to internal_error.
12249
12250 2011-05-13 Doug Evans <dje@google.com>
12251
12252 * thread-db.c (try_thread_db_load_from_sdir): New function.
12253 (try_thread_db_load_from_dir): New function.
12254 (thread_db_load_search): Handle $sdir, ignore $pdir.
12255 Remove trying of system directories if search of
12256 libthread-db-search-path fails, that is now done via $sdir.
12257
12258 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12259
12260 * server.c (handle_query): Add EnableDisableTracepoints to the list
12261 of supported features.
12262 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12263 tracepoints.
12264 (cmd_qtenable_disable): New.
12265 (cmd_qtstart): Install tracepoints even if disabled.
12266 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12267 receiving a QTEnable or QTDisable packet.
12268 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12269 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12270 tracepoints.
12271 (gdb_probe): Skip data collection if static tracepoint is disabled.
12272
12273 2011-05-10 Doug Evans <dje@google.com>
12274
12275 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12276
12277 2011-05-04 Doug Evans <dje@google.com>
12278
12279 * linux-low.c (linux_join): Skip process lookup.
12280 * spu-low.c (spu_join): Ditto.
12281 * server.c (join_inferiors_callback): Delete.
12282 (process_serial_event): For 'D' packet (detach) call join_inferior
12283 directly.
12284
12285 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12286
12287 * README: Don't mention xscale*-*-linux*.
12288 * configure.srv (xscale*-*-linux*): Don't handle target.
12289
12290 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12291
12292 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12293 casting pointers.
12294 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12295 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12296 (i386_emit_void_call_2): Likewise.
12297
12298 2011-04-26 Yao Qi <yao@codesourcery.com>
12299
12300 * linux-low.c: Move common macros to linux-ptrace.h.
12301 Include linux-ptrace.h.
12302 * Makefile.in (linux_ptrace_h): New.
12303 (linux-low.o): Depends on linux-ptrace.h.
12304
12305 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12306
12307 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12308 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12309 (remote_prepare): New function with most of the TCP code from ...
12310 (remote_open): ... here. Detect PORT here unconditionally. Move also
12311 setting transport_is_reliable.
12312 * server.c (run_once): New variable.
12313 (gdbserver_usage): Document it.
12314 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12315 the first run if RUN_ONCE.
12316 * server.h (run_once, remote_prepare): New declarations.
12317
12318 2011-04-19 Tom Tromey <tromey@redhat.com>
12319
12320 * win32-low.c (handle_load_dll): Remove duplicate "the".
12321
12322 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12323
12324 Remove support for old Cygwin 1.5 versions.
12325 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12326 function to avoid warning.
12327 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12328 warning.
12329
12330 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12331
12332 * gdbserver/server.h (Macro _): Define it if not available.
12333
12334 2011-03-14 Michael Snyder <msnyder@vmware.com>
12335
12336 * hostio.c (handle_close): Remove unnecessary null test.
12337
12338 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12339
12340 * Makefile.in (maintainer-clean realclean distclean): Remove
12341 "make ... subdir_do" command.
12342
12343 2011-03-10 Michael Snyder <msnyder@vmware.com>
12344
12345 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12346
12347 * server.c (handle_v_run): Free alloced buffer on early return.
12348
12349 2011-03-09 Yao Qi <yao@codesourcery.com>
12350
12351 Revert:
12352 2011-03-04 Yao Qi <yao@codesourcery.com>
12353
12354 * Makefile.in: Remove GNU make feature --directory.
12355
12356 2011-03-05 Yao Qi <yao@codesourcery.com>
12357
12358 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12359 (subdir_do): New make target. Copied from gdb/Makefile.
12360 (maintainer-clean, realclean, distclean, clean): Call corresponding
12361 make targets in common/Makefile.
12362
12363 2011-02-11 Yao Qi <yao@codesourcery.com>
12364
12365 * configure.ac: Call AC_PROG_RANLIB.
12366 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12367 * configure: Regenerate.
12368
12369 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12370
12371 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12372
12373 2011-03-06 Yao Qi <yao@codesourcery.com>
12374
12375 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12376
12377 2011-03-05 Yao Qi <yao@codesourcery.com>
12378
12379 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12380 (subdir_do): New make target. Copied from gdb/Makefile.
12381 (maintainer-clean, realclean, distclean, clean): Call corresponding
12382 make targets in common/Makefile.
12383
12384 2011-03-04 Yao Qi <yao@codesourcery.com>
12385
12386 * Makefile.in: Remove GNU make feature --directory.
12387
12388 2011-03-04 Michael Snyder <msnyder@vmware.com>
12389
12390 * server.c (queue_stop_reply): Call xmalloc not malloc.
12391
12392 2011-03-02 Michael Snyder <msnyder@vmware.com>
12393
12394 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12395
12396 2011-02-28 Michael Snyder <msnyder@vmware.com>
12397
12398 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12399 (cmd_qtframe): Ditto.
12400 (cmd_qtbuffer): Ditto.
12401 (cmd_bigqtbuffer): Ditto.
12402
12403 * utils.c (decimal2str): Initialize 'width' to nine, then
12404 don't mess with it.
12405
12406 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12407
12408 * hostio.c (require_data): Free *data, not data.
12409
12410 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12411
12412 * hostio.c (require_data): Use free, not xfree.
12413
12414 2011-02-27 Michael Snyder <msnyder@vmware.com>
12415
12416 * server.c (handle_query): Discard unused value.
12417
12418 * hostio.c (require_data): Free malloc memory before returning
12419 error.
12420
12421 2011-02-26 Michael Snyder <msnyder@vmware.com>
12422
12423 * linux-low.c (list_threads): Call closedir for dirent.
12424
12425 2011-02-27 Michael Snyder <msnyder@vmware.com>
12426
12427 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12428 a case statement falls through.
12429
12430 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12431
12432 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12433 in comparison.
12434
12435 2011-02-26 Michael Snyder <msnyder@vmware.com>
12436
12437 * utils.c (decimal2str): Eliminate dead code and dead param.
12438 (pulongest): Drop dead param from call to decimal2str.
12439 (plongest): Ditto.
12440
12441 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12442
12443 Revert the following patch (not approved yet):
12444 2011-02-21 Hui Zhu <teawater@gmail.com>
12445 * tracepoint.c (tp_printf): New function.
12446 (eval_agent_expr): Handle gdb_agent_op_printf.
12447
12448 2011-02-21 Hui Zhu <teawater@gmail.com>
12449
12450 * tracepoint.c (tp_printf): New function.
12451 (eval_agent_expr): Handle gdb_agent_op_printf.
12452
12453 2011-02-18 Tom Tromey <tromey@redhat.com>
12454
12455 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12456 (tracepoint.o): Likewise.
12457 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12458 (gdb_agent_op_names): Likewise.
12459
12460 2011-02-18 Tom Tromey <tromey@redhat.com>
12461
12462 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12463 gdb_agent_op_rot>: New constants.
12464 (gdb_agent_op_names): Add pick and roll.
12465 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12466 cases.
12467
12468 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12469
12470 * aclocal.m4: Regenerated with aclocal-1.11.1.
12471
12472 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12473
12474 * server.c (handle_qxfer_traceframe_info): New.
12475 (qxfer_packets): Register "traceframe-info".
12476 (handle_query): Report support for qXfer:traceframe-info:read+.
12477 * tracepoint.c (match_blocktype): New.
12478 (traceframe_find_block_type): Rename to ...
12479 (traceframe_walk_blocks): ... this. Add callback filter argument,
12480 and use it.
12481 (traceframe_find_block_type): New, reimplemented on top of
12482 traceframe_walk_blocks.
12483 (build_traceframe_info_xml): New.
12484 (traceframe_read_info): New.
12485 * server.h (traceframe_read_info): Declare.
12486
12487 2011-02-11 Yao Qi <yao@codesourcery.com>
12488
12489 * configure.ac: Call AC_PROG_RANLIB.
12490 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12491 * configure: Regenerate.
12492
12493 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12494
12495 * server.c (gdb_read_memory): Change return semantics to allow
12496 partial transfers.
12497 (handle_search_memory_1): Adjust.
12498 (process_serial_event) <'m' packet>: Handle partial transfers.
12499 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12500
12501 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12502
12503 * regcache.c (init_register_cache): Initialize
12504 regcache->register_status.
12505 (free_register_cache): Release regcache->register_status.
12506 (regcache_cpy): Copy register_status.
12507 (registers_to_string): Print 'x's for unavailable registers.
12508 (supply_register): Mark the register's status valid or
12509 unavailable, depending on whether a buffer was passed in or not.
12510 (supply_register_zeroed): New.
12511 (supply_regblock): Mark the registers' status valid or
12512 unavailable, depending on whether a buffer was passed in or not.
12513 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12514 (struct regcache): New `register_status' field.
12515 (supply_register_zeroed): Declare.
12516 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12517 supply_register_zeroed, rather than passing a NULL buffer to
12518 supply_register.
12519 * tracepoint.c (fetch_traceframe_registers): Update comment.
12520
12521 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12522
12523 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12524 buffer explicit.
12525
12526 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12527
12528 * server.h (decode_xfer_write): Change prototype.
12529 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12530 and don't extract the annex here.
12531 * server.c (decode_xfer_read): Remove `annex' parameter,
12532 and don't extract the annex here.
12533 (decode_xfer): New.
12534 (struct qxfer): New.
12535 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12536 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12537 (handle_qxfer_statictrace): New functions, abstracted out from
12538 handle_query, and made to use the struct qxfer interface.
12539 (handle_threads_qxfer_proper): Rename to ...
12540 (handle_qxfer_threads_proper): ... this.
12541 (handle_threads_qxfer): Rename to ...
12542 (handle_qxfer_threads): ... this. Adjust.
12543 (qxfer_packets): New array.
12544 (handle_qxfer): New function.
12545 (handle_query): Use handle_qxfer.
12546
12547 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12548
12549 * gdbreplay.c: Shorten lines of >= 80 columns.
12550 * linux-low.c: Ditto.
12551 * linux-ppc-low.c: Ditto.
12552 * linux-s390-low.c: Ditto.
12553 * linux-sparc-low.c: Ditto.
12554 * linux-x86-low.c: Ditto.
12555 * linux-xtensa-low.c: Ditto.
12556 * mem-break.c: Ditto.
12557 * nto-low.c: Ditto.
12558 * regcache.h: Ditto.
12559 * remote-utils.c: Ditto.
12560 * server.c: Ditto.
12561 * server.h: Ditto.
12562 * thread-db.c: Ditto.
12563 * tracepoint.c: Ditto.
12564 * utils.c: Ditto.
12565 * win32-low.h: Ditto.
12566
12567 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12568
12569 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12570 update.
12571
12572 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12573
12574 * server.c (gdbserver_version): Update copyright year in version
12575 output.
12576 * gdbreplay.c (gdbreplay_version): Ditto.
12577
12578 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12579
12580 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12581 * linux-bfin-low.c: New file.
12582 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12583 PT_DATA_ADDR for BFIN targets.
12584 * Makefile.in (SFILES): Add linux-bfin-low.c.
12585 (clean): Remove reg-bfin.c.
12586 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12587 * README: Mention supported Blackfin targets.
12588
12589 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12590
12591 * .gitignore: New file.
12592
12593 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12594
12595 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12596
12597 2010-10-22 Jie Zhang <jie@codesourcery.com>
12598
12599 * Makefile.in: Add FLAGS_TO_PASS variable.
12600 (install): Remove dependency of install-only and recursively
12601 invoke make for install-only.
12602
12603 2010-10-04 Doug Evans <dje@google.com>
12604
12605 * Makefile.in (uninstall): Use $(DESTDIR).
12606
12607 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12608
12609 PR gdb/11842
12610
12611 * linux-x86-low.c (compat_siginfo_from_siginfo)
12612 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12613 si_code is < 0. Check for si_code == SI_TIMER before checking for
12614 si_code < 0.
12615
12616 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12617
12618 * lynx-i386-low.c: New file.
12619 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12620
12621 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12622
12623 * lynx-low.c (ptrace_request_to_str): Remove handling for
12624 request values that have been removed in LynxOS 5.x.
12625
12626 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12627
12628 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12629 <ptrace.h>
12630
12631 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12632
12633 * configure.ac: Add --enable-inprocess-agent option.
12634 * configure: Rebuilt.
12635
12636 2010-09-06 Yao Qi <yao@codesourcery.com>
12637
12638 * linux-low.c (linux_kill): Remove unused variable.
12639 (linux_stabilize_threads): Likewise.
12640 * server.c (start_inferior): Likewise.
12641 (queue_stop_reply_callback): Likewise.
12642 * tracepoint.c (do_action_at_tracepoint): Likewise.
12643
12644 2010-09-06 Yao Qi <yao@codesourcery.com>
12645
12646 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12647 on return.
12648
12649 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12650
12651 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12652
12653 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12654
12655 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12656 "$(IPA_DEPFILES)".
12657
12658 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12659
12660 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12661 gdbserver/lynx-ppc-low.c: New files.
12662 * Makefile.in (lynx_low_h): New variable.
12663 (lynx-low.o, lynx-ppc-low.o): New rules.
12664 * configure.ac: On LynxOS, link with -lnetinet.
12665 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12666 * configure: regenerate.
12667
12668 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12669
12670 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12671 * configure.ac: Add check for vasprintf and vsnprintf.
12672 * configure, config.in: Regenerate.
12673 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12674
12675 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12676
12677 * gdbreplay.c: Move include of alloca.h up, next to include of
12678 malloc.h.
12679 * server.h: Add include of malloc.h.
12680 * mem-break.c: Remove include of malloc.h.
12681 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12682
12683 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12684
12685 * Makefile.in (memmem.o): Build with -Wno-error.
12686
12687 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12688
12689 * utils.c (xsnprintf): Make non-static.
12690 * server.h: Add xsnprintf declaration.
12691 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12692 replace calls to snprintf by calls to xsnprintf throughout.
12693
12694 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12695
12696 * configure.ac: Add configure check for alloca.
12697 * configure, config.in: Regenerate.
12698 * server.h: Include alloca.h if it exists.
12699 * gdbreplay.c: Include alloca.h if it exists.
12700
12701 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12702
12703 * linux-low.c (__SIGRTMIN): Define if not already defined.
12704 (linux_create_inferior): Check for __ANDROID__ rather than
12705 __SIGRTMIN.
12706 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12707 are already deferred.
12708 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12709 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12710 stopped and already has a pending signal to report.
12711 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12712 a pending signal to report or is moving out of a jump pad.
12713 (linux_init_signals): Check for __ANDROID__ rather than
12714 __SIGRTMIN.
12715
12716 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12717
12718 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12719 debug_threads check. Avoid a linear search when not doing debug
12720 output.
12721
12722 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12723
12724 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12725 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12726 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12727 (process_event): Change local fd's type to gdb_fildes_t.
12728 (create_file_handler): Adjust prototype.
12729 (delete_file_handler): Adjust prototype.
12730 (handle_file_event): Adjust prototype. Use pfildes.
12731 (create_file_event): Adjsut prototype.
12732 * remote-utils.c (remote_desc, listen_desc): Change type to
12733 gdb_fildes_t.
12734 * server.h: New gdb_fildes_t typedef.
12735 [USE_WIN32API]: Include winsock2.h.
12736 (delete_file_handler, add_file_handler): Adjust prototypes.
12737 (pfildes): Declare.
12738 * utils.c (pfildes): New.
12739
12740 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12741
12742 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12743 * configure: Regenerate.
12744
12745 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12746
12747 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12748 (linux_done_accessing_memory): ... this.
12749 (linux_target_ops): Adjust.
12750 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12751 * nto-low.c (nto_target_ops): Adjust comment.
12752 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12753 * spu-low.c (spu_target_ops): Adjust comment.
12754 * target.h (target_ops): Rename unprepare_to_access_memory field
12755 to done_accessing_memory.
12756 (unprepare_to_access_memory): Rename to ...
12757 (done_accessing_memory): ... this.
12758
12759 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12760
12761 * linux-low.c (linux_prepare_to_access_memory): New.
12762 (linux_unprepare_to_access_memory): New.
12763 (linux_target_ops): Install them.
12764 * server.c (read_memory): Rename to ...
12765 (gdb_read_memory): ... this. Use
12766 prepare_to_access_memory/prepare_to_access_memory.
12767 (write_memory): Rename to ...
12768 (gdb_write_memory): ... this. Use
12769 prepare_to_access_memory/prepare_to_access_memory.
12770 (handle_search_memory_1): Adjust.
12771 (process_serial_event): Adjust.
12772 * target.h (struct target_ops): New fields
12773 prepare_to_access_memory and unprepare_to_access_memory.
12774 (prepare_to_access_memory, unprepare_to_access_memory): New.
12775 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12776 prepare_to_access_memory/prepare_to_access_memory.
12777 * nto-low.c (nto_target_ops): Adjust.
12778 * spu-low.c (spu_target_ops): Adjust.
12779 * win32-low.c (win32_target_ops): Adjust.
12780
12781 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12782
12783 * Makefile.in (WARN_CFLAGS): Get it from configure.
12784 (WERROR_CFLAGS): New.
12785 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12786 * configure.ac: Introduce --enable-werror, which adds -Werror to
12787 the compiler command line. Enabled by default. Disable with
12788 --disable-werror. Add -Wdeclaration-after-statement
12789 Wpointer-arith and -Wformat-nonliteral to warning flags.
12790 * configure: Regenerate.
12791
12792 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12793
12794 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12795
12796 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12797
12798 * gdbreplay.c (remote_error): New.
12799 (gdbchar): New.
12800 (expect): Use gdbchar. Check for error reading from GDB.
12801 Clarify sync error output.
12802 (play): Check for errors writing to GDB.
12803 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12804 * remote-utils.c (getpkt): Check for errors writing to the remote
12805 descriptor.
12806
12807 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12808
12809 * linux-low.c (linux_wait_1): Move non-debugging code out of
12810 `debug_threads' control.
12811
12812 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12813
12814 * linux-low.c (linux_wait_1): Don't set last_status here.
12815 * server.c (push_event, queue_stop_reply_callback): Assert we're
12816 not pushing a TARGET_WAITKIND_IGNORE event.
12817 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12818 (myresume, handle_target_event): Set the thread's last_resume_kind
12819 and last_status from the target returned status.
12820
12821 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12822
12823 PR threads/10729
12824
12825 * linux-x86-low.c (update_debug_registers_callback): New.
12826 (i386_dr_low_set_addr): Use it.
12827 (i386_dr_low_get_addr): New.
12828 (i386_dr_low_set_control): Use update_debug_registers_callback.
12829 (i386_dr_low_get_control): New.
12830 (i386_dr_low_get_status): Adjust.
12831 * linux-low.c (linux_stop_lwp): New.
12832 * linux-low.h (linux_stop_lwp): Declare.
12833
12834 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12835 argument instead of a i386_debug_reg_state.
12836 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12837 a i386_debug_reg_state.
12838 (i386_insert_aligned_watchpoint): Adjust.
12839 (i386_remove_aligned_watchpoint): Adjust.
12840 (i386_low_stopped_data_address): Read the debug registers from the
12841 inferior instead of from the mirrors.
12842 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12843 (i386_dr_low_get_addr): Declare.
12844 (i386_dr_low_get_control): Declare.
12845 (i386_dr_low_get_status): Change prototype.
12846
12847 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12848 (i386_dr_low_get_addr): New.
12849 (i386_dr_low_get_control): New.
12850 (i386_dr_low_get_status): Adjust prototype. Return
12851 dr_status_mirror.
12852 (i386_initial_stuff): Clear dr_status_mirror and
12853 dr_control_mirror.
12854 (i386_get_thread_context): Adjust.
12855 (i386_set_thread_context): Adjust.
12856 (i386_thread_added): Adjust.
12857
12858 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12859
12860 * linux-low.h (linux_thread_area): Delete declaration.
12861
12862 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12863
12864 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12865 after its termination.
12866
12867 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12868
12869 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12870 (gdb_wants_all_stopped): Delete.
12871 (linux_wait_1): Don't call them.
12872 * server.c (handle_v_cont): Tag all threads as want-stopped.
12873 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12874 stopped as "client-wants-stopped".
12875
12876 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12877
12878 * Makefile.in (signals_h): New.
12879 (server_h): Depend on it.
12880 (server.o): Don't depend on $(signals_def).
12881 (signals.o): Depend on $(signals_def).
12882
12883 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12884
12885 * Makefile.in (signals_def): New.
12886 (server_h): Append include/gdb/signals.h and signals_def.
12887 (server.o): Append signals_def.
12888
12889 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12890
12891 * server.c (handle_target_event): Use target_signal_to_host for
12892 resume_info.sig initialization.
12893 * target.h (struct thread_resume) <sig>: New comment.
12894
12895 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12896
12897 * server.c (handle_query): strcpy() the returned string from paddress()
12898 instead of sprintf().
12899 * utils.c (paddress): Return phex_nz().
12900
12901 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12902
12903 * server.c (handle_v_cont): Call mourn_inferior if process
12904 just exited.
12905 (myresume): Likewise.
12906
12907 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12908
12909 Static tracepoints, and integration with UST.
12910
12911 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12912 * mem-break.c (uninsert_all_breakpoints)
12913 (reinsert_all_breakpoints): New.
12914 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12915 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12916 (gdb_agent_ust_loaded, helper_thread_id)
12917 (gdb_agent_helper_thread_id): New macros.
12918 (struct ipa_sym_addresses): Add addr_ust_loaded,
12919 addr_helper_thread_id, addr_cmd_buf.
12920 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12921 (in_process_agent_loaded_ust): New.
12922 (write_e_ust_not_loaded): New.
12923 (maybe_write_ipa_ust_not_loaded): New.
12924 (struct collect_static_trace_data_action): New.
12925 (enum tracepoint_type) <static_tracepoint>: New.
12926 (struct tracepoint) <handle>: Mention static tracepoints.
12927 (struct static_tracepoint_ctx): New.
12928 (CMD_BUF_SIZE): New.
12929 (add_tracepoint_action): Handle static tracepoint actions.
12930 (unprobe_marker_at): New.
12931 (clear_installed_tracepoints): Handle static tracepoints.
12932 (cmd_qtdp): Handle static tracepoints.
12933 (probe_marker_at): New.
12934 (cmd_qtstart): Handle static tracepoints.
12935 (response_tracepoint): Handle static tracepoints.
12936 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12937 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12938 (get_context_regcache): Handle static tracepoints.
12939 (do_action_at_tracepoint): Handle static tracepoint actions.
12940 (traceframe_find_block_type): Handle static trace data blocks.
12941 (traceframe_read_sdata): New.
12942 (download_tracepoints): Download static tracepoint actions.
12943 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12944 (GDB_PROBE_NAME): New.
12945 (ust_ops): New.
12946 (GET_UST_SYM): New.
12947 (USTF): New.
12948 (dlsym_ust): New.
12949 (ust_marker_to_static_tracepoint): New.
12950 (gdb_probe): New.
12951 (collect_ust_data_at_tracepoint): New.
12952 (gdb_ust_probe): New.
12953 (UNIX_PATH_MAX, SOCK_DIR): New.
12954 (gdb_ust_connect_sync_socket): New.
12955 (resume_thread, stop_thread): New.
12956 (run_inferior_command): New.
12957 (init_named_socket): New.
12958 (gdb_ust_socket_init): New.
12959 (cstr_to_hexstr): New.
12960 (next_st): New.
12961 (first_marker, next_marker): New.
12962 (response_ust_marker): New.
12963 (cmd_qtfstm, cmd_qtsstm): New.
12964 (unprobe_marker_at, probe_marker_at): New.
12965 (cmd_qtstmat, gdb_ust_thread): New.
12966 (gdb_ust_init): New.
12967 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12968 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12969 (ST_REGENTRY): New.
12970 (x86_64_st_collect_regmap): New.
12971 (X86_64_NUM_ST_COLLECT_GREGS): New.
12972 (AMD64_RIP_REGNUM): New.
12973 (supply_static_tracepoint_registers): New.
12974 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12975 (ST_REGENTRY): New.
12976 (i386_st_collect_regmap): New.
12977 (i386_NUM_ST_COLLECT_GREGS): New.
12978 (supply_static_tracepoint_registers): New.
12979 * server.c (handle_query): Handle qXfer:statictrace:read.
12980 <qSupported>: Report support for StaticTracepoints, and
12981 qXfer:statictrace:read features.
12982 * server.h (traceframe_read_sdata)
12983 (supply_static_tracepoint_registers): Declare.
12984 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12985 (unpack_varlen_hex): Include in IPA build.
12986 * Makefile.in (ustlibs, ustinc): New.
12987 (IPA_OBJS): Add remote-utils-ipa.o.
12988 ($(IPA_LIB)): Link -ldl and -lpthread.
12989 (UST_CFLAGS): New.
12990 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12991 * config.in, configure: Regenerate.
12992
12993 2010-06-20 Ian Lance Taylor <iant@google.com>
12994 Pedro Alves <pedro@codesourcery.com>
12995
12996 * linux-x86-low.c (always_true): Delete.
12997 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12998 trying to fool the compiler with always_true.
12999
13000 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13001
13002 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13003 conditions in gdbserver.
13004
13005 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13006
13007 * spu-low.c (spu_read_memory): Wrap around local store limit.
13008 (spu_write_memory): Likewise.
13009
13010 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13011
13012 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13013 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13014 LONGEST uses.
13015 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13016 uses.
13017 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13018 uses with LONGEST uses.
13019
13020 2010-06-14 Stan Shebs <stan@codesourcery.com>
13021 Pedro Alves <pedro@codesourcery.com>
13022
13023 Bytecode compiler.
13024
13025 * linux-x86-low.c: Include limits.h.
13026 (add_insns): New.
13027 (always_true): New.
13028 (EMIT_ASM): New.
13029 (EMIT_ASM32): New.
13030 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13031 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13032 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13033 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13034 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13035 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13036 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13037 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13038 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13039 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13040 (amd64_emit_void_call_2): New.
13041 (amd64_emit_ops): New.
13042 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13043 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13044 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13045 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13046 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13047 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13048 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13049 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13050 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13051 (i386_emit_stack_adjust, i386_emit_int_call_1)
13052 (i386_emit_void_call_2): New.
13053 (i386_emit_ops): New.
13054 (x86_emit_ops): New.
13055 (the_low_target): Install x86_emit_ops.
13056 * server.h (struct emit_ops): New.
13057 (get_raw_reg_func_addr): Declare.
13058 (current_insn_ptr, emit_error): Declare.
13059 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13060 (set_trace_state_variable_value): New defines.
13061 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13062 addr_get_trace_state_variable_value and
13063 addr_set_trace_state_variable_value.
13064 (symbol_list): New fields for get_raw_reg,
13065 get_trace_state_variable_value and set_trace_state_variable_value.
13066 (condfn): New typedef.
13067 (struct tracepoint): New field `compiled_cond'.
13068 (do_action_at_tracepoint): Clear compiled_cond.
13069 (get_trace_state_variable_value, set_trace_state_variable_value):
13070 Export in the IPA.
13071 (condition_true_at_tracepoint): If there's a compiled condition,
13072 run that.
13073 (current_insn_ptr, emit_error): New globals.
13074 (struct bytecode_address): New.
13075 (get_raw_reg_func_addr): New.
13076 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13077 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13078 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13079 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13080 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13081 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13082 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13083 (compile_tracepoint_condition, compile_bytecodes): New.
13084 * target.h (emit_ops): Forward declare.
13085 (struct target_ops): New field emit_ops.
13086 (target_emit_ops): New.
13087 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13088 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13089 * linux-low.c (linux_emit_ops): New.
13090 (linux_target_ops): Install it.
13091 * linux-low.h (struct linux_target_ops): New field emit_ops.
13092
13093 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13094
13095 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13096 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13097
13098 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13099 Stan Shebs <stan@codesourcery.com>
13100
13101 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13102 (all): Depend on $(extra_libraries).
13103 (install-only): Install the IPA.
13104 (IPA_OBJS, IPA_LIB): New.
13105 (clean): Remove the IPA lib.
13106 (IPAGENT_CFLAGS): New.
13107 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13108 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13109 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13110 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13111 * configure.ac: Check for atomic builtins support in the compiler.
13112 (IPA_DEPFILES, extra_libraries): Define.
13113 * configure.srv (ipa_obj): Add description.
13114 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13115 (i[34567]86-*-linux*): Set ipa_obj.
13116 (x86_64-*-linux*): Set ipa_obj.
13117 * linux-low.c (stabilizing_threads): New.
13118 (supports_fast_tracepoints): New.
13119 (linux_detach): Stabilize threads before detaching.
13120 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13121 the lwp is either not stabilizing, or is moving out of a jump pad.
13122 (linux_fast_tracepoint_collecting): New.
13123 (maybe_move_out_of_jump_pad): New.
13124 (enqueue_one_deferred_signal): New.
13125 (dequeue_one_deferred_signal): New.
13126 (linux_wait_for_event_1): If moving out of a jump pad, defer
13127 pending signals to later.
13128 (linux_stabilize_threads): New.
13129 (linux_wait_1): Check if threads need moving out of jump pads, and
13130 do it if so.
13131 (stuck_in_jump_pad_callback): New.
13132 (move_out_of_jump_pad_callback): New.
13133 (lwp_running): New.
13134 (linux_resume_one_lwp): Handle moving out of jump pads.
13135 (linux_set_resume_request): Dequeue deferred signals.
13136 (need_step_over_p): Also step over fast tracepoint jumps.
13137 (start_step_over): Also uninsert fast tracepoint jumps.
13138 (finish_step_over): Also reinsert fast tracepoint jumps.
13139 (linux_install_fast_tracepoint_jump): New.
13140 (linux_target_ops): Install linux_stabilize_threads and
13141 linux_install_fast_tracepoint_jump_pad.
13142 * linux-low.h (linux_target_ops) <get_thread_area,
13143 install_fast_tracepoint_jump_pad>: New fields.
13144 (struct lwp_info) <collecting_fast_tracepoint,
13145 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13146 (linux_get_thread_area): Declare.
13147 * linux-x86-low.c (jump_insn): New.
13148 (x86_get_thread_area): New.
13149 (append_insns): New.
13150 (push_opcode): New.
13151 (amd64_install_fast_tracepoint_jump_pad): New.
13152 (i386_install_fast_tracepoint_jump_pad): New.
13153 (x86_install_fast_tracepoint_jump_pad): New.
13154 (the_low_target): Install x86_get_thread_area and
13155 x86_install_fast_tracepoint_jump_pad.
13156 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13157 (struct fast_tracepoint_jump): New.
13158 (fast_tracepoint_jump_insn): New.
13159 (fast_tracepoint_jump_shadow): New.
13160 (find_fast_tracepoint_jump_at): New.
13161 (fast_tracepoint_jump_here): New.
13162 (delete_fast_tracepoint_jump): New.
13163 (set_fast_tracepoint_jump): New.
13164 (uninsert_fast_tracepoint_jumps_at): New.
13165 (reinsert_fast_tracepoint_jumps_at): New.
13166 (set_breakpoint_at): Use write_inferior_memory.
13167 (uninsert_raw_breakpoint): Use write_inferior_memory.
13168 (check_mem_read): Mask out fast tracepoint jumps.
13169 (check_mem_write): Mask out fast tracepoint jumps.
13170 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13171 (set_fast_tracepoint_jump): Declare.
13172 (delete_fast_tracepoint_jump)
13173 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13174 (reinsert_fast_tracepoint_jumps_at): Declare.
13175 * regcache.c: Don't compile many functions when building the
13176 in-process agent library.
13177 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13178 the register buffer in the heap.
13179 (free_register_cache): If the register buffer isn't owned by the
13180 regcache, don't free it.
13181 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13182 pre-existing register caches.
13183 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13184 type.
13185 (convert_ascii_to_int): : Constify `from' parameter type.
13186 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13187 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13188 the needed buffer in-place.
13189 (relocate_instruction): New.
13190 * server.c (handle_query) <qSymbols>: If the target supports
13191 tracepoints, give it a chance of looking up symbols. Report
13192 support for fast tracepoints.
13193 (handle_status): Stabilize threads.
13194 (process_serial_event): Adjust.
13195 * server.h (struct fast_tracepoint_jump): Forward declare.
13196 (struct process_info) <fast_tracepoint_jumps>: New field.
13197 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13198 (decode_X_packet, decode_M_packet): Adjust.
13199 (relocate_instruction): Declare.
13200 (in_process_agent_loaded): Declare.
13201 (tracepoint_look_up_symbols): Declare.
13202 (struct fast_tpoint_collect_status): Declare.
13203 (fast_tracepoint_collecting): Declare.
13204 (force_unlock_trace_buffer): Declare.
13205 (handle_tracepoint_bkpts): Declare.
13206 (initialize_low_tracepoint)
13207 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13208 * target.h (struct target_ops) <stabilize_threads,
13209 install_fast_tracepoint_jump_pad>: New fields.
13210 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13211 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13212 [HAVE_STDINT_H]: Include stdint.h.
13213 (trace_debug_1): Rename to ...
13214 (trace_vdebug): ... this.
13215 (trace_debug): Rename to ...
13216 (trace_debug_1): ... this. Add `level' parameter.
13217 (trace_debug): New.
13218 (ATTR_USED, ATTR_NOINLINE): New.
13219 (IP_AGENT_EXPORT): New.
13220 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13221 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13222 (about_to_request_buffer_space, trace_buffer_is_full)
13223 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13224 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13225 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13226 (traceframe_write_count, traceframes_created)
13227 (trace_state_variables)
13228 New renaming defines.
13229 (struct ipa_sym_addresses): New.
13230 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13231 (symbol_list): New.
13232 (ipa_sym_addrs): New.
13233 (all_tracepoint_symbols_looked_up): New.
13234 (in_process_agent_loaded): New.
13235 (write_e_ipa_not_loaded): New.
13236 (maybe_write_ipa_not_loaded): New.
13237 (tracepoint_look_up_symbols): New.
13238 (debug_threads) [IN_PROCESS_AGENT]: New.
13239 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13240 (UNKNOWN_SIDE_EFFECTS): New.
13241 (stop_tracing): New.
13242 (flush_trace_buffer): New.
13243 (stop_tracing_bkpt): New.
13244 (flush_trace_buffer_bkpt): New.
13245 (read_inferior_integer): New.
13246 (read_inferior_uinteger): New.
13247 (read_inferior_data_pointer): New.
13248 (write_inferior_data_pointer): New.
13249 (write_inferior_integer): New.
13250 (write_inferior_uinteger): New.
13251 (struct collect_static_trace_data_action): Delete.
13252 (enum tracepoint_type): New.
13253 (struct tracepoint) <type>: New field `type'.
13254 <actions_str, step_actions, step_actions_str>: Only include in
13255 GDBserver.
13256 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13257 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13258 (tracepoints): Use IP_AGENT_EXPORT.
13259 (last_tracepoint): Don't include in the IPA.
13260 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13261 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13262 (alloced_trace_state_variables): New.
13263 (trace_state_variables): Use IP_AGENT_EXPORT.
13264 (traceframe_t): Delete unused variable.
13265 (circular_trace_buffer): Don't include in the IPA.
13266 (trace_buffer_start): Delete.
13267 (struct trace_buffer_control): New.
13268 (trace_buffer_free): Delete.
13269 (struct ipa_trace_buffer_control): New.
13270 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13271 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13272 New.
13273 (trace_buffer_ctrl): New.
13274 (TRACE_BUFFER_CTRL_CURR): New.
13275 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13276 Reimplement as macros.
13277 (trace_buffer_wrap): Delete.
13278 (traceframe_write_count, traceframe_read_count)
13279 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13280 (struct tracepoint_hit_ctx) <type>: New field.
13281 (struct fast_tracepoint_ctx): New.
13282 (memory_barrier): New.
13283 (cmpxchg): New.
13284 (record_tracepoint_error): Update atomically in the IPA.
13285 (clear_inferior_trace_buffer): New.
13286 (about_to_request_buffer_space): New.
13287 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13288 updating the same buffer.
13289 (add_tracepoint): Default the tracepoint's type to trap
13290 tracepoint, and orig_size to -1.
13291 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13292 internal variables.
13293 (create_trace_state_variable): New parameter `gdb'. Handle it.
13294 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13295 (cmd_qtdp): Handle fast tracepoints.
13296 (cmd_qtdv): Adjust.
13297 (max_jump_pad_size): New.
13298 (gdb_jump_pad_head): New.
13299 (get_jump_space_head): New.
13300 (claim_jump_space): New.
13301 (sort_tracepoints): New.
13302 (MAX_JUMP_SIZE): New.
13303 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13304 IPA.
13305 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13306 support. Upload fast traceframes, and delete internal IPA
13307 breakpoints.
13308 (stop_tracing_handler): New.
13309 (flush_trace_buffer_handler): New.
13310 (cmd_qtstop): Upload fast tracepoints.
13311 (response_tracepoint): Handle fast tracepoints.
13312 (tracepoint_finished_step): Upload fast traceframes. Set the
13313 tracepoint hit context's tracepoint type.
13314 (handle_tracepoint_bkpts): New.
13315 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13316 type. Add comment about fast tracepoints.
13317 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13318 non-existing action_str field.
13319 (get_context_regcache): Handle fast tracepoints.
13320 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13321 to the regcache.
13322 (fast_tracepoint_from_jump_pad_address): New.
13323 (fast_tracepoint_from_ipa_tpoint_address): New.
13324 (collecting_t): New.
13325 (force_unlock_trace_buffer): New.
13326 (fast_tracepoint_collecting): New.
13327 (collecting): New.
13328 (gdb_collect): New.
13329 (write_inferior_data_ptr): New.
13330 (target_tp_heap): New.
13331 (target_malloc): New.
13332 (download_agent_expr): New.
13333 (UALIGN): New.
13334 (download_tracepoints): New.
13335 (download_trace_state_variables): New.
13336 (upload_fast_traceframes): New.
13337 (IPA_FIRST_TRACEFRAME): New.
13338 (IPA_NEXT_TRACEFRAME_1): New.
13339 (IPA_NEXT_TRACEFRAME): New.
13340 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13341 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13342 (gdb_jump_pad_buffer_end): New.
13343 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13344 (initialize_tracepoint): Adjust.
13345 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13346 buffer. Initialize the low module.
13347 * utils.c (PREFIX, TOOLNAME): New.
13348 (malloc_failure): Use PREFIX.
13349 (error): In the IPA, an error causes an exit.
13350 (fatal, warning): Use PREFIX.
13351 (internal_error): Use TOOLNAME.
13352 (NUMCELLS): Increase to 10.
13353 * configure, config.in: Regenerate.
13354
13355 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13356
13357 * server.c (handle_query) <qSupported>: Do two passes over the
13358 qSupported string to avoid nesting strtok.
13359
13360 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13361
13362 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13363 (CDEPS): New.
13364 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13365 -Wl,--dynamic-list.
13366 * configure: Regenerate.
13367 * proc-service.list: New.
13368
13369 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13370
13371 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13372 New comment.
13373
13374 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13375
13376 * gdbreplay.c (remote_open): Check error return from socket() call by
13377 its equality to -1 not by it being negative.
13378 * remote-utils.c (remote_open): Likewise.
13379
13380 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13381
13382 * config.h: Regenerate.
13383
13384 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13385
13386 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13387 doesn't provide PTRACE_GET_THREAD_AREA.
13388
13389 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13390
13391 * linux-m68k-low.c: Include <asm/ptrace.h>
13392 (ps_get_thread_area): Implement.
13393
13394 2010-05-03 Doug Evans <dje@google.com>
13395
13396 * event-loop.c (struct callback_event): New struct.
13397 (callback_list): New global.
13398 (append_callback_event, delete_callback_event): New functions.
13399 (process_callback): New function.
13400 (start_event_loop): Call it.
13401 * remote-utils.c (NOT_SCHEDULED): Define.
13402 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13403 moved out of readchar.
13404 (readchar): Rewrite. Call reschedule before returning.
13405 (reset_readchar): New function.
13406 (remote_close): Call it.
13407 (process_remaining, reschedule): New functions.
13408 * server.h (callback_handler_func): New typedef.
13409 (append_callback_event, delete_callback_event): Declare.
13410
13411 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13412
13413 * proc-service.c (ps_pglobal_lookup): Use
13414 thread_db_look_up_one_symbol.
13415 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13416 parameter. Use it instead of all_symbols_looked_up.
13417 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13418 field.
13419 (all_symbols_looked_up): Don't declare.
13420 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13421 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13422 field.
13423 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13424 Set all_symbols_looked_up here.
13425 (thread_db_look_up_one_symbol): New.
13426 (thread_db_get_tls_address): Adjust.
13427 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13428 thread_db object on the heap, and tentatively set it in the
13429 process structure.
13430 (thread_db_init): Don't set all_symbols_looked_up here.
13431 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13432
13433 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13434
13435 * linux-low.c (linux_kill, linux_detach): Adjust.
13436 (status_pending_p_callback): Remove redundant statement. Check
13437 for !TARGET_WAITIKIND_IGNORE, instead of
13438 TARGET_WAITKIND_STOPPED.
13439 (handle_tracepoints): Make sure LWP is locked. Adjust.
13440 (linux_wait_for_event_1): Adjust.
13441 (linux_cancel_breakpoints): New.
13442 (unsuspend_one_lwp): New.
13443 (unsuspend_all_lwps): New.
13444 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13445 (send_sigstop_callback): Change return type to int, add new
13446 `except' parameter and handle it.
13447 (suspend_and_send_sigstop_callback): New.
13448 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13449 pass them down. If SUSPEND, also increment the lwp's suspend
13450 count.
13451 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13452 (need_step_over_p): Don't consider suspended LWPs.
13453 (start_step_over): Adjust.
13454 (proceed_one_lwp): Change return type to int, add new `except'
13455 parameter and handle it.
13456 (unsuspend_and_proceed_one_lwp): New.
13457 (proceed_all_lwps): Use find_inferior instead of
13458 for_each_inferior.
13459 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13460 also decrement the suspend count of LWPs. Pass `except' down,
13461 instead of hacking its suspend count.
13462 (linux_pause_all): Add `freeze' parameter. Adjust.
13463 (linux_unpause_all): New.
13464 (linux_target_ops): Install linux_unpause_all.
13465 * server.c (handle_status): Adjust.
13466 * target.h (struct target_ops): New fields `unpause_all' and
13467 `cancel_breakpoints'. Add new parameter to `pause_all'.
13468 (pause_all): Add new `freeze' parameter.
13469 (unpause_all): New.
13470 (cancel_breakpoints): New.
13471 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13472 cancel breakpoints.
13473 (cmd_qtstart): Pause threads.
13474 (stop_tracing): Pause threads, and cancel breakpoints.
13475 * win32-low.c (win32_target_ops): Adjust.
13476
13477 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13478
13479 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13480 the inferior right away from here...
13481 (linux_wait_1): ... to here, and adjust to check the thread's
13482 last_resume_kind instead of the lwp's step or stop_expected flags.
13483
13484 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13485
13486 * README: Use consistent `GDB' and `GDBserver' spellings.
13487
13488 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13489
13490 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13491 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13492 (linux_detach_one_lwp): Assume the lwp is stopped.
13493 (any_thread_of): Delete.
13494 (linux_detach): Stop all lwps here. Don't blindly delete all
13495 breakpoints.
13496 (delete_lwp_callback): New.
13497 (linux_mourn): Delete all lwps of the process that is gone.
13498 (linux_wait_1): Don't delete the last lwp of the process here.
13499 * mem-break.h (mark_breakpoints_out): Declare.
13500 * mem-break.c (mark_breakpoints_out): New.
13501 (free_all_breakpoints): Use it.
13502 * server.c (handle_target_event): If the process is gone, mark
13503 breakpoints out.
13504 * thread-db.c (struct thread_db) <create_bp>: New field.
13505 (thread_db_enable_reporting): Fix prototype. Store a thread event
13506 breakpoint reference in the thread_db struct.
13507 (thread_db_load_search): Clear the thread_db object.
13508 (try_thread_db_load_1): Ditto.
13509 (switch_to_process): New.
13510 (disable_thread_event_reporting): Use it.
13511 (remove_thread_event_breakpoints): New.
13512 (thread_db_detach, thread_db_mourn): Use it.
13513
13514 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13515
13516 * linux-low.c (linux_enable_event_reporting): New.
13517 (linux_wait_for_event_1, handle_extended_wait): Use it.
13518
13519 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13520
13521 * linux-low.c (linux_kill_one_lwp, linux_kill)
13522 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13523 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13524 SIGSTOP even if the LWP is stopped.
13525 (send_sigstop_callback): New.
13526 (stop_all_lwps): Use send_sigstop_callback instead.
13527 (linux_resume_one_thread): Adjust.
13528 (proceed_one_lwp): Still proceed an LWP that the client has
13529 requested to stop, if we haven't reported it as stopped yet. Make
13530 sure that LWPs the client want stopped, have a pending SIGSTOP.
13531
13532 2010-04-26 Doug Evans <dje@google.com>
13533
13534 * server.c (handle_general_set): Make static.
13535
13536 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13537 Print received char after testing for error/eof instead of before.
13538 (input_interrupt): Tweak comment.
13539
13540 2010-04-23 Doug Evans <dje@google.com>
13541
13542 * server.c (start_inferior): Print inferior argv if --debug.
13543
13544 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13545
13546 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13547 * nto-x86-low.c: Include server.h
13548
13549 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13550
13551 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13552 be consistent with other sources of this directory.
13553 (init_registers_amd64): Correct name of source file of this function
13554 in the comment.
13555
13556 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13557
13558 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13559 64-bit executables.
13560
13561 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13562
13563 * win32-i386-low.c: Add 64-bit support.
13564 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13565 (init_registers_amd64): Declare.
13566 (mappings): Add 64-bit version of array.
13567 (init_windows_x86): New function.
13568 (the_low_target): Change init_arch field to init_windows_x86.
13569
13570 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13571
13572 * win32-low.c: Adapt to support also 64-bit architecture.
13573 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13574 (get_image_name): Use SIZE_T type for local variable `done'.
13575 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13576 (toolhelp_get_dll_name): Idem.
13577 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13578 Use uintptr_t typecast to avoid warning.
13579 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13580 (handle_exception): Use phex_nz to avoid warning.
13581 (win32_wait): Remove unused local variable `process'.
13582
13583 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13584
13585 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13586 `amd64-avx.o'.
13587
13588 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13589
13590 * configure.ac: Use `ws2_32' library for srv_mingw.
13591 * configure: Regenerate.
13592 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13593 * remote-utils.c: Likewise.
13594
13595 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13596
13597 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13598 if __x86_64__ is defined.
13599
13600 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13601
13602 * configure: Regenerate.
13603
13604 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13605
13606 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13607 * target.h (target_ops): New get_tib_address field.
13608 * win32-low.h (win32_thread_info): Add thread_local_base field.
13609 * win32-low.c (child_add_thread): Add tlb argument.
13610 Set thread_local_base field to TLB.
13611 (get_child_debug_event): Adapt to child_add_thread change.
13612 (win32_get_tib_address): New function.
13613 (win32_target_ops): Set get_tib_address field to
13614 win32_get_tib_address.
13615 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13616
13617 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13618
13619 * linux-low.c (linux_mourn): Also remove the process.
13620 * server.c (handle_target_event): Don't remove the process here.
13621 * nto-low.c (nto_mourn): New.
13622 (nto_target_ops): Install it.
13623 * spu-low.c (spu_mourn): New.
13624 (spu_target_ops): Install it.
13625 * win32-low.c (win32_mourn): New.
13626 (win32_target_ops): Install it.
13627
13628 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13629
13630 * server.h (buffer_xml_printf): Remove redundant `;'.
13631
13632 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13633
13634 * regcache.c (set_register_cache): Invalidate regcaches before
13635 changing the register cache layout.
13636 (regcache_invalidate_one): Allow a NULL regcache.
13637 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13638 regcaches before changing the register cache layout or the target
13639 regsets.
13640
13641 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13642
13643 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13644 variable warning on Linux/x86-64.
13645
13646 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13647
13648 GDBserver disconnected tracing support.
13649
13650 * linux-low.c (linux_remove_process): Delete.
13651 (add_lwp): Don't set last_resume_kind here.
13652 (linux_kill): Use `mourn'.
13653 (linux_detach): Use `thread_db_detach', and `mourn'.
13654 (linux_mourn): New.
13655 (linux_attach_lwp_1): Adjust comment.
13656 (linux_attach): last_resume_kind moved the thread_info; adjust.
13657 (status_pending_p_callback): Adjust.
13658 (linux_wait_for_event_1): Adjust.
13659 (count_events_callback, select_singlestep_lwp_callback)
13660 (select_event_lwp_callback, cancel_breakpoints_callback)
13661 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13662 (proceed_one_lwp): Adjust.
13663 (linux_async): Add debug output.
13664 (linux_thread_stopped): New.
13665 (linux_pause_all): New.
13666 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13667 linux_pause_all.
13668 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13669 (thread_db_free): Delete declaration.
13670 (thread_db_detach, thread_db_mourn): Declare.
13671 * thread-db.c (thread_db_init): Use thread_db_mourn.
13672 (thread_db_free): Delete, split in two.
13673 (disable_thread_event_reporting): New.
13674 (thread_db_detach): New.
13675 (thread_db_mourn): New.
13676
13677 * server.h (struct thread_info) <last_resume_kind>: New field.
13678 <attached>: Add comment.
13679 <gdb_detached>: New field.
13680 (handler_func): Change return type to int.
13681 (handle_serial_event, handle_target_event): Ditto.
13682 (gdb_connected): Declare.
13683 (tracing): Delete.
13684 (disconnected_tracing): Declare.
13685 (stop_tracing): Declare.
13686
13687 * server.c (handle_query) <qSupported>: Report support for
13688 disconnected tracing.
13689 (queue_stop_reply_callback): Account for running threads.
13690 (gdb_wants_thread_stopped): New.
13691 (gdb_wants_all_threads_stopped): New.
13692 (gdb_reattached_process): New.
13693 (handle_status): Clear the `gdb_detached' flag of all processes.
13694 In all-stop, stop all threads.
13695 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13696 (process_serial_event): If the remote connection breaks, or if an
13697 exit was forced with "monitor exit", force an event loop exit.
13698 Handle disconnected tracing on detach.
13699 (handle_serial_event): Adjust.
13700 (handle_target_event): If GDB isn't connected, forward events back
13701 to the inferior, unless the last process exited, in which case,
13702 exit gdbserver. Adjust interface.
13703
13704 * remote-utils.c (remote_open): Don't block in accept. Instead
13705 register an event loop source on the listen socket file
13706 descriptor. Refactor bits into ...
13707 (listen_desc): ... this new global.
13708 (gdb_connected): ... this new function.
13709 (enable_async_notification): ... this new function.
13710 (handle_accept_event): ... this new function.
13711 (remote_close): Clear remote_desc.
13712
13713 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13714
13715 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13716 New fields.
13717 (mourn_inferior): Define.
13718 (target_process_qsupported): Avoid the dangling else problem.
13719 (thread_stopped): Define.
13720 (pause_all): Define.
13721 (target_waitstatus_to_string): Declare.
13722 * target.c (target_waitstatus_to_string): New.
13723
13724 * tracepoint.c (tracing): Make extern.
13725 (disconnected_tracing): New.
13726 (stop_tracing): Make extern. Handle tracing stops due to GDB
13727 disconnecting.
13728 (cmd_qtdisconnected): New.
13729 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13730 (handle_tracepoint_general_set): Handle QTDisconnected.
13731
13732 * event-loop.c (event_handler_func): Change return type to int.
13733 (process_event): Bail out if the event handler wants the event
13734 loop to stop.
13735 (handle_file_event): Ditto.
13736 (start_event_loop): Bail out if the event handler wants the event
13737 loop to stop.
13738
13739 * nto-low.c (nto_target_ops): Adjust.
13740 * spu-low.c (spu_wait): Don't remove the process here.
13741 (spu_target_ops): Adjust.
13742 * win32-low.c (win32_wait): Don't remove the process here.
13743 (win32_target_ops): Adjust.
13744
13745 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13746
13747 * regcache.c (realloc_register_cache): Invalidate inferior's
13748 regcache before recreating it.
13749
13750 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13751
13752 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13753
13754 2010-04-09 Stan Shebs <stan@codesourcery.com>
13755 Pedro Alves <pedro@codesourcery.com>
13756
13757 * server.h (LONGEST): New.
13758 (struct thread_info) <while_stepping>: New field.
13759 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13760 Declare.
13761 (initialize_tracepoint, handle_tracepoint_general_set)
13762 (handle_tracepoint_query, tracepoint_finished_step)
13763 (tracepoint_was_hit, release_while_stepping_state_list):
13764 (current_traceframe): Declare.
13765 * server.c (handle_general_set): Handle tracepoint packets.
13766 (read_memory): New.
13767 (write_memory): New.
13768 (handle_search_memory_1): Use read_memory.
13769 (handle_query): Report support for conditional tracepoints, trace
13770 state variables, and tracepoint sources. Handle tracepoint
13771 queries.
13772 (main): Initialize the tracepoints module.
13773 (process_serial_event): Handle traceframe reads/writes.
13774
13775 * linux-low.c (handle_tracepoints): New.
13776 (linux_wait_1): Call it.
13777 (linux_resume_one_lwp): Handle while-stepping.
13778 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13779 (linux_target_ops): Install them.
13780 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13781 New field.
13782 * linux-x86-low.c (x86_supports_tracepoints): New.
13783 (the_low_target). Install it.
13784
13785 * mem-break.h (delete_breakpoint): Declare.
13786 * mem-break.c (delete_breakpoint): Make external.
13787
13788 * target.h (struct target_ops): Add `supports_tracepoints',
13789 `read_pc', and `write_pc' fields.
13790 (target_supports_tracepoints): Define.
13791 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13792 (phex_nz): New.
13793
13794 * regcache.h (struct regcache) <registers_owned>: New field.
13795 (init_register_cache, regcache_cpy): Declare.
13796 (regcache_read_pc, regcache_write_pc): Declare.
13797 (register_cache_size): Declare.
13798 (supply_regblock): Declare.
13799 * regcache.c (init_register_cache): New.
13800 (new_register_cache): Use it.
13801 (regcache_cpy): New.
13802 (register_cache_size): New.
13803 (supply_regblock): New.
13804 (regcache_read_pc, regcache_write_pc): New.
13805
13806 * tracepoint.c: New.
13807
13808 * Makefile.in (OBS): Add tracepoint.o.
13809 (tracepoint.o): New rule.
13810
13811 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13812
13813 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13814 (i386-mmx.o): New.
13815 (i386-mmx.c): Likewise.
13816 (i386-mmx-linux.o): Likewise.
13817 (i386-mmx-linux.c): Likewise.
13818
13819 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13820 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13821 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13822 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13823
13824 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13825 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13826 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13827
13828 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13829
13830 * Makefile.in (clean): Updated.
13831 (i386-avx.o): New.
13832 (i386-avx.c): Likewise.
13833 (i386-avx-linux.o): Likewise.
13834 (i386-avx-linux.c): Likewise.
13835 (amd64-avx.o): Likewise.
13836 (amd64-avx.c): Likewise.
13837 (amd64-avx-linux.o): Likewise.
13838 (amd64-avx-linux.c): Likewise.
13839
13840 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13841 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13842 (srv_amd64_regobj): Add amd64-avx.o.
13843 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13844 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13845 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13846 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13847 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13848 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13849 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13850
13851 * i387-fp.c: Include "i386-xstate.h".
13852 (i387_xsave): New.
13853 (i387_cache_to_xsave): Likewise.
13854 (i387_xsave_to_cache): Likewise.
13855 (x86_xcr0): Likewise.
13856
13857 * i387-fp.h (i387_cache_to_xsave): Likewise.
13858 (i387_xsave_to_cache): Likewise.
13859 (x86_xcr0): Likewise.
13860
13861 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13862 * linux-crisv32-low.c (target_regsets): Likewise.
13863 * linux-m68k-low.c (target_regsets): Likewise.
13864 * linux-mips-low.c (target_regsets): Likewise.
13865 * linux-ppc-low.c (target_regsets): Likewise.
13866 * linux-s390-low.c (target_regsets): Likewise.
13867 * linux-sh-low.c (target_regsets): Likewise.
13868 * linux-sparc-low.c (target_regsets): Likewise.
13869 * linux-xtensa-low.c (target_regsets): Likewise.
13870
13871 * linux-low.c: Include <sys/uio.h>.
13872 (regsets_fetch_inferior_registers): Support nt_type.
13873 (regsets_store_inferior_registers): Likewise.
13874 (linux_process_qsupported): New.
13875 (linux_target_ops): Add linux_process_qsupported.
13876
13877 * linux-low.h (regset_info): Add nt_type.
13878 (linux_target_ops): Add process_qsupported.
13879
13880 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13881 and <sys/uio.h>.
13882 (init_registers_i386_avx_linux): New.
13883 (init_registers_amd64_avx_linux): Likewise.
13884 (xmltarget_i386_linux_no_xml): Likewise.
13885 (xmltarget_amd64_linux_no_xml): Likewise.
13886 (PTRACE_GETREGSET): Likewise.
13887 (PTRACE_SETREGSET): Likewise.
13888 (x86_fill_xstateregset): Likewise.
13889 (x86_store_xstateregset): Likewise.
13890 (use_xml): Likewise.
13891 (x86_linux_update_xmltarget): Likewise.
13892 (x86_linux_process_qsupported): Likewise.
13893 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13894 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13895 init_registers_i386_linux here. Call
13896 x86_linux_update_xmltarget.
13897 (the_low_target): Add x86_linux_process_qsupported.
13898
13899 * server.c (handle_query): Call target_process_qsupported.
13900
13901 * target.h (target_ops): Add process_qsupported.
13902 (target_process_qsupported): New.
13903
13904 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13905
13906 * inferiors.c (add_thread): Set last_status kind to
13907 TARGET_WAITKIND_IGNORE.
13908 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13909 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13910 (linux_wait_1): Move `thread' local definition to block that uses
13911 it. Don't NULL initialize `event_child'.
13912 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13913 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13914 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13915
13916 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13917
13918 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13919 an extended waitstatus, or by a watchpoint.
13920 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13921 thread was stepping or has been stopped by a watchpoint.
13922
13923 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13924
13925 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13926 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13927 of another, then delete the previous, and validate all
13928 breakpoints.
13929 (validate_inserted_breakpoint): New.
13930 (delete_disabled_breakpoints): New.
13931 (validate_breakpoints): New.
13932 (check_mem_read): Validate breakpoints before trusting their
13933 shadow. Delete disabled breakpoints.
13934 (check_mem_write): Validate breakpoints before trusting they
13935 should be inserted. Delete disabled breakpoints.
13936 * mem-break.h (validate_breakpoints):
13937 * server.c (handle_query): Validate breakpoints when we see a
13938 qSymbol query.
13939
13940 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13941
13942 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13943 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13944 if we could tell there's a GDB breakpoint at stop_pc.
13945 (need_step_over_p): Don't do a step over if we find a GDB
13946 breakpoint at the resume PC.
13947
13948 * mem-break.c (struct raw_breakpoint): New.
13949 (enum bkpt_type): New type `gdb_breakpoint'.
13950 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13951 fields. New field `raw'.
13952 (find_raw_breakpoint_at): New.
13953 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13954 breakpoint instead.
13955 (set_breakpoint_at): Adjust.
13956 (delete_raw_breakpoint): New.
13957 (release_breakpoint): New.
13958 (delete_breakpoint): Rename to...
13959 (delete_breakpoint_1): ... this. Add proc parameter. Use
13960 release_breakpoint. Return ENOENT.
13961 (delete_breakpoint): Reimplement.
13962 (find_breakpoint_at): Delete.
13963 (find_gdb_breakpoint_at): New.
13964 (delete_breakpoint_at): Delete.
13965 (set_gdb_breakpoint_at): New.
13966 (delete_gdb_breakpoint_at): New.
13967 (gdb_breakpoint_here): New.
13968 (set_reinsert_breakpoint): Use release_breakpoint.
13969 (uninsert_breakpoint): Rename to ...
13970 (uninsert_raw_breakpoint): ... this.
13971 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13972 (reinsert_raw_breakpoint): Change parameter type to
13973 raw_breakpoint.
13974 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13975 instead.
13976 (check_breakpoints): Adjust. Use release_breakpoint.
13977 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13978 (breakpoint_inserted_here): Ditto.
13979 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13980 Don't trust the breakpoint's shadow if it is not inserted.
13981 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13982 (delete_all_breakpoints): Adjust.
13983 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13984 use delete_breakpoint_1.
13985
13986 * mem-break.h (breakpoints_supported): Delete declaration.
13987 (set_gdb_breakpoint_at): Declare.
13988 (gdb_breakpoint_here): Declare.
13989 (delete_breakpoint_at): Delete.
13990 (delete_gdb_breakpoint_at): Declare.
13991
13992 * server.h (struct raw_breakpoint): Forward declare.
13993 (struct process_info): New field `raw_breakpoints'.
13994
13995 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13996 breakpoints.
13997
13998 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13999
14000 * linux-low.c (status_pending_p_callback): Fix comment.
14001 (linux_wait_for_event_1): Move most of the internal breakpoint
14002 handling from here...
14003 (linux_wait_1): ... to here.
14004 (count_events_callback): New.
14005 (select_singlestep_lwp_callback): New.
14006 (select_event_lwp_callback): New.
14007 (cancel_breakpoints_callback): New.
14008 (select_event_lwp): New.
14009 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14010 priority to all LWPs that have had events that should be reported
14011 to the client. Cancel breakpoints when about to reporting the
14012 event to the client, not while stopping lwps. No longer cancel
14013 finished single-steps here.
14014 (cancel_finished_single_step): Delete.
14015 (cancel_finished_single_steps): Delete.
14016
14017 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14018
14019 * mem-break.c (enum bkpt_type): New.
14020 (struct breakpoint): New field `type'.
14021 (set_breakpoint_at): Change return type to struct breakpoint
14022 pointer. Set type to `other_breakpoint' by default.
14023 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14024 in the breakpoint list.
14025 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14026 (reinsert_breakpoint): Rename to ...
14027 (reinsert_raw_breakpoint): ... this.
14028 (reinsert_breakpoints_at): Adjust.
14029 * mem-break.h (struct breakpoint): Declare.
14030 (set_breakpoint_at): Change return type to struct breakpoint
14031 pointer.
14032
14033 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14034
14035 * server.c (handle_query): Assign, not compare.
14036
14037 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14038
14039 Teach linux gdbserver to step-over-breakpoints.
14040
14041 * linux-low.c (can_hardware_single_step): New.
14042 (supports_breakpoints): New.
14043 (handle_extended_wait): If stopping threads, read the stop pc of
14044 the new cloned LWP.
14045 (get_pc): New.
14046 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14047 low target doesn't support retrieving the PC.
14048 (add_lwp): Set last_resume_kind to resume_continue.
14049 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14050 (linux_attach): Don't clear stop_expected. Set the lwp's
14051 last_resume_kind to resume_stop.
14052 (linux_detach_one_lwp): Don't check for removed breakpoints.
14053 (check_removed_breakpoint): Delete.
14054 (status_pending_p): Rename to ...
14055 (status_pending_p_callback): ... this. Don't check for removed
14056 breakpoints. Don't consider threads that are stopped from GDB's
14057 perspective.
14058 (linux_wait_for_lwp): Always read the stop_pc here.
14059 (cancel_breakpoint): New.
14060 (step_over_bkpt): New global.
14061 (linux_wait_for_event_1): Implement stepping over breakpoints.
14062 (gdb_wants_lwp_stopped): New.
14063 (gdb_wants_all_stopped): New.
14064 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14065 single-step traps here. Store the thread's last reported target
14066 wait status.
14067 (send_sigstop): Don't clear stop_expected. Always set it,
14068 instead.
14069 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14070 (cancel_finished_single_step): New.
14071 (cancel_finished_single_steps): New.
14072 (wait_for_sigstop): Don't cancel finished single-step traps here.
14073 (linux_resume_one_lwp): Don't check for removed breakpoints.
14074 Don't set `step' on non-hardware step archs.
14075 (linux_set_resume_request): Ignore resume_stop requests if already
14076 stopping or stopped. Set the lwp's last_resume_kind.
14077 (resume_status_pending_p): Don't check for removed breakpoints.
14078 (need_step_over_p): New.
14079 (start_step_over): New.
14080 (finish_step_over): New.
14081 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14082 requests. Clear the thread's last reported target waitstatus.
14083 Don't use the `suspended' flag. Don't consider pending breakpoints.
14084 (linux_resume): Start a step-over if necessary.
14085 (proceed_one_lwp): New.
14086 (proceed_all_lwps): New.
14087 (unstop_all_lwps): New.
14088 * linux-low.h (struct lwp_info): Rewrite comment for the
14089 `suspended' flag. Add the `stop_pc' field. Delete the
14090 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14091 Add `'last_resume_kind' and `need_step_over' fields.
14092 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14093 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14094 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14095 (set_raw_breakpoint_at): New.
14096 (set_breakpoint_at): Rewrite to use it.
14097 (reinsert_breakpoint_handler): Delete.
14098 (set_reinsert_breakpoint): New.
14099 (reinsert_breakpoint_by_bp): Delete.
14100 (delete_reinsert_breakpoints): New.
14101 (uninsert_breakpoint): Rewrite.
14102 (uninsert_breakpoints_at): New.
14103 (reinsert_breakpoint): Rewrite.
14104 (reinsert_breakpoints_at): New.
14105 (check_breakpoints): Rewrite.
14106 (breakpoint_here): New.
14107 (breakpoint_inserted_here): New.
14108 (check_mem_read): Adjust.
14109 * mem-break.h (breakpoints_supported, breakpoint_here)
14110 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14111 (reinsert_breakpoint_by_bp): Delete declaration.
14112 (delete_reinsert_breakpoints): Declare.
14113 (reinsert_breakpoint): Delete declaration.
14114 (reinsert_breakpoints_at): Declare.
14115 (uninsert_breakpoint): Delete declaration.
14116 (uninsert_breakpoints_at): Declare.
14117 (check_breakpoints): Adjust prototype.
14118 * server.h: Adjust include order.
14119 (struct thread_info): Declare here. Add a `last_status' field.
14120
14121 2010-03-23 Michael Snyder <msnyder@vmware.com>
14122
14123 * server.c (crc32): New function.
14124 (handle_query): Add handling for 'qCRC:' request.
14125
14126 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14127
14128 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14129 lwp had been stopped by a watchpoint.
14130
14131 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14132
14133 * server.h (internal_error): Declare.
14134 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14135 * utils.c (internal_error): New function.
14136
14137 2010-03-15 Andreas Schwab <schwab@redhat.com>
14138
14139 * configure.srv: Fix typo setting srv_regobj.
14140
14141 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14142
14143 * linux-low.c (fetch_register): Avoid passing a non string literal
14144 format to `error'.
14145 (usr_store_inferior_registers): Ditto.
14146
14147 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14148
14149 * linux-low.c (linux_write_memory): Bail out early if peeking
14150 memory failed.
14151
14152 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14153
14154 * linux-low.h (struct lwp_info): New fields
14155 `stopped_by_watchpoint' and `stopped_data_address'.
14156 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14157 here, and cache them in the lwp object.
14158 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14159 directly.
14160 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14161 field.
14162 (linux_stopped_by_watchpoint): Rewrite.
14163 (linux_stopped_data_address): Rewrite.
14164
14165 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14166
14167 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14168 switching the current inferior, not before.
14169
14170 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14171
14172 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14173 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14174 i386-linux.c and amd64-linux.c.
14175 (reg-i386.o): Removed.
14176 (reg-i386.c): Likewise.
14177 (reg-i386-linux.o): Likewise.
14178 (reg-i386-linux.c): Likewise.
14179 (reg-x86-64.o): Likewise.
14180 (reg-x86-64.c): Likewise.
14181 (reg-x86-64-linux.o): Likewise.
14182 (reg-x86-64-linux.c): Likewise.
14183 (i386.o): New.
14184 (i386.c): Likewise.
14185 (i386-linux.o): Likewise.
14186 (i386-linux.c): Likewise.
14187 (amd64.o): Likewise.
14188 (amd64.c): Likewise.
14189 (amd64-linux.o): Likewise.
14190 (amd64-linux.c): Likewise.
14191
14192 * configure.srv (srv_i386_regobj): New.
14193 (srv_i386_linux_regobj): Likewise.
14194 (srv_amd64_regobj): Likewise.
14195 (srv_amd64_linux_regobj): Likewise.
14196 (srv_i386_32bit_xmlfiles): Likewise.
14197 (srv_i386_64bit_xmlfiles): Likewise.
14198 (srv_i386_xmlfiles): Likewise.
14199 (srv_amd64_xmlfiles): Likewise.
14200 (srv_i386_linux_xmlfiles): Likewise.
14201 (srv_amd64_linux_xmlfiles): Likewise.
14202 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14203 srv_xmlfiles to $srv_i386_xmlfiles.
14204 (i[34567]86-*-mingw32ce*): Likewise.
14205 (i[34567]86-*-mingw*): Likewise.
14206 (i[34567]86-*-nto*): Likewise.
14207 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14208 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14209 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14210 (x86_64-*-linux*): Likewise.
14211
14212 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14213 (init_registers_amd64_linux): New.
14214 (x86_arch_setup): Replace init_registers_x86_64_linux with
14215 init_registers_amd64_linux.
14216
14217 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14218
14219 * configure.ac: Check for libdl. If it is not available link against
14220 static libthread_db.
14221 * configure: Regenerate.
14222
14223 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14224
14225 PR9605
14226
14227 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14228 handing a read watchpoint.
14229 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14230
14231 2010-02-12 Doug Evans <dje@google.com>
14232
14233 * linux-low.c (linux_supports_tracefork_flag): Document.
14234 (linux_look_up_symbols): Add comment.
14235
14236 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14237
14238 * regcache.c (supply_register): Clear regcache if buf is NULL.
14239
14240 2010-02-02 Nicolas Roche <roche@sourceware.org>
14241 Joel Brobecker <brobecker@adacore.com>
14242
14243 * inferiors.c (find_inferior): Add function documentation.
14244 (unloaded_dll): Handle the case where the unloaded dll has not
14245 been previously registered in the dll list.
14246
14247 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14248
14249 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14250 (thumb2_breakpoint): New.
14251 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14252
14253 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14256 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14257 breakpoints.
14258
14259 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14260
14261 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14262
14263 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14264
14265 * linux-s390-low.c (s390_collect_ptrace_register)
14266 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14267
14268 2010-01-21 Doug Evans <dje@google.com>
14269
14270 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14271 (PTRACE_ARG4_TYPE): New macro.
14272 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14273 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14274 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14275 (usr_store_inferior_registers): Ditto.
14276 (linux_read_memory, linux_write_memory): Ditto.
14277 (linux_test_for_tracefork): Ditto.
14278
14279 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14280 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14281
14282 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14283
14284 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14285 target.
14286
14287 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14288
14289 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14290 prototype to take a regcache. Adjust.
14291
14292 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14293
14294 * regcache.h (struct thread_info): Forward declare.
14295 (struct regcache): New.
14296 (new_register_cache): Adjust prototype.
14297 (get_thread_regcache): Declare.
14298 (free_register_cache): Adjust prototype.
14299 (registers_to_string, registers_from_string): Ditto.
14300 (supply_register, supply_register_by_name, collect_register)
14301 (collect_register_as_string, collect_register_by_name): Ditto.
14302 * regcache.c (struct inferior_regcache_data): Delete.
14303 (get_regcache): Rename to ...
14304 (get_thread_regcache): ... this. Adjust. Switch inferior before
14305 fetching registers.
14306 (regcache_invalidate_one): Adjust.
14307 (regcache_invalidate): Fix prototype.
14308 (new_register_cache): Return the new register cache.
14309 (free_register_cache): Change prototype.
14310 (realloc_register_cache): Adjust.
14311 (registers_to_string): Change prototype to take a regcache. Adjust.
14312 (registers_from_string): Ditto.
14313 (register_data): Ditto.
14314 (supply_register): Ditto.
14315 (supply_register_by_name): Ditto.
14316 (collect_register): Ditto.
14317 (collect_register_as_string): Ditto.
14318 (collect_register_by_name): Ditto.
14319 * server.c (process_serial_event): Adjust.
14320 * linux-low.h (regset_fill_func, regset_store_func): Change
14321 prototype.
14322 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14323 Change prototype.
14324 * linux-low.c (get_stop_pc): Adjust.
14325 (check_removed_breakpoint): Adjust.
14326 (linux_wait_for_event): Adjust.
14327 (linux_resume_one_lwp): Adjust.
14328 (fetch_register): Add regcache parameter. Adjust.
14329 (usr_store_inferior_registers): Ditto.
14330 (regsets_fetch_inferior_registers): Ditto.
14331 (regsets_store_inferior_registers): Ditto.
14332 (linux_fetch_registers, linux_store_registers): Ditto.
14333 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14334 regcache. Adjust.
14335 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14336 Ditto.
14337 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14338 prototype to take a regcache.
14339 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14340 * remote-utils.c (convert_ascii_to_int, outreg)
14341 (prepare_resume_reply): Change prototype to take a regcache.
14342 Adjust.
14343 * target.h (struct target_ops) <fetch_registers, store_registers>:
14344 Change prototype to take a regcache.
14345 (fetch_inferior_registers, store_inferior_registers): Change
14346 prototype to take a regcache. Adjust.
14347 * proc-service.c (ps_lgetregs): Adjust.
14348 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14349 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14350 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14351 take a regcache. Adjust.
14352 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14353 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14354 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14355 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14356 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14357 (cris_cannot_fetch_register):
14358 (cris_breakpoint_at): Change prototype to take a regcache.
14359 Adjust.
14360 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14361 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14362 to take a regcache. Adjust.
14363 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14364 Adjust.
14365 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14366 take a regcache. Adjust.
14367 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14368 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14369 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14370 * linux-mips-low.c (mips_get_pc):
14371 (mips_set_pc): Change prototype to take a regcache. Adjust.
14372 (mips_reinsert_addr): Adjust.
14373 (mips_collect_register): Change prototype to take a regcache.
14374 Adjust.
14375 (mips_supply_register):
14376 (mips_collect_register_32bit, mips_supply_register_32bit)
14377 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14378 (mips_store_fpregset): Ditto.
14379 * linux-ppc-low.c (ppc_supply_ptrace_register)
14380 (ppc_supply_ptrace_register): Ditto.
14381 (parse_spufs_run): Adjust.
14382 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14383 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14384 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14385 take a regcache. Adjust.
14386 * linux-s390-low.c (s390_collect_ptrace_register)
14387 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14388 (s390_set_pc): Change prototype to take a regcache. Adjust.
14389 (s390_arch_setup): Adjust.
14390 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14391 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14392 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14393 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14394 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14395 regcache. Adjust.
14396 (sparc_breakpoint_at): Adjust.
14397 * linux-xtensa-low.c (xtensa_fill_gregset):
14398 (xtensa_store_gregset):
14399 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14400 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14401 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14402 prototype to take a regcache. Adjust.
14403 * win32-arm-low.c (arm_fetch_inferior_register)
14404 (arm_store_inferior_register): Change prototype to take a
14405 regcache. Adjust.
14406 * win32-i386-low.c (i386_fetch_inferior_register)
14407 (i386_store_inferior_register): Change prototype to take a
14408 regcache. Adjust.
14409 * win32-low.c (child_fetch_inferior_registers)
14410 (child_store_inferior_registers): Change prototype to take a
14411 regcache. Adjust.
14412 (win32_wait): Adjust.
14413 (win32_fetch_inferior_registers): Change prototype to take a
14414 regcache. Adjust.
14415 (win32_store_inferior_registers): Adjust.
14416 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14417 store_inferior_register>: Change prototype to take a regcache.
14418
14419 2010-01-20 Doug Evans <dje@google.com>
14420
14421 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14422 #ifdef.
14423 (linux_wait_for_event1, linux_init_signals): Ditto.
14424 (W_STOPCODE): Provide definition if missing.
14425
14426 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14427
14428 * linux-low.c (linux_core_of_thread): New.
14429 (compare_ints, show_process, list_threads): New.
14430 (linux_qxfer_osdata): Report threads and cores.
14431 (linux_target_op): Register linux_core_of_thread.
14432 * remote-utils.c (prepare_resume_reply): Report the core.
14433 (buffer_xml_printf): Support %d specifier.
14434 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14435 New.
14436 (handle_query): Handle qXfer:threads. Announce availability
14437 thereof.
14438 * target.h (struct target_ops): New field core_of_thread.
14439
14440 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14441
14442 * Makefile.in (clean): Remove new generated files.
14443 (reg-s390.o, reg-s390.c): Remove rules.
14444 (reg-s390x.o, reg-s390x.c): Likewise.
14445 (s390-linux32.o, s390-linux32.c): Add rules.
14446 (s390-linux64.o, s390-linux64.c): Likewise.
14447 (s390x-linux64.o, s390x-linux64.c): Likewise.
14448 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14449 * linux-s390-low.c: Include <elf.h>.
14450 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14451 (init_registers_s390): Remove prototype.
14452 (init_registers_s390x): Likewise.
14453 (init_registers_s390_linux32): Add prototype.
14454 (init_registers_s390_linux64): Likewise.
14455 (init_registers_s390x_linux64): Likewise.
14456 (s390_num_regs_3264): New define.
14457 (s390_regmap_3264): New global variable.
14458 (s390_cannot_fetch_register): Remove obsolete check.
14459 (s390_cannot_store_register): Likewise.
14460 (s390_collect_ptrace_register): Handle upper/lower register halves.
14461 (s390_supply_ptrace_register): Likewise.
14462 (s390_fill_gregset): Update to register number changes.
14463 (s390_get_hwcap): New routine.
14464 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14465 Install appropriate regmap and register set.
14466
14467 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14468
14469 * server.c (gdbserver_version): Update copyright year to 2010.
14470 * gdbreplay.c (gdbreplay_version): Likewise.
14471
14472 2009-12-28 Doug Evans <dje@google.com>
14473
14474 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14475 elf/external.h. Include <elf.h> instead but only if necessary.
14476
14477 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14478
14479 * linux-low.c (linux_remove_process): Remove `detaching'
14480 parameter. Don't release/detach from thread_db here.
14481 (linux_kill): Release/detach from thread_db here, ...
14482 (linux_detach): ... and here, before actually detaching.
14483 (linux_wait_1): ... and here, when a process exits.
14484 * thread-db.c (any_thread_of): New.
14485 (thread_db_free): Switch the current inferior to a thread of the
14486 passed in process.
14487
14488 2009-12-21 Doug Evans <dje@google.com>
14489
14490 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14491
14492 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14493 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14494 warning ifndef __NR_tkill. Move setting of errno there too.
14495 Delete unnecessary resetting of errno after syscall.
14496 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14497
14498 * configure.ac: Check for dladdr.
14499 * config.in: Regenerate.
14500 * configure: Regenerate.
14501 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14502 (try_thread_db_load): Update.
14503
14504 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14505
14506 2009-12-18 Doug Evans <dje@google.com>
14507
14508 * event-loop.c: Include unistd.h if it exists.
14509
14510 * linux-low.c (my_waitpid): Move definition away from being in
14511 between linux_tracefork_child/linux_test_for_tracefork.
14512
14513 * gdb_proc_service.h (psaddr_t): Fix type.
14514 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14515 signature to match glibc.
14516
14517 2009-12-16 Doug Evans <dje@google.com>
14518
14519 * linux-low.c (linux_read_memory): Fix argument to read.
14520
14521 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14522
14523 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14524 events, don't leave current_inferior pointing at null.
14525
14526 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14527
14528 * win32-low.c (LOG): Delete.
14529 (OUTMSG): Output to stderr.
14530 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14531 on compile time LOG macro.
14532 (win32_wait): Fix debug output.
14533
14534 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14535
14536 * win32-low.c (win32_add_one_solib): If the dll name is
14537 "ntdll.dll", prepend the system directory to the dll path.
14538
14539 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14540
14541 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14542
14543 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14544 Vladimir Prus <vladimir@codesourcery.com>
14545
14546 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14547 * configure.ac: Check for __mcoldfire__ and set
14548 gdb_cv_m68k_is_coldfire.
14549 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14550 reg-cf.o and reg-m68k.o.
14551 * configure: Regenerated.
14552
14553 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14554
14555 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14556 Pass it to thread_db_free.
14557 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14558 proper `detaching' argument to linux_remove_process.
14559 * linux-low.h (thread_db_free): Add `detaching' parameter.
14560 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14561 to thread_db_free.
14562 (thread_db_free): Add `detaching' parameter. Only
14563 call td_ta_clear_event if detaching from process.
14564
14565 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14566
14567 * thread-db.c (thread_db_free): Fix typo.
14568
14569 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14570
14571 PR gdb/10838
14572 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14573
14574 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14575
14576 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14577 with an i686 compiler.
14578 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14579 needed.
14580 * configure: Rebuilt.
14581
14582 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14583
14584 PR gdb/10783
14585
14586 * server.c (handle_search_memory_1): Correct read_addr initialization
14587 in loop for searching subsequent chunks.
14588
14589 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14590
14591 * configure.ac: New --with-libthread-db option.
14592 * thread-db.c: Allow direct dependence on libthread_db.
14593 (thread_db_free): Adjust.
14594 * config.in: Regenerate.
14595 * configure: Likewise.
14596
14597 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14598
14599 PR gdb/10757
14600 * thread-db.c (attach_thread): New function.
14601 (maybe_attach_thread): Return success/failure.
14602 (find_new_threads_callback): Adjust.
14603 (thread_db_find_new_threads): Loop until no new threads.
14604
14605 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14606
14607 * proc-service.c (ps_lgetregs): Formatting.
14608
14609 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14610
14611 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14612 * configure.ac: Adjust.
14613 * linux-low.h (struct process_info_private): Move members to struct
14614 thread_db.
14615 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14616 * linux-low.c (linux_remove_process): Adjust.
14617 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14618 * server.c (handle_query): Move code ...
14619 (handle_monitor_command): ... here. New function.
14620 * target.h (struct target_ops): New member.
14621 * thread-db.c (struct thread_db): New.
14622 (libthread_db_search_path): New variable.
14623 (thread_db_create_event, thread_db_enable_reporting)
14624 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14625 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14626 (try_thread_db_load_1, dladdr_to_soname): New functions.
14627 (try_thread_db_load, thread_db_load_search): New functions.
14628 (thread_db_init): Search for libthread_db.
14629 (thread_db_free): New function.
14630 (thread_db_handle_monitor_command): Likewise.
14631 * config.in: Regenerate.
14632 * configure: Regenerate.
14633
14634 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14635
14636 * spu-low.c (spu_kill): Wait for inferior to terminate.
14637 Call clear_inferiors.
14638 (spu_detach): Call clear_inferiors.
14639
14640 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14641
14642 * aclocal.m4: Regenerate.
14643 * config.in: Likewise.
14644 * configure: Likewise.
14645
14646 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14647
14648 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14649 (parse_spufs_run): New function.
14650 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14651 (ppc_breakpoint_at): Handle SPU breakpoints.
14652
14653 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14654
14655 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14656 (SPUFS_MAGIC): Define.
14657 (spu_enumerate_spu_ids): New function.
14658 (linux_qxfer_spu): New function.
14659 (linux_target_ops): Install linux_qxfer_spu.
14660
14661 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14662
14663 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14664 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14665 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14666 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14667 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14668 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14669 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14670 (init_registers_powerpc_cell32l): Add prototype.
14671 (init_registers_powerpc_cell64l): Likewise.
14672 (ppc_arch_setup): Detect Cell/B.E. architecture.
14673
14674 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14675
14676 * Makefile.in (datarootdir): New variable.
14677
14678 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14679
14680 * linux-low.c (linux_write_memory): Update debugging output.
14681 * Makefile.in (clean): Add new descriptions.
14682 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14683 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14684 * configure.srv: Add new files for arm*-*-linux*.
14685 * linux-arm-low.c: Add new declarations.
14686 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14687 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14688 (HWCAP_VFPv3D16): New.
14689 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14690 instead of __IWMMXT__.
14691 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14692 (arm_arch_setup): New.
14693 (target_regsets): Remove #ifdef. Add VFP regset.
14694 (the_low_target): Use arm_arch_setup.
14695
14696 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14699 the main thread again.
14700
14701 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14702
14703 Adding Neutrino gdbserver.
14704 * configure: Regenerated.
14705 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14706 * configure.srv (i[34567]86-*-nto*): New target.
14707 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14708 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14709 (nto_comctrl) [__QNX__]: New function.
14710 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14711
14712 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14713
14714 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14715 srv_tgtobj.
14716
14717 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14718 Pedro Alves <pedro@codesourcery.com>
14719
14720 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14721 don't support CONTEXT_EXTENDED_REGISTERS.
14722 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14723 (the_low_target): Install them.
14724 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14725 failing with ERROR_PIPE_NOT_CONNECTED.
14726
14727 2009-06-30 Doug Evans <dje@google.com>
14728 Pierre Muller <muller@ics.u-strasbg.fr>
14729
14730 Add h/w watchpoint support to x86-linux, win32-i386.
14731 * Makefile.in (SFILES): Add i386-low.c
14732 (i386_low_h): Define.
14733 (i386-low.o): Add dependencies.
14734 (linux-x86-low.o): Add i386-low.h dependency.
14735 (win32-i386-low.o): Ditto.
14736 * i386-low.c: New file.
14737 * i386-low.h: New file.
14738 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14739 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14740 * linux-low.c (linux_add_process): Initialize arch_private.
14741 (linux_remove_process): Free arch_private.
14742 (add_lwp): Initialize arch_private.
14743 (delete_lwp): Free arch_private.
14744 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14745 provided.
14746 * linux-low.h (process_info_private): New member arch_private.
14747 (lwp_info): New member arch_private.
14748 (linux_target_ops): New members new_process, new_thread,
14749 prepare_to_resume.
14750 (ptid_of): New macro.
14751 * linux-x86-low.c: Include stddef.h, i386-low.h.
14752 (arch_process_info): New struct.
14753 (arch_lwp_info): New struct.
14754 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14755 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14756 (i386_dr_low_get_status): New function.
14757 (x86_insert_point, x86_remove_point): New functions.
14758 (x86_stopped_by_watchpoint): New function.
14759 (x86_stopped_data_address): New function.
14760 (x86_linux_new_process, x86_linux_new_thread): New functions.
14761 (x86_linux_prepare_to_resume): New function.
14762 (the_low_target): Add entries for insert_point, remove_point,
14763 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14764 prepare_to_resume.
14765 * server.c (debug_hw_points): New global.
14766 (monitor_show_help): Document set debug-hw-points.
14767 (handle_query): Process "set debug-hw-points".
14768 * server.h (debug_hw_points): Declare.
14769 (paddress): Declare.
14770 * utils.c (NUMCELLS, CELLSIZE): New macros.
14771 (get_sell, xsnprintf, paddress): New functions.
14772 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14773 remove_point, stopped_by_watchpoint, stopped_data_address.
14774 * win32-i386-low.c: Include i386-low.h.
14775 (debug_reg_state): Replaces dr.
14776 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14777 (i386_dr_low_get_status): New function.
14778 (i386_insert_point, i386_remove_point): New functions.
14779 (i386_stopped_by_watchpoint): New function.
14780 (i386_stopped_data_address): New function.
14781 (i386_initial_stuff): Update.
14782 (get_thread_context,set_thread_context,i386_thread_added): Update.
14783 (the_low_target): Add entries for insert_point,
14784 remove_point, stopped_by_watchpoint, stopped_data_address.
14785 * win32-low.c (win32_insert_watchpoint): New function.
14786 (win32_remove_watchpoint): New function.
14787 (win32_stopped_by_watchpoint): New function.
14788 (win32_stopped_data_address): New function.
14789 (win32_target_ops): Add entries for insert_watchpoint,
14790 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14791 * win32-low.h (win32_target_ops): New members insert_point,
14792 remove_point, stopped_by_watchpoint, stopped_data_address.
14793
14794 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14795
14796 * server.c (process_serial_event): Re-return unsupported, not
14797 error, if the type isn't recognized. Re-allow supporting only
14798 insert or remove packets. Also call require_running for
14799 breakpoints. Add missing break statement to default case. Tidy.
14800 * target.h (struct target_ops): Rename insert_watchpoint to
14801 insert_point, and remove_watchpoint to remove_point.
14802
14803 * linux-low.h (struct linux_target_ops): Likewise.
14804 * linux-low.c (linux_insert_watchpoint): Rename to ...
14805 (linux_insert_point): ... this. Adjust.
14806 (linux_remove_watchpoint): Rename to ...
14807 (linux_remove_point): ... this. Adjust.
14808 (linux_target_ops): Adjust.
14809 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14810 (cris_insert_point): ... this.
14811 (cris_remove_watchpoint): Rename to ...
14812 (cris_remove_point): ... this.
14813 (the_low_target): Adjust.
14814
14815 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14816
14817 * server.c (handle_v_kill): Pass signal_pid to
14818 kill_inferior if multi_process is zero.
14819
14820 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14821
14822 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14823 * target.h (target_ops): Comment for *_watchpoint to make it clear
14824 the functions can get types '0' and '1'.
14825
14826 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14827
14828 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14829 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14830 * regcache.c (get_regcache): Likewise.
14831 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14832 * win32-low.c (child_fetch_inferior_registers): Remove check for
14833 regno 0.
14834
14835 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14836 Pedro Alves <pedro@codesourcery.com>
14837
14838 * target.h (struct target_ops) <supports_multi_process>: New
14839 callback.
14840 (target_supports_multi_process): New.
14841 * server.c (handle_query): Even if GDB reports support, only
14842 enable multi-process if the target also supports it. Report
14843 multi-process support only if the target backend supports it.
14844 * linux-low.c (linux_supports_multi_process): New function.
14845 (linux_target_ops): Install it as target_supports_multi_process
14846 callback.
14847
14848 2009-05-24 Doug Evans <dje@google.com>
14849
14850 Global renaming of find_thread_pid to find_thread_ptid.
14851 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14852 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14853 All callers updated.
14854
14855 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14856 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14857 directly.
14858
14859 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14860 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14861 (linux_resume_one_lwp): Ditto.
14862
14863 2009-05-23 Doug Evans <dje@google.com>
14864
14865 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14866 from struct inferior_list_entry * to struct lwp_info *.
14867 All callers updated.
14868
14869 2009-05-13 Doug Evans <dje@google.com>
14870
14871 * linux-x86-low.c: Don't include assert.h.
14872 (x86_siginfo_fixup): Use fatal, not assert.
14873 (x86_arch_setup): Fix comment.
14874
14875 2009-05-12 Doug Evans <dje@google.com>
14876
14877 Biarch support for i386/amd64 gdbserver.
14878 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14879 Add linux-x86-low.c.
14880 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14881 (linux-x86-low.o): Add.
14882 * linux-x86-64-low.c: Delete.
14883 * linux-i386-low.c: Delete.
14884 * linux-x86-low.c: New file.
14885 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14886 linux-x86-low.o.
14887 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14888 linux-x86-low.o.
14889 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14890 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14891 (linux_child_pid_to_exec_file): New function.
14892 (elf_64_header_p, elf_64_file_p): New functions.
14893 (siginfo_fixup): New function.
14894 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14895 give target a chance to convert layout.
14896 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14897 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14898
14899 2009-05-07 Doug Evans <dje@google.com>
14900
14901 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14902 (regsets_store_inferior_registers): Ditto.
14903
14904 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14905
14906 PR server/10048
14907
14908 * linux-low.c (must_set_ptrace_flags): Delete.
14909 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14910 of the global.
14911 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14912 `lwp->must_set_ptrace_flags' instead.
14913 (linux_wait_for_event_1): Set ptrace options here.
14914 (linux_wait_1): ... not here.
14915
14916 2009-04-30 Doug Evans <dje@google.com>
14917
14918 * inferiors.c (started_inferior_callback): New function.
14919 (attached_inferior_callback): New function.
14920 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14921 * server.c (print_started_pid, print_attached_pid): New functions.
14922 (detach_or_kill_for_exit): New function.
14923 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14924 * server.h (have_started_inferiors_p): Declare.
14925 (have_attached_inferiors_p): Declare.
14926
14927 * inferiors.c (remove_process): Fix memory leak, free process.
14928 * linux-low.c (linux_remove_process): New function.
14929 (linux_kill): Call it instead of remove_process.
14930 (linux_detach, linux_wait_1): Ditto.
14931
14932 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14933
14934 * configure.srv: Add x86 Windows CE target.
14935
14936 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14937
14938 * inferiors.c (get_thread_process): Make global.
14939 * server.h (get_thread_process): Add prototype.
14940 * thread-db.c (find_one_thread): Use get_thread_process
14941 instead of current_process.
14942 (thread_db_get_tls_address): Do not crash if called when
14943 thread layer is not yet initialized.
14944
14945 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14946
14947 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14948 * spu-low.c (current_tid): Rename to ...
14949 (current_ptid): ... this.
14950 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14951 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14952 ptid_get_lwp (current_ptid) instead of current_tid.
14953 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14954 instead of current_tid. Use find_process_pid to verify pid
14955 argument is valid. Pass proper argument to remove_process.
14956 (spu_thread_alive): Compare current_ptid instead of current_tid.
14957 (spu_resume): Likewise.
14958
14959 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14960
14961 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14962 variable.
14963
14964 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14965
14966 Implement the multiprocess extensions, and add linux multiprocess
14967 support.
14968
14969 * server.h (ULONGEST): Declare.
14970 (struct ptid, ptid_t): New.
14971 (minus_one_ptid, null_ptid): Declare.
14972 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14973 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14974 (struct inferior_list_entry): Change `id' type from unsigned from
14975 to ptid_t.
14976 (struct sym_cache, struct breakpoint, struct
14977 process_info_private): Forward declare.
14978 (struct process_info): Declare.
14979 (current_process): Declare.
14980 (all_processes): Declare.
14981 (initialize_inferiors): Declare.
14982 (add_thread): Adjust to use ptid_t.
14983 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14984 (add_process, remove_process, find_thread_pid): Declare.
14985 (find_inferior_id): Adjust to use ptid_t.
14986 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14987 (multi_process): Declare.
14988 (push_event): Adjust to use ptid_t.
14989 (read_ptid, write_ptid): Declare.
14990 (prepare_resume_reply): Adjust to use ptid_t.
14991 (clear_symbol_cache): Declare.
14992 * inferiors.c (all_processes): New.
14993 (null_ptid, minus_one_ptid): New.
14994 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14995 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14996 (add_thread): Change unsigned long to ptid. Remove gdb_id
14997 parameter. Adjust.
14998 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14999 (gdb_id_to_thread): Rename to ...
15000 (find_thread_pid): ... this. Change unsigned long to ptid.
15001 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15002 (loaded_dll, pull_pid_from_list): Adjust.
15003 (add_process, remove_process, find_process_pid)
15004 (get_thread_process, current_process, initialize_inferiors): New.
15005 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15006 (struct target_waitstatus) <related_pid>: Ditto.
15007 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15008 return type to int.
15009 (struct target_ops) <join>: Add `pid' argument.
15010 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15011 (struct target_ops) <wait>: Add `ptid' field. Change return type
15012 to ptid.
15013 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15014 (mywait): Add `ptid' argument. Change return type to ptid_t.
15015 (target_pid_to_str): Declare.
15016 * target.c (set_desired_inferior): Adjust to use ptids.
15017 (mywait): Add new `ptid' argument. Adjust.
15018 (target_pid_to_str): New.
15019 * mem-break.h (free_all_breakpoints): Declare.
15020 * mem-break.c (breakpoints): Delelete.
15021 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15022 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15023 to use per-process breakpoint list.
15024 (free_all_breakpoints): New.
15025 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15026 (symbol_cache, all_symbols_looked_up): Delete.
15027 (hexchars): New.
15028 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15029 read_ptid): New.
15030 (prepare_resume_reply): Change ptid argument's type from unsigned
15031 long to ptid_t. Adjust. Implement W;process and X;process.
15032 (free_sym_cache, clear_symbol_cache): New.
15033 (look_up_one_symbol): Adjust to per-process symbol cache. *
15034 * server.c (cont_thread, general_thread, step_thread): Change type
15035 to ptid_t.
15036 (attached): Delete.
15037 (multi_process): New.
15038 (last_ptid): Change type to ptid_t.
15039 (struct vstop_notif) <ptid>: Change type to ptid_t.
15040 (queue_stop_reply, push_event): Change `ptid' argument's type to
15041 ptid_t.
15042 (discard_queued_stop_replies): Add `pid' argument.
15043 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15044 changes. Don't reference the `attached' global.
15045 (attach_inferior): Adjust to mywait interface changes.
15046 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15047 features. Handle and report "multiprocess+". Handle
15048 "qAttached:PID".
15049 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15050 changes.
15051 (handle_v_kill): New.
15052 (handle_v_stopped): Adjust to use target_pid_to_str.
15053 (handle_v_requests): Allow multiple attaches and runs when
15054 multiprocess extensions are in effect. Handle "vKill".
15055 (myresume): Adjust to use ptids.
15056 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15057 (handle_status): Adjust to discard_queued_stop_replies interface
15058 change.
15059 (first_thread_of, kill_inferior_callback)
15060 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15061 (main): Call initialize_inferiors. Adjust to use ptids, killing
15062 and detaching from all inferiors. Handle multiprocess packet
15063 variants.
15064 * linux-low.h: Include gdb_proc_service.h.
15065 (struct process_info_private): New.
15066 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15067 <lwpid_of>: Use ptid_get_lwp.
15068 (get_lwp_thread): Adjust.
15069 (struct lwp_info): Add `dead' member.
15070 (find_lwp_pid): Declare.
15071 * linux-low.c (thread_db_active): Delete.
15072 (new_inferior): Adjust comment.
15073 (inferior_pid): Delete.
15074 (linux_add_process): New.
15075 (handle_extended_wait): Adjust.
15076 (add_lwp): Change unsigned long to ptid.
15077 (linux_create_inferior): Add process to processes table. Adjust
15078 to use ptids. Don't set new_inferior here.
15079 (linux_attach_lwp): Rename to ...
15080 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15081 it. Adjust to use ptids.
15082 (linux_attach_lwp): New.
15083 (linux_attach): Add process to processes table. Don't set
15084 new_inferior here.
15085 (struct counter): New.
15086 (second_thread_of_pid_p, last_thread_of_process_p): New.
15087 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15088 multiple processes.
15089 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15090 processes. Remove process from process table.
15091 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15092 to multiple processes.
15093 (any_thread_of): New.
15094 (linux_detach): Add `pid' argument, and handle it. Remove process
15095 from processes table.
15096 (linux_join): Add `pid' argument. Handle it.
15097 (linux_thread_alive): Change unsighed long argument to ptid_t.
15098 Consider dead lwps as not being alive.
15099 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15100 threads we're not interested in.
15101 (same_lwp, find_lwp_pid): New.
15102 (linux_wait_for_lwp): Change `pid' argument's type from int to
15103 ptid_t. Adjust.
15104 (linux_wait_for_event): Rename to ...
15105 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15106 from int to ptid_t. Adjust.
15107 (linux_wait_for_event): New.
15108 (linux_wait_1): Add `ptid' argument. Change return type to
15109 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15110 that exit from the process table.
15111 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15112 Adjust.
15113 (mark_lwp_dead): New.
15114 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15115 stopping all threads, mark its main lwp as dead.
15116 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15117 ptids.
15118 (fetch_register, usr_store_inferior_registers)
15119 (regsets_fetch_inferior_registers)
15120 (regsets_store_inferior_registers, linux_read_memory)
15121 (linux_write_memory): Inline `inferior_pid'.
15122 (linux_look_up_symbols): Adjust to use per-process
15123 `thread_db_active'.
15124 (linux_request_interrupt): Adjust to use ptids.
15125 (linux_read_auxv): Inline `inferior_pid'.
15126 (initialize_low): Don't reference thread_db_active.
15127 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15128 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15129 (ps_getpid): Return the pid of the current inferior.
15130 * thread-db.c (proc_handle, thread_agent): Delete.
15131 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15132 per-process data.
15133 (find_one_thread): Change argument type to ptid_t. Adjust to
15134 per-process data.
15135 (maybe_attach_thread): Adjust to per-process data and ptids.
15136 (thread_db_find_new_threads): Ditto.
15137 (thread_db_init): Ditto.
15138 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15139 processes table. Adjust to use ptids.
15140 (spu_kill, spu_detach): Adjust interface. Remove process from
15141 processes table.
15142 (spu_join, spu_thread_alive): Adjust interface.
15143 (spu_wait): Adjust interface. Remove process from processes
15144 table. Adjust to use ptids.
15145 * win32-low.c (current_inferior_tid): Delete.
15146 (current_inferior_ptid): New.
15147 (debug_event_ptid): New.
15148 (thread_rec): Take a ptid. Adjust.
15149 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15150 (child_delete_thread): Ditto.
15151 (do_initial_child_stuff): Add `attached' argument. Add process to
15152 processes table.
15153 (child_fetch_inferior_registers, child_store_inferior_registers):
15154 Adjust.
15155 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15156 (win32_attach): Pass 1 to do_initial_child_stuff.
15157 (win32_kill): Adjust interface. Remove process from processes
15158 table.
15159 (win32_detach): Ditto.
15160 (win32_join): Adjust interface.
15161 (win32_thread_alive): Take a ptid.
15162 (win32_resume): Adjust to use ptids.
15163 (get_child_debug_event): Ditto.
15164 (win32_wait): Adjust interface. Remove exiting process from
15165 processes table.
15166
15167 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15168
15169 Non-stop mode support.
15170
15171 * server.h (non_stop): Declare.
15172 (gdb_client_data, handler_func): Declare.
15173 (delete_file_handler, add_file_handler, start_event_loop):
15174 Declare.
15175 (handle_serial_event, handle_target_event, push_event)
15176 (putpkt_notif): Declare.
15177 * target.h (enum resume_kind): New.
15178 (struct thread_resume): Replace `step' field by `kind' field.
15179 (TARGET_WNOHANG): Define.
15180 (struct target_ops) <wait>: Add `options' argument.
15181 <supports_non_stop, async, start_non_stop>: New fields.
15182 (target_supports_non_stop, target_async): New.
15183 (start_non_stop): Declare.
15184 (mywait): Add `options' argument.
15185 * target.c (mywait): Add `options' argument. Print child exit
15186 notifications here.
15187 (start_non_stop): New.
15188 * server.c (non_stop, own_buf, mem_buf): New globals.
15189 (struct vstop_notif): New.
15190 (notif_queue): New global.
15191 (queue_stop_reply, push_event, discard_queued_stop_replies)
15192 (send_next_stop_reply): New.
15193 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15194 interface changes.
15195 (attach_inferior): In non-stop mode, don't wait for the target
15196 here.
15197 (handle_general_set): Handle QNonStop.
15198 (handle_query): When handling qC, return the current general
15199 thread, instead of the first thread of the list.
15200 (handle_query): If the backend supports non-stop mode, include
15201 QNonStop+ in the qSupported query response.
15202 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15203 and non-stop mode.
15204 (handle_v_attach, handle_v_run): Handle non-stop mode.
15205 (handle_v_stopped): New.
15206 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15207 (myresume): Adjust to use resume_kind. Handle non-stop.
15208 (queue_stop_reply_callback): New.
15209 (handle_status): Handle non-stop mode.
15210 (main): Clear non_stop flag on reconnection. Use the event-loop.
15211 Refactor serial protocol handling from here ...
15212 (process_serial_event): ... to this new function. When GDB
15213 selects any thread, select one here. In non-stop mode, wait until
15214 GDB acks all pending events before exiting.
15215 (handle_serial_event, handle_target_event): New.
15216 * remote-utils.c (remote_open): Install remote_desc in the event
15217 loop.
15218 (remote_close): Remove remote_desc from the event loop.
15219 (putpkt_binary): Rename to...
15220 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15221 (putpkt_binary): New as wrapper around putpkt_binary_1.
15222 (putpkt_notif): New.
15223 (prepare_resume_reply): In non-stop mode, don't change the
15224 general_thread.
15225 * event-loop.c: New.
15226 * Makefile.in (OBJ): Add event-loop.o.
15227 (event-loop.o): New rule.
15228
15229 * linux-low.h (pid_of): Moved here.
15230 (lwpid_of): New.
15231 (get_lwp_thread): Use lwpid_of.
15232 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15233 * linux-low.c (pid_of): Delete.
15234 (inferior_pid): Use lwpid_of.
15235 (linux_event_pipe): New.
15236 (target_is_async_p): New.
15237 (delete_lwp): New.
15238 (handle_extended_wait): Use lwpid_of.
15239 (add_lwp): Don't set lwpid field.
15240 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15241 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15242 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15243 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15244 first. Adjust to linux_wait_for_event interface changes. Use
15245 lwpid_of.
15246 (linux_detach): Don't delete the main lwp here.
15247 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15248 (status_pending_p): Don't consider explicitly suspended lwps.
15249 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15250 pointer. Add OPTIONS argument. Change return type to int. Use
15251 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15252 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15253 pointer. Add status pointer argument. Return a pid instead of a
15254 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15255 changes. In non-stop mode, don't switch to a random thread.
15256 (linux_wait): Rename to...
15257 (linux_wait_1): ... this. Add target_options argument, and handle
15258 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15259 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15260 clean exit and signal exit code. Don't stop all threads in
15261 non-stop mode. In all-stop mode, only stop all threads when
15262 reporting a stop to GDB. Handle explicit thread stop requests.
15263 (async_file_flush, async_file_mark): New.
15264 (linux_wait): New.
15265 (send_sigstop): Use lwpid_of.
15266 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15267 interface changes. In non-stop mode, don't switch to a random
15268 thread.
15269 (linux_resume_one_lwp): Use lwpid_of.
15270 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15271 (linux_resume_one_thread): ... this. Handle resume_stop. In
15272 non-stop mode, don't look for pending flag in all threads.
15273 (resume_status_pending_p): Don't consider explicitly suspended
15274 threads.
15275 (my_waitpid): Reimplement. Emulate __WALL.
15276 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15277 Use lwpid_of.
15278 (sigchld_handler, linux_supports_non_stop, linux_async)
15279 (linux_start_non_stop): New.
15280 (linux_target_ops): Register linux_supports_non_stop, linux_async
15281 and linux_start_non_stop.
15282 (initialize_low): Install SIGCHLD handler.
15283 * thread-db.c (thread_db_create_event, find_one_thread)
15284 (thread_db_get_tls_address): Use lwpid_of.
15285 * win32-low.c (win32_detach): Adjust to use resume_kind.
15286 (win32_wait): Add `options' argument.
15287 * spu-low.c (spu_resume): Adjust to use resume_kind.
15288 (spu_wait): Add `options' argument.
15289
15290 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15291
15292 Decouple target code from remote protocol.
15293
15294 * target.h (enum target_waitkind): New.
15295 (struct target_waitstatus): New.
15296 (struct target_ops) <wait>: Return an unsigned long. Take a
15297 target_waitstatus pointer instead of a char pointer.
15298 (mywait): Likewise.
15299 * target.c (mywait): Change prototype to return an unsigned long.
15300 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15301 * server.h (thread_from_wait, old_thread_from_wait): Delete
15302 declarations.
15303 (prepare_resume_reply): Change prototype to take a
15304 target_waitstatus.
15305 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15306 (last_status, last_ptid): New.
15307 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15308 pid instead of a signal.
15309 (attach_inferior): Remove "status" and "signal" parameters.
15310 Adjust.
15311 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15312 not as an address.
15313 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15314 (handle_v_requests, myresume): Remove "status" and "signal"
15315 parameters. Adjust.
15316 (handle_status): New.
15317 (main): Delete local `status'. Adjust.
15318 * remote-utils.c: Include target.h.
15319 (prepare_resume_reply): Change prototype to take a
15320 target_waitstatus. Adjust.
15321
15322 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15323 interface.
15324 * spu-low.c (spu_wait): Adjust.
15325 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15326 Delete.
15327 (win32_wait): Adjust.
15328
15329 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15330
15331 * target.h (struct thread_resume): Delete leave_stopped member.
15332 (struct target_ops): Add a `n' argument to the `resume' callback.
15333 * server.c (start_inferior): Adjust.
15334 (handle_v_cont, myresume): Adjust.
15335 * linux-low.c (check_removed_breakpoint): Adjust to resume
15336 interface change, and to removed leave_stopped field.
15337 (resume_ptr): Delete.
15338 (struct thread_resume_array): New.
15339 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15340 resume interface change.
15341 (linux_continue_one_thread, linux_queue_one_thread)
15342 (resume_status_pending_p): Check if the resume field is NULL
15343 instead of checking the leave_stopped member.
15344 (linux_resume): Adjust to the target resume interface change.
15345 * spu-low.c (spu_resume): Adjust to the target resume interface
15346 change.
15347 * win32-low.c (win32_detach, win32_resume): Ditto.
15348
15349 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15350
15351 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15352 flag.
15353 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15354 pending.
15355 (linux_continue_one_thread): Only preserve the stepping flag if
15356 there's a pending breakpoint.
15357
15358 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15359
15360 * server.c (main): After the inferior having exited, call
15361 remote_close before exiting gdbserver.
15362
15363 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15364
15365 Fix size of FPSCR in Power 7 processors.
15366 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15367 (PPC_FEATURE_HAS_DFP): New #define.
15368 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15369 size of the FPSCR.
15370
15371 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15372
15373 * server.c (handle_query) Whitespace and formatting.
15374
15375 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15376
15377 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15378 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15379 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15380 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15381 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15382 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15383 Makefile.in, configure.ac: Fix whitespace throughout.
15384 * configure: Regenerate.
15385
15386 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15387
15388 * inferiors.c (find_inferior): Make it safe for the callback
15389 function to delete the currently iterated inferior.
15390
15391 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15392
15393 * Makefile.in (linuw_low_h): Move higher.
15394 (thread-db.o): Depend on $(linux_low_h).
15395
15396 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15397
15398 Rename "process" to "lwp" throughout.
15399
15400 * linux-low.c (all_processes): Rename to...
15401 (all_lwps): ... this.
15402 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15403 (add_process): Rename to ...
15404 (add_lwp): ... this. Adjust.
15405 (linux_create_inferior): Adjust.
15406 (linux_attach_lwp): Adjust.
15407 (linux_attach): Adjust.
15408 (linux_kill_one_process): Rename to ...
15409 (linux_kill_one_lwp): ... this. Adjust.
15410 (linux_kill): Adjust.
15411 (linux_detach_one_process): Rename to ...
15412 (linux_detach_one_lwp): ... this. Adjust.
15413 (linux_detach): Adjust.
15414 (check_removed_breakpoint): Adjust.
15415 (status_pending_p): Adjust.
15416 (linux_wait_for_process): Rename to ...
15417 (linux_wait_for_lwp): ... this. Adjust.
15418 (linux_wait_for_event): Adjust.
15419 (send_sigstop): Adjust.
15420 (wait_for_sigstop): Adjust.
15421 (stop_all_processes): Rename to ...
15422 (stop_all_lwps): ... this.
15423 (linux_resume_one_process): Rename to ...
15424 (linux_resume_one_lwp): ... this. Adjust.
15425 (linux_set_resume_request, linux_continue_one_thread)
15426 (linux_queue_one_thread, resume_status_pending_p)
15427 (usr_store_inferior_registers, regsets_store_inferior_registers)
15428 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15429 Adjust.
15430 * linux-low.h (get_process): Rename to ...
15431 (get_lwp): ... this. Adjust.
15432 (get_thread_process): Rename to ...
15433 (get_thread_lwp): ... this. Adjust.
15434 (get_process_thread): Rename to ...
15435 (get_lwp_thread): ... this. Adjust.
15436 (struct process_info): Rename to ...
15437 (struct lwp_info): ... this.
15438 (all_processes): Rename to ...
15439 (all_lwps): ... this.
15440 * proc-service.c (ps_lgetregs): Adjust.
15441 * thread-db.c (thread_db_create_event, find_one_thread)
15442 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15443
15444 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15445
15446 * server.c (handle_query): Handle "qAttached".
15447
15448 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15449
15450 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15451 GPLv3, update license URL.
15452
15453 2009-03-01 Doug Evans <dje@google.com>
15454
15455 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15456 (server_h): Add gdb_signals.h.
15457 (signals.o): Update.
15458 * server.h (target_signal_from_host,target_signal_to_host_p)
15459 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15460
15461 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15462
15463 * remote-utils.c (getpkt): Also generate remote-debug
15464 information if noack_mode is set.
15465
15466 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15467
15468 * server.c (handle_query): Report qXfer:siginfo:read and
15469 qXfer:siginfo:write as supported and handle them.
15470 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15471 * linux-low.c (linux_xfer_siginfo): New.
15472 (linux_target_ops): Set it.
15473
15474 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15475
15476 * server.c (gdbserver_usage): Mention --remote-debug.
15477 (main): Accept '--remote-debug' switch.
15478
15479 2009-01-18 Doug Evans <dje@google.com>
15480
15481 * regcache.c (new_register_cache): No need to check result of xcalloc.
15482 * server.c (handle_search_memory): Back out calls to xmalloc,
15483 result is checked and error is returned to user upon failure.
15484 (handle_query): Ditto. Add more checks for result of malloc.
15485 (handle_v_cont): Check result of malloc, report error back to
15486 user upon failure.
15487 (handle_v_run): Ditto. Call freeargv.
15488 * server.h (freeargv): Declare.
15489 * utils.c (freeargv): New fn.
15490
15491 2009-01-15 Doug Evans <dje@google.com>
15492
15493 * gdbreplay.c (perror_with_name): Make arg const char *.
15494 * server.h (target_signal_to_name): Make return type const char *.
15495 * thread-db.c (thread_db_err_str): Make return type const char *.
15496 * utils.c (perror_with_name): Make arg const char *.
15497
15498 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15499
15500 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15501 when handling a EXIT_PROCESS_DEBUG_EVENT.
15502
15503 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15504
15505 * gdbreplay.c (gdbreplay_version): Update copyright year.
15506 * server.c (gdbserver_version): Likewise.
15507
15508 2009-01-05 Doug Evans <dje@google.com>
15509
15510 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15511 (handle_extended_wait): Improve comment.
15512
15513 2008-12-13 Doug Evans <dje@google.com>
15514
15515 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15516 * server.h (ATTR_MALLOC): New macro.
15517 (xmalloc,xcalloc,xstrdup): Declare.
15518 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15519 * inferiors.c: Ditto.
15520 * linux-low.c: Ditto.
15521 * mem-break.c: Ditto.
15522 * regcache.c: Ditto.
15523 * remote-utils.c: Ditto.
15524 * server.c: Ditto.
15525 * target.c: Ditto.
15526 * win32-low.c: Ditto.
15527
15528 2008-12-12 Doug Evans <dje@google.com>
15529
15530 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15531 in debugging printf.
15532
15533 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15534
15535 2008-12-09 Doug Evans <dje@google.com>
15536
15537 * linux-low.h (struct process_info): Delete member tid, unused.
15538 * thread-db.c (find_one_thread): Update.
15539 (maybe_attach_thread): Update.
15540
15541 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15542
15543 * target.h (struct target_ops): Add qxfer_osdata member.
15544 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15545 and dirent.h.
15546 (linux_qxfer_osdata): New functions.
15547 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15548 callback.
15549 * server.c (handle_query): Handle "qXfer:osdata:read:".
15550 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15551 (buffer_xml_printf): New functions.
15552 * server.h (struct buffer): New.
15553 (buffer_grow_str, buffer_grow_str0): New macros.
15554 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15555 (buffer_xml_printf): Declare.
15556
15557 2008-11-24 Doug Evans <dje@google.com>
15558
15559 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15560
15561 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15562
15563 * server.c (handle_v_run): Always use the supplied argument list.
15564
15565 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15566
15567 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15568 (xtensa_regmap_table): Add entry for scompare1.
15569
15570 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15571
15572 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15573 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15574 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15575 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15576 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15577 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15578 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15579 XML target descriptions.
15580 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15581 when inferior is running on an ISA 2.05 or later processor. Add
15582 special case to return offset for full 64-bit slot of FPSCR when
15583 in 32-bits.
15584
15585 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15586
15587 * Makefile.in (SFILES, clean): Added sparc64 files.
15588 (reg-sparc64.o, reg-sparc64.c): New.
15589 * configure.srv (sparc*-*-linux*): New configuration.
15590 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15591 syscall arguments for SPARC.
15592 (regsets_store_inferior_registers): Likewise.
15593 * linux-sparc-low.c: New file.
15594
15595 2008-10-21 Doug Evans <dje@google.com>
15596
15597 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15598 (READLINE_DIR,READLINE_DEP): Delete.
15599 (INTERNAL_CFLAGS): Update.
15600 (LINTFLAGS): Update.
15601
15602 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15603
15604 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15605 whole argv from the last run, not just argv[0].
15606
15607 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15608
15609 * regcache.c (new_register_cache): Return NULL if the register
15610 cache size isn't known yet.
15611 (free_register_cache): Avoid dereferencing a NULL regcache.
15612
15613 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * configure.srv: Merge MIPS and MIPS64.
15616
15617 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15618
15619 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15620
15621 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15622
15623 * Makefile.in: Add required vsx dependencies.
15624
15625 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15626 Declare init_registers_powerpc_vsx32l.
15627 Declare init_registers_powerpc_vsx64l.
15628 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15629 (ppc_arch_setup): Check for VSX in hwcap.
15630 (ppc_fill_vsxregset): New function.
15631 (ppc_store_vsxregset): New function.
15632 Add new VSX entry in regset_info target_regsets.
15633
15634 * configure.srv: Add new VSX dependencies.
15635
15636 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15637
15638 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15639 (remote_open): Set or clear transport_is_reliable.
15640 (putpkt_binary): Don't expect acks in noack mode.
15641 (getpkt): Don't send ack/nac in noack mode.
15642 * server.c (handle_general_set): Handle QStartNoAckMode.
15643 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15644 qSupported.
15645 (main): Reset noack_mode on every connection.
15646 * server.h (noack_mode): Declare.
15647
15648 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15649
15650 * Makefile.in (GDBREPLAY_OBS): New variable.
15651 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15652
15653 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15654 Daniel Jacobowitz <dan@codesourcery.com>
15655
15656 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15657 (usr_store_inferior_registers): Likewise.
15658 (regsets_store_inferior_registers): Likewise.
15659
15660 2008-07-31 Rolf Jansen <rj@surtec.com>
15661 Pedro Alves <pedro@codesourcery.com>
15662
15663 * configure.ac: Check for memmem declaration.
15664 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15665 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15666 (disable_packet_qfThreadInfo): Unconditionally compile.
15667 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15668 * configure, config.in: Regenerate.
15669
15670 2008-07-28 Doug Kwan <dougkwan@google.com>
15671
15672 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15673 (linux_write_memory): Remove declaration of errno.
15674
15675 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15676
15677 * linux-low.c (handle_extended_wait): Do not use "status"
15678 variable uninitialized.
15679
15680 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15681
15682 * server.c (handle_v_attach): Inhibit reporting dll changes.
15683
15684 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15685
15686 * remote-utils.c (prepare_resume_reply): If requested, don't
15687 output "thread:TID" in the T stop reply.
15688
15689 * server.c (disable_packet_vCont, disable_packet_Tthread)
15690 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15691 (handle_query): If requested, disable support for qC, qfThreadInfo
15692 and qsThreadInfo.
15693 (handle_v_requests): If requested, disable support for vCont.
15694 (gdbserver_show_disableable): New.
15695 (main): Handle --disable-packet and --disable-packet=LIST.
15696
15697 * server.h (disable_packet_vCont, disable_packet_Tthread)
15698 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15699
15700 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15701
15702 * server.c (gdbserver_usage): Mention --version.
15703
15704 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15705
15706 * Makefile.in (gdbreplay.o): New rule.
15707
15708 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15709
15710 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15711 message, not gdbserver.
15712
15713 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15714 Nathan Sidwell <nathan@codesourcery.com>
15715 Joseph Myers <joseph@codesourcery.com>
15716
15717 * acinclude.m4: Include ../../config/acx.m4.
15718 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15719 * configure, config.in: Regenerate.
15720 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15721 * server.c (gdbserver_version): Print PKGVERSION.
15722 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15723 (main): Adjust gdbserver_usage calls.
15724 * gdbreplay.c (version, host_name): Add declarations.
15725 (gdbreplay_version, gdbreplay_usage): New.
15726 (main): Accept --version and --help options.
15727
15728 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15731 (arm_breakpoint_at): Handle Thumb.
15732 (the_low_target): Add comment.
15733
15734 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15735
15736 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15737
15738 2008-05-09 Doug Evans <dje@google.com>
15739
15740 * server.h (decode_search_memory_packet): Declare.
15741 * remote-utils.c (decode_search_memory_packet): New fn.
15742 * server.c (handle_search_memory_1): New fn.
15743 (handle_search_memory): New fn.
15744 (handle_query): Process qSearch:memory packets.
15745
15746 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15747
15748 * regcache.c (registers_length): Remove.
15749 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15750 full register packet.
15751 * regcache.h (registers_length): Remove prototype.
15752 * server.h (PBUFSIZ): Define to 16384.
15753
15754 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15755
15756 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15757 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15758 powerpc-64l.o, and powerpc-altivec64l.o.
15759 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15760 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15761 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15762 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15763 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15764 to srv_xmlfiles.
15765
15766 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15767 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15768 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15769 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15770 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15771 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15772 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15773 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15774 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15775 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15776 (clean): Update.
15777
15778 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15779 (init_registers_powerpc_32l): ... this new prototype.
15780 (init_registers_powerpc_32): Remove, replace by ...
15781 (init_registers_powerpc_altivec32l): ... this new prototype.
15782 (init_registers_powerpc_e500): Remove, replace by ...
15783 (init_registers_powerpc_e500l): ... this new prototype.
15784 (init_registers_ppc64): Remove, replace by ...
15785 (init_registers_powerpc_64l): ... this new prototype.
15786 (init_registers_powerpc_64): Remove, replace by ...
15787 (init_registers_powerpc_altivec64l): ... this new prototype.
15788 (ppc_num_regs): Set to 73.
15789 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15790 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15791 (ppc_cannot_store_register): Handle orig_r3 and trap.
15792 (ppc_arch_setup): Update init_registers_... calls.
15793 (ppc_fill_gregset): Handle orig_r3 and trap.
15794
15795 * inferiors.c (clear_inferiors): Reset current_inferior.
15796
15797 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15798
15799 * acinclude.m4: Add override.m4.
15800 * configure: Regenerate.
15801
15802 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15803
15804 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15805 initial call to init_register_ppc64.
15806
15807 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15808
15809 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15810 single powerpc*-*-linux* case.
15811 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15812
15813 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15814
15815 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15816 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15817 from reg_xmlfiles.
15818 * linux-ppc-low.c: Include <elf.h>.
15819 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15820 (ppc_hwcap): New global variable.
15821 (ppc_regmap): Remove __SPE__ #ifdef sections.
15822 (ppc_regmap_e500): New global variable.
15823 (ppc_cannot_store_register): Update __SPE__ special case.
15824 (ppc_get_hwcap): New function.
15825 (ppc_arch_setup): Use it to determine whether inferior supports
15826 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15827 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15828 Do not access registers if target does not support AltiVec.
15829 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15830 Do not access registers if target does not support SPE.
15831 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15832
15833 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15834
15835 * linux-low.c (disabled_regsets, num_regsets): New.
15836 (use_regsets_p): Delete.
15837 (linux_wait_for_process): Clear disabled_regsets.
15838 (regsets_fetch_inferior_registers): Check and set it.
15839 (regsets_store_inferior_registers): Likewise.
15840 (linux_fetch_registers, linux_store_registers): Do not use
15841 use_regsets_p.
15842 (initialize_low): Allocate disabled_regsets.
15843
15844 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15845
15846 * Makefile.in (LIBOBJS): New.
15847 (OBS): Use LIBOBJS.
15848 (memmem.o): New rule.
15849 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15850 * configure: Regenerated.
15851
15852 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15853
15854 * server.c (handle_query): Never return "unsupported" for
15855 qXfer:features:read queries.
15856
15857 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15858
15859 * server.c (get_features_xml): Fix inverted condition.
15860 (handle_query): Always support qXfer:feature:read.
15861
15862 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15863
15864 * server.c (wrapper_argv): New.
15865 (start_inferior): Handle wrapper_argv. If set, expect an extra
15866 trap.
15867 (gdbserver_usage): Document --wrapper.
15868 (main): Parse --wrapper.
15869
15870 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15871
15872 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15873 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15874 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15875 (ppc_set_pc): Likewise.
15876 (ppc_arch_setup): New function.
15877 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15878 of collect_register.
15879 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15880
15881 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15882
15883 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15884 instead of linux-ppc64-low.o.
15885 * linux-ppc64-low.c: Remove file.
15886 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15887 (linux-ppc64-low.o): Remove rule.
15888
15889 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15890 (init_registers_powerpc_64): Likewise.
15891 (ppc_regmap): Conditionally define depending on __powerpc64__.
15892 (ppc_cannot_store_register): Do not special-case "fpscr" when
15893 compiled on __powerpc64__.
15894 (ppc_collect_ptrace_register): New function.
15895 (ppc_supply_ptrace_register): New function.
15896 (ppc_breakpoint): Change type to "unsigned int".
15897 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15898 (the_low_target): Conditionally provide initializers for the
15899 arch_setup member depending on __powerpc64__. Install
15900 collect_ptrace_register and supply_ptrace_register members.
15901
15902 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15903
15904 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15905 * server.c (gdbserver_xmltarget): Define.
15906 (get_features_xml): Use it to replace "target.xml" and arch_string.
15907
15908 * configure.srv: Remove srv_xmltarget. Add XML files that were
15909 mentioned there to srv_xmlfiles instead. Remove conditional tests
15910 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15911 srv_xmlfiles and srv_regobj to include all possible choices.
15912 * configure.ac (srv_xmltarget): Remove.
15913 (srv_xmlfiles): Do not add "target.xml".
15914 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15915 checks for supplementary target information.
15916 * configure: Regenerate.
15917 * Makefile.in (XML_TARGET): Remove.
15918 (target.xml): Remove rule.
15919 (clean): Do not clean up target.xml.
15920 (.PRECIOUS): Do not mention target.xml.
15921
15922 * target.h (struct target_ops): Remove arch_string member.
15923 * linux-low.c (linux_arch_string): Remove.
15924 (linux_target_ops): Remove arch_string initializer.
15925 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15926 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15927 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15928 * spu-low.c (spu_arch_string): Remove.
15929 (spu_target_ops): Remove arch_string initializer.
15930 * win32-low.c (win32_arch_string): Remove.
15931 (win32_target_ops): Remove arch_string initializer.
15932 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15933 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15934 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15935
15936 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15937
15938 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15939 by collect_ptrace_register and supply_ptrace_register hooks.
15940 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15941 instead of checking for the_low_target.left_pad_xfer.
15942 (usr_store_inferior_registers): Use collect_ptrace_register callback
15943 instead of checking for the_low_target.left_pad_xfer.
15944
15945 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15946 (s390_supply_ptrace_register): Likewise.
15947 (s390_fill_gregset): Call s390_collect_ptrace_register.
15948 (the_low_target): Update.
15949
15950 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15951 (ppc_supply_ptrace_register): Likewise.
15952 (the_low_target): Update.
15953
15954 * linux-i386-low.c (the_low_target): Update.
15955 * linux-x86-64-low.c (the_low_target): Update.
15956
15957 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15958
15959 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15960 reg-s390.o and reg-s390x.o.
15961
15962 * linux-low.c (new_inferior): New global variable.
15963 (linux_create_inferior, linux_attach): Set it.
15964 (linux_wait_for_process): Call the_low_target.arch_setup after the
15965 target has stopped for the first time.
15966 (initialize_low): Do not call the_low_target.arch_setup.
15967
15968 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15969 (s390_set_pc): Likewise.
15970 (s390_arch_setup): New function.
15971 (the_low_target): Use s390_arch_setup as arch_setup routine.
15972
15973 * regcache.c (realloc_register_cache): New function.
15974 (set_register_cache): Call it for each existing regcache.
15975
15976 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15977
15978 * server.h (init_registers): Remove prototype.
15979
15980 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15981 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15982 instead of init_registers ().
15983 * linux-arm-low.c (init_registers_arm): Add prototype.
15984 (init_registers_arm_with_iwmmxt): Likewise.
15985 (the_low_target): Add initializer for arch_setup field.
15986 * linux-cris-low.c (init_registers_cris): Add prototype.
15987 (the_low_target): Add initializer for arch_setup field.
15988 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15989 (the_low_target): Add initializer for arch_setup field.
15990 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15991 (the_low_target): Add initializer for arch_setup field.
15992 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15993 (the_low_target): Add initializer for arch_setup field.
15994 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15995 (the_low_target): Add initializer for arch_setup field.
15996 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15997 (the_low_target): Add initializer for arch_setup field.
15998 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15999 (init_registers_mips64_linux): Likewise.
16000 (the_low_target): Add initializer for arch_setup field.
16001 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16002 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16003 (the_low_target): Add initializer for arch_setup field.
16004 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16005 (init_registers_powerpc_64): Likewise.
16006 (the_low_target): Add initializer for arch_setup field.
16007 * linux-s390-low.c (init_registers_s390): Add prototype.
16008 (init_registers_s390x): Likewise.
16009 (the_low_target): Add initializer for arch_setup field.
16010 * linux-sh-low.c (init_registers_sh): Add prototype.
16011 (the_low_target): Add initializer for arch_setup field.
16012 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16013 (the_low_target): Add initializer for arch_setup field.
16014 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16015 (the_low_target): Add initializer for arch_setup field.
16016
16017 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16018 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16019 instead of init_registers ().
16020 * win32-arm-low.c (init_registers_arm): Add prototype.
16021 (the_low_target): Add initializer for arch_setup field.
16022 * win32-i386-low.c (init_registers_i386): Add prototype.
16023 (the_low_target): Add initializer for arch_setup field.
16024
16025 * spu-low.c (init_registers_spu): Add prototype.
16026 (initialize_low): Call initialie_registers_spu () instead of
16027 initialize_registers ().
16028
16029 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16030
16031 * server.c (handle_v_requests): When handling the vRun and vAttach
16032 packets, if already debugging a process, don't kill it. Return an
16033 error instead.
16034
16035 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16036
16037 * server.c (handle_query): Correct length check.
16038
16039 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16040
16041 * win32-low.c (do_initial_child_stuff): Add process handle
16042 parameter. Set current_process_handle and current_process_id from the
16043 parameters. Clear globals.
16044 (win32_create_inferior): Don't set current_process_handle and
16045 current_process_id here. Instead pass them on the call to
16046 do_initial_child_stuff.
16047 (win32_attach): Likewise.
16048 (win32_clear_inferiors): New.
16049 (win32_kill): Don't close the current process handle or the
16050 current thread handle here. Instead call win32_clear_inferiors.
16051 (win32_detach): Don't open a new handle to the process. Call
16052 win32_clear_inferiors.
16053 (win32_join): Don't rely on current_process_handle; open a new
16054 handle using the process id.
16055 (win32_wait): Call win32_clear_inferiors when the inferior process
16056 has exited.
16057
16058 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16059
16060 * server.c (monitor_show_help): Add "exit".
16061
16062 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16063
16064 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16065 (clean): Add reg-xtensa.c.
16066 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16067 * configure.srv (xtensa*-*-linux*) New target.
16068 * linux-xtensa-low.c: New.
16069 * xtensa-xtregs.c: New.
16070
16071 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16072
16073 * hostio.c: Don't include errno.h.
16074 (errno_to_fileio_errno): Move to hostio-errno.
16075 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16076 error number outputting to the target->hostio_last_error callback.
16077 (hostio_packet_error): Use FILEIO_EINVAL directly.
16078 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16079 calls to hostio_error.
16080 * hostio-errno.c: New.
16081 * server.h (hostio_last_error_from_errno): Declare.
16082 * target.h (target_ops): Add hostio_last_error member.
16083 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16084 as hostio_last_error handler.
16085 * spu-low.c (spu_target_ops): Likewise.
16086 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16087 (wince_hostio_last_error): New functions.
16088 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16089 as hostio_last_error handler.
16090 (win32_target_ops) [!_WIN32_WCE]: Register
16091 hostio_last_error_from_errno as hostio_last_error handler.
16092 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16093 (hostio-errno.o): New rule.
16094 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16095 * configure.srv (srv_hostio_err_objs): New variable. Default to
16096 hostio-errno.o.
16097 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16098 * configure: Regenerate.
16099
16100 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16101
16102 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16103 (linux_kill, linux_detach): Clean up the process list.
16104 * remote-utils.c (remote_open): Improve port number parsing.
16105 (putpkt_binary, input_interrupt): Only send interrupts if the target
16106 is running.
16107 * server.c (extended_protocol): Make static.
16108 (attached): Define earlier.
16109 (exit_requested, response_needed, program_argv): New variables.
16110 (target_running): New.
16111 (start_inferior): Clear attached here.
16112 (attach_inferior): Set attached here.
16113 (require_running): Define.
16114 (handle_query): Use require_running and target_running. Implement
16115 "monitor exit".
16116 (handle_v_attach, handle_v_run): New.
16117 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16118 (gdbserver_usage): Update.
16119 (main): Redo argument parsing. Handle --debug and --multi. Handle
16120 --attach along with other options or after the port. Save
16121 program_argv. Support no initial program. Resynchronize
16122 communication with GDB after an error. Handle "monitor exit".
16123 Use require_running and target_running. Always allow the extended
16124 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16125 restart in extended mode.
16126 * README: Refer to the GDB manual. Update --attach usage.
16127
16128 2007-12-20 Andreas Schwab <schwab@suse.de>
16129
16130 * linux-low.c (STACK_SIZE): Define.
16131 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16132 (linux_test_for_tracefork): Likewise.
16133
16134 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16135
16136 * linux-low.c (linux_wait_for_event): Update messages. Do not
16137 reinsert auto-delete breakpoints.
16138 * mem-break.c (struct breakpoint): Change return type of handler to
16139 int.
16140 (set_breakpoint_at): Update handler type.
16141 (reinsert_breakpoint_handler): Return 1 instead of calling
16142 delete_breakpoint.
16143 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16144 setting a new one.
16145 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16146 * mem-break.h (set_breakpoint_at): Update handler type.
16147 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16148 * win32-low.c (auto_delete_breakpoint): New.
16149 (get_child_debug_event): Use it.
16150
16151 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16152
16153 * configure.ac: Check for pread and pwrite.
16154 * hostio.c (handle_pread): Fall back to lseek and read.
16155 (handle_pwrite): Fall back to lseek and write.
16156 * config.in, configure: Regenerated.
16157
16158 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16159
16160 * server.c (myresume): Add own_buf argument.
16161 (main): Update calls.
16162
16163 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16164
16165 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16166 * remote-utils.c (remote_open): Do not call disable_async_io.
16167 (block_async_io): Delete.
16168 (unblock_async_io): Make static.
16169 (initialize_async_io): New.
16170 * server.c (handle_v_cont): Handle async I/O here.
16171 (myresume): Likewise. Move other common resume tasks here...
16172 (main): ... from here. Call initialize_async_io. Disable async
16173 I/O before the main loop.
16174 * server.h (initialize_async_io): Declare.
16175 (block_async_io, unblock_async_io): Delete prototypes.
16176 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16177
16178 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16179
16180 * remote-utils.c (readchar): Allow binary data in received messages.
16181
16182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16183
16184 * win32-low.c (attaching): New global.
16185 (win32_create_inferior): Clear the `attaching' global.
16186 (win32_attach): Set the `attaching' global.
16187 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16188 attaching. Only set a breakpoint at the entry point if not
16189 attaching.
16190
16191 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16192
16193 * server.c (main): Don't report dll events on the initial
16194 connection on attaches.
16195
16196 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16197
16198 * server.c (main): Relax numerical bases supported for the pid of
16199 the --attach command line argument.
16200
16201 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16202
16203 * win32-low.c (win32_attach): Call OpenProcess before
16204 DebugActiveProcess, not after. Add last error output to error
16205 call.
16206
16207 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16208
16209 * win32-low.c (win32_get_thread_context)
16210 (win32_set_thread_context): New functions.
16211 (thread_rec): Use win32_get_thread_context.
16212 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16213 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16214 field.
16215
16216 2007-12-03 Leo Zayas
16217 Pedro Alves <pedro_alves@portugalmail.pt>
16218
16219 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16220 global variables.
16221 (child_add_thread): Minor cleanup.
16222 (child_continue): Resume artificially suspended threads before
16223 calling ContinueDebugEvent.
16224 (suspend_one_thread): New.
16225 (fake_breakpoint_event): New.
16226 (get_child_debug_event): Change return type to int. Check here if
16227 gdb sent an interrupt request. If a soft interrupt was requested,
16228 fake a breakpoint event. Return 0 if there is no event to handle,
16229 and 1 otherwise.
16230 (win32_wait): Don't check here if gdb sent an interrupt request.
16231 Ensure there is a valid event to handle.
16232 (win32_request_interrupt): Add soft interruption method as last
16233 resort.
16234
16235 2007-12-03 Leo Zayas
16236 Pedro Alves <pedro_alves@portugalmail.pt>
16237
16238 * win32-low.h (win32_thread_info): Add descriptions to the
16239 structure members. Replace `suspend_count' counter by a
16240 `suspended' flag.
16241 * win32-low.c (thread_rec): Update condition of when to get the
16242 context from the inferior. Rely on ContextFlags being set if it
16243 has already been retrieved. Only suspend the inferior thread if
16244 we haven't already. Warn if that fails.
16245 (continue_one_thread): s/suspend_count/suspended/. Only call
16246 ResumeThread once. Warn if that fails.
16247
16248 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16249
16250 * win32-low.c (win32_wait): Don't read from the inferior when it
16251 has already exited.
16252
16253 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16254
16255 * Makefile.in (win32_low_h): New variable.
16256 (win32-low.o): Add dependency on $(win32_low_h).
16257 (win32-arm-low.o, win32-i386-low.o): New rules.
16258
16259 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16260
16261 * hostio.c: Correct copyright year.
16262
16263 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16264
16265 * Makefile.in (OBS): Add hostio.o.
16266 (hostio.o): New rule.
16267 * server.h (handle_vFile): Declare.
16268 * hostio.c: New file.
16269 * server.c (handle_v_requests): Take packet_len and new_packet_len
16270 for binary packets. Call handle_vFile.
16271 (main): Update call to handle_v_requests.
16272
16273 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16274
16275 * linux-low.c: Include <sched.h>.
16276
16277 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16278
16279 * linux-low.c (linux_tracefork_grandchild): New.
16280 (linux_tracefork_child): Use clone.
16281 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16282
16283 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16284
16285 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16286
16287 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16288
16289 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16290
16291 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16292
16293 * inferiors.c (change_inferior_id): Delete.
16294 (add_pid_to_list, pull_pid_from_list): New.
16295 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16296 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16297 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16298 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16299 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16300 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16301 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16302 (using_threads): Always set to 1.
16303 (handle_extended_wait): New.
16304 (add_process): Do not set TID.
16305 (linux_create_inferior): Set must_set_ptrace_flags.
16306 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16307 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16308 (linux_thread_alive): Rename TID argument to LWPID.
16309 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16310 (linux_wait_for_event): Do not use TID or check using_threads. Update
16311 call to dead_thread_notify. Call handle_extended_wait.
16312 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16313 (send_sigstop): Delete sigstop_sent.
16314 (wait_for_sigstop): Avoid TID.
16315 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16316 (linux_test_for_tracefork): New.
16317 (linux_lookup_signals): Use thread_db_active and
16318 linux_supports_tracefork_flag.
16319 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16320 * linux-low.h (get_process_thread): Avoid TID.
16321 (struct process_ifo): Move thread_known and tid to the end. Remove
16322 sigstop_sent.
16323 (linux_attach_lwp, thread_db_init): Update prototypes.
16324 * server.h (change_inferior_id): Delete prototype.
16325 (add_pid_to_list, pull_pid_from_list): New prototypes.
16326 * thread-db.c (thread_db_use_events): New.
16327 (find_first_thread): Rename to...
16328 (find_one_thread): ...this. Update callers and messages. Do not
16329 call fatal. Check thread_db_use_events. Do not call
16330 change_inferior_id or new_thread_notify.
16331 (maybe_attach_thread): Update. Do not call new_thread_notify.
16332 (thread_db_init): Set thread_db_use_events. Check use_events.
16333 * utils.c (fatal, warning): Correct message prefix.
16334
16335 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16336
16337 * Makefile.in (clean): Remove new files.
16338 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16339 (powerpc-64.o, powerpc-64.c): New rules.
16340 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16341 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16342 with SPE.
16343 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16344 SPE targets.
16345 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16346 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16347 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16348 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16349 (target_regsets): Add AltiVec and SPE register sets.
16350 * configure.ac: Check for AltiVec and SPE.
16351 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16352 (ppc_fill_vrregset, ppc_store_vrregset): New.
16353 (target_regsets): Add AltiVec register set.
16354 * configure: Regenerated.
16355
16356 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16357
16358 * linux-low.c (O_LARGEFILE): Define.
16359 (linux_read_memory): Use /proc/PID/mem.
16360 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16361 * configure, config.in: Regenerated.
16362
16363 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16364
16365 * linux-low.c (linux_wait_for_event): Do not pass signals while
16366 single-stepping.
16367
16368 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16369
16370 * win32-low.c (create_process): New.
16371 (win32_create_inferior): Use create_process instead of
16372 CreateProcess. If create_process failed retry appending an ".exe"
16373 suffix. Store the GetLastError result immediatelly after
16374 create_process calls and use it on the call to error.
16375
16376 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16377
16378 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16379
16380 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16381
16382 * configure.ac: Switch license to GPLv3.
16383
16384 2007-08-01 Michael Snyder <msnyder@access-company.com>
16385
16386 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16387
16388 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16389
16390 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16391 typedef.
16392 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16393 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16394 CloseToolhelp32Snapshot.
16395 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16396 CloseToolhelp32Snapshot.
16397
16398 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16399
16400 * server.c (main): Check for inferior exit before main loop.
16401
16402 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16403
16404 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16405 instead of on tmp_desc.
16406
16407 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16408 Daniel Jacobowitz <dan@codesourcery.com>
16409
16410 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16411 (add_thread): Minor cleanups.
16412 (clear_inferiors): Move lower in the file. Clear the DLL
16413 list.
16414 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16415 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16416 (xml_escape_text): New.
16417 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16418 for qSupported.
16419 (handle_v_cont): Report errors.
16420 (gdbserver_version): Update.
16421 (main): Correct size of own_buf. Do not report initial DLL events.
16422 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16423 (unloaded_dll, xml_escape_text): New.
16424 * win32-low.c (enum target_waitkind): Update comments.
16425 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16426 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16427 (win32_EnumProcessModules, win32_GetModuleInformation)
16428 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16429 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16430 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16431 (win32_Module32First, win32_Module32Next, load_toolhelp)
16432 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16433 (get_child_debug_event): Handle DLL events.
16434 (win32_wait): Likewise.
16435
16436 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16439 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16440
16441 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16442
16443 * win32-low.c (handle_output_debug_string): Ignore event if not
16444 waiting.
16445
16446 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16447
16448 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16449
16450 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16453
16454 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16455
16456 * inferiors.c (change_inferior_id): Add comment.
16457 * linux-low.c (check_removed_breakpoint): Add an early
16458 prototype. Improve debug output.
16459 (linux_attach): Doc update.
16460 (linux_detach_one_process, linux_detach): Clean up before releasing
16461 each process.
16462 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16463 * linux-low.h (struct process_info): Doc improvement.
16464 * mem-break.c (delete_all_breakpoints): New.
16465 * mem-break.h (delete_all_breakpoints): New prototype.
16466 * thread-db.c (find_first_thread): New.
16467 (thread_db_create_event): Call it instead of
16468 thread_db_find_new_threads. Clean up unused variables.
16469 (maybe_attach_thread): Remove first thread handling.
16470 (thread_db_find_new_threads): Use find_first_thread.
16471 (thread_db_get_tls_address): Likewise.
16472
16473 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16474
16475 * thread-db.c (thread_db_find_new_threads): Add prototype.
16476 (thread_db_create_event): Check for the main thread before adding
16477 a new thread.
16478 (maybe_attach_thread): Only enable event reporting if TID == 0.
16479 (thread_db_get_tls_address): Check for new threads.
16480
16481 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16482
16483 * linux-low.c (linux_create_inferior): Try execv before execvp.
16484 * spu-low.c (spu_create_inferior): Likewise.
16485
16486 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16487
16488 * linux-low.c (linux_create_inferior): Change execv to execvp.
16489 * spu-low.c (spu_create_inferior): Likewies.
16490
16491 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16492
16493 * Makefile.in (clean): Clean new files instead of deleted ones.
16494 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16495 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16496 rules.
16497 * configure.srv: Specify XML files and new regformats for MIPS and
16498 MIPS64 GNU/Linux.
16499 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16500 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16501 an entry for the restart register.
16502 (mips_cannot_fetch_register, mips_cannot_store_register)
16503 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16504 register names to match the XML descriptions.
16505 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16506 restart register instead of $0.
16507
16508 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16509 Markus Deuling <deuling@de.ibm.com>
16510
16511 * remote-utils.c (decode_xfer_write): New function.
16512 * server.h (decode_xfer_write): Add prototype.
16513 * server.c (handle_query): Add PACKET_LEN argument. Support
16514 qXfer:spu:read and qXfer:spu:write packets.
16515 (main): Pass packet_len to handle_query.
16516 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16517 * target.h (target_ops): Add qxfer_spu.
16518
16519 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16520
16521 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16522 accessing non-seekable spufs files.
16523
16524 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16525
16526 * server.c (handle_query): Add reply for qC packet.
16527
16528 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16529 Leo Zayas <lerele@champenstudios@com>
16530
16531 * server.h (check_remote_input_interrupt_request): New function.
16532 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16533 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16534 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16535 (check_remote_input_interrupt_request): New function.
16536 * server.h (check_remote_input_interrupt_request): Declare.
16537 * win32-low.c (winapi_DebugBreakProcess,
16538 winapi_GenerateConsoleCtrlEvent): New typedefs.
16539 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16540 to 250 ms.
16541 (win32_wait): Check for remote interrupt request
16542 with check_remote_input_interrupt_request.
16543 (win32_request_interrupt): New function.
16544 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16545
16546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16547
16548 * win32-low.c (debug_registers_changed,
16549 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16550 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16551 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16552 (thread_rec): Get context using the low target.
16553 (child_add_thread): Call thread_added on the low target,
16554 which does the same thing.
16555 (regptr): Delete.
16556 (do_initial_child_stuff): Remove debug registers references.
16557 Set context using the low target. Resume threads after
16558 setting the contexts.
16559 (child_continue): Remove dead variable. Remove debug
16560 registers references.
16561 (child_fetch_inferior_registers): Go through the low target.
16562 (do_child_store_inferior_registers): Remove.
16563 (child_store_inferior_registers): Go through the low target.
16564 (win32_resume): Remove debug registers references.
16565 Set context using the low target.
16566 (handle_exception): Change return type to void. Don't record
16567 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16568 first chance exception.
16569 (get_child_debug_event): Change return type to void. Remove
16570 goto loop. Always return after waiting for debug event.
16571 (win32_wait): Convert to switch statement. Handle spurious
16572 events.
16573
16574 * win32-i386-low.c (debug_registers_changed,
16575 debug_registers_used): New.
16576 (initial_stuff): Rename to ...
16577 (i386_initial_stuff): ... this. Clear debug registers
16578 state variables.
16579 (store_debug_registers): Delete.
16580 (i386_get_thread_context): New.
16581 (load_debug_registers): Delete.
16582 (i386_set_thread_context): New.
16583 (i386_thread_added): New.
16584 (single_step): Rename to ...
16585 (i386_single_step): ... this.
16586 (do_fetch_inferior_registers): Rename to ...
16587 (i386_fetch_inferior_register): ... this.
16588 (i386_store_inferior_register): New.
16589 (the_low_target): Adapt to new interface.
16590
16591 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16592 (arm_get_thread_context): New.
16593 (arm_set_thread_context): New.
16594 (regptr): New.
16595 (do_fetch_inferior_registers): Rename to ...
16596 (arm_fetch_inferior_register): ... this.
16597 (arm_store_inferior_register): New.
16598 (arm_wince_breakpoint): Reimplement as unsigned long.
16599 (arm_wince_breakpoint_len): Define.
16600 (the_low_target): Adapt to new interface.
16601
16602 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16603 load_debug_registers. Add get_thread_context, set_thread_context,
16604 thread_added and store_inferior_register. Rename
16605 fetch_inferior_registers to fetch_inferior_register.
16606 (regptr): Remove declaration.
16607
16608 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16609
16610 * linux-low.c (linux_detach): Change return type to int. Return 0.
16611 * spu-low.c (spu_detach): Likewise.
16612
16613 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16614
16615 * target.h (target_ops): Change return type of detach to int.
16616 Add join.
16617 (join_inferior): New.
16618 * server.c (main): Don't skip detach support on mingw32.
16619 If the inferior doesn't support detaching return error.
16620 Call join_inferior instead of using waitpid.
16621 * linux-low.c (linux_join): New.
16622 (linux_target_op): Add linux_join.
16623 * spu-low.c (spu_join): New.
16624 (spu_target_ops): Add spu_join.
16625 * win32-low.c (win32_detach): Adapt to new interface.
16626 Reopen current_process_handle before detaching. Issue a child
16627 resume before detaching.
16628 (win32_join): New.
16629 (win32_target_op): Add win32_join.
16630
16631 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16632
16633 * win32-low.c (win32-attach): Fix return value.
16634 * target.h (target_ops): Describe ATTACH return values.
16635
16636 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16637
16638 * win32-low.c (GETPROCADDRESS): Define.
16639 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16640 (winapi_DebugSetProcessKillOnExit): Likewise.
16641 (win32_create_inferior): Force usage of ansi CreateProcessA.
16642 (win32_attach): Use GETPROCADDRESS.
16643 (win32_detach): Likewise.
16644
16645 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16646
16647 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16648
16649 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16650
16651 * win32-low.c: Commit leftover changes from 2007-03-29.
16652
16653 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16656 fields short instead of int. Add explicit padding.
16657 (i387_cache_to_fsave): Remove unnecessary casts.
16658 (i387_fsave_to_cache): Doc fix.
16659 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16660
16661 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16662
16663 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16664 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16665
16666 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16667
16668 * configure.srv (arm*-*-mingw32ce*): Move near the other
16669 arm targets.
16670
16671 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16672
16673 * configure.ac: Add errno checking.
16674 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16675 sys/file.h and malloc.h.
16676 (AC_CHECK_DECLS): Add perror.
16677 (srv_mingwce): Handle.
16678 * configure.srv (i[34567]86-*-cygwin*): Add
16679 win32-i386-low.o to srv_tgtobj.
16680 (i[34567]86-*-mingw*): Likewise.
16681 (arm*-*-mingw32ce*): Add case.
16682 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16683 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16684 [__MINGW32CE__] (strerror): New function.
16685 [__MINGW32CE__] (errno): Define to GetLastError.
16686 [__MINGW32CE__] (COUNTOF): New macro.
16687 (remote_open): Remove extra close call.
16688 * mem-break.c (delete_breakpoint_at): New function.
16689 * mem-break.h (delete_breakpoint_at): Declare.
16690 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16691 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16692 [USE_WIN32API] (read, write): Add char* casts.
16693 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16694 * server.h: Include wincecompat.h on Windows CE.
16695 [HAVE_ERRNO_H]: Check.
16696 (perror): Declare if not declared.
16697 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16698 (perror_with_name): Remove errno declaration.
16699 * wincecompat.h: New.
16700 * wincecompat.c: New.
16701 * win32-low.h: New.
16702 * win32-arm-low.c: New.
16703 * win32-i386-low.c: New.
16704 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16705 (OUTMSG2): Make it safe.
16706 (_T): New macro.
16707 (COUNTOF): New macro.
16708 (NUM_REGS): Get it from the low target.
16709 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16710 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16711 (thread_rec): Let low target handle debug registers.
16712 (child_add_thread): Likewise.
16713 (child_init_thread_list): Likewise.
16714 (continue_one_thread): Likewise.
16715 (regptr): New.
16716 (do_child_fetch_inferior_registers): Move to ...
16717 * win32-i386-low.c: ... here, and rename to ...
16718 (do_fetch_inferior_registers): ... this.
16719 * win32-low.c (child_fetch_inferior_registers):
16720 Go through the low target.
16721 (do_child_store_inferior_registers): Use regptr.
16722 (strwinerror): New function.
16723 (win32_create_inferior): Handle Windows CE.
16724 Use strwinerror instead of strerror on Windows error
16725 codes. Add program to the error output.
16726 Don't close the main thread handle on Windows CE.
16727 (win32_attach): Use coredll.dll on Windows CE.
16728 (win32_kill): Close current process and current
16729 thread handles.
16730 (win32_detach): Use coredll.dll on Windows CE.
16731 (win32_resume): Let low target handle debug registers, and
16732 step request.
16733 (handle_exception): Add/Remove initial breakpoint. Avoid
16734 non-existant WSTOPSIG on Windows CE.
16735 (win32_read_inferior_memory): Cast to remove warning.
16736 (win32_arch_string): Go through the low target.
16737 (initialize_low): Call set_breakpoint_data with the low
16738 target's breakpoint.
16739 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16740 FOP_REGNUM, mappings): Move to ...
16741 * win32-i386-low.c: ... here.
16742 * win32-low.c (win32_thread_info): Move to ...
16743 * win32-low.h: ... here.
16744 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16745 win32-arm-low.c and wincecompat.c.
16746 (all:): Add $EXEEXT.
16747 (install-only:): Likewise.
16748 (gdbserver:): Likewise.
16749 (gdbreplay:): Likewise.
16750 * config.in: Regenerate.
16751 * configure: Regenerate.
16752
16753 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16754
16755 * win32-low.c: Rename typedef thread_info to
16756 win32_thread_info throughout.
16757
16758 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16759
16760 * win32-i386-low.c: Rename to ...
16761 * win32-low.c: ... this.
16762 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16763 * Makefile.in: Likewise.
16764
16765 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16766
16767 * remote-utils.c (monitor_output): Constify msg parameter.
16768 * server.h (monitor_output): Likewise.
16769 * win32-i386-low.c (handle_output_debug_string): New.
16770 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16771 handle_output_debug_string.
16772 (get_child_debug_event): Likewise.
16773
16774 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16775
16776 * server.c (main): Correct strtoul check.
16777
16778 2007-03-27 Jon Ringle <jon@ringle.org>
16779
16780 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16781
16782 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16783
16784 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16785
16786 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16787
16788 * terminal.h: Check HAVE_SGTTY_H.
16789
16790 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16791
16792 * remote-utils.c (remote_open): Print out the assigned port number.
16793
16794 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16795
16796 * remote-utils.c (monitor_output): New function.
16797 * server.c (debug_threads): Define here.
16798 (monitor_show_help): New function.
16799 (handle_query): Handle qRcmd.
16800 (main): Do not handle 'd' packet.
16801 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16802 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16803 of debug_threads.
16804
16805 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16806
16807 * Makefile.in (EXEEXT): New.
16808 (clean): Use $(EXEEXT).
16809
16810 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16811
16812 * target.h (target_ops): Rename send_signal to request_interrupt,
16813 and remove enum target_signal parameter.
16814 * linux-low.c (linux_request_interrupt): Rename from
16815 linux_send_signal, and always send SIGINT.
16816 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16817 and always send SIGINT.
16818 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16819 of send_signal.
16820 (input_interrupt): Likewise.
16821
16822 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16823
16824 * server.c (get_features_xml): Check if target implemented
16825 arch_string.
16826 * win32-i386-low.c (win32_arch_string): New.
16827 (win32_target_ops): Add win32_arch_string as arch_string member.
16828
16829 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16830
16831 * spu-low.c (spu_arch_string): New.
16832 (spu_target_ops): Add spu_arch_string.
16833
16834 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16835
16836 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16837 * configure.ac: Do not check for terminal.h.
16838 * configure, config.in: Regenerated.
16839
16840 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16841
16842 * Makefile.in (OBS): Add $(XML_BUILTIN).
16843 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16844 (clean): Update.
16845 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16846 (arm-with-iwmmxt.c): New.
16847 * config.in, configure: Regenerate.
16848 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16849 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16850 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16851 (arm*-*-linux*): Add iWMMXt and regset support.
16852 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16853 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16854 (arm_store_wmmxregset, target_regsets): New.
16855 * server.c (get_features_xml): Take annex argument. Check builtin
16856 XML documents.
16857 (handle_query): Handle multiple annexes.
16858
16859 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16860
16861 * remote-utils.c [USE_WIN32API] (read, write): Define.
16862 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16863 write.
16864
16865 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16866
16867 * linux-i386-low.c (the_low_target): Set arch_string.
16868 * linux-x86-64-low.c (the_low_target): Likewise.
16869 * linux-low.c (linux_arch_string): New.
16870 (linux_target_ops): Add it.
16871 * linux-low.h (struct linux_target_ops): Add arch_string.
16872 * server.c (write_qxfer_response): Use const void * for DATA.
16873 (get_features_xml): New.
16874 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16875 * target.h (struct target_ops): Add arch_string method.
16876
16877 2007-01-03 Denis Pilat <denis.pilat@st.com>
16878 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * linux-low.c (linux_kill): Handle being called with no threads.
16881 * win32-i386-low.c (win32_kill): Likewise.
16882 (get_child_debug_event): Clear current_process_handle.
16883
16884 2006-12-30 Denis PILAT <denis.pilat@st.com>
16885 Daniel Jacobowitz <dan@codesourcery.com>
16886
16887 * remote-utils.c (remote_open): Check the type of specified
16888 serial port devices before opening them.
16889 * server.c (main): Kill the inferior if an error occurs during
16890 the first remote_open.
16891
16892 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16893
16894 * README: Update supported targets.
16895
16896 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * Makefile.in (clean): Remove reg-mips64.c.
16899 (reg-mips64.c, reg-mips64.o): New rules.
16900 * configure.srv: Handle mips64. Include regset support for mips.
16901 * linux-mips-low.c (union mips_register): New.
16902 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16903 (mips_breakpoint, mips_breakpoint_at): Use int.
16904 (mips_collect_register, mips_supply_register)
16905 (mips_collect_register_32bit, mips_supply_register_32bit)
16906 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16907 (mips_store_fpregset, target_regsets): New.
16908 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16909
16910 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16911
16912 * configure.srv: Add target "spu*-*-*".
16913 * Makefile.in (clean): Remove reg-spu.c.
16914 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16915 * spu-low.c: New file.
16916
16917 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * configure.ac: Correct td_thr_tls_get_addr test.
16920 * configure: Regenerated.
16921
16922 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16923
16924 * linux-low.c (linux_wait_for_event): Reformat. Use the
16925 pass_signals array.
16926 * remote-utils.c (decode_address_to_semicolon): New.
16927 * server.c (pass_signals, handle_general_set): New.
16928 (handle_query): Mention QPassSignals for qSupported.
16929 (main): Call handle_general_set.
16930 * server.h (pass_signals, decode_address_to_semicolon): New.
16931
16932 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16933
16934 * server.c (handle_query): Correct error handling for read_auxv.
16935
16936 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16937
16938 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16939 and srv_linux_thread_db to yes.
16940 * linux-s390-low.c (s390_fill_gregset): New function.
16941 (target_regsets): Define data structure.
16942
16943 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16944
16945 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16946 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16947 * config.in, configure: Regenerated.
16948 * inferiors.c (gdb_id_to_thread): New function.
16949 (gdb_id_to_thread_id): Use it.
16950 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16951 * linux-low.h (struct process_info): Add th member.
16952 (thread_db_get_tls_address): New prototype.
16953 * remote-utils.c (decode_address): Make non-static.
16954 * server.c (handle_query): Handle qGetTLSAddr.
16955 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16956 * target.h (struct target_ops): Add get_tls_address.
16957 * thread-db.c (maybe_attach_thread): Save the thread handle.
16958 (thread_db_get_tls_address): New.
16959
16960 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16961
16962 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16963 (linux_resume_one_process): Take a siginfo_t *. Update all
16964 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16965 (struct pending_signals): Add a siginfo_t.
16966 (linux_wait_for_process): Always set last_status.
16967 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16968 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16969 * linux-low.h (struct process_info): Add last_status.
16970
16971 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16972
16973 * remote-utils.c (try_rle): New function.
16974 (putpkt_binary): Use it.
16975
16976 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16977
16978 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16979 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16980 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16981 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16982 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16983 point registers.
16984
16985 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16986
16987 * server.c (terminal_fd): New variable.
16988 (old_foreground_pgrp): Likewise.
16989 (restore_old_foreground_pgrp): New function.
16990 (start_inferior): Record the terminal file descriptor in terminal_fd
16991 and its original foreground group in old_foreground_pgrp. Register
16992 restore_old_foreground_pgrp with atexit().
16993
16994 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16995
16996 * server.c (handle_query): Correct qPart to qXfer.
16997
16998 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16999
17000 * configure.ac: Check for more headers which are missing on
17001 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17002 * configure.srv: Add Cygwin and mingw32.
17003 * remote-utils.c: Don't include headers unconditionally which
17004 are missing on mingw32. Include <winsock.h> for mingw32.
17005 (remote_open): Adjust for mingw32 support. Flush
17006 standard error after writing to it.
17007 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17008 (unblock_async_io, enable_async_io, disable_async_io)
17009 (readchar, getpkt): Update for Winsock support.
17010 (prepare_resume_reply): Expect a protocol signal number.
17011 * server.c: Disable <sys/wait.h> on mingw32.
17012 (start_inferior): Adjust for mingw32 support. Flush
17013 standard error after writing to it.
17014 (attach_inferior): Likewise. Use protocol signal
17015 numbers.
17016 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17017 and names.
17018 * win32-i386-low.c: New file.
17019 * Makefile.in (XM_CLIBS): Set.
17020 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17021 (win32-i386-low.o): New dependency rule.
17022 * linux-low.c (linux_wait): Use target signal numbers.
17023 * target.h (struct target_ops): Doc fix.
17024 * server.h (target_signal_to_name): New prototype.
17025 * gdbreplay.c: Don't include headers unconditionally which
17026 are missing on mingw32. Include <winsock.h> for mingw32.
17027 (remote_close, remote_open): Adjust for Winsock support.
17028 * configure, config.in: Regenerated.
17029
17030 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17031
17032 * server.c (decode_xfer_read, write_qxfer_response): New.
17033 (handle_query): Take a packet length argument. Handle
17034 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17035 the qSupported response.
17036 (main): Update call to handle_query.
17037
17038 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17039
17040 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17041 (putpkt_binary): Renamed from putpkt and adjusted for binary
17042 data.
17043 (putpkt): New wrapper for putpkt_binary.
17044 (readchar): Don't mask off the high bit.
17045 (decode_X_packet): New function.
17046 * server.c (main): Call putpkt_binary if a handler sets the packet
17047 length. Save the length of the incoming packet. Handle 'X'.
17048 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17049
17050 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17051
17052 * server.c (handle_query): Handle qSupported.
17053
17054 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17055
17056 * remote-utils.c (all_symbols_looked_up): New variable.
17057 (look_up_one_symbol): Check it.
17058 * server.h (look_up_one_symbol): New declaration.
17059 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17060
17061 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17062
17063 * Makefile.in (linux-arm-low.o): Update dependencies.
17064 * linux-arm-low.c: Include "gdb_proc_service.h".
17065 (PTRACE_GET_THREAD_AREA): Define.
17066 (ps_get_thread_area): New function.
17067
17068 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17069
17070 * configure.srv (m68k*-*-uclinux*): New target.
17071 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17072 (linux_resume_one_process): Remove extraneous cast.
17073 (linux_read_offsets): New.
17074 (linux_target_op): Add linux_read_offsets on mmuless systems.
17075 * server.c (handle_query): Add qOffsets logic.
17076 * target.h (struct target_ops): Add read_offsets.
17077
17078 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17079
17080 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17081 (PTRACE_GET_THREAD_AREA): Define.
17082 (ps_get_thread_area): New function.
17083 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17084 (linux-x86-64-low.o): Update.
17085
17086 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17087
17088 * configure.ac: Remove checks for prfpregset_t.
17089 * gdb_proc_service.h: New file.
17090 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17091 new "gdb_proc_service.h".
17092 * proc-service.c: Likewise.
17093 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17094 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17095 * Makefile.in (gdb_proc_service_h): Updated.
17096 * configure, config.in: Regenerated.
17097
17098 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17099
17100 * remote-utils.c (prepare_resume_reply): Move declaration
17101 of gdb_id_from_wait to the top of the block.
17102
17103 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17104
17105 * linux-low.c (regsets_store_inferior_registers): Read the regset
17106 from the target before filling it.
17107
17108 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17109
17110 * server.c (attach_inferior): Return SIGTRAP for a successful
17111 attach.
17112
17113 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17114
17115 * Makefile.in (OBS): Add version.o.
17116 (STAGESTUFF): Delete.
17117 (version.o): Add dependencies.
17118 (version.c): Replace rule.
17119 (clean): Remove version.c.
17120 * server.c (gdbserver_version): New.
17121 (gdbserver_usage): Use printf.
17122 (main): Handle --version and --help.
17123 * server.h (version, host_name): Add declarations.
17124
17125 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17126
17127 * linux-arm-low.c:
17128 * linux-arm-low.c:
17129 * inferiors.c:
17130 * i387-fp.h:
17131 * i387-fp.c:
17132 * gdbreplay.c:
17133 * regcache.c:
17134 * proc-service.c:
17135 * mem-break.h:
17136 * mem-break.c:
17137 * linux-x86-64-low.c:
17138 * linux-sh-low.c:
17139 * linux-s390-low.c:
17140 * linux-ppc64-low.c:
17141 * linux-ppc-low.c:
17142 * linux-mips-low.c:
17143 * linux-m68k-low.c:
17144 * linux-m32r-low.c:
17145 * linux-low.h:
17146 * linux-low.c:
17147 * linux-ia64-low.c:
17148 * linux-i386-low.c:
17149 * linux-crisv32-low.c:
17150 * thread-db.c:
17151 * terminal.h:
17152 * target.h:
17153 * target.c:
17154 * server.h:
17155 * server.c:
17156 * remote-utils.c:
17157 * regcache.h:
17158 * utils.c:
17159 * Makefile.in:
17160 * configure.ac:
17161 * gdbserver.1: Add (C) after Copyright. Update the FSF
17162 address.
17163
17164 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17165
17166 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17167 (arm_breakpoint_at): Recognize both breakpoints.
17168 (the_low_target): Use the correct breakpoint instruction.
17169
17170 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17171
17172 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17173 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17174 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17175 (the_low_target): Update.
17176
17177 2005-10-25 Andreas Schwab <schwab@suse.de>
17178
17179 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17180
17181 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17182 (ia64_num_regs): Reduce to 462.
17183
17184 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17185
17186 * acinclude.m4: Correct quoting.
17187 * aclocal.m4: Regenerated.
17188
17189 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17190 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17191 (thread_db_init): Call thread_db_err_str.
17192 * configure.ac: Check for TD_VERSION.
17193 * config.in, configure: Regenerated.
17194
17195 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17196
17197 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17198
17199 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17200
17201 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17202 is not available. Define HAVE_PTRACE_GETREGS if it is.
17203 * config.in, configure: Regenerated.
17204 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17205 * linux-i386-low.c, linux-m68k-low.c: Update to use
17206 HAVE_PTRACE_GETREGS.
17207 * linux-low.c (regsets_fetch_inferior_registers)
17208 (regsets_store_inferior_registers): Only return 0 if we processed
17209 GENERAL_REGS.
17210 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17211 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17212
17213 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17214
17215 * inferiors.c (struct thread_info): Add gdb_id.
17216 (add_thread): Add gdb_id argument.
17217 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17218 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17219 calls to add_thread.
17220 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17221 * server.c (handle_query): Use thread_to_gdb_id.
17222 (handle_v_cont, main): Use gdb_id_to_thread_id.
17223 * server.h (add_thread): Update prototype.
17224 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17225 prototypes.
17226
17227 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17228
17229 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17230 left-padded registers.
17231 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17232 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17233
17234 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17235
17236 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17237 * configure: Regenerate.
17238 * config.in: Regenerate.
17239 * server.h (NEED_DECLARATION_STRERROR):
17240 Replace with !HAVE_DECL_STRERROR.
17241
17242 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17243
17244 * linux-low.c (linux_wait, linux_send_signal): Don't test
17245 an unsigned long variable for > 0 if it could be MAX_ULONG.
17246 * server.c (myresume): Likewise.
17247 * target.c (set_desired_inferior): Likewise.
17248
17249 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17250
17251 * configure.ac: Simplify and improve check for socklen_t.
17252 * configure, config.in: Regenerate.
17253
17254 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17255
17256 * acconfig.h: Remove.
17257 * configure.ac: Add a test for socklen_t. Use three-argument
17258 AC_DEFINE throughout.
17259 * config.in: Regenerated using autoheader 2.59.
17260 * configure: Regenerated.
17261
17262 * gdbreplay.c (socklen_t): Provide a default.
17263 (remote_open): Use socklen_t.
17264 * remote-utils.c (socklen_t): Provide a default.
17265 (remote_open): Use socklen_t.
17266 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17267 unsigned char.
17268
17269 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17270 char for buffers.
17271 * linux-low.c (linux_read_memory, linux_write_memory)
17272 (linux_read_auxv): Likewise.
17273 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17274 (check_mem_write): Likewise.
17275 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17276 Likewise.
17277 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17278 (registers_from_string, register_data): Likewise.
17279 * server.c (handle_query, main): Likewise.
17280 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17281 (decode_M_packet): Likewise.
17282 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17283 * target.h (struct target_ops): Update read_memory, write_memory,
17284 and read_auxv.
17285 (read_inferior_memory, write_inferior_memory): Update.
17286 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17287 to unsigned char *.
17288 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17289 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17290 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17291 linux-s390-low.c, linux-sh-low.c: Update for changes in
17292 read_inferior_memory and the_low_target->breakpoint.
17293
17294 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17295
17296 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17297 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17298 * configure.srv: Add powerpc64-*-linux*.
17299 * linux-ppc64-low.c: New file.
17300
17301 2005-05-23 Orjan Friberg <orjanf@axis.com>
17302
17303 * linux-cris-low.c: New file with support for CRIS.
17304 * linux-crisv32-low.c: Ditto for CRISv32.
17305 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17306 (clean): Add reg-cris.c and reg-crisv32.c.
17307 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17308 reg-crisv32.o, and reg-crisv32.c to make rules.
17309 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17310 recognized targets.
17311
17312 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17313
17314 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17315 of sizeof (PTRACE_XFER_TYPE).
17316 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17317
17318 2005-05-12 Orjan Friberg <orjanf@axis.com>
17319
17320 * target.h (struct target_ops): Add insert_watchpoint,
17321 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17322 pointers for hardware watchpoint support.
17323 * linux-low.h (struct linux_target_ops): Ditto.
17324 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17325 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17326 to linux_target_ops.
17327 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17328 reply packet.
17329 * server.c (main): Recognize 'Z' and 'z' packets.
17330
17331 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17332
17333 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17334 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17335 (the_low_target): Add new members.
17336
17337 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17338
17339 * proc-service.c (ps_lgetregs): Search all_processes instead of
17340 all_threads.
17341
17342 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17343
17344 * server.c (start_inferior): Change return type to int.
17345 (attach_inferior): Change sigptr to int *.
17346 (handle_v_cont, handle_v_requests): Change signal to int *.
17347 (main): Change signal to int.
17348
17349 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17350
17351 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17352 * configure.srv: Add m32r*-*-linux*.
17353 * linux-m32r-low.c: New file.
17354
17355 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17356
17357 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17358
17359 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17360
17361 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17362 Take unsigned long arguments for PIDs.
17363 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17364 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17365 (wait_for_sigstop, linux_resume_one_process)
17366 (regsets_fetch_inferior_registers, linux_send_signal)
17367 (linux_read_auxv): Likewise. Update the types of variables holding
17368 PIDs. Update format string specifiers.
17369 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17370 * remote-utils.c (prepare_resume_reply): Likewise.
17371 * server.c (cont_thread, general_thread, step_thread)
17372 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17373 unsigned long.
17374 (handle_query): Update format specifiers.
17375 (handle_v_cont, main): Use strtoul for thread IDs.
17376 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17377 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17378 (general_thread, step_thread, thread_from_wait)
17379 (old_thread_from_wait): Update.
17380 * target.h (struct thread_resume): Use unsigned long for THREAD.
17381 (struct target_ops): Use unsigned long for arguments to attach and
17382 thread_alive.
17383
17384 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17385
17386 * acinclude.m4: Include bfd/bfd.m4 directly.
17387 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17388 <agriffis@toolchain.org>.
17389 * aclocal.m4, configure: Regenerated.
17390
17391 2005-01-07 Andrew Cagney <cagney@gnu.org>
17392
17393 * configure.ac: Rename configure.in, require autoconf 2.59.
17394 * configure: Re-generate.
17395
17396 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17397
17398 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17399 LIBS when finished.
17400 * aclocal.m4: Regenerated.
17401 * configure: Regenerated.
17402
17403 2004-11-21 Andreas Schwab <schwab@suse.de>
17404
17405 * linux-m68k-low.c (m68k_num_gregs): Define.
17406 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17407 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17408 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17409 (m68k_breakpoint_at): New. Add to the_low_target.
17410
17411 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17412 srv_linux_thread_db to yes.
17413
17414 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17415
17416 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17417 (ARCH_SET_FS): Likewise.
17418 (ARCH_GET_FS): Likewise.
17419 (ARCH_GET_GS): Likewise.
17420
17421 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17422
17423 * linux-i386-low.c (ps_get_thread_area): New.
17424 * linux-x86-64-low.c (ps_get_thread_area): New.
17425 * linux-low.c: Include <sys/syscall.h>.
17426 (linux_kill_one_process): Don't kill the first thread here.
17427 (linux_kill): Kill the first thread here.
17428 (kill_lwp): New function.
17429 (send_sigstop, linux_send_signal): Use it.
17430 * proc-service.c: Clean up #ifdefs.
17431 (fpregset_info): Delete.
17432 (ps_lgetregs): Update and enable implementation.
17433 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17434 implementations.
17435 * remote-utils.c (struct sym_cache, symbol_cache): New.
17436 (input_interrupt): Print a clearer message.
17437 (async_io_enabled): New variable.
17438 (enable_async_io, disable_async_io): Use it. Update comments.
17439 (look_up_one_symbol): Use the symbol cache.
17440 * thread-db.c (thread_db_look_up_symbols): New function.
17441 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17442
17443 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17444
17445 * configure.in: Test for -rdynamic.
17446 * configure: Regenerated.
17447 * Makefile (INTERNAL_LDFLAGS): New.
17448 (gdbserver, gdbreplay): Use it.
17449
17450 2004-09-02 Andrew Cagney <cagney@gnu.org>
17451
17452 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17453
17454 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17455
17456 * linux-low.c (linux_wait): Clear all_processes list also.
17457
17458 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17459
17460 * linux-low.c: Include <errno.h>. Remove extern declaration of
17461 errno.
17462
17463 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17464
17465 * gdbreplay.c, server.h, utils.c: Update copyright years.
17466
17467 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17468
17469 * server.c (main): Print child status or termination signal from
17470 variable 'signal', not 'sig'.
17471
17472 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17473
17474 * linux-low.c (linux_read_memory): Change return type to
17475 int. Check for and return error from ptrace().
17476 * target.c (read_inferior_memory): Change return type to int. Pass
17477 back return status from the_target->read_memory().
17478 * target.h (struct target_ops): Adapt *read_memory() prototype.
17479 Update comment.
17480 (read_inferior_memory): Adapt prototype.
17481 * server.c (main): Return an error packet if
17482 read_inferior_memory() returns an error.
17483
17484 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17485
17486 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17487 Unify with other clean targets.
17488
17489 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17490
17491 * server.c (handle_v_cont): Call set_desired_inferior.
17492
17493 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17494
17495 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17496
17497 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17498
17499 * linux-low.c (linux_wait): Unblock async I/O.
17500 (linux_resume): Block and enable async I/O.
17501 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17502 * server.h (block_async_io, unblock_async_io): Add prototypes.
17503
17504 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17505
17506 * remote-utils.c (remote_open): Print a status notice after
17507 opening a TCP port.
17508 * server.c (attach_inferior): Print a status notice after
17509 attaching.
17510
17511 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17512
17513 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17514
17515 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17516
17517 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17518 error packet.
17519 * server.c, target.h: Update copyright years.
17520
17521 2004-02-25 Roland McGrath <roland@redhat.com>
17522
17523 * target.h (struct target_ops): New member `read_auxv'.
17524 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17525 * linux-low.c (linux_read_auxv): New function.
17526 (linux_target_ops): Initialize `read_auxv' member to that.
17527
17528 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17529
17530 Committed by Jim Blandy <jimb@redhat.com>.
17531
17532 * linux-s390-low.c (s390_num_regs): Update.
17533 (s390_regmap): Remove control registers. Use __s390x__ predefine
17534 instead of GPR_SIZE to distiguish s390 and s390x targets.
17535
17536 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17537
17538 * linux-low.c: Update copyright year.
17539 (check_removed_breakpoint): Clear pending_is_breakpoint.
17540 (linux_set_resume_request, linux_queue_one_thread)
17541 (resume_status_pending_p): New functions.
17542 (linux_continue_one_thread): Use process->resume.
17543 (linux_resume): Only resume threads if there are no pending events.
17544 * linux-low.h (struct process_info): Add resume request
17545 pointer.
17546
17547 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17548
17549 * regcache.c (new_register_cache): Clear the allocated register
17550 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17551
17552 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17553
17554 * linux-low.c (linux_resume): Take a struct thread_resume *
17555 argument.
17556 (linux_wait): Update call.
17557 (resume_ptr): New static variable.
17558 (linux_continue_one_thread): Renamed from
17559 linux_continue_one_process. Use resume_ptr.
17560 (linux_resume): Use linux_continue_one_thread.
17561 * server.c (handle_v_cont, handle_v_requests): New functions.
17562 (myresume): New function.
17563 (main): Handle 'v' case.
17564 * target.h (struct thread_resume): New type.
17565 (struct target_ops): Change argument of "resume" to struct
17566 thread_resume *.
17567 (myresume): Delete macro.
17568
17569 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17570
17571 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17572 (uninstall): Support DESTDIR.
17573
17574 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17575
17576 * configure.srv: Add xscale*linux copy of arm*linux entry.
17577
17578 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17579
17580 * linux-arm-low.c (arm_reinsert_addr): New function.
17581 (the_low_target): Add arm_reinsert_addr.
17582
17583 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17584
17585 * mem-break.c: Remove whitespace at end of file.
17586
17587 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17588
17589 * configure.in: Check whether we need to prototype strerror.
17590 * server.h: Optionally prototype strerror.
17591 * gdbreplay.c (perror_with_name): Use strerror.
17592 * linux-low.c (linux_attach_lwp): Use strerror.
17593 * utils.c (perror_with_name): Use strerror.
17594 * config.in, configure: Regenerated.
17595
17596 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17597
17598 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17599 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17600
17601 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17602
17603 * Makefile.in (SFILES): Update.
17604 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17605 low-sun3.c: Remove files.
17606
17607 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17608
17609 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17610 (linux_detach_one_process, linux_detach): New functions.
17611 (linux_target_ops): Add linux_detach.
17612 * server.c (main): Handle 'D' packet.
17613 * target.h (struct target_ops): Add "detach" member.
17614 (detach_inferior): Define.
17615
17616 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17617
17618 From Kelley Cook <kelleycook@wideopenwest.com>:
17619 * configure.srv: Accept i[34567]86 variants.
17620
17621 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17622
17623 * linux-low.c (linux_wait_for_event): Correct comment typos.
17624 (linux_resume_one_process): Call check_removed_breakpoint.
17625 (linux_send_signal): New function.
17626 (linux_target_ops): Add linux_send_signal.
17627 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17628 of kill.
17629 * target.h (struct target_ops): Add send_signal.
17630
17631 2003-05-29 Jim Blandy <jimb@redhat.com>
17632
17633 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17634 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17635 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17636 away part of the register's value.
17637
17638 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17639
17640 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17641 (linux_wait_for_event, linux_init_signals): Likewise.
17642
17643 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17644
17645 * configure.in: Check for stdlib.h.
17646 * configure: Regenerated.
17647 * config.in: Regenerated.
17648
17649 2003-01-04 Andreas Schwab <schwab@suse.de>
17650
17651 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17652
17653 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17654
17655 * Makefile.in: Remove obsolete code.
17656
17657 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17658
17659 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17660 defined(PT_FPR0_HI).
17661
17662 2002-11-17 Stuart Hughes <seh@zee2.com>
17663
17664 * linux-arm-low.c (arm_num_regs): Increase.
17665 (arm_regmap): Include status register.
17666
17667 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17668
17669 * linux-low.c (register_addr): Remove incorrect -1 check.
17670
17671 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17672
17673 * linux-low.c (linux_create_inferior): Call setpgid. Return
17674 the new PID.
17675 (unstopped_p, linux_signal_pid): Remove.
17676 (linux_target_ops): Remove linux_signal_pid.
17677 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17678 global instead of target method.
17679 * target.h (struct target_ops): Remove signal_pid. Update comment
17680 for create_inferior.
17681 * server.c (signal_pid): New variable.
17682 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17683 gdbserver. Set the child to be the foreground process group.
17684 (attach_inferior): Set signal_pid.
17685
17686 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17687
17688 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17689
17690 2002-08-20 Jim Blandy <jimb@redhat.com>
17691
17692 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17693 default for this.
17694
17695 2002-08-01 Andrew Cagney <cagney@redhat.com>
17696
17697 * Makefile.in: Make chill references obsolete.
17698
17699 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17700
17701 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17702 * configure: Regenerate.
17703 * config.in: Regenerate.
17704
17705 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17706
17707 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17708 (perror_with_name, remote_close, remote_open, expect, play): Static.
17709
17710 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17711
17712 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17713 byte offsets instead of an array of indexes.
17714 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17715
17716 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17717
17718 * regcache.c: Add comment.
17719
17720 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17721
17722 * thread-db.c: New file.
17723 * proc-service.c: New file.
17724 * acinclude.m4: New file.
17725 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17726 proc-service.o, and thread-db.o.
17727 (linux-low.o): Add USE_THREAD_DB.
17728 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17729 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17730 * aclocal.m4: Regenerated.
17731 * config.in: Regenerated.
17732 * configure: Regenerated.
17733 * configure.in: Check for proc_service.h, sys/procfs.h,
17734 thread_db.h, and linux/elf.h headrs.
17735 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17736 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17737 Check for -lthread_db and thread support.
17738 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17739 PowerPC, and SuperH.
17740 * i387-fp.c: Constify arguments.
17741 * i387-fp.h: Likewise.
17742 * inferiors.c: (struct thread_info): Renamed from
17743 `struct inferior_info'. Remove PID member. Use generic inferior
17744 list header. All uses updated.
17745 (inferiors, signal_pid): Removed.
17746 (all_threads): New variable.
17747 (get_thread): Define.
17748 (add_inferior_to_list): New function.
17749 (for_each_inferior): New function.
17750 (change_inferior_id): New function.
17751 (add_inferior): Removed.
17752 (remove_inferior): New function.
17753 (add_thread): New function.
17754 (free_one_thread): New function.
17755 (remove_thread): New function.
17756 (clear_inferiors): Use for_each_inferior and free_one_thread.
17757 (find_inferior): New function.
17758 (find_inferior_id): New function.
17759 (inferior_target_data): Update argument type.
17760 (set_inferior_target_data): Likewise.
17761 (inferior_regcache_data): Likewise.
17762 (set_inferior_regcache_data): Likewise.
17763 * linux-low.c (linux_bp_reinsert): Remove.
17764 (all_processes, stopping_threads, using_thrads)
17765 (struct pending_signals, debug_threads, pid_of): New.
17766 (inferior_pid): Replace with macro.
17767 (struct inferior_linux_data): Remove.
17768 (get_stop_pc, add_process): New functions.
17769 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17770 Use add_process and add_thread.
17771 (linux_attach_lwp): New function, based on old linux_attach. Use
17772 add_process and add_thread. Set stop_expected for new threads.
17773 (linux_attach): New function.
17774 (linux_kill_one_process): New function.
17775 (linux_kill): Kill all LWPs.
17776 (linux_thread_alive): Use find_inferior_id.
17777 (check_removed_breakpoints, status_pending_p): New functions.
17778 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17779 Update. Use WNOHANG. Wait for cloned processes also. Update process
17780 struct for the found process.
17781 (linux_wait_for_event): New function.
17782 (linux_wait): Use it. Support LWPs.
17783 (send_sigstop, wait_for_sigstop, stop_all_processes)
17784 (linux_resume_one_process, linux_continue_one_process): New functions.
17785 (linux_resume): Support LWPs.
17786 (REGISTER_RAW_SIZE): Remove.
17787 (fetch_register): Use register_size instead. Call supply_register.
17788 (usr_store_inferior_registers): Likewise. Call collect_register.
17789 Fix recursive case.
17790 (regsets_fetch_inferior_registers): Improve error message.
17791 (regsets_store_inferior_registers): Add debugging.
17792 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17793 (unstopped_p, linux_signal_pid): New functions.
17794 (linux_target_ops): Add linux_signal_pid.
17795 (linux_init_signals): New function.
17796 (initialize_low): Call it. Initialize using_threads.
17797 * regcache.c (inferior_regcache_data): Add valid
17798 flag.
17799 (get_regcache): Fetch registers lazily. Add fetch argument
17800 and update all callers.
17801 (regcache_invalidate_one, regcache_invalidate): New
17802 functions.
17803 (new_register_cache): Renamed from create_register_cache.
17804 Return the new regcache.
17805 (free_register_cache): Change argument to a void *.
17806 (registers_to_string, registers_from_string): Call get_regcache
17807 with fetch flag set.
17808 (register_data): Make static. Pass fetch flag to get_regcache.
17809 (supply_register): Call get_regcache with fetch flag clear.
17810 (collect_register): Call get_regcache with fetch flag set.
17811 (collect_register_as_string): New function.
17812 * regcache.h: Update.
17813 * remote-utils.c (putpkt): Flush after debug output and use
17814 stderr.
17815 Handle input interrupts while waiting for an ACK.
17816 (input_interrupt): Use signal_pid method.
17817 (getpkt): Flush after debug output and use stderr.
17818 (outreg): Use collect_register_as_string.
17819 (new_thread_notify, dead_thread_notify): New functions.
17820 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17821 and general_thread.
17822 (look_up_one_symbol): Flush after debug output.
17823 * server.c (step_thread, server_waiting): New variables.
17824 (start_inferior): Don't use signal_pid. Update call to mywait.
17825 (attach_inferior): Update call to mywait.
17826 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17827 (main): Don't fetch/store registers explicitly. Use
17828 set_desired_inferior. Support proposed ``Hs'' packet. Update
17829 calls to mywait.
17830 * server.h: Update.
17831 (struct inferior_list, struct_inferior_list_entry): New.
17832 * target.c (set_desired_inferior): New.
17833 (write_inferior_memory): Constify.
17834 (mywait): New function.
17835 * target.h: Update.
17836 (struct target_ops): New signal_pid method.
17837 (mywait): Removed macro, added prototype.
17838
17839 * linux-low.h (regset_func): Removed.
17840 (regset_fill_func, regset_store_func): New.
17841 (enum regset_type): New.
17842 (struct regset_info): Add type field. Use new operation types.
17843 (struct linux_target_ops): stop_pc renamed to get_pc.
17844 Add decr_pc_after_break and breakpoint_at.
17845 (get_process, get_thread_proess, get_process_thread)
17846 (strut process_info, all_processes, linux_attach_lwp)
17847 (thread_db_init): New.
17848
17849 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17850 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17851 (the_low_target): Add new members.
17852 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17853 (i386_store_fpxregset): Constify.
17854 (target_regsets): Add new kind identifier.
17855 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17856 (i386_set_pc): Add debugging.
17857 (i386_breakpoint_at): New function.
17858 (the_low_target): Add new members.
17859 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17860 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17861 (mips_breakpoint_at): New.
17862 (the_low_target): Add new members.
17863 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17864 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17865 (the_low_target): Add new members.
17866 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17867 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17868 (the_low_target): Add new members.
17869 * linux-x86-64-low.c (target_regsets): Add new kind
17870 identifier.
17871
17872 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17873
17874 From Martin Pool <mbp@samba.org>:
17875 * server.c (gdbserver_usage): New function.
17876 (main): Call it.
17877
17878 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17879
17880 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17881 stop_at -> stop_pc.
17882
17883 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17884
17885 * Makefile.in: Remove obsolete code.
17886
17887 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17888
17889 * linux-low.c (regsets_fetch_inferior_registers),
17890 (regsets_store_inferior_registers): Removed cast to int from
17891 ptrace() calls.
17892 * regcache.h: Added declaration of struct inferior_info.
17893
17894 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17895
17896 * inferiors.c (struct inferior_info): Add regcache_data.
17897 (add_inferior): Call create_register_cache.
17898 (clear_inferiors): Call free_register_cache.
17899 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17900 * regcache.c (struct inferior_regcache_data): New.
17901 (registers): Remove.
17902 (get_regcache): New function.
17903 (create_register_cache, free_register_cache): New functions.
17904 (set_register_cache): Don't initialize the register cache here.
17905 (registers_to_string, registers_from_string, register_data): Call
17906 get_regcache.
17907 * regcache.h: Add prototypes.
17908 * server.h: Likewise.
17909
17910 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17911
17912 * mem-break.c: New file.
17913 * mem-break.h: New file.
17914 * Makefile.in: Add mem-break.o rule; update server.h
17915 dependencies.
17916 * inferiors.c (struct inferior_info): Add target_data
17917 member.
17918 (clear_inferiors): Free target_data member if set.
17919 (inferior_target_data, set_inferior_target_data): New functions.
17920 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17921 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17922 * linux-low.c (linux_bp_reinsert): New variable.
17923 (struct inferior_linux_data): New.
17924 (linux_create_inferior): Use set_inferior_target_data.
17925 (linux_attach): Likewise. Call add_inferior.
17926 (linux_wait_for_one_inferior): New function.
17927 (linux_wait): Call it.
17928 (linux_write_memory): Add const.
17929 (initialize_low): Call set_breakpoint_data.
17930 * linux-low.h (struct linux_target_ops): Add breakpoint
17931 handling members.
17932 * server.c (attach_inferior): Remove extra add_inferior
17933 call.
17934 * server.h: Include mem-break.h. Update inferior.c
17935 prototypes.
17936 * target.c (read_inferior_memory)
17937 (write_inferior_memory): New functions.
17938 * target.h (read_inferior_memory)
17939 (write_inferior_memory): Change macros to prototypes.
17940 (struct target_ops): Update comments. Add const to write_memory
17941 definition.
17942
17943 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17944
17945 * linux-low.c (usr_store_inferior_registers): Support
17946 registers which are allowed to fail to store.
17947 * linux-low.h (linux_target_ops): Likewise.
17948 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17949 (ppc_cannot_store_register): FPSCR may not be storable.
17950
17951 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17952
17953 * server.h: Include <string.h> if HAVE_STRING_H.
17954 * ChangeLog: Correct paths in last ChangeLog entry.
17955
17956 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17957
17958 * linux-low.h: Remove obsolete prototypes.
17959 (struct linux_target_ops): New.
17960 (extern the_low_target): New.
17961 * linux-low.c (num_regs, regmap): Remove declarations.
17962 (register_addr): Use the_low_target explicitly.
17963 (fetch_register): Likewise.
17964 (usr_fetch_inferior_registers): Likewise.
17965 (usr_store_inferior_registers): Likewise.
17966 * linux-arm-low.c (num_regs): Remove.
17967 (arm_num_regs): Define.
17968 (arm_regmap): Renamed from regmap, made static.
17969 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17970 made static.
17971 (arm_cannot_store_register): Renamed from cannot_store_register,
17972 made static.
17973 (the_low_target): New.
17974 * linux-i386-low.c (num_regs): Remove.
17975 (i386_num_regs): Define.
17976 (i386_regmap): Renamed from regmap, made static.
17977 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17978 made static.
17979 (i386_cannot_store_register): Renamed from cannot_store_register,
17980 made static.
17981 (the_low_target): New.
17982 * linux-ia64-low.c (num_regs): Remove.
17983 (ia64_num_regs): Define.
17984 (ia64_regmap): Renamed from regmap, made static.
17985 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17986 made static.
17987 (ia64_cannot_store_register): Renamed from cannot_store_register,
17988 made static.
17989 (the_low_target): New.
17990 * linux-m68k-low.c (num_regs): Remove.
17991 (m68k_num_regs): Define.
17992 (m68k_regmap): Renamed from regmap, made static.
17993 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17994 made static.
17995 (m68k_cannot_store_register): Renamed from cannot_store_register,
17996 made static.
17997 (the_low_target): New.
17998 * linux-mips-low.c (num_regs): Remove.
17999 (mips_num_regs): Define.
18000 (mips_regmap): Renamed from regmap, made static.
18001 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18002 made static.
18003 (mips_cannot_store_register): Renamed from cannot_store_register,
18004 made static.
18005 (the_low_target): New.
18006 * linux-ppc-low.c (num_regs): Remove.
18007 (ppc_num_regs): Define.
18008 (ppc_regmap): Renamed from regmap, made static.
18009 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18010 made static.
18011 (ppc_cannot_store_register): Renamed from cannot_store_register,
18012 made static.
18013 (the_low_target): New.
18014 * linux-s390-low.c (num_regs): Remove.
18015 (s390_num_regs): Define.
18016 (s390_regmap): Renamed from regmap, made static.
18017 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18018 made static.
18019 (s390_cannot_store_register): Renamed from cannot_store_register,
18020 made static.
18021 (the_low_target): New.
18022 * linux-sh-low.c (num_regs): Remove.
18023 (sh_num_regs): Define.
18024 (sh_regmap): Renamed from regmap, made static.
18025 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18026 made static.
18027 (sh_cannot_store_register): Renamed from cannot_store_register,
18028 made static.
18029 (the_low_target): New.
18030 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18031 (the_low_target): New.
18032
18033 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18034
18035 * Makefile.in: Add stamp-h target.
18036 * configure.in: Create stamp-h.
18037 * configure: Regenerated.
18038
18039 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18040
18041 * inferiors.c: New file.
18042 * target.c: New file.
18043 * target.h: New file.
18044 * Makefile.in: Add target.o and inferiors.o. Update
18045 dependencies.
18046 * linux-low.c (inferior_pid): New static variable,
18047 moved from server.c.
18048 (linux_create_inferior): Renamed from create_inferior.
18049 Call add_inferior. Return 0 on success instead of a PID.
18050 (linux_attach): Renamed from myattach.
18051 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18052 (linux_thread_alive): Renamed from mythread_alive.
18053 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18054 child dies.
18055 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18056 (regsets_store_inferior_registers): Correct error message.
18057 Add missing ``return 0''.
18058 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18059 (linux_store_registers): Renamed from store_inferior_registers.
18060 (linux_read_memory): Renamed from read_inferior_memory.
18061 (linux_write_memory): Renamed from write_inferior_memory.
18062 (linux_target_ops): New structure.
18063 (initialize_low): Call set_target_ops ().
18064 * remote-utils.c (unhexify): New function.
18065 (hexify): New function.
18066 (input_interrupt): Send signals to ``signal_pid''.
18067 * server.c (inferior_pid): Remove.
18068 (start_inferior): Update create_inferior call.
18069 (attach_inferior): Call add_inferior.
18070 (handle_query): New function.
18071 (main): Call handle_query for `q' packets.
18072 * server.h: Include "target.h". Remove obsolete prototypes.
18073 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18074
18075 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18076
18077 * Makefile.in: Add WARN_CFLAGS. Update configury
18078 dependencies.
18079 * configure.in: Check for <string.h>
18080 * configure: Regenerate.
18081 * config.in: Regenerate.
18082 * gdbreplay.c: Include needed system headers.
18083 (remote_open): Remove strchr prototype.
18084 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18085 * regcache.c (supply_register): Change buf argument to const void *.
18086 (supply_register_by_name): Likewise.
18087 (collect_register): Change buf argument to void *.
18088 (collect_register_by_name): Likewise.
18089 * regcache.h: Add missing prototypes.
18090 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18091 * server.c (handle_query): New function.
18092 (attached): New static variable, moved out of main.
18093 (main): Quiet longjmp clobber warnings.
18094 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18095 * utils.c (error): Remove NORETURN.
18096 (fatal): Likewise.