Fix library segment-address for 64bit values
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
2
3 * server.c (handle_qxfer_libraries): Write segment-address with
4 paddress.
5
6 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
7
8 * Makefile.in (install-strip): New target.
9 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
10 * aclocal.m4: Regenerate.
11 * configure: Regenerate.
12 * configure.ac: Add AM_PROG_INSTALL_STRIP.
13
14 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
15
16 * Makefile.in (SFILES): Adjust paths to point to real files.
17 (OBS): Move waitstatus.o to target/waitstatus.o.
18 (TAGS): Transform paths appropriately.
19 (%.o): Rename to...
20 (nat/%.o): ... this pattern rule.
21 (%.o): Rename to...
22 (target/%.o): ... this pattern rule.
23 * configure.srv: Adjust paths throughout to include nat/ prefix
24 with the revant files.
25 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
26 * configure: Regenerate.
27
28 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
29
30 * Makefile.in (TAGS): Remove config files from the recipe.
31
32 2020-01-14 Tom Tromey <tom@tromey.com>
33
34 * configure: Rebuild.
35 * configure.ac: Remove any checks that were added to common.m4.
36 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
37 lib-link.m4.
38
39 2020-01-14 Tom Tromey <tom@tromey.com>
40
41 * server.h: Include config.h.
42 * gdbreplay.c: Include config.h.
43 * configure: Rebuild.
44 * configure.ac: Don't source common.host.
45 * acinclude.m4: Update path.
46 * Makefile.in (INCSUPPORT): New variable.
47 (INCLUDE_CFLAGS): Add INCSUPPORT.
48 (SFILES): Update paths.
49 (version-generated.c): Update path to create-version.sh.
50 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
51
52 2020-01-14 Tom Tromey <tom@tromey.com>
53
54 * configure.ac (LIBS): Use WIN32APILIBS.
55 (USE_WIN32API): Don't define.
56 * configure: Rebuild.
57
58 2020-01-14 Tom Tromey <tom@tromey.com>
59
60 * configure: Rebuild.
61
62 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
63
64 * Makefile.in (%-generated.c): Remove rule for files from
65 regformats/i386.
66
67 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
68
69 * configure: Re-generate.
70
71 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
72
73 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
74 Define to static.
75 * tracepoint.c (stop_tracing, flush_trace_buffer,
76 about_to_request_buffer_space, get_trace_state_variable_value,
77 set_trace_state_variable_value, gdb_collect): Add declaration.
78
79 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
80
81 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
82 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
83 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
84 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
85 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
86 static.
87
88 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
89
90 * inferiors.c: Include gdbsupport/common-inferior.h.
91
92 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
93
94 * hostio-errno.c: Include hostio.h.
95
96 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
97
98 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
99 prerequisite.
100
101 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
102
103 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
104 * linux-arm-tdesc.h: Include arch/arm.h.
105
106 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
107
108 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
109
110 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
113 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
114
115 2020-01-10 Pedro Alves <palves@redhat.com>
116
117 * fork-child.c (post_fork_inferior): Pass target down to
118 startup_inferior.
119 * inferiors.c (switch_to_thread): Add process_stratum_target
120 parameter.
121 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
122 * nto-low.c (nto_target_ops): Now a process_stratum_target.
123 * linux-low.c (linux_target_ops): Now a process_stratum_target.
124 * remote-utils.c (prepare_resume_reply): Pass the target to
125 switch_to_thread.
126 * target.c (the_target): Now a process_stratum_target.
127 (done_accessing_memory): Pass the target to switch_to_thread.
128 (set_target_ops): Ajust to use process_stratum_target.
129 * target.h (struct target_ops): Rename to ...
130 (struct process_stratum_target): ... this.
131 (the_target, set_target_ops): Adjust.
132 (prepare_to_access_memory): Adjust comment.
133 * win32-low.c (child_xfer_memory): Adjust to use
134 process_stratum_target.
135 (win32_target_ops): Now a process_stratum_target.
136
137 2020-01-06 Eli Zaretskii <eliz@gnu.org>
138 Pedro Alves <palves@redhat.com>
139
140 * win32-low.c (get_child_debug_event): Extract the fatal exception
141 from the exit status and convert to the equivalent Posix signal
142 number.
143 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
144 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
145
146 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
147
148 * Makefile.in: Use INSTALL_PROGRAM_ENV.
149
150 2020-01-01 Joel Brobecker <brobecker@adacore.com>
151
152 * server.c (gdbserver_version): Change copyright year to 2020.
153 * gdbreplay.c (gdbreplay_version): Likewise.
154
155 2019-12-19 Christian Biesinger <cbiesinger@google.com>
156
157 * configure: Regenerate.
158 * configure.ac: Quote variable arguments of test.
159
160 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
161
162 * Makefile.in: Fix build with GNU Make 3.81
163
164 2019-12-16 Tom Tromey <tromey@adacore.com>
165
166 * server.c (get_exec_file): Constify result.
167
168 2019-12-10 Christian Biesinger <cbiesinger@google.com>
169
170 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
171 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
172 * config.in: Regenerate.
173 * configure: Regenerate.
174 * configure.ac: Don't check for strerror.
175 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
176 Call safe_strerror instead of strerror.
177 * server.h (strerror): Remove this now-unnecessary declaration.
178 * tracepoint.c (init_named_socket): Call safe_strerror instead of
179 strerror.
180 (gdb_agent_helper_thread): Likewise.
181 * utils.c (perror_with_name): Likewise.
182
183 2019-11-26 Tom Tromey <tom@tromey.com>
184
185 * configure, config.in: Rebuild.
186
187 2019-11-26 Tom Tromey <tom@tromey.com>
188
189 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
190 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
191 gdb_sigmask.
192 * configure, config.in: Rebuild.
193
194 2019-11-26 Tom Tromey <tom@tromey.com>
195
196 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
197 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
198 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
199 * acinclude.m4: Include ax_pthread.m4.
200 * config.in, configure: Rebuild.
201
202 2019-11-26 Christian Biesinger <cbiesinger@google.com>
203
204 * debug.c (debug_set_output): Call safe_strerror instead of
205 strerror.
206 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
207 (linux_kill_one_lwp): Likewise.
208 (linux_detach_one_lwp): Likewise.
209 (linux_wait_for_event_filtered): Likewise.
210 (store_register): Likewise.
211 * lynx-low.c (lynx_attach): Likewise.
212 * mem-break.c (insert_memory_breakpoint): Likewise.
213 (remove_memory_breakpoint): Likewise.
214 (delete_fast_tracepoint_jump): Likewise.
215 (set_fast_tracepoint_jump): Likewise.
216 (uninsert_fast_tracepoint_jumps_at): Likewise.
217 (reinsert_fast_tracepoint_jumps_at): Likewise.
218 * nto-low.c (nto_xfer_memory): Likewise.
219 (nto_resume): Likewise.
220
221 2019-11-20 Luis Machado <luis.machado@linaro.org>
222
223 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
224 instead of register count.
225 * tdesc.c (tdesc_contains_feature): New function.
226 * tdesc.h (tdesc_contains_feature): New prototype.
227
228 2019-11-15 Christian Biesinger <cbiesinger@google.com>
229
230 * Makefile.in: Add safe-strerror.c.
231 * configure: Regenerate.
232 * configure.ac: Don't source common.host.
233
234 2019-11-15 Christian Biesinger <cbiesinger@google.com>
235
236 * config.in: Regenerate.
237 * configure: Regenerate.
238
239 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
240
241 * ax.c (ax_printf): Handle size_t_arg.
242
243 2019-11-06 Christian Biesinger <cbiesinger@google.com>
244
245 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
246 * mi/mi-main.c (output_cores): Likewise.
247 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
248 (linux_xfer_osdata_modules): Likewise.
249 * remote.c (register_remote_support_xml): Likewise.
250 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
251 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
252
253 2019-11-01 Christian Biesinger <cbiesinger@google.com>
254
255 * configure: Regenerate.
256 * configure.ac: Remove check for strerror_r.
257
258 2019-10-31 Christian Biesinger <cbiesinger@google.com>
259
260 * config.in: Regenerate.
261 * configure: Regenerate.
262 * configure.ac: Also check for strerror_r.
263
264 2019-10-31 Christian Biesinger <cbiesinger@google.com>
265
266 * ax.h (debug_agent): Remove duplicate declaration.
267
268 2019-10-26 Tom de Vries <tdevries@suse.de>
269
270 * linux-aarch64-low.c: Fix typos in comments.
271 * linux-arm-low.c: Same.
272 * linux-low.c: Same.
273 * linux-ppc-low.c: Same.
274 * proc-service.c: Same.
275 * regcache.h: Same.
276 * server.c: Same.
277 * tracepoint.c: Same.
278 * win32-low.c: Same.
279
280 2019-10-25 Tom Tromey <tromey@adacore.com>
281
282 * utils.c (xstrdup): Remove.
283
284 2019-10-23 Tom Tromey <tom@tromey.com>
285
286 * configure, config.in: Rebuild.
287
288 2019-10-23 Tom Tromey <tom@tromey.com>
289
290 * configure: Rebuild.
291 * acinclude.m4: Use m4_include, not sinclude.
292
293 2019-10-17 Tom Tromey <tromey@adacore.com>
294
295 * configure: Rebuild.
296 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
297 in AC_CONFIG_FILES invocation.
298 * Makefile.in (stamp-h, Makefile): Use new-style config.status
299 invocation.
300
301 2019-10-16 Christian Biesinger <cbiesinger@google.com>
302
303 * server.c: Include xml-builtin.h.
304 (get_xml_features): Don't declare xml_builtins here.
305
306 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
307
308 * Makefile.in: Remove references to vec-ipa.o.
309
310 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
311
312 * Makefile.in: Remove references to vec.c.
313
314 2019-10-02 Christian Biesinger <cbiesinger@google.com>
315
316 * server.c (server_waiting): Change to bool.
317 (extended_protocol): Likewise.
318 (response_needed): Likewise.
319 (exit_requested): Likewise.
320 (run_once): Likewise.
321 (report_no_resumed): Likewise.
322 (non_stop): Likewise.
323 (disable_packet_vCont): Likewise.
324 (disable_packet_Tthread): Likewise.
325 (disable_packet_qC): Likewise.
326 (disable_packet_qfThreadInfo): Likewise.
327 (handle_general_set): Update.
328 (handle_detach): Update.
329 (handle_monitor_command): Update.
330 (handle_query): Update.
331 (captured_main): Update.
332 (process_serial_event): Update.
333 * server.h (server_waiting): Change to bool.
334 (disable_packet_vCont): Likewise.
335 (disable_packet_Tthread): Likewise.
336 (disable_packet_qC): Likewise.
337 (disable_packet_qfThreadInfo): Likewise.
338 (run_once): Likewise.
339 (non_stop): Likewise.
340 * target.c (target_stop_and_wait): Update.
341
342 2019-10-02 Tom Tromey <tromey@adacore.com>
343
344 * Makefile.in (SFILES): Add common-inferior.c.
345 (OBS): Add common-inferior.o.
346 * server.c (startup_with_shell): Don't define.
347
348 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
349
350 * linux-low.c (linux_low_read_btrace): Update for change to
351 std::vector.
352
353 2019-09-20 Christian Biesinger <cbiesinger@google.com>
354
355 * debug.c (debug_threads): Remove comment in favor of the header.
356 * debug.h (using_threads): Add declaration.
357 (debug_threads): Add comment.
358 * linux-aarch64-low.c: Include debug.h and remove declaration of
359 debug_threads.
360 * nto-low.c: Likewise.
361 * remote-utils.c: Likewise.
362 * thread-db.c: Likewise.
363
364 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
365
366 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
367 and powerpc-cell64l-ipa.o.
368 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
369 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
370 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
371 (spu*-*-*): Remove.
372
373 * spu-low.c: Remove file.
374
375 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
376 (parse_spufs_run): Remove.
377 (ppc_get_pc): Remove Cell/B.E. support.
378 (ppc_set_pc): Likewise.
379 (ppc_breakpoint_at): Likewise.
380 (ppc_arch_setup): Likewise.
381 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
382 tdesc_powerpc_cell32l.
383 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
384 or init_registers_powerpc_cell32l.
385 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
386 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
387 or init_registers_powerpc_cell32l.
388 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
389 (init_registers_powerpc_cell32l): Remove prototype.
390 (init_registers_powerpc_cell64l): Likewise.
391
392 * target.h (struct target_ops): Remove qxfer_spu member.
393 * server.c (handle_qxfer_spu): Remove.
394 (qxfer_packets): Remove entry for "spu".
395 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
396 * linux-low.c (SPUFS_MAGIC): Remove.
397 (spu_enumerate_spu_ids): Remove.
398 (linux_qxfer_spu): Remove.
399 (linux_target_ops): Remove qxfer_spu member.
400 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
401 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
402 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
403
404 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
405
406 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
407 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
408 * config.in: Regenerate.
409 * configure: Regenerate.
410
411 2019-08-15 Tom Tromey <tromey@adacore.com>
412
413 * target.c (target_write_memory): Use gdb::byte_vector.
414
415 2019-08-15 Tom Tromey <tromey@adacore.com>
416
417 * tracepoint.c (write_inferior_data_pointer)
418 (write_inferior_integer, write_inferior_int8)
419 (write_inferior_uinteger, m_tracepoint_action_download)
420 (r_tracepoint_action_download, x_tracepoint_action_download)
421 (l_tracepoint_action_download, clear_inferior_trace_buffer)
422 (download_agent_expr, download_tracepoint_1)
423 (download_trace_state_variables, upload_fast_traceframes): Update.
424 * server.c (gdb_write_memory): Update.
425 * remote-utils.c (relocate_instruction): Update.
426 * proc-service.c (ps_pdwrite): Update.
427 * mem-break.c (remove_memory_breakpoint)
428 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
429 (uninsert_fast_tracepoint_jumps_at)
430 (reinsert_fast_tracepoint_jumps_at): Update.
431 * linux-x86-low.c (append_insns)
432 (i386_install_fast_tracepoint_jump_pad)
433 (amd64_write_goto_address, i386_write_goto_address): Update.
434 * linux-s390-low.c (append_insns, s390_write_goto_address):
435 Update.
436 * linux-ppc-low.c (ppc_relocate_instruction)
437 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
438 (ppc_write_goto_address): Update.
439 * linux-aarch64-low.c (append_insns): Update.
440 * target.h (struct target_ops): Update.
441 (write_inferior_memory): Don't declare.
442 * target.c (target_write_memory): Rename from
443 write_inferior_memory. Remove old target_write_memory.
444
445 2019-08-15 Tom Tromey <tromey@adacore.com>
446
447 * target.c (write_inferior_memory): Use std::vector.
448
449 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
450
451 PR build/24886
452 * configure.ac: Drop enable-libmcheck support.
453 * configure, config.in: Rebuild.
454 * acinclude.m4: Don't include it.
455
456 2019-07-19 Alan Hayward <alan.hayward@arm.com>
457
458 * configure.srv: Remove Arm xml files.
459
460 2019-07-19 Alan Hayward <alan.hayward@arm.com>
461
462 * configure.srv: Add new files. Remove xml generated files.
463 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
464 registers.
465 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
466 * linux-aarch32-tdesc.c: New file.
467 * linux-aarch32-tdesc.h: New file.
468 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
469 * linux-arm-low.c (init_registers_arm, tdesc_arm)
470 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
471 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
472 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
473 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
474 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
475 (arm_read_description): Call arm_linux_read_description.
476 (initialize_low_arch): Don't init registers.
477 * linux-arm-tdesc.c: New file.
478 * linux-arm-tdesc.h: New file.
479
480 2019-07-10 Alan Hayward <alan.hayward@arm.com>
481
482 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
483 Move counter inside for.
484 (arm_read_description): Check ptrace earlier.
485 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
486
487 2019-07-09 Tom Tromey <tom@tromey.com>
488
489 * configure: Rebuild.
490 * configure.ac: Change common to gdbsupport.
491 * acinclude.m4: Change common to gdbsupport.
492 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
493 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
494 common to gdbsupport.
495 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
496 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
497 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
498 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
499 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
500 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
501 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
502 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
503 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
504 common to gdbsupport.
505
506 2019-07-04 Alan Hayward <alan.hayward@arm.com>
507
508 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
509 defines.
510 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
511
512 2019-07-04 Alan Hayward <alan.hayward@arm.com>
513
514 * configure.srv: Remove legacy xml.
515 * linux-aarch64-low.c (initialize_low_arch): Remove
516 initialize_low_tdesc call.
517 * linux-aarch64-tdesc-selftest.c: Remove file.
518 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
519 * linux-x86-low.c (initialize_low_arch): Remove
520 initialize_low_tdesc call.
521 * linux-x86-tdesc-selftest.c: Remove file.
522 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
523
524 2019-06-20 Tom de Vries <tdevries@suse.de>
525
526 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
527 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
528
529 2019-06-19 Tom de Vries <tdevries@suse.de>
530
531 * debug.h (debug_write): Change return type to ssize_t.
532 * debug.c (debug_write): Same.
533
534 2019-06-14 Tom Tromey <tom@tromey.com>
535
536 * configure.ac: Use new path to gnulib.
537 * configure: Rebuild.
538 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
539 to gnulib.
540
541 2019-06-11 Tom Tromey <tom@tromey.com>
542
543 * Makefile.in (SFILES): Add alloc.c.
544 (OBS): Add alloc.o.
545 (IPA_OBJS): Add alloc-ipa.o.
546 (alloc-ipa.o): New target.
547 (%.o: ../%.c): New pattern rule.
548
549 2019-06-10 Tom Tromey <tromey@adacore.com>
550
551 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
552 end warning with a newline.
553 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
554 newline.
555 * thread-db.c (attach_thread): Don't end warning with a newline.
556 (thread_db_notice_clone): Likewise.
557 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
558 newline.
559 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
560 end warning with a newline.
561
562 2019-06-04 Pedro Alves <palves@redhat.com>
563
564 * server.c (captured_main): Use make_unique_xstrdup.
565
566 2019-06-02 Tom Tromey <tom@tromey.com>
567
568 * gdbreplay.c (fromhex): Remove.
569 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
570
571 2019-05-29 Tom Tromey <tromey@adacore.com>
572
573 * configure: Rebuild.
574
575 2019-05-06 Kevin Buettner <kevinb@redhat.com>
576
577 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
578 sign extension code on 32-bit builds.
579
580 2019-05-03 Eli Zaretskii <eliz@gnu.org>
581
582 * remote-utils.c:
583 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
584
585 2019-04-19 Tom Tromey <tom@tromey.com>
586
587 * server.c (struct vstop_notif): Derive from notif_event.
588 <base>: Remove.
589 (queue_stop_reply): Update.
590 (remove_all_on_match_ptid): Change type. Rewrite.
591 (discard_queued_stop_replies): Rewrite.
592 (in_queued_stop_replies_ptid): Change type.
593 (in_queued_stop_replies): Rewrite.
594 (notif_stop): Update.
595 (queue_stop_reply_callback): Update.
596 (captured_main): Don't call initialize_notif.
597 (push_stop_notification): Update.
598 * notif.c (notif_write_event, handle_notif_ack)
599 (notif_event_enque, notif_push): Update.
600 (notif_event_xfree, initialize_notif): Remove.
601 * notif.h (struct notif_event): Include <list>, not
602 "common/queue.h".
603 (struct notif_server) <queue>: Now a std::list.
604 (notif_event_p): Remove typedef.
605 (initialize_notif): Don't declare.
606 (struct notif_event): Add virtual destructor.
607
608 2019-04-17 Alan Hayward <alan.hayward@arm.com>
609
610 * ax.c (ax_vdebug): Call debug_printf.
611 * debug.c (debug_write): New function.
612 * debug.h (debug_write): New declaration.
613 * linux-low.c (sigchld_handler): Call debug_write.
614
615 2019-04-17 Alan Hayward <alan.hayward@arm.com>
616
617 * debug.c (debug_set_output): New function.
618 (debug_vprintf): Send output to debug_file.
619 (debug_flush): Likewise.
620 * debug.h (debug_set_output): New declaration.
621 * server.c (handle_monitor_command): Add debug-file option.
622 (captured_main): Likewise.
623
624 2019-04-17 Alan Hayward <alan.hayward@arm.com>
625
626 * debug.c (remote_debug): Add definition.
627 * debug.h (remote_debug): Add declaration.
628 * hostio.c (remote_debug): Remove declaration.
629 * remote-utils.c (struct ui_file): Likewise.
630 (remote_debug): Likewise.
631 * remote-utils.h (remote_debug): Likewise,
632 * server.c (remote_debug): Remove definition.
633
634 2019-04-10 Kevin Buettner <kevinb@redhat.com>
635
636 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
637 when using a 64-bit gdbserver.
638
639 2019-04-09 Tom Tromey <tromey@adacore.com>
640
641 * linux-low.c (select_event_lwp): Use find_thread_in_random.
642
643 2019-04-08 Tom Tromey <tom@tromey.com>
644
645 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
646 throw.
647 (linux_resume_one_lwp): Likewise.
648
649 2019-04-08 Tom Tromey <tom@tromey.com>
650
651 * gdbreplay.c: Update.
652 * linux-low.c: Update.
653 * server.c: Update.
654
655 2019-04-08 Tom Tromey <tom@tromey.com>
656
657 * server.c: Use C++ exception handling.
658 * linux-low.c: Use C++ exception handling.
659 * gdbreplay.c: Use C++ exception handling.
660
661 2019-04-08 Tom Tromey <tom@tromey.com>
662
663 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
664 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
665 (captured_main, main): Update.
666 * gdbreplay.c (main): Update.
667
668 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
669
670 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
671 value in argument pointer, return 1 if the entry is found and 0
672 otherwise. Move comment.
673 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
674 * linux-low.h (linux_get_auxv): Declare.
675 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
676
677 2019-04-05 Tom Tromey <tromey@adacore.com>
678
679 * server.c (gdbserver_usage): Use upper-case for metasyntactic
680 variables.
681
682 2019-03-28 Alan Hayward <alan.hayward@arm.com>
683
684 * linux-low.c (AT_HWCAP2): Add define if not already included.
685
686 2019-03-26 Alan Hayward <alan.hayward@arm.com>
687
688 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
689 (aarch64_arch_setup): Call linux_get_hwcap.
690 * linux-arm-low.c (arm_get_hwcap): Remove function.
691 (arm_read_description): Call linux_get_hwcap.
692 * linux-low.c (linux_get_auxv): New function.
693 (linux_get_hwcap): Likewise.
694 (linux_get_hwcap2): Likewise.
695 * linux-low.h (linux_get_hwcap): New declaration.
696 (linux_get_hwcap2): Likewise.
697 * linux-ppc-low.c (ppc_get_auxv): Remove function.
698 (ppc_arch_setup): Call linux_get_hwcap.
699 * linux-s390-low.c (s390_get_hwcap): Remove function.
700 (s390_arch_setup): Call linux_get_hwcap.
701
702 2019-03-22 Alan Hayward <alan.hayward@arm.com>
703 Jiong Wang <jiong.wang@arm.com>
704
705 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
706 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
707 to fail.
708 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
709
710 2019-03-22 Alan Hayward <alan.hayward@arm.com>
711 Jiong Wang <jiong.wang@arm.com>
712
713 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
714 (aarch64_get_hwcap): New function.
715 (aarch64_arch_setup): Read APIA hwcap.
716
717 2019-03-22 Alan Hayward <alan.hayward@arm.com>
718 Jiong Wang <jiong.wang@arm.com>
719
720 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
721 (initialize_low_tracepoint): Likewise.
722 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
723 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
724 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
725 (aarch64_linux_read_description): Likewise.
726 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
727
728 2019-03-12 John Baldwin <jhb@FreeBSD.org>
729
730 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
731 i386_create_target_description for 'segments' parameter.
732 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
733 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
734 * win32-i386-low.c (i386_arch_setup): Likewise.
735
736 2019-03-12 Tom Tromey <tromey@adacore.com>
737
738 * linux-low.c (iterate_over_lwps): Update.
739
740 2019-03-06 Tom Tromey <tom@tromey.com>
741
742 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
743 (captured_main): Use SCOPE_EXIT.
744
745 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
746
747 * configure.srv: Use '$enable_unittest' instead of '$development'
748 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
749 case.
750
751 2019-02-27 Tom Tromey <tromey@adacore.com>
752
753 * gdbreplay.c (logchar): Handle \r\n.
754
755 2019-02-07 Alan Hayward <alan.hayward@arm.com>
756
757 * linux-low.c (linux_attach): Add process before lwp.
758 * server.c (attach_inferior): Check if already attached.
759
760 2019-02-07 Tom Tromey <tom@tromey.com>
761
762 * x86-tdesc.h: Rename include guard.
763 * x86-low.h: Add include guard.
764 * wincecompat.h: Rename include guard.
765 * win32-low.h: Add include guard.
766 * utils.h: Rename include guard.
767 * tracepoint.h: Rename include guard.
768 * tdesc.h: Rename include guard.
769 * target.h: Rename include guard.
770 * server.h: Rename include guard.
771 * remote-utils.h: Rename include guard.
772 * regcache.h: Rename include guard.
773 * nto-low.h: Rename include guard.
774 * notif.h: Add include guard.
775 * mem-break.h: Rename include guard.
776 * lynx-low.h: Add include guard.
777 * linux-x86-tdesc.h: Add include guard.
778 * linux-s390-tdesc.h: Add include guard.
779 * linux-ppc-tdesc-init.h: Add include guard.
780 * linux-low.h: Add include guard.
781 * linux-aarch64-tdesc.h: Add include guard.
782 * linux-aarch32-low.h: Add include guard.
783 * inferiors.h: Rename include guard.
784 * i387-fp.h: Rename include guard.
785 * hostio.h: Rename include guard.
786 * gdbthread.h: Rename include guard.
787 * gdb_proc_service.h: Rename include guard.
788 * event-loop.h: Rename include guard.
789 * dll.h: Rename include guard.
790 * debug.h: Rename include guard.
791 * ax.h: Rename include guard.
792
793 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
794
795 PR gdb/23985
796 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
797 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
798
799 2019-01-25 Tom Tromey <tom@tromey.com>
800
801 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
802
803 2019-01-25 Tom Tromey <tom@tromey.com>
804
805 * win32-low.c: Fix common/ includes.
806 * win32-i386-low.c: Fix common/ includes.
807 * tracepoint.c: Fix common/ includes.
808 * thread-db.c: Fix common/ includes.
809 * target.h: Fix common/ includes.
810 * symbol.c: Fix common/ includes.
811 * spu-low.c: Fix common/ includes.
812 * server.h: Fix common/ includes.
813 * server.c: Fix common/ includes.
814 * remote-utils.c: Fix common/ includes.
815 * regcache.h: Fix common/ includes.
816 * regcache.c: Fix common/ includes.
817 * nto-x86-low.c: Fix common/ includes.
818 * notif.h: Fix common/ includes.
819 * mem-break.h: Fix common/ includes.
820 * lynx-low.c: Fix common/ includes.
821 * lynx-i386-low.c: Fix common/ includes.
822 * linux-x86-tdesc-selftest.c: Fix common/ includes.
823 * linux-x86-low.c: Fix common/ includes.
824 * linux-low.c: Fix common/ includes.
825 * inferiors.h: Fix common/ includes.
826 * i387-fp.c: Fix common/ includes.
827 * hostio.c: Fix common/ includes.
828 * hostio-errno.c: Fix common/ includes.
829 * gdbthread.h: Fix common/ includes.
830 * gdbreplay.c: Fix common/ includes.
831 * fork-child.c: Fix common/ includes.
832 * event-loop.c: Fix common/ includes.
833 * ax.c:
834 (enum gdb_agent_op): Fix common/ includes.
835
836 2019-01-21 Tom Tromey <tom@tromey.com>
837
838 * tracepoint.c: Fix includes.
839 * remote-utils.c: Fix includes.
840 * linux-x86-low.c: Fix includes.
841
842 2019-01-01 Joel Brobecker <brobecker@adacore.com>
843
844 * gdbreplay.c (gdbreplay_version): Update copyright year in
845 version message.
846 * server.c (gdbserver_version): Likewise.
847
848 2018-12-05 Alan Hayward <alan.hayward@arm.com>
849
850 * linux-low.c (add_lwp): Switch ordering.
851
852 2018-11-29 Tom Tromey <tom@tromey.com>
853
854 * win32-low.c (win32_join): Take pid, not process.
855 * target.h (struct target_ops) <join>: Change argument type.
856 (join_inferior): Change argument name.
857 * spu-low.c (spu_join): Take pid, not process.
858 * server.c (handle_detach): Preserve pid before destroying
859 process.
860 * lynx-low.c (lynx_join): Take pid, not process.
861 * linux-low.c (linux_join): Take pid, not process.
862
863 2018-11-23 Alan Hayward <alan.hayward@arm.com>
864
865 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
866 (aarch64_cannot_fetch_register): Likewise.
867 (struct linux_target_ops): Update references.
868
869 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
870
871 * linux-ppc-low.c: Include nat/linux-ptrace.h.
872
873 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
874
875 * configure.srv (ipa_ppc_linux_regobj): Add
876 powerpc-isa207-htm-vsx32l-ipa.o and
877 powerpc-isa207-htm-vsx64l-ipa.o.
878 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
879 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
880 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
881 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
882 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
883 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
884 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
885 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
886 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
887 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
888 (init_registers_powerpc_isa207_htm_vsx32l)
889 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
890 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
891 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
892 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
893 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
894 (ppc_store_tm_ctarregset): New functions.
895 (ppc_regsets): Add entries for HTM regsets.
896 (ppc_arch_setup): Set htm in features struct when needed. Set
897 sizes for the HTM regsets.
898 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
899 (initialize_low_arch): Call
900 init_registers_powerpc_isa207_htm_vsx32l and
901 init_registers_powerpc_isa207_htm_vsx64l.
902 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
903 PPC_TDESC_ISA207_HTM_VSX.
904 (initialize_low_tracepoint): Call
905 init_registers_powerpc_isa207_htm_vsx32l and
906 init_registers_powerpc_isa207_htm_vsx64l.
907
908 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
909
910 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
911 rs6000/power-linux-pmu.xml to srv_xmlfiles.
912 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
913 (ppc_store_pmuregset): New functions.
914 (ppc_regsets): Add entries for ebb and pmu regsets.
915 (ppc_arch_setup): Set isa207 in features struct if the ebb and
916 pmu regsets are available. Set sizes for these regsets.
917
918 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
919
920 * configure.srv (ipa_ppc_linux_regobj): Add
921 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
922 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
923 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
924 rs6000/powerpc-isa207-vsx32l.xml, and
925 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
926 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
927 <PPC_TDESC_ISA207_VSX>: New enum value.
928 (init_registers_powerpc_isa207_vsx32l): Declare.
929 (init_registers_powerpc_isa207_vsx64l): Declare.
930 * linux-ppc-low.c (ppc_fill_tarregset): New function.
931 (ppc_store_tarregset): New function.
932 (ppc_regsets): Add entry for the TAR regset.
933 (ppc_arch_setup): Set isa207 in features struct when needed. Set
934 size for the TAR regsets.
935 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
936 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
937 and init_registers_powerpc_isa207_vsx64l.
938 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
939 (initialize_low_tracepoint): Call
940 init_registers_powerpc_isa207_vsx32l and
941 init_registers_powerpc_isa207_vsx64l.
942
943 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
944 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
945
946 * configure.srv (ipa_ppc_linux_regobj): Add
947 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
948 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
949 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
950 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
951 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
952 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
953 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
954 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
955 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
956 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
957 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
958 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
959 (ppc_hwcap): Add comment.
960 (ppc_hwcap2): New global.
961 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
962 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
963 (ppc_regsets): Add entries for the DSCR and PPR regsets.
964 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
965 when needed. Set sizes for the the DSCR and PPR regsets.
966 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
967 (initialize_low_arch): Call
968 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
969 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
970 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
971 PPC_TDESC_ISA205_PPR_DSCR_VSX.
972 (initialize_low_tracepoint): Call
973 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
974 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
975
976 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
977
978 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
979
980 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
981 Simon Marchi <simark@simark.ca>
982
983 * acinclude.m4: Include "../selftest.m4".
984 * configure: Regenerate.
985 * configure.ac: Use "GDB_AC_SELFTEST".
986 * configure.srv: Use "$enable_unittests" instead of
987 "$development" when checking whether unit tests have been
988 enabled.
989 * server.c (captured_main): Update message informing that
990 selftests have been disabled.
991
992 2018-10-04 Tom Tromey <tom@tromey.com>
993
994 * configure: Rebuild.
995
996 2018-10-04 Tom Tromey <tom@tromey.com>
997
998 * server.c (handle_status): Rename inner "thread".
999 (process_serial_event): Declare "res" in 'm' case.
1000 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1001 (iterate_over_lwps): Rename inner "thread".
1002 (linux_qxfer_libraries_svr4): Rename inner "len".
1003 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1004
1005 2018-10-01 Gary Benson <gbenson@redhat.com>
1006
1007 * gdb_proc_service.h: Moved common code to
1008 common/gdb_proc_service.h.
1009
1010 2018-10-01 Gary Benson <gbenson@redhat.com>
1011
1012 * gdb_proc_service.h: Synchronize comments and whitespace with
1013 GDB's version of this file.
1014
1015 2018-09-25 Tom Tromey <tom@tromey.com>
1016
1017 * configure: Rebuild.
1018 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1019
1020 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1021
1022 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1023 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1024 ($(IPA_LIB)): Sort IPA_OBJS.
1025
1026 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1027
1028 * Makefile.in: Remove references to $(ADD_DEPS).
1029
1030 2018-09-16 Tom Tromey <tom@tromey.com>
1031
1032 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1033 variables.
1034 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1035 variables.
1036
1037 2018-09-05 Tom Tromey <tom@tromey.com>
1038
1039 * configure: Rebuild.
1040
1041 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1042
1043 PR build/23399
1044 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1045
1046 2018-08-27 Tom Tromey <tom@tromey.com>
1047
1048 PR build/23087:
1049 * configure: Rebuild.
1050
1051 2018-08-27 Tom Tromey <tom@tromey.com>
1052
1053 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1054 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1055 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1056 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1057 (s390x_emit_stack_adjust): Add casts to unsigned char.
1058
1059 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1060
1061 PR gdb/23374
1062 PR gdb/23375
1063 * server.h (struct client_state) <disable_randomization>:
1064 Initialize to 1.
1065
1066 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1067
1068 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1069 variable.
1070 (mips_supply_ptrace_register): Likewise.
1071
1072 2018-07-22 Tom Tromey <tom@tromey.com>
1073
1074 * configure: Rebuild.
1075
1076 2018-07-22 Tom Tromey <tom@tromey.com>
1077
1078 * win32-low.c (win32_create_inferior): Remove unused variables.
1079 * gdbreplay.c (remote_open): Remove unused variable.
1080 * remote-utils.c (remote_prepare): Remove unused variable.
1081 * x86-tdesc.h (X86_TDESC_H): Define.
1082 (amd64_expedite_regs): Define conditionally.
1083 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1084 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1085 * remote-utils.c (readchar): Remove unused variable.
1086
1087 2018-07-13 Pedro Alves <palves@redhat.com>
1088
1089 * linux-low.c (linux_kill): Change parameter to process_info
1090 pointer instead of pid. Adjust.
1091 * lynx-low.c (lynx_kill): Likewise.
1092 * nto-low.c (nto_kill): Likewise.
1093 * spu-low.c (spu_kill): Likewise.
1094 * win32-low.c (win32_kill): Likewise.
1095 * server.c (handle_v_kill, kill_inferior_callback)
1096 (detach_or_kill_for_exit): Adjust.
1097 * target.c (kill_inferior): Change parameter to process_info
1098 pointer instead of pid. Adjust.
1099 * target.h (struct target_ops) <kill>: Change parameter to
1100 process_info pointer instead of pid. Adjust all implementations
1101 and callers.
1102 (kill_inferior): Likewise.
1103
1104 2018-07-13 Pedro Alves <palves@redhat.com>
1105
1106 * linux-low.c (linux_detach, linux_join): Change parameter to
1107 process_info pointer instead of pid. Adjust.
1108 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1109 * nto-low.c (nto_detach): Likewise.
1110 * spu-low.c (spu_detach, spu_join): Likewise.
1111 * win32-low.c (win32_detach, win32_join): Likewise.
1112 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1113 * target.h (struct target_ops) <detach, join>: Change parameter to
1114 process_info pointer instead of pid. Adjust all implementations
1115 and callers.
1116 (detach_inferior, join_inferior): Rename 'pid' parameter to
1117 'proc'.
1118
1119 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1120 Jan Kratochvil <jan.kratochvil@redhat.com>
1121 Paul Fertser <fercerpav@gmail.com>
1122 Tsutomu Seki <sekiriki@gmail.com>
1123
1124 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1125 (OBS): Add 'common/netstuff.o'.
1126 (GDBREPLAY_OBS): Likewise.
1127 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1128 (remote_open): Implement support for IPv6
1129 connections.
1130 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1131 and 'wspiapi.h'.
1132 (handle_accept_event): Accept connections from IPv6 sources.
1133 (remote_prepare): Handle IPv6-style hostnames; implement
1134 support for IPv6 connections.
1135 (remote_open): Implement support for printing connections from
1136 IPv6 sources.
1137
1138 2018-07-11 Pedro Alves <palves@redhat.com>
1139
1140 PR gdb/23377
1141 * mem-break.c (any_persistent_commands): Add process_info
1142 parameter and use it instead of relying on the current process.
1143 Change return type to bool.
1144 * mem-break.h (any_persistent_commands): Add process_info
1145 parameter and change return type to bool.
1146 * server.c (handle_detach): Remove require_running_or_return call.
1147 Look up the process_info for the process we're about to detach.
1148 If not found, return back error to GDB. Adjust
1149 any_persistent_commands call to pass down a process pointer.
1150
1151 2018-07-11 Pedro Alves <palves@redhat.com>
1152
1153 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1154 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1155 instead of collect_register_by_name.
1156 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1157 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1158
1159 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1160 Pedro Alves <palves@redhat.com>
1161
1162 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1163
1164 2018-07-03 Tom Tromey <tom@tromey.com>
1165
1166 * linux-low.c: Update.
1167 * lynx-low.c: Update.
1168 * mem-break.c: Update.
1169 * nto-low.c: Update.
1170 * remote-utils.c: Update.
1171 * server.c: Update.
1172 * spu-low.c: Update.
1173 * target.c: Update.
1174 * win32-low.c: Update.
1175
1176 2018-07-03 Tom Tromey <tom@tromey.com>
1177
1178 * server.c: Update.
1179
1180 2018-07-03 Tom Tromey <tom@tromey.com>
1181
1182 * linux-low.c: Update.
1183
1184 2018-07-03 Tom Tromey <tom@tromey.com>
1185
1186 * target.c: Update.
1187
1188 2018-07-03 Tom Tromey <tom@tromey.com>
1189
1190 * linux-low.c: Update.
1191 * linux-mips-low.c: Update.
1192 * lynx-low.c: Update.
1193 * nto-low.c: Update.
1194 * remote-utils.c: Update.
1195 * server.c: Update.
1196 * spu-low.c: Update.
1197 * target.c: Update.
1198 * thread-db.c: Update.
1199
1200 2018-07-03 Tom Tromey <tom@tromey.com>
1201
1202 * linux-low.c: Update.
1203 * linux-mips-low.c: Update.
1204 * lynx-low.c: Update.
1205 * mem-break.c: Update.
1206 * nto-low.c: Update.
1207 * remote-utils.c: Update.
1208 * server.c: Update.
1209 * spu-low.c: Update.
1210 * target.c: Update.
1211 * tracepoint.c: Update.
1212
1213 2018-07-03 Tom Tromey <tom@tromey.com>
1214
1215 * linux-low.c: Update.
1216 * linux-ppc-low.c: Update.
1217 * linux-x86-low.c: Update.
1218 * proc-service.c: Update.
1219 * server.c: Update.
1220 * spu-low.c: Update.
1221 * thread-db.c: Update.
1222 * win32-low.c: Update.
1223
1224 2018-07-03 Tom Tromey <tom@tromey.com>
1225
1226 * linux-low.c: Update.
1227 * lynx-low.c: Update.
1228 * nto-low.c: Update.
1229 * remote-utils.c: Update.
1230 * spu-low.c: Update.
1231 * thread-db.c: Update.
1232 * win32-low.c: Update.
1233
1234 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1235
1236 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1237 parameter in call to 'amd64_create_target_description'.
1238
1239 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1240
1241 * x86-tdesc.h: Remove executable permission flag.
1242
1243 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1244
1245 * configure.ac: Remove AC_PREREQ, add missing quoting.
1246 * configure: Re-generate.
1247 * config.in: Re-generate.
1248 * aclocal.m4: Re-generate.
1249
1250 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1251
1252 * tracepoint.h (current_traceframe): Remove declaration.
1253
1254 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1255
1256 * linux-aarch64-low.c (is_sve_tdesc): New function.
1257 (aarch64_sve_regs_copy_to_regcache): Likewise.
1258 (aarch64_sve_regs_copy_from_regcache): Likewise.
1259 (aarch64_regs_info): Add SVE checks.
1260 (initialize_low_arch): Initialize SVE.
1261
1262 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1263
1264 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1265
1266 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1267
1268 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1269 (initialize_low_tracepoint): Likewise
1270 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1271 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1272 param.
1273 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1274 checks.
1275 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1276
1277 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1278
1279 * server.h (PBUFSIZ): Increase size
1280
1281 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1282
1283 * regcache.c (regcache::raw_compare): New function.
1284 * regcache.h (regcache::raw_compare): New declaration.
1285
1286 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1287
1288 * regcache.c (new_register_cache): Use new.
1289 (free_register_cache): Use delete.
1290 (register_data): Use const.
1291 (supply_register): Move body inside regcache.
1292 (regcache::raw_supply): New override function.
1293 (collect_register): Move body inside regcache.
1294 (regcache::raw_collect): New override function.
1295 (regcache::get_register_status): New override function.
1296 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1297
1298 2018-06-09 Tom Tromey <tom@tromey.com>
1299
1300 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1301 declare queue.
1302 (event_queue): Use std::queue.
1303 (gdb_event_xfree): Remove.
1304 (initialize_event_loop, process_event, wait_for_event): Update.
1305
1306 2018-06-08 Stan Cox <scox@redhat.com>
1307
1308 * win32-low.c (win32_create_inferior): last_ptid and last_status
1309 moved to client_state.
1310
1311 2018-06-08 Pedro Alves <palves@redhat.com>
1312
1313 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1314 common/common-exceptions.o, common/common-utils.o,
1315 common/errors.o, common/print-utils.o and utils.o.
1316 * gdbreplay.c: Include "common-defs.h" instead of the two
1317 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1318 string.h or alloca.h.
1319 (perror_with_name): Delete.
1320 (remote_open): Use xstrdup instead of strdup.
1321 (main): Rename to ...
1322 (captured_main): ... this.
1323 (main): New.
1324
1325 2018-06-08 Tom Tromey <tom@tromey.com>
1326
1327 * linux-low.c (linux_low_read_btrace): Update.
1328
1329 2018-06-04 Stan Cox <scox@redhat.com>
1330
1331 * server.h (struct client_state): New.
1332 * server.c (cont_thread, general_thread, multi_process)
1333 (report_fork_events, report_vfork_events, report_exec_events)
1334 (report_thread_events, swbreak_feature, hwbreak_feature)
1335 (vCont_supported, disable_randomization, pass_signals)
1336 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1337 Moved to client_state.
1338 * remote-utils.c (remote_debug, noack_mode)
1339 (transport_is_reliable): Moved to client_state.
1340 * tracepoint.c (current_traceframe): Moved to client_state.
1341
1342 Update all callers.
1343 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1344 linux-low.c, remote-utils.h, target.c: Use client_state.
1345
1346 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1347
1348 * configure.srv: Add new c/h file.
1349
1350 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1351
1352 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1353 null VQ.
1354
1355 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1356
1357 * gdb.arch/mips-fpregset-core.exp: New test.
1358 * gdb.arch/mips-fpregset-core.c: New test source.
1359
1360 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1361
1362 PR server/23198
1363 * hostio.c (require_int): Do not report overflow for integers
1364 between 0xfffffff and 0x7fffffff.
1365
1366 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1367
1368 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1369 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1370 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1371 functions.
1372 (the_low_target): Wire them.
1373
1374 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1375
1376 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1377 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1378 mode. Call collect_register_by_name with vscr using
1379 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1380 (ppc_store_vrregset): Add and set vscr_offset variable as in
1381 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1382 vscr_offset.
1383
1384 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1385
1386 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1387 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1388 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1389
1390 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1391
1392 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1393 (ppc_store_vsxregset): Likewise.
1394 (ppc_fill_vrregset): Likewise.
1395 (ppc_store_vrregset): Likewise.
1396 (ppc_fill_evrregset): Likewise.
1397 (ppc_store_evrregset): Likewise.
1398 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1399 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1400 needed.
1401
1402 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1403
1404 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1405 wordsize of the inferior. Call ppc_linux_target_wordsize.
1406
1407 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1408
1409 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1410 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1411 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1412 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1413 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1414 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1415 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1416 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1417 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1418 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1419 (tdesc_powerpc_e500l): Remove.
1420 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1421 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1422 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1423 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1424 linux-ppc-tdesc.h.
1425 (ppc_arch_setup): Remove target description matching code. Fill a
1426 ppc_linux_features struct and call ppc_linux_match_description
1427 with it.
1428
1429 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1430
1431 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1432 width of the requested register exceeds the width of the
1433 `ptrace' data type.
1434 (mips_cannot_store_register): Likewise.
1435
1436 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1437
1438 * linux-mips-low.c (mips_fetch_register): New function. Update
1439 preceding comment.
1440 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1441 (the_low_target): Wire `mips_fetch_register'.
1442
1443 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1444
1445 * lynx-i386-low.c (LYNXOS_178): New macro.
1446 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1447 the layout on LynxOS-178.
1448 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1449 handle floating point registers that are not supported by
1450 LynxOS-178.
1451
1452 2018-05-10 Tom Tromey <tom@tromey.com>
1453
1454 * configure: Rebuild.
1455
1456 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1457
1458 PR server/23158:
1459 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1460 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1461 Use it to set the expedite_regs field in the given tdesc.
1462 * x86-tdesc.h: New file.
1463 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1464 Adjust following the addition of the new expedite_regs parameter
1465 to init_target_desc.
1466 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1467 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1468 (i386_linux_read_description, amd64_linux_read_description):
1469 Adjust following the addition of the new expedite_regs parameter
1470 to init_target_desc.
1471 * lynx-i386-low.c: #include "x86-tdesc.h".
1472 (lynx_i386_arch_setup): Adjust following the addition of the new
1473 expedite_regs parameter to init_target_desc.
1474 * nto-x86-low.c: #include "x86-tdesc.h".
1475 (nto_x86_arch_setup): Adjust following the addition of the new
1476 expedite_regs parameter to init_target_desc.
1477 * win32-i386-low.c: #include "x86-tdesc.h".
1478 (i386_arch_setup): Adjust following the addition of the new
1479 expedite_regs parameter to init_target_desc.
1480
1481 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1482
1483 PR server/23158:
1484 * win32-low.c (win32_create_inferior): Add call to my_wait
1485 setting last_status global.
1486
1487 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1488
1489 PR server/23158:
1490 * win32-low.c (create_process): Only call gdb_tilde_expand if
1491 inferior_cwd is not NULL.
1492
1493 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1494
1495 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1496 registers to the cache if their values have changed.
1497 (i387_xsave_to_cache): Provide default values for x87 control
1498 registers when these features are available, but disabled.
1499 * regcache.c (supply_register_by_name_zeroed): New function.
1500 * regcache.h (supply_register_by_name_zeroed): Declare new
1501 function.
1502
1503 2018-05-07 Tom Tromey <tom@tromey.com>
1504
1505 * configure: Rebuild.
1506
1507 2018-05-04 Tom Tromey <tom@tromey.com>
1508
1509 * configure: Rebuild.
1510
1511 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1512 Pedro Alves <palves@redhat.com>
1513
1514 * linux-aarch64-low.c (aarch64_stopped_data_address):
1515 Likewise.
1516
1517 2018-04-27 Tom Tromey <tom@tromey.com>
1518
1519 * configure: Rebuild.
1520
1521 2018-04-23 Tom Tromey <tom@tromey.com>
1522
1523 * configure: Rebuild.
1524
1525 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * Makefile.in (depcomp): Add "..".
1528 (all_deps_files): New and use it.
1529
1530 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1531
1532 * configure.srv (aarch64*-*-linux*): Don't include xml.
1533 (i[34567]86-*-cygwin*): Likewise.
1534 (i[34567]86-*-linux*): Likewise.
1535 (i[34567]86-*-lynxos*): Likewise.
1536 (i[34567]86-*-mingw32ce*): Likewise.
1537 (i[34567]86-*-mingw*): Likewise.
1538 (i[34567]86-*-nto*): Likewise.
1539 (tic6x-*-uclinux): Likewise.
1540 (x86_64-*-linux*): Likewise.
1541 (x86_64-*-mingw*): Likewise.
1542 (x86_64-*-cygwin*): Likewise.
1543
1544 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1545
1546 * tdesc.c: Remove xml parameter.
1547
1548 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1549
1550 * server.c (get_features_xml): Remove cast.
1551 * tdesc.c (void target_desc::accept): Fill in function.
1552 (tdesc_get_features_xml): Remove old xml creation.
1553 (print_xml_feature::visit_pre): Add xml vistor.
1554 * tdesc.h (struct target_desc): Make xmltarget mutable.
1555 (tdesc_get_features_xml): Remove declaration.
1556
1557 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1558
1559 * tdesc.c (tdesc_architecture_name): Add new function.
1560 (tdesc_osabi_name): Likewise.
1561 (tdesc_get_features_xml): Use new functions.
1562
1563 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1564
1565 * tdesc.c (tdesc_create_flags): Remove.
1566 (tdesc_add_flag): Likewise.
1567 (tdesc_named_type): Likewise.
1568 (tdesc_create_union): Likewise.
1569 (tdesc_create_struct): Likewise.
1570 (tdesc_create_vector): Likewise.
1571 (tdesc_add_bitfield): Likewise.
1572 (tdesc_add_field): Likewise.
1573 (tdesc_set_struct_size): Likewise.
1574
1575 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1576
1577 * tdesc.c (~target_desc): Remove implictly deleted items.
1578 (init_target_desc): Iterate all features.
1579 (tdesc_get_features_xml): Use vector.
1580 (tdesc_create_feature): Create feature.
1581 * tdesc.h (tdesc_feature) Remove
1582 (target_desc): Add features.
1583
1584 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1585
1586 * Makefile.in: Add common/tdesc.c
1587 * tdesc.c (init_target_desc): init all reg_defs from register
1588 vector.
1589 (tdesc_create_reg): Create tdesc_reg.
1590 * tdesc.h (tdesc_feature): Add register vector.
1591
1592 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1593
1594 * tdesc.h (struct target_desc) <features>: Change type to
1595 std::vector<std::string>.
1596 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1597 changes.
1598 (tdesc_get_features_xml): Likewise.
1599 (tdesc_create_feature): Likewise.
1600
1601 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1602
1603 * regcache.c (find_register_by_number): Return a ref.
1604 (find_regno): Use references.
1605 (register_size): Likewise.
1606 (register_data): Likewise.
1607 * tdesc.c (target_desc::~target_desc): Remove free calls.
1608 (target_desc::operator==): Use std::vector compare.
1609 (init_target_desc): Use reference.
1610 (tdesc_create_reg): Use reg constructors.
1611 * tdesc.h (struct target_desc): Replace pointer with object.
1612
1613 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1614
1615 * regcache.c (find_register_by_number): Make static.
1616 (find_regno): Use find_register_by_number
1617 * regcache.h (struct reg): Remove declaration.
1618
1619 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1620
1621 * tdesc.c (target_desc::~target_desc): Move to here.
1622 (target_desc::operator==): Likewise.
1623 * tdesc.h (target_desc::~target_desc): Move from here.
1624 (target_desc::operator==): Likewise.
1625
1626 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1627
1628 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1629
1630 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1631
1632 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1633 S390_TDESC_GS.
1634 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1635 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1636 and init_registers_s390_gs_linux64.
1637
1638 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1639
1640 * linux-s390-low.c (s390_fill_gs): Remove function.
1641 (s390_fill_gsbc): Remove function.
1642 (s390_regsets): Set fill functions for the guarded storage regsets
1643 to NULL.
1644
1645 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1646
1647 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1648 the word size. Add comment.
1649 (s390_get_wordsize): New function.
1650 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1651 pswm with it. Instead, use s390_get_wordsize to determine the
1652 word size first and derive the correct tdesc from that directly.
1653
1654 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1655
1656 * Makefile.in: Include silent-rules.mk.
1657 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1658 (COMPILE): Add ECHO_CXX.
1659 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1660 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1661 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1662 (version-generated.c): Add ECHO_GEN.
1663 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1664 (IPAGENT_COMPILE): Add ECHO_CXX.
1665 (%-generated.c): Add ECHO_REGDAT.
1666
1667 2018-03-14 Tom Tromey <tom@tromey.com>
1668
1669 PR cli/14977:
1670 * ax.c (ax_printf): Special case for NULL.
1671
1672 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * linux-low.c (linux_qxfer_libraries_svr4): Use
1675 xml_escape_text_append.
1676
1677 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1680
1681 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1682
1683 * server.c (handle_general_set): Remove unnecessary xstrdup.
1684
1685 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1686
1687 * server.c (parse_debug_format_options): Adjust to
1688 delim_string_to_char_ptr_vec changes.
1689 * thread-db.c (thread_db_load_search): Adjust to
1690 dirnames_to_char_ptr_vec changes.
1691
1692 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1693
1694 * target.h (target_enable_btrace, target_disable_btrace)
1695 (target_read_btrace, target_read_btrace_conf): Turn macro into
1696 inline function. Throw error if target method is not defined.
1697 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1698 check for btrace target method. Be prepared to handle exceptions
1699 from btrace target methods.
1700
1701 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1702
1703 * server.c (captured_main): Change order of error message printed
1704 when the current working directory cannot be found.
1705
1706 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1707
1708 * server.c: Include "filenames.h" and "pathstuff.h".
1709 (program_name): Delete variable.
1710 (program_path): New anonymous class.
1711 (get_exec_wrapper): Use "program_path" instead of
1712 "program_name".
1713 (handle_v_run): Likewise.
1714 (captured_main): Likewise.
1715 (process_serial_event): Likewise.
1716
1717 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1718
1719 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1720 (OBJS): Add "pathstuff.o".
1721 * server.c (current_directory): New global variable.
1722 (captured_main): Initialize "current_directory".
1723
1724 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1725
1726 * tdesc.c: Use common/tdesc.h.
1727 * tdesc.h: Likewise.
1728
1729 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1730 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * Makefile.in: Switch order of make rules.
1733
1734 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1735
1736 * Makefile.in: Add common directory in build.
1737 * configure.ac: Add common reference.
1738 * configure: Regenerate.
1739
1740 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1741
1742 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1743 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1744 * spu-low.c (spu_target_ops): Likewise.
1745 * win32-low.c (win32_target_ops): Likewise.
1746 * server.c (supported_btrace_packets): Report packets unconditionally.
1747 * target.h (target_ops) <supports_btrace>: Remove.
1748 (target_supports_btrace): Remove.
1749
1750 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1751
1752 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1753 (handle_btrace_disable): Change return type to void. Use exceptions
1754 to report errors.
1755 (handle_btrace_general_set): Catch exception and copy message to
1756 return message.
1757
1758 2018-02-08 Tom Tromey <tom@tromey.com>
1759
1760 * linux-low.c (install_software_single_step_breakpoints): Use
1761 make_scoped_restore.
1762 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1763 (do_restore_current_thread_cleanup): Remove.
1764 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1765 declare.
1766
1767 2018-02-08 Tom Tromey <tom@tromey.com>
1768
1769 * mem-break.c (set_raw_breakpoint_at): Use
1770 gdb::unique_xmalloc_ptr.
1771
1772 2018-01-30 Pedro Alves <palves@redhat.com>
1773
1774 PR gdb/13211
1775 * target.c (target_terminal::terminal_state): Rename to ...
1776 (target_terminal::m_terminal_state): ... this.
1777
1778 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1779
1780 * linux-low.c (handle_extended_wait): Surround call to
1781 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1782
1783 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1784
1785 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1786 linux_ptrace_attach_fail_reason_string now returning an
1787 std::string.
1788 (linux_attach): Likewise.
1789 * thread-db.c (attach_thread): Likewise.
1790
1791 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1792
1793 PR gdb/21559
1794 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1795 checking for fs_base/gs_base fields in struct user_regs_struct.
1796 * configure: Regenerate.
1797
1798 2018-01-16 Yao Qi <yao.qi@linaro.org>
1799
1800 PR gdb/18749
1801 * linux-low.c (fetch_register): Call supply_register instead of
1802 error.
1803
1804 2018-01-08 Yao Qi <yao.qi@linaro.org>
1805 Simon Marchi <simon.marchi@ericsson.com>
1806
1807 * Makefile.in (OBS): Remove selftest.o.
1808 * configure.ac: Set srv_selftest_objs if $development is true.
1809 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1810 * configure: Re-generated.
1811 * server.c (captured_main): Wrap variable selftest_filter with
1812 GDB_SELF_TEST.
1813
1814 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * server.c (parse_debug_format_options): Return std::string.
1817 (handle_monitor_command, captured_main): Adjust.
1818
1819 2018-01-05 Pedro Alves <palves@redhat.com>
1820
1821 PR gdb/18653
1822 * server.c (captured_main): Pass quiet=false to
1823 save_original_signals_state.
1824
1825 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1826
1827 * gdbreplay.c (gdbreplay_version): Update copyright year in
1828 version message.
1829 * server.c (gdbserver_version): Likewise.
1830
1831 2017-12-08 Tom Tromey <tom@tromey.com>
1832
1833 * ax.c (ax_printf): Update.
1834
1835 2017-12-07 Yao Qi <yao.qi@linaro.org>
1836
1837 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1838 aarch64_linux_read_description.
1839 * linux-amd64-ipa.c (idx2mask): New array.
1840 (get_ipa_tdesc): Move idx2mask out.
1841 (initialize_low_tracepoint): Initialize target descriptions.
1842 * linux-i386-ipa.c (idx2mask): New array.
1843 (get_ipa_tdesc): Move idx2mask out.
1844 (initialize_low_tracepoint): Initialize target descriptions.
1845
1846 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1847
1848 * tdesc.c (struct tdesc_type): Change return type.
1849 (tdesc_add_flag): Change parameter type.
1850 (tdesc_add_bitfield): Likewise.
1851 (tdesc_add_field): Likewise.
1852 (tdesc_set_struct_size): Likewise.
1853
1854 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1855
1856 * regcache.c (registers_to_string): Remove unused variable.
1857
1858 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1859
1860 * inferiors.c (for_each_inferior_with_data): Remove.
1861 * inferiors.h (for_each_inferior_with_data): Remove.
1862 * server.c (handle_qxfer_threads_worker): Change parameter type.
1863 (handle_qxfer_threads_proper): Use for_each_thread.
1864
1865 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * inferiors.c (for_each_inferior): Remove.
1868 (clear_inferiors): Use for_each_thread.
1869 * inferiors.h (for_each_inferior): Remove.
1870 * linux-low.c (linux_wait_for_event_filtered): Use
1871 for_each_thread.
1872 (linux_stabilize_threads): Likewise.
1873 * regcache.c (regcache_release): Likewise.
1874 * server.c (gdb_wants_all_threads_stopped): Likewise.
1875 (clear_pending_status_callback): Remove.
1876 (handle_status): Use for_each_thread.
1877 (captured_main): Likewise.
1878 * win32-low.c (child_init_thread_list): Likewise.
1879 (win32_clear_inferiors): Likewise.
1880 (fake_breakpoint_event): Likewise.
1881
1882 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * inferiors.h (find_inferior): Remove.
1885 * inferiors.c (find_inferior): Remove.
1886
1887 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1888
1889 * linux-low.c (resume_status_pending_p): Update comment.
1890 (need_step_over_p): Update comment.
1891
1892 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1893
1894 * linux-low.c (proceed_one_lwp): Return void, change parameter
1895 type.
1896 (unsuspend_and_proceed_one_lwp): Likewise.
1897 (proceed_all_lwps): Use for_each_thread.
1898 (unstop_all_lwps): Likewise.
1899
1900 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1901
1902 * linux-low.c (linux_resume_one_thread): Return void, take
1903 parameter directly.
1904 (linux_resume): Use for_each_thread.
1905
1906 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * linux-low.c (send_sigstop_callback): Return void, change
1909 parameter type. Rename to...
1910 (send_sigstop): ... this.
1911 (suspend_and_send_sigstop_callback): Return void, change parameter
1912 type. Rename to...
1913 (suspend_and_send_sigstop): ... this.
1914 (stop_all_lwps): Use for_each_thread.
1915
1916 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1917
1918 * linux-low.c (lwp_running): Return bool, remove unused
1919 argument.
1920 (linux_stabilize_threads): Use find_thread.
1921
1922 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1923
1924 * linux-low.c (select_singlestep_lwp_callback): Remove.
1925 (count_events_callback): Remove.
1926 (select_event_lwp_callback): Remove.
1927 (select_event_lwp): Use find_thread/for_each_thread.
1928
1929 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1930
1931 * linux-low.c (not_stopped_callback): Return bool, take filter
1932 argument directly.
1933 (linux_wait_for_event_filtered): Use find_thread.
1934 (linux_wait_1): Likewise.
1935
1936 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 * linux-low.c (same_lwp): Remove.
1939 (find_lwp_pid): Use find_thread.
1940
1941 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1942
1943 * linux-low.c (delete_lwp_callback): Remove.
1944 (linux_mourn): Use for_each_thread.
1945
1946 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1949 args parameter, don't check for pid.
1950 (linux_detach): Use for_each_thread.
1951
1952 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1953
1954 * linux-low.c (struct counter): Remove.
1955 (second_thread_of_pid_p): Remove.
1956 (last_thread_of_process_p): Use find_thread.
1957
1958 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1959
1960 * inferiors.c (find_inferior_in_random): Remove.
1961 * inferiors.h (find_inferior_in_random): Remove.
1962 * linux-low.c (status_pending_p_callback): Return bool, accept
1963 parameter ptid directly.
1964 (linux_wait_for_event_filtered): Use find_thread_in_random.
1965 (linux_wait_1): Likewise.
1966
1967 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1968
1969 * inferiors.c (find_inferior_id): Remove.
1970 (find_thread_ptid): Move implemention from find_inferior_id to
1971 here.
1972 * inferiors.h (find_inferior_id): Remove.
1973 * server.c (handle_status): Use find_thread_ptid.
1974 (process_serial_event): Likewise.
1975 * thread-db.c (find_one_thread): Likewise.
1976 (thread_db_thread_handle): Likewise.
1977 * win32-low.c (thread_rec): Likewise.
1978 (child_delete_thread): Likewise.
1979 (win32_thread_alive): Likewise.
1980 (get_child_debug_event): Likewise.
1981
1982 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1983
1984 * linux-mips-low.c (update_watch_registers_callback): Return
1985 void, remove pid_p parameter, don't check for pid.
1986 (mips_insert_point, mips_remove_point): Use for_each_thread.
1987
1988 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1989
1990 * lynx.low (lynx_delete_thread_callback): Remove.
1991 (lynx_mourn): Use for_each_thread.
1992
1993 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1994
1995 * regcache.c (regcache_invalidate_one): Remove.
1996 (regcache_invalidate_pid): use for_each_thread.
1997
1998 2017-11-26 Tom Tromey <tom@tromey.com>
1999
2000 * linux-low.c (linux_create_inferior): Update.
2001
2002 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2003
2004 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2005
2006 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2007
2008 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2009 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2010 * linux-aarch64-tdesc-selftest.c: New file.
2011 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2012
2013 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2014
2015 * configure.srv: Add new file.
2016 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2017 * linux-aarch64-tdesc-selftest.c: New file.
2018 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2019
2020 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2021
2022 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2023 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2024 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2025
2026 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2027
2028 * configure.srv: Add new files.
2029 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2030 aarch64_linux_read_description.
2031 * linux-aarch64-low.c (aarch64_linux_read_description):
2032 Merge with aarch64_arch_setup.
2033 (aarch64_arch_setup): Call aarch64_linux_read_description.
2034 * linux-aarch64-tdesc.c: New file.
2035 * linux-aarch64-tdesc.h: New file.
2036
2037 2017-11-24 Yao Qi <yao.qi@linaro.org>
2038
2039 * configure.srv: Set $srv_regobj for tic6x-linux.
2040 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2041 (tic6x_read_description): Move some code to tic6x_arch_setup.
2042 (tic6x_tdesc_test): New function.
2043 (initialize_low_arch): Call selftests::register_test.
2044
2045 2017-11-22 Yao Qi <yao.qi@linaro.org>
2046
2047 * remote-utils.c (prepare_resume_reply): Use memcpy.
2048
2049 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2050
2051 * linux-low.c (kill_one_lwp_callback): Return void, take
2052 argument directly, don't filter on pid.
2053 (linux_kill): Use for_each_thread.
2054
2055 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * linux-low.c (need_step_over_p): Return bool, remove dummy
2058 argument.
2059 (linux_resume, proceed_all_lwps): Use find_thread.
2060
2061 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2062
2063 * linux-low.c (resume_status_pending_p): Return bool, remove
2064 flag_p argument.
2065 (linux_resume): Use find_thread.
2066
2067 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2068
2069 * linux-low.c (struct thread_resume_array): Remove.
2070 (linux_set_resume_request): Return void, take arguments
2071 directly.
2072 (linux_resume): Use for_each_thread.
2073
2074 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2075
2076 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2077 return bool, remove data argument.
2078 (linux_stabilize_threads): Use find_thread.
2079
2080 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * linux-low.c (unsuspend_one_lwp): Remove.
2083 (unsuspend_all_lwps): Use for_each_thread, inline code from
2084 unsuspend_one_lwp.
2085
2086 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2087
2088 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2089 * linux-low.c (struct iterate_over_lwps_args): Remove.
2090 (iterate_over_lwps_filter): Remove.
2091 (iterate_over_lwps): Use find_thread.
2092
2093 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2096 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2097 code from reset_lwp_ptrace_options_callback.
2098
2099 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2100
2101 * linux-arm-low.c (struct update_registers_data): Remove.
2102 (update_registers_callback): Return void, take arguments
2103 directly, don't check thread's pid.
2104 (arm_insert_point, arm_remove_point): Use for_each_thread.
2105
2106 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2107
2108 * win32-low.c (continue_one_thread): Return void, take argument
2109 directly.
2110 (child_continue): Use for_each_thread.
2111
2112 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2113
2114 * win32-i386-low.c (update_debug_registers_callback): Rename
2115 to ...
2116 (update_debug_registers): ... this, return void, remove pid_p arg.
2117 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2118
2119 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2120
2121 * inferiors.h (struct process_info): Add constructor, initialize
2122 fields..
2123 <syscalls_to_catch>: Change type to std::vector<int>.
2124 * inferiors.c (add_process): Allocate process_info with new.
2125 (remove_process): Free process_info with delete.
2126 * linux-low.c (handle_extended_wait): Adjust.
2127 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2128 * server.c (handle_general_set): Adjust.
2129
2130 2017-11-16 Pedro Alves <palves@redhat.com>
2131
2132 * remote-utils.c (remote_close): Block SIGIO signals instead of
2133 uninstalling the SIGIO handler.
2134
2135 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2136
2137 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2138
2139 2017-11-16 Yao Qi <yao.qi@linaro.org>
2140
2141 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2142 (tic6x_store_gregset): Likewise.
2143 (tic6x_usrregs_info): Move it up.
2144
2145 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2146
2147 * Makefile.in: Update arch rules.
2148 * configure.srv: Explicitly mark arch/ files.
2149
2150 2017-11-13 Andreas Schwab <schwab@suse.de>
2151
2152 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2153 function.
2154 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2155
2156 2017-11-06 Pedro Alves <palves@redhat.com>
2157
2158 * config.in, configure: Regenerate.
2159
2160 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2161
2162 * target.c (struct thread_search): Remove.
2163 (thread_search_callback): Remove.
2164 (prepare_to_access_memory): Use for_each_thread instead of
2165 find_inferior. Inline code from thread_search_callback.
2166
2167 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2168
2169 * server.c (struct visit_actioned_threads_data): Remove.
2170 (visit_actioned_threads): Change prototype to take arguments
2171 directly.
2172 (resume): Use find_thread instead of find_inferior.
2173
2174 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2175
2176 * server.c (queue_stop_reply_callback): Change prototype, return
2177 void.
2178 (find_status_pending_thread_callback): Remove.
2179 (handle_status): Replace find_inferior with find_thread and
2180 for_each_thread.
2181
2182 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2183
2184 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2185 with REGNO.
2186 (aarch64_store_gregset): Likewise.
2187 (aarch64_fill_fpregset): Likewise.
2188 (aarch64_store_fpregset): Likewise.
2189
2190 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2191
2192 * gdbthread.h (find_thread, for_each_thread): New functions.
2193 * inferiors.c (thread_of_pid): Remove.
2194 (find_any_thread_of_pid): Use find_thread.
2195 * linux-low.c (num_lwps): Use for_each_thread.
2196
2197 2017-10-17 Yao Qi <yao.qi@linaro.org>
2198
2199 * Makefile.in: Remove one rule.
2200 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2201
2202 2017-10-17 Yao Qi <yao.qi@linaro.org>
2203
2204 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2205 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2206
2207 2017-10-17 Yao Qi <yao.qi@linaro.org>
2208
2209 * configure.srv: Rename arm.o with arch/arm.o.
2210
2211 2017-10-17 Yao Qi <yao.qi@linaro.org>
2212
2213 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2214 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2215 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2216 (arch-i386.o, arch-amd64.o): Remove rules.
2217 (arch/%.o): New rule.
2218 Update POSTCOMPILE and COMPILE.pre.
2219 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2220 * configure: Re-generated.
2221 * configure.srv: Replace arch-i386.o with arch/i386.o.
2222 Replace arch-amd64.o with arch/amd64.o.
2223
2224 2017-10-16 Yao Qi <yao.qi@linaro.org>
2225
2226 * configure: Regenerated.
2227
2228 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2229
2230 * inferiors.h: (struct inferior_list): Remove.
2231 (struct inferior_list_entry); Remove.
2232 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2233 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2234 get_first_inferior): Remove.
2235 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2236 find_inferior_id, find_inferior_in_random): Change signature.
2237 * inferiors.c (all_threads): Change type to
2238 std::list<thread_info *>.
2239 (get_thread): Remove macro.
2240 (find_inferior, find_inferior_id): Change signature, implement
2241 using find_thread.
2242 (find_inferior_in_random): Change signature, implement using
2243 find_thread_in_random.
2244 (for_each_inferior, for_each_inferior_with_data): Change
2245 signature, implement using for_each_thread.
2246 (add_inferior_to_list, remove_inferior): Remove.
2247 (add_thread, get_first_thread, thread_of_pid,
2248 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2249 (get_first_inferior, one_inferior_p, clear_inferior_list):
2250 Remove.
2251 (clear_inferiors, get_thread_process): Update.
2252 * gdbthread.h: Include <list>.
2253 (struct thread_info) <entry>: Remove field.
2254 <id>: New field.
2255 (all_threads): Change type to std::list<thread_info *>.
2256 (get_first_inferior): Add doc.
2257 (find_thread, for_each_thread, find_thread_in_random): New
2258 functions.
2259 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2260 * linux-arm-low.c (update_registers_callback): Update.
2261 * linux-low.c (second_thread_of_pid_p): Update.
2262 (kill_one_lwp_callback, linux_detach_lwp_callback,
2263 delete_lwp_callback, status_pending_p_callback, same_lwp,
2264 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2265 iterate_over_lwps, not_stopped_callback,
2266 resume_stopped_resumed_lwps, count_events_callback,
2267 select_singlestep_lwp_callback, select_event_lwp_callback,
2268 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2269 suspend_and_send_sigstop_callback, wait_for_sigstop,
2270 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2271 lwp_running, linux_set_resume_request, resume_status_pending_p,
2272 need_step_over_p, start_step_over, linux_resume_one_thread,
2273 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2274 reset_lwp_ptrace_options_callback): Update.
2275 * linux-mips-low.c (update_watch_registers_callback): Update.
2276 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2277 Update.
2278 (free_register_cache_thread_one): Remove.
2279 (regcache_release): Update.
2280 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2281 handle_qxfer_threads_worker): Update.
2282 (handle_query): Update, use list iterator.
2283 (visit_actioned_threads, handle_pending_status,
2284 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2285 clear_pending_status_callback, set_pending_status_callback,
2286 find_status_pending_thread_callback, handle_status,
2287 process_serial_event): Update.
2288 * target.c (thread_search_callback): Update.
2289 * thread-db.c (thread_db_get_tls_address): Update.
2290 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2291 Update.
2292 * win32-i386-low.c (update_debug_registers_callback): Update.
2293 * win32-low.c (delete_thread_info, child_delete_thread,
2294 continue_one_thread, suspend_one_thread,
2295 get_child_debug_event): Adjust.
2296
2297 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2300 * inferiors.h: Include <list>.
2301 (struct process_info) <entry>: Remove field.
2302 <pid>: New field.
2303 (pid_of): Change macro to function.
2304 (ptid_of, lwpid_of): Remove macro.
2305 (all_processes): Change type to std::list<process_info *>.
2306 (ALL_PROCESSES): Remove macro.
2307 (for_each_process, find_process): New function.
2308 * inferiors.c (all_processes): Change type to
2309 std::list<process_info *>.
2310 (find_thread_process): Adjust.
2311 (add_process): Likewise.
2312 (remove_process): Likewise.
2313 (find_process_pid): Likewise.
2314 (get_first_process): Likewise.
2315 (started_inferior_callback): Remove.
2316 (have_started_inferiors_p): Adjust.
2317 (attached_inferior_callback): Remove.
2318 (have_attached_inferiors_p): Adjust.
2319 * linux-low.c (check_zombie_leaders): Likewise.
2320 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2321 (x86_linux_update_xmltarget): Adjust.
2322 * server.c (handle_query): Likewise.
2323 (gdb_reattached_process): Remove.
2324 (handle_status): Adjust.
2325 (kill_inferior_callback): Likewise.
2326 (detach_or_kill_inferior): Remove.
2327 (print_started_pid): Likewise.
2328 (print_attached_pid): Likewise.
2329 (detach_or_kill_for_exit): Update.
2330 (process_serial_event): Likewise.
2331 * linux-arm-low.c (arm_new_fork): Likewise.
2332
2333 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2334
2335 * dll.h: Include <list>.
2336 (struct dll_info): Add constructor.
2337 <entry>: Remove field.
2338 (all_dlls): Change type to std::list<dll_info>.
2339 * dll.c: Include <algorithm>.
2340 (get_dll): Remove macro.
2341 (all_dlls): Change type to std::list<dll_info *>.
2342 (free_one_dll): Remove.
2343 (match_dll): Likewise.
2344 (loaded_dll): Adjust.
2345 (unloaded_dll): Adjust to all_dlls type change, use
2346 std::find_if. Inline code from match_dll.
2347 (clear_dlls): Adjust to all_dlls type change.
2348 * server.c (emit_dll_description): Remove.
2349 (handle_qxfer_libraries): Adjust to all_dlls type change,
2350 integrate emit_dll_description's functionality.
2351
2352 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2353
2354 * linux-low.h (struct linux_target_ops) <delete_process>: New
2355 field.
2356 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2357 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2358 (struct linux_target_ops): Add delete_process callback.
2359 * linux-arm-low.c (arm_delete_process): New.
2360 (struct linux_target_ops): Add delete_process callback.
2361 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2362 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2363 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2364 * linux-mips-low.c (mips_linux_delete_process): New.
2365 (struct linux_target_ops): Add delete_process callback.
2366 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2367 * linux-s390-low.c (struct linux_target_ops): Likewise.
2368 * linux-sh-low.c (struct linux_target_ops): Likewise.
2369 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2370 * linux-tile-low.c (struct linux_target_ops): Likewise.
2371 * linux-x86-low.c (x86_linux_delete_process): New.
2372 (struct linux_target_ops): Add delete_process callback.
2373 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2374
2375 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2376
2377 * linux-aarch64-low.c (the_low_target): Add thread delete
2378 callback.
2379 * linux-arm-low.c (arm_delete_thread): New function.
2380 (the_low_target): Add thread delete callback.
2381 * linux-bfin-low.c (the_low_target): Likewise.
2382 * linux-crisv32-low.c (the_low_target): Likewise.
2383 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2384 set.
2385 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2386 field.
2387 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2388 * linux-mips-low.c (mips_linux_delete_thread): New function.
2389 (the_low_target): Add thread delete callback.
2390 * linux-ppc-low.c (the_low_target): Likewise.
2391 * linux-s390-low.c (the_low_target): Likewise.
2392 * linux-sh-low.c (the_low_target): Likewise.
2393 * linux-tic6x-low.c (the_low_target): Likewise.
2394 * linux-tile-low.c (the_low_target): Likewise.
2395 * linux-x86-low.c (the_low_target): Likewise.
2396 * linux-xtensa-low.c (the_low_target): Likewise.
2397
2398 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2399
2400 * win32-low.c: Include "common-inferior.h".
2401
2402 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2403
2404 * inferiors.c (set_inferior_cwd): New function.
2405 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2406 (handle_query): Inform that QSetWorkingDir is supported.
2407 * win32-low.c (create_process): Pass the inferior's cwd to
2408 CreateProcess.
2409
2410 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2411
2412 * inferiors.c (current_inferior_cwd): New global variable.
2413 (get_inferior_cwd): New function.
2414 * inferiors.h (struct process_info) <cwd>: New field.
2415
2416 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2417
2418 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2419 (OBS): Add gdb_tilde_expand.o.
2420
2421 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2424 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2425
2426 2017-09-29 Pedro Alves <palves@redhat.com>
2427
2428 * ax.c (gdb_parse_agent_expr): Constify.
2429 * ax.h (gdb_parse_agent_expr): Constify.
2430 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2431 Constify.
2432 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2433 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2434 * remote-utils.h (read_ptid): Constify.
2435 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2436 (process_point_options, process_serial_event): Constify.
2437 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2438 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2439 (cmd_qtbuffer): Constify.
2440
2441 2017-09-29 Pedro Alves <palves@redhat.com>
2442
2443 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2444 fails.
2445
2446 2017-09-29 Pedro Alves <palves@redhat.com>
2447
2448 * linux-low.c (handle_extended_wait): Pass parent thread instead
2449 of process to thread_db_notice_clone.
2450 * linux-low.h (thread_db_notice_clone): Replace parent process
2451 parameter with parent thread parameter.
2452 * thread-db.c (find_one_thread): Add comment.
2453 (thread_db_notice_clone): Replace parent process parameter with
2454 parent thread parameter. Temporarily switch to the parent thread.
2455
2456 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2457
2458 * gdbthread.h: Include "common-gdbthread.h".
2459 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2460 "if" when validating the ptid.
2461 * remote-utils.c: Include "gdbthread.h".
2462 (prepare_resume_reply): Use "switch_to_thread".
2463 * target.c (done_accessing_memory): Likewise.
2464
2465 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2466
2467 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2468 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2469 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2470 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2471 s390x-gs-linux64-ipa.o to ipa_obj.
2472 * linux-s390-low.c (HWCAP_S390_GS): New define.
2473 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2474 New functions.
2475 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2476 (s390_arch_setup): Check for guarded-storage support and choose
2477 appropriate tdesc.
2478 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2479 init_registers_s390x_gs_linux64.
2480 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2481 enum value.
2482 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2483 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2484
2485 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2486
2487 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2488
2489 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2490
2491 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2492 (thread_db_thread_handle): Declare.
2493 * linux-low.c (linux_target_ops): Initialize thread_handle.
2494 * server.c (handle_qxfer_threads_worker): Add support for
2495 "handle" attribute.
2496 * target.h (struct target_ops): Add new function pointer,
2497 thread_handle.
2498 (target_thread_handle): Define.
2499 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2500 field in lwp.
2501 (thread_db_thread_handle): New function.
2502
2503 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2504
2505 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2506 * linux-low.h (thread_db_notice_clone): Declare.
2507 * thread-db.c (thread_db_notice_clone): New function.
2508
2509 2017-09-21 Pedro Alves <palves@redhat.com>
2510
2511 * server.c (gdb_read_memory, handle_status, process_serial_event)
2512 (handle_serial_event, handle_target_event): Adjust to
2513 set_desired_thread prototype change.
2514 * target.c (set_desired_thread): Remove 'use_general' parameter
2515 and adjust.
2516 * target.h (set_desired_thread): Remove 'use_general' parameter.
2517
2518 2017-09-20 Tom Tromey <tom@tromey.com>
2519
2520 * target.c (target_terminal::terminal_state): Define.
2521 (target_terminal::init): Rename from target_terminal_init.
2522 (target_terminal::inferior): Rename from
2523 target_terminal_inferior.
2524 (target_terminal::ours): Rename from target_terminal_ours.
2525 (target_terminal::ours_for_output, target_terminal::info): New.
2526
2527 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2528
2529 * server.c (accumulate_file_name_length): Remove.
2530 (emit_dll_description): Adjust to std::string change.
2531 (handle_qxfer_libraries): Use std::string to hold document.
2532
2533 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2534
2535 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2536 return type of xml_escape_text.
2537 * server.c (emit_dll_description): Likewise.
2538
2539 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2540
2541 * server.c (captured_main): Accept argument for --selftest.
2542 Update run_tests call.
2543 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2544 when registering selftests.
2545
2546 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2547
2548 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2549 instead of "VEC" for "target_desc.reg_defs".
2550 (regcache_cpy): Likewise.
2551 (registers_to_string): Likewise.
2552 (registers_from_string): Likewise.
2553 (find_regno): Likewise.
2554 (supply_regblock): Likewise.
2555 (regcache_raw_read_unsigned): Likewise.
2556 * tdesc.c (init_target_desc): Likewise.
2557 (tdesc_create_reg): Likewise.
2558 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2559 (struct target_desc) <reg_defs>: Convert to "std::vector".
2560 (target_desc): Do not initialize "reg_defs".
2561 (~target_desc): Update code to use "std::vector" instead of "VEC"
2562 for "target_desc.reg_defs".
2563 (operator==): Likewise.
2564
2565 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2566
2567 * inferiors.h (thread_to_gdb_id): Remove.
2568 * inferiors.c (thread_to_gdb_id): Remove.
2569 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2570 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2571 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2572 Likewise.
2573 * nto-low.c (nto_fetch_registers, nto_store_registers,
2574 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2575
2576 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2577
2578 * inferiors.h (gdb_id_to_thread_id): Remove.
2579 * inferiors.c (gdb_id_to_thread_id): Remove.
2580 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2581 removal. Move pid declaration closer to where it's used.
2582
2583 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * server.c (handle_detach): New function.
2586 (process_serial_event): Move code out, call handle_detach.
2587
2588 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2589
2590 * server.c (require_running): Rename to ...
2591 (require_running_or_return): ... this ...
2592 (require_running_or_break): ... and this.
2593 (handle_query, process_serial_event): Adjust.
2594
2595 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 * linux-low.c (linux_set_resume_request): Remove unused
2598 variables.
2599
2600 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2601
2602 * server.c (first_thread_of): Remove.
2603 (process_serial_event): Replace usage of first_thread_of with
2604 find_any_thread_of_pid.
2605 * tracepoint.c (same_process_p): Remove.
2606 (gdb_agent_about_to_close): Replace usage of same_process_p with
2607 find_any_thread_of_pid.
2608 * linux-x86-low.c (same_process_callback): Remove.
2609 (x86_arch_setup_process_callback): Replace usage of
2610 same_process_callback with find_any_thread_of_pid.
2611 * thread-db.c (any_thread_of): Remove.
2612 (switch_to_process): Replace usage of any_thread_of with
2613 find_any_thread_of_pid.
2614 * inferiors.c (thread_pid_matches_callback): Remove.
2615 (find_thread_process): Adjust to use find_any_thread_of_pid.
2616
2617 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2618
2619 * regcache.c (get_thread_regcache): Guard calls to "memset"
2620 with "!VEC_empty".
2621
2622 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2623
2624 * linux-low.c (handle_extended_wait): Use
2625 "allocate_target_description" instead of "XNEW".
2626 * linux-x86-low.c (initialize_low_arch): Likewise.
2627
2628 2017-09-05 Yao Qi <yao.qi@linaro.org>
2629
2630 * configure.srv (srv_i386_regobj): Remove.
2631 (srv_amd64_regobj): Remove.
2632 (srv_regobj): Set it to "" for x86 non-linux targets.
2633 * linux-x86-tdesc.c (i386_linux_read_description):
2634 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2635 (init_registers_i386): Remove the declaration.
2636 (tdesc_i386): Remove the declaration.
2637 (lynx_i386_arch_setup): Call i386_create_target_description.
2638 * nto-x86-low.c: Likewise.
2639 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2640 [!__x86_64__]: include arch/i386.h.
2641 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2642
2643 2017-09-05 Yao Qi <yao.qi@linaro.org>
2644
2645 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2646 i386/amd64-XXX-linux from it.
2647
2648 2017-09-05 Yao Qi <yao.qi@linaro.org>
2649
2650 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2651 false.
2652 (ipa_amd64_linux_regobj): Remove.
2653 (ipa_x32_linux_regobj): Remove.
2654
2655 2017-09-05 Yao Qi <yao.qi@linaro.org>
2656
2657 * Makefile.in (arch-amd64.o): New rule.
2658 * configure.srv: Append arch-amd64.o.
2659 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2660 (get_ipa_tdesc): Call amd64_linux_read_description.
2661 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2662 and init_registers_amd64_XXX.
2663 * linux-x86-low.c (x86_linux_read_description): Call
2664 amd64_linux_read_description.
2665 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2666 (initialize_low_arch): Don't call init_registers_x32_XXX and
2667 init_registers_amd64_XXX.
2668 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2669 and tdesc_amd64_XXX.
2670 [__x86_64__] (amd64_tdesc_test): New function.
2671 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2672 and init_registers_amd64_XXX.
2673 * linux-x86-tdesc.c: Include arch/amd64.h.
2674 (xcr0_to_tdesc_idx): New function.
2675 (i386_linux_read_description): New function.
2676 (amd64_get_ipa_tdesc_idx): New function.
2677 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2678 (amd64_get_ipa_tdesc): Declare.
2679
2680 2017-09-05 Yao Qi <yao.qi@linaro.org>
2681
2682 * configure.srv (srv_i386_linux_xmlfiles): Remove
2683 i386/i386-XXX-linux.xml from it.
2684
2685 2017-09-05 Yao Qi <yao.qi@linaro.org>
2686
2687 * configure.srv: Set srv_i386_linux_regobj empty if $development
2688 is false.
2689 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2690 initialize_low_tdesc.
2691 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2692 with #if initialize_low_tdesc.
2693 * linux-x86-tdesc-selftest.c: New file.
2694 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2695
2696 2017-09-05 Yao Qi <yao.qi@linaro.org>
2697
2698 * Makefile.in (arch-i386.o): New rule.
2699 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2700 (x86_64-*-linux*): Likewise.
2701 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2702 include arch/i386.h.
2703 (i386_linux_read_description): Remove code and call
2704 i386_create_target_description.
2705 * tdesc.c (allocate_target_description): New function.
2706 * tdesc.h (set_tdesc_architecture): Remove declaration.
2707 (set_tdesc_osabi): Likewise.
2708
2709 2017-09-05 Yao Qi <yao.qi@linaro.org>
2710
2711 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2712 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2713 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2714 .xmltarget.
2715 * server.c (get_features_xml): Call tdesc_get_features_xml.
2716 * tdesc.c (set_tdesc_architecture): New function.
2717 (set_tdesc_osabi): New function.
2718 (tdesc_get_features_xml): New function.
2719 (tdesc_create_feature): Add an argument.
2720 * tdesc.h (struct target_desc) <features>: New field.
2721 <arch, osabi>: New field.
2722 (~target_desc): xfree features, arch, and osabi.
2723 (target_desc::oerator==): Don't compare .xmltarget.
2724 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2725 (set_tdesc_osabi): Likewise.
2726 (tdesc_get_features_xml): Likewise.
2727
2728 2017-09-05 Yao Qi <yao.qi@linaro.org>
2729
2730 * linux-x86-tdesc.c: Include selftest.h.
2731 (i386_tdesc_test): New function.
2732 (initialize_low_tdesc): Call selftests::register_test.
2733 * tdesc.h: Include regdef.h.
2734 (target_desc): Override operator == and !=.
2735
2736 2017-09-05 Yao Qi <yao.qi@linaro.org>
2737
2738 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2739 (ipa_obj): Likewise.
2740 * linux-i386-ipa.c: Include common/x86-xstate.h
2741 (get_ipa_tdesc): Call i386_linux_read_description.
2742 (initialize_low_tracepoint): Don't call init_registers_XXX
2743 functions, call initialize_low_tdesc instead.
2744 * linux-x86-low.c (x86_linux_read_description): Call
2745 i386_linux_read_description.
2746 (initialize_low_arch): Don't call init_registers_i386_XXX
2747 functions, call initialize_low_tdesc.
2748 * linux-x86-tdesc.c: New file.
2749 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2750 (i386_get_ipa_tdesc_idx): Declare.
2751 (i386_get_ipa_tdesc): Declare.
2752 (initialize_low_tdesc): Declare.
2753
2754 2017-09-05 Yao Qi <yao.qi@linaro.org>
2755
2756 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2757 instead of 0.
2758
2759 2017-09-05 Yao Qi <yao.qi@linaro.org>
2760
2761 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2762 * regcache.c (get_thread_regcache): Use VEC_length.
2763 (init_register_cache): Likewise.
2764 (regcache_cpy): Likewise.
2765 (registers_to_string): Iterate reg_defs via VEC_iterate.
2766 (find_regno): Likewise.
2767 (find_register_by_number): Use VEC_index.
2768 (register_size): Call find_register_by_number.
2769 (register_data): Call find_register_by_number.
2770 (supply_regblock): Use VEC_length.
2771 (regcache_raw_read_unsigned): Likewise.
2772 * tdesc.c (init_target_desc): Iterate reg_defs via
2773 VEC_iterate.
2774 (default_description): Update initializer.
2775 (copy_target_description): Don't update field num_registers.
2776 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2777 <num_registers>: Remove.
2778
2779 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2780
2781 * Makefile.in (.SECONDARY): Define target.
2782
2783 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2784
2785 * linux-low.c (linux_wait_1): Adjust.
2786 * server.c (queue_stop_reply_callback): Adjust.
2787
2788 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2789
2790 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2791 QEnvironmentUnset and QEnvironmentReset packets.
2792 (handle_query): Inform remote that QEnvironmentHexEncoded,
2793 QEnvironmentUnset and QEnvironmentReset are supported.
2794
2795 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * inferiors.h (inferior_target_data): Rename to ...
2798 (thread_target_data): ... this.
2799 (inferior_regcache_data): Rename to ...
2800 (thread_regcache_data): ... this.
2801 (set_inferior_regcache_data): Rename to ...
2802 (set_thread_regcache_data): ... this.
2803 * inferiors.c (inferior_target_data): Rename to ...
2804 (thread_target_data): ... this.
2805 (inferior_regcache_data): Rename to ...
2806 (thread_regcache_data): ... this.
2807 (set_inferior_regcache_data): Rename to ...
2808 (set_thread_regcache_data): ... this.
2809 (free_one_thread): Update.
2810 * linux-low.h (get_thread_lwp): Update.
2811 * regcache.c (get_thread_regcache): Update.
2812 (regcache_invalidate_thread): Update.
2813 (free_register_cache_thread): Update.
2814 * win32-i386-low.c (update_debug_registers_callback): Update.
2815 (win32_get_current_dr): Update.
2816 * win32-low.c (thread_rec): Update.
2817 (delete_thread_info): Update.
2818 (continue_one_thread): Update.
2819 (suspend_one_thread): Update.
2820
2821 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2822
2823 * inferiors.c (set_inferior_target_data): Remove.
2824 * inferiors.h (set_inferior_target_data): Remove.
2825
2826 2017-08-18 Yao Qi <yao.qi@linaro.org>
2827
2828 * Makefile.in (OBS): Add selftest.o.
2829 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2830 * configure, config.in: Re-generated.
2831 * server.c: Include common/sefltest.h.
2832 (captured_main): Handle option --selftest.
2833
2834 2017-08-09 Yao Qi <yao.qi@linaro.org>
2835
2836 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2837 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2838 i386-avx-mpx.o and i386-mmx.o.
2839 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2840 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2841 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2842 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2843 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2844 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2845 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2846 i386/amd64-avx-mpx.xml.
2847
2848 2017-08-09 Yao Qi <yao.qi@linaro.org>
2849
2850 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2851 and x32-avx-avx512.o.
2852 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2853 i386/x32-avx-avx512.xml.
2854
2855 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2856
2857 * tracepoint.h (enum class fast_tpoint_collect_result): New
2858 enumeration.
2859 (fast_tracepoint_collecting): Change return type to
2860 fast_tpoint_collect_result.
2861 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2862 * linux-low.h: Include tracepoint.h.
2863 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2864 fast_tpoint_collect_result.
2865 * linux-low.c (handle_tracepoints): Adjust.
2866 (linux_fast_tracepoint_collecting): Change return type to
2867 fast_tpoint_collect_result.
2868 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2869 linux_wait_1, stuck_in_jump_pad_callback,
2870 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2871 proceed_one_lwp): Adjust to type change.
2872
2873 2017-07-10 Yao Qi <yao.qi@linaro.org>
2874
2875 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2876
2877 2017-06-29 Yao Qi <yao.qi@linaro.org>
2878
2879 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2880 Remove.
2881 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2882
2883 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2884
2885 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2886
2887 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2888
2889 * linux-low.c (linux_create_inferior): Adjust code to access the
2890 environment information via 'gdb_environ' class.
2891 * lynx-low.c (lynx_create_inferior): Likewise.
2892 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2893 (get_environ): Return a pointer to 'our_environ'.
2894 (captured_main): Initialize 'our_environ'.
2895 * server.h (get_environ): Adjust prototype.
2896 * spu-low.c (spu_create_inferior): Adjust code to access the
2897 environment information via 'gdb_environ' class.
2898
2899 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2900
2901 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2902 usage of "register" keyword.
2903
2904 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2905
2906 * configure: Re-generate.
2907
2908 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2909
2910 * configure: Re-generate.
2911
2912 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2913
2914 * Makefile.in (COMPILE.pre): Add "-x c++".
2915
2916 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2917
2918 * fork-child.c: Conditionally include <signal.h>.
2919
2920 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2921
2922 * server.c (handle_general_set): Handle new packet
2923 "QStartupWithShell".
2924 (handle_query): Add "QStartupWithShell" to the list of supported
2925 packets.
2926 (gdbserver_usage): Add help text explaining the
2927 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2928 options.
2929 (captured_main): Recognize and act upon the presence of the new
2930 CLI options.
2931
2932 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2933 Pedro Alves <palves@redhat.com>
2934
2935 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2936 * configure: Regenerate.
2937 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2938 "fork-inferior.o".
2939 (i[34567]86-*-lynxos*): Likewise.
2940 (spu*-*-*): Likewise.
2941 * fork-child.c: New file.
2942 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2943 and "environ.h".
2944 (linux_ptrace_fun): New function.
2945 (linux_create_inferior): Adjust function prototype to reflect
2946 change on "target.h". Adjust function code to use
2947 "fork_inferior".
2948 (linux_request_interrupt): Delete "signal_pid".
2949 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2950 (lynx_ptrace_fun): New function.
2951 (lynx_create_inferior): Adjust function prototype to reflect
2952 change on "target.h". Adjust function code to use
2953 "fork_inferior".
2954 * nto-low.c (nto_create_inferior): Adjust function prototype and
2955 code to reflect change on "target.h". Update comments.
2956 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2957 "common-terminal.h" and "environ.h".
2958 (terminal_fd): Moved to fork-child.c.
2959 (old_foreground_pgrp): Likewise.
2960 (restore_old_foreground_pgrp): Likewise.
2961 (last_status): Make it global.
2962 (last_ptid): Likewise.
2963 (our_environ): New variable.
2964 (startup_with_shell): Likewise.
2965 (program_name): Likewise.
2966 (program_argv): Rename to...
2967 (program_args): ...this.
2968 (wrapper_argv): New variable.
2969 (start_inferior): Delete function.
2970 (get_exec_wrapper): New function.
2971 (get_exec_file): Likewise.
2972 (get_environ): Likewise.
2973 (prefork_hook): Likewise.
2974 (post_fork_inferior): Likewise.
2975 (postfork_hook): Likewise.
2976 (postfork_child_hook): Likewise.
2977 (handle_v_run): Update code to deal with arguments coming from the
2978 remote host. Update calls from "start_inferior" to
2979 "create_inferior".
2980 (captured_main): Likewise. Initialize environment variable. Call
2981 "have_job_control".
2982 * server.h (post_fork_inferior): New prototype.
2983 (get_environ): Likewise.
2984 (last_status): Declare.
2985 (last_ptid): Likewise.
2986 (signal_pid): Likewise.
2987 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2988 (spu_ptrace_fun): New function.
2989 (spu_create_inferior): Adjust function prototype to reflect change
2990 on "target.h". Adjust function code to use "fork_inferior".
2991 * target.c (target_terminal_init): New function.
2992 (target_terminal_inferior): Likewise.
2993 (target_terminal_ours): Likewise.
2994 * target.h: Include <vector>.
2995 (struct target_ops) <create_inferior>: Update prototype.
2996 (create_inferior): Update macro.
2997 * utils.c (gdb_flush_out_err): New function.
2998 * win32-low.c (win32_create_inferior): Adjust function prototype
2999 and code to reflect change on "target.h".
3000
3001 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3002
3003 * inferiors.c (switch_to_thread): New function.
3004
3005 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3006
3007 * Makefile.in (SFILE): Add "common/job-control.c".
3008 (OBS): Add "job-control.o".
3009
3010 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3011
3012 * Makefile: Remove "@host_makefile_frag@".
3013
3014 2017-05-05 Pedro Alves <palves@redhat.com>
3015
3016 * configure: Regenerate.
3017
3018 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3019
3020 * configure: Regenerate.
3021
3022 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3023
3024 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3025 software_single_step change of return type to
3026 std::vector<CORE_ADDR>.
3027 * linux-low.c (install_software_single_step_breakpoints):
3028 Likewise.
3029 * linux-low.h (install_software_single_step_breakpoints):
3030 Likewise.
3031
3032 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3033
3034 * remote-utils.c: Include "gdb_termios.h" instead of
3035 "terminal.h".
3036 * terminal.h: Delete file.
3037
3038 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3039
3040 * server.c: Include <vector>.
3041 <program_argv, wrapper_argv>: Convert to std::vector.
3042 (start_inferior): Rewrite function to use C++.
3043 (handle_v_run): Likewise. Update code that calculates the argv
3044 based on the vRun packet; use C++.
3045 (captured_main): Likewise.
3046
3047 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3048
3049 * server.c (handle_v_cont): Initialize thread_resume::thread
3050 with null_ptid.
3051
3052 2017-04-05 Pedro Alves <palves@redhat.com>
3053
3054 * configure: Regenerate.
3055
3056 2017-04-05 Pedro Alves <palves@redhat.com>
3057
3058 * gdbreplay.c (sync_error): Constify.
3059 * linux-x86-low.c (push_opcode): Constify.
3060
3061 2017-04-05 Pedro Alves <palves@redhat.com>
3062
3063 * win32-low.c (get_child_debug_event)
3064 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3065 Report TARGET_WAITKIND_SPURIOUS instead.
3066
3067 2017-04-05 Pedro Alves <palves@redhat.com>
3068
3069 * remote-utils.c (remote_prepare, remote_open): Constify.
3070 * remote-utils.h (remote_prepare, remote_open): Constify.
3071 * server.c (captured_main): Constify 'port' handling.
3072
3073 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3074
3075 * Makefile.in (clean): Clear .deps.
3076
3077 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * .gitignore: Remove generated files, replace with wildcard.
3080 * (clean): Replace removal of generated files with wildcard.
3081 (version.c): Replace with...
3082 (version-generated.c): ...this.
3083 (xml-builtin.c): Replace with...
3084 (xml-builtin-generated.c): ...this.
3085 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3086 (%.c: *regformats*): Replace with...
3087 (%-generated.c: *regformats*): ...this.
3088
3089 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3090
3091 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3092 (xtensa_fill_gregset): Call collect_register_by_name for
3093 threadptr register.
3094 (xtensa_store_gregset): Call supply_register_by_name for
3095 threadptr register.
3096
3097 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3098
3099 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3100 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3101 (xtensa_store_gregset): Call supply_register for all registers in
3102 a0_regnum..a0_regnum + C0_NREGS range.
3103
3104 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3105
3106 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3107 (ax-ipa.o: ax.c): Remove.
3108 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3109 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3110 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3111 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3112 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3113
3114 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3115
3116 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3117 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3118 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3119 (errors-ipa.o: ../common/errors.c): Remove.
3120 (format-ipa.o: ../common/format.c): Remove.
3121 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3122
3123 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3124
3125 * Makefile.in (%-ipa.o: %.c): New rule.
3126 (tracepoint-ipa.o: tracepoint.c): Remove.
3127 (utils-ipa.o: utils.c): Remove.
3128 (remote-utils-ipa.o: remote-utils.c): Remove.
3129 (regcache-ipa.o: regcache.c): Remove.
3130 (i386-linux-ipa.o: i386-linux.c): Remove.
3131 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3132 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3133 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3134 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3135 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3136 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3137 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3138 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3139 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3140 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3141 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3142 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3143 (aarch64-ipa.o: aarch64.c): Remove.
3144 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3145 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3146 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3147 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3148 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3149 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3150 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3151 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3152 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3153 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3154 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3155 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3156 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3157 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3158 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3159 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3160 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3161 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3162 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3163 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3164 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3165 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3166 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3167 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3168 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3169 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3170 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3171 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3172 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3173 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3174 (tdesc-ipa.o: tdesc.c): Remove.
3175 (x32-linux-ipa.o: x32-linux.c): Remove.
3176 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3177 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3178
3179 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3180
3181 * Makefile.in (%.o: ../arch/%.c): New rule.
3182 (arm.o: ../arch/arm.c): Remove.
3183 (arm-linux.o: ../arch/arm-linux.c): Remove.
3184 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3185 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3186
3187 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3188
3189 * Makefile.in (%.o: ../nat/%.c): New rule.
3190 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3191 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3192 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3193 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3194 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3195 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3196 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3197 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3198 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3199 (linux-personality.o: ../nat/linux-personality.c): Remove.
3200 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3201 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3202 (x86-linux.o: ../nat/x86-linux.c): Remove.
3203 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3204 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3205
3206 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3207
3208 * Makefile.in (%.o: ../common/%.c): New rule.
3209 (signals.o: ../common/signals.c): Remove.
3210 (print-utils.o: ../common/print-utils.c): Remove.
3211 (rsp-low.o: ../common/rsp-low.c): Remove.
3212 (common-utils.o: ../common/common-utils.c): Remove.
3213 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3214 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3215 (vec.o: ../common/vec.c): Remove.
3216 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3217 (xml-utils.o: ../common/xml-utils.c): Remove.
3218 (ptid.o: ../common/ptid.c): Remove.
3219 (buffer.o: ../common/buffer.c): Remove.
3220 (format.o: ../common/format.c): Remove.
3221 (filestuff.o: ../common/filestuff.c): Remove.
3222 (agent.o: ../common/agent.c): Remove.
3223 (errors.o: ../common/errors.c): Remove.
3224 (environ.o: ../common/environ.c): Remove.
3225 (common-debug.o: ../common/common-debug.c): Remove.
3226 (cleanups.o: ../common/cleanups.c): Remove.
3227 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3228 (fileio.o: ../common/fileio.c): Remove.
3229 (common-regcache.o: ../common/common-regcache.c): Remove.
3230 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3231 (new-op.o: ../common/new-op.c): Remove.
3232 (btrace-common.o: ../common/btrace-common.c): Remove.
3233
3234 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3235
3236 * Makefile.in (%.o: ../target/%.c): New rule.
3237 (waitstatus.o: ../target/waitstatus.c): Remove.
3238
3239 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * Makefile.in
3242 (%.c: ../regformats/%.dat,
3243 (%.c: ../regformats/arm/%.dat,
3244 (%.c: ../regformats/i386/%.dat,
3245 (%.c: ../regformats/rs6000/%.dat): New rules.
3246 (aarch64.c): Remove.
3247 (reg-arm.c): Remove.
3248 (arm-with-iwmmxt.c): Remove.
3249 (arm-with-vfpv2.c): Remove.
3250 (arm-with-vfpv3.c): Remove.
3251 (arm-with-neon.c): Remove.
3252 (reg-bfin.c): Remove.
3253 (reg-cris.c): Remove.
3254 (reg-crisv32.c): Remove.
3255 (i386.c): Remove.
3256 (i386-linux.c): Remove.
3257 (i386-avx.c): Remove.
3258 (i386-avx-linux.c): Remove.
3259 (i386-avx-avx512.c): Remove.
3260 (i386-avx-avx512-linux.c): Remove.
3261 (i386-mpx.c): Remove.
3262 (i386-mpx-linux.c): Remove.
3263 (i386-avx-mpx-avx512-pku.c): Remove.
3264 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3265 (i386-avx-mpx.c): Remove.
3266 (i386-avx-mpx-linux.c): Remove.
3267 (i386-mmx.c): Remove.
3268 (i386-mmx-linux.c): Remove.
3269 (reg-ia64.c): Remove.
3270 (reg-m32r.c): Remove.
3271 (reg-m68k.c): Remove.
3272 (reg-cf.c): Remove.
3273 (mips-linux.c): Remove.
3274 (mips-dsp-linux.c): Remove.
3275 (mips64-linux.c): Remove.
3276 (mips64-dsp-linux.c): Remove.
3277 (nios2-linux.c): Remove.
3278 (powerpc-32.c): Remove.
3279 (powerpc-32l.c): Remove.
3280 (powerpc-altivec32l.c): Remove.
3281 (powerpc-cell32l.c): Remove.
3282 (powerpc-vsx32l.c): Remove.
3283 (powerpc-isa205-32l.c): Remove.
3284 (powerpc-isa205-altivec32l.c): Remove.
3285 (powerpc-isa205-vsx32l.c): Remove.
3286 (powerpc-e500l.c): Remove.
3287 (powerpc-64l.c): Remove.
3288 (powerpc-altivec64l.c): Remove.
3289 (powerpc-cell64l.c): Remove.
3290 (powerpc-vsx64l.c): Remove.
3291 (powerpc-isa205-64l.c): Remove.
3292 (powerpc-isa205-altivec64l.c): Remove.
3293 (powerpc-isa205-vsx64l.c): Remove.
3294 (s390-linux32.c): Remove.
3295 (s390-linux32v1.c): Remove.
3296 (s390-linux32v2.c): Remove.
3297 (s390-linux64.c): Remove.
3298 (s390-linux64v1.c): Remove.
3299 (s390-linux64v2.c): Remove.
3300 (s390-te-linux64.c): Remove.
3301 (s390-vx-linux64.c): Remove.
3302 (s390-tevx-linux64.c): Remove.
3303 (s390x-linux64.c): Remove.
3304 (s390x-linux64v1.c): Remove.
3305 (s390x-linux64v2.c): Remove.
3306 (s390x-te-linux64.c): Remove.
3307 (s390x-vx-linux64.c): Remove.
3308 (s390x-tevx-linux64.c): Remove.
3309 (tic6x-c64xp-linux.c): Remove.
3310 (tic6x-c64x-linux.c): Remove.
3311 (tic6x-c62x-linux.c): Remove.
3312 (reg-sh.c): Remove.
3313 (reg-sparc64.c): Remove.
3314 (reg-spu.c): Remove.
3315 (amd64.c): Remove.
3316 (amd64-linux.c): Remove.
3317 (amd64-avx.c): Remove.
3318 (amd64-avx-linux.c): Remove.
3319 (amd64-avx-avx512.c): Remove.
3320 (amd64-avx-avx512-linux.c): Remove.
3321 (amd64-mpx.c): Remove.
3322 (amd64-mpx-linux.c): Remove.
3323 (amd64-avx-mpx-avx512-pku.c): Remove.
3324 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3325 (amd64-avx-mpx.c): Remove.
3326 (amd64-avx-mpx-linux.c): Remove.
3327 (x32.c): Remove.
3328 (x32-linux.c): Remove.
3329 (x32-avx.c): Remove.
3330 (x32-avx-linux.c): Remove.
3331 (x32-avx-avx512.c): Remove.
3332 (x32-avx-avx512-linux.c): Remove.
3333 (reg-xtensa.c): Remove.
3334 (reg-tilegx.c): Remove.
3335 (reg-tilegx32.c): Remove.
3336
3337 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3338
3339 * Makefile.in (SFILES): Add "common/environ.c".
3340 (OBJS): Add "common/environ.h".
3341
3342 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3343
3344 * configure.ac: Check if the fs_base and gs_base members of
3345 `struct user_regs_struct' exist.
3346 * config.in: Regenerated.
3347 * configure: Likewise.
3348
3349 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3350
3351 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3352 target_read_memory.
3353 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3354 (get_next_pcs_syscall_next_pc): Likewise.
3355
3356 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3357
3358 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3359 * nto-x86-low.c: Likewise.
3360
3361 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3362
3363 * Makefile.in: Include disable-implicit-rules.mk.
3364
3365 2016-11-23 Pedro Alves <palves@redhat.com>
3366
3367 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3368 (debug_vprintf): Use std::chrono::steady_clock instead of
3369 gettimeofday. Use '.' instead of ':'.
3370 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3371 (get_timestamp): Use std::chrono::steady_clock instead of
3372 gettimeofday.
3373
3374 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3375
3376 * Makefile.in: Fix whitespace formatting.
3377
3378 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3379
3380 * Makefile.in (SFILES, OBS): Flatten list and order
3381 alphabetically.
3382
3383 2016-11-23 Pedro Alves <palves@redhat.com>
3384
3385 * event-loop.c (handle_file_event): Use warning.
3386 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3387 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3388 Use warning.
3389
3390 2016-11-23 Pedro Alves <palves@redhat.com>
3391
3392 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3393 output.
3394 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3395 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3396 debug_printf and debug_flush for debug output.
3397 * server.c (handle_general_set): Likewise.
3398 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3399 output.
3400
3401 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3402
3403 * Makefile.in (.c.o): Replace rule with ...
3404 (%.o: %.c): ... this one.
3405
3406 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3409 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3410 make.
3411 * configure.ac: Remove checks for the make program.
3412 * configure: Re-generate.
3413
3414 2016-10-28 Pedro Alves <palves@redhat.com>
3415
3416 * Makefile.in (CXX_DIALECT): Get from configure.
3417 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3418 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3419 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3420 * config.in: Regenerate.
3421 * configure: Regenerate.
3422
3423 2016-10-27 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-low.c (linux_supports_range_stepping): Return true if
3426 can_software_single_step return true.
3427
3428 2016-10-27 Yao Qi <yao.qi@linaro.org>
3429
3430 * inferiors.c (find_inferior_in_random): New function.
3431 * inferiors.h (find_inferior_in_random): Declare.
3432 * linux-low.c (linux_wait_for_event_filtered): Call
3433 find_inferior_in_random instead of find_inferior.
3434
3435 2016-10-27 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-low.c (linux_wait_1): If single-step breakpoints are
3438 inserted, remove them.
3439
3440 2016-10-26 Pedro Alves <palves@redhat.com>
3441
3442 * linux-low.c (handle_extended_wait): Link parent/child fork
3443 threads.
3444 (linux_wait_1): Unlink them.
3445 (linux_set_resume_request): Ignore resume requests for
3446 already-resumed and unhandled fork child threads.
3447 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3448 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3449 New functions.
3450 (handle_v_requests) <vCont>: Don't call require_running.
3451 * server.h (in_queued_stop_replies): New declaration.
3452
3453 2016-10-24 Yao Qi <yao.qi@linaro.org>
3454
3455 PR server/20733
3456 * linux-aarch64-low.c (append_insns): Cast the return value to
3457 'uint32_t *'.
3458
3459 2016-10-10 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3462
3463 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3464
3465 * target.c (target_supports_multi_process): New function, moved
3466 from...
3467 * target.h (target_supports_multi_process): ... here. Remove
3468 macro.
3469
3470 2016-10-05 Tom Tromey <tom@tromey.com>
3471
3472 PR remote/20655:
3473 * tracepoint.c (handle_tracepoint_bkpts): Check
3474 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3475
3476 2016-10-05 Yao Qi <yao.qi@linaro.org>
3477
3478 * configure.srv: Update the path of arm-*.xml files.
3479
3480 2016-10-05 Terry Guo <terry.guo@arm.com>
3481 Yao Qi <yao.qi@linaro.org>
3482
3483 * Makefile.in: Adjust the path of rules.
3484 * configure.srv: Update the path of xml files.
3485 * regformats/arm-with-iwmmxt.dat: Regenerated.
3486 * regformats/arm-with-neon.dat: Likewise.
3487 * regformats/arm-with-vfpv2.dat: Likewise.
3488 * regformats/arm-with-vfpv3.dat Likewise.
3489
3490 2016-09-30 Yao Qi <yao.qi@linaro.org>
3491
3492 PR gdbserver/20627
3493 * target.c (target_stop_and_wait): Don't call
3494 target_continue_no_signal, use resume_stop instead.
3495
3496 2016-09-26 Yao Qi <yao.qi@linaro.org>
3497
3498 * linux-low.c (linux_wait_1): Call debug_exit.
3499
3500 2016-09-23 Pedro Alves <palves@redhat.com>
3501
3502 * Makefile.in (SFILES): Add common/new-op.c.
3503 (OBS): Add common/new-op.o.
3504 (new-op.o): New rule.
3505
3506 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3507
3508 * .gitinore: Ignore more files.
3509
3510 2016-09-21 Yao Qi <yao.qi@linaro.org>
3511
3512 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3513 23.
3514
3515 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3516
3517 * server.c (start_inferior): Call target_mourn_inferior instead of
3518 mourn_inferior; pass ptid_t argument to it.
3519 (resume): Likewise.
3520 (handle_target_event): Likewise.
3521 * target.c (target_mourn_inferior): New function.
3522 * target.h (mourn_inferior): Delete macro.
3523
3524 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3525
3526 * linux-low.c (lwp_is_stepping): New function.
3527
3528 2016-09-06 Carl Love <cel@us.ibm.com>
3529
3530 * server.c (start_inferior): Fixed comment, requested comment change
3531 didn't get updated correctly. Removed reference to ptrace () call as
3532 it is only true on Linux systems.
3533
3534 2016-09-06 Carl Love <cel@us.ibm.com>
3535
3536 * server.c (start_inferior): Do not call
3537 function target_post_create_inferior () if the
3538 inferior process has already exited.
3539
3540 2016-09-05 Pedro Alves <palves@redhat.com>
3541
3542 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3543 (COMPILE.pre, CC_LD): Use CXX directly.
3544 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3545 * acinclude.m4: Don't include build-with-cxx.m4.
3546 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3547 * configure: Regenerate.
3548
3549 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3550
3551 PR gdb/19495
3552 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3553 call writing data to own_buf.
3554
3555 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3556
3557 * target.c (mywait): Call target_wait instead of
3558 the_target->wait.
3559 (target_wait): New function.
3560
3561 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3562
3563 * server.c (start_inferior): New variable 'ptid'. Replace calls
3564 to the_target->resume by target_continue{,_no_signal}, depending
3565 on the case.
3566 * target.c (target_stop_and_wait): Call target_continue_no_signal
3567 instead of the_target->resume.
3568 (target_continue): New function.
3569
3570 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3571
3572 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3573
3574 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3575
3576 PR server/20491
3577 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3578 ps_prochandle.
3579 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3580 * linux-arm-low.c (ps_get_thread_area): Likewise.
3581 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3582 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3583 * linux-mips-low.c (ps_get_thread_area): Likewise.
3584 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3585 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3586 * linux-x86-low.c (ps_get_thread_area): Likewise.
3587 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3588
3589 2016-08-19 Pedro Alves <palves@redhat.com>
3590
3591 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3592
3593 2016-08-19 Pedro Alves <palves@redhat.com>
3594
3595 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3596 comment. Use memcpy instead of casting through unsigned long.
3597
3598 2016-08-19 Pedro Alves <palves@redhat.com>
3599
3600 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3601 allocating around 0x80000000.
3602
3603 2016-08-19 Pedro Alves <palves@redhat.com>
3604
3605 PR gdb/20415
3606 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3607 (x32-avx512-linux-ipa.o): New rules.
3608 * configure.ac (x86_64-*-linux*): New x32 check.
3609 * configure.srv (ipa_x32_linux_regobj): New.
3610 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3611 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3612 descriptions.
3613 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3614 descriptions.
3615 * configure: Regenerate.
3616
3617 2016-08-09 Pedro Alves <palves@redhat.com>
3618
3619 PR gdb/18653
3620 * Makefile.in (OBS): Add signals-state-save-restore.o.
3621 (signals-state-save-restore.o): New rule.
3622 * config.in: Regenerate.
3623 * configure: Regenerate.
3624 * linux-low.c: Include "signals-state-save-restore.h".
3625 (linux_create_inferior): Call
3626 restore_original_signals_state.
3627 * server.c: Include "dispositions-save-restore.h".
3628 (captured_main): Call save_original_signals_state.
3629
3630 2016-08-05 Pedro Alves <palves@redhat.com>
3631
3632 * configure: Regenerate.
3633
3634 2016-08-04 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-low.c (regsets_fetch_inferior_registers): Check
3637 errno is ESRCH or not.
3638
3639 2016-08-02 Yao Qi <yao.qi@linaro.org>
3640
3641 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3642 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3643 (thread_db_load_search): Update.
3644 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3645 td_ta_set_event and td_ta_event_getmsg.
3646
3647 2016-07-26 Pedro Alves <palves@redhat.com>
3648
3649 PR server/20414
3650 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3651 of unsigned long for 64-bit registers and use uint32_t instead of
3652 unsigned int for 32-bit registers.
3653
3654 2016-07-26 Pedro Alves <palves@redhat.com>
3655
3656 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3657 to 'ptrace'.
3658
3659 2016-07-21 Tom Tromey <tom@tromey.com>
3660
3661 * configure: Rebuild.
3662
3663 2016-07-21 Yao Qi <yao.qi@linaro.org>
3664
3665 * mem-break.c (find_gdb_breakpoint): Cast bp to
3666 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3667
3668 2016-07-21 Yao Qi <yao.qi@linaro.org>
3669
3670 * server.c (handle_v_requests): Support s and S actions
3671 if target_supports_software_single_step return true.
3672
3673 2016-07-21 Yao Qi <yao.qi@linaro.org>
3674
3675 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3676 is resume_step, call maybe_hw_step.
3677 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3678 and unstop them.
3679 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3680 breakpoints or not.
3681 (proceed_one_lwp): If resume request is resume_step, install
3682 reinsert breakpoints and call maybe_hw_step.
3683
3684 2016-07-21 Yao Qi <yao.qi@linaro.org>
3685
3686 * linux-low.c (proceed_one_lwp): Declare.
3687 (linux_resume_one_thread): Remove local variable 'step'.
3688 Lift code enqueue signal. Call proceed_one_lwp instead of
3689 linux_resume_one_lwp.
3690
3691 2016-07-21 Yao Qi <yao.qi@linaro.org>
3692
3693 * linux-low.c (linux_resume_one_thread): Call
3694 enqueue_pending_signal.
3695
3696 2016-07-21 Yao Qi <yao.qi@linaro.org>
3697
3698 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3699 * inferiors.c (do_restore_current_thread_cleanup): New function.
3700 (make_cleanup_restore_current_thread): Likewise.
3701 * linux-low.c (install_software_single_step_breakpoints): Call
3702 make_cleanup_restore_current_thread. Switch current_thread to
3703 thread.
3704
3705 2016-07-21 Yao Qi <yao.qi@linaro.org>
3706
3707 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3708 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3709 (clone_one_breakpoint): Likewise.
3710 (delete_reinsert_breakpoints): Change parameter to thread.
3711 Callers updated.
3712 (has_reinsert_breakpoints): Likewise.
3713 (uninsert_reinsert_breakpoints): Likewise.
3714 (reinsert_reinsert_breakpoints): Likewise.
3715 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3716 (delete_reinsert_breakpoints): Likewise.
3717 (reinsert_reinsert_breakpoints): Likewise.
3718 (uninsert_reinsert_breakpoints): Likewise.
3719 (has_reinsert_breakpoints): Likewise.
3720
3721 2016-07-21 Yao Qi <yao.qi@linaro.org>
3722
3723 * inferiors.c (get_thread_process): Make parameter const.
3724 * inferiors.h (get_thread_process): Update declaration.
3725 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3726 Add new parameters child_thread and parent_thread. Callers
3727 updated.
3728 * mem-break.h (clone_all_breakpoints): Update declaration.
3729
3730 2016-07-21 Yao Qi <yao.qi@linaro.org>
3731
3732 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3733 <command_list, handler>: Remove.
3734 (struct gdb_breakpoint): New.
3735 (struct other_breakpoint): New.
3736 (struct reinsert_breakpoint): New.
3737 (is_gdb_breakpoint): New function.
3738 (any_persistent_commands): Update command_list if
3739 is_gdb_breakpoint returns true.
3740 (set_breakpoint): Create breakpoints according to their types.
3741 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3742 (set_gdb_breakpoint_1): Likewise.
3743 (set_gdb_breakpoint): Likewise.
3744 (clear_breakpoint_conditions): Change parameter type to
3745 'struct gdb_breakpoint *'.
3746 (clear_breakpoint_commands): Likewise.
3747 (clear_breakpoint_conditions_and_commands): Likewise.
3748 (add_condition_to_breakpoint): Likewise.
3749 (add_breakpoint_condition): Likewise.
3750 (add_commands_to_breakpoint): Likewise.
3751 (check_breakpoints): Check other_breakpoint.
3752 (clone_one_breakpoint): Clone breakpopint according to its type.
3753 * mem-break.h (struct gdb_breakpoint): Declare.
3754 (set_gdb_breakpoint): Update declaration.
3755 (clear_breakpoint_conditions_and_commands): Likewise.
3756 (add_breakpoint_condition): Likewise.
3757 (add_breakpoint_commands): Likewise.
3758 * server.c (process_point_options): Change parameter type to
3759 'struct gdb_breakpoint *'.
3760
3761 2016-07-21 Yao Qi <yao.qi@linaro.org>
3762
3763 * mem-break.c (set_breakpoint_at): Rename it to ...
3764 (set_breakpoint_type_at): ... it.
3765 (set_breakpoint_at): Call set_breakpoint_type_at.
3766 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3767 * mem-break.h (set_breakpoint_at): Update comments.
3768
3769 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3770
3771 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3772 to buf parameter.
3773 (nios2_store_gregset): Likewise.
3774
3775 2016-07-01 Pedro Alves <palves@redhat.com>
3776 Antoine Tremblay <antoine.tremblay@ericsson.com>
3777
3778 * linux-low.c: Change interface to take the target lwp_info
3779 pointer directly and return void. Handle detaching from a zombie
3780 thread.
3781 (linux_detach_lwp_callback): New function.
3782 (linux_detach): Detach from the leader thread after detaching from
3783 the clone threads.
3784
3785 2016-06-28 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3788 for variable new_offset.
3789 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3790 (aarch64_ftrace_insn_reloc_cb): Likewise.
3791 (aarch64_ftrace_insn_reloc_tb): Likewise.
3792 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3793 PRIx64 instead of PRIx32.
3794
3795 2016-06-28 Yao Qi <yao.qi@linaro.org>
3796
3797 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3798 (the_low_target): Install arm_get_syscall_trapinfo.
3799
3800 2016-06-28 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3803 function.
3804 (the_low_target): Install aarch64_get_syscall_trapinfo.
3805
3806 2016-06-28 Yao Qi <yao.qi@linaro.org>
3807
3808 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3809 Callers updated.
3810 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3811 Remove parameter sysno.
3812 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3813 sysret.
3814
3815 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3816
3817 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3818 (s390_emit_ne_goto): Likewise.
3819 (s390_emit_lt_goto): Likewise.
3820 (s390_emit_le_goto): Likewise.
3821 (s390_emit_gt_goto): Likewise.
3822 (s390_emit_ge_goto): Likewise.
3823 (s390x_emit_eq_goto): Likewise.
3824 (s390x_emit_ne_goto): Likewise.
3825 (s390x_emit_lt_goto): Likewise.
3826 (s390x_emit_le_goto): Likewise.
3827 (s390x_emit_gt_goto): Likewise.
3828 (s390x_emit_ge_goto): Likewise.
3829 (s390_emit_ops_impl): Mark variable static.
3830 (s390x_emit_ops): Likewise.
3831
3832 2016-06-17 Yao Qi <yao.qi@linaro.org>
3833
3834 * linux-low.c (handle_extended_wait): Call
3835 uninsert_reinsert_breakpoints for the parent process. Remove
3836 reinsert breakpoints from the child process. Reinsert them to
3837 the parent process when vfork is done.
3838 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3839 (reinsert_reinsert_breakpoints): New function.
3840 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3841 (reinsert_reinsert_breakpoints): Declare.
3842
3843 2016-06-17 Yao Qi <yao.qi@linaro.org>
3844
3845 * linux-low.c (handle_extended_wait): If the parent is doing
3846 step-over, remove the reinsert breakpoints from the forked child.
3847
3848 2016-06-17 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-low.c (unsuspend_all_lwps): Declare.
3851 (linux_low_filter_event): If thread exited, call finish_step_over.
3852 If step-over is finished, unsuspend other threads.
3853
3854 2016-06-17 Yao Qi <yao.qi@linaro.org>
3855
3856 * linux-low.c (linux_resume_one_lwp_throw): Assert
3857 has_reinsert_breakpoints returns false.
3858 * mem-break.c (delete_disabled_breakpoints): Assert
3859 bp type isn't reinsert_breakpoint.
3860
3861 2016-06-17 Yao Qi <yao.qi@linaro.org>
3862
3863 * linux-low.c (maybe_hw_step): New function.
3864 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3865 (finish_step_over): Switch current_thread to lwp temporarily,
3866 and assert has_reinsert_breakpoints returns true.
3867 (proceed_one_lwp): Call maybe_hw_step.
3868 * mem-break.c (has_reinsert_breakpoints): New function.
3869 * mem-break.h (has_reinsert_breakpoints): Declare.
3870
3871 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3872
3873 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3874
3875 2016-05-17 Yao Qi <yao.qi@linaro.org>
3876
3877 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3878 instead of find_inferior.
3879
3880 2016-05-05 Yao Qi <yao.qi@linaro.org>
3881
3882 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3883 Initialize res to zero.
3884
3885 2016-05-05 Yao Qi <yao.qi@linaro.org>
3886
3887 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3888 to uint32_t.
3889
3890 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3891
3892 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3893 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3894 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3895
3896 2016-04-28 Par Olsson <par.olsson@windriver.com>
3897 Simon Marchi <simon.marchi@ericsson.com>
3898
3899 * tracepoint.c (write_inferior_int8): New function.
3900 (cmd_qtenable_disable): Write enable flag using
3901 write_inferior_int8.
3902
3903 2016-04-25 Yao Qi <yao.qi@linaro.org>
3904
3905 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3906 (need_step_over_p): Return zero if the LWP has pending signals
3907 can be delivered on software single step target.
3908
3909 2016-04-25 Yao Qi <yao.qi@linaro.org>
3910
3911 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3912 return instead of error.
3913
3914 2016-04-22 Yao Qi <yao.qi@linaro.org>
3915
3916 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3917 to 23.
3918
3919 2016-04-22 Yao Qi <yao.qi@linaro.org>
3920
3921 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3922 signal when stepping over breakpoint with software single
3923 step.
3924
3925 2016-04-21 Pedro Alves <palves@redhat.com>
3926
3927 * linux-s390-low.c (s390_collect_ptrace_register)
3928 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3929 add casts.
3930 (s390_check_regset): Use void * instead of gdb_byte *.
3931
3932 2016-04-20 Pedro Alves <palves@redhat.com>
3933
3934 * configure: Renegerate.
3935
3936 2016-04-20 Yao Qi <yao.qi@linaro.org>
3937
3938 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3939 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3940 number 16.
3941 (arm_store_gregset): Likewise.
3942
3943 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3944
3945 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3946 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3947 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3948 (amd64-avx-mpx-linux.c): New rules.
3949 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3950 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3951 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3952 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3953 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3954 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3955 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3956 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3957 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3958 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3959 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3960 * linux-x86-low.c (x86_linux_read_description): Add case for
3961 X86_XSTATE_AVX_MPX_MASK.
3962 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3963 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3964 init_registers_i386_avx_mpx_linux.
3965 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3966 (initialize_low_tracepoint): Call
3967 init_registers_i386_avx_mpx_linux.
3968 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3969 (initialize_low_tracepoint): Call
3970 init_registers_amd64_avx_mpx_linux.
3971 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3972 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3973 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3974 declarations.
3975
3976 2016-04-18 Pedro Alves <palves@redhat.com>
3977
3978 * configure: Regenerate.
3979
3980 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3981
3982 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3983 (aarch64_emit_sub): Likewise.
3984
3985 2016-04-12 Pedro Alves <palves@redhat.com>
3986
3987 * utils.c (prepare_to_throw_exception): Delete.
3988
3989 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3990
3991 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3992
3993 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3994
3995 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3996
3997 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3998
3999 * linux-aarch64-ipa.c: Add <elf.h> include.
4000 * linux-ppc-ipa.c: Add <elf.h> include.
4001 * linux-s390-ipa.c: Add <elf.h> include.
4002
4003 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4004
4005 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4006 (get_raw_reg_ptr): Likewise.
4007 (get_trace_state_variable_value_ptr): Likewise.
4008 (set_trace_state_variable_value_ptr): Likewise.
4009 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4010 char *.
4011
4012 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4013 Marcin Kościelnicki <koriakin@0x04.net>
4014
4015 PR/17221
4016 * linux-ppc-low.c (emit_insns): New function.
4017 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4018 (ppc_emit_prologue): New function.
4019 (ppc_emit_epilogue): New function.
4020 (ppc_emit_add): New function.
4021 (ppc_emit_sub): New function.
4022 (ppc_emit_mul): New function.
4023 (ppc_emit_lsh): New function.
4024 (ppc_emit_rsh_signed): New function.
4025 (ppc_emit_rsh_unsigned): New function.
4026 (ppc_emit_ext): New function.
4027 (ppc_emit_zero_ext): New function.
4028 (ppc_emit_log_not): New function.
4029 (ppc_emit_bit_and): New function.
4030 (ppc_emit_bit_or): New function.
4031 (ppc_emit_bit_xor): New function.
4032 (ppc_emit_bit_not): New function.
4033 (ppc_emit_equal): New function.
4034 (ppc_emit_less_signed): New function.
4035 (ppc_emit_less_unsigned): New function.
4036 (ppc_emit_ref): New function.
4037 (ppc_emit_const): New function.
4038 (ppc_emit_reg): New function.
4039 (ppc_emit_pop): New function.
4040 (ppc_emit_stack_flush): New function.
4041 (ppc_emit_swap): New function.
4042 (ppc_emit_stack_adjust): New function.
4043 (ppc_emit_call): New function.
4044 (ppc_emit_int_call_1): New function.
4045 (ppc_emit_void_call_2): New function.
4046 (ppc_emit_if_goto): New function.
4047 (ppc_emit_goto): New function.
4048 (ppc_emit_eq_goto): New function.
4049 (ppc_emit_ne_goto): New function.
4050 (ppc_emit_lt_goto): New function.
4051 (ppc_emit_le_goto): New function.
4052 (ppc_emit_gt_goto): New function.
4053 (ppc_emit_ge_goto): New function.
4054 (ppc_write_goto_address): New function.
4055 (ppc_emit_ops_impl): New static variable.
4056 (ppc64v1_emit_prologue): New function.
4057 (ppc64v2_emit_prologue): New function.
4058 (ppc64_emit_epilogue): New function.
4059 (ppc64_emit_add): New function.
4060 (ppc64_emit_sub): New function.
4061 (ppc64_emit_mul): New function.
4062 (ppc64_emit_lsh): New function.
4063 (ppc64_emit_rsh_signed): New function.
4064 (ppc64_emit_rsh_unsigned): New function.
4065 (ppc64_emit_ext): New function.
4066 (ppc64_emit_zero_ext): New function.
4067 (ppc64_emit_log_not): New function.
4068 (ppc64_emit_bit_and): New function.
4069 (ppc64_emit_bit_or): New function.
4070 (ppc64_emit_bit_xor): New function.
4071 (ppc64_emit_bit_not): New function.
4072 (ppc64_emit_equal): New function.
4073 (ppc64_emit_less_signed): New function.
4074 (ppc64_emit_less_unsigned): New function.
4075 (ppc64_emit_ref): New function.
4076 (ppc64_emit_const): New function.
4077 (ppc64v1_emit_reg): New function.
4078 (ppc64v2_emit_reg): New function.
4079 (ppc64_emit_pop): New function.
4080 (ppc64_emit_stack_flush): New function.
4081 (ppc64_emit_swap): New function.
4082 (ppc64v1_emit_call): New function.
4083 (ppc64v2_emit_call): New function.
4084 (ppc64v1_emit_int_call_1): New function.
4085 (ppc64v2_emit_int_call_1): New function.
4086 (ppc64v1_emit_void_call_2): New function.
4087 (ppc64v2_emit_void_call_2): New function.
4088 (ppc64_emit_if_goto): New function.
4089 (ppc64_emit_eq_goto): New function.
4090 (ppc64_emit_ne_goto): New function.
4091 (ppc64_emit_lt_goto): New function.
4092 (ppc64_emit_le_goto): New function.
4093 (ppc64_emit_gt_goto): New function.
4094 (ppc64_emit_ge_goto): New function.
4095 (ppc64v1_emit_ops_impl): New static variable.
4096 (ppc64v2_emit_ops_impl): New static variable.
4097 (ppc_emit_ops): New function.
4098 (linux_low_target): Wire in ppc_emit_ops.
4099
4100 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4101 Marcin Kościelnicki <koriakin@0x04.net>
4102
4103 PR/17221
4104 * Makefile.in: Add powerpc-*-ipa.o
4105 * configure.srv: Add ipa_obj for powerpc*-linux.
4106 * linux-ppc-ipa.c: New file.
4107 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4108 includes.
4109 (PPC_FIELD): New macro.
4110 (PPC_SEXT): New macro.
4111 (PPC_OP6): New macro.
4112 (PPC_BO): New macro.
4113 (PPC_LI): New macro.
4114 (PPC_BD): New macro.
4115 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4116 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4117 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4118 (ppc_get_thread_area): New function.
4119 (is_elfv2_inferior): New function.
4120 (gen_ds_form): New function.
4121 (GEN_STD): New macro.
4122 (GEN_STDU): New macro.
4123 (GEN_LD): New macro.
4124 (GEN_LDU): New macro.
4125 (gen_d_form): New function.
4126 (GEN_ADDI): New macro.
4127 (GEN_ADDIS): New macro.
4128 (GEN_LI): New macro.
4129 (GEN_LIS): New macro.
4130 (GEN_ORI): New macro.
4131 (GEN_ORIS): New macro.
4132 (GEN_LWZ): New macro.
4133 (GEN_STW): New macro.
4134 (GEN_STWU): New macro.
4135 (gen_xfx_form): New function.
4136 (GEN_MFSPR): New macro.
4137 (GEN_MTSPR): New macro.
4138 (GEN_MFCR): New macro.
4139 (GEN_MTCR): New macro.
4140 (GEN_SYNC): New macro.
4141 (GEN_LWSYNC): New macro.
4142 (gen_x_form): New function.
4143 (GEN_OR): New macro.
4144 (GEN_MR): New macro.
4145 (GEN_LWARX): New macro.
4146 (GEN_STWCX): New macro.
4147 (GEN_CMPW): New macro.
4148 (gen_md_form): New function.
4149 (GEN_RLDICL): New macro.
4150 (GEN_RLDICR): New macro.
4151 (gen_i_form): New function.
4152 (GEN_B): New macro.
4153 (GEN_BL): New macro.
4154 (gen_b_form): New function.
4155 (GEN_BNE): New macro.
4156 (GEN_LOAD): New macro.
4157 (GEN_STORE): New macro.
4158 (gen_limm): New function.
4159 (gen_atomic_xchg): New function.
4160 (gen_call): New function.
4161 (ppc_relocate_instruction): New function.
4162 (ppc_install_fast_tracepoint_jump_pad): New function.
4163 (ppc_get_min_fast_tracepoint_insn_len): New function.
4164 (ppc_get_ipa_tdesc_idx): New function.
4165 (the_low_target): Wire in the new functions.
4166 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4167 tdescs.
4168 * linux-ppc-tdesc.h: New file.
4169
4170 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4171
4172 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4173 (alloc_jump_pad_buffer): New function.
4174 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4175 (alloc_jump_pad_buffer): New function.
4176 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4177 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4178 (alloc_jump_pad_buffer): New function.
4179 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4180 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4181 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4182 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4183
4184 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4185
4186 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4187 * linux-amd64-ipa.c: Likewise.
4188 * linux-i386-ipa.c: Likewise.
4189 * linux-s390-ipa.c: Likewise.
4190 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4191 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4192 set_trace_state_variable_value_ptr.
4193 (struct ipa_sym_addresses): Likewise.
4194 (symbol_list): Likewise.
4195 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4196 accessing gdb_collect directly.
4197 (gdb_collect_ptr_type): New typedef.
4198 (get_raw_reg_ptr_type): New typedef.
4199 (get_trace_state_variable_value_ptr_type): New typedef.
4200 (set_trace_state_variable_value_ptr_type): New typedef.
4201 (gdb_collect_ptr): New global.
4202 (get_raw_reg_ptr): New global.
4203 (get_trace_state_variable_value_ptr): New global.
4204 (set_trace_state_variable_value_ptr): New global.
4205 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4206 accessing get_raw_reg directly.
4207 (get_get_tsv_func_addr): Likewise for
4208 get_trace_state_variable_value_ptr.
4209 (get_set_tsv_func_addr): Likewise for
4210 set_trace_state_variable_value_ptr.
4211 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4212
4213 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4214
4215 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4216
4217 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4218
4219 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4220 packets.
4221 (relocate_instruction): Remove own_buf.
4222 * server.c (own_buf): Make global.
4223 (handle_v_requests): Make global.
4224 * server.h (own_buf): New declaration.
4225 (handle_v_requests): New prototype.
4226
4227 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4228
4229 PR 18377
4230 * linux-s390-low.c (add_insns): New function.
4231 (s390_emit_prologue): New function.
4232 (s390_emit_epilogue): New function.
4233 (s390_emit_add): New function.
4234 (s390_emit_sub): New function.
4235 (s390_emit_mul): New function.
4236 (s390_emit_lsh): New function.
4237 (s390_emit_rsh_signed): New function.
4238 (s390_emit_rsh_unsigned): New function.
4239 (s390_emit_ext): New function.
4240 (s390_emit_log_not): New function.
4241 (s390_emit_bit_and): New function.
4242 (s390_emit_bit_or): New function.
4243 (s390_emit_bit_xor): New function.
4244 (s390_emit_bit_not): New function.
4245 (s390_emit_equal): New function.
4246 (s390_emit_less_signed): New function.
4247 (s390_emit_less_unsigned): New function.
4248 (s390_emit_ref): New function.
4249 (s390_emit_if_goto): New function.
4250 (s390_emit_goto): New function.
4251 (s390_write_goto_address): New function.
4252 (s390_emit_litpool): New function.
4253 (s390_emit_const): New function.
4254 (s390_emit_call): New function.
4255 (s390_emit_reg): New function.
4256 (s390_emit_pop): New function.
4257 (s390_emit_stack_flush): New function.
4258 (s390_emit_zero_ext): New function.
4259 (s390_emit_swap): New function.
4260 (s390_emit_stack_adjust): New function.
4261 (s390_emit_set_r2): New function.
4262 (s390_emit_int_call_1): New function.
4263 (s390_emit_void_call_2): New function.
4264 (s390_emit_eq_goto): New function.
4265 (s390_emit_ne_goto): New function.
4266 (s390_emit_lt_goto): New function.
4267 (s390_emit_le_goto): New function.
4268 (s390_emit_gt_goto): New function.
4269 (s390_emit_ge_goto): New function.
4270 (s390x_emit_prologue): New function.
4271 (s390x_emit_epilogue): New function.
4272 (s390x_emit_add): New function.
4273 (s390x_emit_sub): New function.
4274 (s390x_emit_mul): New function.
4275 (s390x_emit_lsh): New function.
4276 (s390x_emit_rsh_signed): New function.
4277 (s390x_emit_rsh_unsigned): New function.
4278 (s390x_emit_ext): New function.
4279 (s390x_emit_log_not): New function.
4280 (s390x_emit_bit_and): New function.
4281 (s390x_emit_bit_or): New function.
4282 (s390x_emit_bit_xor): New function.
4283 (s390x_emit_bit_not): New function.
4284 (s390x_emit_equal): New function.
4285 (s390x_emit_less_signed): New function.
4286 (s390x_emit_less_unsigned): New function.
4287 (s390x_emit_ref): New function.
4288 (s390x_emit_if_goto): New function.
4289 (s390x_emit_const): New function.
4290 (s390x_emit_call): New function.
4291 (s390x_emit_reg): New function.
4292 (s390x_emit_pop): New function.
4293 (s390x_emit_stack_flush): New function.
4294 (s390x_emit_zero_ext): New function.
4295 (s390x_emit_swap): New function.
4296 (s390x_emit_stack_adjust): New function.
4297 (s390x_emit_int_call_1): New function.
4298 (s390x_emit_void_call_2): New function.
4299 (s390x_emit_eq_goto): New function.
4300 (s390x_emit_ne_goto): New function.
4301 (s390x_emit_lt_goto): New function.
4302 (s390x_emit_le_goto): New function.
4303 (s390x_emit_gt_goto): New function.
4304 (s390x_emit_ge_goto): New function.
4305 (s390_emit_ops): New function.
4306 (struct linux_target_ops): Fill in emit_ops hook.
4307
4308 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4309
4310 PR 18377
4311 * Makefile.in: Add s390 IPA files.
4312 * configure.srv: Build IPA for s390.
4313 * linux-s390-ipa.c: New file.
4314 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4315 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4316 (tdesc_s390_linux32): Likewise.
4317 (init_registers_s390_linux32v1): Likewise.
4318 (tdesc_s390_linux32v1): Likewise.
4319 (init_registers_s390_linux32v2): Likewise.
4320 (tdesc_s390_linux32v2): Likewise.
4321 (init_registers_s390_linux64): Likewise.
4322 (tdesc_s390_linux64): Likewise.
4323 (init_registers_s390_linux64v1): Likewise.
4324 (tdesc_s390_linux64v1): Likewise.
4325 (init_registers_s390_linux64v2): Likewise.
4326 (tdesc_s390_linux64v2): Likewise.
4327 (init_registers_s390_te_linux64): Likewise.
4328 (tdesc_s390_te_linux64): Likewise.
4329 (init_registers_s390_vx_linux64): Likewise.
4330 (tdesc_s390_vx_linux64): Likewise.
4331 (init_registers_s390_tevx_linux64): Likewise.
4332 (tdesc_s390_tevx_linux64): Likewise.
4333 (init_registers_s390x_linux64): Likewise.
4334 (tdesc_s390x_linux64): Likewise.
4335 (init_registers_s390x_linux64v1): Likewise.
4336 (tdesc_s390x_linux64v1): Likewise.
4337 (init_registers_s390x_linux64v2): Likewise.
4338 (tdesc_s390x_linux64v2): Likewise.
4339 (init_registers_s390x_te_linux64): Likewise.
4340 (tdesc_s390x_te_linux64): Likewise.
4341 (init_registers_s390x_vx_linux64): Likewise.
4342 (tdesc_s390x_vx_linux64): Likewise.
4343 (init_registers_s390x_tevx_linux64): Likewise.
4344 (tdesc_s390x_tevx_linux64): Likewise.
4345 (have_hwcap_s390_vx): New static variable.
4346 (s390_arch_setup): Fill have_hwcap_s390_vx.
4347 (s390_get_thread_area): New function.
4348 (s390_ft_entry_gpr_esa): New const.
4349 (s390_ft_entry_gpr_zarch): New const.
4350 (s390_ft_entry_misc): New const.
4351 (s390_ft_entry_fr): New const.
4352 (s390_ft_entry_vr): New const.
4353 (s390_ft_main_31): New const.
4354 (s390_ft_main_64): New const.
4355 (s390_ft_exit_fr): New const.
4356 (s390_ft_exit_vr): New const.
4357 (s390_ft_exit_misc): New const.
4358 (s390_ft_exit_gpr_esa): New const.
4359 (s390_ft_exit_gpr_zarch): New const.
4360 (append_insns): New function.
4361 (s390_relocate_instruction): New function.
4362 (s390_install_fast_tracepoint_jump_pad): New function.
4363 (s390_get_min_fast_tracepoint_insn_len): New function.
4364 (s390_get_ipa_tdesc_idx): New function.
4365 (struct linux_target_ops): Wire in the above functions.
4366 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4367 * linux-s390-tdesc.h: New file.
4368
4369 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4370
4371 * linux-s390-low.c (s390_supports_tracepoints): New function.
4372 (struct linux_target_ops): Fill supports_tracepoints hook.
4373
4374 2016-03-18 Yao Qi <yao.qi@linaro.org>
4375
4376 * linux-low.c (lwp_signal_can_be_delivered): New function.
4377 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4378
4379 2016-03-18 Yao Qi <yao.qi@linaro.org>
4380
4381 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4382 0 if signal is enqueued. Remove 'signal' from one debugging
4383 message. Move one debugging message to some lines below.
4384 Remove code setting 'signal' to 0.
4385
4386 2016-03-18 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-low.c (linux_low_filter_event): Remove redundant
4389 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4390
4391 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4392
4393 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4394 (struct linux_target_ops): Wire in the above.
4395
4396 2016-03-03 Yao Qi <yao.qi@linaro.org>
4397
4398 * linux-low.c: Update comments to start_step_over.
4399
4400 2016-03-03 Yao Qi <yao.qi@linaro.org>
4401
4402 PR server/19736
4403 * linux-low.c (handle_extended_wait): Set child suspended
4404 if event_lwp->bp_reinsert isn't zero.
4405
4406 2016-03-02 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4409 enqueue_pending_signal.
4410
4411 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4412
4413 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4414 is actually loaded.
4415
4416 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4417
4418 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4419 (s390_regmap_3264) [!__s390x__]: New global.
4420 (s390_collect_ptrace_register): Skip map entries containing -1.
4421 (s390_supply_ptrace_register): Ditto.
4422 (s390_fill_gprs_high): New function.
4423 (s390_store_gprs_high): New function.
4424 (s390_regsets): Add NT_S390_HIGH_GPRS.
4425 (s390_get_hwcap): Enable on 31-bit.
4426 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4427 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4428 Detect NT_S390_HIGH_GPRS.
4429 (s390_usrregs_info_3264): Enable on 31-bit.
4430 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4431 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4432
4433 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4434
4435 PR gdb/13808
4436 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4437 * configure.srv: Ditto.
4438 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4439 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4440 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4441 (init_registers_amd64_linux): Remove prototype.
4442 (tdesc_amd64_linux): Remove declaration.
4443 (get_ipa_tdesc): New function.
4444 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4445 initialize remaining tdescs.
4446 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4447 (init_registers_i386_linux): Remove prototype.
4448 (tdesc_i386_linux): Remove declaration.
4449 (get_ipa_tdesc): New function.
4450 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4451 initialize remaining tdescs.
4452 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4453 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4454 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4455 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4456 (x86_get_ipa_tdesc_idx): New function.
4457 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4458 * linux-x86-tdesc.h: New file.
4459 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4460 (target_get_ipa_tdesc_idx): New macro.
4461 * tracepoint.c (ipa_tdesc_idx): New macro.
4462 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4463 (symbol_list): Add ipa_tdesc_idx.
4464 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4465 (ipa_tdesc): Remove.
4466 (ipa_tdesc_idx): New variable.
4467 (get_context_regcache): Use get_ipa_tdesc.
4468 (gdb_collect): Ditto.
4469 (gdb_probe): Ditto.
4470 * tracepoint.h (get_ipa_tdesc): New prototype.
4471 (ipa_tdesc): Remove.
4472
4473 2016-02-24 Pedro Alves <palves@redhat.com>
4474
4475 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4476 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4477 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4478 Factor out common code between the USE_SIGTRAP_SIGINFO and
4479 !USE_SIGTRAP_SIGINFO blocks.
4480 (linux_low_filter_event): Call save_stop_reason instead of
4481 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4482 Update comments.
4483 (linux_wait_1): Update comments.
4484
4485 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4486
4487 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4488 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4489 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4490 ppc_insert_point, ppc_remove_point.
4491
4492 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4493
4494 * linux-s390-low.c (s390_supports_z_point_type): New function.
4495 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4496
4497 2016-02-16 Yao Qi <yao.qi@linaro.org>
4498
4499 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4500 PC. Get pc from regcache_read_pc.
4501
4502 2016-02-12 Yao Qi <yao.qi@linaro.org>
4503
4504 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4505 or linux_get_pc_32bit.
4506 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4507
4508 2016-02-12 Yao Qi <yao.qi@linaro.org>
4509
4510 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4511 arm_linux_get_next_pcs_fixup.
4512
4513 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4514
4515 * tracepoint.c (x_tracepoint_action_download): Change
4516 write_inferior_data_ptr to write_inferior_data_pointer.
4517 (cmd_qtstart): Likewise.
4518 (write_inferior_data_ptr): Remove.
4519 (download_agent_expr): Change write_inferior_data_ptr to
4520 write_inferior_data_pointer.
4521 (download_tracepoint_1): Likewise.
4522 (download_tracepoint): Likewise.
4523 (download_trace_state_variables): Likewise.
4524
4525 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4526 Marcin Kościelnicki <koriakin@0x04.net>
4527
4528 * tracepoint.c (struct tracepoint_action_ops): Remove.
4529 (struct tracepoint_action): Remove ops.
4530 (m_tracepoint_action_download, r_tracepoint_action_download)
4531 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4532 size and offset accordingly.
4533 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4534 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4535 (tracepoint_action_send, tracepoint_action_download): New functions.
4536 Helpers for trace action handlers.
4537 (add_tracepoint_action): Remove setup actions ops.
4538 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4539
4540 2016-02-10 Yao Qi <yao.qi@linaro.org>
4541
4542 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4543
4544 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4545
4546 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4547 to AC_OUTPUT.
4548 * configure: Regenerate.
4549
4550 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4551
4552 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4553 void * to gdb_byte *.
4554 * linux-low.c (siginfo_fixup): Likewise.
4555 (linux_xfer_siginfo): Likewise.
4556 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4557 Likewise.
4558 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4559
4560 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4561
4562 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4563 to srv_tgtobj.
4564 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4565 to srv_tgtobj.
4566 * linux-x86-low.c [__x86_64__]: Include
4567 "nat/amd64-linux-siginfo.h".
4568 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4569 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4570 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4571 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4572 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4573 (cpt_si_fd, si_timerid, si_overrun): Move from
4574 nat/amd64-linux-siginfo.c.
4575 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4576
4577 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4578
4579 * server.c (skip_to_semicolon): Remove.
4580 (process_point_options): Use strchrnul instead of
4581 skip_to_semicolon.
4582
4583 2016-01-26 Yao Qi <yao.qi@linaro.org>
4584
4585 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4586 * linux-low.c (install_software_single_step_breakpoints): Don't
4587 call regcache_read_pc.
4588 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4589 argument pc.
4590
4591 2016-01-26 Yao Qi <yao.qi@linaro.org>
4592
4593 * linux-low.c (install_software_single_step_breakpoints): Call
4594 regcache_read_pc instead of get_pc.
4595
4596 2016-01-26 Yao Qi <yao.qi@linaro.org>
4597
4598 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4599 (unblock_async_io): Rename to ...
4600 (block_unblock_async_io): ... it. New function.
4601 (enable_async_io): Don't install SIGIO handler. Unblock it
4602 instead.
4603 (disable_async_io): Don't ignore SIGIO. Block it instead.
4604 (initialize_async_io): Install SIGIO handler. Don't call
4605 unblock_async_io.
4606
4607 2016-01-26 Yao Qi <yao.qi@linaro.org>
4608
4609 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4610 first character is '\003', call *the_target->request_interrupt.
4611
4612 2016-01-25 Yao Qi <yao.qi@linaro.org>
4613
4614 * remote-utils.c (new_thread_notify): Remove.
4615 (dead_thread_notify): Likewise.
4616 * remote-utils.h (new_thread_notify): Remove declaration.
4617 (dead_thread_notify): Likewise.
4618
4619 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4620
4621 * gdb.trace/pending.exp: Fix expected message on continue.
4622
4623 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4624
4625 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4626 it works properly on big-endian machines where sizeof (CORE_ADDR)
4627 != sizeof (void *).
4628
4629 2016-01-21 Pedro Alves <palves@redhat.com>
4630
4631 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4632 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4633 * configure: Regenerate.
4634
4635 2016-01-21 Yao Qi <yao.qi@linaro.org>
4636
4637 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4638 is_thumb and set it according to CPSR saved on the stack.
4639 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4640 arm_sigreturn_next_pc.
4641
4642 2016-01-18 Yao Qi <yao.qi@linaro.org>
4643
4644 * linux-low.c (linux_set_pc_64bit): New function.
4645 (linux_get_pc_64bit): New function.
4646 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4647 Declare.
4648 * linux-sparc-low.c (debug_threads): Remove declaration.
4649 (sparc_get_pc): Remove.
4650 (the_low_target): Use linux_get_pc_64bit instead of
4651 sparc_get_pc.
4652 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4653 (the_low_target): Use linux_get_pc_64bit and
4654 linux_set_pc_64bit.
4655
4656 2016-01-18 Yao Qi <yao.qi@linaro.org>
4657
4658 * linux-arm-low.c (debug_threads): Remove declaration.
4659 (arm_get_pc, arm_set_pc): Remove.
4660 (the_low_target): Use linux_get_pc_32bit and
4661 linux_set_pc_32bit.
4662 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4663 (the_low_target): Use linux_get_pc_32bit and
4664 linux_set_pc_32bit.
4665 * linux-cris-low.c (debug_threads): Remove declaration.
4666 (cris_get_pc, cris_set_pc,): Remove.
4667 (the_low_target): Use linux_get_pc_32bit and
4668 linux_set_pc_32bit.
4669 * linux-crisv32-low.c (debug_threads): Remove declaration.
4670 (cris_get_pc, cris_set_pc): Remove.
4671 (the_low_target): Use linux_get_pc_32bit and
4672 linux_set_pc_32bit.
4673 * linux-low.c: Include inttypes.h.
4674 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4675 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4676 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4677 (the_low_target): Use linux_get_pc_32bit and
4678 linux_set_pc_32bit.
4679 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4680 (the_low_target): Use linux_get_pc_32bit and
4681 linux_set_pc_32bit.
4682 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4683 (the_low_target): Use linux_get_pc_32bit and
4684 linux_set_pc_32bit.
4685 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4686 (the_low_target): Use linux_get_pc_32bit and
4687 linux_set_pc_32bit.
4688 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4689 (the_low_target): Use linux_get_pc_32bit and
4690 linux_set_pc_32bit.
4691
4692 2016-01-18 Gary Benson <gbenson@redhat.com>
4693
4694 * configure.ac (AC_FUNC_FORK): New check.
4695 * config.in: Regenerate.
4696 * configure: Likewise.
4697
4698 2016-01-14 Yao Qi <yao.qi@linaro.org>
4699
4700 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4701 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4702 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4703 arm_get_next_pcs_ctor.
4704
4705 2016-01-12 Josh Stone <jistone@redhat.com>
4706 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4707
4708 * inferiors.h: Include "gdb_vecs.h".
4709 (struct process_info): Add syscalls_to_catch.
4710 * inferiors.c (remove_process): Free syscalls_to_catch.
4711 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4712 syscall_return stops.
4713 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4714 * server.c (handle_general_set): Handle QCatchSyscalls.
4715 (handle_query): Report support for QCatchSyscalls.
4716 * target.h (struct target_ops): Add supports_catch_syscall.
4717 (target_supports_catch_syscall): New macro.
4718 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4719 (struct lwp_info): Add syscall_state.
4720 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4721 Maintain syscall_state and syscalls_to_catch across exec.
4722 (get_syscall_trapinfo): New function, proxy to the_low_target.
4723 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4724 (linux_low_filter_event): Toggle syscall_state entry/return for
4725 syscall traps, and set it ignored for all others.
4726 (gdb_catching_syscalls_p): New function.
4727 (gdb_catch_this_syscall_p): New function.
4728 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4729 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4730 (linux_supports_catch_syscall): New function.
4731 (linux_target_ops): Install it.
4732 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4733 (the_low_target): Install it.
4734
4735 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4736
4737 * acinclude.m4: Include new ../warning.m4 file.
4738 * configure: Regenerated.
4739 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4740
4741 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4742
4743 * ax.c (is_goto_target): Mark static.
4744 * linux-low.c (register_addr): Likewise.
4745 (linux_fetch_registers, linux_store_registers): Likewise.
4746 * mem-break.c (any_persistent_commands): Fix old prototype.
4747 (add_commands_to_breakpoint): Mark static.
4748 * regcache.c (find_register_by_name): Delete unused func.
4749 * remote-utils.c (hex_or_minus_one): Mark static.
4750 * server.c (monitor_show_help): Mark static.
4751 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4752 handle_v_requests): Likewise.
4753
4754 2016-01-12 Pedro Alves <palves@redhat.com>
4755
4756 Remove use of the registered trademark symbol throughout.
4757
4758 2016-01-08 Yao Qi <yao.qi@linaro.org>
4759
4760 * remote-utils.c (getpkt): If c is '\003', call target hook
4761 request_interrupt.
4762
4763 2016-01-06 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4766 linux-aarch32-low.c.
4767 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4768 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4769 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4770 (thumb2_breakpoint): Declare.
4771 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4772 linux-aarch32-low.h.
4773 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4774 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4775 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4776
4777 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4778
4779 * gdbreplay.c (gdbreplay_version): Change copyright year in
4780 version message.
4781 * server.c (gdbserver_version): Likewise.
4782
4783 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4784
4785 * server.c (crc32_table): Delete.
4786 (crc32): Use libiberty's xcrc32 function.
4787
4788 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4789
4790 * lynx-low.c (lynx_delete_thread_callback): New function.
4791 (lynx_mourn): Properly delete our process and all of its
4792 threads. Remove call to clear_inferiors.
4793
4794 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4795
4796 * target.c (thread_search_callback): Add check that
4797 the thread_stopped target callback is not NULL before
4798 calling it.
4799
4800 2015-12-21 Yao Qi <yao.qi@linaro.org>
4801
4802 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4803 arm breakpoint.
4804
4805 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4806
4807 * server.c (handle_query): Call target_supports_software_single_step.
4808
4809 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4810
4811 * linux-low.c (single_step): New function.
4812 (linux_resume_one_lwp_throw): Call single_step.
4813 (start_step_over): Likewise.
4814
4815 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4816
4817 * Makefile.in (SFILES): Append arch/arm-linux.c,
4818 arch/arm-get-next-pcs.c.
4819 (arm-linux.o): New rule.
4820 (arm-get-next-pcs.o): New rule.
4821 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4822 arm-linux.o.
4823 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4824 to linux-aarch32-low.c.
4825 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4826 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4827 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4828 (thumb2_breakpoint_len): Likewise.
4829 (arm_is_thumb_mode): Make non-static.
4830 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4831 from linux-aarch32-low.c.
4832 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4833 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4834 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4835 (thumb2_breakpoint_len): Likewise.
4836 (arm_is_thumb_mode): New declaration.
4837 * linux-arm-low.c: Include arch/arm-linux.h
4838 aarch/arm-get-next-pcs.h, sys/syscall.h.
4839 (get_next_pcs_ops): New struct.
4840 (get_next_pcs_addr_bits_remove): New function.
4841 (get_next_pcs_is_thumb): New function.
4842 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4843 (arm_sigreturn_next_pc): Likewise.
4844 (get_next_pcs_syscall_next_pc): Likewise.
4845 (arm_gdbserver_get_next_pcs): Likewise.
4846 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4847 Initialize.
4848 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4849 * server.h: Include gdb_vecs.h.
4850
4851 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4852
4853 * Makefile.in (SFILES): Append common/common-regcache.c.
4854 (OBS): Append common-regcache.o.
4855 (common-regcache.o): New rule.
4856 * regcache.c (init_register_cache): Initialize cache to
4857 REG_UNAVAILABLE.
4858 (regcache_raw_read_unsigned): New function.
4859 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4860 register_status enum.
4861
4862 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4863
4864 * linux-aarch64-low.c (the_low_targets): Rename
4865 breakpoint_reinsert_addr to get_next_pcs.
4866 * linux-arm-low.c (the_low_targets): Likewise.
4867 * linux-bfin-low.c (the_low_targets): Likewise.
4868 * linux-cris-low.c (the_low_targets): Likewise.
4869 * linux-crisv32-low.c (the_low_targets): Likewise.
4870 * linux-low.c (can_software_single_step): Likewise.
4871 (install_software_single_step_breakpoints): New function.
4872 (start_step_over): Use install_software_single_step_breakpoints.
4873 * linux-low.h: New CORE_ADDR vector.
4874 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4875 get_next_pcs.
4876 * linux-mips-low.c (the_low_targets): Likewise.
4877 * linux-nios2-low.c (the_low_targets): Likewise.
4878 * linux-sparc-low.c (the_low_targets): Likewise.
4879
4880 2015-12-17 Pedro Alves <palves@redhat.com>
4881
4882 * linux-low.c (linux_kill_one_lwp): Remove references to
4883 LinuxThreads.
4884 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4885 to 'kill'.
4886 (linux_init_signals): Delete.
4887 (initialize_low): Adjust.
4888 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4889
4890 2015-12-16 Pedro Alves <palves@redhat.com>
4891
4892 * configure.ac (compiler warning flags): When testing a
4893 -Wno-foo option, check whether -Wfoo works instead.
4894 * configure: Regenerate.
4895
4896 2015-12-11 Don Breazeal <donb@codesourcery.com>
4897
4898 * server.c (process_serial_event): Don't exit from gdbserver
4899 in remote mode if there are still active inferiors.
4900
4901 2015-12-11 Yao Qi <yao.qi@linaro.org>
4902
4903 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4904 arm_breakpoint_at if the process is 32-bit.
4905
4906 2015-12-11 Yao Qi <yao.qi@linaro.org>
4907
4908 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4909 arm breakpoint.
4910
4911 2015-12-07 Yao Qi <yao.qi@linaro.org>
4912
4913 * configure.srv: Append arm.o to srv_tgtobj for
4914 aarch64*-*-linux* target.
4915 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4916 from linux-arm-low.c.
4917 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4918 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4919 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4920 (thumb2_breakpoint_len): Likewise.
4921 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4922 (arm_breakpoint_kinds): Likewise.
4923 (arm_breakpoint_kind_from_pc): Likewise.
4924 (arm_sw_breakpoint_from_kind): Likewise.
4925 (arm_breakpoint_kind_from_current_state): Likewise.
4926 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4927 (arm_sw_breakpoint_from_kind): Declare.
4928 (arm_breakpoint_kind_from_current_state): Declare.
4929 (arm_breakpoint_at): Declare.
4930 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4931 arm_sw_breakpoint_from_kind if process is 32-bit.
4932 (aarch64_breakpoint_kind_from_pc): New function.
4933 (aarch64_breakpoint_kind_from_current_state): New function.
4934 (the_low_target): Initialize fields breakpoint_kind_from_pc
4935 and breakpoint_kind_from_current_state.
4936 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4937 linux-aarch32-low.c.
4938 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4939 (arm_breakpoint, arm_breakpoint_len): Likewise.
4940 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4941 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4942 (arm_is_thumb_mode): Likewise.
4943 (arm_breakpoint_at): Likewise.
4944 (arm_breakpoint_kind_from_pc): Likewise.
4945 (arm_sw_breakpoint_from_kind): Likewise.
4946 (arm_breakpoint_kind_from_current_state): Likewise.
4947
4948 Revert:
4949 2015-08-04 Yao Qi <yao.qi@linaro.org>
4950
4951 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4952 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4953 * server.c (extended_protocol): Remove "static".
4954 * server.h (extended_protocol): Declare it.
4955
4956 2015-12-04 Josh Stone <jistone@redhat.com>
4957
4958 * target.h (struct target_ops) <arch_setup>: Rename to ...
4959 (struct target_ops) <post_create_inferior>: ... this.
4960 (target_arch_setup): Rename to ...
4961 (target_post_create_inferior): ... this, calling post_create_inferior.
4962 * server.c (start_inferior): Update target_arch_setup calls to
4963 target_post_create_inferior.
4964 * linux-low.c (linux_low_ptrace_options): Forward declare.
4965 (linux_arch_setup): Update its comment for general use.
4966 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4967 (struct linux_target_ops): Use linux_post_create_inferior.
4968 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4969 to post_create_inferior.
4970 * nto-low.c (struct nto_target_ops): Likewise.
4971 * spu-low.c (struct spu_target_ops): Likewise.
4972 * win32-low.c (struct win32_target_ops): Likewise.
4973
4974 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4975
4976 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4977
4978 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4979
4980 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4981 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4982 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4983 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4984 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4985 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4986 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4988 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4989 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4990 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4991 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4992
4993 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4994
4995 * linux-low.c (linux_look_up_symbols): Don't call
4996 linux_supports_traceclone.
4997 * linux-low.h (thread_db_init): Remove use_events argument.
4998 * thread-db.c (thread_db_use_event): Remove global variable.
4999 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5000 (struct thread_db) <td_create_bp>: Remove field.
5001 (thread_db_create_event): Remove function.
5002 (thread_db_enable_reporting): Likewise.
5003 (find_one_thread): Don't check for thread_db_use_events.
5004 (attach_thread): Likewise.
5005 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5006 (try_thread_db_load_1): Don't check for thread_db_use_events.
5007 (thread_db_init): Remove use_events argument and thread events
5008 handling.
5009 (remove_thread_event_breakpoints): Remove function.
5010 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5011
5012 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5013
5014 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5015 New function.
5016 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5017 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5018 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5019 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5020 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5021 Initialize.
5022 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5023 New function.
5024 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5025 * linux-low.c (can_hardware_single_step): Use
5026 supports_hardware_single_step.
5027 (can_software_single_step): New function.
5028 (start_step_over): Call can_software_single_step.
5029 (linux_supports_hardware_single_step): New function.
5030 (struct target_ops) <supports_software_single_step>: Initialize.
5031 * linux-low.h (struct linux_target_ops)
5032 <supports_hardware_single_step>: Initialize.
5033 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5035 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5036 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5037 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5038 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5039 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5040 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5041 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5042 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5043 Initialize.
5044 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5045 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5046 Initialize.
5047 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5048 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5049 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5050 New function.
5051 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5052 * target.h (struct target_ops): <supports_software_single_step>:
5053 New field.
5054 (target_supports_software_single_step): New macro.
5055
5056 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5057
5058 * linux-low.c (linux_wait_1): Fix pc advance condition.
5059 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5060 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5061
5062 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5063
5064 * linux-arm-low.c (arm_is_thumb_mode): New function.
5065 (arm_breakpoint_at): Use arm_is_thumb_mode.
5066 (arm_breakpoint_kind_from_current_state): New function.
5067 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5068 Initialize.
5069 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5070 (linux_breakpoint_kind_from_current_state): New function.
5071 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5072 * linux-low.h (struct linux_target_ops)
5073 <breakpoint_kind_from_current_state>: New field.
5074 * target.h (struct target_ops): Likewise.
5075 (target_breakpoint_kind_from_current_state): New macro.
5076
5077 2015-11-30 Pedro Alves <palves@redhat.com>
5078
5079 * linux-low.c (linux_resume): Wake up the event loop before
5080 returning.
5081
5082 2015-11-30 Pedro Alves <palves@redhat.com>
5083
5084 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5085 check.
5086 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5087 to -1.
5088 * target.c (struct thread_search): New structure.
5089 (thread_search_callback): New function.
5090 (prev_general_thread): New global.
5091 (prepare_to_access_memory, done_accessing_memory): New functions.
5092 * target.h (prepare_to_access_memory, done_accessing_memory):
5093 Replace macros with function declarations.
5094
5095 2015-11-30 Pedro Alves <palves@redhat.com>
5096
5097 PR 14618
5098 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5099 report TARGET_WAITKIND_NO_RESUMED.
5100 * remote-utils.c (prepare_resume_reply): Handle
5101 TARGET_WAITKIND_NO_RESUMED.
5102 * server.c (report_no_resumed): New global.
5103 (handle_query) <qSupported>: Handle "no-resumed+". Report
5104 "no-resumed+" support.
5105 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5106 return error if the client doesn't support no-resumed events.
5107 (push_stop_notification): New function.
5108 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5109 events if the client supports them.
5110
5111 2015-11-30 Pedro Alves <palves@redhat.com>
5112
5113 * linux-low.c (thread_still_has_status_pending_p): Don't check
5114 vCont;t here.
5115 (lwp_resumed): New function.
5116 (status_pending_p_callback): Return early if the LWP is not
5117 supposed to be resumed.
5118
5119 2015-11-30 Pedro Alves <palves@redhat.com>
5120
5121 * linux-low.c (handle_extended_wait): Assert that the LWP's
5122 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5123 thread create events, leave the new child's status pending.
5124 (linux_low_filter_event): If GDB wants to hear about thread exit
5125 events, leave the LWP marked dead and don't delete it.
5126 (linux_wait_for_event_filtered): Don't check for thread exit.
5127 (filter_exit_event): New function.
5128 (linux_wait_1): Use it, when returning an exit event.
5129 (linux_resume_one_lwp_throw): Assert that the LWP's
5130 waitstatus is TARGET_WAITKIND_IGNORE.
5131 * remote-utils.c (prepare_resume_reply): Handle
5132 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5133 * server.c (report_thread_events): New global.
5134 (handle_general_set): Handle QThreadEvents.
5135 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5136 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5137 TARGET_WAITKIND_THREAD_EXITED.
5138 * server.h (report_thread_events): Declare.
5139
5140 2015-11-30 Pedro Alves <palves@redhat.com>
5141
5142 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5143 the thread's last_resume_kind was resume_stop.
5144
5145 2015-11-30 Pedro Alves <palves@redhat.com>
5146
5147 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5148 before returning.
5149
5150 2015-11-30 Pedro Alves <palves@redhat.com>
5151
5152 * server.c (handle_v_requests): Handle vCtrlC.
5153
5154 2015-11-30 Pedro Alves <palves@redhat.com>
5155
5156 * gdbthread.h (find_any_thread_of_pid): Declare.
5157 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5158 functions.
5159 * server.c (handle_query): If current_thread is NULL, look for
5160 another thread of the selected process.
5161
5162 2015-11-26 Daniel Colascione <dancol@dancol.org>
5163 Simon Marchi <simon.marchi@ericsson.com>
5164
5165 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5166 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5167 name in reply.
5168 * target.h (struct target_ops) <thread_name>: New field.
5169 (target_thread_name): New macro.
5170
5171 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5172
5173 * regcache.h (regcache_invalidate_pid): Add declaration.
5174 * regcache.c (regcache_invalidate_pid): New function, extracted
5175 from regcache_invalidate.
5176 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5177 Add trivial documentation comment.
5178 * lynx-low.c: Use regcache_invalidate_pid instead of
5179 regcache_invalidate.
5180
5181 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5182
5183 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5184 and Elf64_auxv_t if the target is Android.
5185
5186 2015-11-22 Doug Evans <xdje42@gmail.com>
5187
5188 * target.h: #include <sys/types.h>.
5189
5190 2015-11-19 Pedro Alves <palves@redhat.com>
5191
5192 * linux-low.c (linux_process_qsupported): Change prototype.
5193 Adjust.
5194 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5195 Change prototype.
5196 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5197 and adjust to loop over all features.
5198 * server.c (handle_query) <qSupported>: Adjust to call
5199 target_process_qsupported once, passing it a vector of unprocessed
5200 features.
5201 * target.h (struct target_ops) <process_qsupported>: Change
5202 prototype.
5203 (target_process_qsupported): Adjust.
5204
5205 2015-11-19 Pedro Alves <palves@redhat.com>
5206
5207 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5208 mode.
5209 * configure: Regenerate.
5210
5211 2015-11-19 Pedro Alves <palves@redhat.com>
5212
5213 * configure: Regenerate.
5214
5215 2015-11-19 Yao Qi <yao.qi@linaro.org>
5216
5217 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5218 type to uint32_t.
5219
5220 2015-11-19 Yao Qi <yao.qi@linaro.org>
5221
5222 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5223 (struct aarch64_operand): Move enum out.
5224
5225 2015-11-19 Yao Qi <yao.qi@linaro.org>
5226
5227 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5228 struct user_fpsimd_state *.
5229 (aarch64_store_fpregset): Likewise.
5230
5231 2015-11-19 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5234 struct user_pt_regs *.
5235 (aarch64_store_gregset): Likewise.
5236
5237 2015-11-18 Pedro Alves <palves@redhat.com>
5238
5239 * Makefile.in (all_object_files): Add $IPA_OBJS.
5240
5241 2015-11-17 Pedro Alves <palves@redhat.com>
5242
5243 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5244 GDB_SIGNAL_0 and gdb_signal_to_string.
5245
5246 2015-11-17 Pedro Alves <palves@redhat.com>
5247
5248 * win32-low.c (handle_output_debug_string): Remove parameter.
5249 (win32_kill): Remove our_status local and adjust call to
5250 handle_output_debug_string.
5251 (get_child_debug_event): Adjust call to
5252 handle_output_debug_string.
5253
5254 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5255
5256 * linux-mips-low.c (mips_fill_gregset): Add cast.
5257 (mips_store_gregset): Likewise.
5258 (mips_fill_fpregset): Likewise.
5259 (mips_store_fpregset): Likewise.
5260
5261 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5262
5263 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5264 priv.
5265
5266 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5267
5268 * linux-mips-low.c (mips_linux_new_thread): Change type of
5269 watch_type to enum target_hw_bp_type.
5270
5271 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5272
5273 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5274 Change return type to arm_hwbp_type.
5275
5276 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5277
5278 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5279 (arm_store_gregset): Likewise.
5280 * linux-arm-low.c (arm_get_hwcap): Likewise.
5281 (arm_read_description): Likewise.
5282
5283 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5284
5285 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5286
5287 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5288
5289 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5290 (ppc_fill_vsxregset): Likewise.
5291 (ppc_store_vsxregset): Likewise.
5292 (ppc_fill_vrregset): Likewise.
5293 (ppc_store_vrregset): Likewise.
5294 (ppc_fill_evrregset): Likewise.
5295 (ppc_store_evrregset): Likewise.
5296
5297 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5298
5299 * linux-ppc-low.c (ppc_usrregs_info): Remove
5300 forward-declaration.
5301 (ppc_arch_setup): Move lower in file.
5302
5303 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5304
5305 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5306 (ps_pdwrite): Likewise.
5307
5308 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5309
5310 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5311 to after assert checks.
5312
5313 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5314
5315 * proc-service.c (ps_pdread): Add/adjust casts.
5316 (ps_pdwrite): Add/adjust casts.
5317
5318 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5319
5320 * server.c (handle_search_memory_1): Cast return value of
5321 memmem.
5322
5323 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5324
5325 * server.c (write_qxfer_response): Change type of data to
5326 gdb_byte *.
5327
5328 2015-10-29 Pedro Alves <palves@redhat.com>
5329
5330 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5331
5332 2015-10-29 Pedro Alves <palves@redhat.com>
5333
5334 * tracepoint.c (clear_installed_tracepoints): Add casts.
5335
5336 2015-10-29 Pedro Alves <palves@redhat.com>
5337
5338 * server.c (handle_v_cont, process_serial_event): Add enum
5339 gdb_signal casts to signal parsing code.
5340
5341 2015-10-29 Pedro Alves <palves@redhat.com>
5342
5343 * linux-low.h (NULL_REGSET): Define.
5344 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5345 * linux-arm-low.c (arm_regsets): Likewise.
5346 * linux-crisv32-low.c (cris_regsets): Likewise.
5347 * linux-m68k-low.c (m68k_regsets): Likewise.
5348 * linux-mips-low.c (mips_regsets): Likewise.
5349 * linux-nios2-low.c (nios2_regsets): Likewise.
5350 * linux-ppc-low.c (ppc_regsets): Likewise.
5351 * linux-s390-low.c (s390_regsets): Likewise.
5352 * linux-sh-low.c (sh_regsets): Likewise.
5353 * linux-sparc-low.c (sparc_regsets): Likewise.
5354 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5355 * linux-tile-low.c (tile_regsets): Likewise.
5356 * linux-x86-low.c (x86_regsets): Likewise.
5357 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5358
5359 2015-10-29 Pedro Alves <palves@redhat.com>
5360
5361 * linux-low.h (NULL_REGSET): Define.
5362 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5363 * linux-arm-low.c (arm_regsets): Likewise.
5364 * linux-crisv32-low.c (cris_regsets): Likewise.
5365 * linux-m68k-low.c (m68k_regsets): Likewise.
5366 * linux-mips-low.c (mips_regsets): Likewise.
5367 * linux-nios2-low.c (nios2_regsets): Likewise.
5368 * linux-ppc-low.c (ppc_regsets): Likewise.
5369 * linux-s390-low.c (s390_regsets): Likewise.
5370 * linux-sh-low.c (sh_regsets): Likewise.
5371 * linux-sparc-low.c (sparc_regsets): Likewise.
5372 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5373 * linux-tile-low.c (tile_regsets): Likewise.
5374 * linux-x86-low.c (x86_regsets): Likewise.
5375 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5376
5377 2015-10-26 Doug Evans <dje@google.com>
5378
5379 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5380
5381 2015-10-26 Doug Evans <dje@google.com>
5382
5383 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5384
5385 2015-10-26 Doug Evans <dje@google.com>
5386
5387 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5388 for debug_printf.
5389 (attach_thread, find_new_threads_callback): Ditto.
5390
5391 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5392
5393 * mem-break.h (set_breakpoint_data): Remove.
5394
5395 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5396
5397 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5398 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5399 (initialize_low): Remove set_breakpoint_data call.
5400 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5401 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5402 (initialize_low): Remove set_breakpoint_data call.
5403 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5404 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5405 (initialize_low): Remove set_breakpoint_data call.
5406
5407 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5408
5409 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5410 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5411 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5412 * target.h (target_breakpoint_kind_from_pc): New macro.
5413
5414 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5415
5416 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5417 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5418 the default breakpoint kind.
5419
5420 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5421
5422 * linux-arm-low.c (arm_supports_z_point_type): Add software
5423 breakpoint support.
5424
5425 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5426
5427 * linux-arm-low.c: Refactor breakpoint definitions.
5428 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5429 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5430
5431 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5432
5433 * Makefile.in: Add arm.c/o.
5434 * configure.srv: Likewise.
5435 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5436 (arm_breakpoint_kind_from_pc): New function.
5437 (arm_sw_breakpoint_from_kind): Return proper kind.
5438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5439
5440 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5441
5442 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5443 removal.
5444 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5445 (struct raw_breakpoint) <size>: Remove.
5446 (struct raw_breakpoint) <kind>: Add.
5447 (bp_size): New function.
5448 (bp_opcode): Likewise.
5449 (find_raw_breakpoint_at): Adjust for kind.
5450 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5451 (remove_memory_breakpoint): Adjust for kind call bp_size.
5452 (set_raw_breakpoint_at): Adjust for kind.
5453 (set_breakpoint): Likewise.
5454 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5455 (delete_raw_breakpoint): Adjust for kind.
5456 (delete_breakpoint): Likewise.
5457 (find_gdb_breakpoint): Likewise.
5458 (set_gdb_breakpoint_1): Likewise.
5459 (set_gdb_breakpoint): Likewise.
5460 (delete_gdb_breakpoint_1): Likewise.
5461 (delete_gdb_breakpoint): Likewise.
5462 (uninsert_raw_breakpoint): Likewise.
5463 (reinsert_raw_breakpoint): Likewise.
5464 (set_breakpoint_data): Remove.
5465 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5466 (check_mem_read): Adjust for kind call bp_size.
5467 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5468 (clone_one_breakpoint): Adjust for kind.
5469 * mem-break.h (set_gdb_breakpoint): Likewise.
5470 (delete_gdb_breakpoint): Likewise.
5471 * server.c (process_serial_event): Likewise.
5472
5473 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5474
5475 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5476 (struct linux_target_ops) <breakpoint>: Remove.
5477 (struct linux_target_ops) <breakpoint_len>: Remove.
5478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5480 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5481 (arm_sw_breakpoint_from_kind): New function.
5482 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5483 (struct linux_target_ops) <breakpoint>: Remove.
5484 (struct linux_target_ops) <breakpoint_len>: Remove.
5485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5487 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5488 (struct linux_target_ops) <breakpoint>: Remove.
5489 (struct linux_target_ops) <breakpoint_len>: Remove.
5490 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5491 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5492 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5493 (struct linux_target_ops) <breakpoint>: Remove.
5494 (struct linux_target_ops) <breakpoint_len>: Remove.
5495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5497 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5498 and sw_breakpoint_from_kind to increment the pc.
5499 (linux_breakpoint_kind_from_pc): New function.
5500 (linux_sw_breakpoint_from_kind): New function.
5501 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5502 (initialize_low): Call breakpoint_kind_from_pc and
5503 sw_breakpoint_from_kind to replace breakpoint_data/len.
5504 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5505 New field.
5506 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5507 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5508 (struct linux_target_ops) <breakpoint>: Remove.
5509 (struct linux_target_ops) <breakpoint_len>: Remove.
5510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5512 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5513 (struct linux_target_ops) <breakpoint>: Remove.
5514 (struct linux_target_ops) <breakpoint_len>: Remove.
5515 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5516 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5517 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5518 (struct linux_target_ops) <breakpoint>: Remove.
5519 (struct linux_target_ops) <breakpoint_len>: Remove.
5520 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5521 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5522 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5523 (struct linux_target_ops) <breakpoint>: Remove.
5524 (struct linux_target_ops) <breakpoint_len>: Remove.
5525 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5526 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5527 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5528 (struct linux_target_ops) <breakpoint>: Remove.
5529 (struct linux_target_ops) <breakpoint_len>: Remove.
5530 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5531 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5532 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5533 (struct linux_target_ops) <breakpoint>: Remove.
5534 (struct linux_target_ops) <breakpoint_len>: Remove.
5535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5537 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5538 (struct linux_target_ops) <breakpoint>: Remove.
5539 (struct linux_target_ops) <breakpoint_len>: Remove.
5540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5542 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5543 (struct linux_target_ops) <breakpoint>: Remove.
5544 (struct linux_target_ops) <breakpoint_len>: Remove.
5545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5547 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5548 (struct linux_target_ops) <breakpoint>: Remove.
5549 (struct linux_target_ops) <breakpoint_len>: Remove.
5550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5552 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5553 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5554 (struct linux_target_ops) <breakpoint>: Remove.
5555 (struct linux_target_ops) <breakpoint_len>: Remove.
5556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5558 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5559 (struct linux_target_ops) <breakpoint>: Remove.
5560 (struct linux_target_ops) <breakpoint_len>: Remove.
5561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5563
5564 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5565
5566 * linux-cris-low.c (cris_get_pc): Remove void arg.
5567
5568 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5569
5570 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5571 variable name.
5572
5573 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5574
5575 * inferiors.c (thread_pid_matches_callback): New function.
5576 (find_thread_process): New function.
5577 (remove_thread): Reset current_thread.
5578 (remove_process): Assert threads have been removed first.
5579
5580 2015-10-15 Yao Qi <yao.qi@linaro.org>
5581
5582 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5583 if it is 3.
5584 (aarch64_remove_point): Likewise.
5585 * regcache.c (regcache_register_size): New function.
5586
5587 2015-10-12 Yao Qi <yao.qi@linaro.org>
5588
5589 * linux-aarch64-low.c: Update all callers as emit_load_store
5590 is renamed to aarch64_emit_load_store.
5591
5592 2015-10-12 Yao Qi <yao.qi@linaro.org>
5593
5594 * linux-aarch64-low.c: Update all callers of function renaming
5595 from emit_insn to aarch64_emit_insn.
5596
5597 2015-10-12 Yao Qi <yao.qi@linaro.org>
5598
5599 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5600 arch/aarch64-insn.h.
5601 (struct aarch64_memory_operand): Likewise.
5602 (ENCODE): Likewise.
5603 (emit_insn): Move to arch/aarch64-insn.c.
5604 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5605 (emit_load_store): Move to arch/aarch64-insn.c.
5606 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5607 (can_encode_int32): Remove.
5608
5609 2015-10-12 Yao Qi <yao.qi@linaro.org>
5610
5611 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5612 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5613 (aarch64_relocate_instruction): Likewise.
5614 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5615 (struct aarch64_insn_visitor): Likewise.
5616
5617 2015-10-12 Yao Qi <yao.qi@linaro.org>
5618
5619 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5620 (struct aarch64_insn_visitor): New.
5621 (struct aarch64_insn_relocation_data): New.
5622 (aarch64_ftrace_insn_reloc_b): New function.
5623 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5624 (aarch64_ftrace_insn_reloc_cb): Likewise.
5625 (aarch64_ftrace_insn_reloc_tb): Likewise.
5626 (aarch64_ftrace_insn_reloc_adr): Likewise.
5627 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5628 (aarch64_ftrace_insn_reloc_others): Likewise.
5629 (visitor): New.
5630 (aarch64_relocate_instruction): Use visitor.
5631
5632 2015-10-12 Yao Qi <yao.qi@linaro.org>
5633
5634 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5635 int. Add argument buf.
5636 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5637 aarch64_relocate_instruction.
5638
5639 2015-10-12 Yao Qi <yao.qi@linaro.org>
5640
5641 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5642 argument insn. Remove local variable insn. Don't call
5643 target_read_uint32.
5644 (aarch64_install_fast_tracepoint_jump_pad): Call
5645 target_read_uint32.
5646
5647 2015-09-30 Yao Qi <yao.qi@linaro.org>
5648
5649 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5650 (emit_load_store_pair): Likewise.
5651
5652 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5653
5654 * dll.c (match_dll): Add cast(s).
5655 (unloaded_dll): Likewise.
5656 * linux-low.c (second_thread_of_pid_p): Likewise.
5657 (delete_lwp_callback): Likewise.
5658 (count_events_callback): Likewise.
5659 (select_event_lwp_callback): Likewise.
5660 (linux_set_resume_request): Likewise.
5661 * server.c (accumulate_file_name_length): Likewise.
5662 (emit_dll_description): Likewise.
5663 (handle_qxfer_threads_worker): Likewise.
5664 (visit_actioned_threads): Likewise.
5665 * thread-db.c (any_thread_of): Likewise.
5666 * tracepoint.c (same_process_p): Likewise.
5667 (match_blocktype): Likewise.
5668 (build_traceframe_info_xml): Likewise.
5669
5670 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5671
5672 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5673 assignment.
5674 (gdb_unparse_agent_expr): Likewise.
5675 * hostio.c (require_data): Likewise.
5676 (handle_pread): Likewise.
5677 * linux-low.c (disable_regset): Likewise.
5678 (fetch_register): Likewise.
5679 (store_register): Likewise.
5680 (get_dynamic): Likewise.
5681 (linux_qxfer_libraries_svr4): Likewise.
5682 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5683 (set_fast_tracepoint_jump): Likewise.
5684 (uninsert_fast_tracepoint_jumps_at): Likewise.
5685 (reinsert_fast_tracepoint_jumps_at): Likewise.
5686 (validate_inserted_breakpoint): Likewise.
5687 (clone_agent_expr): Likewise.
5688 * regcache.c (init_register_cache): Likewise.
5689 * remote-utils.c (putpkt_binary_1): Likewise.
5690 (decode_M_packet): Likewise.
5691 (decode_X_packet): Likewise.
5692 (look_up_one_symbol): Likewise.
5693 (relocate_instruction): Likewise.
5694 (monitor_output): Likewise.
5695 * server.c (handle_search_memory): Likewise.
5696 (handle_qxfer_exec_file): Likewise.
5697 (handle_qxfer_libraries): Likewise.
5698 (handle_qxfer): Likewise.
5699 (handle_query): Likewise.
5700 (handle_v_cont): Likewise.
5701 (handle_v_run): Likewise.
5702 (captured_main): Likewise.
5703 * target.c (write_inferior_memory): Likewise.
5704 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5705 * tracepoint.c (init_trace_buffer): Likewise.
5706 (add_tracepoint_action): Likewise.
5707 (add_traceframe): Likewise.
5708 (add_traceframe_block): Likewise.
5709 (cmd_qtdpsrc): Likewise.
5710 (cmd_qtdv): Likewise.
5711 (cmd_qtstatus): Likewise.
5712 (response_source): Likewise.
5713 (response_tsv): Likewise.
5714 (cmd_qtnotes): Likewise.
5715 (gdb_collect): Likewise.
5716 (initialize_tracepoint): Likewise.
5717
5718 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5719
5720 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5721 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5722 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5723 <NOP>: New.
5724 (enum aarch64_condition_codes): New enum.
5725 (w0): New static global.
5726 (fp): Likewise.
5727 (lr): Likewise.
5728 (struct aarch64_memory_operand) <type>: New
5729 MEMORY_OPERAND_POSTINDEX type.
5730 (postindex_memory_operand): New helper function.
5731 (emit_ret): New function.
5732 (emit_load_store_pair): New function, factored out of emit_stp
5733 with support for MEMORY_OPERAND_POSTINDEX.
5734 (emit_stp): Rewrite using emit_load_store_pair.
5735 (emit_ldp): New function.
5736 (emit_load_store): Likewise.
5737 (emit_ldr): Mention post-index instruction in comment.
5738 (emit_ldrh): New function.
5739 (emit_ldrb): New function.
5740 (emit_ldrsw): Mention post-index instruction in comment.
5741 (emit_str): Likewise.
5742 (emit_subs): New function.
5743 (emit_cmp): Likewise.
5744 (emit_and): Likewise.
5745 (emit_orr): Likewise.
5746 (emit_orn): Likewise.
5747 (emit_eor): Likewise.
5748 (emit_mvn): Likewise.
5749 (emit_lslv): Likewise.
5750 (emit_lsrv): Likewise.
5751 (emit_asrv): Likewise.
5752 (emit_mul): Likewise.
5753 (emit_sbfm): Likewise.
5754 (emit_sbfx): Likewise.
5755 (emit_ubfm): Likewise.
5756 (emit_ubfx): Likewise.
5757 (emit_csinc): Likewise.
5758 (emit_cset): Likewise.
5759 (emit_nop): Likewise.
5760 (emit_ops_insns): New helper function.
5761 (emit_pop): Likewise.
5762 (emit_push): Likewise.
5763 (aarch64_emit_prologue): New function.
5764 (aarch64_emit_epilogue): Likewise.
5765 (aarch64_emit_add): Likewise.
5766 (aarch64_emit_sub): Likewise.
5767 (aarch64_emit_mul): Likewise.
5768 (aarch64_emit_lsh): Likewise.
5769 (aarch64_emit_rsh_signed): Likewise.
5770 (aarch64_emit_rsh_unsigned): Likewise.
5771 (aarch64_emit_ext): Likewise.
5772 (aarch64_emit_log_not): Likewise.
5773 (aarch64_emit_bit_and): Likewise.
5774 (aarch64_emit_bit_or): Likewise.
5775 (aarch64_emit_bit_xor): Likewise.
5776 (aarch64_emit_bit_not): Likewise.
5777 (aarch64_emit_equal): Likewise.
5778 (aarch64_emit_less_signed): Likewise.
5779 (aarch64_emit_less_unsigned): Likewise.
5780 (aarch64_emit_ref): Likewise.
5781 (aarch64_emit_if_goto): Likewise.
5782 (aarch64_emit_goto): Likewise.
5783 (aarch64_write_goto_address): Likewise.
5784 (aarch64_emit_const): Likewise.
5785 (aarch64_emit_call): Likewise.
5786 (aarch64_emit_reg): Likewise.
5787 (aarch64_emit_pop): Likewise.
5788 (aarch64_emit_stack_flush): Likewise.
5789 (aarch64_emit_zero_ext): Likewise.
5790 (aarch64_emit_swap): Likewise.
5791 (aarch64_emit_stack_adjust): Likewise.
5792 (aarch64_emit_int_call_1): Likewise.
5793 (aarch64_emit_void_call_2): Likewise.
5794 (aarch64_emit_eq_goto): Likewise.
5795 (aarch64_emit_ne_goto): Likewise.
5796 (aarch64_emit_lt_goto): Likewise.
5797 (aarch64_emit_le_goto): Likewise.
5798 (aarch64_emit_gt_goto): Likewise.
5799 (aarch64_emit_ge_got): Likewise.
5800 (aarch64_emit_ops_impl): New static global variable.
5801 (aarch64_emit_ops): New target function, return
5802 &aarch64_emit_ops_impl.
5803 (struct linux_target_ops): Install it.
5804
5805 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5806
5807 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5808 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5809 aarch64-ipa.o.
5810 * linux-aarch64-ipa.c: New file.
5811 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5812 and endian.h.
5813 (aarch64_get_thread_area): New target method.
5814 (extract_signed_bitfield): New helper function.
5815 (aarch64_decode_ldr_literal): New function.
5816 (enum aarch64_opcodes): New enum.
5817 (struct aarch64_register): New struct.
5818 (struct aarch64_operand): New struct.
5819 (x0): New static global.
5820 (x1): Likewise.
5821 (x2): Likewise.
5822 (x3): Likewise.
5823 (x4): Likewise.
5824 (w2): Likewise.
5825 (ip0): Likewise.
5826 (sp): Likewise.
5827 (xzr): Likewise.
5828 (aarch64_register): New helper function.
5829 (register_operand): Likewise.
5830 (immediate_operand): Likewise.
5831 (struct aarch64_memory_operand): New struct.
5832 (offset_memory_operand): New helper function.
5833 (preindex_memory_operand): Likewise.
5834 (enum aarch64_system_control_registers): New enum.
5835 (ENCODE): New macro.
5836 (emit_insn): New helper function.
5837 (emit_b): New function.
5838 (emit_bcond): Likewise.
5839 (emit_cb): Likewise.
5840 (emit_tb): Likewise.
5841 (emit_blr): Likewise.
5842 (emit_stp): Likewise.
5843 (emit_ldp_q_offset): Likewise.
5844 (emit_stp_q_offset): Likewise.
5845 (emit_load_store): Likewise.
5846 (emit_ldr): Likewise.
5847 (emit_ldrsw): Likewise.
5848 (emit_str): Likewise.
5849 (emit_ldaxr): Likewise.
5850 (emit_stxr): Likewise.
5851 (emit_stlr): Likewise.
5852 (emit_data_processing_reg): Likewise.
5853 (emit_data_processing): Likewise.
5854 (emit_add): Likewise.
5855 (emit_sub): Likewise.
5856 (emit_mov): Likewise.
5857 (emit_movk): Likewise.
5858 (emit_mov_addr): Likewise.
5859 (emit_mrs): Likewise.
5860 (emit_msr): Likewise.
5861 (emit_sevl): Likewise.
5862 (emit_wfe): Likewise.
5863 (append_insns): Likewise.
5864 (can_encode_int32_in): New helper function.
5865 (aarch64_relocate_instruction): New function.
5866 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5867 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5868 (struct linux_target_ops): Install aarch64_get_thread_area,
5869 aarch64_install_fast_tracepoint_jump_pad and
5870 aarch64_get_min_fast_tracepoint_insn_len.
5871
5872 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5873
5874 * Makefile.in (aarch64-insn.o): New rule.
5875 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5876
5877 2015-09-21 Yao Qi <yao.qi@linaro.org>
5878
5879 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5880
5881 2015-09-21 Yao Qi <yao.qi@linaro.org>
5882
5883 * tracepoint.c (max_jump_pad_size): Remove.
5884
5885 2015-09-18 Yao Qi <yao.qi@linaro.org>
5886
5887 * linux-aarch64-low.c: Don't include sys/uio.h.
5888 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5889
5890 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5891
5892 * tracepoint.c (eval_result_type): Change prototype.
5893 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5894
5895 2015-09-15 Pedro Alves <palves@redhat.com>
5896
5897 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5898 Check whether to report exec events instead of checking whether
5899 multiprocess is enabled.
5900
5901 2015-09-15 Pedro Alves <palves@redhat.com>
5902
5903 PR remote/18965
5904 * remote-utils.c (prepare_resume_reply): Merge
5905 TARGET_WAITKIND_VFORK_DONE switch case with the
5906 TARGET_WAITKIND_FORKED case.
5907
5908 2015-09-15 Yao Qi <yao.qi@linaro.org>
5909
5910 * server.c (handle_query): Check string comparison using
5911 "else if" instead of "if".
5912
5913 2015-09-15 Yao Qi <yao.qi@linaro.org>
5914
5915 * server.c (vCont_supported): New global variable.
5916 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5917 matches. Append ";vContSupported+" to own_buf.
5918 (handle_v_requests): Append ";s;S" to own_buf if target supports
5919 hardware single step or vCont_supported is false.
5920 (capture_main): Set vCont_supported to zero.
5921
5922 2015-09-15 Yao Qi <yao.qi@linaro.org>
5923
5924 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5925 it to ...
5926 (linux_supports_hardware_single_step): ... New function.
5927 (linux_target_ops): Update.
5928 * lynx-low.c (lynx_target_ops): Set field
5929 supports_hardware_single_step to target_can_do_hardware_single_step.
5930 * nto-low.c (nto_target_ops): Likewise.
5931 * spu-low.c (spu_target_ops): Likewise.
5932 * win32-low.c (win32_target_ops): Likewise.
5933 * target.c (target_can_do_hardware_single_step): New function.
5934 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5935 Remove. <supports_hardware_single_step>: New field.
5936 (target_supports_conditional_breakpoints): Remove.
5937 (target_supports_hardware_single_step): New macro.
5938 (target_can_do_hardware_single_step): Declare.
5939 * server.c (handle_query): Use target_supports_hardware_single_step
5940 instead of target_supports_conditional_breakpoints.
5941
5942 2015-09-15 Yao Qi <yao.qi@linaro.org>
5943
5944 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5945 function.
5946 (struct linux_target_ops the_low_target): Install
5947 aarch64_linux_siginfo_fixup.
5948
5949 2015-09-11 Don Breazeal <donb@codesourcery.com>
5950 Luis Machado <lgustavo@codesourcery.com>
5951
5952 * linux-low.c (linux_mourn): Static declaration.
5953 (linux_arch_setup): Move in front of
5954 handle_extended_wait.
5955 (linux_arch_setup_thread): New function.
5956 (handle_extended_wait): Handle exec events. Call
5957 linux_arch_setup_thread. Make event_lwp argument a
5958 pointer-to-a-pointer.
5959 (check_zombie_leaders): Do not check stopped threads.
5960 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5961 (linux_low_filter_event): Add lwp and thread for exec'ing
5962 non-leader thread if leader thread has been deleted.
5963 Refactor code into linux_arch_setup_thread and call it.
5964 Pass child lwp pointer by reference to handle_extended_wait.
5965 (linux_wait_for_event_filtered): Update comment.
5966 (linux_wait_1): Prevent clobbering exec event status.
5967 (linux_supports_exec_events): New function.
5968 (linux_target_ops) <supports_exec_events>: Initialize new member.
5969 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5970 new member.
5971 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5972 * server.c (report_exec_events): New global variable.
5973 (handle_query): Handle qSupported query for exec-events feature.
5974 (captured_main): Initialize report_exec_events.
5975 * server.h (report_exec_events): Declare new global variable.
5976 * target.h (struct target_ops) <supports_exec_events>: New
5977 member.
5978 (target_supports_exec_events): New macro.
5979 * win32-low.c (win32_target_ops) <supports_exec_events>:
5980 Initialize new member.
5981
5982 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5983
5984 * linux-low.c (linux_low_enable_btrace): Remove.
5985 (linux_target_ops): Replace linux_low_enable_btrace with
5986 linux_enable_btrace.
5987
5988 2015-09-03 Yao Qi <yao.qi@linaro.org>
5989
5990 * linux-aarch64-low.c (aarch64_insert_point): Call
5991 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5992 returns true.
5993
5994 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5995
5996 * linux-low.c (check_stopped_by_breakpoint): Use
5997 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5998
5999 2015-08-27 Pedro Alves <palves@redhat.com>
6000
6001 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6002
6003 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6004
6005 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6006 the XNEW-family equivalent.
6007 (compile_bytecodes): Likewise.
6008 * dll.c (loaded_dll): Likewise.
6009 * event-loop.c (append_callback_event): Likewise.
6010 (create_file_handler): Likewise.
6011 (create_file_event): Likewise.
6012 * hostio.c (handle_open): Likewise.
6013 * inferiors.c (add_thread): Likewise.
6014 (add_process): Likewise.
6015 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6016 * linux-arm-low.c (arm_new_process): Likewise.
6017 (arm_new_thread): Likewise.
6018 * linux-low.c (add_to_pid_list): Likewise.
6019 (linux_add_process): Likewise.
6020 (handle_extended_wait): Likewise.
6021 (add_lwp): Likewise.
6022 (enqueue_one_deferred_signal): Likewise.
6023 (enqueue_pending_signal): Likewise.
6024 (linux_resume_one_lwp_throw): Likewise.
6025 (linux_resume_one_thread): Likewise.
6026 (linux_read_memory): Likewise.
6027 (linux_write_memory): Likewise.
6028 * linux-mips-low.c (mips_linux_new_process): Likewise.
6029 (mips_linux_new_thread): Likewise.
6030 (mips_add_watchpoint): Likewise.
6031 * linux-x86-low.c (initialize_low_arch): Likewise.
6032 * lynx-low.c (lynx_add_process): Likewise.
6033 * mem-break.c (set_raw_breakpoint_at): Likewise.
6034 (set_breakpoint): Likewise.
6035 (add_condition_to_breakpoint): Likewise.
6036 (add_commands_to_breakpoint): Likewise.
6037 (clone_agent_expr): Likewise.
6038 (clone_one_breakpoint): Likewise.
6039 * regcache.c (new_register_cache): Likewise.
6040 * remote-utils.c (look_up_one_symbol): Likewise.
6041 * server.c (queue_stop_reply): Likewise.
6042 (start_inferior): Likewise.
6043 (queue_stop_reply_callback): Likewise.
6044 (handle_target_event): Likewise.
6045 * spu-low.c (fetch_ppc_memory): Likewise.
6046 (store_ppc_memory): Likewise.
6047 * target.c (set_target_ops): Likewise.
6048 * thread-db.c (thread_db_load_search): Likewise.
6049 (try_thread_db_load_1): Likewise.
6050 * tracepoint.c (add_tracepoint): Likewise.
6051 (add_tracepoint_action): Likewise.
6052 (create_trace_state_variable): Likewise.
6053 (cmd_qtdpsrc): Likewise.
6054 (cmd_qtro): Likewise.
6055 (add_while_stepping_state): Likewise.
6056 * win32-low.c (child_add_thread): Likewise.
6057 (get_image_name): Likewise.
6058
6059 2015-08-25 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6062
6063 2015-08-25 Yao Qi <yao.qi@linaro.org>
6064
6065 * Makefile.in (aarch64-linux.o): New rule.
6066 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6067 srv_tgtobj.
6068 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6069 (aarch64_init_debug_reg_state): Make it extern.
6070 (aarch64_linux_prepare_to_resume): Remove.
6071
6072 2015-08-25 Yao Qi <yao.qi@linaro.org>
6073
6074 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6075 lwp_arch_private_info and ptid_of_lwp.
6076
6077 2015-08-25 Yao Qi <yao.qi@linaro.org>
6078
6079 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6080 Find proc_info by find_process_pid. All callers updated.
6081
6082 2015-08-25 Yao Qi <yao.qi@linaro.org>
6083
6084 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6085 Remove.
6086 (debug_reg_change_callback): Remove.
6087 (aarch64_notify_debug_reg_change): Remove.
6088
6089 2015-08-25 Yao Qi <yao.qi@linaro.org>
6090
6091 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6092 Call current_lwp_ptid.
6093
6094 2015-08-25 Yao Qi <yao.qi@linaro.org>
6095
6096 * linux-aarch64-low.c (debug_reg_change_callback): Use
6097 debug_printf.
6098
6099 2015-08-25 Yao Qi <yao.qi@linaro.org>
6100
6101 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6102
6103 2015-08-25 Yao Qi <yao.qi@linaro.org>
6104
6105 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6106
6107 2015-08-25 Yao Qi <yao.qi@linaro.org>
6108
6109 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6110 the code.
6111
6112 2015-08-25 Yao Qi <yao.qi@linaro.org>
6113
6114 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6115 Remove.
6116 (debug_reg_change_callback): Remove argument entry and add argument
6117 lwp. Remove local variable thread. Don't print thread id in the
6118 debugging output. Don't check whether pid of thread equals to pid.
6119 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6120 iterate_over_lwps instead find_inferior.
6121
6122 2015-08-24 Pedro Alves <palves@redhat.com>
6123
6124 * inferiors.c (get_first_process): New function.
6125 * inferiors.h (get_first_process): New declaration.
6126 * remote-utils.c (read_ptid): Default to the first process in the
6127 list, instead of to the current thread's process.
6128
6129 2015-08-24 Pedro Alves <palves@redhat.com>
6130
6131 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6132 * event-loop.c: Likewise.
6133 * remote-utils.c: Likewise.
6134 * tracepoint.c: Likewise.
6135
6136 2015-08-24 Pedro Alves <palves@redhat.com>
6137
6138 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6139 ptid_get_lwp.
6140
6141 2015-08-21 Pedro Alves <palves@redhat.com>
6142
6143 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6144 instead of literal 1.
6145
6146 2015-08-21 Pedro Alves <palves@redhat.com>
6147
6148 * tdesc.c (default_description): Explicitly zero-initialize.
6149
6150 2015-08-21 Pedro Alves <palves@redhat.com>
6151
6152 PR gdb/18749
6153 * inferiors.c (remove_thread): Discard any pending stop reply for
6154 this thread.
6155 * server.c (remove_all_on_match_pid): Rename to ...
6156 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6157 instead of a pid.
6158 (discard_queued_stop_replies): Change parameter to a ptid. Now
6159 extern.
6160 (handle_v_kill, kill_inferior_callback, captured_main)
6161 (process_serial_event): Adjust.
6162 * server.h (discard_queued_stop_replies): Declare.
6163
6164 2015-08-21 Pedro Alves <palves@redhat.com>
6165
6166 * linux-low.c (wait_for_sigstop): Always switch to no thread
6167 selected if the previously current thread dies.
6168 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6169 process instead of the current thread's.
6170 * remote-utils.c (input_interrupt): Don't check if there's no
6171 current thread.
6172 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6173 current thread to the general thread fails, error out.
6174 (handle_qxfer_auxv, handle_qxfer_libraries)
6175 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6176 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6177 (handle_query): Check if there's a thread selected instead of
6178 checking whether there's any thread in the thread list.
6179 (handle_qxfer_threads, handle_qxfer_btrace)
6180 (handle_qxfer_btrace_conf): Don't error out early if there's no
6181 thread in the thread list.
6182 (handle_v_cont, myresume): Don't set the current thread to the
6183 continue thread.
6184 (process_serial_event) <Hg handling>: Also set thread_id if the
6185 previous general thread is still alive.
6186 (process_serial_event) <g/G handling>: If setting the current
6187 thread to the general thread fails, error out.
6188 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6189 thread's lwp instead of the current thread's.
6190 * target.c (set_desired_thread): If the desired thread was not
6191 found, leave the current thread pointing to NULL. Return an int
6192 (boolean) indicating success.
6193 * target.h (set_desired_thread): Change return type to int.
6194
6195 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6196
6197 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6198 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6199 #includes.
6200 (ps_get_thread_area): New function.
6201
6202 2015-08-19 Gary Benson <gbenson@redhat.com>
6203
6204 * hostio.c (handle_pread): Do not attempt to read more data
6205 than hostio_reply_with_data can fit in a packet.
6206
6207 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6208
6209 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6210
6211 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6212
6213 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6214
6215 2015-08-06 Pedro Alves <palves@redhat.com>
6216
6217 * tracepoint.c (expr_eval_result): Now an int.
6218
6219 2015-08-06 Pedro Alves <palves@redhat.com>
6220
6221 * gdbthread.h (struct regcache): Forward declare.
6222 (struct thread_info) <regcache_data>: Now a struct regcache
6223 pointer.
6224 * inferiors.c (inferior_regcache_data)
6225 (set_inferior_regcache_data): Now work with struct regcache
6226 pointers.
6227 * inferiors.h (struct regcache): Forward declare.
6228 (inferior_regcache_data, set_inferior_regcache_data): Now work
6229 with struct regcache pointers.
6230 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6231 (free_register_cache_thread): Remove struct regcache pointer
6232 casts.
6233
6234 2015-08-06 Pedro Alves <palves@redhat.com>
6235
6236 * server.c (captured_main): On error, print the exception message
6237 to stderr, and if run_once is set, throw a quit.
6238
6239 2015-08-06 Pedro Alves <palves@redhat.com>
6240
6241 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6242 the current thread.
6243
6244 2015-08-06 Pedro Alves <palves@redhat.com>
6245
6246 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6247 reading beyond the passed in buffer length.
6248
6249 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6250
6251 * tracepoint.c (symbol_list) <required>: Remove.
6252
6253 2015-08-06 Pedro Alves <palves@redhat.com>
6254
6255 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6256 count if stopping and suspending threads.
6257 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6258 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6259 (linux_detach): Complete an ongoing step-over.
6260 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6261 throughout.
6262 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6263 (linux_wait_1): If passing a signal to the inferior after
6264 finishing a step-over, unsuspend and re-resume all lwps. If we
6265 see a single-step event but the thread should be continuing, don't
6266 pass the trap to gdb.
6267 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6268 internal_error instead of gdb_assert.
6269 (enqueue_pending_signal): New function.
6270 (check_ptrace_stopped_lwp_gone): Add debug output.
6271 (start_step_over): Use internal_error instead of gdb_assert.
6272 (complete_ongoing_step_over): New function.
6273 (linux_resume_one_thread): Don't resume a suspended thread.
6274 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6275 it stepping.
6276
6277 2015-08-06 Pedro Alves <palves@redhat.com>
6278
6279 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6280 (linux_thread_alive): Use lwp_is_marked_dead.
6281 (extended_event_reported): Delete.
6282 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6283 instead of extended_event_reported.
6284 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6285 as well.
6286 (lwp_is_marked_dead): New function.
6287 (lwp_running): Use lwp_is_marked_dead.
6288 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6289 comment.
6290
6291 2015-08-06 Pedro Alves <palves@redhat.com>
6292
6293 * linux-low.c (linux_wait_1): Move fork event output out of the
6294 !report_to_gdb check. Pass event_child->waitstatus to
6295 target_waitstatus_to_string instead of ourstatus.
6296
6297 2015-08-04 Yao Qi <yao.qi@linaro.org>
6298
6299 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6300 if current_thread is 32 bit.
6301
6302 2015-08-04 Yao Qi <yao.qi@linaro.org>
6303
6304 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6305 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6306 * server.c (extended_protocol): Remove "static".
6307 * server.h (extended_protocol): Declare it.
6308
6309 2015-08-04 Yao Qi <yao.qi@linaro.org>
6310
6311 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6312 both aarch64 and aarch32.
6313 (aarch64_set_pc): Likewise.
6314
6315 2015-08-04 Yao Qi <yao.qi@linaro.org>
6316
6317 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6318 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6319 arm-with-neon.xml to srv_xmlfiles.
6320 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6321 (is_64bit_tdesc): New function.
6322 (aarch64_linux_read_description): New function.
6323 (aarch64_arch_setup): Call aarch64_linux_read_description.
6324 (regs_info): Rename to regs_info_aarch64.
6325 (aarch64_regs_info): Return right regs_info.
6326 (initialize_low_arch): Call initialize_low_arch_aarch32.
6327
6328 2015-08-04 Yao Qi <yao.qi@linaro.org>
6329
6330 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6331 * linux-aarch32-low.c: New file.
6332 * linux-aarch32-low.h: New file.
6333 * linux-arm-low.c (arm_fill_gregset): Move it to
6334 linux-aarch32-low.c.
6335 (arm_store_gregset): Likewise.
6336 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6337 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6338 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6339 (regs_info): Rename to regs_info_arm.
6340 (arm_regs_info): Return regs_info_aarch32 if
6341 have_ptrace_getregset is 1 and target description is
6342 arm_with_neon or arm_with_vfpv3.
6343 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6344 Call initialize_low_arch_aarch32 instead.
6345
6346 2015-08-04 Yao Qi <yao.qi@linaro.org>
6347
6348 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6349 * linux-low.c: ... here.
6350 * linux-low.h (have_ptrace_getregset): Declare it.
6351
6352 2015-08-04 Pedro Alves <palves@redhat.com>
6353
6354 * thread-db.c (struct thread_db): Use new typedefs.
6355 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6356 CHK calls.
6357 (disable_thread_event_reporting): Cast result of dlsym to
6358 destination function pointer type.
6359 (thread_db_mourn): Use td_ta_delete_ftype.
6360
6361 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6362
6363 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6364 arch variant.
6365 (CDX_BREAKPOINT): Define for R2.
6366 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6367 (the_low_target): Add comments.
6368
6369 2015-07-30 Yao Qi <yao.qi@linaro.org>
6370
6371 * linux-arm-low.c (arm_hwcap): Remove it.
6372 (arm_read_description): New local variable arm_hwcap. Don't
6373 set arm_hwcap to zero.
6374
6375 2015-07-30 Yao Qi <yao.qi@linaro.org>
6376
6377 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6378 Use regcache->tdesc instead.
6379 (arm_store_wmmxregset): Likewise.
6380 (arm_fill_vfpregset): Likewise.
6381 (arm_store_vfpregset): Likewise.
6382
6383 2015-07-30 Yao Qi <yao.qi@linaro.org>
6384
6385 * linux-arm-low.c: Include arch/arm.h.
6386 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6387 (arm_store_gregset): Likewise.
6388
6389 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6390
6391 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6392 ptrace's 4th parameter.
6393
6394 2015-07-27 Yao Qi <yao.qi@linaro.org>
6395
6396 * configure.srv (case aarch64*-*-linux*): Don't set
6397 srv_linux_usrregs.
6398
6399 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6400
6401 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6402 sys/ptrace.h.
6403 * linux-arm-low.c: Likewise.
6404 * linux-cris-low.c: Likewise.
6405 * linux-crisv32-low.c: Likewise.
6406 * linux-low.c: Likewise.
6407 * linux-m68k-low.c: Likewise.
6408 * linux-mips-low.c: Likewise.
6409 * linux-nios2-low.c: Likewise.
6410 * linux-s390-low.c: Likewise.
6411 * linux-sparc-low.c: Likewise.
6412 * linux-tic6x-low.c: Likewise.
6413 * linux-tile-low.c: Likewise.
6414 * linux-x86-low.c: Likewise.
6415
6416 2015-07-24 Pedro Alves <palves@redhat.com>
6417
6418 * config.in: Regenerate.
6419 * configure: Regenerate.
6420
6421 2015-07-24 Pedro Alves <palves@redhat.com>
6422
6423 * acinclude.m4: Include ../ptrace.m4.
6424 * configure.ac: Call GDB_AC_PTRACE.
6425 * config.in, configure: Regenerate.
6426
6427 2015-07-24 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-low.c (linux_create_inferior): Remove setting to
6430 proc->priv->new_inferior.
6431 (linux_attach): Likewise.
6432 (linux_low_filter_event): Likewise.
6433 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6434
6435 2015-07-24 Yao Qi <yao.qi@linaro.org>
6436
6437 * linux-low.c (linux_arch_setup): New function.
6438 (linux_low_filter_event): If proc->tdesc is NULL and
6439 proc->attached is true, call the_low_target.arch_setup.
6440 Otherwise, keep status pending, and return.
6441 (linux_resume_one_lwp_throw): Don't call get_pc if
6442 thread->while_stepping isn't NULL. Don't call
6443 get_thread_regcache if proc->tdesc is NULL.
6444 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6445 (linux_target_ops): Install arch_setup.
6446 * server.c (start_inferior): Call the_target->arch_setup.
6447 * target.h (struct target_ops) <arch_setup>: New field.
6448 (target_arch_setup): New marco.
6449 * lynx-low.c (lynx_target_ops): Update.
6450 * nto-low.c (nto_target_ops): Update.
6451 * spu-low.c (spu_target_ops): Update.
6452 * win32-low.c (win32_target_ops): Update.
6453
6454 2015-07-24 Yao Qi <yao.qi@linaro.org>
6455
6456 * linux-low.c (linux_add_process): Don't set
6457 proc->priv->new_inferior.
6458 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6459 (linux_attach): Likewise.
6460
6461 2015-07-24 Yao Qi <yao.qi@linaro.org>
6462
6463 * server.c (start_inferior): Code refactor.
6464
6465 2015-07-24 Yao Qi <yao.qi@linaro.org>
6466
6467 * server.c (process_serial_event): Set general_thread.
6468
6469 2015-07-21 Yao Qi <yao.qi@linaro.org>
6470
6471 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6472 aarch64_linux_get_debug_reg_capacity.
6473
6474 2015-07-17 Yao Qi <yao.qi@linaro.org>
6475
6476 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6477 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6478 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6479 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6480 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6481 (AARCH64_HWP_ALIGNMENT): Likewise.
6482 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6483 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6484 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6485 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6486 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6487 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6488 (struct aarch64_debug_reg_state): Likewise.
6489 (struct arch_lwp_info): Likewise.
6490 (aarch64_align_watchpoint): Likewise.
6491 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6492 (aarch64_watchpoint_length): Likewise.
6493 (aarch64_point_encode_ctrl_reg): Likewise
6494 (aarch64_point_is_aligned): Likewise.
6495 (aarch64_align_watchpoint): Likewise.
6496 (aarch64_linux_set_debug_regs):
6497 (aarch64_dr_state_insert_one_point): Likewise.
6498 (aarch64_dr_state_remove_one_point): Likewise.
6499 (aarch64_handle_breakpoint): Likewise.
6500 (aarch64_handle_aligned_watchpoint): Likewise.
6501 (aarch64_handle_unaligned_watchpoint): Likewise.
6502 (aarch64_handle_watchpoint): Likewise.
6503
6504 2015-07-17 Yao Qi <yao.qi@linaro.org>
6505
6506 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6507 and don't aarch64_get_debug_reg_state. All callers update.
6508 (aarch64_handle_aligned_watchpoint): Likewise.
6509 (aarch64_handle_unaligned_watchpoint): Likewise.
6510 (aarch64_handle_watchpoint): Likewise.
6511 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6512 (aarch64_remove_point): Likewise.
6513
6514 2015-07-17 Yao Qi <yao.qi@linaro.org>
6515
6516 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6517 debug_printf.
6518 (aarch64_handle_unaligned_watchpoint): Likewise.
6519
6520 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6521
6522 Revert the previous 3 commits:
6523 Move gdb_regex* to common/
6524 Move linux_find_memory_regions_full & co.
6525 gdbserver build-id attribute generator
6526
6527 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6528 Jan Kratochvil <jan.kratochvil@redhat.com>
6529
6530 gdbserver build-id attribute generator.
6531 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6532 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6533 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6534 (find_phdr): New.
6535 (get_dynamic): Use find_pdhr to traverse program headers.
6536 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6537 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6538 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6539 (get_hex_build_id): New.
6540 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6541 to reply XML document.
6542
6543 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6544 Jan Kratochvil <jan.kratochvil@redhat.com>
6545
6546 * target.c: Include target/target-utils.h and fcntl.h.
6547 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6548 (target_fileio_read_stralloc): New functions.
6549
6550 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6551
6552 * Makefile.in (OBS): Add gdb_regex.o.
6553 (gdb_regex.o): New.
6554 * config.in: Rebuilt.
6555 * configure: Rebuilt.
6556
6557 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6558 Jan Kratochvil <jan.kratochvil@redhat.com>
6559
6560 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6561 * Makefile.in (OBS): Add target-utils.o.
6562 (linux-maps.o, target-utils.o): New.
6563 * configure.srv (srv_linux_obj): Add linux-maps.o.
6564
6565 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6566
6567 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6568 function, return 1.
6569 (the_low_target): Install it.
6570
6571 2015-07-14 Pedro Alves <palves@redhat.com>
6572
6573 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6574 Instead, ignore ECHILD, and throw an error for other errnos.
6575
6576 2015-07-10 Pedro Alves <palves@redhat.com>
6577
6578 * event-loop.c (struct callback_event) <data>: Change type to
6579 gdb_client_data instance instead of gdb_client_data pointer.
6580 (append_callback_event): Adjust.
6581
6582 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6583
6584 * linux-aarch64-low.c: Add comments for each linux_target_ops
6585 method. Remove comments already covered in target_ops and
6586 linux_target_ops definitions.
6587 (the_low_target): Add comments for each unimplemented method.
6588
6589 2015-07-09 Yao Qi <yao.qi@linaro.org>
6590
6591 * linux-aarch64-low.c (aarch64_regmap): Remove.
6592 (aarch64_usrregs_info): Remove.
6593 (regs_info): Set field usrregs to NULL.
6594
6595 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6596
6597 * linux-low.c: Include "rsp-low.h"
6598 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6599 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6600 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6601 (handle_btrace_enable_pt): New.
6602 (handle_btrace_general_set): Support "pt".
6603 (handle_btrace_conf_general_set): Support "pt:size".
6604
6605 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6606
6607 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6608 Z_PACKET_SW_BP.
6609
6610 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6611
6612 * linux-aarch64-low.c: Remove comment about endianness.
6613 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6614 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6615 memcmp.
6616
6617 2015-06-24 Gary Benson <gbenson@redhat.com>
6618
6619 * linux-i386-ipa.c (stdint.h): Do not include.
6620 * lynx-i386-low.c (stdint.h): Likewise.
6621 * lynx-ppc-low.c (stdint.h): Likewise.
6622 * mem-break.c (stdint.h): Likewise.
6623 * thread-db.c (stdint.h): Likewise.
6624 * tracepoint.c (stdint.h): Likewise.
6625 * win32-low.c (stdint.h): Likewise.
6626
6627 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6628
6629 * server.c (write_qxfer_response): Update call to
6630 remote_escape_output.
6631
6632 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6633 Jan Kratochvil <jan.kratochvil@redhat.com>
6634
6635 Merge multiple hex conversions.
6636 * gdbreplay.c (tohex): Rename to 'fromhex'.
6637 (logchar): Use fromhex.
6638
6639 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6640
6641 * server.c (handle_qxfer_libraries): Set `version' attribute for
6642 <library-list>.
6643
6644 2015-06-10 Gary Benson <gbenson@redhat.com>
6645
6646 * target.h (struct target_ops) <multifs_open>: New field.
6647 <multifs_unlink>: Likewise.
6648 <multifs_readlink>: Likewise.
6649 * linux-low.c (nat/linux-namespaces.h): New include.
6650 (linux_target_ops): Initialize the_target->multifs_open,
6651 the_target->multifs_unlink and the_target->multifs_readlink.
6652 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6653 * hostio.c (hostio_fs_pid): New static variable.
6654 (hostio_handle_new_gdb_connection): New function.
6655 (handle_setfs): Likewise.
6656 (handle_open): Use the_target->multifs_open as appropriate.
6657 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6658 (handle_readlink): Use the_target->multifs_readlink as
6659 appropriate.
6660 (handle_vFile): Handle vFile:setfs packets.
6661 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6662 after target_handle_new_gdb_connection.
6663
6664 2015-06-10 Gary Benson <gbenson@redhat.com>
6665
6666 * configure.ac (AC_CHECK_FUNCS): Add setns.
6667 * config.in: Regenerate.
6668 * configure: Likewise.
6669 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6670 (linux-namespaces.o): New rule.
6671 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6672
6673 2015-06-09 Gary Benson <gbenson@redhat.com>
6674
6675 * hostio.c (handle_open): Process mode argument with
6676 fileio_to_host_mode.
6677
6678 2015-06-01 Yao Qi <yao.qi@linaro.org>
6679
6680 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6681 * linux-x86-low.c: Likewise.
6682
6683 2015-05-28 Don Breazeal <donb@codesourcery.com>
6684
6685 * linux-low.c (handle_extended_wait): Initialize
6686 thread_info.last_resume_kind for new fork children.
6687
6688 2015-05-15 Pedro Alves <palves@redhat.com>
6689
6690 * target.h (target_handle_new_gdb_connection): Rewrite using if
6691 wrapped in do/while.
6692
6693 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6694
6695 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6696 * configure, config.in: Regenerate.
6697 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6698 Declare typedef.
6699
6700 2015-05-12 Don Breazeal <donb@codesourcery.com>
6701
6702 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6703 PTRACE_EVENT_VFORK_DONE.
6704 (linux_low_ptrace_options, extended_event_reported): Add vfork
6705 events.
6706 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6707 and "vforkdone" for RSP 'T' Stop Reply Packet.
6708 * server.h (report_vfork_events): Declare
6709 global variable.
6710
6711 2015-05-12 Don Breazeal <donb@codesourcery.com>
6712
6713 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6714 (the_low_target) <new_fork>: Initialize new member.
6715 * linux-arm-low.c (arm_new_fork): New function.
6716 (the_low_target) <new_fork>: Initialize new member.
6717 * linux-low.c (handle_extended_wait): Call new target function
6718 new_fork.
6719 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6720 * linux-mips-low.c (mips_add_watchpoint): New function
6721 extracted from mips_insert_point.
6722 (the_low_target) <new_fork>: Initialize new member.
6723 (mips_linux_new_fork): New function.
6724 (mips_insert_point): Call mips_add_watchpoint.
6725 * linux-x86-low.c (x86_linux_new_fork): New function.
6726 (the_low_target) <new_fork>: Initialize new member.
6727
6728 2015-05-12 Don Breazeal <donb@codesourcery.com>
6729
6730 * linux-low.c (handle_extended_wait): Implement return value,
6731 rename argument 'event_child' to 'event_lwp', handle
6732 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6733 (linux_low_ptrace_options): New function.
6734 (linux_low_filter_event): Call linux_low_ptrace_options,
6735 use different argument fo linux_enable_event_reporting,
6736 use return value from handle_extended_wait.
6737 (extended_event_reported): New function.
6738 (linux_wait_1): Call extended_event_reported and set
6739 status to report fork events.
6740 (linux_write_memory): Add pid to debug message.
6741 (reset_lwp_ptrace_options_callback): New function.
6742 (linux_handle_new_gdb_connection): New function.
6743 (linux_target_ops): Initialize new structure member.
6744 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6745 * lynx-low.c: Initialize new structure member.
6746 * remote-utils.c (prepare_resume_reply): Implement stop reason
6747 "fork" for "T" stop message.
6748 * server.c (handle_query): Call handle_new_gdb_connection.
6749 * server.h (report_fork_events): Declare global flag.
6750 * target.h (struct target_ops) <handle_new_gdb_connection>:
6751 New member.
6752 (target_handle_new_gdb_connection): New macro.
6753 * win32-low.c: Initialize new structure member.
6754
6755 2015-05-12 Don Breazeal <donb@codesourcery.com>
6756
6757 * mem-break.c (APPEND_TO_LIST): Define macro.
6758 (clone_agent_expr): New function.
6759 (clone_one_breakpoint): New function.
6760 (clone_all_breakpoints): New function.
6761 * mem-break.h: Declare new functions.
6762
6763 2015-05-12 Don Breazeal <donb@codesourcery.com>
6764
6765 * linux-low.c (linux_supports_fork_events): New function.
6766 (linux_supports_vfork_events): New function.
6767 (linux_target_ops): Initialize new structure members.
6768 (initialize_low): Call linux_check_ptrace_features.
6769 * lynx-low.c (lynx_target_ops): Initialize new structure
6770 members.
6771 * server.c (report_fork_events, report_vfork_events):
6772 New global flags.
6773 (handle_query): Add new features to qSupported packet and
6774 response.
6775 (captured_main): Initialize new global variables.
6776 * target.h (struct target_ops) <supports_fork_events>:
6777 New member.
6778 <supports_vfork_events>: New member.
6779 (target_supports_fork_events): New macro.
6780 (target_supports_vfork_events): New macro.
6781 * win32-low.c (win32_target_ops): Initialize new structure
6782 members.
6783
6784 2015-05-12 Gary Benson <gbenson@redhat.com>
6785
6786 * server.c (handle_qxfer_exec_file): Use current process
6787 if annex is empty.
6788
6789 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6790
6791 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6792 Remove HAVE_PTRACE_GETREGS conditionals.
6793 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6794 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6795
6796 2015-05-08 Yao Qi <yao.qi@linaro.org>
6797
6798 * linux-low.c (linux_supports_conditional_breakpoints): New
6799 function.
6800 (linux_target_ops): Install new target method.
6801 * lynx-low.c (lynx_target_ops): Install NULL hook for
6802 supports_conditional_breakpoints.
6803 * nto-low.c (nto_target_ops): Likewise.
6804 * spu-low.c (spu_target_ops): Likewise.
6805 * win32-low.c (win32_target_ops): Likewise.
6806 * server.c (handle_query): Check
6807 target_supports_conditional_breakpoints.
6808 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6809 New field.
6810 (target_supports_conditional_breakpoints): New macro.
6811
6812 2015-05-06 Pedro Alves <palves@redhat.com>
6813
6814 PR server/18081
6815 * server.c (start_inferior): If the process exits, mourn it.
6816
6817 2015-04-21 Gary Benson <gbenson@redhat.com>
6818
6819 * hostio.c (fileio_open_flags_to_host): Factored out to
6820 fileio_to_host_openflags in common/fileio.c. Single use
6821 updated.
6822
6823 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6824
6825 * linux-xtensa-low.c (xtensa_fill_gregset)
6826 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6827 XCHAL_HAVE_LOOP.
6828
6829 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6830
6831 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6832 (regs_info): Replace usrregs pointer with NULL.
6833
6834 2015-04-17 Gary Benson <gbenson@redhat.com>
6835
6836 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6837 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6838 * server.c (handle_qxfer_exec_file): New function.
6839 (qxfer_packets): Add exec-file entry.
6840 (handle_query): Report qXfer:exec-file:read as supported packet.
6841
6842 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6843
6844 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6845
6846 2015-04-09 Gary Benson <gbenson@redhat.com>
6847
6848 * hostio-errno.c (errno_to_fileio_error): Remove function.
6849 Update caller to use remote_fileio_to_fio_error.
6850
6851 2015-04-09 Yao Qi <yao.qi@linaro.org>
6852
6853 * linux-low.c (linux_insert_point): Call
6854 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6855 (linux_remove_point): Call remove_memory_breakpoint if type is
6856 raw_bkpt_type_sw.
6857 * linux-x86-low.c (x86_insert_point): Don't call
6858 insert_memory_breakpoint.
6859 (x86_remove_point): Don't call remove_memory_breakpoint.
6860
6861 2015-04-01 Pedro Alves <palves@redhat.com>
6862 Cleber Rosa <crosa@redhat.com>
6863
6864 * server.c (gdbserver_usage): Reorganize and extend the usage
6865 message.
6866
6867 2015-03-24 Pedro Alves <palves@redhat.com>
6868
6869 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6870 output. Also dump TRAP_TRACE.
6871 (linux_low_filter_event): In debug output, distinguish a
6872 resume_stop SIGSTOP from a delayed SIGSTOP.
6873
6874 2015-03-24 Gary Benson <gbenson@redhat.com>
6875
6876 * linux-x86-low.c (x86_linux_new_thread): Moved to
6877 nat/x86-linux.c.
6878 (x86_linux_prepare_to_resume): Likewise.
6879
6880 2015-03-24 Gary Benson <gbenson@redhat.com>
6881
6882 * Makefile.in (x86-linux-dregs.o): New rule.
6883 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6884 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6885 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6886 (x86_linux_dr_get): Likewise.
6887 (x86_linux_dr_set): Likewise.
6888 (update_debug_registers_callback): Likewise.
6889 (x86_linux_dr_set_addr): Likewise.
6890 (x86_linux_dr_get_addr): Likewise.
6891 (x86_linux_dr_set_control): Likewise.
6892 (x86_linux_dr_get_control): Likewise.
6893 (x86_linux_dr_get_status): Likewise.
6894 (x86_linux_update_debug_registers): Likewise.
6895
6896 2015-03-24 Gary Benson <gbenson@redhat.com>
6897
6898 * linux-x86-low.c (x86_linux_update_debug_registers):
6899 New function, factored out from...
6900 (x86_linux_prepare_to_resume): ...this.
6901
6902 2015-03-24 Gary Benson <gbenson@redhat.com>
6903
6904 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6905 (x86_linux_dr_set): Likewise.
6906 (update_debug_registers_callback): Likewise.
6907 (x86_linux_dr_set_addr): Likewise.
6908 (x86_linux_dr_get_addr): Likewise.
6909 (x86_linux_dr_set_control): Likewise.
6910 (x86_linux_dr_get_control): Likewise.
6911 (x86_linux_dr_get_status): Likewise.
6912 (x86_linux_prepare_to_resume): Likewise.
6913
6914 2015-03-24 Gary Benson <gbenson@redhat.com>
6915
6916 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6917 Use perror_with_name. Pass string through gettext.
6918 (x86_linux_dr_set): Likewise.
6919
6920 2015-03-24 Gary Benson <gbenson@redhat.com>
6921
6922 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6923 (x86_linux_dr_set_addr): ...this.
6924 (x86_dr_low_get_addr): Rename to...
6925 (x86_linux_dr_get_addr): ...this.
6926 (x86_dr_low_set_control): Rename to...
6927 (x86_linux_dr_set_control): ...this.
6928 (x86_dr_low_get_control): Rename to...
6929 (x86_linux_dr_get_control): ...this.
6930 (x86_dr_low_get_status): Rename to...
6931 (x86_linux_dr_get_status): ...this.
6932 (x86_dr_low): Update with new function names.
6933
6934 2015-03-24 Gary Benson <gbenson@redhat.com>
6935
6936 * Makefile.in (x86-linux.o): New rule.
6937 * configure.srv: Add x86-linux.o to relevant targets.
6938 * linux-low.c (lwp_set_arch_private_info): New function.
6939 (lwp_arch_private_info): Likewise.
6940 * linux-x86-low.c: Include nat/x86-linux.h.
6941 (arch_lwp_info): Removed structure.
6942 (update_debug_registers_callback):
6943 Use lwp_set_debug_registers_changed.
6944 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6945 and lwp_set_debug_registers_changed.
6946 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6947
6948 2015-03-24 Gary Benson <gbenson@redhat.com>
6949
6950 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6951 * linux-arm-low.c (arm_new_thread): Likewise.
6952 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6953 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6954 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6955 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6956
6957 2015-03-24 Gary Benson <gbenson@redhat.com>
6958
6959 * linux-low.c (ptid_of_lwp): New function.
6960 (lwp_is_stopped): Likewise.
6961 (lwp_stop_reason): Likewise.
6962 * linux-x86-low.c (update_debug_registers_callback):
6963 Use lwp_is_stopped.
6964 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6965 lwp_stop_reason.
6966
6967 2015-03-24 Gary Benson <gbenson@redhat.com>
6968
6969 * linux-low.h (linux_stop_lwp): Remove declaration.
6970
6971 2015-03-24 Gary Benson <gbenson@redhat.com>
6972
6973 * linux-low.h: Include nat/linux-nat.h.
6974 * linux-low.c (iterate_over_lwps_args): New structure.
6975 (iterate_over_lwps_filter): New function.
6976 (iterate_over_lwps): Likewise.
6977 * linux-x86-low.c (update_debug_registers_callback):
6978 Update signature to what iterate_over_lwps expects.
6979 Remove PID check that iterate_over_lwps now performs.
6980 (x86_dr_low_set_addr): Use iterate_over_lwps.
6981 (x86_dr_low_set_control): Likewise.
6982
6983 2015-03-24 Gary Benson <gbenson@redhat.com>
6984
6985 * linux-x86-low.c (x86_debug_reg_state): New function.
6986 (x86_linux_prepare_to_resume): Use the above.
6987
6988 2015-03-24 Gary Benson <gbenson@redhat.com>
6989
6990 * linux-low.c (current_lwp_ptid): New function.
6991 * linux-x86-low.c: Include nat/linux-nat.h.
6992 (x86_dr_low_get_addr): Use current_lwp_ptid.
6993 (x86_dr_low_get_control): Likewise.
6994 (x86_dr_low_get_status): Likewise.
6995
6996 2015-03-20 Pedro Alves <palves@redhat.com>
6997
6998 * tracepoint.c (cmd_qtstatus): Make "str" const.
6999
7000 2015-03-20 Pedro Alves <palves@redhat.com>
7001
7002 * server.c (handle_general_set): Make "req_str" const.
7003
7004 2015-03-19 Pedro Alves <palves@redhat.com>
7005
7006 * linux-low.c (linux_resume_one_lwp): Rename to ...
7007 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7008 instead call perror_with_name.
7009 (check_ptrace_stopped_lwp_gone): New function.
7010 (linux_resume_one_lwp): Reimplement as wrapper around
7011 linux_resume_one_lwp_throw that swallows errors if the LWP is
7012 gone.
7013
7014 2015-03-19 Pedro Alves <palves@redhat.com>
7015
7016 * linux-low.c (count_events_callback, select_event_lwp_callback):
7017 No longer check whether the thread has resume_stop as last resume
7018 kind.
7019
7020 2015-03-19 Pedro Alves <palves@redhat.com>
7021
7022 * linux-low.c (count_events_callback, select_event_lwp_callback):
7023 Use the lwp's status_pending_p field, not the thread's.
7024
7025 2015-03-19 Pedro Alves <palves@redhat.com>
7026
7027 * linux-low.c (select_event_lwp_callback): Update comments to
7028 no longer mention SIGTRAP.
7029
7030 2015-03-18 Gary Benson <gbenson@redhat.com>
7031
7032 * server.c (handle_query): Do not report vFile:fstat as supported.
7033
7034 2015-03-11 Gary Benson <gbenson@redhat.com>
7035
7036 * hostio.c (sys/types.h): New include.
7037 (sys/stat.h): Likewise.
7038 (common-remote-fileio.h): Likewise.
7039 (handle_fstat): New function.
7040 (handle_vFile): Handle vFile:fstat packets.
7041
7042 2015-03-11 Gary Benson <gbenson@redhat.com>
7043
7044 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7045 struct stat.st_blocks and struct stat.st_blksize.
7046 * configure: Regenerate.
7047 * config.in: Likewise.
7048 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7049 (OBS): Add common-remote-fileio.o.
7050 (common-remote-fileio.o): New rule.
7051
7052 2015-03-09 Pedro Alves <palves@redhat.com>
7053
7054 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7055 'struct sockaddr' pointer in 'accept' call.
7056
7057 2015-03-09 Pedro Alves <palves@redhat.com>
7058
7059 Revert:
7060 2015-03-07 Pedro Alves <palves@redhat.com>
7061 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7062 or <winsock2.h> here. Instead include "gdb_socket.h".
7063 (remote_open): Use union gdb_sockaddr_u.
7064 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7065 or <winsock2.h> here. Instead include "gdb_socket.h".
7066 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7067 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7068 or <sys/un.h>.
7069 (init_named_socket, gdb_agent_helper_thread): Use union
7070 gdb_sockaddr_u.
7071
7072 2015-03-07 Pedro Alves <palves@redhat.com>
7073
7074 * configure.ac (build_warnings): Move
7075 -Wdeclaration-after-statement to the C-specific set.
7076 * configure: Regenerate.
7077
7078 2015-03-07 Pedro Alves <palves@redhat.com>
7079
7080 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7081 or <winsock2.h> here. Instead include "gdb_socket.h".
7082 (remote_open): Use union gdb_sockaddr_u.
7083 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7084 or <winsock2.h> here. Instead include "gdb_socket.h".
7085 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7086 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7087 or <sys/un.h>.
7088 (init_named_socket, gdb_agent_helper_thread): Use union
7089 gdb_sockaddr_u.
7090
7091 2015-03-07 Pedro Alves <palves@redhat.com>
7092
7093 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7094 instead.
7095
7096 2015-03-06 Yao Qi <yao.qi@linaro.org>
7097
7098 * linux-aarch64-low.c (aarch64_insert_point): Use
7099 show_debug_regs as a boolean.
7100 (aarch64_remove_point): Likewise.
7101
7102 2015-03-05 Pedro Alves <palves@redhat.com>
7103
7104 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7105 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7106 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7107 * nto-low.c (nto_target_ops): Likewise.
7108 * spu-low.c (spu_target_ops): Likewise.
7109 * win32-low.c (win32_target_ops): Likewise.
7110
7111 2015-03-04 Pedro Alves <palves@redhat.com>
7112
7113 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7114 Decide whether a breakpoint triggered based on the SIGTRAP's
7115 siginfo.si_code.
7116 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7117 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7118 (linux_low_filter_event): Check for breakpoints before checking
7119 watchpoints.
7120 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7121 siginfo.si_code.
7122 (linux_stopped_by_sw_breakpoint)
7123 (linux_supports_stopped_by_sw_breakpoint)
7124 (linux_stopped_by_hw_breakpoint)
7125 (linux_supports_stopped_by_hw_breakpoint): New functions.
7126 (linux_target_ops): Install new target methods.
7127
7128 2015-03-04 Pedro Alves <palves@redhat.com>
7129
7130 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7131 * server.c (swbreak_feature, hwbreak_feature): New globals.
7132 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7133 (captured_main): Clear swbreak_feature and hwbreak_feature.
7134 * server.h (swbreak_feature, hwbreak_feature): Declare.
7135 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7136 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7137 supports_stopped_by_hw_breakpoint>: New fields.
7138 (target_supports_stopped_by_sw_breakpoint)
7139 (target_stopped_by_sw_breakpoint)
7140 (target_supports_stopped_by_hw_breakpoint)
7141 (target_stopped_by_hw_breakpoint): Declare.
7142
7143 2015-03-04 Pedro Alves <palves@redhat.com>
7144
7145 enum lwp_stop_reason -> enum target_stop_reason
7146 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7147 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7148 (linux_wait_1, stuck_in_jump_pad_callback)
7149 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7150 (linux_stopped_by_watchpoint):
7151 * linux-low.h (enum lwp_stop_reason): Delete.
7152 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7153 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7154
7155 2015-03-04 Yao Qi <yao.qi@linaro.org>
7156
7157 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7158
7159 2015-03-03 Gary Benson <gbenson@redhat.com>
7160
7161 * hostio.c (handle_vFile): Fix prefix lengths.
7162
7163 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7164
7165 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7166 ptr_bits.
7167
7168 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7169
7170 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7171 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7172 (clean): Add "rm -f" for above C files.
7173 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7174 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7175 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7176 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7177 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7178 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7179 (init_registers_s390x_vx_linux64)
7180 (init_registers_s390x_tevx_linux64)
7181 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7182 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7183 declarations.
7184 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7185 (s390_store_vxrs_high): New functions.
7186 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7187 NT_S390_VXRS_HIGH.
7188 (s390_arch_setup): Add logic for selecting one of the new target
7189 descriptions. Activate the new vector regsets if applicable.
7190 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7191 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7192 and init_registers_s390x_tevx_linux64.
7193
7194 2015-03-01 Pedro Alves <palves@redhat.com>
7195
7196 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7197 parameter.
7198
7199 2015-02-27 Pedro Alves <palves@redhat.com>
7200
7201 * linux-x86-low.c (u_debugreg_offset): New function.
7202 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7203
7204 2015-02-27 Pedro Alves <palves@redhat.com>
7205
7206 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7207 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7208 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7209 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7210 (ps_lsetfpregs, ps_getpid)
7211 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7212 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7213 (ps_lsetxregs, ps_plog): Declare.
7214
7215 2015-02-27 Pedro Alves <palves@redhat.com>
7216
7217 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7218 IP_AGENT_EXPORT_FUNC.
7219 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7220 IP_AGENT_EXPORT_FUNC.
7221 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7222 (IP_AGENT_EXPORT): Delete.
7223 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7224 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7225 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7226 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7227 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7228 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7229 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7230 (traceframe_read_count, traceframe_write_count)
7231 (traceframes_created, trace_state_variables, get_raw_reg)
7232 (get_trace_state_variable_value, set_trace_state_variable_value)
7233 (ust_loaded, helper_thread_id, cmd_buf): Use
7234 IPA_SYM_EXPORTED_NAME.
7235 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7236 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7237 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7238 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7239 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7240 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7241 EXTERN_C_PUSH/EXTERN_C_POP.
7242 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7243 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7244 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7245 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7246 (traceframe_write_count, traceframe_read_count)
7247 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7248 (about_to_request_buffer_space, get_trace_state_variable_value)
7249 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7250 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7251 EXTERN_C_PUSH/EXTERN_C_POP.
7252 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7253 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7254 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7255 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7256 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7257 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7258 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7259 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7260 Define.
7261 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7262 (IP_AGENT_EXPORT_VAR_DECL): Define.
7263 (tracing): Declare.
7264 (gdb_agent_get_raw_reg): Declare.
7265
7266 2015-02-27 Tom Tromey <tromey@redhat.com>
7267 Pedro Alves <palves@redhat.com>
7268
7269 Rename symbols whose names are reserved C++ keywords throughout.
7270
7271 2015-02-27 Pedro Alves <palves@redhat.com>
7272
7273 * Makefile.in (COMPILER): New, get it from autoconf.
7274 (CXX): Get from autoconf instead.
7275 (COMPILE.pre): Use COMPILER.
7276 (CC-LD): Rename to ...
7277 (CC_LD): ... this. Use COMPILER.
7278 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7279 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7280 * acinclude.m4: Include build-with-cxx.m4.
7281 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7282 Disable -Werror by default if building in C++ mode.
7283 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7284 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7285 the C++ compiler. Save/restore CXXFLAGS too.
7286 * configure: Regenerate.
7287
7288 2015-02-27 Pedro Alves <palves@redhat.com>
7289
7290 * acinclude.m4: Include libiberty.m4.
7291 * configure.ac: Call libiberty_INIT.
7292 * config.in, configure: Regenerate.
7293
7294 2015-02-26 Pedro Alves <palves@redhat.com>
7295
7296 * linux-low.c (linux_wait_1): When incrementing the PC past a
7297 program breakpoint always use the_low_target.breakpoint_len as
7298 increment, rather than the maximum between that and
7299 the_low_target.decr_pc_after_break.
7300
7301 2015-02-23 Pedro Alves <palves@redhat.com>
7302
7303 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7304 thread was doing a step-over; always adjust the PC if
7305 we stepped over a permanent breakpoint.
7306 (linux_wait_1): If we stepped over breakpoint that was on top of a
7307 permanent breakpoint, manually advance the PC past it.
7308
7309 2015-02-23 Pedro Alves <palves@redhat.com>
7310
7311 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7312 modes.
7313 (x86_fill_gregset, x86_store_gregset): Use it when handling
7314 $orig_eax.
7315
7316 2015-02-20 Pedro Alves <palves@redhat.com>
7317
7318 * thread-db.c: Include "nat/linux-procfs.h".
7319 (thread_db_init): Skip listing new threads if the kernel supports
7320 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7321
7322 2015-02-20 Pedro Alves <palves@redhat.com>
7323
7324 * linux-low.c (status_pending_p_callback): Use ptid_match.
7325
7326 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7327
7328 PR breakpoints/16812
7329 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7330 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7331 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7332
7333 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7334
7335 PR breakpoints/15956
7336 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7337
7338 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7339
7340 * linux-low.c (linux_low_btrace_conf): Print size.
7341 * server.c (handle_btrace_conf_general_set): New.
7342 (hanle_general_set): Call handle_btrace_conf_general_set.
7343 (handle_query): Report Qbtrace-conf:bts:size as supported.
7344
7345 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7346
7347 * linux-low.c (linux_low_enable_btrace): Update parameters.
7348 (linux_low_btrace_conf): New.
7349 (linux_target_ops)<to_btrace_conf>: Initialize.
7350 * server.c (current_btrace_conf): New.
7351 (handle_btrace_enable): Rename to ...
7352 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7353 to target_enable_btrace. Update comment. Update users.
7354 (handle_qxfer_btrace_conf): New.
7355 (qxfer_packets): Add btrace-conf entry.
7356 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7357 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7358 (target_ops)<read_btrace_conf>: New.
7359 (target_enable_btrace): Update parameters.
7360 (target_read_btrace_conf): New.
7361
7362 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7363
7364 * server.c (handle_btrace_general_set): Remove call to
7365 target_supports_btrace.
7366 (supported_btrace_packets): New.
7367 (handle_query): Call supported_btrace_packets.
7368 * target.h: include btrace-common.h.
7369 (btrace_target_info): Removed.
7370 (supports_btrace, target_supports_btrace): Update parameters.
7371
7372 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7373
7374 * Makefile.in (SFILES): Add common/btrace-common.c.
7375 (OBS): Add common/btrace-common.o.
7376 (btrace-common.o): Add build rules.
7377 * linux-low: Include btrace-common.h.
7378 (linux_low_read_btrace): Use struct btrace_data. Call
7379 btrace_data_init and btrace_data_fini.
7380
7381 2015-02-06 Pedro Alves <palves@redhat.com>
7382
7383 * thread-db.c (find_new_threads_callback): Add debug output.
7384
7385 2015-02-04 Pedro Alves <palves@redhat.com>
7386
7387 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7388 (resume_stopped_resumed_lwps): New function.
7389 (linux_wait_for_event_filtered): Use it.
7390
7391 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7392
7393 * Makefile.in (SFILES): Add linux-personality.c.
7394 (linux-personality.o): New rule.
7395 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7396 list of objects to be built.
7397 * linux-low.c: Include nat/linux-personality.h.
7398 (linux_create_inferior): Remove code to disable address space
7399 randomization (moved to ../nat/linux-personality.c). Create
7400 cleanup to disable address space randomization.
7401
7402 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7403
7404 * Makefile.in (posix-strerror.o): New rule.
7405 (mingw-strerror.o): Likewise.
7406 * configure: Regenerated.
7407 * configure.ac: Source file ../common/common.host. Initialize new
7408 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7409
7410 2015-01-14 Yao Qi <yao@codesourcery.com>
7411
7412 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7413 (ppc-linux.o): New rule.
7414 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7415 * configure.ac: AC_CHECK_FUNCS(getauxval).
7416 * config.in: Re-generated.
7417 * configure: Re-generated.
7418 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7419 ppc64_64bit_inferior_p
7420
7421 2015-01-14 Yao Qi <yao@codesourcery.com>
7422
7423 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7424 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7425 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7426 (PT_ORIG_R3, PT_TRAP): Likewise.
7427 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7428 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7429 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7430
7431 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7432
7433 * i387-fp.c (i387_cache_to_xsave): In look over
7434 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7435 zmmh_low_space field by use of zmmh_high_space.
7436
7437 2015-01-09 Pedro Alves <palves@redhat.com>
7438
7439 * linux-low.c (step_over_bkpt): Move higher up in the file.
7440 (handle_extended_wait): Don't store the stop_pc here.
7441 (get_stop_pc): Adjust comments and rename to ...
7442 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7443 stopped for a software breakpoint or hardware breakpoint.
7444 (thread_still_has_status_pending_p): New function.
7445 (status_pending_p_callback): Use
7446 thread_still_has_status_pending_p. If the event is no longer
7447 interesting, resume the LWP.
7448 (handle_tracepoints): Add assert.
7449 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7450 (wstatus_maybe_breakpoint): New function.
7451 (cancel_breakpoint): Delete function.
7452 (check_stopped_by_watchpoint): New function, factored out from
7453 linux_low_filter_event.
7454 (lp_status_maybe_breakpoint): Delete function.
7455 (linux_low_filter_event): Remove filter_ptid argument.
7456 Leave thread group exits pending here. Store the LWP's stop PC.
7457 Always leave events pending.
7458 (linux_wait_for_event_filtered): Pull all events out of the
7459 kernel, and leave them all pending.
7460 (count_events_callback, select_event_lwp_callback): Consider all
7461 events.
7462 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7463 (select_event_lwp): Only give preference to the stepping LWP in
7464 all-stop mode. Adjust comments.
7465 (ignore_event): New function.
7466 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7467 references to cancel_breakpoints. Adjust to renames. Also give
7468 equal priority to all LWPs that have had events in non-stop mode.
7469 If reporting a software breakpoint event, unadjust the LWP's PC.
7470 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7471 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7472 Adjust.
7473 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7474 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7475 (linux_stopped_by_watchpoint): Adjust.
7476 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7477 * linux-low.h (enum lwp_stop_reason): New.
7478 (struct lwp_info) <stop_pc>: Adjust comment.
7479 <stopped_by_watchpoint>: Delete field.
7480 <stop_reason>: New field.
7481 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7482 * mem-break.c (software_breakpoint_inserted_here)
7483 (hardware_breakpoint_inserted_here): New function.
7484 * mem-break.h (software_breakpoint_inserted_here)
7485 (hardware_breakpoint_inserted_here): Declare.
7486 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7487 (cancel_breakpoints): Delete.
7488 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7489 (upload_fast_traceframes): Remove references to
7490 cancel_breakpoints.
7491
7492 2015-01-09 Pedro Alves <palves@redhat.com>
7493
7494 * thread-db.c (find_new_threads_callback): Ignore thread if the
7495 kernel thread ID is -1.
7496
7497 2015-01-09 Pedro Alves <palves@redhat.com>
7498
7499 * linux-low.c (linux_attach_fail_reason_string): Move to
7500 nat/linux-ptrace.c, and rename.
7501 (linux_attach_lwp): Update comment.
7502 (attach_proc_task_lwp_callback): New function.
7503 (linux_attach): Adjust to rename and use
7504 linux_proc_attach_tgid_threads.
7505 (linux_attach_fail_reason_string): Delete declaration.
7506
7507 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7508
7509 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7510 * server.c (gdbserver_version): Likewise.
7511
7512 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7513
7514 * remote-utils.c: Include ctype.h.
7515 (input_interrupt): Explicitly handle the case when the char
7516 received is the NUL byte. Improve the printing of non-ASCII
7517 characters.
7518
7519 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7520
7521 * linux-low.c (linux_low_filter_event): Update call to
7522 linux_enable_event_reporting following the addition of
7523 a new parameter to that function.
7524
7525 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7526
7527 PR server/17457
7528 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7529 (AARCH64_FPCR_REGNO): Likewise.
7530 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7531 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7532 (aarch64_store_fpregset): Likewise.
7533
7534 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7535
7536 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7537 Remove FIXME comment about assumption about N.
7538
7539 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7540
7541 * configure.ac: If large-file support is disabled in GDBserver,
7542 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7543 * configure: Regenerate.
7544
7545 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7546
7547 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7548 warning upon ENODATA from ptrace.
7549 * linux-s390-low.c (s390_store_tdb): New.
7550 (s390_regsets): Add regset for NT_S390_TDB.
7551
7552 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7553
7554 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7555 without a fill_function.
7556 * linux-s390-low.c (s390_fill_last_break): Remove.
7557 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7558 (s390_arch_setup): Use regset's size instead of fill_function for
7559 loop end condition.
7560
7561 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7562
7563 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7564 the regset's store function when ptrace returned an error.
7565 * regcache.c (get_thread_regcache): Invalidate register cache
7566 before fetching inferior's registers.
7567
7568 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7569
7570 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7571 while-loop as for-loop.
7572 (regsets_store_inferior_registers): Likewise.
7573
7574 2014-11-28 Yao Qi <yao@codesourcery.com>
7575
7576 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7577 * config.in, configure: Re-generate.
7578 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7579 is defined.
7580
7581 2014-11-21 Yao Qi <yao@codesourcery.com>
7582
7583 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7584 (AC_CHECK_HEADERS): Remove malloc.h.
7585 * configure: Re-generated.
7586 * config.in: Re-generated.
7587 * server.h: Don't include alloca.h and malloc.h.
7588 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7589 Don't include malloc.h.
7590
7591 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7592
7593 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7594 corresponding ERRNO check in same block.
7595
7596 2014-11-12 Pedro Alves <palves@redhat.com>
7597
7598 * server.c (cont_thread): Update comment.
7599 (start_inferior, attach_inferior): No longer clear cont_thread.
7600 (handle_v_cont): No longer set cont_thread.
7601 (captured_main): Clear cont_thread each time a GDB connects.
7602
7603 2014-11-12 Pedro Alves <palves@redhat.com>
7604
7605 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7606 thread, and don't resume all threads if the Hc thread has exited.
7607
7608 2014-11-12 Pedro Alves <palves@redhat.com>
7609
7610 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7611 the process group instead of to a specific LWP.
7612
7613 2014-10-15 Pedro Alves <palves@redhat.com>
7614
7615 PR server/17487
7616 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7617 parameter.
7618 (arm_set_thread_context): Delete.
7619 (the_low_target): Adjust.
7620 * win32-i386-low.c (debug_registers_changed)
7621 (debug_registers_used): Delete.
7622 (update_debug_registers_callback): New function.
7623 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7624 needing to update their debug registers.
7625 (win32_get_current_dr): New function.
7626 (x86_dr_low_get_addr, x86_dr_low_get_control)
7627 (x86_dr_low_get_status): Fetch the debug register from the thread
7628 record's context.
7629 (i386_initial_stuff): Adjust.
7630 (i386_get_thread_context): Remove current_event parameter. Don't
7631 clear debug_registers_changed nor copy DR values to
7632 debug_reg_state.
7633 (i386_set_thread_context): Delete.
7634 (i386_prepare_to_resume): New function.
7635 (i386_thread_added): Mark the thread as needing to update irs
7636 debug registers.
7637 (the_low_target): Remove i386_set_thread_context and install
7638 i386_prepare_to_resume.
7639 * win32-low.c (win32_get_thread_context): Adjust.
7640 (win32_set_thread_context): Use SetThreadContext
7641 directly.
7642 (win32_prepare_to_resume): New function.
7643 (win32_require_context): New function, factored out from ...
7644 (thread_rec): ... this.
7645 (continue_one_thread): Call win32_prepare_to_resume on each thread
7646 we're about to continue.
7647 (win32_resume): Call win32_prepare_to_resume on the event thread.
7648 * win32-low.h (struct win32_thread_info)
7649 <debug_registers_changed>: New field.
7650 (struct win32_target_ops): Change prototype of set_thread_context,
7651 delete set_thread_context and add prepare_to_resume.
7652 (win32_require_context): New declaration.
7653
7654 2014-10-08 Gary Benson <gbenson@redhat.com>
7655
7656 * server.h: Do not include common-exceptions.h.
7657
7658 2014-10-08 Gary Benson <gbenson@redhat.com>
7659
7660 * server.h: Do not include cleanups.h.
7661
7662 2014-09-30 James Hogan <james.hogan@imgtec.com>
7663
7664 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7665 mips64-dsp-linux.c.
7666
7667 2014-09-23 Yao Qi <yao@codesourcery.com>
7668
7669 * linux-low.c (lp_status_maybe_breakpoint): New function.
7670 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7671 (count_events_callback): Likewise.
7672 (select_event_lwp_callback): Likewise.
7673 (cancel_breakpoints_callback): Likewise.
7674
7675 2014-09-19 Don Breazeal <donb@codesourcery.com>
7676
7677 * linux-low.c (handle_extended_wait): Call
7678 linux_ptrace_get_extended_event.
7679 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7680 linux_is_extended_waitstatus.
7681
7682 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7683
7684 * Makefile.in (CPPFLAGS): Define.
7685 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7686 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7687
7688 2014-09-16 Gary Benson <gbenson@redhat.com>
7689
7690 * inferiors.h (current_inferior): Renamed as...
7691 (current_thread): New variable. All uses updated.
7692 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7693 (maybe_move_out_of_jump_pad): Likewise.
7694 (cancel_breakpoint): Likewise.
7695 (linux_low_filter_event): Likewise.
7696 (wait_for_sigstop): Likewise.
7697 (linux_resume_one_lwp): Likewise.
7698 (need_step_over_p): Likewise.
7699 (start_step_over): Likewise.
7700 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7701 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7702 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7703 and save_inferior as saved_thread.
7704 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7705 saved_thread.
7706 (regcache_invalidate_thread): Likewise.
7707 * remote-utils.c (prepare_resume_reply): Likewise.
7708 * thread-db.c (thread_db_get_tls_address): Likewise.
7709 (disable_thread_event_reporting): Likewise.
7710 (remove_thread_event_breakpoints): Likewise.
7711 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7712 as saved_thread.
7713 * target.h (set_desired_inferior): Renamed as...
7714 (set_desired_thread): New declaration. All uses updated.
7715 * server.c (myresume): Updated comment to reference thread instead
7716 of inferior.
7717 (handle_serial_event): Likewise.
7718 (handle_target_event): Likewise.
7719
7720 2014-09-12 Tom Tromey <tromey@redhat.com>
7721 Gary Benson <gbenson@redhat.com>
7722
7723 * regcache.h: Include common-regcache.h.
7724 (regcache_read_pc): Don't declare.
7725 * regcache.c (get_thread_regcache_for_ptid): New function.
7726
7727 2014-09-11 Tom Tromey <tromey@redhat.com>
7728 Gary Benson <gbenson@redhat.com>
7729
7730 * symbol.c: New file.
7731 * Makefile.in (SFILES): Add symbol.c.
7732 (OBS): Add symbol.o.
7733
7734 2014-09-11 Gary Benson <gbenson@redhat.com>
7735
7736 * target.c (target_stop_ptid, target_continue_ptid): New
7737 functions.
7738
7739 2014-09-11 Tom Tromey <tromey@redhat.com>
7740 Gary Benson <gbenson@redhat.com>
7741
7742 * target.h: Include target/target.h.
7743 * target.c (target_read_memory, target_read_uint32)
7744 (target_write_memory): New functions.
7745
7746 2014-09-11 Gary Benson <gbenson@redhat.com>
7747
7748 * server.h (debug_hw_points): Don't declare.
7749 * server.c (debug_hw_points): Don't define. Replace all uses
7750 with show_debug_regs.
7751 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7752 all uses with show_debug_regs.
7753
7754 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7755
7756 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7757 endianness into account.
7758 (ppc_supply_ptrace_register): Likewise.
7759
7760 2014-09-03 James Hogan <james.hogan@imgtec.com>
7761
7762 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7763 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7764
7765 2014-09-03 Gary Benson <gbenson@redhat.com>
7766
7767 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7768 ALL_DEBUG_ADDRESS_REGISTERS.
7769
7770 2014-09-02 Gary Benson <gbenson@redhat.com>
7771
7772 * i386-low.h: Renamed as...
7773 * x86-low.h: New file. All type, function and variable name
7774 prefixes changed from "i386_" to "x86_". All references updated.
7775 * i386-low.c: Renamed as...
7776 * x86-low.c: New file. All type, function and variable name
7777 prefixes changed from "i386_" to "x86_". All references updated.
7778
7779 2014-09-02 Gary Benson <gbenson@redhat.com>
7780
7781 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7782 (x86_linux_new_thread): Likewise.
7783
7784 2014-08-29 Gary Benson <gbenson@redhat.com>
7785
7786 * server.h (setjmp.h): Do not include.
7787 (toplevel): Do not declare.
7788 (common-exceptions.h): Include.
7789 (cleanups.h): Likewise.
7790 * server.c (toplevel): Do not define.
7791 (exit_code): New static global.
7792 (detach_or_kill_for_exit_cleanup): New function.
7793 (main): New function. Original main renamed to...
7794 (captured_main): New function.
7795 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7796
7797 2014-08-29 Gary Benson <gbenson@redhat.com>
7798
7799 * Makefile.in (SFILES): Add common/common-exceptions.c.
7800 (OBS): Add common-exceptions.o.
7801 (common-exceptions.o): New rule.
7802 * utils.c (prepare_to_throw_exception): New function.
7803
7804 2014-08-29 Gary Benson <gbenson@redhat.com>
7805
7806 * config.in: Regenerate.
7807 * configure: Likewise.
7808
7809 2014-08-29 Gary Benson <gbenson@redhat.com>
7810
7811 * Makefile.in (SFILES): Add common/cleanups.c.
7812 (OBS): cleanups.o.
7813 (cleanups.o): New rule.
7814
7815 2014-08-29 Gary Benson <gbenson@redhat.com>
7816
7817 * utils.c (internal_vwarning): New function.
7818
7819 2014-08-28 Gary Benson <gbenson@redhat.com>
7820
7821 * utils.h (fatal): Remove declaration.
7822 * utils.c (fatal): Remove function.
7823
7824 2014-08-28 Gary Benson <gbenson@redhat.com>
7825
7826 * tracepoint.c (gdb_agent_init): Replace fatal with
7827 perror_with_name.
7828 (initialize_tracepoint): Likewise.
7829
7830 2014-08-28 Gary Benson <gbenson@redhat.com>
7831
7832 * remote-utils.c (remote_prepare): Replace fatal with error.
7833
7834 2014-08-28 Gary Benson <gbenson@redhat.com>
7835
7836 * linux-low.c (linux_async): Replace fatal with warning.
7837 Tidy up and return.
7838 (linux_start_non_stop): Return -1 if linux_async failed.
7839
7840 2014-08-28 Gary Benson <gbenson@redhat.com>
7841
7842 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7843 gdb_assert.
7844 (i386_dr_low_get_addr): Remove vague comment.
7845 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7846 gdb_assert.
7847
7848 2014-08-28 Gary Benson <gbenson@redhat.com>
7849
7850 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7851 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7852 internal_error.
7853 (linux_resume_one_lwp): Likewise.
7854 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7855 gdb_assert.
7856 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7857 with internal_error.
7858 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7859 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7860 (find_register_by_name): Replace fatal with internal_error.
7861 (find_regno): Likewise.
7862 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7863 * thread-db.c (thread_db_create_event): Likewise.
7864 (thread_db_load_search): Likewise.
7865 (try_thread_db_load_1): Likewise.
7866 * tracepoint.c (get_jump_space_head): Replace fatal with
7867 internal_error.
7868 (claim_trampoline_space): Likewise.
7869 (have_fast_tracepoint_trampoline_buffer): Likewise.
7870 (cmd_qtstart): Likewise.
7871 (stop_tracing): Likewise.
7872 (fast_tracepoint_collecting): Likewise.
7873 (target_malloc): Likewise.
7874 (download_tracepoint): Likewise.
7875 (download_trace_state_variables): Replace check with gdb_assert.
7876 (upload_fast_traceframes): Replace fatal with internal_error.
7877
7878 2014-08-19 Tom Tromey <tromey@redhat.com>
7879 Gary Benson <gbenson@redhat.com>
7880
7881 * Makefile.in (SFILES): Add common/common-debug.c.
7882 (OBS): Add common-debug.o.
7883 (common-debug.o): New rule.
7884 * debug.h (debug_printf): Don't declare.
7885 * debug.c (debug_printf): Renamed and rewritten as...
7886 (debug_vprintf): New function.
7887
7888 2014-08-19 Gary Benson <gbenson@redhat.com>
7889
7890 * utils.h: Do not include print-utils.h.
7891
7892 2014-08-19 Tom Tromey <tromey@redhat.com>
7893 Gary Benson <gbenson@redhat.com>
7894
7895 * server.h: Add static assertion.
7896 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7897
7898 2014-08-19 Tom Tromey <tromey@redhat.com>
7899 Gary Benson <gbenson@redhat.com>
7900
7901 * Makefile.in (SFILES): Add common/errors.c.
7902 (OBS): Add errors.o.
7903 (IPA_OBS): Add errors-ipa.o.
7904 (errors.o): New rule.
7905 (errors-ipa.o): Likewise.
7906 * utils.h (perror_with_name, error, warning): Don't declare.
7907 * utils.c (warning): Renamed and rewritten as...
7908 (vwarning): New function.
7909 (error): Renamed and rewritten as...
7910 (verror): New function.
7911 (internal_error): Renamed and rewritten as...
7912 (internal_verror): New function.
7913
7914 2014-08-07 Gary Benson <gbenson@redhat.com>
7915
7916 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7917 * configure: Regenerate.
7918 * config.in: Likewise.
7919 * server.h: Do not include errno.h.
7920 * event-loop.c: Likewise.
7921 * hostio-errno.c: Likewise.
7922 * linux-low.c: Likewise.
7923 * remote-utils.c: Likewise.
7924 * spu-low.c: Likewise.
7925 * utils.c: Likewise.
7926 * gdbreplay.c: Unconditionally include errno.h.
7927
7928 2014-08-07 Gary Benson <gbenson@redhat.com>
7929
7930 * server.h: Do not include string.h.
7931 * event-loop.c: Likewise.
7932 * linux-low.c: Likewise.
7933 * regcache.c: Likewise.
7934 * remote-utils.c: Likewise.
7935 * spu-low.c: Likewise.
7936 * utils.c: Likewise.
7937
7938 2014-08-07 Gary Benson <gbenson@redhat.com>
7939
7940 * server.h: Do not include gdb_assert.h.
7941
7942 2014-08-07 Gary Benson <gbenson@redhat.com>
7943
7944 * server.h: Do not include common-utils.h.
7945
7946 2014-08-07 Gary Benson <gbenson@redhat.com>
7947
7948 * server.h: Do not include ptid.h.
7949 * notif.h: Likewise.
7950
7951 2014-08-07 Gary Benson <gbenson@redhat.com>
7952
7953 * server.h: Do not include gdb_locale.h.
7954
7955 2014-08-07 Gary Benson <gbenson@redhat.com>
7956
7957 * server.h: Do not include gdb/signals.h.
7958 * win32-low.c: Likewise.
7959
7960 2014-08-07 Gary Benson <gbenson@redhat.com>
7961
7962 * server.h: Do not include pathmax.h.
7963
7964 2014-08-07 Gary Benson <gbenson@redhat.com>
7965
7966 * server.h: Do not include libiberty.h.
7967 * linux-bfin-low.c: Likewise.
7968
7969 2014-08-07 Gary Benson <gbenson@redhat.com>
7970
7971 * server.h: Do not include ansidecl.h.
7972
7973 2014-08-07 Gary Benson <gbenson@redhat.com>
7974
7975 * linux-x86-low.c: Do not include stddef.h.
7976 * lynx-ppc-low.c: Likewise.
7977 * tracepoint.c: Likewise.
7978
7979 2014-08-07 Gary Benson <gbenson@redhat.com>
7980
7981 * server.h: Do not include stdarg.h.
7982 * nto-low.c: Likewise.
7983
7984 2014-08-07 Gary Benson <gbenson@redhat.com>
7985
7986 * server.h: Do not include stdlib.h.
7987 * inferiors.c: Likewise.
7988 * linux-low.c: Likewise.
7989 * regcache.c: Likewise.
7990 * spu-low.c: Likewise.
7991 * tracepoint.c: Likewise.
7992 * utils.c: Likewise.
7993
7994 2014-08-07 Gary Benson <gbenson@redhat.com>
7995
7996 * server.h: Do not include stdio.h.
7997 * linux-low.c: Likewise.
7998 * remote-utils.c: Likewise.
7999 * spu-low.c: Likewise.
8000 * utils.c: Likewise.
8001 * wincecompat.c: Likewise.
8002
8003 2014-08-06 Gary Benson <gbenson@redhat.com>
8004
8005 * regcache.c (init_register_cache): Move conditionals inside if.
8006
8007 2014-08-06 Gary Benson <gbenson@redhat.com>
8008
8009 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8010
8011 2014-07-31 Gary Benson <gbenson@redhat.com>
8012
8013 * ax.h: Do not include server.h.
8014 * gdbthread.h: Likewise.
8015 * lynx-low.h: Likewise.
8016 * notif.h: Likewise.
8017
8018 2014-07-30 Gary Benson <gbenson@redhat.com>
8019
8020 * server.h: Include common-defs.h.
8021 Do not include config.h or build-gnulib-gdbserver/config.h.
8022
8023 2014-07-30 Gary Benson <gbenson@redhat.com>
8024
8025 * hostio-errno.c: Move server.h to top of includes list.
8026 * inferiors.c: Likewise.
8027 * linux-x86-low.c: Likewise.
8028 * notif.c: Include server.h.
8029
8030 2014-07-24 Tom Tromey <tromey@redhat.com>
8031 Gary Benson <gbenson@redhat.com>
8032
8033 * server.h (CORE_ADDR): Now unsigned.
8034
8035 2014-07-16 Pedro Alves <palves@redhat.com>
8036
8037 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8038
8039 2014-07-15 Pedro Alves <palves@redhat.com>
8040
8041 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8042 copy.
8043
8044 2014-07-11 Pedro Alves <palves@redhat.com>
8045
8046 * linux-low.c (kill_wait_lwp): New function, based on
8047 kill_one_lwp_callback, but use my_waitpid directly.
8048 (kill_one_lwp_callback, linux_kill): Use it.
8049
8050 2014-06-23 Pedro Alves <palves@redhat.com>
8051
8052 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8053 before setting DR0..DR3.
8054
8055 2014-06-20 Gary Benson <gbenson@redhat.com>
8056
8057 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8058 * configure: Regenerated.
8059 * config.in: Likewise.
8060
8061 2014-06-20 Gary Benson <gbenson@redhat.com>
8062
8063 * Makefile.in (SFILES): Update locations for files moved
8064 from common to nat.
8065 (object file files): Reordered.
8066
8067 2014-06-20 Gary Benson <gbenson@redhat.com>
8068
8069 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8070 (i386_dr_low_set_addr): Likewise.
8071 (i386_dr_low_get_addr): Likewise.
8072 (i386_dr_low_can_set_control): Likewise.
8073 (i386_dr_low_set_control): Likewise.
8074 (i386_dr_low_get_control): Likewise.
8075 (i386_dr_low_get_status): Likewise.
8076 (i386_get_debug_register_length): Likewise.
8077 * linux-x86-low.c (i386_dr_low_set_addr):
8078 Changed signature. Made static.
8079 (i386_dr_low_get_addr): Likewise.
8080 (i386_dr_low_set_control): Likewise.
8081 (i386_dr_low_get_control): Likewise.
8082 (i386_dr_low_get_status): Likewise.
8083 (i386_dr_low): New global variable.
8084 * win32-i386-low.c (i386_dr_low_set_addr):
8085 Changed signature. Made static.
8086 (i386_dr_low_get_addr): Likewise.
8087 (i386_dr_low_set_control): Likewise.
8088 (i386_dr_low_get_control): Likewise.
8089 (i386_dr_low_get_status): Likewise.
8090 (i386_dr_low): New global variable.
8091
8092 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8093
8094 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8095 * Makefile.in (AR, AR_FLAGS): Define.
8096 * configure: Regenerate.
8097
8098 2014-06-19 Gary Benson <gbenson@redhat.com>
8099
8100 * Makefile.in (i386-dregs.o): New rule.
8101 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8102 * i386-low.c (target.h): Remove include.
8103 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8104 (DR_CONTROL_SHIFT): Likewise.
8105 (DR_CONTROL_SIZE): Likewise.
8106 (DR_RW_EXECUTE): Likewise.
8107 (DR_RW_WRITE): Likewise.
8108 (DR_RW_READ): Likewise.
8109 (DR_RW_IORW): Likewise.
8110 (DR_LEN_1): Likewise.
8111 (DR_LEN_2): Likewise.
8112 (DR_LEN_4): Likewise.
8113 (DR_LEN_8): Likewise.
8114 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8115 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8116 (DR_ENABLE_SIZE): Likewise.
8117 (DR_LOCAL_SLOWDOWN): Likewise.
8118 (DR_GLOBAL_SLOWDOWN): Likewise.
8119 (DR_CONTROL_RESERVED): Likewise.
8120 (I386_DR_CONTROL_MASK): Likewise.
8121 (I386_DR_VACANT): Likewise.
8122 (I386_DR_LOCAL_ENABLE): Likewise.
8123 (I386_DR_GLOBAL_ENABLE): Likewise.
8124 (I386_DR_DISABLE): Likewise.
8125 (I386_DR_SET_RW_LEN): Likewise.
8126 (I386_DR_GET_RW_LEN): Likewise.
8127 (I386_DR_WATCH_HIT): Likewise.
8128 (i386_wp_op_t): Likewise.
8129 (i386_show_dr): Likewise.
8130 (i386_length_and_rw_bits): Likewise.
8131 (i386_insert_aligned_watchpoint): Likewise.
8132 (i386_remove_aligned_watchpoint): Likewise.
8133 (i386_handle_nonaligned_watchpoint): Likewise.
8134 i386_update_inferior_debug_regs(): Likewise.
8135 (i386_dr_insert_watchpoint): Likewise.
8136 (i386_dr_remove_watchpoint): Likewise.
8137 (i386_dr_region_ok_for_watchpoint): Likewise.
8138 (i386_dr_stopped_data_address): Likewise.
8139 (i386_dr_stopped_by_watchpoint): Likewise.
8140
8141 2014-06-19 Gary Benson <gbenson@redhat.com>
8142
8143 * i386-low.c (i386_dr_show): Renamed to
8144 i386_show_dr and made static. All uses updated.
8145 (i386_dr_length_and_rw_bits): Renamed to
8146 i386_length_and_rw_bits and made static.
8147 All uses updated.
8148 (i386_dr_insert_aligned_watchpoint): Renamed to
8149 i386_insert_aligned_watchpoint and made static.
8150 All uses updated.
8151 (i386_dr_remove_aligned_watchpoint): Renamed to
8152 i386_remove_aligned_watchpoint and made static.
8153 All uses updated.
8154 (i386_dr_update_inferior_debug_regs): Renamed to
8155 i386_update_inferior_debug_regs and made static.
8156 All uses updated.
8157
8158 2014-06-18 Gary Benson <gbenson@redhat.com>
8159
8160 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8161 (i386_dr_low_can_set_control): Likewise.
8162 (i386_get_debug_register_length): Likewise.
8163 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8164 (i386_dr_low_can_set_control): Likewise.
8165 (i386_get_debug_register_length): Likewise.
8166
8167 2014-06-17 Gary Benson <gbenson@redhat.com>
8168
8169 * i386-low.h (i386-dregs.h): New include.
8170 (DR_FIRSTADDR): Now in i386-dregs.h.
8171 (DR_LASTADDR): Likewise.
8172 (DR_NADDR): Likewise.
8173 (DR_STATUS): Likewise.
8174 (DR_CONTROL): Likewise.
8175 (i386_debug_reg_state): Likewise.
8176 (i386_dr_insert_watchpoint): Likewise.
8177 (i386_dr_remove_watchpoint): Likewise.
8178 (i386_dr_region_ok_for_watchpoint): Likewise.
8179 (i386_dr_stopped_data_address): Likewise.
8180 (i386_dr_stopped_by_watchpoint): Likewise.
8181 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8182
8183 2014-06-18 Gary Benson <gbenson@redhat.com>
8184
8185 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8186 i386_dr_insert_watchpoint.
8187 (i386_low_remove_watchpoint): Renamed to
8188 i386_dr_remove_watchpoint.
8189 (i386_low_region_ok_for_watchpoint): Renamed to
8190 i386_dr_region_ok_for_watchpoint.
8191 (i386_low_stopped_data_address): Renamed to
8192 i386_dr_stopped_data_address.
8193 (i386_low_stopped_by_watchpoint): Renamed to
8194 i386_dr_stopped_by_watchpoint.
8195 * i386-low.c (i386_show_dr): Renamed to
8196 i386_dr_show and made nonstatic. All uses updated.
8197 (i386_length_and_rw_bits): Renamed to
8198 i386_dr_length_and_rw_bits and made nonstatic.
8199 All uses updated.
8200 (i386_insert_aligned_watchpoint): Renamed to
8201 i386_dr_insert_aligned_watchpoint and made nonstatic.
8202 All uses updated.
8203 (i386_remove_aligned_watchpoint): Renamed to
8204 i386_dr_remove_aligned_watchpoint and made nonstatic.
8205 All uses updated.
8206 (i386_update_inferior_debug_regs): Renamed to
8207 i386_dr_update_inferior_debug_regs and made nonstatic.
8208 All uses updated.
8209 (i386_low_insert_watchpoint): Renamed to
8210 i386_dr_insert_watchpoint. All uses updated.
8211 (i386_low_remove_watchpoint): Renamed to
8212 i386_dr_remove_watchpoint. All uses updated.
8213 (i386_low_region_ok_for_watchpoint): Renamed to
8214 i386_dr_region_ok_for_watchpoint. All uses updated.
8215 (i386_low_stopped_data_address): Renamed to
8216 i386_dr_stopped_data_address. All uses updated.
8217 (i386_low_stopped_by_watchpoint): Renamed to
8218 i386_dr_stopped_by_watchpoint. All uses updated.
8219
8220 2014-06-18 Gary Benson <gbenson@redhat.com>
8221
8222 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8223 (i386_dr_low_can_set_control): Likewise.
8224 (i386_insert_aligned_watchpoint): New check.
8225
8226 2014-06-18 Gary Benson <gbenson@redhat.com>
8227
8228 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8229 Renamed to state.
8230
8231 2014-06-18 Gary Benson <gbenson@redhat.com>
8232
8233 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8234 instead of fatal and error.
8235 (i386_handle_nonaligned_watchpoint): Likewise.
8236
8237 2014-06-18 Gary Benson <gbenson@redhat.com>
8238
8239 * i386-low.c (i386_get_debug_register_length): New macro.
8240 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8241 (i386_show_dr): Use debug_printf instead of fprintf. Use
8242 phex to format values.
8243
8244 2014-06-18 Gary Benson <gbenson@redhat.com>
8245
8246 * i386-low.h: Comment changes.
8247 * i386-low.c: Likewise.
8248
8249 2014-06-18 Gary Benson <gbenson@redhat.com>
8250
8251 * i386-low.c: Whitespace changes.
8252
8253 2014-06-12 Tom Tromey <tromey@redhat.com>
8254
8255 * utils.c (freeargv): Remove.
8256
8257 2014-06-12 Tom Tromey <tromey@redhat.com>
8258
8259 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8260 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8261 (parse_debug_format_options): Likewise.
8262 (gdbserver_usage): Likewise.
8263 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8264 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8265 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8266 against libiberty.
8267 ($(LIBGNU)): Depend on libiberty.
8268 (all-lib): Recurse into all subdirs.
8269 (install-only): Invoke "install" target in subdirs.
8270 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8271 targets.
8272 * configure: Rebuild.
8273 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8274 for vasprintf, vsnprintf, or gettimeofday.
8275 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8276 srv_tgtobj.
8277
8278 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8279
8280 * development.sh: Delete.
8281 * Makefile.in (config.status): Adjust dependency on development.sh.
8282 * configure.ac: Adjust development.sh source call.
8283 * configure: Regenerate.
8284
8285 2014-06-02 Pedro Alves <palves@redhat.com>
8286
8287 * ax.c (gdb_free_agent_expr): New function.
8288 * ax.h (gdb_free_agent_expr): New declaration.
8289 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8290 list.
8291 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8292 static.
8293 (clear_breakpoint_conditions_and_commands): New function.
8294 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8295 (clear_breakpoint_conditions_and_commands): New declaration.
8296
8297 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8298
8299 * linux-aarch64-low.c (asm/ptrace.h): Include.
8300
8301 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8302
8303 Fix TLS access for -static -pthread.
8304 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8305 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8306 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8307
8308 2014-05-20 Pedro Alves <palves@redhat.com>
8309
8310 * linux-aarch64-low.c (aarch64_insert_point)
8311 (aarch64_remove_point): No longer check whether the type is
8312 supported here. Adjust to new interface.
8313 (the_low_target): Install aarch64_supports_z_point_type as
8314 supports_z_point_type method.
8315 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8316 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8317 instead of a Z packet char. Adjust.
8318 (arm_supports_z_point_type): New function.
8319 (arm_insert_point, arm_remove_point): Adjust to new interface.
8320 (the_low_target): Install arm_supports_z_point_type.
8321 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8322 (cris_insert_point, cris_remove_point): Adjust to new interface.
8323 Don't check whether the type is supported here.
8324 (the_low_target): Install cris_supports_z_point_type.
8325 * linux-low.c (linux_supports_z_point_type): New function.
8326 (linux_insert_point, linux_remove_point): Adjust to new interface.
8327 * linux-low.h (struct linux_target_ops) <insert_point,
8328 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8329 raw_breakpoint pointer parameter.
8330 <supports_z_point_type>: New method.
8331 * linux-mips-low.c (mips_supports_z_point_type): New function.
8332 (mips_insert_point, mips_remove_point): Adjust to new interface.
8333 Use mips_supports_z_point_type.
8334 (the_low_target): Install mips_supports_z_point_type.
8335 * linux-ppc-low.c (the_low_target): Install NULL as
8336 supports_z_point_type method.
8337 * linux-s390-low.c (the_low_target): Install NULL as
8338 supports_z_point_type method.
8339 * linux-sparc-low.c (the_low_target): Install NULL as
8340 supports_z_point_type method.
8341 * linux-x86-low.c (x86_supports_z_point_type): New function.
8342 (x86_insert_point): Adjust to new insert_point interface. Use
8343 insert_memory_breakpoint. Adjust to new
8344 i386_low_insert_watchpoint interface.
8345 (x86_remove_point): Adjust to remove_point interface. Use
8346 remove_memory_breakpoint. Adjust to new
8347 i386_low_remove_watchpoint interface.
8348 (the_low_target): Install x86_supports_z_point_type.
8349 * lynx-low.c (lynx_target_ops): Install NULL as
8350 supports_z_point_type callback.
8351 * nto-low.c (nto_supports_z_point_type): New.
8352 (nto_insert_point, nto_remove_point): Adjust to new interface.
8353 (nto_target_ops): Install nto_supports_z_point_type.
8354 * mem-break.c: Adjust intro comment.
8355 (struct raw_breakpoint) <raw_type, size>: New fields.
8356 <inserted>: Update comment.
8357 <shlib_disabled>: Delete field.
8358 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8359 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8360 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8361 (raw_bkpt_type_to_target_hw_bp_type): New function.
8362 (find_enabled_raw_code_breakpoint_at): New function.
8363 (find_raw_breakpoint_at): New type and size parameters. Use them.
8364 (insert_memory_breakpoint): New function, based off
8365 set_raw_breakpoint_at.
8366 (remove_memory_breakpoint): New function.
8367 (set_raw_breakpoint_at): Reimplement.
8368 (set_breakpoint): New, based on set_breakpoint_at.
8369 (set_breakpoint_at): Reimplement.
8370 (delete_raw_breakpoint): Go through the_target->remove_point
8371 instead of assuming memory breakpoints.
8372 (find_gdb_breakpoint_at): Delete.
8373 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8374 (find_gdb_breakpoint): New function.
8375 (set_gdb_breakpoint_at): Delete.
8376 (z_type_supported): New function.
8377 (set_gdb_breakpoint_1): New function, loosely based off
8378 set_gdb_breakpoint_at.
8379 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8380 (delete_gdb_breakpoint_at): Delete.
8381 (delete_gdb_breakpoint_1): New function, loosely based off
8382 delete_gdb_breakpoint_at.
8383 (delete_gdb_breakpoint): New function.
8384 (clear_gdb_breakpoint_conditions): Rename to ...
8385 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8386 breakpoint.
8387 (add_condition_to_breakpoint): Make static.
8388 (add_breakpoint_condition): Take a struct breakpoint pointer
8389 instead of an address. Adjust.
8390 (gdb_condition_true_at_breakpoint): Rename to ...
8391 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8392 z_type parameter.
8393 (gdb_condition_true_at_breakpoint): Reimplement.
8394 (add_breakpoint_commands): Take a struct breakpoint pointer
8395 instead of an address. Adjust.
8396 (gdb_no_commands_at_breakpoint): Rename to ...
8397 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8398 parameter. Return true if no breakpoint was found. Change debug
8399 output.
8400 (gdb_no_commands_at_breakpoint): Reimplement.
8401 (run_breakpoint_commands): Rename to ...
8402 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8403 and change return type to boolean.
8404 (run_breakpoint_commands): New function.
8405 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8406 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8407 breakpoint. Go through the_target->remove_point instead of
8408 assuming memory breakpoint.
8409 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8410 software and hardware breakpoints.
8411 (reinsert_raw_breakpoint): Go through the_target->insert_point
8412 instead of assuming memory breakpoint.
8413 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8414 software and hardware breakpoints.
8415 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8416 Check both software and hardware breakpoints.
8417 (validate_inserted_breakpoint): Assert the breakpoint is a
8418 software breakpoint. Set the inserted flag to -1 instead of
8419 setting shlib_disabled.
8420 (delete_disabled_breakpoints): Adjust.
8421 (validate_breakpoints): Only validate software breakpoints.
8422 Adjust to inserted flag change.
8423 (check_mem_read, check_mem_write): Skip breakpoint types other
8424 than software breakpoints. Adjust to inserted flag change.
8425 * mem-break.h (enum raw_bkpt_type): New enum.
8426 (raw_breakpoint, struct process_info): Forward declare.
8427 (Z_packet_to_target_hw_bp_type): Delete declaration.
8428 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8429 (set_gdb_breakpoint, delete_gdb_breakpoint)
8430 (clear_breakpoint_conditions): New declarations.
8431 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8432 (breakpoint_inserted_here): Update comment.
8433 (add_breakpoint_condition, add_breakpoint_commands): Replace
8434 address parameter with a breakpoint pointer parameter.
8435 (gdb_breakpoint_here): Update comment.
8436 (delete_gdb_breakpoint_at): Delete.
8437 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8438 * server.c (process_point_options): Take a struct breakpoint
8439 pointer instead of an address. Adjust.
8440 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8441 delete_gdb_breakpoint.
8442 * spu-low.c (spu_target_ops): Install NULL as
8443 supports_z_point_type method.
8444 * target.h: Include mem-break.h.
8445 (struct target_ops) <prepare_to_access_memory>: Update comment.
8446 <supports_z_point_type>: New field.
8447 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8448 instead of a char. Also take a raw breakpoint pointer.
8449 * win32-arm-low.c (the_low_target): Install NULL as
8450 supports_z_point_type.
8451 * win32-i386-low.c (i386_supports_z_point_type): New function.
8452 (i386_insert_point, i386_remove_point): Adjust to new interface.
8453 (the_low_target): Install i386_supports_z_point_type.
8454 * win32-low.c (win32_supports_z_point_type): New function.
8455 (win32_insert_point, win32_remove_point): Adjust to new interface.
8456 (win32_target_ops): Install win32_supports_z_point_type.
8457 * win32-low.h (struct win32_target_ops):
8458 <supports_z_point_type>: New method.
8459 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8460 instead of a char. Also take a raw breakpoint pointer.
8461
8462 2014-05-20 Pedro Alves <palves@redhat.com>
8463
8464 * mem-break.h: Include break-common.h.
8465 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8466 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8467 (Z_packet_to_target_hw_bp_type): New declaration.
8468 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8469 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8470 (Z_PACKET_ACCESS_WP): Delete macros.
8471 (Z_packet_to_hw_type): Delete function.
8472 * i386-low.h: Don't include break-common.h here.
8473 (Z_packet_to_hw_type): Delete declaration.
8474 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8475 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8476 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8477 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8478 * linux-aarch64-low.c: Don't include break-common.h here.
8479 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8480 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8481 (Z_packet_to_target_hw_bp_type): Delete function.
8482 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8483 function.
8484 (mips_insert_point, mips_remove_point): Use
8485 Z_packet_to_target_hw_bp_type.
8486
8487 2014-05-20 Pedro Alves <palves@redhat.com>
8488
8489 * linux-aarch64-low.c: Include break-common.h.
8490 (enum target_point_type): Delete.
8491 (Z_packet_to_point_type): Rename to ...
8492 (Z_packet_to_target_hw_bp_type): ... this, and return a
8493 target_hw_bp_type instead.
8494 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8495 instead of an enum target_point_type.
8496 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8497 breakpoint type.
8498 (aarch64_dr_state_insert_one_point)
8499 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8500 (aarch64_handle_aligned_watchpoint)
8501 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8502 Take an enum target_hw_bp_type instead of an enum
8503 target_point_type.
8504 (aarch64_supports_z_point_type): New function.
8505 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8506 use Z_packet_to_target_hw_bp_type.
8507
8508 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8509
8510 * configure.ac: Only use -Werror by default when DEVELOPMENT
8511 is true.
8512 * configure: Regenerate.
8513
8514 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8515
8516 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8517 * linux-x86-low.c (X86_64_USER_REGS): New.
8518 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8519
8520 2014-04-28 Yao Qi <yao@codesourcery.com>
8521
8522 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8523 name.
8524
8525 2014-04-25 Pedro Alves <palves@redhat.com>
8526
8527 PR server/16255
8528 * linux-low.c (linux_attach_fail_reason_string): New function.
8529 (linux_attach_lwp): Delete.
8530 (linux_attach_lwp_1): Rename to ...
8531 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8532 argument. Remove "initial" parameter. Return int instead of
8533 void. Don't error or warn here.
8534 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8535 failure to attach to the tgid. Call warning when failing to
8536 attach to an lwp.
8537 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8538 argument. Remove "initial" parameter. Return int instead of
8539 void. Don't error or warn here.
8540 (linux_attach_fail_reason_string): New declaration.
8541 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8542 interface change. Use linux_attach_fail_reason_string.
8543
8544 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8545 Walfred Tedeschi <walfred.tedeschi@intel.com>
8546
8547 * Makefile.in: Added rules to handle new files
8548 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8549 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8550 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8551 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8552 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8553 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8554 x32-avx512-linux.o.
8555 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8556 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8557 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8558 i386/x32-avx512.xml.
8559 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8560 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8561 i386/x32-avx512-linux.xml.
8562 * i387-fp.c (num_avx512_k_registers): New constant for number
8563 of K registers.
8564 (num_avx512_zmmh_low_registers): New constant for number of
8565 lower ZMM registers (0-15).
8566 (num_avx512_zmmh_high_registers): New constant for number of
8567 higher ZMM registers (16-31).
8568 (num_avx512_ymmh_registers): New contant for number of higher
8569 YMM registers (ymm16-31 added by avx521 on x86_64).
8570 (num_avx512_xmm_registers): New constant for number of higher
8571 XMM registers (xmm16-31 added by AVX512 on x86_64).
8572 (struct i387_xsave): Add space for AVX512 registers.
8573 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8574 Add code to handle AVX512 registers.
8575 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8576 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8577 prototypei from generated file.
8578 (tdesc_amd64_avx512_linux): Likewise.
8579 (init_registers_x32_avx512_linux): Likewise.
8580 (tdesc_x32_avx512_linux): Likewise.
8581 (init_registers_i386_avx512_linux): Likewise.
8582 (tdesc_i386_avx512_linux): Likewise.
8583 (x86_64_regmap): Add AVX512 registers.
8584 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8585 mask.
8586 (initialize_low_arch): Add code to initialize AVX512 registers.
8587
8588 2014-04-23 Pedro Alves <palves@redhat.com>
8589
8590 * mem-break.c (find_gdb_breakpoint_at): Make static.
8591 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8592
8593 2014-04-23 Pedro Alves <palves@redhat.com>
8594
8595 * i386-low.c: Don't include break-common.h here.
8596 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8597 prototype to take target_hw_bp_type as argument instead of a Z
8598 packet char.
8599 * i386-low.h: Include break-common.h here.
8600 (Z_packet_to_hw_type): Declare.
8601 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8602 prototypes.
8603 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8604 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8605 (x86_remove_point): Convert the packet number to a
8606 target_hw_bp_type before calling i386_low_remove_watchpoint.
8607 * win32-i386-low.c (i386_insert_point): Convert the packet number
8608 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8609 (i386_remove_point): Convert the packet number to a
8610 target_hw_bp_type before calling i386_low_remove_watchpoint.
8611
8612 2014-04-23 Pedro Alves <palves@redhat.com>
8613
8614 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8615
8616 2014-04-10 Pedro Alves <palves@redhat.com>
8617
8618 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8619 Check if the condition or command is NULL before checking if the
8620 breakpoint is known. On success, return true.
8621 * mem-break.h (add_breakpoint_condition): Document return.
8622 (add_breakpoint_commands): Add describing comment.
8623 * server.c (skip_to_semicolon): New function.
8624 (process_point_options): Use it.
8625
8626 2014-04-09 Pedro Alves <palves@redhat.com>
8627
8628 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8629 to lwpid_of.
8630
8631 2014-02-27 Pedro Alves <palves@redhat.com>
8632
8633 PR 12702
8634 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8635 macros.
8636 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8637 output.
8638 (last_thread_of_process_p): Take a PID argument instead of a
8639 thread pointer.
8640 (linux_wait_for_lwp): Delete.
8641 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8642 functions.
8643 (linux_low_filter_event): New function, party factored out from
8644 linux_wait_for_event.
8645 (linux_wait_for_event): Rename to ...
8646 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8647 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8648 sigsuspend. Check for zombie leaders.
8649 (linux_wait_for_event): Reimplement as wrapper around
8650 linux_wait_for_event_filtered.
8651 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8652 a normal or signal exit is seen, it's the whole process exiting.
8653 (wait_for_sigstop): No longer a for_each_inferior callback.
8654 Rewrite on top of linux_wait_for_event_filtered.
8655 (stop_all_lwps): Call wait_for_sigstop directly.
8656 * server.c (resume, handle_target_event): Handle
8657 TARGET_WAITKIND_NO_RESUMED.
8658
8659 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8660
8661 * win32-low.c (psapi_get_dll_name,
8662 * win32_CreateToolhelp32Snapshot): Delete.
8663 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8664 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8665 Delete.
8666 (handle_load_dll): Add function description.
8667 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8668
8669 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8670
8671 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8672 Add comment.
8673 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8674 base address when calling win32_add_one_solib.
8675 (handle_load_dll): Delete local variable load_addr.
8676 Remove 0x1000 offset applied to DLL base address when calling
8677 win32_add_one_solib.
8678 (handle_unload_dll): Add comment.
8679
8680 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8681
8682 * win32-low.c (win32_add_all_dlls): Renames
8683 win32_ensure_ntdll_loaded. Rewrite function documentation.
8684 Adjust implementation to always load all DLLs.
8685 Add 0x1000 offset to DLL base address when calling
8686 win32_add_one_solib.
8687 (child_initialization_done): New static global.
8688 (do_initial_child_stuff): Set child_initialization_done to
8689 zero during child initialization, and 1 after. Replace call
8690 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8691 Add comment.
8692 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8693 (handle_unload_dll): Add function documentation.
8694 (get_child_debug_event): Ignore load and unload DLL events
8695 during child initialization.
8696
8697 2014-02-20 Doug Evans <dje@google.com>
8698
8699 Remove global all_lwps.
8700 * inferiors.h (ptid_of): Move here from linux-low.h.
8701 (pid_of, lwpid_of): Ditto.
8702 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8703 parameter is a struct thread_info * now.
8704 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8705 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8706 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8707 directly.
8708 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8709 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8710 * linux-arm-low.c (update_registers_callback): Update, "entry"
8711 parameter is a struct thread_info * now.
8712 Fetch lwpid from current_inferior directly.
8713 (arm_insert_point): Pass &all_threads to find_inferior instead of
8714 &all_lwps.
8715 (arm_remove_point): Ditto.
8716 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8717 (arm_prepare_to_resume): Fetch pid from thread.
8718 (arm_read_description): Fetch lwpid from current_inferior directly.
8719 * linux-low.c (all_lwps): Delete.
8720 (delete_lwp): Delete call to remove_inferior.
8721 (handle_extended_wait): Fetch lwpid from thread.
8722 (add_lwp): Don't set lwp->entry.id. Remove call to
8723 add_inferior_to_list.
8724 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8725 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8726 (kill_one_lwp_callback): Ditto.
8727 (linux_kill): Don't dereference NULL pointer.
8728 Fetch ptid,lwpid from thread.
8729 (get_detach_signal): Fetch ptid from thread.
8730 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8731 Simplify call to regcache_invalidate_thread.
8732 (delete_lwp_callback): Update, "entry" parameter is a
8733 struct thread_info * now. Fetch pid from thread.
8734 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8735 (status_pending_p_callback): Update, "entry" parameter is a
8736 struct thread_info * now. Fetch ptid from thread.
8737 (find_lwp_pid): Update, "entry" parameter is a
8738 struct thread_info * now.
8739 (linux_wait_for_lwp): Fetch pid from thread.
8740 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8741 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8742 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8743 (dequeue_one_deferred_signal): Ditto.
8744 (cancel_breakpoint): Fetch ptid from current_inferior.
8745 (linux_wait_for_event): Pass &all_threads to find_inferior,
8746 not &all_lwps. Fetch ptid, lwpid from thread.
8747 (count_events_callback): Update, "entry" parameter is a
8748 struct thread_info * now.
8749 (select_singlestep_lwp_callback): Ditto.
8750 (select_event_lwp_callback): Ditto.
8751 (cancel_breakpoints_callback): Ditto.
8752 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8753 not &all_lwps.
8754 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8755 (unsuspend_one_lwp): Update, "entry" parameter is a
8756 struct thread_info * now.
8757 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8758 not &all_lwps.
8759 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8760 Fetch lwpid from thread, not lwp.
8761 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8762 Pass &all_threads to find_inferior, not &all_lwps.
8763 (send_sigstop): Fetch lwpid from thread, not lwp.
8764 (send_sigstop_callback): Update, "entry" parameter is a
8765 struct thread_info * now.
8766 (suspend_and_send_sigstop_callback): Ditto.
8767 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8768 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8769 struct thread_info * now.
8770 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8771 from thread, lwp.
8772 (lwp_running): Update, "entry" parameter is a
8773 struct thread_info * now.
8774 (stop_all_lwps): Fetch ptid from thread.
8775 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8776 (linux_resume_one_lwp): Fetch lwpid from thread.
8777 (linux_set_resume_request): Update, "entry" parameter is a
8778 struct thread_info * now. Fetch pid, lwpid from thread.
8779 (resume_status_pending_p): Update, "entry" parameter is a
8780 struct thread_info * now.
8781 (need_step_over_p): Ditto. Fetch lwpid from thread.
8782 (start_step_over): Fetch lwpid from thread.
8783 (linux_resume_one_thread): Update, "entry" parameter is a
8784 struct thread_info * now. Fetch lwpid from thread.
8785 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8786 (proceed_one_lwp): Update, "entry" parameter is a
8787 struct thread_info * now. Fetch lwpid from thread.
8788 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8789 struct thread_info * now.
8790 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8791 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8792 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8793 directly.
8794 (regsets_store_inferior_registers): Ditto.
8795 (fetch_register, store_register): Ditto.
8796 (linux_read_memory, linux_write_memory): Ditto.
8797 (linux_request_interrupt): Ditto.
8798 (linux_read_auxv): Ditto.
8799 (linux_xfer_siginfo): Ditto.
8800 (linux_qxfer_spu): Ditto.
8801 (linux_qxfer_libraries_svr4): Ditto.
8802 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8803 moved to inferiors.h.
8804 (get_lwp): Delete.
8805 (get_thread_lwp): Update.
8806 (struct lwp_info): Delete member "entry". Simplify comment for
8807 member "thread".
8808 (all_lwps): Delete.
8809 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8810 current_inferior directly.
8811 (update_watch_registers_callback): Update, "entry" parameter is a
8812 struct thread_info * now. Fetch pid from thread.
8813 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8814 (mips_insert_point): Fetch lwpid from current_inferior.
8815 Pass &all_threads to find_inferior, not &all_lwps.
8816 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8817 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8818 directly.
8819 (mips_stopped_data_address): Ditto.
8820 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8821 directly.
8822 * linux-tile-low.c (tile_arch_setup): Ditto.
8823 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8824 (update_debug_registers_callback): Update, "entry" parameter is a
8825 struct thread_info * now. Fetch pid from thread.
8826 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8827 Pass &all_threads to find_inferior, not &all_lwps.
8828 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8829 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8830 Pass &all_threads to find_inferior, not &all_lwps.
8831 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8832 (i386_dr_low_get_status): Ditto.
8833 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8834 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8835 (x86_linux_read_description): Ditto.
8836 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8837
8838 2014-02-20 Doug Evans <dje@google.com>
8839
8840 * inferiors.c (get_first_inferior): Fix buglet.
8841
8842 2014-02-19 Doug Evans <dje@google.com>
8843
8844 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8845 * inferiors.c (add_thread): Change result type to struct thread_info *.
8846 All callers updated.
8847 (add_lwp): Call add_thread here instead of in callers.
8848 All callers updated.
8849 * linux-low.h (get_lwp_thread): Rewrite.
8850 (struct lwp_info): New member "thread".
8851
8852 2014-02-19 Doug Evans <dje@google.com>
8853
8854 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8855 All callers updated.
8856
8857 2014-02-19 Doug Evans <dje@google.com>
8858
8859 * inferiors.c (add_thread): Fix whitespace.
8860
8861 2014-02-19 Doug Evans <dje@google.com>
8862
8863 * dll.c (clear_dlls): Replace accessing list implemention details
8864 with API function.
8865 * gdbthread.h (get_first_thread): Declare.
8866 * inferiors.c (for_each_inferior_with_data): New function.
8867 (get_first_thread): New function.
8868 (find_thread_ptid): Simplify.
8869 (get_first_inferior): New function.
8870 (clear_list): Delete.
8871 (one_inferior_p): New function.
8872 (clear_inferior_list): New function.
8873 (clear_inferiors): Update.
8874 * inferiors.h (for_each_inferior_with_data): Declare.
8875 (clear_inferior_list): Declare.
8876 (one_inferior_p): Declare.
8877 (get_first_inferior): Declare.
8878 * linux-low.c (linux_wait_for_event): Replace accessing list
8879 implemention details with API function.
8880 * server.c (target_running): Ditto.
8881 (accumulate_file_name_length): New function.
8882 (emit_dll_description): New function.
8883 (handle_qxfer_libraries): Replace accessing list implemention
8884 details with API function.
8885 (handle_qxfer_threads_worker): New function.
8886 (handle_qxfer_threads_proper): Replace accessing list implemention
8887 details with API function.
8888 (handle_query): Ditto.
8889 (visit_actioned_threads_callback_ftype): New typedef.
8890 (visit_actioned_threads_data): New struct.
8891 (visit_actioned_threads): Rewrite to be find_inferior callback.
8892 (resume): Call find_inferior.
8893 (handle_status): Replace accessing list implemention
8894 details with API function.
8895 (process_serial_event): Replace accessing list implemention details
8896 with API function.
8897 * target.c (set_desired_inferior): Replace accessing list implemention
8898 details with API function.
8899 * tracepoint.c (same_process_p): New function.
8900 (gdb_agent_about_to_close): Replace accessing list implemention
8901 details with API function.
8902 * win32-low.c (child_delete_thread): Replace accessing list
8903 implemention details with API function.
8904 (match_dll_by_basename): New function.
8905 (dll_is_loaded_by_basename): New function.
8906 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8907 details call to dll_is_loaded_by_basename.
8908
8909 2014-02-19 Doug Evans <dje@google.com>
8910
8911 * dll.h (struct dll_info): Add comment.
8912 * gdbthread.h (struct thread_info): Add comment.
8913 (current_ptid): Simplify.
8914 * inferiors.c (add_process): Update.
8915 (remove_process): Update.
8916 * inferiors.h (struct process_info): Rename member "head" to "entry".
8917 * linux-low.c (delete_lwp): Update.
8918 (add_lwp): Update.
8919 (last_thread_of_process_p): Update.
8920 (kill_one_lwp_callback, linux_kill): Update.
8921 (status_pending_p_callback): Update.
8922 (wait_for_sigstop): Update. Simplify read of ptid.
8923 (start_step_over): Update.
8924 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8925 (get_lwp_thread): Update.
8926 (struct lwp_info): Rename member "head" to "entry".
8927 * regcache.h (inferior_list_entry): Delete.
8928 * server.c (kill_inferior_callback): Update.
8929 (detach_or_kill_inferior_callback): Update.
8930 (print_started_pid): Update.
8931 (print_attached_pid): Update.
8932 (process_serial_event): Simplify read of ptid.
8933 * thread-db.c (thread_db_create_event): Update.
8934 (thread_db_get_tls_address): Update.
8935 * win32-low.c (current_inferior_ptid): Simplify.
8936
8937 2014-02-19 Tom Tromey <tromey@redhat.com>
8938
8939 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8940 argument.
8941 (target_supports_btrace): Update.
8942
8943 2014-02-14 Yao Qi <yao@codesourcery.com>
8944
8945 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8946 (rsp-low-ipa.o): New target.
8947
8948 2014-02-12 Tom Tromey <tromey@redhat.com>
8949
8950 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8951 convert_ascii_to_int.
8952 * regcache.c (registers_to_string): Likewise.
8953 * remote-utils.c (decode_M_packet): Likewise.
8954 * server.c (process_serial_event): Likewise.
8955
8956 2014-02-12 Tom Tromey <tromey@redhat.com>
8957
8958 * server.c (handle_query, handle_v_run): Use hex2bin, not
8959 unhexify.
8960 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8961
8962 2014-02-12 Tom Tromey <tromey@redhat.com>
8963
8964 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8965 convert_int_to_ascii.
8966 * regcache.c (registers_to_string, collect_register_as_string):
8967 Likewise.
8968 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8969 Likewise.
8970 * server.c (process_serial_event): Likewise.
8971 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8972 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8973
8974 2014-02-12 Tom Tromey <tromey@redhat.com>
8975
8976 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8977 bin2hex, not hexify.
8978 * tracepoint.c (cmd_qtstatus): Likewise.
8979
8980 2014-02-12 Tom Tromey <tromey@redhat.com>
8981
8982 * remote-utils.c (monitor_output): Pass explicit length to
8983 hexify.
8984
8985 2014-02-12 Tom Tromey <tromey@redhat.com>
8986
8987 * tracepoint.c: Include rsp-low.h.
8988 * server.c: Include rsp-low.h.
8989 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8990 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8991 declare.
8992 * remote-utils.c: Include rsp-low.h.
8993 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8994 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8995 (convert_int_to_ascii, convert_ascii_to_int): Move to
8996 common/rsp-low.c.
8997 * regcache.c: Include rsp-low.h.
8998 * ax.c: Include rsp-low.h.
8999 * Makefile.in (SFILES): Add common/rsp-low.c.
9000 (OBS): Add rsp-low.o.
9001 (rsp-low.o): New target.
9002
9003 2014-02-12 Tom Tromey <tromey@redhat.com>
9004
9005 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9006 Include print-utils.h.
9007 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9008 (plongest, thirty_two, phex_nz): Remove.
9009 * Makefile.in (SFILES): Add common/print-utils.c.
9010 (OBS): Add print-utils.o.
9011 (print-utils-ipa.o): New target.
9012 (print-utils.o): New target.
9013 (IPA_OBJS): Add print-utils-ipa.o.
9014
9015 2014-02-06 Tom Tromey <tromey@redhat.com>
9016
9017 * Makefile.in (SFILES): Fix indentation.
9018
9019 2014-02-05 Doug Evans <dje@google.com>
9020
9021 * linux-low.c (linux_wait_for_event): Improve comment.
9022 (linux_wait_1): Keep current_inferior in sync with event_child.
9023
9024 2014-01-22 Doug Evans <dje@google.com>
9025
9026 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9027
9028 2014-01-22 Doug Evans <dje@google.com>
9029
9030 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9031 * configure: Regenerate.
9032 * config.in: Regenerate.
9033 * Makefile.in (SFILES): Add debug.c.
9034 (OBS): Add debug.o.
9035 * debug.c: New file.
9036 * debug.h: New file.
9037 * linux-aarch64-low.c (*): Update all debugging printfs to use
9038 debug_printf instead of fprintf.
9039 * linux-arm-low.c (*): Ditto.
9040 * linux-cris-low.c (*): Ditto.
9041 * linux-crisv32-low.c (*): Ditto.
9042 * linux-m32r-low.c (*): Ditto.
9043 * linux-sparc-low.c (*): Ditto.
9044 * linux-x86.c (*): Ditto.
9045 * linux-low.c (*): Ditto.
9046 (linux_wait_1): Add calls to debug_enter, debug_exit.
9047 (linux_wait): Remove redundant debugging printf.
9048 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9049 (linux_resume, unstop_all_lwps): Ditto.
9050 * mem-break.c (*): Update all debugging printfs to use
9051 debug_printf instead of fprintf.
9052 * remote-utils.c (*): Ditto.
9053 * thread-db.c (*): Ditto.
9054 * server.c #include <ctype.h>, "gdb_vecs.h".
9055 (debug_threads): Moved to debug.c.
9056 (*): Update all debugging printfs to use debug_printf instead of
9057 fprintf.
9058 (start_inferior): Replace call to fflush with call to debug_flush.
9059 (monitor_show_help): Mention set debug-format.
9060 (parse_debug_format_options): New function.
9061 (handle_monitor_command): Handle "monitor set debug-format".
9062 (gdbserver_usage): Mention --debug-format.
9063 (main): Parse --debug-format.
9064 * server.h (debug_threads): Declaration moved to debug.h.
9065 #include "debug.h".
9066 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9067 trace_debug_1 that uses debug_printf.
9068 (tracepoint_look_up_symbols): Update all debugging printfs to use
9069 debug_printf instead of fprintf.
9070
9071 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9072
9073 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9074 sys/ptrace.h.
9075
9076 2014-01-17 Pedro Alves <palves@redhat.com>
9077
9078 PR build/16445
9079 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9080 defined after including gdb_proc_service.h.
9081
9082 2014-01-16 Doug Evans <dje@google.com>
9083
9084 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9085 (match_dll): Use it.
9086
9087 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9088
9089 * target.h (target_ops) <read_btrace>: Change parameters and
9090 return type to allow error reporting.
9091 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9092 trace reading errors on.
9093 * linux-low.c (linux_low_read_btrace): Pass trace reading
9094 errors on.
9095 (linux_low_disable_btrace): New.
9096
9097 2014-01-15 Doug Evans <dje@google.com>
9098
9099 * inferiors.c (thread_id_to_gdb_id): Delete.
9100 * inferiors.h (thread_id_to_gdb_id): Delete.
9101
9102 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9103
9104 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9105 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9106 versions.
9107
9108 2014-01-08 Pedro Alves <palves@redhat.com>
9109
9110 * server.c (handle_status): Don't discard previous queued stop
9111 replies or thread's pending status here.
9112 (main) <disconnection>: Do it here instead.
9113
9114 2014-01-08 Pedro Alves <palves@redhat.com>
9115
9116 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9117 * server.c (visit_actioned_threads, handle_pending_status): New
9118 function.
9119 (handle_v_cont): Factor out parts to ...
9120 (resume): ... this new function. If in all-stop, and a thread
9121 being resumed has a pending status, report it without actually
9122 resuming.
9123 (myresume): Adjust to use the new 'resume' function.
9124 (clear_pending_status_callback, set_pending_status_callback)
9125 (find_status_pending_thread_callback): New functions.
9126 (handle_status): Handle the case of multiple threads having
9127 interesting statuses to report. Report threads' real last signal
9128 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9129 with an interesting thread to report the status for, instead of
9130 always reporting the status of the first thread.
9131
9132 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9133
9134 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9135 * gdbreplay.c (gdbreplay_version): Likewise.
9136
9137 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9138
9139 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9140 iov.iov_len with the real length in use.
9141
9142 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9143
9144 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9145 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9146 for all targets that use win32-low.c.
9147 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9148 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9149
9150 2013-12-13 Pedro Alves <palves@redhat.com>
9151
9152 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9153 if equal to TARGET_WAITKIND_LOADED.
9154 * win32-low.c (cached_status): New static global.
9155 (win32_wait): Add declaration.
9156 (do_initial_child_stuff): Flush all initial pending debug events
9157 up to the initial breakpoint.
9158 (win32_wait): If CACHED_STATUS was set, return that instead
9159 of doing a real wait. Remove the code resuming the execution
9160 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9161 during the initial phase. Also remove the code changing
9162 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9163 TARGET_WAITKIND_STOPPED.
9164
9165 2013-12-11 Yao Qi <yao@codesourcery.com>
9166
9167 * notif.c (handle_notif_ack): Return 0 if no notification
9168 matches.
9169
9170 2013-11-20 Doug Evans <dje@google.com>
9171
9172 * linux-low.c (linux_set_resume_request): Fix comment.
9173
9174 2013-11-20 Doug Evans <dje@google.com>
9175
9176 * linux-low.c (resume_status_pending_p): Tweak comment.
9177
9178 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9179
9180 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9181 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9182 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9183 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9184 (srv_amd64_regobj): Add amd64-mpx.o.
9185 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9186 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9187 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9188 * i387-fp.c (num_pl_bnd_register) Added constant.
9189 (num_pl_bnd_cfg_registers) Added constant.
9190 (struct i387_xsave) Added reserved area and MPX fields.
9191 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9192 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9193 function.
9194 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9195 (init_registers_amd64_mpx_linux): Declare new function.
9196 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9197 (x86_64_regmap): Add MPX registers.
9198 (x86_linux_read_description): Add MPX case.
9199 (initialize_low_arch): Initialize MPX targets.
9200
9201 2013-11-18 Tom Tromey <tromey@redhat.com>
9202
9203 * configure: Rebuild.
9204 * configure.ac: Don't check for stdlib.h.
9205 * gdbreplay.c: Unconditionally include stdlib.h.
9206
9207 2013-11-18 Tom Tromey <tromey@redhat.com>
9208
9209 * config.in: Rebuild.
9210 * configure: Rebuild.
9211 * configure.ac: Don't use AC_HEADER_DIRENT.
9212
9213 2013-11-18 Tom Tromey <tromey@redhat.com>
9214
9215 * server.h: Don't check HAVE_STRING_H.
9216 * gdbreplay.c: Don't check HAVE_STRING_H.
9217 * configure: Rebuild.
9218
9219 2013-11-18 Tom Tromey <tromey@redhat.com>
9220
9221 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9222 LIBGNU.
9223
9224 2013-11-08 Tom Tromey <tromey@redhat.com>
9225
9226 * configure, config.in: Rebuild.
9227 * configure.ac: Remove unused configury.
9228
9229 2013-11-08 Tom Tromey <tromey@redhat.com>
9230
9231 * acinclude.m4: Include common.m4, codeset.m4.
9232 * configure, config.in: Rebuild.
9233 * configure.ac: Use GDB_AC_COMMON.
9234
9235 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9236
9237 * linux-s390-low.c (HWCAP_S390_TE): New define.
9238 (s390_arch_setup): Consider the TE field in the HWCAP for
9239 determining 'have_regset_tdb'.
9240
9241 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9242
9243 PR gdb/16014
9244 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9245 call to sizeof.
9246
9247 2013-10-02 Pedro Alves <palves@redhat.com>
9248
9249 * server.c (process_serial_event): Don't output "GDBserver
9250 exiting" if GDB is connected through stdio.
9251 * target.c (mywait): Likewise, be silent if GDB is connected
9252 through stdio.
9253
9254 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9255
9256 * lynx-low.c (lynx_add_threads_after_attach): New function.
9257 (lynx_attach): Remove call to add_thread. Add call to
9258 lynx_add_threads_after_attach instead.
9259
9260 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9261
9262 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9263 * config.in, configure: Regenerated.
9264
9265 2013-09-18 Yao Qi <yao@codesourcery.com>
9266
9267 PR server/15959
9268 * server.c (start_inferior): Clear 'resume_info'.
9269
9270 2013-09-16 Jiong Wang <jiwang@tilera.com>
9271
9272 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9273 for each register.
9274
9275 2013-09-16 Jiong Wang <jiwang@tilera.com>
9276
9277 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9278 linux-tile-low.o to srv_tgtobj.
9279
9280 2013-09-16 Will Newton <will.newton@linaro.org>
9281
9282 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9283 out regs.
9284
9285 2013-09-06 Pedro Alves <palves@redhat.com>
9286
9287 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9288 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9289 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9290 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9291 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9292 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9293
9294 2013-09-06 Pedro Alves <palves@redhat.com>
9295
9296 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9297 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9298
9299 2013-09-06 Pedro Alves <palves@redhat.com>
9300
9301 * linux-amd64-ipa.c: Include tracepoint.h.
9302 * linux-i386-ipa.c: Include tracepoint.h.
9303
9304 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9305
9306 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9307 (ps_get_thread_area): New function.
9308
9309 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9310
9311 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9312 (initialize_low_arch): Call init_registers_crisv32 rather than
9313 init_register_crisv32.
9314
9315 2013-09-05 Pedro Alves <palves@redhat.com>
9316
9317 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9318 to ...
9319 * hostio.h: ... this new file.
9320 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9321 win32-low.c: Include hostio.h.
9322
9323 2013-09-05 Pedro Alves <palves@redhat.com>
9324
9325 * server.h (gdb_client_data, handler_func, callback_handler_func)
9326 (delete_file_handler, add_file_handler, append_callback_event)
9327 (delete_callback_event, start_event_loop, initialize_event_loop):
9328 Move to event-loop.h and include it.
9329 * event-loop.h: New file.
9330
9331 2013-09-05 Pedro Alves <palves@redhat.com>
9332
9333 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9334 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9335 (loaded_dll, unloaded_dll): Move to ...
9336 * dll.h: ... this new file.
9337 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9338
9339 2013-09-05 Pedro Alves <palves@redhat.com>
9340
9341 * server.h (current_process, get_thread_process, all_processes)
9342 (add_inferior_to_list, for_each_inferior, current_inferior)
9343 (remove_inferior, add_process, remove_process, find_process_pid)
9344 (have_started_inferiors_p, have_attached_inferiors_p)
9345 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9346 (clear_inferiors, find_inferior, find_inferior_id)
9347 (inferior_target_data, set_inferior_target_data)
9348 (inferior_regcache_data, set_inferior_regcache_data): Move to
9349 inferiors.h, and include it.
9350 * inferiors.h: New file.
9351
9352 2013-09-05 Pedro Alves <palves@redhat.com>
9353
9354 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9355 Move ...
9356 * ax.h: ... here.
9357
9358 2013-09-05 Pedro Alves <palves@redhat.com>
9359
9360 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9361 tracepoint.h.
9362 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9363 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9364 (handle_tracepoint_general_set, handle_tracepoint_query)
9365 (tracepoint_finished_step, tracepoint_was_hit)
9366 (release_while_stepping_state_list, current_traceframe)
9367 (in_readonly_region, traceframe_read_mem)
9368 (fetch_traceframe_registers, traceframe_read_sdata)
9369 (traceframe_read_info, struct fast_tpoint_collect_status)
9370 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9371 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9372 (supply_fast_tracepoint_registers)
9373 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9374 (ipa_tdesc, claim_trampoline_space)
9375 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9376 (agent_mem_read, agent_get_trace_state_variable_value)
9377 (agent_set_trace_state_variable_value, agent_tsv_read)
9378 (agent_mem_read_string, get_raw_reg_func_addr)
9379 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9380 * tracepoint.h: ... this new file.
9381
9382 2013-09-05 Pedro Alves <palves@redhat.com>
9383
9384 * server.h (perror_with_name, error, fatal, warning, paddress)
9385 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9386 include it.
9387 * utils.h: New file.
9388
9389 2013-09-05 Pedro Alves <palves@redhat.com>
9390
9391 * server.h (remote_debug, noack_mode, transport_is_reliable)
9392 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9393 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9394 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9395 (write_enn, initialize_async_io, enable_async_io)
9396 (disable_async_io, check_remote_input_interrupt_request)
9397 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9398 (dead_thread_notify, prepare_resume_reply)
9399 (decode_address_to_semicolon, decode_address, decode_m_packet)
9400 (decode_M_packet, decode_X_packet, decode_xfer_write)
9401 (decode_search_memory_packet, unhexify, hexify)
9402 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9403 (look_up_one_symbol, relocate_instruction)
9404 (monitor_output): Move to remote-utils.h, and include it.
9405 * remote-utils.h: New file.
9406
9407 2013-09-05 Pedro Alves <palves@redhat.com>
9408
9409 * server.h (_): Delete.
9410
9411 2013-09-02 Pedro Alves <palves@redhat.com>
9412
9413 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9414 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9415 allocated.
9416 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9417
9418 2013-09-02 Pierre Muller <muller@sourceware.org>
9419
9420 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9421 or WriteProcessMemory complete successfully and handle
9422 ERROR_PARTIAL_COPY error.
9423
9424 2013-09-02 Pedro Alves <palves@redhat.com>
9425
9426 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9427 error instead of EIO.
9428
9429 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9430
9431 PR server/15604
9432 * linux-low.c: Include filestuff.h.
9433 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9434 * lynx-low.c: Include filestuff.h.
9435 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9436 * server.c: Include filestuff.h.
9437 (main): Call notice_open_fds.
9438 * spu-low.c: Include filestuff.h.
9439 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9440
9441 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9442
9443 * Makefile.in: Explain why ../target and ../nat are not
9444 listed as include file search paths.
9445 (linux-waitpid.o): New object file rule.
9446 * configure.srv (srv_native_linux_obj): New variable.
9447 Replace all occurrences of linux native object files with
9448 $srv_native_linux_obj.
9449 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9450 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9451 (linux_enable_event_reporting): Remove declaration.
9452 (my_waitpid): Moved to common/linux-waitpid.c.
9453 (linux_wait_for_event): Pass ptid when calling
9454 linux_enable_event_reporting.
9455 (linux_supports_tracefork_flag): Remove.
9456 (linux_enable_event_reporting): Likewise.
9457 (linux_tracefork_grandchild): Remove.
9458 (STACK_SIZE): Moved to common/linux-ptrace.c.
9459 (linux_tracefork_child): Remove.
9460 (linux_test_for_tracefork): Remove.
9461 (linux_look_up_symbols): Call linux_supports_traceclone.
9462 (initialize_low): Remove call to linux_test_for_tracefork.
9463 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9464 common/linux-ptrace.h.
9465 (PTRACE_TYPE_ARG4): Likewise.
9466 Include linux-ptrace.h.
9467
9468 2013-08-21 Pedro Alves <palves@redhat.com>
9469
9470 * config.in: Renegerate.
9471
9472 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9473
9474 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9475 (SFILES): Remove $(srcdir)/common/target-common.c and
9476 add $(srcdir)/target/waitstatus.c.
9477 (OBS): Remove target-common.o and add waitstatus.o.
9478 (server_h): Remove $(srcdir)/../common/target-common.h and
9479 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9480 and $(srcdir)/../target/waitstatus.h.
9481 (target-common.o): Remove.
9482 (waitstatus.o): New target object file.
9483 * target.h: Do not include target-common.h and
9484 include target/resume.h, target/wait.h and
9485 target/waitstatus.h.
9486
9487 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9488
9489 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9490 to PTRACE_TYPE_ARG3.
9491 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9492 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9493 PTRACE_TYPE_ARG4.
9494 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9495 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9496
9497 2013-07-27 Jie Zhang <jie@codesourcery.com>
9498 Daniel Jacobowitz <dan@codesourcery.com>
9499 Yao Qi <yao@codesourcery.com>
9500
9501 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9502 (mips-linux-watch.o): New rule.
9503 (mips_linux_watch_h): New variable.
9504 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9505 srv_tgtobj.
9506 * linux-mips-low.c: Include mips-linux-watch.h.
9507 (struct arch_process_info, struct arch_lwp_info): New.
9508 (update_watch_registers_callback): New function.
9509 (mips_linux_new_process, mips_linux_new_thread) New functions.
9510 (mips_linux_prepare_to_resume, mips_insert_point): New
9511 functions.
9512 (mips_remove_point, mips_stopped_by_watchpoint): New
9513 functions.
9514 (rsp_bp_type_to_target_hw_bp_type): New function.
9515 (mips_stopped_data_address): New function.
9516 (the_low_target): Add watchpoint support functions.
9517
9518 2013-07-27 Yao Qi <yao@codesourcery.com>
9519
9520 * i386-low.c: Include break-common.h.
9521 (enum target_hw_bp_type): Remove.
9522
9523 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9524
9525 * Makefile.in (SFILES): /common/target-common.c.
9526 (OBS): Add target-common.o.
9527 (server_h): Add $(srcdir)/../common/target-common.h.
9528 (target-common.o): New target.
9529 * server.c (queue_stop_reply_callback): Free
9530 status string after use.
9531 * target.c (target_waitstatus_to_string): Remove.
9532 * target.h: Include target-common.h.
9533 (resume_kind): Likewise.
9534 (target_waitkind): Likewise.
9535 (target_waitstatus): Likewise.
9536 (TARGET_WNOHANG): Likewise.
9537
9538 2013-07-04 Yao Qi <yao@codesourcery.com>
9539
9540 * Makefile.in (host_alias): Use @host_noncanonical@.
9541 (target_alias): Use @target_noncanonical@.
9542 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9543 ACX_NONCANONICAL_HOST.
9544 * configure: Regenerated.
9545
9546 Revert:
9547 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9548
9549 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9550 * configure: Rebuild.
9551 * Makefile.in (version_host, version_target): Get from configure.
9552 (version.c): Use $(version_host) and $(version_target).
9553
9554 2013-07-03 Pedro Alves <palves@redhat.com>
9555
9556 * Makefile.in (config.status): Depend on development.sh.
9557 * acinclude.m4: Include libmcheck.m4.
9558 * configure: Regenerate.
9559
9560 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9561
9562 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9563 attribute inside the parentheses.
9564 (winapi_DebugSetProcessKillOnExit): Ditto.
9565 (winapi_DebugBreakProcess): Ditto.
9566 (winapi_GenerateConsoleCtrlEvent): Ditto.
9567
9568 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9569
9570 * notif.h (notif_event): Add a dummy member to avoid compiler
9571 errors.
9572
9573 2013-07-01 Pedro Alves <palves@redhat.com>
9574
9575 * hostio.c (HOSTIO_PATH_MAX): Define.
9576 (require_filename, handle_open, handle_unlink, handle_readlink):
9577 Use it.
9578
9579 2013-07-01 Pedro Alves <palves@redhat.com>
9580
9581 * server.h: Include "pathmax.h".
9582 * linux-low.c: Don't include sys/param.h.
9583 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9584 MAXPATHLEN.
9585 * win32-low.c: Don't include sys/param.h.
9586 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9587
9588 2013-07-01 Pedro Alves <palves@redhat.com>
9589
9590 * event-loop.c: Don't check HAVE_UNISTD_H before including
9591 <unistd.h>.
9592 * gdbreplay.c: Likewise.
9593 * remote-utils.c: Likewise.
9594 * server.c: Likewise.
9595 * configure.ac: Don't check for unistd.h.
9596 * configure: Regenerate.
9597
9598 2013-06-28 Tom Tromey <tromey@redhat.com>
9599
9600 * Makefile.in (version.c): Use version.in, not
9601 common/version.in.
9602
9603 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9604
9605 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9606 * configure: Rebuild.
9607 * Makefile.in (version_host, version_target): Get from configure.
9608 (version.c): Use $(version_host) and $(version_target).
9609
9610 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9611
9612 Fix trace-status to output user name without trailing colon.
9613 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9614
9615 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9616
9617 Fix trace-status to output proper start-time and stop-time.
9618 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9619 output start time and stop time in hex as gdb expects.
9620
9621 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9622
9623 * tracepoint.c (build_traceframe_info_xml): Output trace state
9624 variables present in the trace buffer.
9625
9626 2013-06-24 Tom Tromey <tromey@redhat.com>
9627
9628 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9629 create-version.sh.
9630 (version.o): Remove.
9631 * gdbreplay.c: Include version.h.
9632 (version, host_name): Don't declare.
9633 * server.h: Include version.h.
9634 (version, host_name): Don't declare.
9635
9636 2013-06-12 Pedro Alves <palves@redhat.com>
9637
9638 * linux-x86-low.c (linux_is_elf64): Delete global.
9639 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9640 with local linux_pid_exe_is_elf_64_file use.
9641
9642 2013-06-11 Pedro Alves <palves@redhat.com>
9643
9644 * linux-low.c (regset_disabled, disable_regset): New functions.
9645 (regsets_fetch_inferior_registers)
9646 (regsets_store_inferior_registers): Use them.
9647 (initialize_regsets_info); Don't allocate the disabled_regsets
9648 array here.
9649 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9650 comment.
9651
9652 2013-06-11 Pedro Alves <palves@redhat.com>
9653
9654 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9655 xmalloc.
9656
9657 2013-06-11 Pedro Alves <palves@redhat.com>
9658
9659 * linux-x86-low.c (initialize_low_arch): Call
9660 init_registers_x32_avx_linux.
9661
9662 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9663
9664 Fix compatibility with Android Bionic.
9665 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9666 it is not empty.
9667
9668 2013-06-07 Pedro Alves <palves@redhat.com>
9669
9670 PR server/14823
9671 * Makefile.in (OBS): Add tdesc.o.
9672 (IPA_OBJS): Add tdesc-ipa.o.
9673 (tdesc-ipa.o): New rule.
9674 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9675 interface.
9676 * linux-low.c (new_inferior): Delete.
9677 (disabled_regsets, num_regsets): Delete.
9678 (linux_add_process): Adjust to set the new per-process
9679 new_inferior flag.
9680 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9681 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9682 was a stop. When calling arch_setup, switch the current inferior
9683 to the thread that got an event.
9684 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9685 (regsets_fetch_inferior_registers)
9686 (regsets_store_inferior_registers): New regsets_info parameter.
9687 Adjust to use it.
9688 (linux_register_in_regsets): New regs_info parameter. Adjust to
9689 use it.
9690 (register_addr, fetch_register, store_register): New usrregs_info
9691 parameter. Adjust to use it.
9692 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9693 parameter regs_info. Adjust to use it.
9694 (linux_fetch_registers): Get the current inferior's regs_info, and
9695 adjust to use it.
9696 (linux_store_registers): Ditto.
9697 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9698 (initialize_low): Don't initialize the target_regsets here. Call
9699 initialize_low_arch.
9700 * linux-low.h (target_regsets): Delete declaration.
9701 (struct regsets_info): New.
9702 (struct usrregs_info): New.
9703 (struct regs_info): New.
9704 (struct process_info_private) <new_inferior>: New field.
9705 (struct linux_target_ops): Delete the num_regs, regmap, and
9706 regset_bitmap fields. New field regs_info.
9707 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9708 * i387-fp.c (num_xmm_registers): Delete.
9709 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9710 calls to new interface.
9711 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9712 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9713 Infer the number of xmm registers from the regcache's target
9714 description.
9715 * i387-fp.h (num_xmm_registers): Delete.
9716 * inferiors.c (add_thread): Don't install the thread's regcache
9717 here.
9718 * proc-service.c (gregset_info): Fetch the current inferior's
9719 regs_info. Adjust to use it.
9720 * regcache.c: Include tdesc.h.
9721 (register_bytes, reg_defs, num_registers)
9722 (gdbserver_expedite_regs): Delete.
9723 (get_thread_regcache): If the thread doesn't have a regcache yet,
9724 create one, instead of aborting gdbserver.
9725 (regcache_invalidate_one): Rename to ...
9726 (regcache_invalidate_thread): ... this.
9727 (regcache_invalidate_one): New.
9728 (regcache_invalidate): Only invalidate registers of the current
9729 process.
9730 (init_register_cache): Add target_desc parameter, and use it.
9731 (new_register_cache): Ditto. Assert the target description has a
9732 non zero registers_size.
9733 (regcache_cpy): Add assertions. Adjust.
9734 (realloc_register_cache, set_register_cache): Delete.
9735 (registers_to_string, registers_from_string): Adjust.
9736 (find_register_by_name, find_regno, find_register_by_number)
9737 (register_cache_size): Add target_desc parameter, and use it.
9738 (free_register_cache_thread, free_register_cache_thread_one)
9739 (regcache_release, register_cache_size): New.
9740 (register_size): Add target_desc parameter, and use it.
9741 (register_data, supply_register, supply_register_zeroed)
9742 (supply_regblock, supply_register_by_name, collect_register)
9743 (collect_register_as_string, collect_register_by_name): Adjust.
9744 * regcache.h (struct target_desc): Forward declare.
9745 (struct regcache) <tdesc>: New field.
9746 (init_register_cache, new_register_cache): Add target_desc
9747 parameter.
9748 (regcache_invalidate_thread): Declare.
9749 (regcache_invalidate_one): Delete declaration.
9750 (regcache_release): Declare.
9751 (find_register_by_number, register_cache_size, register_size)
9752 (find_regno): Add target_desc parameter.
9753 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9754 declarations.
9755 * remote-utils.c: Include tdesc.h.
9756 (outreg, prepare_resume_reply): Adjust.
9757 * server.c: Include tdesc.h.
9758 (gdbserver_xmltarget): Delete declaration.
9759 (get_features_xml, process_serial_event): Adjust.
9760 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9761 declare.
9762 (struct process_info) <tdesc>: New field.
9763 (ipa_tdesc): Declare.
9764 * tdesc.c: New file.
9765 * tdesc.h: New file.
9766 * tracepoint.c: Include tdesc.h.
9767 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9768 (get_context_regcache): Adjust to pass ipa_tdesc down.
9769 (do_action_at_tracepoint): Adjust to get the register cache size
9770 from the context regcache's description.
9771 (traceframe_walk_blocks): Adjust to get the register cache size
9772 from the current trace frame's description.
9773 (traceframe_get_pc): Adjust to get current trace frame's
9774 description and pass it down.
9775 (gdb_collect): Adjust to get the register cache size from the
9776 IPA's description.
9777 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9778 (gdbserver_xmltarget): Delete.
9779 (initialize_low_tracepoint): Set the ipa's target description.
9780 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9781 (initialize_low_tracepoint): Set the ipa's target description.
9782 * linux-x86-low.c: Include tdesc.h.
9783 [__x86_64__] (is_64bit_tdesc): New.
9784 (ps_get_thread_area, x86_get_thread_area): Use it.
9785 (i386_cannot_store_register): Rename to ...
9786 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9787 (i386_cannot_fetch_register): Rename to ...
9788 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9789 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9790 to new interface.
9791 (target_regsets): Rename to ...
9792 (x86_regsets): ... this.
9793 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9794 interface.
9795 (x86_siginfo_fixup): Use is_64bit_tdesc.
9796 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9797 (tdesc_x32_avx_linux, tdesc_x32_linux)
9798 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9799 Declare.
9800 (x86_linux_update_xmltarget): Delete.
9801 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9802 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9803 (AMD64_LINUX_USER64_CS): New.
9804 (x86_linux_read_description): New, based on
9805 x86_linux_update_xmltarget.
9806 (same_process_callback): New.
9807 (x86_arch_setup_process_callback): New.
9808 (x86_linux_update_xmltarget): New.
9809 (x86_regsets_info): New.
9810 (amd64_linux_regs_info): New.
9811 (i386_linux_usrregs_info): New.
9812 (i386_linux_regs_info): New.
9813 (x86_linux_regs_info): New.
9814 (x86_arch_setup): Reimplement.
9815 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9816 (x86_emit_ops): Ditto.
9817 (the_low_target): Adjust. Install x86_linux_regs_info,
9818 x86_cannot_fetch_register, and x86_cannot_store_register.
9819 (initialize_low_arch): New.
9820 * linux-ia64-low.c (tdesc_ia64): Declare.
9821 (ia64_fetch_register): Adjust.
9822 (ia64_usrregs_info, regs_info): New globals.
9823 (ia64_regs_info): New function.
9824 (the_low_target): Adjust.
9825 (initialize_low_arch): New function.
9826 * linux-sparc-low.c (tdesc_sparc64): Declare.
9827 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9828 Adjust.
9829 (sparc_arch_setup): New function.
9830 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9831 (the_low_target): Adjust.
9832 (initialize_low_arch): New function.
9833 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9834 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9835 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9836 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9837 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9838 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9839 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9840 (tdesc_powerpc_isa205_vsx64l): Declare.
9841 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9842 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9843 (ppc_set_pc, ppc_get_hwcap): Adjust.
9844 (ppc_usrregs_info): Forward declare.
9845 (!__powerpc64__) ppc_regmap_adjusted: New global.
9846 (ppc_arch_setup): Adjust to the current process'es target
9847 description.
9848 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9849 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9850 (ppc_store_evrregset): Adjust.
9851 (target_regsets): Rename to ...
9852 (ppc_regsets): ... this, and make static.
9853 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9854 (ppc_regs_info): New function.
9855 (the_low_target): Adjust.
9856 (initialize_low_arch): New function.
9857 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9858 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9859 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9860 (tdesc_s390x_linux64v2): Declare.
9861 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9862 (s390_fill_gregset, s390_store_last_break): Adjust.
9863 (target_regsets): Rename to ...
9864 (s390_regsets): ... this, and make static.
9865 (s390_get_pc, s390_set_pc): Adjust.
9866 (s390_get_hwcap): New target_desc parameter, and use it.
9867 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9868 (s390_arch_setup): Adjust to set the current process'es target
9869 description. Don't adjust the regmap.
9870 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9871 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9872 (regs_info_3264): New globals.
9873 (s390_regs_info): New function.
9874 (the_low_target): Adjust.
9875 (initialize_low_arch): New function.
9876 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9877 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9878 [__mips64] (init_registers_mips_linux)
9879 (init_registers_mips_dsp_linux): Delete defines.
9880 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9881 (have_dsp): New global.
9882 (mips_read_description): New, based on mips_arch_setup.
9883 (mips_arch_setup): Reimplement.
9884 (get_usrregs_info): New function.
9885 (mips_cannot_fetch_register, mips_cannot_store_register)
9886 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9887 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9888 (target_regsets): Rename to ...
9889 (mips_regsets): ... this, and make static.
9890 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9891 (dsp_regs_info, regs_info): New globals.
9892 (mips_regs_info): New function.
9893 (the_low_target): Adjust.
9894 (initialize_low_arch): New function.
9895 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9896 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9897 Declare.
9898 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9899 (arm_read_description): New, with bits factored from
9900 arm_arch_setup.
9901 (arm_arch_setup): Reimplement.
9902 (target_regsets): Rename to ...
9903 (arm_regsets): ... this, and make static.
9904 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9905 (arm_regs_info): New function.
9906 (the_low_target): Adjust.
9907 (initialize_low_arch): New function.
9908 * linux-m68k-low.c (tdesc_m68k): Declare.
9909 (target_regsets): Rename to ...
9910 (m68k_regsets): ... this, and make static.
9911 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9912 (m68k_regs_info): New function.
9913 (m68k_arch_setup): New function.
9914 (the_low_target): Adjust.
9915 (initialize_low_arch): New function.
9916 * linux-sh-low.c (tdesc_sharch): Declare.
9917 (target_regsets): Rename to ...
9918 (sh_regsets): ... this, and make static.
9919 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9920 (sh_regs_info, sh_arch_setup): New functions.
9921 (the_low_target): Adjust.
9922 (initialize_low_arch): New function.
9923 * linux-bfin-low.c (tdesc_bfin): Declare.
9924 (bfin_arch_setup): New function.
9925 (bfin_usrregs_info, regs_info): New globals.
9926 (bfin_regs_info): New function.
9927 (the_low_target): Adjust.
9928 (initialize_low_arch): New function.
9929 * linux-cris-low.c (tdesc_cris): Declare.
9930 (cris_arch_setup): New function.
9931 (cris_usrregs_info, regs_info): New globals.
9932 (cris_regs_info): New function.
9933 (the_low_target): Adjust.
9934 (initialize_low_arch): New function.
9935 * linux-cris-low.c (tdesc_crisv32): Declare.
9936 (cris_arch_setup): New function.
9937 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9938 (cris_regs_info): New function.
9939 (the_low_target): Adjust.
9940 (initialize_low_arch): New function.
9941 * linux-m32r-low.c (tdesc_m32r): Declare.
9942 (m32r_arch_setup): New function.
9943 (m32r_usrregs_info, regs_info): New globals.
9944 (m32r_regs_info): Adjust.
9945 (initialize_low_arch): New function.
9946 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9947 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9948 (tic6x_usrregs_info): Forward declare.
9949 (tic6x_read_description): New function, based on ...
9950 (tic6x_arch_setup): ... this. Reimplement.
9951 (target_regsets): Rename to ...
9952 (tic6x_regsets): ... this, and make static.
9953 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9954 (tic6x_regs_info): New function.
9955 (the_low_target): Adjust.
9956 (initialize_low_arch): New function.
9957 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9958 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9959 (target_regsets): Rename to ...
9960 (xtensa_regsets): ... this, and make static.
9961 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9962 globals.
9963 (xtensa_arch_setup, xtensa_regs_info): New functions.
9964 (the_low_target): Adjust.
9965 (initialize_low_arch): New function.
9966 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9967 (nios2_arch_setup): Set the current process'es tdesc.
9968 (target_regsets): Rename to ...
9969 (nios2_regsets): ... this.
9970 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9971 (nios2_regs_info): New function.
9972 (the_low_target): Adjust.
9973 (initialize_low_arch): New function.
9974 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9975 (aarch64_arch_setup): Set the current process'es tdesc.
9976 (target_regsets): Rename to ...
9977 (aarch64_regsets): ... this.
9978 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9979 (aarch64_regs_info): New function.
9980 (the_low_target): Adjust.
9981 (initialize_low_arch): New function.
9982 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9983 globals.
9984 (target_regsets): Rename to ...
9985 (tile_regsets): ... this.
9986 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9987 (tile_regs_info): New function.
9988 (tile_arch_setup): Set the current process'es tdesc.
9989 (the_low_target): Adjust.
9990 (initialize_low_arch): New function.
9991 * spu-low.c (tdesc_spu): Declare.
9992 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9993 * win32-arm-low.c (tdesc_arm): Declare.
9994 (arm_arch_setup): New function.
9995 (the_low_target): Install arm_arch_setup instead of
9996 init_registers_arm.
9997 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9998 (init_windows_x86): Rename to ...
9999 (i386_arch_setup): ... this. Set `win32_tdesc'.
10000 (the_low_target): Adjust.
10001 * win32-low.c (win32_tdesc): New global.
10002 (child_add_thread): Don't create the thread cache here.
10003 (do_initial_child_stuff): Set the new process'es tdesc.
10004 * win32-low.h (struct target_desc): Forward declare.
10005 (win32_tdesc): Declare.
10006 * lynx-i386-low.c (tdesc_i386): Declare global.
10007 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10008 * lynx-low.c (lynx_tdesc): New global.
10009 (lynx_add_process): Set the new process'es tdesc.
10010 * lynx-low.h (struct target_desc): Forward declare.
10011 (lynx_tdesc): Declare global.
10012 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10013 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10014 * nto-low.c (nto_tdesc): New global.
10015 (do_attach): Set the new process'es tdesc.
10016 * nto-low.h (struct target_desc): Forward declare.
10017 (nto_tdesc): Declare.
10018 * nto-x86-low.c (tdesc_i386): Declare.
10019 (nto_x86_arch_setup): Set `nto_tdesc'.
10020
10021 2013-06-04 Gary Benson <gbenson@redhat.com>
10022
10023 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10024 to qSupported response when appropriate.
10025 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10026 with nonzero-length annex.
10027 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10028 arguments supplied in annex.
10029
10030 2013-05-31 Doug Evans <dje@google.com>
10031
10032 PR server/15594
10033 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10034 64 bits in 64-cross-32 environment.
10035
10036 2013-05-28 Pedro Alves <palves@redhat.com>
10037
10038 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10039 (aarch64-without-fpu.c): Delete rule.
10040 * configure.srv (aarch64*-*-linux*): Remove references to
10041 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10042 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10043 declaration.
10044
10045 2013-05-24 Pedro Alves <palves@redhat.com>
10046
10047 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10048 instead of strchr/decode_address. Error if the range isn't split
10049 with a ','. Don't assume there's be a ':' in the action.
10050
10051 2013-05-23 Yao Qi <yao@codesourcery.com>
10052 Pedro Alves <palves@redhat.com>
10053
10054 * linux-low.c (lwp_in_step_range): New function.
10055 (linux_wait_1): If the thread was range stepping and stopped
10056 outside the stepping range, report the stop to GDB. Otherwise,
10057 continue stepping. Add range stepping debug output.
10058 (linux_set_resume_request): Copy the step range from the resume
10059 request to the lwp.
10060 (linux_supports_range_stepping): New.
10061 (linux_target_ops) <supports_range_stepping>: Set to
10062 linux_supports_range_stepping.
10063 * linux-low.h (struct linux_target_ops)
10064 <supports_range_stepping>: New field.
10065 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10066 * linux-x86-low.c (x86_supports_range_stepping): New.
10067 (the_low_target) <supports_range_stepping>: Set to
10068 x86_supports_range_stepping.
10069 * server.c (handle_v_cont): Handle 'r' action.
10070 (handle_v_requests): Append ";r" if the target supports range
10071 stepping.
10072 * target.h (struct thread_resume) <step_range_start,
10073 step_range_end>: New fields.
10074 (struct target_ops) <supports_range_stepping>:
10075 New field.
10076 (target_supports_range_stepping): New macro.
10077
10078 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10079
10080 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10081 confusion in comment.
10082
10083 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10084
10085 * lynx-low.c (struct process_info_private): New type.
10086 (lynx_add_process): New function.
10087 (lynx_create_inferior, lynx_attach): Replace calls to
10088 add_process by calls to lynx_add_process.
10089 (lynx_resume): If PTID is null, then try using
10090 current_process()->private->last_wait_event_ptid.
10091 Add comments.
10092 (lynx_clear_inferiors): Delete. The contents of that function
10093 has been inlined in lynx_mourn;
10094 (lynx_wait_1): Save the ptid in the process's private data.
10095 (lynx_mourn): Free the process' private data. Replace call
10096 to lynx_clear_inferiors by call to clear_inferiors.
10097
10098 2013-05-17 Yao Qi <yao@codesourcery.com>
10099
10100 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10101 the right place.
10102
10103 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10104
10105 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10106 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10107 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10108 PT_TEXT_END_ADDR guards. Update comments.
10109 (linux_target_op) <read_offsets>: Conditionally define to
10110 linux_read_offsets if the target is UCLIBC and if it defines
10111 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10112
10113 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10114 Andrew Jenner <andrew@codesourcery.com>
10115
10116 * Makefile.in (SFILES): Add linux-nios2-low.c.
10117 (clean): Add action to delete nios2-linux.c.
10118 (nios2-linux.c): New rule.
10119 * configure.srv: Add nios2*-*-linux*.
10120 * linux-nios2-low.c: New.
10121
10122 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10123
10124 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10125
10126 2013-04-25 Hui Zhu <hui@codesourcery.com>
10127
10128 PR gdb/15186
10129 * ax.c (ax_printf): Add fflush.
10130
10131 2013-04-22 Tom Tromey <tromey@redhat.com>
10132
10133 * Makefile.in (SFILES): Add filestuff.c.
10134 (OBS): Add filestuff.o.
10135 (filestuff.o): New target.
10136 * config.in, configure: Rebuild.
10137 * configure.ac: Check for fdwalk, pipe2.
10138
10139 2013-04-17 Pedro Alves <palves@redhat.com>
10140
10141 * configure.ac (USE_THREAD_DB): Delete variable.
10142 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10143 Don't AC_SUBST USE_THREAD_DB.
10144 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10145 * config.in, configure: Regenerate.
10146
10147 2013-04-16 Pedro Alves <palves@redhat.com>
10148
10149 * linux-low.h (struct lwp_info) <thread_known>: Move under
10150 the USE_THREAD_DB #ifdef.
10151
10152 2013-04-16 Pedro Alves <palves@redhat.com>
10153
10154 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10155 (linux-low.o): Delete rule.
10156 * linux-low.h: Always include "gdb_thread_db.h" instead of
10157 conditionally including thread_db.h.
10158 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10159 HAVE_THREAD_DB_H.
10160
10161 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10162
10163 * Makefile.in (install-only): Fix make install regression.
10164
10165 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10166
10167 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10168 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10169 installation.
10170 * gdbserver.1: Remove.
10171
10172 2013-03-22 Pedro Alves <palves@redhat.com>
10173
10174 * linux-low.c (handle_extended_wait): Don't call
10175 linux_enable_event_reporting.
10176
10177 2013-03-15 Tony Theodore <tonyt@logyst.com>
10178
10179 PR build/9098:
10180 * Makefile.in (SHELL): Use @SHELL@.
10181
10182 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10183
10184 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10185 compiler warning.
10186
10187 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10188
10189 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10190 Remove extraneous NULL element.
10191
10192 2013-03-13 Yao Qi <yao@codesourcery.com>
10193
10194 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10195 'V' block in trace frame.
10196
10197 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10198
10199 * target.h (struct target_ops): Add btrace ops.
10200 (target_supports_btrace): New macro.
10201 (target_enable_btrace): New macro.
10202 (target_disable_btrace): New macro.
10203 (target_read_btrace): New macro.
10204 * gdbthread.h (struct thread_info): Add btrace field.
10205 * server.c: Include btrace-common.h.
10206 (handle_btrace_general_set): New function.
10207 (handle_btrace_enable): New function.
10208 (handle_btrace_disable): New function.
10209 (handle_general_set): Call handle_btrace_general_set.
10210 (handle_qxfer_btrace): New function.
10211 (struct qxfer qxfer_packets[]): Add btrace entry.
10212 * inferiors.c (remove_thread): Disable btrace.
10213 * linux-low: Include linux-btrace.h.
10214 (linux_low_enable_btrace): New function.
10215 (linux_low_read_btrace): New function.
10216 (linux_target_ops): Add btrace ops.
10217 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10218 Add srv_linux_btrace=yes.
10219 (x86_64-*-linux*): Add linux-btrace.o.
10220 Add srv_linux_btrace=yes.
10221 * configure.ac: Define HAVE_LINUX_BTRACE.
10222 * config.in: Regenerated.
10223 * configure: Regenerated.
10224
10225 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10226
10227 * server.c (handle_qxfer): Preserve error message if -3 is
10228 returned.
10229 (qxfer): Document the -3 return value.
10230
10231 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10232
10233 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10234 (linux_btrace_h): New variable.
10235 (linux-btrace.o): New rule.
10236
10237 2013-03-08 Stan Shebs <stan@codesourcery.com>
10238 Hafiz Abid Qadeer <abidh@codesourcery.com>
10239
10240 * tracepoint.c (trace_buffer_size): New global.
10241 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10242 (init_trace_buffer): Change to one-argument function. Allocate
10243 trace buffer memory.
10244 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10245 handle QTBuffer:size packet.
10246 (cmd_bigqtbuffer_size): New function.
10247 (initialize_tracepoint): Call init_trace_buffer with
10248 DEFAULT_TRACE_BUFFER_SIZE.
10249 * server.c (handle_query): Add QTBuffer:size in the
10250 supported packets.
10251
10252 2013-03-07 Yao Qi <yao@codesourcery.com>
10253
10254 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10255 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10256 of -1.
10257 (cmd_qtsp): Adjust condition. Do post increment.
10258 Set cur_action and cur_step_action back to 0.
10259
10260 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10261
10262 PR server/15236
10263 * linux-low.c (linux_write_memory): Return early success if LEN is
10264 zero.
10265
10266 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10267
10268 * configure.srv: Add x86_64-*-cygwin* as target.
10269
10270 2013-02-28 Tom Tromey <tromey@redhat.com>
10271
10272 * configure.ac: Invoke AC_SYS_LARGEFILE.
10273 * configure, config.in: Rebuild.
10274
10275 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10276
10277 * win32-low.c: Throughout, fix format strings and casts of
10278 printf-like functions to avoid type related warnings on all
10279 platforms.
10280 (get_child_debug_event): Print dwDebugEventCode as hex since
10281 that's how it's usually documented.
10282
10283 2013-02-28 Yao Qi <yao@codesourcery.com>
10284
10285 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10286 pulongest.
10287
10288 2013-02-27 Jiong Wang <jiwang@tilera.com>
10289
10290 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10291 (reg-tilegx32.c): New rule.
10292 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10293 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10294 different register info initializer according to elf class.
10295 (init_registers_tilgx32): New function. The tilegx32 register info
10296 initializer.
10297 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10298 (tile_store_gregset): Likewise.
10299
10300 2013-02-27 Yao Qi <yao@codesourcery.com>
10301
10302 * server.c (process_point_options): Print debug message when
10303 debug_threads is true.
10304
10305 2013-02-26 Yao Qi <yao@codesourcery.com>
10306
10307 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10308
10309 2013-02-19 Pedro Alves <palves@redhat.com>
10310 Kai Tietz <ktietz@redhat.com>
10311
10312 PR gdb/15161
10313
10314 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10315 instead of strtoul to extract address from packet.
10316 (process_serial_event) <'z'>: Likewise.
10317
10318 2013-02-18 Yao Qi <yao@codesourcery.com>
10319
10320 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10321
10322 2013-02-14 Pedro Alves <palves@redhat.com>
10323
10324 Plug memory leak.
10325
10326 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10327 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10328
10329 2013-02-14 Pedro Alves <palves@redhat.com>
10330
10331 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10332
10333 2013-02-14 Pedro Alves <palves@redhat.com>
10334
10335 * tracepoint.c (save_string): Delete.
10336 (add_tracepoint_action): Use savestring instead of save_string.
10337
10338 2013-02-12 Pedro Alves <palves@redhat.com>
10339
10340 * linux-xtensa-low.c: Ditto.
10341 * xtensa-xtregs.c: Ditto.
10342
10343 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10344
10345 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10346 thread_db.
10347
10348 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10349
10350 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10351 aarch64_num_wp_regs and aarch64_num_bp_regs to
10352 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10353
10354 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10355
10356 * linux-aarch64-low.c (ps_get_thread_area): Replace
10357 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10358
10359 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10360 Marcus Shawcroft <marcus.shawcroft@arm.com>
10361 Nigel Stephens <nigel.stephens@arm.com>
10362 Yufeng Zhang <yufeng.zhang@arm.com>
10363
10364 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10365 (aarch64.c, aarch64-without-fpu.c): New targets.
10366 * configure.srv (aarch64*-*-linux*): New.
10367 * linux-aarch64-low.c: New file.
10368
10369 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10370
10371 * linux-low.c (handle_extended_wait, linux_create_inferior)
10372 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10373 (dequeue_one_deferred_signal, linux_resume_one_thread)
10374 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10375 (linux_tracefork_grandchild, linux_test_for_tracefork)
10376 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10377 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10378 where the argument is 0.
10379
10380 2013-01-25 Yao Qi <yao@codesourcery.com>
10381
10382 * event-loop.c: Include "queue.h".
10383 (gdb_event_p): New typedef.
10384 (struct gdb_event) <next_event>: Remove.
10385 (event_queue): Change to QUEUE(gdb_event_p).
10386 (async_queue_event): Remove.
10387 (gdb_event_xfree): New.
10388 (initialize_event_loop): New.
10389 (process_event): Use API from QUEUE.
10390 (wait_for_event): Likewise.
10391 * server.c (main): Call initialize_event_loop.
10392 * server.h (initialize_event_loop): Declare.
10393
10394 2013-01-18 Yao Qi <yao@codesourcery.com>
10395
10396 * ax.h (struct eval_agent_expr_context): New.
10397 (gdb_eval_agent_expr): Update declaration.
10398 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10399 TFRAME. Add new argument CTX.
10400 * server.h (struct eval_agent_expr_context): Declare.
10401 (agent_mem_read, agent_tsv_read): Update declaration.
10402 (agent_mem_read_string): Likewise.
10403 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10404 (add_traceframe_block): Add new argument TPOINT.
10405 Increase TPOINT->traceframe_usage.
10406 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10407 eval_tracepoint_agent_expr.
10408 (condition_true_at_tracepoint): Likewise.
10409 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10410 (agent_mem_read_string, agent_tsv_read): Likewise.
10411
10412 2013-01-16 Yao Qi <yao@codesourcery.com>
10413
10414 * linux-low.c (linux_resume_one_lwp): Don't check
10415 'lwp->bp_reinsert != 0'.
10416
10417 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10418 Pedro Alves <palves@redhat.com>
10419
10420 * lynx-low.c (ptrace_request_to_str): Define a temporary
10421 macro and use it to simplify this function's implementation.
10422
10423 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10424
10425 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10426 sets errno.
10427
10428 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10429
10430 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10431
10432 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10433
10434 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10435
10436 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10437
10438 * lynx-low.c (lynx_resume): Use the resume_info parameter
10439 to determine the ptid for the lynx_ptrace call, unless
10440 it is equal to minus_one_ptid, in which case we use the
10441 ptid of the current_inferior.
10442 (lynx_wait_1): After having received a thread create/exit
10443 event, resume the inferior's execution using the signaling
10444 thread's ptid, rather than the old ptid.
10445
10446 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10447
10448 * lynx-low.c (lynx_resume): Delete variable ret.
10449
10450 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10451
10452 * gdbreplay.c (gdbreplay_version): Update copyright year.
10453 * server.c (gdbserver_version): Likewise.
10454
10455 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10456
10457 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10458 new thread.
10459
10460 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10461
10462 * lynx-low.c (ptrace_request_to_str): Add handling for
10463 PTRACE_GETTRACESIG.
10464
10465 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10466
10467 * lynx-low.c (lynx_attach): Delete variable new_process.
10468
10469 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10470
10471 * lynx-low.c (lynx_create_inferior): Delete variable
10472 new_process.
10473
10474 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10475
10476 * lynx-low.c (ptrace_request_to_str): Do not handle
10477 PTRACE_GETTHREADLIST if this macro does not exist.
10478
10479 2012-12-15 Yao Qi <yao@codesourcery.com>
10480
10481 * Makefile.in (OBS): Add notif.o.
10482 * notif.c, notif.h: New.
10483 * server.c: Include "notif.h".
10484 (struct vstop_notif) <next>: Remove.
10485 <base>: New field.
10486 (queue_stop_reply): Update.
10487 (push_event, send_next_stop_reply): Remove.
10488 (discard_queued_stop_replies): Update.
10489 (notif_stop): New variable.
10490 (handle_v_stopped): Remove.
10491 (handle_v_requests): Don't call handle_v_stopped. Call
10492 handle_ack_notif instead.
10493 (queue_stop_reply_callback): Call notif_event_enque instead
10494 of queue_stop_reply.
10495 (handle_status): Don't call send_next_stop_reply, call
10496 notif_write_event instead.
10497 (kill_inferior_callback): Likewise.
10498 (detach_or_kill_inferior_callback): Likewise.
10499 (main): Call initialize_notif.
10500 (process_serial_event): Call QUEUE_is_empty.
10501 (handle_target_event): Call notif_push instead of push event.
10502 * server.h (push_event): Remove declaration.
10503
10504 2012-12-10 Tom Tromey <tromey@redhat.com>
10505
10506 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10507 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10508 macros.
10509 (.c.o): Rewrite.
10510 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10511 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10512 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10513 (amd64-linux-ipa.o, ax.o): Rewrite.
10514 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10515 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10516 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10517 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10518 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10519 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10520 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10521 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10522 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10523 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10524 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10525 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10526 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10527 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10528 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10529 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10530 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10531 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10532 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10533 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10534 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10535 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10536 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10537 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10538 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10539 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10540 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10541 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10542 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10543 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10544 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10545 (reg-tilegx.o): Remove.
10546 (all_object_files): New macro.
10547 Include .deps files.
10548 * aclocal.m4, configure: Rebuild.
10549 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10550 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10551 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10552
10553 2012-12-05 Tom Tromey <tromey@redhat.com>
10554
10555 PR gdb/14917:
10556 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10557
10558 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10559
10560 * configure.ac: Check for linux/perf_event.h.
10561 * config.in: Regenerated.
10562 * configure: Regenerated.
10563
10564 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10565
10566 * hostio.c (handle_readlink): Decrease buffer size
10567 parameter passed to readlink by one byte.
10568
10569 2012-11-26 Yao Qi <yao@codesourcery.com>
10570
10571 * configure.ac (build_warnings): Append '-Wempty-body'.
10572 * configure: Regenerated.
10573 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10574 body.
10575
10576 2012-11-15 Pierre Muller <muller@sourceware.org>
10577
10578 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10579 * config.in: Regenerate.
10580 * configure: Regenerate.
10581 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10582 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10583 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10584 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10585 header.
10586 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10587 instead of <sys/wait.h> header.
10588 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10589
10590 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10591
10592 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10593 (various make rules): Remove -DGDBSERVER
10594
10595 2012-11-09 Yao Qi <yao@codesourcery.com>
10596
10597 * spu-low.c (current_ptid): Move it to ..
10598 * gdbthread.h: ... here. New.
10599 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10600 * server.c (myresume, process_serial_event): Likewise.
10601 * thread-db.c (thread_db_find_new_threads): Likewise.
10602 * tracepoint.c (run_inferior_command): Likewise.
10603
10604 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10605
10606 * server.c (handle_search_memory_1): Include access length in
10607 warning message.
10608
10609 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10610
10611 * linux-crisv32-low.c: Fix compile errors.
10612
10613 2012-09-04 Yao Qi <yao@codesourcery.com>
10614
10615 * tracepoint.c (cmd_qtsv): Adjust debug message.
10616 Don't check CUR_TPOINT.
10617
10618 2012-08-28 Yao Qi <yao@codesourcery.com>
10619
10620 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10621 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10622 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10623 Remove declarations of xmalloc, xreallloc, xstrdup and
10624 freeargv.
10625 * Makefile.in (libiberty_h): New.
10626 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10627 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10628
10629 2012-08-23 Yao Qi <yao@codesourcery.com>
10630
10631 * server.h: Remove declaration of 'xsnprintf'.
10632
10633 2012-08-22 Keith Seitz <keiths@redhat.com>
10634
10635 * server.h: Include build-gnulib-gbserver/config.h.
10636 * gdbreplay.c: Likewise.
10637
10638 2012-08-08 Doug Evans <dje@google.com>
10639
10640 * Makefile.in (SFILES): Add gdb_vecs.c.
10641 (OBS): Add gdb_vecs.o.
10642 (gdb_vecs_h, host_defs_h): New variables.
10643 (thread-db.o): Add $(gdb_vecs_h) dependency.
10644 (gdb_vecs.o): New rule.
10645 * thread-db.c: #include "gdb_vecs.h".
10646 (thread_db_load_search): Use a vector to iterate over path elements.
10647 Handle text appearing after "$pdir".
10648
10649 * configure.ac: Add check for strstr.
10650 * config.in: Regenerate.
10651 * configure: Regenerate.
10652
10653 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10654
10655 * hostio.c (handle_pread): If pread fails, fall back to attempting
10656 lseek/read.
10657 (handle_pwrite): Likewise for pwrite.
10658
10659 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10660
10661 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10662 between unsupported TYPE and unimplementable ADDR/LEN combination.
10663 (arm_insert_point): Act on new return value.
10664
10665 2012-07-31 Pedro Alves <palves@redhat.com>
10666
10667 * server.c (process_point_options): Only skip tokens if we find
10668 one that is unrecognized. Don't treat 'X' specially while
10669 skipping unrecognized tokens.
10670
10671 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10672
10673 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10674 to 4-byte-align HW breakpoint addresses for Thumb.
10675
10676 2012-07-27 Yao Qi <yao@codesourcery.com>
10677
10678 PR remote/14161.
10679
10680 * server.h: Declare gdb_agent_about_to_close.
10681 * target.c (kill_inferior): Include "agent.h".
10682 New. Send command 'kill'.
10683 * target.h (kill_inferior): Removed macro.
10684 * tracepoint.c (gdb_agent_about_to_close): New.
10685 (gdb_agent_helper_thread): Handle command 'close'.
10686 Wait endlessly until the inferior stops.
10687 Install gdb_agent_remove_socket to atexit hook.
10688 (agent_socket_name): New static variable.
10689 (gdb_agent_socket_init): Replace local variable 'name' with
10690 'agent_socket_name'.
10691 (gdb_agent_remove_socket): New.
10692
10693 2012-07-27 Yao Qi <yao@codesourcery.com>
10694
10695 * server.c (process_point_options): Stop at 'X' when parsing.
10696
10697 2012-07-19 Michael Eager <eager@eagercon.com>
10698
10699 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10700 to hw_execute.
10701 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10702 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10703 hardware breakpoint.
10704
10705 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10706
10707 * gdbserver/linux-low.c (initialize_low): Call
10708 linux_ptrace_init_warnings.
10709
10710 2012-07-02 Doug Evans <dje@google.com>
10711
10712 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10713 pointer to int.
10714
10715 2012-07-02 Stan Shebs <stan@codesourcery.com>
10716
10717 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10718 (ax.o): Add it to build rule.
10719 (ax-ipa.o): Ditto.
10720 (OBS): Add format.o.
10721 (IPA_OBS): Add format.o.
10722 * server.c (handle_query): Claim support for breakpoint commands.
10723 (process_point_options): Add command case.
10724 (process_serial_event): Leave running if there are printfs in
10725 effect.
10726 * mem-break.h (any_persistent_commands): Declare.
10727 (add_breakpoint_commands): Declare.
10728 (gdb_no_commands_at_breakpoint): Declare.
10729 (run_breakpoint_commands): Declare.
10730 * mem-break.c (struct point_command_list): New struct.
10731 (struct breakpoint): New field command_list.
10732 (any_persistent_commands): New function.
10733 (add_commands_to_breakpoint): New function.
10734 (add_breakpoint_commands): New function.
10735 (gdb_no_commands_at_breakpoint): New function.
10736 (run_breakpoint_commands): New function.
10737 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10738 locally.
10739 * ax.c: Include format.h.
10740 (ax_printf): New function.
10741 (gdb_eval_agent_expr): Add printf opcode.
10742
10743 2012-06-13 Yao Qi <yao@codesourcery.com>
10744
10745 * server.c (start_inferior): Remove duplicated writes to fields
10746 'last_resume_kind' and 'last_status' of 'current_inferior'.
10747
10748 2012-06-12 Yao Qi <yao@codesourcery.com>
10749 Pedro Alves <palves@redhat.com>
10750
10751 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10752 comment.
10753 * server.c (handle_v_cont): Extend comment.
10754
10755 2012-06-11 Yao Qi <yao@codesourcery.com>
10756
10757 * linux-low.c (linux_attach): Add 'static'.
10758
10759 2012-06-06 Yao Qi <yao@codesourcery.com>
10760
10761 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10762
10763 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10764
10765 Fix gcc -flto compilation warning.
10766 * server.c (main): Make variable multi_mode and attach volatile.
10767
10768 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10769
10770 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10771 if the platform doesn't know about it.
10772
10773 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10774
10775 * Makefile.in (SFILES): Add linux-tile-low.c.
10776 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10777 * configure.srv: Handle tilegx-*-linux*.
10778 * linux-tile-low.c: New file.
10779
10780 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10781
10782 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10783
10784 2012-05-24 Pedro Alves <palves@redhat.com>
10785
10786 PR gdb/7205
10787
10788 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10789
10790 2012-05-24 Pedro Alves <palves@redhat.com>
10791
10792 PR gdb/7205
10793
10794 Replace target_signal with gdb_signal throughout.
10795
10796 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10797
10798 * linux-low.c (linux_store_registers): Avoid the copying sequence
10799 when no data has been retrieved by ptrace.
10800
10801 2012-05-22 Will Deacon <will.deacon@arm.com>
10802
10803 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10804 Include asm/ptrace.h.
10805 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10806 already defined.
10807
10808 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10809
10810 * linux-low.c (linux_store_registers): Don't re-retrieve data
10811 with ptrace that has already been obtained from /proc. Always
10812 copy any data retrieved with ptrace to the buffer supplied.
10813
10814 2012-05-11 Yao Qi <yao@codesourcery.com>
10815 Pedro Alves <palves@redhat.com>
10816
10817 * linux-low.c (enum stopping_threads_kind): New.
10818 (stopping_threads): Change type to `enum stopping_threads_kind'.
10819 (handle_extended_wait): If stopping and suspending threads, leave
10820 the new_lwp suspended too.
10821 (linux_wait_for_event): Adjust.
10822 (stop_all_lwps): Set `stopping_threads' to
10823 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10824 whether we're suspending threads or just stopping them. Assert no
10825 recursion happens.
10826
10827 2012-04-29 Yao Qi <yao@codesourcery.com>
10828
10829 * server.h: Move some code to ...
10830 * gdbthread.h: ... here. New.
10831 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10832 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10833 (nto-low.o, win32-low.o): Likewise.
10834 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10835 * regcache.c, remote-utils.c, server.c: Likewise.
10836 * target.c, tracepoint.c, win32-low.c: Likewise.
10837
10838 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10839
10840 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10841 (PTRACE_ARG4_TYPE): Likewise.
10842 (PTRACE_XFER_TYPE): Likewise.
10843 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10844 ptrace to PTRACE_ARG3_TYPE.
10845 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10846 (PTRACE_ARG4_TYPE): Likewise.
10847 (PTRACE_XFER_TYPE): Likewise.
10848 (linux_detach_one_lwp): Cast fourth argument of
10849 ptrace to long then PTRACE_ARG4_TYPE.
10850 (regsets_fetch_inferior_registers): Cast third argument of
10851 ptrace to long then PTRACE_ARG3_TYPE.
10852 (regsets_store_inferior_registers): Likewise.
10853
10854 2012-04-20 Pedro Alves <palves@redhat.com>
10855
10856 * configure: Regenerate.
10857
10858 2012-04-19 Pedro Alves <palves@redhat.com>
10859
10860 * Makefile.in (GNULIB_BUILDDIR): New.
10861 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10862 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10863 (all, install-only, uninstall, clean-info, all-lib, clean): No
10864 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10865 (maintainer-clean realclean distclean): Use subdir_do.
10866 (subdir_do): New.
10867 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10868 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10869 * acinclude.m4: Include acx_configure_dir.m4.
10870 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10871 calls. Call AC_PROG_RANLIB. Configure gnulib using
10872 ACX_CONFIGURE_DIR.
10873 (GNULIB): New.
10874 (GNULIB_STDINT_H): Adjust.
10875 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10876 * gdbreplay.c: Include build-gnulib/config.h.
10877 * server.h: Likewise.
10878 * aclocal.m4: Regenerate.
10879 * config.in: Regenerate.
10880 * configure: Regenerate.
10881
10882 2012-04-19 Pedro Alves <palves@redhat.com>
10883
10884 * Makefile.in (LIBGNU, INCGNU): Adjust.
10885 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10886 (all, install-only, uninstall, clean-info, all-lib, clean)
10887 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10888 * configure.ac: Adjust AC_OUTPUT output.
10889 * aclocal.m4: Regenerate.
10890 * configure: Regenerate.
10891
10892 2012-04-19 Pedro Alves <palves@redhat.com>
10893
10894 * Makefile.in (generated_files): New.
10895 (server_h): Remove the explicit dependency on config.h, and depend
10896 on $generated_files.
10897
10898 2012-04-19 Pedro Alves <palves@redhat.com>
10899
10900 * Makefile.in (INCGNU): Add -Ignulib.
10901
10902 2012-04-19 Pedro Alves <palves@redhat.com>
10903
10904 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10905 (INCGNU): ... this, and spell out -I here.
10906 (GNULIB_LIB): Rename to ...
10907 (LIBGNU): ... this.
10908 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10909
10910 2012-04-19 Pedro Alves <palves@redhat.com>
10911
10912 * config.in: Regenerate.
10913
10914 2012-04-19 Pedro Alves <palves@redhat.com>
10915
10916 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10917 * server.h (memmem): Remove declaration.
10918 * config.in: Regenerate.
10919 * configure: Regenerate.
10920
10921 2012-04-19 Yao Qi <yao@codesourcery.com>
10922
10923 * Makefile.in (SFILES): Add common/vec.c.
10924 (OBS): Add vec.o.
10925 (vec.o): New rule.
10926
10927 2012-04-19 Yao Qi <yao@codesourcery.com>
10928
10929 * remote-utils.c (prepare_resume_reply): Replace with macro
10930 target_core_of_thread.
10931 * server.c (handle_qxfer_threads_proper): Likewise.
10932 * target.h (traget_core_of_thread): New macro.
10933
10934 2012-04-18 Pedro Alves <palves@redhat.com>
10935
10936 * aclocal.m4: Regenerate.
10937 * configure: Regenerate.
10938
10939 2012-04-16 Yao Qi <yao@codesourcery.com>
10940
10941 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10942 duplicated on address.
10943
10944 2012-04-16 Yao Qi <yao@codesourcery.com>
10945
10946 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10947 (struct tracepoint_action_ops) <send>: New field.
10948 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10949 (agent_expr_send, x_tracepoint_action_send): New.
10950 (l_tracepoint_action_send): New.
10951 (cmd_qtdp): Download and install tracepoint
10952 according to `use_agent'.
10953 (run_inferior_command): Add one more parameter `len'.
10954 Update callers.
10955 (tracepoint_send_agent): New.
10956 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10957
10958 2012-04-16 Yao Qi <yao@codesourcery.com>
10959
10960 * tracepoint.c (download_tracepoints): Moved to ...
10961 (cmd_qtstart): ... here.
10962
10963 2012-04-14 Yao Qi <yao@codesourcery.com>
10964
10965 * tracepoint.c: Include inttypes.h.
10966 (struct collect_memory_action): Use sized types.
10967 (struct tracepoint): Likewise.
10968 (cmd_qtdp, stop_tracing): Update print specifiers.
10969 (cmd_qtp, response_tracepoint): Likewise.
10970 (collect_data_at_tracepoint): Likewise.
10971 (collect_data_at_step): Likewise.
10972
10973 2012-04-14 Yao Qi <yao@codesourcery.com>
10974
10975 Import gnulib module inttypes.
10976 * aclocal.m4, config.in, configure: Regenerated.
10977
10978 2012-04-14 Yao Qi <yao@codesourcery.com>
10979
10980 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10981 Makefile and config.status at last.
10982
10983 2012-04-13 Yao Qi <yao@codesourcery.com>
10984
10985 * tracepoint.c: Include stdint.h unconditionally.
10986
10987 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10988
10989 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10990 on BFD_HAVE_SYS_PROCFS_TYPE.
10991 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10992 * configure: Regenerate.
10993 * config.in: Likewise.
10994
10995 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10996
10997 * Makefile.in (clean): Also remove x32.c x32-linux.c
10998 x32-avx.c x32-avx-linux.c.
10999 (x32.o): New target.
11000 (x32.c): Likewise.
11001 (x32-linux.o): Likewise.
11002 (x32-linux.c): Likewise.
11003 (x32-avx.o): Likewise.
11004 (x32-avx.c): Likewise.
11005 (x32-avx-linux.o): Likewise.
11006 (x32-avx-linux.c): Likewise.
11007
11008 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11009 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11010 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11011 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11012 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11013 i386/x32-avx-linux.xml.
11014
11015 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11016 (init_registers_x32_avx_linux): Likwise.
11017 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11018 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11019
11020 2012-04-13 Pedro Alves <palves@redhat.com>
11021
11022 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11023 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11024 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11025 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11026 the sub-make.
11027
11028 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11029
11030 * linux-x86-low.c (compat_x32_clock_t): New.
11031 (compat_x32_siginfo_t): Likewise.
11032 (compat_x32_siginfo_from_siginfo): Likewise.
11033 (siginfo_from_compat_x32_siginfo): Likewise.
11034 (linux_is_elf64): Likewise.
11035 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11036 and siginfo_from_compat_x32_siginfo for x32.
11037 (x86_arch_setup): Set linux_is_elf64.
11038
11039 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11040
11041 PR gdb/13969
11042 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11043 e_machine field.
11044 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11045 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11046 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11047 compatible with process.
11048
11049 2012-04-12 Yao Qi <yao@codesourcery.com>
11050
11051 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11052 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11053 (install-only, install-info, clean): Handle sub dir gnulib.
11054 (all-lib, am--refresh): New targets.
11055 (memmem.o): Remove target.
11056 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11057 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11058 (AC_REPLACE_FUNCS): Remove memmem.
11059 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11060 (AC_OUTPUT): Generate Makefile in gnulib/.
11061 * aclocal.m4, config.in, configure: Regenerated.
11062
11063 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11064
11065 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11066
11067 2012-04-05 Pedro Alves <palves@redhat.com>
11068
11069 -Werror=strict-aliasing
11070
11071 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11072 pointer.
11073
11074 2012-04-04 Pedro Alves <palves@redhat.com>
11075
11076 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11077 (sparc_store_gregset_from_stack, sparc_store_gregset)
11078 (sparc_breakpoint_at): Fix formatting.
11079
11080 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11081
11082 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11083 are available.
11084 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11085 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11086 * config.in: Regenerate.
11087 * configure: Likewise.
11088
11089 2012-03-29 Pedro Alves <palves@redhat.com>
11090
11091 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11092 Correct ptrace arguments.
11093
11094 2012-03-28 Pedro Alves <palves@redhat.com>
11095
11096 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11097 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11098 (IA64_FR1_REGNUM): New defines.
11099 (ia64_fetch_register): New.
11100 (the_low_target): Install it.
11101 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11102 field.
11103 * linux-low.c (linux_fetch_registers): Try the
11104 the_low_target.fetch_register hook first.
11105
11106 * linux-arm-low.c (the_low_target): Adjust.
11107 * linux-bfin-low.c (the_low_target): Adjust.
11108 * linux-cris-low.c (the_low_target): Adjust.
11109 * linux-crisv32-low.c (the_low_target): Adjust.
11110 * linux-m32r-low.c (the_low_target): Adjust.
11111 * linux-m68k-low.c (the_low_target): Adjust.
11112 * linux-mips-low.c (the_low_target): Adjust.
11113 * linux-ppc-low.c (the_low_target): Adjust.
11114 * linux-s390-low.c (the_low_target): Adjust.
11115 * linux-sh-low.c (the_low_target): Adjust.
11116 * linux-sparc-low.c (the_low_target): Adjust.
11117 * linux-tic6x-low.c (the_low_target): Adjust.
11118 * linux-x86-low.c (the_low_target): Adjust.
11119 * linux-xtensa-low.c (the_low_target): Adjust.
11120
11121 2012-03-26 Pedro Alves <palves@redhat.com>
11122
11123 * server.c (handle_qxfer_libraries): Don't bail early if
11124 the_target->qxfer_libraries_svr4 is not NULL.
11125
11126 2012-03-26 Pedro Alves <palves@redhat.com>
11127
11128 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11129
11130 2012-03-23 Pedro Alves <palves@redhat.com>
11131
11132 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11133 "library-list-svr4" element's start tag when the the DSO list is
11134 empty.
11135
11136 2012-03-23 Pedro Alves <palves@redhat.com>
11137
11138 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11139 a variable whose type size is the same as the inferior's pointer
11140 size.
11141
11142 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11143
11144 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11145 struct siginfo.
11146 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11147 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11148 * linux-low.h: Include <signal.h>.
11149 (struct siginfo): Remove forward declaration.
11150 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11151 struct siginfo.
11152
11153 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11154
11155 * .gitignore: Ignore more files.
11156
11157 2012-03-19 Pedro Alves <palves@redhat.com>
11158 Jan Kratochvil <jan.kratochvil@redhat.com>
11159
11160 * server.c (cont_thread, general_thread): Add describing comments.
11161 (start_inferior): Clear `cont_thread'.
11162 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11163 of a process.
11164
11165 2012-03-15 Yao Qi <yao@codesourcery.com>
11166
11167 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11168 handling to ...
11169 (cmd_qtdp): ... here.
11170
11171 2012-03-15 Yao Qi <yao@codesourcery.com>
11172
11173 * tracepoint.c (struct tracepoint_action_ops): New.
11174 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11175 (m_tracepoint_action_download): New.
11176 (r_tracepoint_action_download): New.
11177 (x_tracepoint_action_download): New.
11178 (l_tracepoint_action_download): New.
11179 (add_tracepoint_action): Install `action->ops' according type.
11180 (download_tracepoint_1): Move code `download' function pointer
11181 of various tracepoint_action_ops.
11182
11183 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11184
11185 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11186 linux_ptrace_attach_warnings.
11187
11188 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11189
11190 * Makefile.in (linux-ptrace.o): New.
11191 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11192 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11193 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11194 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11195 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11196 of these targets.
11197 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11198
11199 2012-03-08 Yao Qi <yao@codesourcery.com>
11200 Pedro Alves <palves@redhat.com>
11201
11202 Fix PR server/13392.
11203 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11204 offset of JMP insn.
11205 * tracepoint.c (remove_tracepoint): New.
11206 (cmd_qtdp): Call remove_tracepoint when failed to install.
11207
11208 2012-03-07 Pedro Alves <palves@redhat.com>
11209
11210 * linux-low.c (get_detach_signal): New.
11211 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11212 Pass on pending signals to PTRACE_DETACH. Check the result of the
11213 ptrace call.
11214 * server.c (program_signals, program_signals_p): New.
11215 (handle_general_set): Handle QProgramSignals.
11216 * server.h (program_signals, program_signals_p): Declare.
11217
11218 2012-03-05 Pedro Alves <palves@redhat.com>
11219 Jan Kratochvil <jan.kratochvil@redhat.com>
11220
11221 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11222 New comment why.
11223
11224 2012-03-03 Yao Qi <yao@codesourcery.com>
11225
11226 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11227 agent_look_up_symbols.
11228
11229 2012-03-03 Yao Qi <yao@codesourcery.com>
11230
11231 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11232 (linux-x86-low.o): Likewise.
11233 * server.h: Remove in_process_agent_loaded.
11234 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11235 common/agent.c.
11236 Update callers.
11237
11238 2012-03-03 Yao Qi <yao@codesourcery.com>
11239
11240 * tracepoint.c (gdb_agent_capability): New global.
11241 (in_process_agent_loaded_ust): Renamed to
11242 `in_process_agent_supports_ust'.
11243 Update callers.
11244 (in_process_agent_supports_ust): Call agent_capability_check.
11245 (clear_installed_tracepoints): Assert that agent supports
11246 agent.
11247
11248 2012-03-03 Yao Qi <yao@codesourcery.com>
11249
11250 * linux-low.c (linux_supports_agent): New.
11251 (linux_target_ops): Initialize field `supports_agent' with
11252 linux_supports_agent.
11253 * target.h (struct target_ops) <supports_agent>: New.
11254 (target_supports_agent): New macro.
11255 * server.c (handle_general_set): Handle packet 'QAgent'.
11256 (handle_query): Send `QAgent+'.
11257 * Makefile.in (server.o): Depends on agent.h.
11258
11259 2012-03-03 Yao Qi <yao@codesourcery.com>
11260
11261 * Makefile.in (OBS): Add agent.o.
11262 Add new rule for agent.o.
11263 Track dependence of tracepoint.c on agent.h.
11264 * tracepoint.c (run_inferior_command_1):
11265 (run_inferior_command): Call agent_run_command.
11266 (gdb_ust_connect_sync_socket): Deleted. Move it to
11267 common/agent.c.
11268 (resume_thread, stop_thread): Likewise.
11269 (gdb_ust_socket_init): Renamed to ...
11270 (gdb_agent_socket_init): ... New.
11271 (gdb_ust_thread): Renamed to ...
11272 (gdb_agent_helper_thread): ... New.
11273 (gdb_ust_init): Move some code to ...
11274 (gdb_agent_init): ... here. New.
11275 [HAVE_UST]: Call gdb_ust_init.
11276 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11277 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11278 * config.in, configure: Regenerated.
11279
11280 2012-03-02 Pedro Alves <palves@redhat.com>
11281
11282 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11283 * linux-low.c (struct simple_pid_list): New.
11284 (stopped_pids): New a struct simple_pid_list pointer.
11285 (add_to_pid_list, pull_pid_from_list): New.
11286 (handle_extended_wait): Don't assume the first signal new children
11287 report is SIGSTOP. Adjust call to pull_pid_from_list.
11288 (linux_wait_for_lwp): Adjust.
11289
11290 2012-03-02 Yao Qi <yao@codesourcery.com>
11291
11292 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11293 debug log.
11294
11295 2012-03-02 Yao Qi <yao@codesourcery.com>
11296
11297 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11298 `stop_pc' and `tpoint'. Update caller.
11299
11300 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11301
11302 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11303 * linux-low.c (use_linux_regsets): New macro.
11304 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11305 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11306 (linux_register_in_regsets): New function.
11307 (usr_fetch_inferior_registers): Skip registers covered by
11308 regsets.
11309 (usr_store_inferior_registers): Likewise.
11310 (usr_fetch_inferior_registers): New macro.
11311 (usr_store_inferior_registers): Likewise.
11312 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11313 (linux_store_registers): Likewise.
11314 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11315 prototype.
11316 (init_registers_mips64_dsp_linux): Likewise.
11317 (init_registers_mips_linux): New macro.
11318 (init_registers_mips_dsp_linux): Likewise.
11319 (mips_dsp_num_regs): Likewise.
11320 (DSP_BASE, DSP_CONTROL): New fallback macros.
11321 (mips_base_regs): New macro.
11322 (mips_regmap): Use it. Fix the size.
11323 (mips_dsp_regmap): New variable.
11324 (mips_dsp_regset_bitmap): Likewise.
11325 (mips_arch_setup): New function.
11326 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11327 than mips_regmap.
11328 (mips_cannot_store_register): Likewise.
11329 (the_low_target): Update .arch_setup, .num_regs and .regmap
11330 initializers. Add .regset_bitmap initializer.
11331 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11332 initializer.
11333 * linux-bfin-low.c (the_low_target): Likewise.
11334 * linux-cris-low.c (the_low_target): Likewise.
11335 * linux-crisv32-low.c (the_low_target): Likewise.
11336 * linux-ia64-low.c (the_low_target): Likewise.
11337 * linux-m32r-low.c (the_low_target): Likewise.
11338 * linux-m68k-low.c (the_low_target): Likewise.
11339 * linux-ppc-low.c (the_low_target): Likewise.
11340 * linux-s390-low.c (the_low_target): Likewise.
11341 * linux-sh-low.c (the_low_target): Likewise.
11342 * linux-sparc-low.c (the_low_target): Likewise.
11343 * linux-tic6x-low.c (the_low_target): Likewise.
11344 * linux-x86-low.c (the_low_target): Likewise.
11345 * linux-xtensa-low.c (the_low_target): Likewise.
11346 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11347 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11348 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11349 srv_xmlfiles.
11350 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11351 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11352
11353 2012-02-29 Yao Qi <yao@codesourcery.com>
11354 Pedro Alves <palves@redhat.com>
11355
11356 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11357 `step_over_finished' is true.
11358
11359 2012-02-27 Pedro Alves <palves@redhat.com>
11360
11361 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11362 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11363
11364 2012-02-27 Pedro Alves <palves@redhat.com>
11365
11366 PR server/9684
11367 * linux-low.c (pid_is_stopped): New.
11368 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11369
11370 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11371
11372 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11373 of conditions.
11374
11375 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11376
11377 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11378
11379 2012-02-24 Luis Machado <lgustavo@codesourcery>
11380
11381 * server.c (handle_query): Advertise support for target-side
11382 breakpoint condition evaluation.
11383 (process_point_options): New function.
11384 (process_serial_event): When inserting a breakpoint, check for
11385 a target-side condition that should be evaluated.
11386
11387 * mem-break.c: Include regcache.h and ax.h.
11388 (point_cond_list_t): New data structure.
11389 (breakpoint) <cond_list>: New field.
11390 (find_gdb_breakpoint_at): Make non-static.
11391 (delete_gdb_breakpoint_at): Clear any target-side
11392 conditions.
11393 (clear_gdb_breakpoint_conditions): New function.
11394 (add_condition_to_breakpoint): Likewise.
11395 (add_breakpoint_condition): Likewise.
11396 (gdb_condition_true_at_breakpoint): Likewise.
11397 (gdb_breakpoint_here): Return result directly instead
11398 of going through a local variable.
11399
11400 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11401 (clear_gdb_breakpoint_conditions): Likewise.
11402 (add_breakpoint_condition): Likewise.
11403 (gdb_condition_true_at_breakpoint): Likewise.
11404
11405 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11406 (need_step_over_p): Take target-side breakpoint condition into
11407 consideration.
11408
11409 2012-02-24 Luis Machado <lgustavo@codesourcery>
11410
11411 * server.h: Include tracepoint.h.
11412 (agent_mem_read, agent_get_trace_state_variable_value,
11413 agent_set_trace_state_variable_value,
11414 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11415 get_set_tsv_func_addr): New prototypes.
11416
11417 * ax.h: New include file.
11418 * ax.c: New source file.
11419
11420 * tracepoint.c: Include ax.h.
11421 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11422 agent_expr, eval_result_type): Move to ax.h.
11423 (parse_agent_expr): Rename to ...
11424 (gdb_parse_agent_expr): ... this, make it non-static and move
11425 to ax.h.
11426 (unparse_agent_expr) Rename to ...
11427 (gdb_unparse_agent_expr): ... this, make it non-static and move
11428 to ax.h.
11429 (eval_agent_expr): Rename to ...
11430 (eval_tracepoint_agent_expr): ... this.
11431 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11432 forward declarations.
11433 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11434 (agent_get_trace_state_variable_value): New function.
11435 (agent_set_trace_state_variable_value): New function.
11436 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11437 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11438 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11439 (condition_true_at_tracepoint): Likewise.
11440 (parse_agent_expr): Rename to ...
11441 (gdb_parse_agent_expr): ... this and move to ax.c.
11442 (unparse_agent_expr): Rename to ...
11443 (gdb_unparse_agent_expr): ... this and move to ax.c.
11444 (gdb_agent_op_name): Move to ax.c.
11445 (eval_agent_expr): Rename to ...
11446 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11447 and move to ax.c.
11448 (eval_tracepoint_agent_expr): New function.
11449 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11450 non-static.
11451 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11452 ax.c.
11453 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11454 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11455 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11456 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11457 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11458 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11459 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11460 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11461 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11462 (compile_bytecodes): Remove forward declaration.
11463 (is_goto_target): Move to ax.c.
11464 (compile_bytecodes): Move to ax.c and call
11465 agent_get_trace_state_variable_value (...) and
11466 agent_set_trace_state_variable_value (...).
11467
11468 * Makefile.in: Update ax.c and IPA dependencies.
11469
11470 2012-02-24 Pedro Alves <palves@redhat.com>
11471
11472 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11473 (cmd_bigqtbuffer_circular): ... this. Only handle
11474 'QTBuffer:circular:'.
11475 (handle_tracepoint_general_set): Adjust.
11476
11477 2012-02-16 Yao Qi <yao@codesourcery.com>
11478
11479 * inferiors.c: Move code to ...
11480 * dll.c: .... here. New.
11481 * server.h: Declare clear_dlls.
11482 * Makefile.in (SFILES): Add dll.c.
11483 (OBS): Add dll.o
11484 (dll.o): New rule.
11485
11486 2012-02-11 Yao Qi <yao@codesourcery.com>
11487
11488 * server.c: (handle_monitor_command): Add a new parameter
11489 `own_buf'.
11490 (handle_query): Update caller.
11491
11492 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11493
11494 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11495 * configure, config.in: Regenerate.
11496 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11497 is not defined.
11498
11499 2012-02-02 Pedro Alves <palves@redhat.com>
11500
11501 Try SIGKILL first, then PTRACE_KILL.
11502 * linux-low.c (linux_kill_one_lwp): New.
11503 (linux_kill_one_lwp): Rename to ...
11504 (kill_one_lwp_callback): ... this. Use the new
11505 linux_kill_one_lwp.
11506
11507 2012-02-02 Pedro Alves <palves@redhat.com>
11508
11509 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11510 inferior.
11511
11512 2012-01-27 Pedro Alves <palves@redhat.com>
11513
11514 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11515 (elf_64_file_p): Make static.
11516 (linux_pid_exe_is_elf_64_file): New.
11517 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11518 Delete declarations.
11519 (linux_pid_exe_is_elf_64_file): Declare.
11520 * linux-x86-low.c (x86_arch_setup): Use
11521 linux_pid_exe_is_elf_64_file.
11522
11523 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11524
11525 * linux-low.c (linux_wait_for_event_1): Rename to ...
11526 (linux_wait_for_event): ... here and merge it with former
11527 linux_wait_for_event - new variable wait_ptid, use it.
11528 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11529
11530 2012-01-23 Pedro Alves <palves@redhat.com>
11531
11532 * server.c (main): Avoid yet another case of infinite loop while
11533 detaching/killing after a longjmp.
11534
11535 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11536
11537 Code cleanup.
11538 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11539
11540 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11541
11542 * hostio.c (handle_readlink): New function.
11543 (handle_vFile): Call it to handle "vFile:readlink" packets.
11544
11545 2012-01-20 Pedro Alves <palves@redhat.com>
11546 Ulrich Weigand <ulrich.weigand@linaro.org>
11547
11548 * server.c (handle_v_requests): Only support vAttach and vRun to
11549 start multiple processes when in extended protocol mode.
11550
11551 2012-01-17 Pedro Alves <palves@redhat.com>
11552
11553 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11554 memalign plus mprotect to allocate the scratch buffer.
11555
11556 2012-01-13 Pedro Alves <palves@redhat.com>
11557
11558 * server.c (attach_inferior): Clear `cont_thread'.
11559
11560 2012-01-13 Pedro Alves <palves@redhat.com>
11561
11562 * server.c (main): Avoid infinite loop while detaching/killing
11563 after a longjmp.
11564
11565 2012-01-09 Doug Evans <dje@google.com>
11566
11567 * server.c (start_inferior): Set last_ptid in --wrapper case.
11568
11569 2012-01-06 Yao Qi <yao@codesourcery.com>
11570
11571 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11572 defined.
11573 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11574
11575 2012-01-04 Yao Qi <yao@codesourcery.com>
11576
11577 * tracepoint.c (cmd_qtdp): Print debug message
11578 for static tracepoint.
11579
11580 2012-01-04 Yao Qi <yao@codesourcery.com>
11581
11582 * tracepoint.c (trace_vdebug): Differentiate debug message
11583 between gdbserver and IPA.
11584
11585 2012-01-03 Yao Qi <yao@codesourcery.com>
11586
11587 * tracepoint.c (tracepoint_was_hit): Don't collect for
11588 static tracepoint.
11589
11590 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11591
11592 * terminal.h: Reformat copyright header.
11593
11594 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11595
11596 * server.c (gdbserver_version): Update copyright year.
11597 * gdbreplay.c (gdbreplay_version): Likewise.
11598
11599 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11600
11601 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11602
11603 Revert:
11604 2011-12-18 Hui Zhu <teawater@gmail.com>
11605 * linux-low.c (linux_create_inferior): Save return value to ret.
11606
11607 2011-12-18 Hui Zhu <teawater@gmail.com>
11608
11609 * linux-low.c (linux_create_inferior): Save return value to ret.
11610
11611 2011-12-16 Doug Evans <dje@google.com>
11612
11613 * linux-low.c (linux_create_inferior): If stdio connection,
11614 redirect stdin from /dev/null, stdout to stderr.
11615 * remote-utils.c (remote_is_stdio): New static global.
11616 (remote_connection_is_stdio): New function.
11617 (remote_prepare): Handle stdio connection.
11618 (remote_open): Ditto.
11619 (remote_close): Don't close stdin for stdio connections.
11620 (read_prim,write_prim): New functions. Replace all calls to
11621 read/write to these.
11622 * server.c (main): Watch for "-" argument. Move call to
11623 remote_prepare before start_inferior.
11624 * server.h (STDIO_CONNECTION_NAME): New macro.
11625 (remote_connection_is_stdio): Declare.
11626
11627 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11628 in debugging output.
11629
11630 2011-12-15 Yao Qi <yao@codesourcery.com>
11631
11632 * tracepoint.c: Include sys/syscall.h.
11633 (gdb_ust_thread): Remove preprocessor conditional.
11634
11635 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11636
11637 * linux-low.c (linux_detach_one_lwp): Call
11638 the_low_target.prepare_to_resume before detaching.
11639
11640 2011-12-14 Yao Qi <yao@codesourcery.com>
11641
11642 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11643 of write.
11644
11645 2011-12-14 Yao Qi <yao@codesourcery.com>
11646
11647 * i386-low.c (i386_low_stopped_data_address): Initialize local
11648 variable `control'.
11649
11650 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11651
11652 PR remote/13492
11653
11654 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11655 DR_CONTROL unless necessary. Extend comments.
11656 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11657 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11658
11659 2011-12-13 Yao Qi <yao@codesourcery.com>
11660
11661 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11662 macros.
11663 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11664
11665 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11666
11667 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11668 Print new debug message for such case.
11669
11670 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11671
11672 Fix overlapping memcpy.
11673 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11674 the read_inferior_memory transfer.
11675 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11676 write_inferior_memory transfer.
11677 (set_fast_tracepoint_jump): New variable buf. Use it for the
11678 read_inferior_memory and write_inferior_memory transfers.
11679 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11680 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11681 Use it for the write_inferior_memory transfer.
11682 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11683 buffers.
11684
11685 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11686
11687 * linux-low.c (fetch_register, store_register): Make code
11688 consistent, fix formatting.
11689
11690 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11691
11692 * linux-low.c (usr_store_inferior_registers): Factor out code
11693 to handle individual registers into...
11694 (store_register): ... this new function.
11695
11696 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11697
11698 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11699 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11700 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11701 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11702 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11703 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11704 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11705 (srv_xmlfiles): Add new XML files.
11706
11707 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11708 and <sys/uio.h>.
11709 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11710 (init_registers_s390_linux32v1): Add prototype.
11711 (init_registers_s390_linux32v2): Likewise.
11712 (init_registers_s390_linux64v1): Likewise.
11713 (init_registers_s390_linux64v2): Likewise.
11714 (init_registers_s390x_linux64v1): Likewise.
11715 (init_registers_s390x_linux64v2): Likewise.
11716 (s390_num_regs): Increment to 52.
11717 (s390_regmap): Add orig_r2 register.
11718 (s390_num_regs_3264): Increment to 68.
11719 (s390_regmap_3264): Add orig_r2 register.
11720 (s390_collect_ptrace_register): Handle orig_r2 register.
11721 (s390_supply_ptrace_register): Likewise.
11722 (s390_fill_last_break): New function.
11723 (s390_store_last_break): Likewise.
11724 (s390_fill_system_call): New function.
11725 (s390_store_system_call): Likewise.
11726 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11727 register sets.
11728 (s390_check_regset): New function.
11729 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11730 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11731 Update target_regsets for available register sets.
11732
11733 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11734 Jan Kratochvil <jan.kratochvil@redhat.com>
11735
11736 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11737 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11738 New.
11739 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11740 * linux-low.h (struct process_info_private): New member r_debug.
11741 * server.c (handle_qxfer_libraries): Call
11742 the_target->qxfer_libraries_svr4.
11743 (handle_qxfer_libraries_svr4): New function.
11744 (qxfer_packets): New entry "libraries-svr4".
11745 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11746 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11747 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11748 PACKET_qXfer_libraries_svr4.
11749
11750 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11751
11752 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11753 PSW address/mask between 8-byte and 16-byte formats.
11754 (s390_supply_ptrace_register): Likewise.
11755 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11756 basic addressing mode bit.
11757
11758 2011-11-24 Stan Shebs <stan@codesourcery.com>
11759
11760 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11761
11762 2011-11-17 Stan Shebs <stan@codesourcery.com>
11763
11764 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11765 (tracing_start_time): New global.
11766 (tracing_stop_time): New global.
11767 (tracing_user_name): New global.
11768 (tracing_notes): New global.
11769 (tracing_stop_note): New global.
11770 (cmd_qtstart): Set traceframe_usage, start_time.
11771 (stop_tracing): Set stop_time.
11772 (cmd_qtstatus): Report additional status.
11773 (cmd_qtp): New function.
11774 (handle_tracepoint_query): Call it.
11775 (cmd_qtnotes): New function.
11776 (handle_tracepoint_general_set): Call it.
11777 (get_timestamp): Rename from tsv_get_timestamp.
11778
11779 2011-11-14 Stan Shebs <stan@codesourcery.com>
11780 Kwok Cheung Yeung <kcy@codesourcery.com>
11781
11782 * linux-x86-low.c (small_jump_insn): New.
11783 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11784 trampoline and error message, build a trampoline and issue a small
11785 jump instruction to it.
11786 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11787 trampoline and error message.
11788 (x86_get_min_fast_tracepoint_insn_len): New.
11789 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11790 * linux-low.h (struct linux_target_ops): Add arguments to
11791 install_fast_tracepoint_jump_pad operation, add new operation.
11792 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11793 arguments.
11794 (linux_get_min_fast_tracepoint_insn_len): New function.
11795 (linux_target_op): Add new operation.
11796 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11797 (gdb_trampoline_buffer_end): Ditto.
11798 (gdb_trampoline_buffer_error): Ditto.
11799 (struct ipa_sym_addresses): Add fields for new IPA variables.
11800 (symbol_list): Add entries for new IPA variables.
11801 (struct tracepoint): Add fields to hold the address range of the
11802 trampoline used by the tracepoint.
11803 (trampoline_buffer_head): New static variable.
11804 (trampoline_buffer_tail): Ditto.
11805 (claim_trampoline_space): New function.
11806 (have_fast_tracepoint_trampoline_buffer): New function.
11807 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11808 structure.
11809 (install_fast_tracepoint): Ditto, also add error buffer argument.
11810 (cmd_qtminftpilen): New function.
11811 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11812 (fast_tracepoint_from_trampoline_address): New function.
11813 (fast_tracepoint_collecting): Handle trampoline as part of jump
11814 pad space.
11815 (set_trampoline_buffer_space): New function.
11816 (initialize_tracepoint): Initialize new IPA variables.
11817 * target.h (struct target_ops): Add arguments to
11818 install_fast_tracepoint_jump_pad operation, add new
11819 get_min_fast_tracepoint_insn_len operation.
11820 (target_get_min_fast_tracepoint_insn_len): New.
11821 (install_fast_tracepoint_jump_pad): Add arguments.
11822 * server.h (IPA_BUFSIZ): Define.
11823 * linux-i386-ipa.c: Include extra header files.
11824 (initialize_fast_tracepoint_trampoline_buffer): New function.
11825 (initialize_low_tracepoint): Call it.
11826 * server.h (set_trampoline_buffer_space): Declare.
11827 (claim_trampoline_space): Ditto.
11828 (have_fast_tracepoint_trampoline_buffer): Ditto.
11829
11830 2011-11-14 Yao Qi <yao@codesourcery.com>
11831
11832 * server.c (handle_query): Handle InstallInTrace for qSupported.
11833 * tracepoint.c (add_tracepoint): Sort list.
11834 (install_tracepoint, download_tracepoint): New.
11835 (cmd_qtdp): Call them to install and download tracepoints.
11836 (sort_tracepoints): Removed.
11837 (cmd_qtstart): Update.
11838
11839 2011-11-14 Yao Qi <yao@codesourcery.com>
11840
11841 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11842 * mem-break.h: Declare.
11843 * tracepoint.c (cmd_qtstart): Move some code to ...
11844 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11845 New.
11846 (download_tracepoints): Move some code to ...
11847 (download_tracepoint_1): ... here. New.
11848
11849 2011-11-08 Yao Qi <yao@codesourcery.com>
11850
11851 * remote-utils.c (relocate_instruction): A comment fix.
11852
11853 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11854
11855 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11856 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11857 dr_status_mirror and dr_control_mirror from debug_reg_state.
11858 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11859 (i386_initial_stuff): Remove use of deleted globals.
11860 (i386_get_thread_context, i386_set_thread_context,
11861 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11862 from debug_reg_state.
11863
11864 2011-11-05 Yao Qi <yao@codesourcery.com>
11865
11866 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11867 address as TPOINT's.
11868
11869 2011-11-02 Stan Shebs <stan@codesourcery.com>
11870
11871 * tracepoint.c (agent_mem_read_string): New function.
11872 (eval_agent_expr): Call it for tracenz.
11873 * server.c (handle_query): Report support for tracenz.
11874
11875 2011-11-02 Yao Qi <yao@codesourcery.com>
11876
11877 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11878
11879 2011-11-02 Yao Qi <yao@codesourcery.com>
11880
11881 * target.h: Fix a typo in comment.
11882
11883 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11884
11885 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11886 clobber the breakpoints' shadows with fast tracepoint jumps.
11887 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11888 * target.c (write_inferior_memory): Also pass MYADDR down to
11889 check_mem_write.
11890
11891 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11892
11893 * configure.ac: Check support for personality routine.
11894 * configure: Regenerate.
11895 * config.in: Likewise.
11896 * linux-low.c: Include <sys/personality.h>.
11897 Define ADDR_NO_RANDOMIZE if necessary.
11898 (linux_create_inferior): Disable address space randomization when
11899 forking inferior, if requested.
11900 (linux_supports_disable_randomization): New function.
11901 (linux_target_ops): Install it.
11902 * server.h (disable_randomization): Declare.
11903 * server.c (disable_randomization): New global variable.
11904 (handle_general_set): Handle QDisableRandomization.
11905 (handle_query): Likewise for qSupported.
11906 (main): Support --disable-randomization and --no-disable-randomization
11907 command line arguments.
11908 * target.h (struct target_ops): Add supports_disable_randomization.
11909 (target_supports_disable_randomization): New macro.
11910
11911 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11912
11913 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11914 ifdef check.
11915 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11916 [!PT_GETDSBT] (target_loadmap): New definition.
11917 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11918 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11919 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11920 and PT_GETDSBT to LINUX_LOADMAP.
11921 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11922 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11923
11924 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11925
11926 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11927 (arm_linux_hwbp_cap): New static variable.
11928 (arm_linux_get_hwbp_cap): Replace by ...
11929 (arm_linux_init_hwbp_cap): ... this new function.
11930 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11931 (arm_linux_get_hw_watchpoint_count): Likewise.
11932 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11933 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11934 (arm_prepare_to_resume): Use perror_with_name instead of error.
11935
11936 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11937
11938 * linux-arm-low.c: Include <signal.h>.
11939 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11940 (struct arm_linux_hwbp_cap): New data type.
11941 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11942 (struct arm_linux_hw_breakpoint): New data type.
11943 (MAX_BPTS, MAX_WPTS): Define.
11944 (struct arch_process_info, struct arch_lwp_info): New data types.
11945 (arm_linux_get_hwbp_cap): New function.
11946 (arm_linux_get_hw_breakpoint_count): Likewise.
11947 (arm_linux_get_hw_watchpoint_count): Likewise.
11948 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11949 (arm_hwbp_control_initialize): Likewise.
11950 (arm_hwbp_control_is_enabled): Likewise.
11951 (arm_hwbp_control_is_initialized): Likewise.
11952 (arm_hwbp_control_disable): Likewise.
11953 (arm_linux_hw_breakpoint_equal): Likewise.
11954 (arm_linux_hw_point_initialize): Likewise.
11955 (struct update_registers_data): New data structure.
11956 (update_registers_callback: New function.
11957 (arm_insert_point): Likewise.
11958 (arm_remove_point): Likewise.
11959 (arm_stopped_by_watchpoint): Likewise.
11960 (arm_stopped_data_address): Likewise.
11961 (arm_new_process): Likewise.
11962 (arm_new_thread): Likewise.
11963 (arm_prepare_to_resume): Likewise.
11964 (the_low_target): Register arm_insert_point, arm_remove_point,
11965 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11966 arm_new_thread, and arm_prepare_to_resume.
11967
11968 2011-09-15 Stan Shebs <stan@codesourcery.com>
11969
11970 * server.h (struct emit_ops): Add compare-goto fields.
11971 * tracepoint.c (gdb_agent_op_sizes): New table.
11972 (emit_eq_goto): New function.
11973 (emit_ne_goto): New function.
11974 (emit_lt_goto): New function.
11975 (emit_le_goto): New function.
11976 (emit_gt_goto): New function.
11977 (emit_ge_goto): New function.
11978 (is_goto_target): New function.
11979 (compile_bytecodes): Recognize special cases of compare-goto
11980 combinations and call specialized emitters for them.
11981 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11982 (amd64_emit_ne_goto): New function.
11983 (amd64_emit_lt_goto): New function.
11984 (amd64_emit_le_goto): New function.
11985 (amd64_emit_gt_goto): New function.
11986 (amd64_emit_ge_goto): New function.
11987 (amd64_emit_ops): Add the new functions.
11988 (i386_emit_eq_goto): New function.
11989 (i386_emit_ne_goto): New function.
11990 (i386_emit_lt_goto): New function.
11991 (i386_emit_le_goto): New function.
11992 (i386_emit_gt_goto): New function.
11993 (i386_emit_ge_goto): New function.
11994 (i386_emit_ops): Add the new functions.
11995
11996 2011-09-08 Stan Shebs <stan@codesourcery.com>
11997
11998 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11999 (i386_emit_epilogue): Restore %ebx.
12000
12001 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12002
12003 * server.c (step_thread): Remove definition.
12004 (process_serial_event): Don't handle Hs.
12005 * server.h (step_thread): Remove declaration.
12006 * target.c (set_desired_inferior): Remove use of step_thread.
12007
12008 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12009
12010 * linux-low.c: Include linux-procfs.h.
12011 (linux_attach_lwp_1): Update comments.
12012 (linux_attach): Scan for existing threads when attaching to a
12013 process that is the tgid.
12014 * Makefile.in: Update dependencies.
12015
12016 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12017
12018 * configure.srv: Add linux-procfs.o dependencies.
12019
12020 2011-08-14 Yao Qi <yao@codesourcery.com>
12021
12022 * target.h (struct target_ops): Fix indent.
12023 * win32-low.c (win32_target_ops): Fix comment.
12024
12025 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12026 Yao Qi <yao@codesourcery.com>
12027
12028 * Makefile.in (clean): Remove tic6x-*.c files.
12029 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12030 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12031 (tic6x-c64xp-linux.c): Likewise.
12032 * configure.srv: Add support for tic6x-*-uclinux.
12033 * linux-tic6x-low.c: New.
12034 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12035
12036 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12037 Yao Qi <yao@codesourcery.com>
12038
12039 * target.h (struct target_ops): Add read_loadmap.
12040 * linux-low.c (struct target_loadseg): New type.
12041 (struct target_loadmap): New type.
12042 (linux_read_loadmap): New function.
12043 (linux_target_ops): Add linux_read_loadmap.
12044 * server.c (handle_query): Support qXfer:fdpic:read packet.
12045 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12046 to NULL.
12047
12048 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12049
12050 * win32-low.c: Include <stdint.h>.
12051
12052 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12053
12054 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12055 to the inferior here.
12056 (i386_remove_aligned_watchpoint): Ditto.
12057 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12058 fit part of the watchpoint in the debug registers.
12059 (i386_update_inferior_debug_regs): New.
12060 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12061 registers, and only update the inferior on success.
12062 (i386_low_remove_watchpoint): Ditto.
12063
12064 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12065
12066 * linux-low.c (compare_ints, unique, list_threads, show_process,
12067 linux_core_of_thread): Delete.
12068 (linux_target_ops): Change linux_core_of_thread to
12069 linux_common_core_of_thread.
12070 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12071 * utils.c (malloc_failure): Change type of argument.
12072 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12073 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12074 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12075 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12076 (IPA_OBJS): Add common-utils-ipa.o.
12077 (ptid_h, linux_osdata_h): New macros.
12078 (server_h): Add common/common-utils.h, common/xml-utils.h,
12079 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12080 common/ptid.h.
12081 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12082 ptid.o, buffer.o): New rules.
12083 (linux-low.o): Add common/linux-osdata.h as a dependency.
12084 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12085 * configure.ac: Add AC_HEADER_DIRENT check.
12086 * config.in: Regenerate.
12087 * configure: Regenerate.
12088 * remote-utils.c (xml_escape_text): Delete.
12089 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12090 buffer_xml_printf): Move to common/buffer.c.
12091 * server.c (main): Remove call to initialize_inferiors.
12092 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12093 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12094 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12095 internal_error, gdb_assert, gdb_assert_fail): Delete.
12096 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12097 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12098 common/buffer.h.
12099 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12100 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12101 initialize_inferiors): Delete.
12102
12103 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12104
12105 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12106 symbol error.
12107
12108 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12109
12110 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12111 assertion.
12112 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12113
12114 2011-05-26 Yao Qi <yao@codesourcery.com>
12115
12116 * Makefile.in (thread-db.o): Track dependence to
12117 common/gdb_thread_db.h.
12118 * thread-db.c: include gdb_thread_db.h from right place.
12119
12120 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12121
12122 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12123 __FILE__ and __LINE__ to internal_error.
12124
12125 2011-05-13 Doug Evans <dje@google.com>
12126
12127 * thread-db.c (try_thread_db_load_from_sdir): New function.
12128 (try_thread_db_load_from_dir): New function.
12129 (thread_db_load_search): Handle $sdir, ignore $pdir.
12130 Remove trying of system directories if search of
12131 libthread-db-search-path fails, that is now done via $sdir.
12132
12133 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12134
12135 * server.c (handle_query): Add EnableDisableTracepoints to the list
12136 of supported features.
12137 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12138 tracepoints.
12139 (cmd_qtenable_disable): New.
12140 (cmd_qtstart): Install tracepoints even if disabled.
12141 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12142 receiving a QTEnable or QTDisable packet.
12143 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12144 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12145 tracepoints.
12146 (gdb_probe): Skip data collection if static tracepoint is disabled.
12147
12148 2011-05-10 Doug Evans <dje@google.com>
12149
12150 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12151
12152 2011-05-04 Doug Evans <dje@google.com>
12153
12154 * linux-low.c (linux_join): Skip process lookup.
12155 * spu-low.c (spu_join): Ditto.
12156 * server.c (join_inferiors_callback): Delete.
12157 (process_serial_event): For 'D' packet (detach) call join_inferior
12158 directly.
12159
12160 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12161
12162 * README: Don't mention xscale*-*-linux*.
12163 * configure.srv (xscale*-*-linux*): Don't handle target.
12164
12165 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12166
12167 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12168 casting pointers.
12169 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12170 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12171 (i386_emit_void_call_2): Likewise.
12172
12173 2011-04-26 Yao Qi <yao@codesourcery.com>
12174
12175 * linux-low.c: Move common macros to linux-ptrace.h.
12176 Include linux-ptrace.h.
12177 * Makefile.in (linux_ptrace_h): New.
12178 (linux-low.o): Depends on linux-ptrace.h.
12179
12180 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12181
12182 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12183 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12184 (remote_prepare): New function with most of the TCP code from ...
12185 (remote_open): ... here. Detect PORT here unconditionally. Move also
12186 setting transport_is_reliable.
12187 * server.c (run_once): New variable.
12188 (gdbserver_usage): Document it.
12189 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12190 the first run if RUN_ONCE.
12191 * server.h (run_once, remote_prepare): New declarations.
12192
12193 2011-04-19 Tom Tromey <tromey@redhat.com>
12194
12195 * win32-low.c (handle_load_dll): Remove duplicate "the".
12196
12197 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12198
12199 Remove support for old Cygwin 1.5 versions.
12200 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12201 function to avoid warning.
12202 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12203 warning.
12204
12205 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12206
12207 * gdbserver/server.h (Macro _): Define it if not available.
12208
12209 2011-03-14 Michael Snyder <msnyder@vmware.com>
12210
12211 * hostio.c (handle_close): Remove unnecessary null test.
12212
12213 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12214
12215 * Makefile.in (maintainer-clean realclean distclean): Remove
12216 "make ... subdir_do" command.
12217
12218 2011-03-10 Michael Snyder <msnyder@vmware.com>
12219
12220 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12221
12222 * server.c (handle_v_run): Free alloced buffer on early return.
12223
12224 2011-03-09 Yao Qi <yao@codesourcery.com>
12225
12226 Revert:
12227 2011-03-04 Yao Qi <yao@codesourcery.com>
12228
12229 * Makefile.in: Remove GNU make feature --directory.
12230
12231 2011-03-05 Yao Qi <yao@codesourcery.com>
12232
12233 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12234 (subdir_do): New make target. Copied from gdb/Makefile.
12235 (maintainer-clean, realclean, distclean, clean): Call corresponding
12236 make targets in common/Makefile.
12237
12238 2011-02-11 Yao Qi <yao@codesourcery.com>
12239
12240 * configure.ac: Call AC_PROG_RANLIB.
12241 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12242 * configure: Regenerate.
12243
12244 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12245
12246 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12247
12248 2011-03-06 Yao Qi <yao@codesourcery.com>
12249
12250 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12251
12252 2011-03-05 Yao Qi <yao@codesourcery.com>
12253
12254 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12255 (subdir_do): New make target. Copied from gdb/Makefile.
12256 (maintainer-clean, realclean, distclean, clean): Call corresponding
12257 make targets in common/Makefile.
12258
12259 2011-03-04 Yao Qi <yao@codesourcery.com>
12260
12261 * Makefile.in: Remove GNU make feature --directory.
12262
12263 2011-03-04 Michael Snyder <msnyder@vmware.com>
12264
12265 * server.c (queue_stop_reply): Call xmalloc not malloc.
12266
12267 2011-03-02 Michael Snyder <msnyder@vmware.com>
12268
12269 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12270
12271 2011-02-28 Michael Snyder <msnyder@vmware.com>
12272
12273 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12274 (cmd_qtframe): Ditto.
12275 (cmd_qtbuffer): Ditto.
12276 (cmd_bigqtbuffer): Ditto.
12277
12278 * utils.c (decimal2str): Initialize 'width' to nine, then
12279 don't mess with it.
12280
12281 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12282
12283 * hostio.c (require_data): Free *data, not data.
12284
12285 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12286
12287 * hostio.c (require_data): Use free, not xfree.
12288
12289 2011-02-27 Michael Snyder <msnyder@vmware.com>
12290
12291 * server.c (handle_query): Discard unused value.
12292
12293 * hostio.c (require_data): Free malloc memory before returning
12294 error.
12295
12296 2011-02-26 Michael Snyder <msnyder@vmware.com>
12297
12298 * linux-low.c (list_threads): Call closedir for dirent.
12299
12300 2011-02-27 Michael Snyder <msnyder@vmware.com>
12301
12302 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12303 a case statement falls through.
12304
12305 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12306
12307 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12308 in comparison.
12309
12310 2011-02-26 Michael Snyder <msnyder@vmware.com>
12311
12312 * utils.c (decimal2str): Eliminate dead code and dead param.
12313 (pulongest): Drop dead param from call to decimal2str.
12314 (plongest): Ditto.
12315
12316 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12317
12318 Revert the following patch (not approved yet):
12319 2011-02-21 Hui Zhu <teawater@gmail.com>
12320 * tracepoint.c (tp_printf): New function.
12321 (eval_agent_expr): Handle gdb_agent_op_printf.
12322
12323 2011-02-21 Hui Zhu <teawater@gmail.com>
12324
12325 * tracepoint.c (tp_printf): New function.
12326 (eval_agent_expr): Handle gdb_agent_op_printf.
12327
12328 2011-02-18 Tom Tromey <tromey@redhat.com>
12329
12330 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12331 (tracepoint.o): Likewise.
12332 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12333 (gdb_agent_op_names): Likewise.
12334
12335 2011-02-18 Tom Tromey <tromey@redhat.com>
12336
12337 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12338 gdb_agent_op_rot>: New constants.
12339 (gdb_agent_op_names): Add pick and roll.
12340 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12341 cases.
12342
12343 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12344
12345 * aclocal.m4: Regenerated with aclocal-1.11.1.
12346
12347 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12348
12349 * server.c (handle_qxfer_traceframe_info): New.
12350 (qxfer_packets): Register "traceframe-info".
12351 (handle_query): Report support for qXfer:traceframe-info:read+.
12352 * tracepoint.c (match_blocktype): New.
12353 (traceframe_find_block_type): Rename to ...
12354 (traceframe_walk_blocks): ... this. Add callback filter argument,
12355 and use it.
12356 (traceframe_find_block_type): New, reimplemented on top of
12357 traceframe_walk_blocks.
12358 (build_traceframe_info_xml): New.
12359 (traceframe_read_info): New.
12360 * server.h (traceframe_read_info): Declare.
12361
12362 2011-02-11 Yao Qi <yao@codesourcery.com>
12363
12364 * configure.ac: Call AC_PROG_RANLIB.
12365 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12366 * configure: Regenerate.
12367
12368 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12369
12370 * server.c (gdb_read_memory): Change return semantics to allow
12371 partial transfers.
12372 (handle_search_memory_1): Adjust.
12373 (process_serial_event) <'m' packet>: Handle partial transfers.
12374 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12375
12376 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12377
12378 * regcache.c (init_register_cache): Initialize
12379 regcache->register_status.
12380 (free_register_cache): Release regcache->register_status.
12381 (regcache_cpy): Copy register_status.
12382 (registers_to_string): Print 'x's for unavailable registers.
12383 (supply_register): Mark the register's status valid or
12384 unavailable, depending on whether a buffer was passed in or not.
12385 (supply_register_zeroed): New.
12386 (supply_regblock): Mark the registers' status valid or
12387 unavailable, depending on whether a buffer was passed in or not.
12388 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12389 (struct regcache): New `register_status' field.
12390 (supply_register_zeroed): Declare.
12391 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12392 supply_register_zeroed, rather than passing a NULL buffer to
12393 supply_register.
12394 * tracepoint.c (fetch_traceframe_registers): Update comment.
12395
12396 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12397
12398 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12399 buffer explicit.
12400
12401 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12402
12403 * server.h (decode_xfer_write): Change prototype.
12404 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12405 and don't extract the annex here.
12406 * server.c (decode_xfer_read): Remove `annex' parameter,
12407 and don't extract the annex here.
12408 (decode_xfer): New.
12409 (struct qxfer): New.
12410 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12411 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12412 (handle_qxfer_statictrace): New functions, abstracted out from
12413 handle_query, and made to use the struct qxfer interface.
12414 (handle_threads_qxfer_proper): Rename to ...
12415 (handle_qxfer_threads_proper): ... this.
12416 (handle_threads_qxfer): Rename to ...
12417 (handle_qxfer_threads): ... this. Adjust.
12418 (qxfer_packets): New array.
12419 (handle_qxfer): New function.
12420 (handle_query): Use handle_qxfer.
12421
12422 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12423
12424 * gdbreplay.c: Shorten lines of >= 80 columns.
12425 * linux-low.c: Ditto.
12426 * linux-ppc-low.c: Ditto.
12427 * linux-s390-low.c: Ditto.
12428 * linux-sparc-low.c: Ditto.
12429 * linux-x86-low.c: Ditto.
12430 * linux-xtensa-low.c: Ditto.
12431 * mem-break.c: Ditto.
12432 * nto-low.c: Ditto.
12433 * regcache.h: Ditto.
12434 * remote-utils.c: Ditto.
12435 * server.c: Ditto.
12436 * server.h: Ditto.
12437 * thread-db.c: Ditto.
12438 * tracepoint.c: Ditto.
12439 * utils.c: Ditto.
12440 * win32-low.h: Ditto.
12441
12442 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12443
12444 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12445 update.
12446
12447 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12448
12449 * server.c (gdbserver_version): Update copyright year in version
12450 output.
12451 * gdbreplay.c (gdbreplay_version): Ditto.
12452
12453 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12454
12455 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12456 * linux-bfin-low.c: New file.
12457 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12458 PT_DATA_ADDR for BFIN targets.
12459 * Makefile.in (SFILES): Add linux-bfin-low.c.
12460 (clean): Remove reg-bfin.c.
12461 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12462 * README: Mention supported Blackfin targets.
12463
12464 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12465
12466 * .gitignore: New file.
12467
12468 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12469
12470 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12471
12472 2010-10-22 Jie Zhang <jie@codesourcery.com>
12473
12474 * Makefile.in: Add FLAGS_TO_PASS variable.
12475 (install): Remove dependency of install-only and recursively
12476 invoke make for install-only.
12477
12478 2010-10-04 Doug Evans <dje@google.com>
12479
12480 * Makefile.in (uninstall): Use $(DESTDIR).
12481
12482 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12483
12484 PR gdb/11842
12485
12486 * linux-x86-low.c (compat_siginfo_from_siginfo)
12487 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12488 si_code is < 0. Check for si_code == SI_TIMER before checking for
12489 si_code < 0.
12490
12491 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12492
12493 * lynx-i386-low.c: New file.
12494 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12495
12496 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12497
12498 * lynx-low.c (ptrace_request_to_str): Remove handling for
12499 request values that have been removed in LynxOS 5.x.
12500
12501 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12502
12503 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12504 <ptrace.h>
12505
12506 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12507
12508 * configure.ac: Add --enable-inprocess-agent option.
12509 * configure: Rebuilt.
12510
12511 2010-09-06 Yao Qi <yao@codesourcery.com>
12512
12513 * linux-low.c (linux_kill): Remove unused variable.
12514 (linux_stabilize_threads): Likewise.
12515 * server.c (start_inferior): Likewise.
12516 (queue_stop_reply_callback): Likewise.
12517 * tracepoint.c (do_action_at_tracepoint): Likewise.
12518
12519 2010-09-06 Yao Qi <yao@codesourcery.com>
12520
12521 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12522 on return.
12523
12524 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12525
12526 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12527
12528 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12529
12530 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12531 "$(IPA_DEPFILES)".
12532
12533 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12534
12535 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12536 gdbserver/lynx-ppc-low.c: New files.
12537 * Makefile.in (lynx_low_h): New variable.
12538 (lynx-low.o, lynx-ppc-low.o): New rules.
12539 * configure.ac: On LynxOS, link with -lnetinet.
12540 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12541 * configure: regenerate.
12542
12543 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12544
12545 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12546 * configure.ac: Add check for vasprintf and vsnprintf.
12547 * configure, config.in: Regenerate.
12548 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12549
12550 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12551
12552 * gdbreplay.c: Move include of alloca.h up, next to include of
12553 malloc.h.
12554 * server.h: Add include of malloc.h.
12555 * mem-break.c: Remove include of malloc.h.
12556 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12557
12558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12559
12560 * Makefile.in (memmem.o): Build with -Wno-error.
12561
12562 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12563
12564 * utils.c (xsnprintf): Make non-static.
12565 * server.h: Add xsnprintf declaration.
12566 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12567 replace calls to snprintf by calls to xsnprintf throughout.
12568
12569 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12570
12571 * configure.ac: Add configure check for alloca.
12572 * configure, config.in: Regenerate.
12573 * server.h: Include alloca.h if it exists.
12574 * gdbreplay.c: Include alloca.h if it exists.
12575
12576 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12577
12578 * linux-low.c (__SIGRTMIN): Define if not already defined.
12579 (linux_create_inferior): Check for __ANDROID__ rather than
12580 __SIGRTMIN.
12581 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12582 are already deferred.
12583 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12584 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12585 stopped and already has a pending signal to report.
12586 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12587 a pending signal to report or is moving out of a jump pad.
12588 (linux_init_signals): Check for __ANDROID__ rather than
12589 __SIGRTMIN.
12590
12591 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12592
12593 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12594 debug_threads check. Avoid a linear search when not doing debug
12595 output.
12596
12597 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12598
12599 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12600 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12601 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12602 (process_event): Change local fd's type to gdb_fildes_t.
12603 (create_file_handler): Adjust prototype.
12604 (delete_file_handler): Adjust prototype.
12605 (handle_file_event): Adjust prototype. Use pfildes.
12606 (create_file_event): Adjsut prototype.
12607 * remote-utils.c (remote_desc, listen_desc): Change type to
12608 gdb_fildes_t.
12609 * server.h: New gdb_fildes_t typedef.
12610 [USE_WIN32API]: Include winsock2.h.
12611 (delete_file_handler, add_file_handler): Adjust prototypes.
12612 (pfildes): Declare.
12613 * utils.c (pfildes): New.
12614
12615 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12616
12617 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12618 * configure: Regenerate.
12619
12620 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12621
12622 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12623 (linux_done_accessing_memory): ... this.
12624 (linux_target_ops): Adjust.
12625 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12626 * nto-low.c (nto_target_ops): Adjust comment.
12627 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12628 * spu-low.c (spu_target_ops): Adjust comment.
12629 * target.h (target_ops): Rename unprepare_to_access_memory field
12630 to done_accessing_memory.
12631 (unprepare_to_access_memory): Rename to ...
12632 (done_accessing_memory): ... this.
12633
12634 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12635
12636 * linux-low.c (linux_prepare_to_access_memory): New.
12637 (linux_unprepare_to_access_memory): New.
12638 (linux_target_ops): Install them.
12639 * server.c (read_memory): Rename to ...
12640 (gdb_read_memory): ... this. Use
12641 prepare_to_access_memory/prepare_to_access_memory.
12642 (write_memory): Rename to ...
12643 (gdb_write_memory): ... this. Use
12644 prepare_to_access_memory/prepare_to_access_memory.
12645 (handle_search_memory_1): Adjust.
12646 (process_serial_event): Adjust.
12647 * target.h (struct target_ops): New fields
12648 prepare_to_access_memory and unprepare_to_access_memory.
12649 (prepare_to_access_memory, unprepare_to_access_memory): New.
12650 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12651 prepare_to_access_memory/prepare_to_access_memory.
12652 * nto-low.c (nto_target_ops): Adjust.
12653 * spu-low.c (spu_target_ops): Adjust.
12654 * win32-low.c (win32_target_ops): Adjust.
12655
12656 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12657
12658 * Makefile.in (WARN_CFLAGS): Get it from configure.
12659 (WERROR_CFLAGS): New.
12660 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12661 * configure.ac: Introduce --enable-werror, which adds -Werror to
12662 the compiler command line. Enabled by default. Disable with
12663 --disable-werror. Add -Wdeclaration-after-statement
12664 Wpointer-arith and -Wformat-nonliteral to warning flags.
12665 * configure: Regenerate.
12666
12667 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12668
12669 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12670
12671 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12672
12673 * gdbreplay.c (remote_error): New.
12674 (gdbchar): New.
12675 (expect): Use gdbchar. Check for error reading from GDB.
12676 Clarify sync error output.
12677 (play): Check for errors writing to GDB.
12678 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12679 * remote-utils.c (getpkt): Check for errors writing to the remote
12680 descriptor.
12681
12682 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12683
12684 * linux-low.c (linux_wait_1): Move non-debugging code out of
12685 `debug_threads' control.
12686
12687 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12688
12689 * linux-low.c (linux_wait_1): Don't set last_status here.
12690 * server.c (push_event, queue_stop_reply_callback): Assert we're
12691 not pushing a TARGET_WAITKIND_IGNORE event.
12692 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12693 (myresume, handle_target_event): Set the thread's last_resume_kind
12694 and last_status from the target returned status.
12695
12696 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12697
12698 PR threads/10729
12699
12700 * linux-x86-low.c (update_debug_registers_callback): New.
12701 (i386_dr_low_set_addr): Use it.
12702 (i386_dr_low_get_addr): New.
12703 (i386_dr_low_set_control): Use update_debug_registers_callback.
12704 (i386_dr_low_get_control): New.
12705 (i386_dr_low_get_status): Adjust.
12706 * linux-low.c (linux_stop_lwp): New.
12707 * linux-low.h (linux_stop_lwp): Declare.
12708
12709 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12710 argument instead of a i386_debug_reg_state.
12711 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12712 a i386_debug_reg_state.
12713 (i386_insert_aligned_watchpoint): Adjust.
12714 (i386_remove_aligned_watchpoint): Adjust.
12715 (i386_low_stopped_data_address): Read the debug registers from the
12716 inferior instead of from the mirrors.
12717 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12718 (i386_dr_low_get_addr): Declare.
12719 (i386_dr_low_get_control): Declare.
12720 (i386_dr_low_get_status): Change prototype.
12721
12722 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12723 (i386_dr_low_get_addr): New.
12724 (i386_dr_low_get_control): New.
12725 (i386_dr_low_get_status): Adjust prototype. Return
12726 dr_status_mirror.
12727 (i386_initial_stuff): Clear dr_status_mirror and
12728 dr_control_mirror.
12729 (i386_get_thread_context): Adjust.
12730 (i386_set_thread_context): Adjust.
12731 (i386_thread_added): Adjust.
12732
12733 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12734
12735 * linux-low.h (linux_thread_area): Delete declaration.
12736
12737 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12738
12739 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12740 after its termination.
12741
12742 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12743
12744 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12745 (gdb_wants_all_stopped): Delete.
12746 (linux_wait_1): Don't call them.
12747 * server.c (handle_v_cont): Tag all threads as want-stopped.
12748 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12749 stopped as "client-wants-stopped".
12750
12751 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12752
12753 * Makefile.in (signals_h): New.
12754 (server_h): Depend on it.
12755 (server.o): Don't depend on $(signals_def).
12756 (signals.o): Depend on $(signals_def).
12757
12758 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12759
12760 * Makefile.in (signals_def): New.
12761 (server_h): Append include/gdb/signals.h and signals_def.
12762 (server.o): Append signals_def.
12763
12764 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12765
12766 * server.c (handle_target_event): Use target_signal_to_host for
12767 resume_info.sig initialization.
12768 * target.h (struct thread_resume) <sig>: New comment.
12769
12770 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12771
12772 * server.c (handle_query): strcpy() the returned string from paddress()
12773 instead of sprintf().
12774 * utils.c (paddress): Return phex_nz().
12775
12776 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12777
12778 * server.c (handle_v_cont): Call mourn_inferior if process
12779 just exited.
12780 (myresume): Likewise.
12781
12782 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12783
12784 Static tracepoints, and integration with UST.
12785
12786 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12787 * mem-break.c (uninsert_all_breakpoints)
12788 (reinsert_all_breakpoints): New.
12789 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12790 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12791 (gdb_agent_ust_loaded, helper_thread_id)
12792 (gdb_agent_helper_thread_id): New macros.
12793 (struct ipa_sym_addresses): Add addr_ust_loaded,
12794 addr_helper_thread_id, addr_cmd_buf.
12795 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12796 (in_process_agent_loaded_ust): New.
12797 (write_e_ust_not_loaded): New.
12798 (maybe_write_ipa_ust_not_loaded): New.
12799 (struct collect_static_trace_data_action): New.
12800 (enum tracepoint_type) <static_tracepoint>: New.
12801 (struct tracepoint) <handle>: Mention static tracepoints.
12802 (struct static_tracepoint_ctx): New.
12803 (CMD_BUF_SIZE): New.
12804 (add_tracepoint_action): Handle static tracepoint actions.
12805 (unprobe_marker_at): New.
12806 (clear_installed_tracepoints): Handle static tracepoints.
12807 (cmd_qtdp): Handle static tracepoints.
12808 (probe_marker_at): New.
12809 (cmd_qtstart): Handle static tracepoints.
12810 (response_tracepoint): Handle static tracepoints.
12811 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12812 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12813 (get_context_regcache): Handle static tracepoints.
12814 (do_action_at_tracepoint): Handle static tracepoint actions.
12815 (traceframe_find_block_type): Handle static trace data blocks.
12816 (traceframe_read_sdata): New.
12817 (download_tracepoints): Download static tracepoint actions.
12818 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12819 (GDB_PROBE_NAME): New.
12820 (ust_ops): New.
12821 (GET_UST_SYM): New.
12822 (USTF): New.
12823 (dlsym_ust): New.
12824 (ust_marker_to_static_tracepoint): New.
12825 (gdb_probe): New.
12826 (collect_ust_data_at_tracepoint): New.
12827 (gdb_ust_probe): New.
12828 (UNIX_PATH_MAX, SOCK_DIR): New.
12829 (gdb_ust_connect_sync_socket): New.
12830 (resume_thread, stop_thread): New.
12831 (run_inferior_command): New.
12832 (init_named_socket): New.
12833 (gdb_ust_socket_init): New.
12834 (cstr_to_hexstr): New.
12835 (next_st): New.
12836 (first_marker, next_marker): New.
12837 (response_ust_marker): New.
12838 (cmd_qtfstm, cmd_qtsstm): New.
12839 (unprobe_marker_at, probe_marker_at): New.
12840 (cmd_qtstmat, gdb_ust_thread): New.
12841 (gdb_ust_init): New.
12842 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12843 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12844 (ST_REGENTRY): New.
12845 (x86_64_st_collect_regmap): New.
12846 (X86_64_NUM_ST_COLLECT_GREGS): New.
12847 (AMD64_RIP_REGNUM): New.
12848 (supply_static_tracepoint_registers): New.
12849 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12850 (ST_REGENTRY): New.
12851 (i386_st_collect_regmap): New.
12852 (i386_NUM_ST_COLLECT_GREGS): New.
12853 (supply_static_tracepoint_registers): New.
12854 * server.c (handle_query): Handle qXfer:statictrace:read.
12855 <qSupported>: Report support for StaticTracepoints, and
12856 qXfer:statictrace:read features.
12857 * server.h (traceframe_read_sdata)
12858 (supply_static_tracepoint_registers): Declare.
12859 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12860 (unpack_varlen_hex): Include in IPA build.
12861 * Makefile.in (ustlibs, ustinc): New.
12862 (IPA_OBJS): Add remote-utils-ipa.o.
12863 ($(IPA_LIB)): Link -ldl and -lpthread.
12864 (UST_CFLAGS): New.
12865 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12866 * config.in, configure: Regenerate.
12867
12868 2010-06-20 Ian Lance Taylor <iant@google.com>
12869 Pedro Alves <pedro@codesourcery.com>
12870
12871 * linux-x86-low.c (always_true): Delete.
12872 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12873 trying to fool the compiler with always_true.
12874
12875 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12876
12877 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12878 conditions in gdbserver.
12879
12880 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12881
12882 * spu-low.c (spu_read_memory): Wrap around local store limit.
12883 (spu_write_memory): Likewise.
12884
12885 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12886
12887 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12888 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12889 LONGEST uses.
12890 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12891 uses.
12892 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12893 uses with LONGEST uses.
12894
12895 2010-06-14 Stan Shebs <stan@codesourcery.com>
12896 Pedro Alves <pedro@codesourcery.com>
12897
12898 Bytecode compiler.
12899
12900 * linux-x86-low.c: Include limits.h.
12901 (add_insns): New.
12902 (always_true): New.
12903 (EMIT_ASM): New.
12904 (EMIT_ASM32): New.
12905 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12906 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12907 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12908 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12909 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12910 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12911 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12912 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12913 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12914 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12915 (amd64_emit_void_call_2): New.
12916 (amd64_emit_ops): New.
12917 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12918 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12919 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12920 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12921 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12922 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12923 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12924 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12925 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12926 (i386_emit_stack_adjust, i386_emit_int_call_1)
12927 (i386_emit_void_call_2): New.
12928 (i386_emit_ops): New.
12929 (x86_emit_ops): New.
12930 (the_low_target): Install x86_emit_ops.
12931 * server.h (struct emit_ops): New.
12932 (get_raw_reg_func_addr): Declare.
12933 (current_insn_ptr, emit_error): Declare.
12934 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12935 (set_trace_state_variable_value): New defines.
12936 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12937 addr_get_trace_state_variable_value and
12938 addr_set_trace_state_variable_value.
12939 (symbol_list): New fields for get_raw_reg,
12940 get_trace_state_variable_value and set_trace_state_variable_value.
12941 (condfn): New typedef.
12942 (struct tracepoint): New field `compiled_cond'.
12943 (do_action_at_tracepoint): Clear compiled_cond.
12944 (get_trace_state_variable_value, set_trace_state_variable_value):
12945 Export in the IPA.
12946 (condition_true_at_tracepoint): If there's a compiled condition,
12947 run that.
12948 (current_insn_ptr, emit_error): New globals.
12949 (struct bytecode_address): New.
12950 (get_raw_reg_func_addr): New.
12951 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12952 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12953 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12954 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12955 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12956 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12957 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12958 (compile_tracepoint_condition, compile_bytecodes): New.
12959 * target.h (emit_ops): Forward declare.
12960 (struct target_ops): New field emit_ops.
12961 (target_emit_ops): New.
12962 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12963 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12964 * linux-low.c (linux_emit_ops): New.
12965 (linux_target_ops): Install it.
12966 * linux-low.h (struct linux_target_ops): New field emit_ops.
12967
12968 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12969
12970 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12971 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12972
12973 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12974 Stan Shebs <stan@codesourcery.com>
12975
12976 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12977 (all): Depend on $(extra_libraries).
12978 (install-only): Install the IPA.
12979 (IPA_OBJS, IPA_LIB): New.
12980 (clean): Remove the IPA lib.
12981 (IPAGENT_CFLAGS): New.
12982 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12983 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12984 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12985 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12986 * configure.ac: Check for atomic builtins support in the compiler.
12987 (IPA_DEPFILES, extra_libraries): Define.
12988 * configure.srv (ipa_obj): Add description.
12989 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12990 (i[34567]86-*-linux*): Set ipa_obj.
12991 (x86_64-*-linux*): Set ipa_obj.
12992 * linux-low.c (stabilizing_threads): New.
12993 (supports_fast_tracepoints): New.
12994 (linux_detach): Stabilize threads before detaching.
12995 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12996 the lwp is either not stabilizing, or is moving out of a jump pad.
12997 (linux_fast_tracepoint_collecting): New.
12998 (maybe_move_out_of_jump_pad): New.
12999 (enqueue_one_deferred_signal): New.
13000 (dequeue_one_deferred_signal): New.
13001 (linux_wait_for_event_1): If moving out of a jump pad, defer
13002 pending signals to later.
13003 (linux_stabilize_threads): New.
13004 (linux_wait_1): Check if threads need moving out of jump pads, and
13005 do it if so.
13006 (stuck_in_jump_pad_callback): New.
13007 (move_out_of_jump_pad_callback): New.
13008 (lwp_running): New.
13009 (linux_resume_one_lwp): Handle moving out of jump pads.
13010 (linux_set_resume_request): Dequeue deferred signals.
13011 (need_step_over_p): Also step over fast tracepoint jumps.
13012 (start_step_over): Also uninsert fast tracepoint jumps.
13013 (finish_step_over): Also reinsert fast tracepoint jumps.
13014 (linux_install_fast_tracepoint_jump): New.
13015 (linux_target_ops): Install linux_stabilize_threads and
13016 linux_install_fast_tracepoint_jump_pad.
13017 * linux-low.h (linux_target_ops) <get_thread_area,
13018 install_fast_tracepoint_jump_pad>: New fields.
13019 (struct lwp_info) <collecting_fast_tracepoint,
13020 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13021 (linux_get_thread_area): Declare.
13022 * linux-x86-low.c (jump_insn): New.
13023 (x86_get_thread_area): New.
13024 (append_insns): New.
13025 (push_opcode): New.
13026 (amd64_install_fast_tracepoint_jump_pad): New.
13027 (i386_install_fast_tracepoint_jump_pad): New.
13028 (x86_install_fast_tracepoint_jump_pad): New.
13029 (the_low_target): Install x86_get_thread_area and
13030 x86_install_fast_tracepoint_jump_pad.
13031 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13032 (struct fast_tracepoint_jump): New.
13033 (fast_tracepoint_jump_insn): New.
13034 (fast_tracepoint_jump_shadow): New.
13035 (find_fast_tracepoint_jump_at): New.
13036 (fast_tracepoint_jump_here): New.
13037 (delete_fast_tracepoint_jump): New.
13038 (set_fast_tracepoint_jump): New.
13039 (uninsert_fast_tracepoint_jumps_at): New.
13040 (reinsert_fast_tracepoint_jumps_at): New.
13041 (set_breakpoint_at): Use write_inferior_memory.
13042 (uninsert_raw_breakpoint): Use write_inferior_memory.
13043 (check_mem_read): Mask out fast tracepoint jumps.
13044 (check_mem_write): Mask out fast tracepoint jumps.
13045 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13046 (set_fast_tracepoint_jump): Declare.
13047 (delete_fast_tracepoint_jump)
13048 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13049 (reinsert_fast_tracepoint_jumps_at): Declare.
13050 * regcache.c: Don't compile many functions when building the
13051 in-process agent library.
13052 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13053 the register buffer in the heap.
13054 (free_register_cache): If the register buffer isn't owned by the
13055 regcache, don't free it.
13056 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13057 pre-existing register caches.
13058 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13059 type.
13060 (convert_ascii_to_int): : Constify `from' parameter type.
13061 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13062 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13063 the needed buffer in-place.
13064 (relocate_instruction): New.
13065 * server.c (handle_query) <qSymbols>: If the target supports
13066 tracepoints, give it a chance of looking up symbols. Report
13067 support for fast tracepoints.
13068 (handle_status): Stabilize threads.
13069 (process_serial_event): Adjust.
13070 * server.h (struct fast_tracepoint_jump): Forward declare.
13071 (struct process_info) <fast_tracepoint_jumps>: New field.
13072 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13073 (decode_X_packet, decode_M_packet): Adjust.
13074 (relocate_instruction): Declare.
13075 (in_process_agent_loaded): Declare.
13076 (tracepoint_look_up_symbols): Declare.
13077 (struct fast_tpoint_collect_status): Declare.
13078 (fast_tracepoint_collecting): Declare.
13079 (force_unlock_trace_buffer): Declare.
13080 (handle_tracepoint_bkpts): Declare.
13081 (initialize_low_tracepoint)
13082 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13083 * target.h (struct target_ops) <stabilize_threads,
13084 install_fast_tracepoint_jump_pad>: New fields.
13085 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13086 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13087 [HAVE_STDINT_H]: Include stdint.h.
13088 (trace_debug_1): Rename to ...
13089 (trace_vdebug): ... this.
13090 (trace_debug): Rename to ...
13091 (trace_debug_1): ... this. Add `level' parameter.
13092 (trace_debug): New.
13093 (ATTR_USED, ATTR_NOINLINE): New.
13094 (IP_AGENT_EXPORT): New.
13095 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13096 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13097 (about_to_request_buffer_space, trace_buffer_is_full)
13098 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13099 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13100 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13101 (traceframe_write_count, traceframes_created)
13102 (trace_state_variables)
13103 New renaming defines.
13104 (struct ipa_sym_addresses): New.
13105 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13106 (symbol_list): New.
13107 (ipa_sym_addrs): New.
13108 (all_tracepoint_symbols_looked_up): New.
13109 (in_process_agent_loaded): New.
13110 (write_e_ipa_not_loaded): New.
13111 (maybe_write_ipa_not_loaded): New.
13112 (tracepoint_look_up_symbols): New.
13113 (debug_threads) [IN_PROCESS_AGENT]: New.
13114 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13115 (UNKNOWN_SIDE_EFFECTS): New.
13116 (stop_tracing): New.
13117 (flush_trace_buffer): New.
13118 (stop_tracing_bkpt): New.
13119 (flush_trace_buffer_bkpt): New.
13120 (read_inferior_integer): New.
13121 (read_inferior_uinteger): New.
13122 (read_inferior_data_pointer): New.
13123 (write_inferior_data_pointer): New.
13124 (write_inferior_integer): New.
13125 (write_inferior_uinteger): New.
13126 (struct collect_static_trace_data_action): Delete.
13127 (enum tracepoint_type): New.
13128 (struct tracepoint) <type>: New field `type'.
13129 <actions_str, step_actions, step_actions_str>: Only include in
13130 GDBserver.
13131 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13132 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13133 (tracepoints): Use IP_AGENT_EXPORT.
13134 (last_tracepoint): Don't include in the IPA.
13135 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13136 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13137 (alloced_trace_state_variables): New.
13138 (trace_state_variables): Use IP_AGENT_EXPORT.
13139 (traceframe_t): Delete unused variable.
13140 (circular_trace_buffer): Don't include in the IPA.
13141 (trace_buffer_start): Delete.
13142 (struct trace_buffer_control): New.
13143 (trace_buffer_free): Delete.
13144 (struct ipa_trace_buffer_control): New.
13145 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13146 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13147 New.
13148 (trace_buffer_ctrl): New.
13149 (TRACE_BUFFER_CTRL_CURR): New.
13150 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13151 Reimplement as macros.
13152 (trace_buffer_wrap): Delete.
13153 (traceframe_write_count, traceframe_read_count)
13154 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13155 (struct tracepoint_hit_ctx) <type>: New field.
13156 (struct fast_tracepoint_ctx): New.
13157 (memory_barrier): New.
13158 (cmpxchg): New.
13159 (record_tracepoint_error): Update atomically in the IPA.
13160 (clear_inferior_trace_buffer): New.
13161 (about_to_request_buffer_space): New.
13162 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13163 updating the same buffer.
13164 (add_tracepoint): Default the tracepoint's type to trap
13165 tracepoint, and orig_size to -1.
13166 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13167 internal variables.
13168 (create_trace_state_variable): New parameter `gdb'. Handle it.
13169 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13170 (cmd_qtdp): Handle fast tracepoints.
13171 (cmd_qtdv): Adjust.
13172 (max_jump_pad_size): New.
13173 (gdb_jump_pad_head): New.
13174 (get_jump_space_head): New.
13175 (claim_jump_space): New.
13176 (sort_tracepoints): New.
13177 (MAX_JUMP_SIZE): New.
13178 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13179 IPA.
13180 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13181 support. Upload fast traceframes, and delete internal IPA
13182 breakpoints.
13183 (stop_tracing_handler): New.
13184 (flush_trace_buffer_handler): New.
13185 (cmd_qtstop): Upload fast tracepoints.
13186 (response_tracepoint): Handle fast tracepoints.
13187 (tracepoint_finished_step): Upload fast traceframes. Set the
13188 tracepoint hit context's tracepoint type.
13189 (handle_tracepoint_bkpts): New.
13190 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13191 type. Add comment about fast tracepoints.
13192 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13193 non-existing action_str field.
13194 (get_context_regcache): Handle fast tracepoints.
13195 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13196 to the regcache.
13197 (fast_tracepoint_from_jump_pad_address): New.
13198 (fast_tracepoint_from_ipa_tpoint_address): New.
13199 (collecting_t): New.
13200 (force_unlock_trace_buffer): New.
13201 (fast_tracepoint_collecting): New.
13202 (collecting): New.
13203 (gdb_collect): New.
13204 (write_inferior_data_ptr): New.
13205 (target_tp_heap): New.
13206 (target_malloc): New.
13207 (download_agent_expr): New.
13208 (UALIGN): New.
13209 (download_tracepoints): New.
13210 (download_trace_state_variables): New.
13211 (upload_fast_traceframes): New.
13212 (IPA_FIRST_TRACEFRAME): New.
13213 (IPA_NEXT_TRACEFRAME_1): New.
13214 (IPA_NEXT_TRACEFRAME): New.
13215 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13216 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13217 (gdb_jump_pad_buffer_end): New.
13218 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13219 (initialize_tracepoint): Adjust.
13220 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13221 buffer. Initialize the low module.
13222 * utils.c (PREFIX, TOOLNAME): New.
13223 (malloc_failure): Use PREFIX.
13224 (error): In the IPA, an error causes an exit.
13225 (fatal, warning): Use PREFIX.
13226 (internal_error): Use TOOLNAME.
13227 (NUMCELLS): Increase to 10.
13228 * configure, config.in: Regenerate.
13229
13230 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13231
13232 * server.c (handle_query) <qSupported>: Do two passes over the
13233 qSupported string to avoid nesting strtok.
13234
13235 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13236
13237 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13238 (CDEPS): New.
13239 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13240 -Wl,--dynamic-list.
13241 * configure: Regenerate.
13242 * proc-service.list: New.
13243
13244 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13245
13246 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13247 New comment.
13248
13249 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13250
13251 * gdbreplay.c (remote_open): Check error return from socket() call by
13252 its equality to -1 not by it being negative.
13253 * remote-utils.c (remote_open): Likewise.
13254
13255 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13256
13257 * config.h: Regenerate.
13258
13259 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13260
13261 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13262 doesn't provide PTRACE_GET_THREAD_AREA.
13263
13264 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13265
13266 * linux-m68k-low.c: Include <asm/ptrace.h>
13267 (ps_get_thread_area): Implement.
13268
13269 2010-05-03 Doug Evans <dje@google.com>
13270
13271 * event-loop.c (struct callback_event): New struct.
13272 (callback_list): New global.
13273 (append_callback_event, delete_callback_event): New functions.
13274 (process_callback): New function.
13275 (start_event_loop): Call it.
13276 * remote-utils.c (NOT_SCHEDULED): Define.
13277 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13278 moved out of readchar.
13279 (readchar): Rewrite. Call reschedule before returning.
13280 (reset_readchar): New function.
13281 (remote_close): Call it.
13282 (process_remaining, reschedule): New functions.
13283 * server.h (callback_handler_func): New typedef.
13284 (append_callback_event, delete_callback_event): Declare.
13285
13286 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13287
13288 * proc-service.c (ps_pglobal_lookup): Use
13289 thread_db_look_up_one_symbol.
13290 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13291 parameter. Use it instead of all_symbols_looked_up.
13292 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13293 field.
13294 (all_symbols_looked_up): Don't declare.
13295 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13296 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13297 field.
13298 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13299 Set all_symbols_looked_up here.
13300 (thread_db_look_up_one_symbol): New.
13301 (thread_db_get_tls_address): Adjust.
13302 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13303 thread_db object on the heap, and tentatively set it in the
13304 process structure.
13305 (thread_db_init): Don't set all_symbols_looked_up here.
13306 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13307
13308 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13309
13310 * linux-low.c (linux_kill, linux_detach): Adjust.
13311 (status_pending_p_callback): Remove redundant statement. Check
13312 for !TARGET_WAITIKIND_IGNORE, instead of
13313 TARGET_WAITKIND_STOPPED.
13314 (handle_tracepoints): Make sure LWP is locked. Adjust.
13315 (linux_wait_for_event_1): Adjust.
13316 (linux_cancel_breakpoints): New.
13317 (unsuspend_one_lwp): New.
13318 (unsuspend_all_lwps): New.
13319 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13320 (send_sigstop_callback): Change return type to int, add new
13321 `except' parameter and handle it.
13322 (suspend_and_send_sigstop_callback): New.
13323 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13324 pass them down. If SUSPEND, also increment the lwp's suspend
13325 count.
13326 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13327 (need_step_over_p): Don't consider suspended LWPs.
13328 (start_step_over): Adjust.
13329 (proceed_one_lwp): Change return type to int, add new `except'
13330 parameter and handle it.
13331 (unsuspend_and_proceed_one_lwp): New.
13332 (proceed_all_lwps): Use find_inferior instead of
13333 for_each_inferior.
13334 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13335 also decrement the suspend count of LWPs. Pass `except' down,
13336 instead of hacking its suspend count.
13337 (linux_pause_all): Add `freeze' parameter. Adjust.
13338 (linux_unpause_all): New.
13339 (linux_target_ops): Install linux_unpause_all.
13340 * server.c (handle_status): Adjust.
13341 * target.h (struct target_ops): New fields `unpause_all' and
13342 `cancel_breakpoints'. Add new parameter to `pause_all'.
13343 (pause_all): Add new `freeze' parameter.
13344 (unpause_all): New.
13345 (cancel_breakpoints): New.
13346 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13347 cancel breakpoints.
13348 (cmd_qtstart): Pause threads.
13349 (stop_tracing): Pause threads, and cancel breakpoints.
13350 * win32-low.c (win32_target_ops): Adjust.
13351
13352 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13353
13354 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13355 the inferior right away from here...
13356 (linux_wait_1): ... to here, and adjust to check the thread's
13357 last_resume_kind instead of the lwp's step or stop_expected flags.
13358
13359 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13360
13361 * README: Use consistent `GDB' and `GDBserver' spellings.
13362
13363 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13364
13365 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13366 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13367 (linux_detach_one_lwp): Assume the lwp is stopped.
13368 (any_thread_of): Delete.
13369 (linux_detach): Stop all lwps here. Don't blindly delete all
13370 breakpoints.
13371 (delete_lwp_callback): New.
13372 (linux_mourn): Delete all lwps of the process that is gone.
13373 (linux_wait_1): Don't delete the last lwp of the process here.
13374 * mem-break.h (mark_breakpoints_out): Declare.
13375 * mem-break.c (mark_breakpoints_out): New.
13376 (free_all_breakpoints): Use it.
13377 * server.c (handle_target_event): If the process is gone, mark
13378 breakpoints out.
13379 * thread-db.c (struct thread_db) <create_bp>: New field.
13380 (thread_db_enable_reporting): Fix prototype. Store a thread event
13381 breakpoint reference in the thread_db struct.
13382 (thread_db_load_search): Clear the thread_db object.
13383 (try_thread_db_load_1): Ditto.
13384 (switch_to_process): New.
13385 (disable_thread_event_reporting): Use it.
13386 (remove_thread_event_breakpoints): New.
13387 (thread_db_detach, thread_db_mourn): Use it.
13388
13389 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13390
13391 * linux-low.c (linux_enable_event_reporting): New.
13392 (linux_wait_for_event_1, handle_extended_wait): Use it.
13393
13394 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13395
13396 * linux-low.c (linux_kill_one_lwp, linux_kill)
13397 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13398 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13399 SIGSTOP even if the LWP is stopped.
13400 (send_sigstop_callback): New.
13401 (stop_all_lwps): Use send_sigstop_callback instead.
13402 (linux_resume_one_thread): Adjust.
13403 (proceed_one_lwp): Still proceed an LWP that the client has
13404 requested to stop, if we haven't reported it as stopped yet. Make
13405 sure that LWPs the client want stopped, have a pending SIGSTOP.
13406
13407 2010-04-26 Doug Evans <dje@google.com>
13408
13409 * server.c (handle_general_set): Make static.
13410
13411 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13412 Print received char after testing for error/eof instead of before.
13413 (input_interrupt): Tweak comment.
13414
13415 2010-04-23 Doug Evans <dje@google.com>
13416
13417 * server.c (start_inferior): Print inferior argv if --debug.
13418
13419 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13420
13421 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13422 * nto-x86-low.c: Include server.h
13423
13424 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13425
13426 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13427 be consistent with other sources of this directory.
13428 (init_registers_amd64): Correct name of source file of this function
13429 in the comment.
13430
13431 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13432
13433 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13434 64-bit executables.
13435
13436 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13437
13438 * win32-i386-low.c: Add 64-bit support.
13439 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13440 (init_registers_amd64): Declare.
13441 (mappings): Add 64-bit version of array.
13442 (init_windows_x86): New function.
13443 (the_low_target): Change init_arch field to init_windows_x86.
13444
13445 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13446
13447 * win32-low.c: Adapt to support also 64-bit architecture.
13448 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13449 (get_image_name): Use SIZE_T type for local variable `done'.
13450 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13451 (toolhelp_get_dll_name): Idem.
13452 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13453 Use uintptr_t typecast to avoid warning.
13454 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13455 (handle_exception): Use phex_nz to avoid warning.
13456 (win32_wait): Remove unused local variable `process'.
13457
13458 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13459
13460 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13461 `amd64-avx.o'.
13462
13463 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13464
13465 * configure.ac: Use `ws2_32' library for srv_mingw.
13466 * configure: Regenerate.
13467 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13468 * remote-utils.c: Likewise.
13469
13470 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13471
13472 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13473 if __x86_64__ is defined.
13474
13475 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13476
13477 * configure: Regenerate.
13478
13479 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13480
13481 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13482 * target.h (target_ops): New get_tib_address field.
13483 * win32-low.h (win32_thread_info): Add thread_local_base field.
13484 * win32-low.c (child_add_thread): Add tlb argument.
13485 Set thread_local_base field to TLB.
13486 (get_child_debug_event): Adapt to child_add_thread change.
13487 (win32_get_tib_address): New function.
13488 (win32_target_ops): Set get_tib_address field to
13489 win32_get_tib_address.
13490 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13491
13492 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13493
13494 * linux-low.c (linux_mourn): Also remove the process.
13495 * server.c (handle_target_event): Don't remove the process here.
13496 * nto-low.c (nto_mourn): New.
13497 (nto_target_ops): Install it.
13498 * spu-low.c (spu_mourn): New.
13499 (spu_target_ops): Install it.
13500 * win32-low.c (win32_mourn): New.
13501 (win32_target_ops): Install it.
13502
13503 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13504
13505 * server.h (buffer_xml_printf): Remove redundant `;'.
13506
13507 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13508
13509 * regcache.c (set_register_cache): Invalidate regcaches before
13510 changing the register cache layout.
13511 (regcache_invalidate_one): Allow a NULL regcache.
13512 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13513 regcaches before changing the register cache layout or the target
13514 regsets.
13515
13516 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13517
13518 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13519 variable warning on Linux/x86-64.
13520
13521 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13522
13523 GDBserver disconnected tracing support.
13524
13525 * linux-low.c (linux_remove_process): Delete.
13526 (add_lwp): Don't set last_resume_kind here.
13527 (linux_kill): Use `mourn'.
13528 (linux_detach): Use `thread_db_detach', and `mourn'.
13529 (linux_mourn): New.
13530 (linux_attach_lwp_1): Adjust comment.
13531 (linux_attach): last_resume_kind moved the thread_info; adjust.
13532 (status_pending_p_callback): Adjust.
13533 (linux_wait_for_event_1): Adjust.
13534 (count_events_callback, select_singlestep_lwp_callback)
13535 (select_event_lwp_callback, cancel_breakpoints_callback)
13536 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13537 (proceed_one_lwp): Adjust.
13538 (linux_async): Add debug output.
13539 (linux_thread_stopped): New.
13540 (linux_pause_all): New.
13541 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13542 linux_pause_all.
13543 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13544 (thread_db_free): Delete declaration.
13545 (thread_db_detach, thread_db_mourn): Declare.
13546 * thread-db.c (thread_db_init): Use thread_db_mourn.
13547 (thread_db_free): Delete, split in two.
13548 (disable_thread_event_reporting): New.
13549 (thread_db_detach): New.
13550 (thread_db_mourn): New.
13551
13552 * server.h (struct thread_info) <last_resume_kind>: New field.
13553 <attached>: Add comment.
13554 <gdb_detached>: New field.
13555 (handler_func): Change return type to int.
13556 (handle_serial_event, handle_target_event): Ditto.
13557 (gdb_connected): Declare.
13558 (tracing): Delete.
13559 (disconnected_tracing): Declare.
13560 (stop_tracing): Declare.
13561
13562 * server.c (handle_query) <qSupported>: Report support for
13563 disconnected tracing.
13564 (queue_stop_reply_callback): Account for running threads.
13565 (gdb_wants_thread_stopped): New.
13566 (gdb_wants_all_threads_stopped): New.
13567 (gdb_reattached_process): New.
13568 (handle_status): Clear the `gdb_detached' flag of all processes.
13569 In all-stop, stop all threads.
13570 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13571 (process_serial_event): If the remote connection breaks, or if an
13572 exit was forced with "monitor exit", force an event loop exit.
13573 Handle disconnected tracing on detach.
13574 (handle_serial_event): Adjust.
13575 (handle_target_event): If GDB isn't connected, forward events back
13576 to the inferior, unless the last process exited, in which case,
13577 exit gdbserver. Adjust interface.
13578
13579 * remote-utils.c (remote_open): Don't block in accept. Instead
13580 register an event loop source on the listen socket file
13581 descriptor. Refactor bits into ...
13582 (listen_desc): ... this new global.
13583 (gdb_connected): ... this new function.
13584 (enable_async_notification): ... this new function.
13585 (handle_accept_event): ... this new function.
13586 (remote_close): Clear remote_desc.
13587
13588 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13589
13590 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13591 New fields.
13592 (mourn_inferior): Define.
13593 (target_process_qsupported): Avoid the dangling else problem.
13594 (thread_stopped): Define.
13595 (pause_all): Define.
13596 (target_waitstatus_to_string): Declare.
13597 * target.c (target_waitstatus_to_string): New.
13598
13599 * tracepoint.c (tracing): Make extern.
13600 (disconnected_tracing): New.
13601 (stop_tracing): Make extern. Handle tracing stops due to GDB
13602 disconnecting.
13603 (cmd_qtdisconnected): New.
13604 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13605 (handle_tracepoint_general_set): Handle QTDisconnected.
13606
13607 * event-loop.c (event_handler_func): Change return type to int.
13608 (process_event): Bail out if the event handler wants the event
13609 loop to stop.
13610 (handle_file_event): Ditto.
13611 (start_event_loop): Bail out if the event handler wants the event
13612 loop to stop.
13613
13614 * nto-low.c (nto_target_ops): Adjust.
13615 * spu-low.c (spu_wait): Don't remove the process here.
13616 (spu_target_ops): Adjust.
13617 * win32-low.c (win32_wait): Don't remove the process here.
13618 (win32_target_ops): Adjust.
13619
13620 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13621
13622 * regcache.c (realloc_register_cache): Invalidate inferior's
13623 regcache before recreating it.
13624
13625 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13626
13627 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13628
13629 2010-04-09 Stan Shebs <stan@codesourcery.com>
13630 Pedro Alves <pedro@codesourcery.com>
13631
13632 * server.h (LONGEST): New.
13633 (struct thread_info) <while_stepping>: New field.
13634 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13635 Declare.
13636 (initialize_tracepoint, handle_tracepoint_general_set)
13637 (handle_tracepoint_query, tracepoint_finished_step)
13638 (tracepoint_was_hit, release_while_stepping_state_list):
13639 (current_traceframe): Declare.
13640 * server.c (handle_general_set): Handle tracepoint packets.
13641 (read_memory): New.
13642 (write_memory): New.
13643 (handle_search_memory_1): Use read_memory.
13644 (handle_query): Report support for conditional tracepoints, trace
13645 state variables, and tracepoint sources. Handle tracepoint
13646 queries.
13647 (main): Initialize the tracepoints module.
13648 (process_serial_event): Handle traceframe reads/writes.
13649
13650 * linux-low.c (handle_tracepoints): New.
13651 (linux_wait_1): Call it.
13652 (linux_resume_one_lwp): Handle while-stepping.
13653 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13654 (linux_target_ops): Install them.
13655 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13656 New field.
13657 * linux-x86-low.c (x86_supports_tracepoints): New.
13658 (the_low_target). Install it.
13659
13660 * mem-break.h (delete_breakpoint): Declare.
13661 * mem-break.c (delete_breakpoint): Make external.
13662
13663 * target.h (struct target_ops): Add `supports_tracepoints',
13664 `read_pc', and `write_pc' fields.
13665 (target_supports_tracepoints): Define.
13666 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13667 (phex_nz): New.
13668
13669 * regcache.h (struct regcache) <registers_owned>: New field.
13670 (init_register_cache, regcache_cpy): Declare.
13671 (regcache_read_pc, regcache_write_pc): Declare.
13672 (register_cache_size): Declare.
13673 (supply_regblock): Declare.
13674 * regcache.c (init_register_cache): New.
13675 (new_register_cache): Use it.
13676 (regcache_cpy): New.
13677 (register_cache_size): New.
13678 (supply_regblock): New.
13679 (regcache_read_pc, regcache_write_pc): New.
13680
13681 * tracepoint.c: New.
13682
13683 * Makefile.in (OBS): Add tracepoint.o.
13684 (tracepoint.o): New rule.
13685
13686 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13687
13688 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13689 (i386-mmx.o): New.
13690 (i386-mmx.c): Likewise.
13691 (i386-mmx-linux.o): Likewise.
13692 (i386-mmx-linux.c): Likewise.
13693
13694 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13695 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13696 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13697 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13698
13699 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13700 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13701 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13702
13703 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13704
13705 * Makefile.in (clean): Updated.
13706 (i386-avx.o): New.
13707 (i386-avx.c): Likewise.
13708 (i386-avx-linux.o): Likewise.
13709 (i386-avx-linux.c): Likewise.
13710 (amd64-avx.o): Likewise.
13711 (amd64-avx.c): Likewise.
13712 (amd64-avx-linux.o): Likewise.
13713 (amd64-avx-linux.c): Likewise.
13714
13715 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13716 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13717 (srv_amd64_regobj): Add amd64-avx.o.
13718 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13719 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13720 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13721 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13722 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13723 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13724 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13725
13726 * i387-fp.c: Include "i386-xstate.h".
13727 (i387_xsave): New.
13728 (i387_cache_to_xsave): Likewise.
13729 (i387_xsave_to_cache): Likewise.
13730 (x86_xcr0): Likewise.
13731
13732 * i387-fp.h (i387_cache_to_xsave): Likewise.
13733 (i387_xsave_to_cache): Likewise.
13734 (x86_xcr0): Likewise.
13735
13736 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13737 * linux-crisv32-low.c (target_regsets): Likewise.
13738 * linux-m68k-low.c (target_regsets): Likewise.
13739 * linux-mips-low.c (target_regsets): Likewise.
13740 * linux-ppc-low.c (target_regsets): Likewise.
13741 * linux-s390-low.c (target_regsets): Likewise.
13742 * linux-sh-low.c (target_regsets): Likewise.
13743 * linux-sparc-low.c (target_regsets): Likewise.
13744 * linux-xtensa-low.c (target_regsets): Likewise.
13745
13746 * linux-low.c: Include <sys/uio.h>.
13747 (regsets_fetch_inferior_registers): Support nt_type.
13748 (regsets_store_inferior_registers): Likewise.
13749 (linux_process_qsupported): New.
13750 (linux_target_ops): Add linux_process_qsupported.
13751
13752 * linux-low.h (regset_info): Add nt_type.
13753 (linux_target_ops): Add process_qsupported.
13754
13755 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13756 and <sys/uio.h>.
13757 (init_registers_i386_avx_linux): New.
13758 (init_registers_amd64_avx_linux): Likewise.
13759 (xmltarget_i386_linux_no_xml): Likewise.
13760 (xmltarget_amd64_linux_no_xml): Likewise.
13761 (PTRACE_GETREGSET): Likewise.
13762 (PTRACE_SETREGSET): Likewise.
13763 (x86_fill_xstateregset): Likewise.
13764 (x86_store_xstateregset): Likewise.
13765 (use_xml): Likewise.
13766 (x86_linux_update_xmltarget): Likewise.
13767 (x86_linux_process_qsupported): Likewise.
13768 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13769 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13770 init_registers_i386_linux here. Call
13771 x86_linux_update_xmltarget.
13772 (the_low_target): Add x86_linux_process_qsupported.
13773
13774 * server.c (handle_query): Call target_process_qsupported.
13775
13776 * target.h (target_ops): Add process_qsupported.
13777 (target_process_qsupported): New.
13778
13779 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13780
13781 * inferiors.c (add_thread): Set last_status kind to
13782 TARGET_WAITKIND_IGNORE.
13783 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13784 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13785 (linux_wait_1): Move `thread' local definition to block that uses
13786 it. Don't NULL initialize `event_child'.
13787 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13788 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13789 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13790
13791 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13792
13793 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13794 an extended waitstatus, or by a watchpoint.
13795 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13796 thread was stepping or has been stopped by a watchpoint.
13797
13798 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13799
13800 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13801 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13802 of another, then delete the previous, and validate all
13803 breakpoints.
13804 (validate_inserted_breakpoint): New.
13805 (delete_disabled_breakpoints): New.
13806 (validate_breakpoints): New.
13807 (check_mem_read): Validate breakpoints before trusting their
13808 shadow. Delete disabled breakpoints.
13809 (check_mem_write): Validate breakpoints before trusting they
13810 should be inserted. Delete disabled breakpoints.
13811 * mem-break.h (validate_breakpoints):
13812 * server.c (handle_query): Validate breakpoints when we see a
13813 qSymbol query.
13814
13815 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13816
13817 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13818 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13819 if we could tell there's a GDB breakpoint at stop_pc.
13820 (need_step_over_p): Don't do a step over if we find a GDB
13821 breakpoint at the resume PC.
13822
13823 * mem-break.c (struct raw_breakpoint): New.
13824 (enum bkpt_type): New type `gdb_breakpoint'.
13825 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13826 fields. New field `raw'.
13827 (find_raw_breakpoint_at): New.
13828 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13829 breakpoint instead.
13830 (set_breakpoint_at): Adjust.
13831 (delete_raw_breakpoint): New.
13832 (release_breakpoint): New.
13833 (delete_breakpoint): Rename to...
13834 (delete_breakpoint_1): ... this. Add proc parameter. Use
13835 release_breakpoint. Return ENOENT.
13836 (delete_breakpoint): Reimplement.
13837 (find_breakpoint_at): Delete.
13838 (find_gdb_breakpoint_at): New.
13839 (delete_breakpoint_at): Delete.
13840 (set_gdb_breakpoint_at): New.
13841 (delete_gdb_breakpoint_at): New.
13842 (gdb_breakpoint_here): New.
13843 (set_reinsert_breakpoint): Use release_breakpoint.
13844 (uninsert_breakpoint): Rename to ...
13845 (uninsert_raw_breakpoint): ... this.
13846 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13847 (reinsert_raw_breakpoint): Change parameter type to
13848 raw_breakpoint.
13849 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13850 instead.
13851 (check_breakpoints): Adjust. Use release_breakpoint.
13852 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13853 (breakpoint_inserted_here): Ditto.
13854 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13855 Don't trust the breakpoint's shadow if it is not inserted.
13856 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13857 (delete_all_breakpoints): Adjust.
13858 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13859 use delete_breakpoint_1.
13860
13861 * mem-break.h (breakpoints_supported): Delete declaration.
13862 (set_gdb_breakpoint_at): Declare.
13863 (gdb_breakpoint_here): Declare.
13864 (delete_breakpoint_at): Delete.
13865 (delete_gdb_breakpoint_at): Declare.
13866
13867 * server.h (struct raw_breakpoint): Forward declare.
13868 (struct process_info): New field `raw_breakpoints'.
13869
13870 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13871 breakpoints.
13872
13873 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13874
13875 * linux-low.c (status_pending_p_callback): Fix comment.
13876 (linux_wait_for_event_1): Move most of the internal breakpoint
13877 handling from here...
13878 (linux_wait_1): ... to here.
13879 (count_events_callback): New.
13880 (select_singlestep_lwp_callback): New.
13881 (select_event_lwp_callback): New.
13882 (cancel_breakpoints_callback): New.
13883 (select_event_lwp): New.
13884 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13885 priority to all LWPs that have had events that should be reported
13886 to the client. Cancel breakpoints when about to reporting the
13887 event to the client, not while stopping lwps. No longer cancel
13888 finished single-steps here.
13889 (cancel_finished_single_step): Delete.
13890 (cancel_finished_single_steps): Delete.
13891
13892 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13893
13894 * mem-break.c (enum bkpt_type): New.
13895 (struct breakpoint): New field `type'.
13896 (set_breakpoint_at): Change return type to struct breakpoint
13897 pointer. Set type to `other_breakpoint' by default.
13898 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13899 in the breakpoint list.
13900 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13901 (reinsert_breakpoint): Rename to ...
13902 (reinsert_raw_breakpoint): ... this.
13903 (reinsert_breakpoints_at): Adjust.
13904 * mem-break.h (struct breakpoint): Declare.
13905 (set_breakpoint_at): Change return type to struct breakpoint
13906 pointer.
13907
13908 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13909
13910 * server.c (handle_query): Assign, not compare.
13911
13912 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13913
13914 Teach linux gdbserver to step-over-breakpoints.
13915
13916 * linux-low.c (can_hardware_single_step): New.
13917 (supports_breakpoints): New.
13918 (handle_extended_wait): If stopping threads, read the stop pc of
13919 the new cloned LWP.
13920 (get_pc): New.
13921 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13922 low target doesn't support retrieving the PC.
13923 (add_lwp): Set last_resume_kind to resume_continue.
13924 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13925 (linux_attach): Don't clear stop_expected. Set the lwp's
13926 last_resume_kind to resume_stop.
13927 (linux_detach_one_lwp): Don't check for removed breakpoints.
13928 (check_removed_breakpoint): Delete.
13929 (status_pending_p): Rename to ...
13930 (status_pending_p_callback): ... this. Don't check for removed
13931 breakpoints. Don't consider threads that are stopped from GDB's
13932 perspective.
13933 (linux_wait_for_lwp): Always read the stop_pc here.
13934 (cancel_breakpoint): New.
13935 (step_over_bkpt): New global.
13936 (linux_wait_for_event_1): Implement stepping over breakpoints.
13937 (gdb_wants_lwp_stopped): New.
13938 (gdb_wants_all_stopped): New.
13939 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13940 single-step traps here. Store the thread's last reported target
13941 wait status.
13942 (send_sigstop): Don't clear stop_expected. Always set it,
13943 instead.
13944 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13945 (cancel_finished_single_step): New.
13946 (cancel_finished_single_steps): New.
13947 (wait_for_sigstop): Don't cancel finished single-step traps here.
13948 (linux_resume_one_lwp): Don't check for removed breakpoints.
13949 Don't set `step' on non-hardware step archs.
13950 (linux_set_resume_request): Ignore resume_stop requests if already
13951 stopping or stopped. Set the lwp's last_resume_kind.
13952 (resume_status_pending_p): Don't check for removed breakpoints.
13953 (need_step_over_p): New.
13954 (start_step_over): New.
13955 (finish_step_over): New.
13956 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13957 requests. Clear the thread's last reported target waitstatus.
13958 Don't use the `suspended' flag. Don't consider pending breakpoints.
13959 (linux_resume): Start a step-over if necessary.
13960 (proceed_one_lwp): New.
13961 (proceed_all_lwps): New.
13962 (unstop_all_lwps): New.
13963 * linux-low.h (struct lwp_info): Rewrite comment for the
13964 `suspended' flag. Add the `stop_pc' field. Delete the
13965 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13966 Add `'last_resume_kind' and `need_step_over' fields.
13967 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13968 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13969 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13970 (set_raw_breakpoint_at): New.
13971 (set_breakpoint_at): Rewrite to use it.
13972 (reinsert_breakpoint_handler): Delete.
13973 (set_reinsert_breakpoint): New.
13974 (reinsert_breakpoint_by_bp): Delete.
13975 (delete_reinsert_breakpoints): New.
13976 (uninsert_breakpoint): Rewrite.
13977 (uninsert_breakpoints_at): New.
13978 (reinsert_breakpoint): Rewrite.
13979 (reinsert_breakpoints_at): New.
13980 (check_breakpoints): Rewrite.
13981 (breakpoint_here): New.
13982 (breakpoint_inserted_here): New.
13983 (check_mem_read): Adjust.
13984 * mem-break.h (breakpoints_supported, breakpoint_here)
13985 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13986 (reinsert_breakpoint_by_bp): Delete declaration.
13987 (delete_reinsert_breakpoints): Declare.
13988 (reinsert_breakpoint): Delete declaration.
13989 (reinsert_breakpoints_at): Declare.
13990 (uninsert_breakpoint): Delete declaration.
13991 (uninsert_breakpoints_at): Declare.
13992 (check_breakpoints): Adjust prototype.
13993 * server.h: Adjust include order.
13994 (struct thread_info): Declare here. Add a `last_status' field.
13995
13996 2010-03-23 Michael Snyder <msnyder@vmware.com>
13997
13998 * server.c (crc32): New function.
13999 (handle_query): Add handling for 'qCRC:' request.
14000
14001 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14002
14003 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14004 lwp had been stopped by a watchpoint.
14005
14006 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14007
14008 * server.h (internal_error): Declare.
14009 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14010 * utils.c (internal_error): New function.
14011
14012 2010-03-15 Andreas Schwab <schwab@redhat.com>
14013
14014 * configure.srv: Fix typo setting srv_regobj.
14015
14016 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14017
14018 * linux-low.c (fetch_register): Avoid passing a non string literal
14019 format to `error'.
14020 (usr_store_inferior_registers): Ditto.
14021
14022 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14023
14024 * linux-low.c (linux_write_memory): Bail out early if peeking
14025 memory failed.
14026
14027 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14028
14029 * linux-low.h (struct lwp_info): New fields
14030 `stopped_by_watchpoint' and `stopped_data_address'.
14031 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14032 here, and cache them in the lwp object.
14033 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14034 directly.
14035 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14036 field.
14037 (linux_stopped_by_watchpoint): Rewrite.
14038 (linux_stopped_data_address): Rewrite.
14039
14040 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14041
14042 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14043 switching the current inferior, not before.
14044
14045 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14046
14047 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14048 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14049 i386-linux.c and amd64-linux.c.
14050 (reg-i386.o): Removed.
14051 (reg-i386.c): Likewise.
14052 (reg-i386-linux.o): Likewise.
14053 (reg-i386-linux.c): Likewise.
14054 (reg-x86-64.o): Likewise.
14055 (reg-x86-64.c): Likewise.
14056 (reg-x86-64-linux.o): Likewise.
14057 (reg-x86-64-linux.c): Likewise.
14058 (i386.o): New.
14059 (i386.c): Likewise.
14060 (i386-linux.o): Likewise.
14061 (i386-linux.c): Likewise.
14062 (amd64.o): Likewise.
14063 (amd64.c): Likewise.
14064 (amd64-linux.o): Likewise.
14065 (amd64-linux.c): Likewise.
14066
14067 * configure.srv (srv_i386_regobj): New.
14068 (srv_i386_linux_regobj): Likewise.
14069 (srv_amd64_regobj): Likewise.
14070 (srv_amd64_linux_regobj): Likewise.
14071 (srv_i386_32bit_xmlfiles): Likewise.
14072 (srv_i386_64bit_xmlfiles): Likewise.
14073 (srv_i386_xmlfiles): Likewise.
14074 (srv_amd64_xmlfiles): Likewise.
14075 (srv_i386_linux_xmlfiles): Likewise.
14076 (srv_amd64_linux_xmlfiles): Likewise.
14077 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14078 srv_xmlfiles to $srv_i386_xmlfiles.
14079 (i[34567]86-*-mingw32ce*): Likewise.
14080 (i[34567]86-*-mingw*): Likewise.
14081 (i[34567]86-*-nto*): Likewise.
14082 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14083 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14084 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14085 (x86_64-*-linux*): Likewise.
14086
14087 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14088 (init_registers_amd64_linux): New.
14089 (x86_arch_setup): Replace init_registers_x86_64_linux with
14090 init_registers_amd64_linux.
14091
14092 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14093
14094 * configure.ac: Check for libdl. If it is not available link against
14095 static libthread_db.
14096 * configure: Regenerate.
14097
14098 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14099
14100 PR9605
14101
14102 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14103 handing a read watchpoint.
14104 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14105
14106 2010-02-12 Doug Evans <dje@google.com>
14107
14108 * linux-low.c (linux_supports_tracefork_flag): Document.
14109 (linux_look_up_symbols): Add comment.
14110
14111 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14112
14113 * regcache.c (supply_register): Clear regcache if buf is NULL.
14114
14115 2010-02-02 Nicolas Roche <roche@sourceware.org>
14116 Joel Brobecker <brobecker@adacore.com>
14117
14118 * inferiors.c (find_inferior): Add function documentation.
14119 (unloaded_dll): Handle the case where the unloaded dll has not
14120 been previously registered in the dll list.
14121
14122 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14123
14124 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14125 (thumb2_breakpoint): New.
14126 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14127
14128 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14131 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14132 breakpoints.
14133
14134 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14135
14136 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14137
14138 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14139
14140 * linux-s390-low.c (s390_collect_ptrace_register)
14141 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14142
14143 2010-01-21 Doug Evans <dje@google.com>
14144
14145 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14146 (PTRACE_ARG4_TYPE): New macro.
14147 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14148 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14149 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14150 (usr_store_inferior_registers): Ditto.
14151 (linux_read_memory, linux_write_memory): Ditto.
14152 (linux_test_for_tracefork): Ditto.
14153
14154 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14155 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14156
14157 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14158
14159 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14160 target.
14161
14162 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14163
14164 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14165 prototype to take a regcache. Adjust.
14166
14167 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14168
14169 * regcache.h (struct thread_info): Forward declare.
14170 (struct regcache): New.
14171 (new_register_cache): Adjust prototype.
14172 (get_thread_regcache): Declare.
14173 (free_register_cache): Adjust prototype.
14174 (registers_to_string, registers_from_string): Ditto.
14175 (supply_register, supply_register_by_name, collect_register)
14176 (collect_register_as_string, collect_register_by_name): Ditto.
14177 * regcache.c (struct inferior_regcache_data): Delete.
14178 (get_regcache): Rename to ...
14179 (get_thread_regcache): ... this. Adjust. Switch inferior before
14180 fetching registers.
14181 (regcache_invalidate_one): Adjust.
14182 (regcache_invalidate): Fix prototype.
14183 (new_register_cache): Return the new register cache.
14184 (free_register_cache): Change prototype.
14185 (realloc_register_cache): Adjust.
14186 (registers_to_string): Change prototype to take a regcache. Adjust.
14187 (registers_from_string): Ditto.
14188 (register_data): Ditto.
14189 (supply_register): Ditto.
14190 (supply_register_by_name): Ditto.
14191 (collect_register): Ditto.
14192 (collect_register_as_string): Ditto.
14193 (collect_register_by_name): Ditto.
14194 * server.c (process_serial_event): Adjust.
14195 * linux-low.h (regset_fill_func, regset_store_func): Change
14196 prototype.
14197 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14198 Change prototype.
14199 * linux-low.c (get_stop_pc): Adjust.
14200 (check_removed_breakpoint): Adjust.
14201 (linux_wait_for_event): Adjust.
14202 (linux_resume_one_lwp): Adjust.
14203 (fetch_register): Add regcache parameter. Adjust.
14204 (usr_store_inferior_registers): Ditto.
14205 (regsets_fetch_inferior_registers): Ditto.
14206 (regsets_store_inferior_registers): Ditto.
14207 (linux_fetch_registers, linux_store_registers): Ditto.
14208 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14209 regcache. Adjust.
14210 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14211 Ditto.
14212 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14213 prototype to take a regcache.
14214 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14215 * remote-utils.c (convert_ascii_to_int, outreg)
14216 (prepare_resume_reply): Change prototype to take a regcache.
14217 Adjust.
14218 * target.h (struct target_ops) <fetch_registers, store_registers>:
14219 Change prototype to take a regcache.
14220 (fetch_inferior_registers, store_inferior_registers): Change
14221 prototype to take a regcache. Adjust.
14222 * proc-service.c (ps_lgetregs): Adjust.
14223 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14224 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14225 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14226 take a regcache. Adjust.
14227 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14228 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14229 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14230 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14231 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14232 (cris_cannot_fetch_register):
14233 (cris_breakpoint_at): Change prototype to take a regcache.
14234 Adjust.
14235 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14236 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14237 to take a regcache. Adjust.
14238 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14239 Adjust.
14240 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14241 take a regcache. Adjust.
14242 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14243 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14244 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14245 * linux-mips-low.c (mips_get_pc):
14246 (mips_set_pc): Change prototype to take a regcache. Adjust.
14247 (mips_reinsert_addr): Adjust.
14248 (mips_collect_register): Change prototype to take a regcache.
14249 Adjust.
14250 (mips_supply_register):
14251 (mips_collect_register_32bit, mips_supply_register_32bit)
14252 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14253 (mips_store_fpregset): Ditto.
14254 * linux-ppc-low.c (ppc_supply_ptrace_register)
14255 (ppc_supply_ptrace_register): Ditto.
14256 (parse_spufs_run): Adjust.
14257 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14258 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14259 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14260 take a regcache. Adjust.
14261 * linux-s390-low.c (s390_collect_ptrace_register)
14262 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14263 (s390_set_pc): Change prototype to take a regcache. Adjust.
14264 (s390_arch_setup): Adjust.
14265 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14266 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14267 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14268 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14269 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14270 regcache. Adjust.
14271 (sparc_breakpoint_at): Adjust.
14272 * linux-xtensa-low.c (xtensa_fill_gregset):
14273 (xtensa_store_gregset):
14274 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14275 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14276 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14277 prototype to take a regcache. Adjust.
14278 * win32-arm-low.c (arm_fetch_inferior_register)
14279 (arm_store_inferior_register): Change prototype to take a
14280 regcache. Adjust.
14281 * win32-i386-low.c (i386_fetch_inferior_register)
14282 (i386_store_inferior_register): Change prototype to take a
14283 regcache. Adjust.
14284 * win32-low.c (child_fetch_inferior_registers)
14285 (child_store_inferior_registers): Change prototype to take a
14286 regcache. Adjust.
14287 (win32_wait): Adjust.
14288 (win32_fetch_inferior_registers): Change prototype to take a
14289 regcache. Adjust.
14290 (win32_store_inferior_registers): Adjust.
14291 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14292 store_inferior_register>: Change prototype to take a regcache.
14293
14294 2010-01-20 Doug Evans <dje@google.com>
14295
14296 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14297 #ifdef.
14298 (linux_wait_for_event1, linux_init_signals): Ditto.
14299 (W_STOPCODE): Provide definition if missing.
14300
14301 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14302
14303 * linux-low.c (linux_core_of_thread): New.
14304 (compare_ints, show_process, list_threads): New.
14305 (linux_qxfer_osdata): Report threads and cores.
14306 (linux_target_op): Register linux_core_of_thread.
14307 * remote-utils.c (prepare_resume_reply): Report the core.
14308 (buffer_xml_printf): Support %d specifier.
14309 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14310 New.
14311 (handle_query): Handle qXfer:threads. Announce availability
14312 thereof.
14313 * target.h (struct target_ops): New field core_of_thread.
14314
14315 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14316
14317 * Makefile.in (clean): Remove new generated files.
14318 (reg-s390.o, reg-s390.c): Remove rules.
14319 (reg-s390x.o, reg-s390x.c): Likewise.
14320 (s390-linux32.o, s390-linux32.c): Add rules.
14321 (s390-linux64.o, s390-linux64.c): Likewise.
14322 (s390x-linux64.o, s390x-linux64.c): Likewise.
14323 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14324 * linux-s390-low.c: Include <elf.h>.
14325 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14326 (init_registers_s390): Remove prototype.
14327 (init_registers_s390x): Likewise.
14328 (init_registers_s390_linux32): Add prototype.
14329 (init_registers_s390_linux64): Likewise.
14330 (init_registers_s390x_linux64): Likewise.
14331 (s390_num_regs_3264): New define.
14332 (s390_regmap_3264): New global variable.
14333 (s390_cannot_fetch_register): Remove obsolete check.
14334 (s390_cannot_store_register): Likewise.
14335 (s390_collect_ptrace_register): Handle upper/lower register halves.
14336 (s390_supply_ptrace_register): Likewise.
14337 (s390_fill_gregset): Update to register number changes.
14338 (s390_get_hwcap): New routine.
14339 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14340 Install appropriate regmap and register set.
14341
14342 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14343
14344 * server.c (gdbserver_version): Update copyright year to 2010.
14345 * gdbreplay.c (gdbreplay_version): Likewise.
14346
14347 2009-12-28 Doug Evans <dje@google.com>
14348
14349 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14350 elf/external.h. Include <elf.h> instead but only if necessary.
14351
14352 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14353
14354 * linux-low.c (linux_remove_process): Remove `detaching'
14355 parameter. Don't release/detach from thread_db here.
14356 (linux_kill): Release/detach from thread_db here, ...
14357 (linux_detach): ... and here, before actually detaching.
14358 (linux_wait_1): ... and here, when a process exits.
14359 * thread-db.c (any_thread_of): New.
14360 (thread_db_free): Switch the current inferior to a thread of the
14361 passed in process.
14362
14363 2009-12-21 Doug Evans <dje@google.com>
14364
14365 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14366
14367 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14368 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14369 warning ifndef __NR_tkill. Move setting of errno there too.
14370 Delete unnecessary resetting of errno after syscall.
14371 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14372
14373 * configure.ac: Check for dladdr.
14374 * config.in: Regenerate.
14375 * configure: Regenerate.
14376 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14377 (try_thread_db_load): Update.
14378
14379 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14380
14381 2009-12-18 Doug Evans <dje@google.com>
14382
14383 * event-loop.c: Include unistd.h if it exists.
14384
14385 * linux-low.c (my_waitpid): Move definition away from being in
14386 between linux_tracefork_child/linux_test_for_tracefork.
14387
14388 * gdb_proc_service.h (psaddr_t): Fix type.
14389 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14390 signature to match glibc.
14391
14392 2009-12-16 Doug Evans <dje@google.com>
14393
14394 * linux-low.c (linux_read_memory): Fix argument to read.
14395
14396 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14397
14398 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14399 events, don't leave current_inferior pointing at null.
14400
14401 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14402
14403 * win32-low.c (LOG): Delete.
14404 (OUTMSG): Output to stderr.
14405 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14406 on compile time LOG macro.
14407 (win32_wait): Fix debug output.
14408
14409 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14410
14411 * win32-low.c (win32_add_one_solib): If the dll name is
14412 "ntdll.dll", prepend the system directory to the dll path.
14413
14414 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14415
14416 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14417
14418 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14419 Vladimir Prus <vladimir@codesourcery.com>
14420
14421 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14422 * configure.ac: Check for __mcoldfire__ and set
14423 gdb_cv_m68k_is_coldfire.
14424 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14425 reg-cf.o and reg-m68k.o.
14426 * configure: Regenerated.
14427
14428 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14429
14430 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14431 Pass it to thread_db_free.
14432 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14433 proper `detaching' argument to linux_remove_process.
14434 * linux-low.h (thread_db_free): Add `detaching' parameter.
14435 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14436 to thread_db_free.
14437 (thread_db_free): Add `detaching' parameter. Only
14438 call td_ta_clear_event if detaching from process.
14439
14440 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14441
14442 * thread-db.c (thread_db_free): Fix typo.
14443
14444 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14445
14446 PR gdb/10838
14447 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14448
14449 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14450
14451 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14452 with an i686 compiler.
14453 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14454 needed.
14455 * configure: Rebuilt.
14456
14457 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14458
14459 PR gdb/10783
14460
14461 * server.c (handle_search_memory_1): Correct read_addr initialization
14462 in loop for searching subsequent chunks.
14463
14464 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14465
14466 * configure.ac: New --with-libthread-db option.
14467 * thread-db.c: Allow direct dependence on libthread_db.
14468 (thread_db_free): Adjust.
14469 * config.in: Regenerate.
14470 * configure: Likewise.
14471
14472 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14473
14474 PR gdb/10757
14475 * thread-db.c (attach_thread): New function.
14476 (maybe_attach_thread): Return success/failure.
14477 (find_new_threads_callback): Adjust.
14478 (thread_db_find_new_threads): Loop until no new threads.
14479
14480 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14481
14482 * proc-service.c (ps_lgetregs): Formatting.
14483
14484 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14485
14486 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14487 * configure.ac: Adjust.
14488 * linux-low.h (struct process_info_private): Move members to struct
14489 thread_db.
14490 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14491 * linux-low.c (linux_remove_process): Adjust.
14492 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14493 * server.c (handle_query): Move code ...
14494 (handle_monitor_command): ... here. New function.
14495 * target.h (struct target_ops): New member.
14496 * thread-db.c (struct thread_db): New.
14497 (libthread_db_search_path): New variable.
14498 (thread_db_create_event, thread_db_enable_reporting)
14499 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14500 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14501 (try_thread_db_load_1, dladdr_to_soname): New functions.
14502 (try_thread_db_load, thread_db_load_search): New functions.
14503 (thread_db_init): Search for libthread_db.
14504 (thread_db_free): New function.
14505 (thread_db_handle_monitor_command): Likewise.
14506 * config.in: Regenerate.
14507 * configure: Regenerate.
14508
14509 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14510
14511 * spu-low.c (spu_kill): Wait for inferior to terminate.
14512 Call clear_inferiors.
14513 (spu_detach): Call clear_inferiors.
14514
14515 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14516
14517 * aclocal.m4: Regenerate.
14518 * config.in: Likewise.
14519 * configure: Likewise.
14520
14521 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14522
14523 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14524 (parse_spufs_run): New function.
14525 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14526 (ppc_breakpoint_at): Handle SPU breakpoints.
14527
14528 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14529
14530 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14531 (SPUFS_MAGIC): Define.
14532 (spu_enumerate_spu_ids): New function.
14533 (linux_qxfer_spu): New function.
14534 (linux_target_ops): Install linux_qxfer_spu.
14535
14536 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14537
14538 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14539 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14540 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14541 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14542 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14543 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14544 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14545 (init_registers_powerpc_cell32l): Add prototype.
14546 (init_registers_powerpc_cell64l): Likewise.
14547 (ppc_arch_setup): Detect Cell/B.E. architecture.
14548
14549 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14550
14551 * Makefile.in (datarootdir): New variable.
14552
14553 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14554
14555 * linux-low.c (linux_write_memory): Update debugging output.
14556 * Makefile.in (clean): Add new descriptions.
14557 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14558 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14559 * configure.srv: Add new files for arm*-*-linux*.
14560 * linux-arm-low.c: Add new declarations.
14561 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14562 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14563 (HWCAP_VFPv3D16): New.
14564 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14565 instead of __IWMMXT__.
14566 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14567 (arm_arch_setup): New.
14568 (target_regsets): Remove #ifdef. Add VFP regset.
14569 (the_low_target): Use arm_arch_setup.
14570
14571 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14574 the main thread again.
14575
14576 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14577
14578 Adding Neutrino gdbserver.
14579 * configure: Regenerated.
14580 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14581 * configure.srv (i[34567]86-*-nto*): New target.
14582 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14583 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14584 (nto_comctrl) [__QNX__]: New function.
14585 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14586
14587 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14588
14589 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14590 srv_tgtobj.
14591
14592 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14593 Pedro Alves <pedro@codesourcery.com>
14594
14595 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14596 don't support CONTEXT_EXTENDED_REGISTERS.
14597 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14598 (the_low_target): Install them.
14599 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14600 failing with ERROR_PIPE_NOT_CONNECTED.
14601
14602 2009-06-30 Doug Evans <dje@google.com>
14603 Pierre Muller <muller@ics.u-strasbg.fr>
14604
14605 Add h/w watchpoint support to x86-linux, win32-i386.
14606 * Makefile.in (SFILES): Add i386-low.c
14607 (i386_low_h): Define.
14608 (i386-low.o): Add dependencies.
14609 (linux-x86-low.o): Add i386-low.h dependency.
14610 (win32-i386-low.o): Ditto.
14611 * i386-low.c: New file.
14612 * i386-low.h: New file.
14613 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14614 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14615 * linux-low.c (linux_add_process): Initialize arch_private.
14616 (linux_remove_process): Free arch_private.
14617 (add_lwp): Initialize arch_private.
14618 (delete_lwp): Free arch_private.
14619 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14620 provided.
14621 * linux-low.h (process_info_private): New member arch_private.
14622 (lwp_info): New member arch_private.
14623 (linux_target_ops): New members new_process, new_thread,
14624 prepare_to_resume.
14625 (ptid_of): New macro.
14626 * linux-x86-low.c: Include stddef.h, i386-low.h.
14627 (arch_process_info): New struct.
14628 (arch_lwp_info): New struct.
14629 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14630 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14631 (i386_dr_low_get_status): New function.
14632 (x86_insert_point, x86_remove_point): New functions.
14633 (x86_stopped_by_watchpoint): New function.
14634 (x86_stopped_data_address): New function.
14635 (x86_linux_new_process, x86_linux_new_thread): New functions.
14636 (x86_linux_prepare_to_resume): New function.
14637 (the_low_target): Add entries for insert_point, remove_point,
14638 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14639 prepare_to_resume.
14640 * server.c (debug_hw_points): New global.
14641 (monitor_show_help): Document set debug-hw-points.
14642 (handle_query): Process "set debug-hw-points".
14643 * server.h (debug_hw_points): Declare.
14644 (paddress): Declare.
14645 * utils.c (NUMCELLS, CELLSIZE): New macros.
14646 (get_sell, xsnprintf, paddress): New functions.
14647 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14648 remove_point, stopped_by_watchpoint, stopped_data_address.
14649 * win32-i386-low.c: Include i386-low.h.
14650 (debug_reg_state): Replaces dr.
14651 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14652 (i386_dr_low_get_status): New function.
14653 (i386_insert_point, i386_remove_point): New functions.
14654 (i386_stopped_by_watchpoint): New function.
14655 (i386_stopped_data_address): New function.
14656 (i386_initial_stuff): Update.
14657 (get_thread_context,set_thread_context,i386_thread_added): Update.
14658 (the_low_target): Add entries for insert_point,
14659 remove_point, stopped_by_watchpoint, stopped_data_address.
14660 * win32-low.c (win32_insert_watchpoint): New function.
14661 (win32_remove_watchpoint): New function.
14662 (win32_stopped_by_watchpoint): New function.
14663 (win32_stopped_data_address): New function.
14664 (win32_target_ops): Add entries for insert_watchpoint,
14665 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14666 * win32-low.h (win32_target_ops): New members insert_point,
14667 remove_point, stopped_by_watchpoint, stopped_data_address.
14668
14669 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14670
14671 * server.c (process_serial_event): Re-return unsupported, not
14672 error, if the type isn't recognized. Re-allow supporting only
14673 insert or remove packets. Also call require_running for
14674 breakpoints. Add missing break statement to default case. Tidy.
14675 * target.h (struct target_ops): Rename insert_watchpoint to
14676 insert_point, and remove_watchpoint to remove_point.
14677
14678 * linux-low.h (struct linux_target_ops): Likewise.
14679 * linux-low.c (linux_insert_watchpoint): Rename to ...
14680 (linux_insert_point): ... this. Adjust.
14681 (linux_remove_watchpoint): Rename to ...
14682 (linux_remove_point): ... this. Adjust.
14683 (linux_target_ops): Adjust.
14684 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14685 (cris_insert_point): ... this.
14686 (cris_remove_watchpoint): Rename to ...
14687 (cris_remove_point): ... this.
14688 (the_low_target): Adjust.
14689
14690 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14691
14692 * server.c (handle_v_kill): Pass signal_pid to
14693 kill_inferior if multi_process is zero.
14694
14695 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14696
14697 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14698 * target.h (target_ops): Comment for *_watchpoint to make it clear
14699 the functions can get types '0' and '1'.
14700
14701 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14702
14703 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14704 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14705 * regcache.c (get_regcache): Likewise.
14706 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14707 * win32-low.c (child_fetch_inferior_registers): Remove check for
14708 regno 0.
14709
14710 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14711 Pedro Alves <pedro@codesourcery.com>
14712
14713 * target.h (struct target_ops) <supports_multi_process>: New
14714 callback.
14715 (target_supports_multi_process): New.
14716 * server.c (handle_query): Even if GDB reports support, only
14717 enable multi-process if the target also supports it. Report
14718 multi-process support only if the target backend supports it.
14719 * linux-low.c (linux_supports_multi_process): New function.
14720 (linux_target_ops): Install it as target_supports_multi_process
14721 callback.
14722
14723 2009-05-24 Doug Evans <dje@google.com>
14724
14725 Global renaming of find_thread_pid to find_thread_ptid.
14726 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14727 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14728 All callers updated.
14729
14730 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14731 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14732 directly.
14733
14734 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14735 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14736 (linux_resume_one_lwp): Ditto.
14737
14738 2009-05-23 Doug Evans <dje@google.com>
14739
14740 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14741 from struct inferior_list_entry * to struct lwp_info *.
14742 All callers updated.
14743
14744 2009-05-13 Doug Evans <dje@google.com>
14745
14746 * linux-x86-low.c: Don't include assert.h.
14747 (x86_siginfo_fixup): Use fatal, not assert.
14748 (x86_arch_setup): Fix comment.
14749
14750 2009-05-12 Doug Evans <dje@google.com>
14751
14752 Biarch support for i386/amd64 gdbserver.
14753 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14754 Add linux-x86-low.c.
14755 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14756 (linux-x86-low.o): Add.
14757 * linux-x86-64-low.c: Delete.
14758 * linux-i386-low.c: Delete.
14759 * linux-x86-low.c: New file.
14760 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14761 linux-x86-low.o.
14762 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14763 linux-x86-low.o.
14764 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14765 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14766 (linux_child_pid_to_exec_file): New function.
14767 (elf_64_header_p, elf_64_file_p): New functions.
14768 (siginfo_fixup): New function.
14769 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14770 give target a chance to convert layout.
14771 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14772 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14773
14774 2009-05-07 Doug Evans <dje@google.com>
14775
14776 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14777 (regsets_store_inferior_registers): Ditto.
14778
14779 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14780
14781 PR server/10048
14782
14783 * linux-low.c (must_set_ptrace_flags): Delete.
14784 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14785 of the global.
14786 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14787 `lwp->must_set_ptrace_flags' instead.
14788 (linux_wait_for_event_1): Set ptrace options here.
14789 (linux_wait_1): ... not here.
14790
14791 2009-04-30 Doug Evans <dje@google.com>
14792
14793 * inferiors.c (started_inferior_callback): New function.
14794 (attached_inferior_callback): New function.
14795 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14796 * server.c (print_started_pid, print_attached_pid): New functions.
14797 (detach_or_kill_for_exit): New function.
14798 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14799 * server.h (have_started_inferiors_p): Declare.
14800 (have_attached_inferiors_p): Declare.
14801
14802 * inferiors.c (remove_process): Fix memory leak, free process.
14803 * linux-low.c (linux_remove_process): New function.
14804 (linux_kill): Call it instead of remove_process.
14805 (linux_detach, linux_wait_1): Ditto.
14806
14807 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14808
14809 * configure.srv: Add x86 Windows CE target.
14810
14811 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14812
14813 * inferiors.c (get_thread_process): Make global.
14814 * server.h (get_thread_process): Add prototype.
14815 * thread-db.c (find_one_thread): Use get_thread_process
14816 instead of current_process.
14817 (thread_db_get_tls_address): Do not crash if called when
14818 thread layer is not yet initialized.
14819
14820 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14821
14822 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14823 * spu-low.c (current_tid): Rename to ...
14824 (current_ptid): ... this.
14825 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14826 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14827 ptid_get_lwp (current_ptid) instead of current_tid.
14828 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14829 instead of current_tid. Use find_process_pid to verify pid
14830 argument is valid. Pass proper argument to remove_process.
14831 (spu_thread_alive): Compare current_ptid instead of current_tid.
14832 (spu_resume): Likewise.
14833
14834 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14835
14836 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14837 variable.
14838
14839 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14840
14841 Implement the multiprocess extensions, and add linux multiprocess
14842 support.
14843
14844 * server.h (ULONGEST): Declare.
14845 (struct ptid, ptid_t): New.
14846 (minus_one_ptid, null_ptid): Declare.
14847 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14848 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14849 (struct inferior_list_entry): Change `id' type from unsigned from
14850 to ptid_t.
14851 (struct sym_cache, struct breakpoint, struct
14852 process_info_private): Forward declare.
14853 (struct process_info): Declare.
14854 (current_process): Declare.
14855 (all_processes): Declare.
14856 (initialize_inferiors): Declare.
14857 (add_thread): Adjust to use ptid_t.
14858 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14859 (add_process, remove_process, find_thread_pid): Declare.
14860 (find_inferior_id): Adjust to use ptid_t.
14861 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14862 (multi_process): Declare.
14863 (push_event): Adjust to use ptid_t.
14864 (read_ptid, write_ptid): Declare.
14865 (prepare_resume_reply): Adjust to use ptid_t.
14866 (clear_symbol_cache): Declare.
14867 * inferiors.c (all_processes): New.
14868 (null_ptid, minus_one_ptid): New.
14869 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14870 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14871 (add_thread): Change unsigned long to ptid. Remove gdb_id
14872 parameter. Adjust.
14873 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14874 (gdb_id_to_thread): Rename to ...
14875 (find_thread_pid): ... this. Change unsigned long to ptid.
14876 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14877 (loaded_dll, pull_pid_from_list): Adjust.
14878 (add_process, remove_process, find_process_pid)
14879 (get_thread_process, current_process, initialize_inferiors): New.
14880 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14881 (struct target_waitstatus) <related_pid>: Ditto.
14882 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14883 return type to int.
14884 (struct target_ops) <join>: Add `pid' argument.
14885 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14886 (struct target_ops) <wait>: Add `ptid' field. Change return type
14887 to ptid.
14888 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14889 (mywait): Add `ptid' argument. Change return type to ptid_t.
14890 (target_pid_to_str): Declare.
14891 * target.c (set_desired_inferior): Adjust to use ptids.
14892 (mywait): Add new `ptid' argument. Adjust.
14893 (target_pid_to_str): New.
14894 * mem-break.h (free_all_breakpoints): Declare.
14895 * mem-break.c (breakpoints): Delelete.
14896 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14897 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14898 to use per-process breakpoint list.
14899 (free_all_breakpoints): New.
14900 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14901 (symbol_cache, all_symbols_looked_up): Delete.
14902 (hexchars): New.
14903 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14904 read_ptid): New.
14905 (prepare_resume_reply): Change ptid argument's type from unsigned
14906 long to ptid_t. Adjust. Implement W;process and X;process.
14907 (free_sym_cache, clear_symbol_cache): New.
14908 (look_up_one_symbol): Adjust to per-process symbol cache. *
14909 * server.c (cont_thread, general_thread, step_thread): Change type
14910 to ptid_t.
14911 (attached): Delete.
14912 (multi_process): New.
14913 (last_ptid): Change type to ptid_t.
14914 (struct vstop_notif) <ptid>: Change type to ptid_t.
14915 (queue_stop_reply, push_event): Change `ptid' argument's type to
14916 ptid_t.
14917 (discard_queued_stop_replies): Add `pid' argument.
14918 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14919 changes. Don't reference the `attached' global.
14920 (attach_inferior): Adjust to mywait interface changes.
14921 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14922 features. Handle and report "multiprocess+". Handle
14923 "qAttached:PID".
14924 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14925 changes.
14926 (handle_v_kill): New.
14927 (handle_v_stopped): Adjust to use target_pid_to_str.
14928 (handle_v_requests): Allow multiple attaches and runs when
14929 multiprocess extensions are in effect. Handle "vKill".
14930 (myresume): Adjust to use ptids.
14931 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14932 (handle_status): Adjust to discard_queued_stop_replies interface
14933 change.
14934 (first_thread_of, kill_inferior_callback)
14935 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14936 (main): Call initialize_inferiors. Adjust to use ptids, killing
14937 and detaching from all inferiors. Handle multiprocess packet
14938 variants.
14939 * linux-low.h: Include gdb_proc_service.h.
14940 (struct process_info_private): New.
14941 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14942 <lwpid_of>: Use ptid_get_lwp.
14943 (get_lwp_thread): Adjust.
14944 (struct lwp_info): Add `dead' member.
14945 (find_lwp_pid): Declare.
14946 * linux-low.c (thread_db_active): Delete.
14947 (new_inferior): Adjust comment.
14948 (inferior_pid): Delete.
14949 (linux_add_process): New.
14950 (handle_extended_wait): Adjust.
14951 (add_lwp): Change unsigned long to ptid.
14952 (linux_create_inferior): Add process to processes table. Adjust
14953 to use ptids. Don't set new_inferior here.
14954 (linux_attach_lwp): Rename to ...
14955 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14956 it. Adjust to use ptids.
14957 (linux_attach_lwp): New.
14958 (linux_attach): Add process to processes table. Don't set
14959 new_inferior here.
14960 (struct counter): New.
14961 (second_thread_of_pid_p, last_thread_of_process_p): New.
14962 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14963 multiple processes.
14964 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14965 processes. Remove process from process table.
14966 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14967 to multiple processes.
14968 (any_thread_of): New.
14969 (linux_detach): Add `pid' argument, and handle it. Remove process
14970 from processes table.
14971 (linux_join): Add `pid' argument. Handle it.
14972 (linux_thread_alive): Change unsighed long argument to ptid_t.
14973 Consider dead lwps as not being alive.
14974 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14975 threads we're not interested in.
14976 (same_lwp, find_lwp_pid): New.
14977 (linux_wait_for_lwp): Change `pid' argument's type from int to
14978 ptid_t. Adjust.
14979 (linux_wait_for_event): Rename to ...
14980 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14981 from int to ptid_t. Adjust.
14982 (linux_wait_for_event): New.
14983 (linux_wait_1): Add `ptid' argument. Change return type to
14984 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14985 that exit from the process table.
14986 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14987 Adjust.
14988 (mark_lwp_dead): New.
14989 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14990 stopping all threads, mark its main lwp as dead.
14991 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14992 ptids.
14993 (fetch_register, usr_store_inferior_registers)
14994 (regsets_fetch_inferior_registers)
14995 (regsets_store_inferior_registers, linux_read_memory)
14996 (linux_write_memory): Inline `inferior_pid'.
14997 (linux_look_up_symbols): Adjust to use per-process
14998 `thread_db_active'.
14999 (linux_request_interrupt): Adjust to use ptids.
15000 (linux_read_auxv): Inline `inferior_pid'.
15001 (initialize_low): Don't reference thread_db_active.
15002 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15003 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15004 (ps_getpid): Return the pid of the current inferior.
15005 * thread-db.c (proc_handle, thread_agent): Delete.
15006 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15007 per-process data.
15008 (find_one_thread): Change argument type to ptid_t. Adjust to
15009 per-process data.
15010 (maybe_attach_thread): Adjust to per-process data and ptids.
15011 (thread_db_find_new_threads): Ditto.
15012 (thread_db_init): Ditto.
15013 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15014 processes table. Adjust to use ptids.
15015 (spu_kill, spu_detach): Adjust interface. Remove process from
15016 processes table.
15017 (spu_join, spu_thread_alive): Adjust interface.
15018 (spu_wait): Adjust interface. Remove process from processes
15019 table. Adjust to use ptids.
15020 * win32-low.c (current_inferior_tid): Delete.
15021 (current_inferior_ptid): New.
15022 (debug_event_ptid): New.
15023 (thread_rec): Take a ptid. Adjust.
15024 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15025 (child_delete_thread): Ditto.
15026 (do_initial_child_stuff): Add `attached' argument. Add process to
15027 processes table.
15028 (child_fetch_inferior_registers, child_store_inferior_registers):
15029 Adjust.
15030 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15031 (win32_attach): Pass 1 to do_initial_child_stuff.
15032 (win32_kill): Adjust interface. Remove process from processes
15033 table.
15034 (win32_detach): Ditto.
15035 (win32_join): Adjust interface.
15036 (win32_thread_alive): Take a ptid.
15037 (win32_resume): Adjust to use ptids.
15038 (get_child_debug_event): Ditto.
15039 (win32_wait): Adjust interface. Remove exiting process from
15040 processes table.
15041
15042 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15043
15044 Non-stop mode support.
15045
15046 * server.h (non_stop): Declare.
15047 (gdb_client_data, handler_func): Declare.
15048 (delete_file_handler, add_file_handler, start_event_loop):
15049 Declare.
15050 (handle_serial_event, handle_target_event, push_event)
15051 (putpkt_notif): Declare.
15052 * target.h (enum resume_kind): New.
15053 (struct thread_resume): Replace `step' field by `kind' field.
15054 (TARGET_WNOHANG): Define.
15055 (struct target_ops) <wait>: Add `options' argument.
15056 <supports_non_stop, async, start_non_stop>: New fields.
15057 (target_supports_non_stop, target_async): New.
15058 (start_non_stop): Declare.
15059 (mywait): Add `options' argument.
15060 * target.c (mywait): Add `options' argument. Print child exit
15061 notifications here.
15062 (start_non_stop): New.
15063 * server.c (non_stop, own_buf, mem_buf): New globals.
15064 (struct vstop_notif): New.
15065 (notif_queue): New global.
15066 (queue_stop_reply, push_event, discard_queued_stop_replies)
15067 (send_next_stop_reply): New.
15068 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15069 interface changes.
15070 (attach_inferior): In non-stop mode, don't wait for the target
15071 here.
15072 (handle_general_set): Handle QNonStop.
15073 (handle_query): When handling qC, return the current general
15074 thread, instead of the first thread of the list.
15075 (handle_query): If the backend supports non-stop mode, include
15076 QNonStop+ in the qSupported query response.
15077 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15078 and non-stop mode.
15079 (handle_v_attach, handle_v_run): Handle non-stop mode.
15080 (handle_v_stopped): New.
15081 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15082 (myresume): Adjust to use resume_kind. Handle non-stop.
15083 (queue_stop_reply_callback): New.
15084 (handle_status): Handle non-stop mode.
15085 (main): Clear non_stop flag on reconnection. Use the event-loop.
15086 Refactor serial protocol handling from here ...
15087 (process_serial_event): ... to this new function. When GDB
15088 selects any thread, select one here. In non-stop mode, wait until
15089 GDB acks all pending events before exiting.
15090 (handle_serial_event, handle_target_event): New.
15091 * remote-utils.c (remote_open): Install remote_desc in the event
15092 loop.
15093 (remote_close): Remove remote_desc from the event loop.
15094 (putpkt_binary): Rename to...
15095 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15096 (putpkt_binary): New as wrapper around putpkt_binary_1.
15097 (putpkt_notif): New.
15098 (prepare_resume_reply): In non-stop mode, don't change the
15099 general_thread.
15100 * event-loop.c: New.
15101 * Makefile.in (OBJ): Add event-loop.o.
15102 (event-loop.o): New rule.
15103
15104 * linux-low.h (pid_of): Moved here.
15105 (lwpid_of): New.
15106 (get_lwp_thread): Use lwpid_of.
15107 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15108 * linux-low.c (pid_of): Delete.
15109 (inferior_pid): Use lwpid_of.
15110 (linux_event_pipe): New.
15111 (target_is_async_p): New.
15112 (delete_lwp): New.
15113 (handle_extended_wait): Use lwpid_of.
15114 (add_lwp): Don't set lwpid field.
15115 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15116 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15117 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15118 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15119 first. Adjust to linux_wait_for_event interface changes. Use
15120 lwpid_of.
15121 (linux_detach): Don't delete the main lwp here.
15122 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15123 (status_pending_p): Don't consider explicitly suspended lwps.
15124 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15125 pointer. Add OPTIONS argument. Change return type to int. Use
15126 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15127 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15128 pointer. Add status pointer argument. Return a pid instead of a
15129 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15130 changes. In non-stop mode, don't switch to a random thread.
15131 (linux_wait): Rename to...
15132 (linux_wait_1): ... this. Add target_options argument, and handle
15133 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15134 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15135 clean exit and signal exit code. Don't stop all threads in
15136 non-stop mode. In all-stop mode, only stop all threads when
15137 reporting a stop to GDB. Handle explicit thread stop requests.
15138 (async_file_flush, async_file_mark): New.
15139 (linux_wait): New.
15140 (send_sigstop): Use lwpid_of.
15141 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15142 interface changes. In non-stop mode, don't switch to a random
15143 thread.
15144 (linux_resume_one_lwp): Use lwpid_of.
15145 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15146 (linux_resume_one_thread): ... this. Handle resume_stop. In
15147 non-stop mode, don't look for pending flag in all threads.
15148 (resume_status_pending_p): Don't consider explicitly suspended
15149 threads.
15150 (my_waitpid): Reimplement. Emulate __WALL.
15151 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15152 Use lwpid_of.
15153 (sigchld_handler, linux_supports_non_stop, linux_async)
15154 (linux_start_non_stop): New.
15155 (linux_target_ops): Register linux_supports_non_stop, linux_async
15156 and linux_start_non_stop.
15157 (initialize_low): Install SIGCHLD handler.
15158 * thread-db.c (thread_db_create_event, find_one_thread)
15159 (thread_db_get_tls_address): Use lwpid_of.
15160 * win32-low.c (win32_detach): Adjust to use resume_kind.
15161 (win32_wait): Add `options' argument.
15162 * spu-low.c (spu_resume): Adjust to use resume_kind.
15163 (spu_wait): Add `options' argument.
15164
15165 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15166
15167 Decouple target code from remote protocol.
15168
15169 * target.h (enum target_waitkind): New.
15170 (struct target_waitstatus): New.
15171 (struct target_ops) <wait>: Return an unsigned long. Take a
15172 target_waitstatus pointer instead of a char pointer.
15173 (mywait): Likewise.
15174 * target.c (mywait): Change prototype to return an unsigned long.
15175 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15176 * server.h (thread_from_wait, old_thread_from_wait): Delete
15177 declarations.
15178 (prepare_resume_reply): Change prototype to take a
15179 target_waitstatus.
15180 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15181 (last_status, last_ptid): New.
15182 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15183 pid instead of a signal.
15184 (attach_inferior): Remove "status" and "signal" parameters.
15185 Adjust.
15186 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15187 not as an address.
15188 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15189 (handle_v_requests, myresume): Remove "status" and "signal"
15190 parameters. Adjust.
15191 (handle_status): New.
15192 (main): Delete local `status'. Adjust.
15193 * remote-utils.c: Include target.h.
15194 (prepare_resume_reply): Change prototype to take a
15195 target_waitstatus. Adjust.
15196
15197 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15198 interface.
15199 * spu-low.c (spu_wait): Adjust.
15200 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15201 Delete.
15202 (win32_wait): Adjust.
15203
15204 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15205
15206 * target.h (struct thread_resume): Delete leave_stopped member.
15207 (struct target_ops): Add a `n' argument to the `resume' callback.
15208 * server.c (start_inferior): Adjust.
15209 (handle_v_cont, myresume): Adjust.
15210 * linux-low.c (check_removed_breakpoint): Adjust to resume
15211 interface change, and to removed leave_stopped field.
15212 (resume_ptr): Delete.
15213 (struct thread_resume_array): New.
15214 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15215 resume interface change.
15216 (linux_continue_one_thread, linux_queue_one_thread)
15217 (resume_status_pending_p): Check if the resume field is NULL
15218 instead of checking the leave_stopped member.
15219 (linux_resume): Adjust to the target resume interface change.
15220 * spu-low.c (spu_resume): Adjust to the target resume interface
15221 change.
15222 * win32-low.c (win32_detach, win32_resume): Ditto.
15223
15224 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15225
15226 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15227 flag.
15228 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15229 pending.
15230 (linux_continue_one_thread): Only preserve the stepping flag if
15231 there's a pending breakpoint.
15232
15233 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15234
15235 * server.c (main): After the inferior having exited, call
15236 remote_close before exiting gdbserver.
15237
15238 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15239
15240 Fix size of FPSCR in Power 7 processors.
15241 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15242 (PPC_FEATURE_HAS_DFP): New #define.
15243 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15244 size of the FPSCR.
15245
15246 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15247
15248 * server.c (handle_query) Whitespace and formatting.
15249
15250 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15251
15252 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15253 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15254 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15255 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15256 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15257 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15258 Makefile.in, configure.ac: Fix whitespace throughout.
15259 * configure: Regenerate.
15260
15261 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15262
15263 * inferiors.c (find_inferior): Make it safe for the callback
15264 function to delete the currently iterated inferior.
15265
15266 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15267
15268 * Makefile.in (linuw_low_h): Move higher.
15269 (thread-db.o): Depend on $(linux_low_h).
15270
15271 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15272
15273 Rename "process" to "lwp" throughout.
15274
15275 * linux-low.c (all_processes): Rename to...
15276 (all_lwps): ... this.
15277 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15278 (add_process): Rename to ...
15279 (add_lwp): ... this. Adjust.
15280 (linux_create_inferior): Adjust.
15281 (linux_attach_lwp): Adjust.
15282 (linux_attach): Adjust.
15283 (linux_kill_one_process): Rename to ...
15284 (linux_kill_one_lwp): ... this. Adjust.
15285 (linux_kill): Adjust.
15286 (linux_detach_one_process): Rename to ...
15287 (linux_detach_one_lwp): ... this. Adjust.
15288 (linux_detach): Adjust.
15289 (check_removed_breakpoint): Adjust.
15290 (status_pending_p): Adjust.
15291 (linux_wait_for_process): Rename to ...
15292 (linux_wait_for_lwp): ... this. Adjust.
15293 (linux_wait_for_event): Adjust.
15294 (send_sigstop): Adjust.
15295 (wait_for_sigstop): Adjust.
15296 (stop_all_processes): Rename to ...
15297 (stop_all_lwps): ... this.
15298 (linux_resume_one_process): Rename to ...
15299 (linux_resume_one_lwp): ... this. Adjust.
15300 (linux_set_resume_request, linux_continue_one_thread)
15301 (linux_queue_one_thread, resume_status_pending_p)
15302 (usr_store_inferior_registers, regsets_store_inferior_registers)
15303 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15304 Adjust.
15305 * linux-low.h (get_process): Rename to ...
15306 (get_lwp): ... this. Adjust.
15307 (get_thread_process): Rename to ...
15308 (get_thread_lwp): ... this. Adjust.
15309 (get_process_thread): Rename to ...
15310 (get_lwp_thread): ... this. Adjust.
15311 (struct process_info): Rename to ...
15312 (struct lwp_info): ... this.
15313 (all_processes): Rename to ...
15314 (all_lwps): ... this.
15315 * proc-service.c (ps_lgetregs): Adjust.
15316 * thread-db.c (thread_db_create_event, find_one_thread)
15317 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15318
15319 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15320
15321 * server.c (handle_query): Handle "qAttached".
15322
15323 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15324
15325 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15326 GPLv3, update license URL.
15327
15328 2009-03-01 Doug Evans <dje@google.com>
15329
15330 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15331 (server_h): Add gdb_signals.h.
15332 (signals.o): Update.
15333 * server.h (target_signal_from_host,target_signal_to_host_p)
15334 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15335
15336 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15337
15338 * remote-utils.c (getpkt): Also generate remote-debug
15339 information if noack_mode is set.
15340
15341 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15342
15343 * server.c (handle_query): Report qXfer:siginfo:read and
15344 qXfer:siginfo:write as supported and handle them.
15345 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15346 * linux-low.c (linux_xfer_siginfo): New.
15347 (linux_target_ops): Set it.
15348
15349 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15350
15351 * server.c (gdbserver_usage): Mention --remote-debug.
15352 (main): Accept '--remote-debug' switch.
15353
15354 2009-01-18 Doug Evans <dje@google.com>
15355
15356 * regcache.c (new_register_cache): No need to check result of xcalloc.
15357 * server.c (handle_search_memory): Back out calls to xmalloc,
15358 result is checked and error is returned to user upon failure.
15359 (handle_query): Ditto. Add more checks for result of malloc.
15360 (handle_v_cont): Check result of malloc, report error back to
15361 user upon failure.
15362 (handle_v_run): Ditto. Call freeargv.
15363 * server.h (freeargv): Declare.
15364 * utils.c (freeargv): New fn.
15365
15366 2009-01-15 Doug Evans <dje@google.com>
15367
15368 * gdbreplay.c (perror_with_name): Make arg const char *.
15369 * server.h (target_signal_to_name): Make return type const char *.
15370 * thread-db.c (thread_db_err_str): Make return type const char *.
15371 * utils.c (perror_with_name): Make arg const char *.
15372
15373 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15374
15375 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15376 when handling a EXIT_PROCESS_DEBUG_EVENT.
15377
15378 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15379
15380 * gdbreplay.c (gdbreplay_version): Update copyright year.
15381 * server.c (gdbserver_version): Likewise.
15382
15383 2009-01-05 Doug Evans <dje@google.com>
15384
15385 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15386 (handle_extended_wait): Improve comment.
15387
15388 2008-12-13 Doug Evans <dje@google.com>
15389
15390 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15391 * server.h (ATTR_MALLOC): New macro.
15392 (xmalloc,xcalloc,xstrdup): Declare.
15393 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15394 * inferiors.c: Ditto.
15395 * linux-low.c: Ditto.
15396 * mem-break.c: Ditto.
15397 * regcache.c: Ditto.
15398 * remote-utils.c: Ditto.
15399 * server.c: Ditto.
15400 * target.c: Ditto.
15401 * win32-low.c: Ditto.
15402
15403 2008-12-12 Doug Evans <dje@google.com>
15404
15405 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15406 in debugging printf.
15407
15408 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15409
15410 2008-12-09 Doug Evans <dje@google.com>
15411
15412 * linux-low.h (struct process_info): Delete member tid, unused.
15413 * thread-db.c (find_one_thread): Update.
15414 (maybe_attach_thread): Update.
15415
15416 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15417
15418 * target.h (struct target_ops): Add qxfer_osdata member.
15419 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15420 and dirent.h.
15421 (linux_qxfer_osdata): New functions.
15422 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15423 callback.
15424 * server.c (handle_query): Handle "qXfer:osdata:read:".
15425 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15426 (buffer_xml_printf): New functions.
15427 * server.h (struct buffer): New.
15428 (buffer_grow_str, buffer_grow_str0): New macros.
15429 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15430 (buffer_xml_printf): Declare.
15431
15432 2008-11-24 Doug Evans <dje@google.com>
15433
15434 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15435
15436 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15437
15438 * server.c (handle_v_run): Always use the supplied argument list.
15439
15440 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15441
15442 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15443 (xtensa_regmap_table): Add entry for scompare1.
15444
15445 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15446
15447 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15448 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15449 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15450 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15451 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15452 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15453 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15454 XML target descriptions.
15455 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15456 when inferior is running on an ISA 2.05 or later processor. Add
15457 special case to return offset for full 64-bit slot of FPSCR when
15458 in 32-bits.
15459
15460 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15461
15462 * Makefile.in (SFILES, clean): Added sparc64 files.
15463 (reg-sparc64.o, reg-sparc64.c): New.
15464 * configure.srv (sparc*-*-linux*): New configuration.
15465 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15466 syscall arguments for SPARC.
15467 (regsets_store_inferior_registers): Likewise.
15468 * linux-sparc-low.c: New file.
15469
15470 2008-10-21 Doug Evans <dje@google.com>
15471
15472 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15473 (READLINE_DIR,READLINE_DEP): Delete.
15474 (INTERNAL_CFLAGS): Update.
15475 (LINTFLAGS): Update.
15476
15477 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15478
15479 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15480 whole argv from the last run, not just argv[0].
15481
15482 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15483
15484 * regcache.c (new_register_cache): Return NULL if the register
15485 cache size isn't known yet.
15486 (free_register_cache): Avoid dereferencing a NULL regcache.
15487
15488 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15489
15490 * configure.srv: Merge MIPS and MIPS64.
15491
15492 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15493
15494 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15495
15496 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15497
15498 * Makefile.in: Add required vsx dependencies.
15499
15500 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15501 Declare init_registers_powerpc_vsx32l.
15502 Declare init_registers_powerpc_vsx64l.
15503 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15504 (ppc_arch_setup): Check for VSX in hwcap.
15505 (ppc_fill_vsxregset): New function.
15506 (ppc_store_vsxregset): New function.
15507 Add new VSX entry in regset_info target_regsets.
15508
15509 * configure.srv: Add new VSX dependencies.
15510
15511 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15512
15513 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15514 (remote_open): Set or clear transport_is_reliable.
15515 (putpkt_binary): Don't expect acks in noack mode.
15516 (getpkt): Don't send ack/nac in noack mode.
15517 * server.c (handle_general_set): Handle QStartNoAckMode.
15518 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15519 qSupported.
15520 (main): Reset noack_mode on every connection.
15521 * server.h (noack_mode): Declare.
15522
15523 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15524
15525 * Makefile.in (GDBREPLAY_OBS): New variable.
15526 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15527
15528 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15529 Daniel Jacobowitz <dan@codesourcery.com>
15530
15531 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15532 (usr_store_inferior_registers): Likewise.
15533 (regsets_store_inferior_registers): Likewise.
15534
15535 2008-07-31 Rolf Jansen <rj@surtec.com>
15536 Pedro Alves <pedro@codesourcery.com>
15537
15538 * configure.ac: Check for memmem declaration.
15539 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15540 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15541 (disable_packet_qfThreadInfo): Unconditionally compile.
15542 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15543 * configure, config.in: Regenerate.
15544
15545 2008-07-28 Doug Kwan <dougkwan@google.com>
15546
15547 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15548 (linux_write_memory): Remove declaration of errno.
15549
15550 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15551
15552 * linux-low.c (handle_extended_wait): Do not use "status"
15553 variable uninitialized.
15554
15555 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15556
15557 * server.c (handle_v_attach): Inhibit reporting dll changes.
15558
15559 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15560
15561 * remote-utils.c (prepare_resume_reply): If requested, don't
15562 output "thread:TID" in the T stop reply.
15563
15564 * server.c (disable_packet_vCont, disable_packet_Tthread)
15565 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15566 (handle_query): If requested, disable support for qC, qfThreadInfo
15567 and qsThreadInfo.
15568 (handle_v_requests): If requested, disable support for vCont.
15569 (gdbserver_show_disableable): New.
15570 (main): Handle --disable-packet and --disable-packet=LIST.
15571
15572 * server.h (disable_packet_vCont, disable_packet_Tthread)
15573 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15574
15575 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15576
15577 * server.c (gdbserver_usage): Mention --version.
15578
15579 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15580
15581 * Makefile.in (gdbreplay.o): New rule.
15582
15583 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15584
15585 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15586 message, not gdbserver.
15587
15588 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15589 Nathan Sidwell <nathan@codesourcery.com>
15590 Joseph Myers <joseph@codesourcery.com>
15591
15592 * acinclude.m4: Include ../../config/acx.m4.
15593 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15594 * configure, config.in: Regenerate.
15595 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15596 * server.c (gdbserver_version): Print PKGVERSION.
15597 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15598 (main): Adjust gdbserver_usage calls.
15599 * gdbreplay.c (version, host_name): Add declarations.
15600 (gdbreplay_version, gdbreplay_usage): New.
15601 (main): Accept --version and --help options.
15602
15603 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15604
15605 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15606 (arm_breakpoint_at): Handle Thumb.
15607 (the_low_target): Add comment.
15608
15609 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15610
15611 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15612
15613 2008-05-09 Doug Evans <dje@google.com>
15614
15615 * server.h (decode_search_memory_packet): Declare.
15616 * remote-utils.c (decode_search_memory_packet): New fn.
15617 * server.c (handle_search_memory_1): New fn.
15618 (handle_search_memory): New fn.
15619 (handle_query): Process qSearch:memory packets.
15620
15621 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15622
15623 * regcache.c (registers_length): Remove.
15624 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15625 full register packet.
15626 * regcache.h (registers_length): Remove prototype.
15627 * server.h (PBUFSIZ): Define to 16384.
15628
15629 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15630
15631 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15632 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15633 powerpc-64l.o, and powerpc-altivec64l.o.
15634 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15635 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15636 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15637 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15638 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15639 to srv_xmlfiles.
15640
15641 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15642 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15643 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15644 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15645 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15646 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15647 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15648 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15649 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15650 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15651 (clean): Update.
15652
15653 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15654 (init_registers_powerpc_32l): ... this new prototype.
15655 (init_registers_powerpc_32): Remove, replace by ...
15656 (init_registers_powerpc_altivec32l): ... this new prototype.
15657 (init_registers_powerpc_e500): Remove, replace by ...
15658 (init_registers_powerpc_e500l): ... this new prototype.
15659 (init_registers_ppc64): Remove, replace by ...
15660 (init_registers_powerpc_64l): ... this new prototype.
15661 (init_registers_powerpc_64): Remove, replace by ...
15662 (init_registers_powerpc_altivec64l): ... this new prototype.
15663 (ppc_num_regs): Set to 73.
15664 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15665 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15666 (ppc_cannot_store_register): Handle orig_r3 and trap.
15667 (ppc_arch_setup): Update init_registers_... calls.
15668 (ppc_fill_gregset): Handle orig_r3 and trap.
15669
15670 * inferiors.c (clear_inferiors): Reset current_inferior.
15671
15672 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15673
15674 * acinclude.m4: Add override.m4.
15675 * configure: Regenerate.
15676
15677 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15678
15679 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15680 initial call to init_register_ppc64.
15681
15682 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15683
15684 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15685 single powerpc*-*-linux* case.
15686 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15687
15688 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15689
15690 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15691 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15692 from reg_xmlfiles.
15693 * linux-ppc-low.c: Include <elf.h>.
15694 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15695 (ppc_hwcap): New global variable.
15696 (ppc_regmap): Remove __SPE__ #ifdef sections.
15697 (ppc_regmap_e500): New global variable.
15698 (ppc_cannot_store_register): Update __SPE__ special case.
15699 (ppc_get_hwcap): New function.
15700 (ppc_arch_setup): Use it to determine whether inferior supports
15701 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15702 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15703 Do not access registers if target does not support AltiVec.
15704 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15705 Do not access registers if target does not support SPE.
15706 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15707
15708 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15709
15710 * linux-low.c (disabled_regsets, num_regsets): New.
15711 (use_regsets_p): Delete.
15712 (linux_wait_for_process): Clear disabled_regsets.
15713 (regsets_fetch_inferior_registers): Check and set it.
15714 (regsets_store_inferior_registers): Likewise.
15715 (linux_fetch_registers, linux_store_registers): Do not use
15716 use_regsets_p.
15717 (initialize_low): Allocate disabled_regsets.
15718
15719 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15720
15721 * Makefile.in (LIBOBJS): New.
15722 (OBS): Use LIBOBJS.
15723 (memmem.o): New rule.
15724 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15725 * configure: Regenerated.
15726
15727 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15728
15729 * server.c (handle_query): Never return "unsupported" for
15730 qXfer:features:read queries.
15731
15732 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15733
15734 * server.c (get_features_xml): Fix inverted condition.
15735 (handle_query): Always support qXfer:feature:read.
15736
15737 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15738
15739 * server.c (wrapper_argv): New.
15740 (start_inferior): Handle wrapper_argv. If set, expect an extra
15741 trap.
15742 (gdbserver_usage): Document --wrapper.
15743 (main): Parse --wrapper.
15744
15745 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15746
15747 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15748 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15749 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15750 (ppc_set_pc): Likewise.
15751 (ppc_arch_setup): New function.
15752 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15753 of collect_register.
15754 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15755
15756 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15757
15758 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15759 instead of linux-ppc64-low.o.
15760 * linux-ppc64-low.c: Remove file.
15761 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15762 (linux-ppc64-low.o): Remove rule.
15763
15764 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15765 (init_registers_powerpc_64): Likewise.
15766 (ppc_regmap): Conditionally define depending on __powerpc64__.
15767 (ppc_cannot_store_register): Do not special-case "fpscr" when
15768 compiled on __powerpc64__.
15769 (ppc_collect_ptrace_register): New function.
15770 (ppc_supply_ptrace_register): New function.
15771 (ppc_breakpoint): Change type to "unsigned int".
15772 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15773 (the_low_target): Conditionally provide initializers for the
15774 arch_setup member depending on __powerpc64__. Install
15775 collect_ptrace_register and supply_ptrace_register members.
15776
15777 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15778
15779 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15780 * server.c (gdbserver_xmltarget): Define.
15781 (get_features_xml): Use it to replace "target.xml" and arch_string.
15782
15783 * configure.srv: Remove srv_xmltarget. Add XML files that were
15784 mentioned there to srv_xmlfiles instead. Remove conditional tests
15785 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15786 srv_xmlfiles and srv_regobj to include all possible choices.
15787 * configure.ac (srv_xmltarget): Remove.
15788 (srv_xmlfiles): Do not add "target.xml".
15789 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15790 checks for supplementary target information.
15791 * configure: Regenerate.
15792 * Makefile.in (XML_TARGET): Remove.
15793 (target.xml): Remove rule.
15794 (clean): Do not clean up target.xml.
15795 (.PRECIOUS): Do not mention target.xml.
15796
15797 * target.h (struct target_ops): Remove arch_string member.
15798 * linux-low.c (linux_arch_string): Remove.
15799 (linux_target_ops): Remove arch_string initializer.
15800 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15801 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15802 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15803 * spu-low.c (spu_arch_string): Remove.
15804 (spu_target_ops): Remove arch_string initializer.
15805 * win32-low.c (win32_arch_string): Remove.
15806 (win32_target_ops): Remove arch_string initializer.
15807 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15808 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15809 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15810
15811 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15812
15813 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15814 by collect_ptrace_register and supply_ptrace_register hooks.
15815 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15816 instead of checking for the_low_target.left_pad_xfer.
15817 (usr_store_inferior_registers): Use collect_ptrace_register callback
15818 instead of checking for the_low_target.left_pad_xfer.
15819
15820 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15821 (s390_supply_ptrace_register): Likewise.
15822 (s390_fill_gregset): Call s390_collect_ptrace_register.
15823 (the_low_target): Update.
15824
15825 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15826 (ppc_supply_ptrace_register): Likewise.
15827 (the_low_target): Update.
15828
15829 * linux-i386-low.c (the_low_target): Update.
15830 * linux-x86-64-low.c (the_low_target): Update.
15831
15832 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15833
15834 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15835 reg-s390.o and reg-s390x.o.
15836
15837 * linux-low.c (new_inferior): New global variable.
15838 (linux_create_inferior, linux_attach): Set it.
15839 (linux_wait_for_process): Call the_low_target.arch_setup after the
15840 target has stopped for the first time.
15841 (initialize_low): Do not call the_low_target.arch_setup.
15842
15843 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15844 (s390_set_pc): Likewise.
15845 (s390_arch_setup): New function.
15846 (the_low_target): Use s390_arch_setup as arch_setup routine.
15847
15848 * regcache.c (realloc_register_cache): New function.
15849 (set_register_cache): Call it for each existing regcache.
15850
15851 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15852
15853 * server.h (init_registers): Remove prototype.
15854
15855 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15856 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15857 instead of init_registers ().
15858 * linux-arm-low.c (init_registers_arm): Add prototype.
15859 (init_registers_arm_with_iwmmxt): Likewise.
15860 (the_low_target): Add initializer for arch_setup field.
15861 * linux-cris-low.c (init_registers_cris): Add prototype.
15862 (the_low_target): Add initializer for arch_setup field.
15863 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15864 (the_low_target): Add initializer for arch_setup field.
15865 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15866 (the_low_target): Add initializer for arch_setup field.
15867 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15868 (the_low_target): Add initializer for arch_setup field.
15869 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15870 (the_low_target): Add initializer for arch_setup field.
15871 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15872 (the_low_target): Add initializer for arch_setup field.
15873 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15874 (init_registers_mips64_linux): Likewise.
15875 (the_low_target): Add initializer for arch_setup field.
15876 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15877 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15878 (the_low_target): Add initializer for arch_setup field.
15879 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15880 (init_registers_powerpc_64): Likewise.
15881 (the_low_target): Add initializer for arch_setup field.
15882 * linux-s390-low.c (init_registers_s390): Add prototype.
15883 (init_registers_s390x): Likewise.
15884 (the_low_target): Add initializer for arch_setup field.
15885 * linux-sh-low.c (init_registers_sh): Add prototype.
15886 (the_low_target): Add initializer for arch_setup field.
15887 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15888 (the_low_target): Add initializer for arch_setup field.
15889 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15890 (the_low_target): Add initializer for arch_setup field.
15891
15892 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15893 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15894 instead of init_registers ().
15895 * win32-arm-low.c (init_registers_arm): Add prototype.
15896 (the_low_target): Add initializer for arch_setup field.
15897 * win32-i386-low.c (init_registers_i386): Add prototype.
15898 (the_low_target): Add initializer for arch_setup field.
15899
15900 * spu-low.c (init_registers_spu): Add prototype.
15901 (initialize_low): Call initialie_registers_spu () instead of
15902 initialize_registers ().
15903
15904 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15905
15906 * server.c (handle_v_requests): When handling the vRun and vAttach
15907 packets, if already debugging a process, don't kill it. Return an
15908 error instead.
15909
15910 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15911
15912 * server.c (handle_query): Correct length check.
15913
15914 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15915
15916 * win32-low.c (do_initial_child_stuff): Add process handle
15917 parameter. Set current_process_handle and current_process_id from the
15918 parameters. Clear globals.
15919 (win32_create_inferior): Don't set current_process_handle and
15920 current_process_id here. Instead pass them on the call to
15921 do_initial_child_stuff.
15922 (win32_attach): Likewise.
15923 (win32_clear_inferiors): New.
15924 (win32_kill): Don't close the current process handle or the
15925 current thread handle here. Instead call win32_clear_inferiors.
15926 (win32_detach): Don't open a new handle to the process. Call
15927 win32_clear_inferiors.
15928 (win32_join): Don't rely on current_process_handle; open a new
15929 handle using the process id.
15930 (win32_wait): Call win32_clear_inferiors when the inferior process
15931 has exited.
15932
15933 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15934
15935 * server.c (monitor_show_help): Add "exit".
15936
15937 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15938
15939 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15940 (clean): Add reg-xtensa.c.
15941 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15942 * configure.srv (xtensa*-*-linux*) New target.
15943 * linux-xtensa-low.c: New.
15944 * xtensa-xtregs.c: New.
15945
15946 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * hostio.c: Don't include errno.h.
15949 (errno_to_fileio_errno): Move to hostio-errno.
15950 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15951 error number outputting to the target->hostio_last_error callback.
15952 (hostio_packet_error): Use FILEIO_EINVAL directly.
15953 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15954 calls to hostio_error.
15955 * hostio-errno.c: New.
15956 * server.h (hostio_last_error_from_errno): Declare.
15957 * target.h (target_ops): Add hostio_last_error member.
15958 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15959 as hostio_last_error handler.
15960 * spu-low.c (spu_target_ops): Likewise.
15961 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15962 (wince_hostio_last_error): New functions.
15963 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15964 as hostio_last_error handler.
15965 (win32_target_ops) [!_WIN32_WCE]: Register
15966 hostio_last_error_from_errno as hostio_last_error handler.
15967 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15968 (hostio-errno.o): New rule.
15969 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15970 * configure.srv (srv_hostio_err_objs): New variable. Default to
15971 hostio-errno.o.
15972 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15973 * configure: Regenerate.
15974
15975 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15976
15977 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15978 (linux_kill, linux_detach): Clean up the process list.
15979 * remote-utils.c (remote_open): Improve port number parsing.
15980 (putpkt_binary, input_interrupt): Only send interrupts if the target
15981 is running.
15982 * server.c (extended_protocol): Make static.
15983 (attached): Define earlier.
15984 (exit_requested, response_needed, program_argv): New variables.
15985 (target_running): New.
15986 (start_inferior): Clear attached here.
15987 (attach_inferior): Set attached here.
15988 (require_running): Define.
15989 (handle_query): Use require_running and target_running. Implement
15990 "monitor exit".
15991 (handle_v_attach, handle_v_run): New.
15992 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15993 (gdbserver_usage): Update.
15994 (main): Redo argument parsing. Handle --debug and --multi. Handle
15995 --attach along with other options or after the port. Save
15996 program_argv. Support no initial program. Resynchronize
15997 communication with GDB after an error. Handle "monitor exit".
15998 Use require_running and target_running. Always allow the extended
15999 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16000 restart in extended mode.
16001 * README: Refer to the GDB manual. Update --attach usage.
16002
16003 2007-12-20 Andreas Schwab <schwab@suse.de>
16004
16005 * linux-low.c (STACK_SIZE): Define.
16006 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16007 (linux_test_for_tracefork): Likewise.
16008
16009 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * linux-low.c (linux_wait_for_event): Update messages. Do not
16012 reinsert auto-delete breakpoints.
16013 * mem-break.c (struct breakpoint): Change return type of handler to
16014 int.
16015 (set_breakpoint_at): Update handler type.
16016 (reinsert_breakpoint_handler): Return 1 instead of calling
16017 delete_breakpoint.
16018 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16019 setting a new one.
16020 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16021 * mem-break.h (set_breakpoint_at): Update handler type.
16022 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16023 * win32-low.c (auto_delete_breakpoint): New.
16024 (get_child_debug_event): Use it.
16025
16026 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * configure.ac: Check for pread and pwrite.
16029 * hostio.c (handle_pread): Fall back to lseek and read.
16030 (handle_pwrite): Fall back to lseek and write.
16031 * config.in, configure: Regenerated.
16032
16033 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16034
16035 * server.c (myresume): Add own_buf argument.
16036 (main): Update calls.
16037
16038 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16039
16040 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16041 * remote-utils.c (remote_open): Do not call disable_async_io.
16042 (block_async_io): Delete.
16043 (unblock_async_io): Make static.
16044 (initialize_async_io): New.
16045 * server.c (handle_v_cont): Handle async I/O here.
16046 (myresume): Likewise. Move other common resume tasks here...
16047 (main): ... from here. Call initialize_async_io. Disable async
16048 I/O before the main loop.
16049 * server.h (initialize_async_io): Declare.
16050 (block_async_io, unblock_async_io): Delete prototypes.
16051 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16052
16053 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16054
16055 * remote-utils.c (readchar): Allow binary data in received messages.
16056
16057 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16058
16059 * win32-low.c (attaching): New global.
16060 (win32_create_inferior): Clear the `attaching' global.
16061 (win32_attach): Set the `attaching' global.
16062 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16063 attaching. Only set a breakpoint at the entry point if not
16064 attaching.
16065
16066 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16067
16068 * server.c (main): Don't report dll events on the initial
16069 connection on attaches.
16070
16071 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16072
16073 * server.c (main): Relax numerical bases supported for the pid of
16074 the --attach command line argument.
16075
16076 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16077
16078 * win32-low.c (win32_attach): Call OpenProcess before
16079 DebugActiveProcess, not after. Add last error output to error
16080 call.
16081
16082 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16083
16084 * win32-low.c (win32_get_thread_context)
16085 (win32_set_thread_context): New functions.
16086 (thread_rec): Use win32_get_thread_context.
16087 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16088 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16089 field.
16090
16091 2007-12-03 Leo Zayas
16092 Pedro Alves <pedro_alves@portugalmail.pt>
16093
16094 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16095 global variables.
16096 (child_add_thread): Minor cleanup.
16097 (child_continue): Resume artificially suspended threads before
16098 calling ContinueDebugEvent.
16099 (suspend_one_thread): New.
16100 (fake_breakpoint_event): New.
16101 (get_child_debug_event): Change return type to int. Check here if
16102 gdb sent an interrupt request. If a soft interrupt was requested,
16103 fake a breakpoint event. Return 0 if there is no event to handle,
16104 and 1 otherwise.
16105 (win32_wait): Don't check here if gdb sent an interrupt request.
16106 Ensure there is a valid event to handle.
16107 (win32_request_interrupt): Add soft interruption method as last
16108 resort.
16109
16110 2007-12-03 Leo Zayas
16111 Pedro Alves <pedro_alves@portugalmail.pt>
16112
16113 * win32-low.h (win32_thread_info): Add descriptions to the
16114 structure members. Replace `suspend_count' counter by a
16115 `suspended' flag.
16116 * win32-low.c (thread_rec): Update condition of when to get the
16117 context from the inferior. Rely on ContextFlags being set if it
16118 has already been retrieved. Only suspend the inferior thread if
16119 we haven't already. Warn if that fails.
16120 (continue_one_thread): s/suspend_count/suspended/. Only call
16121 ResumeThread once. Warn if that fails.
16122
16123 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16124
16125 * win32-low.c (win32_wait): Don't read from the inferior when it
16126 has already exited.
16127
16128 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16129
16130 * Makefile.in (win32_low_h): New variable.
16131 (win32-low.o): Add dependency on $(win32_low_h).
16132 (win32-arm-low.o, win32-i386-low.o): New rules.
16133
16134 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16135
16136 * hostio.c: Correct copyright year.
16137
16138 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * Makefile.in (OBS): Add hostio.o.
16141 (hostio.o): New rule.
16142 * server.h (handle_vFile): Declare.
16143 * hostio.c: New file.
16144 * server.c (handle_v_requests): Take packet_len and new_packet_len
16145 for binary packets. Call handle_vFile.
16146 (main): Update call to handle_v_requests.
16147
16148 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16149
16150 * linux-low.c: Include <sched.h>.
16151
16152 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16153
16154 * linux-low.c (linux_tracefork_grandchild): New.
16155 (linux_tracefork_child): Use clone.
16156 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16157
16158 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16159
16160 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16161
16162 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16163
16164 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16165
16166 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * inferiors.c (change_inferior_id): Delete.
16169 (add_pid_to_list, pull_pid_from_list): New.
16170 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16171 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16172 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16173 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16174 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16175 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16176 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16177 (using_threads): Always set to 1.
16178 (handle_extended_wait): New.
16179 (add_process): Do not set TID.
16180 (linux_create_inferior): Set must_set_ptrace_flags.
16181 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16182 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16183 (linux_thread_alive): Rename TID argument to LWPID.
16184 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16185 (linux_wait_for_event): Do not use TID or check using_threads. Update
16186 call to dead_thread_notify. Call handle_extended_wait.
16187 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16188 (send_sigstop): Delete sigstop_sent.
16189 (wait_for_sigstop): Avoid TID.
16190 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16191 (linux_test_for_tracefork): New.
16192 (linux_lookup_signals): Use thread_db_active and
16193 linux_supports_tracefork_flag.
16194 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16195 * linux-low.h (get_process_thread): Avoid TID.
16196 (struct process_ifo): Move thread_known and tid to the end. Remove
16197 sigstop_sent.
16198 (linux_attach_lwp, thread_db_init): Update prototypes.
16199 * server.h (change_inferior_id): Delete prototype.
16200 (add_pid_to_list, pull_pid_from_list): New prototypes.
16201 * thread-db.c (thread_db_use_events): New.
16202 (find_first_thread): Rename to...
16203 (find_one_thread): ...this. Update callers and messages. Do not
16204 call fatal. Check thread_db_use_events. Do not call
16205 change_inferior_id or new_thread_notify.
16206 (maybe_attach_thread): Update. Do not call new_thread_notify.
16207 (thread_db_init): Set thread_db_use_events. Check use_events.
16208 * utils.c (fatal, warning): Correct message prefix.
16209
16210 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16211
16212 * Makefile.in (clean): Remove new files.
16213 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16214 (powerpc-64.o, powerpc-64.c): New rules.
16215 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16216 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16217 with SPE.
16218 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16219 SPE targets.
16220 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16221 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16222 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16223 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16224 (target_regsets): Add AltiVec and SPE register sets.
16225 * configure.ac: Check for AltiVec and SPE.
16226 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16227 (ppc_fill_vrregset, ppc_store_vrregset): New.
16228 (target_regsets): Add AltiVec register set.
16229 * configure: Regenerated.
16230
16231 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16232
16233 * linux-low.c (O_LARGEFILE): Define.
16234 (linux_read_memory): Use /proc/PID/mem.
16235 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16236 * configure, config.in: Regenerated.
16237
16238 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * linux-low.c (linux_wait_for_event): Do not pass signals while
16241 single-stepping.
16242
16243 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16244
16245 * win32-low.c (create_process): New.
16246 (win32_create_inferior): Use create_process instead of
16247 CreateProcess. If create_process failed retry appending an ".exe"
16248 suffix. Store the GetLastError result immediatelly after
16249 create_process calls and use it on the call to error.
16250
16251 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16252
16253 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16254
16255 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16256
16257 * configure.ac: Switch license to GPLv3.
16258
16259 2007-08-01 Michael Snyder <msnyder@access-company.com>
16260
16261 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16262
16263 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16264
16265 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16266 typedef.
16267 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16268 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16269 CloseToolhelp32Snapshot.
16270 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16271 CloseToolhelp32Snapshot.
16272
16273 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16274
16275 * server.c (main): Check for inferior exit before main loop.
16276
16277 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16278
16279 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16280 instead of on tmp_desc.
16281
16282 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16283 Daniel Jacobowitz <dan@codesourcery.com>
16284
16285 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16286 (add_thread): Minor cleanups.
16287 (clear_inferiors): Move lower in the file. Clear the DLL
16288 list.
16289 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16290 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16291 (xml_escape_text): New.
16292 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16293 for qSupported.
16294 (handle_v_cont): Report errors.
16295 (gdbserver_version): Update.
16296 (main): Correct size of own_buf. Do not report initial DLL events.
16297 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16298 (unloaded_dll, xml_escape_text): New.
16299 * win32-low.c (enum target_waitkind): Update comments.
16300 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16301 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16302 (win32_EnumProcessModules, win32_GetModuleInformation)
16303 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16304 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16305 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16306 (win32_Module32First, win32_Module32Next, load_toolhelp)
16307 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16308 (get_child_debug_event): Handle DLL events.
16309 (win32_wait): Likewise.
16310
16311 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16312
16313 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16314 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16315
16316 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16317
16318 * win32-low.c (handle_output_debug_string): Ignore event if not
16319 waiting.
16320
16321 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16322
16323 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16324
16325 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16326
16327 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16328
16329 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16330
16331 * inferiors.c (change_inferior_id): Add comment.
16332 * linux-low.c (check_removed_breakpoint): Add an early
16333 prototype. Improve debug output.
16334 (linux_attach): Doc update.
16335 (linux_detach_one_process, linux_detach): Clean up before releasing
16336 each process.
16337 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16338 * linux-low.h (struct process_info): Doc improvement.
16339 * mem-break.c (delete_all_breakpoints): New.
16340 * mem-break.h (delete_all_breakpoints): New prototype.
16341 * thread-db.c (find_first_thread): New.
16342 (thread_db_create_event): Call it instead of
16343 thread_db_find_new_threads. Clean up unused variables.
16344 (maybe_attach_thread): Remove first thread handling.
16345 (thread_db_find_new_threads): Use find_first_thread.
16346 (thread_db_get_tls_address): Likewise.
16347
16348 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16349
16350 * thread-db.c (thread_db_find_new_threads): Add prototype.
16351 (thread_db_create_event): Check for the main thread before adding
16352 a new thread.
16353 (maybe_attach_thread): Only enable event reporting if TID == 0.
16354 (thread_db_get_tls_address): Check for new threads.
16355
16356 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16357
16358 * linux-low.c (linux_create_inferior): Try execv before execvp.
16359 * spu-low.c (spu_create_inferior): Likewise.
16360
16361 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16362
16363 * linux-low.c (linux_create_inferior): Change execv to execvp.
16364 * spu-low.c (spu_create_inferior): Likewies.
16365
16366 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16367
16368 * Makefile.in (clean): Clean new files instead of deleted ones.
16369 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16370 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16371 rules.
16372 * configure.srv: Specify XML files and new regformats for MIPS and
16373 MIPS64 GNU/Linux.
16374 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16375 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16376 an entry for the restart register.
16377 (mips_cannot_fetch_register, mips_cannot_store_register)
16378 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16379 register names to match the XML descriptions.
16380 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16381 restart register instead of $0.
16382
16383 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16384 Markus Deuling <deuling@de.ibm.com>
16385
16386 * remote-utils.c (decode_xfer_write): New function.
16387 * server.h (decode_xfer_write): Add prototype.
16388 * server.c (handle_query): Add PACKET_LEN argument. Support
16389 qXfer:spu:read and qXfer:spu:write packets.
16390 (main): Pass packet_len to handle_query.
16391 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16392 * target.h (target_ops): Add qxfer_spu.
16393
16394 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16395
16396 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16397 accessing non-seekable spufs files.
16398
16399 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16400
16401 * server.c (handle_query): Add reply for qC packet.
16402
16403 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16404 Leo Zayas <lerele@champenstudios@com>
16405
16406 * server.h (check_remote_input_interrupt_request): New function.
16407 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16408 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16409 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16410 (check_remote_input_interrupt_request): New function.
16411 * server.h (check_remote_input_interrupt_request): Declare.
16412 * win32-low.c (winapi_DebugBreakProcess,
16413 winapi_GenerateConsoleCtrlEvent): New typedefs.
16414 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16415 to 250 ms.
16416 (win32_wait): Check for remote interrupt request
16417 with check_remote_input_interrupt_request.
16418 (win32_request_interrupt): New function.
16419 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16420
16421 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16422
16423 * win32-low.c (debug_registers_changed,
16424 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16425 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16426 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16427 (thread_rec): Get context using the low target.
16428 (child_add_thread): Call thread_added on the low target,
16429 which does the same thing.
16430 (regptr): Delete.
16431 (do_initial_child_stuff): Remove debug registers references.
16432 Set context using the low target. Resume threads after
16433 setting the contexts.
16434 (child_continue): Remove dead variable. Remove debug
16435 registers references.
16436 (child_fetch_inferior_registers): Go through the low target.
16437 (do_child_store_inferior_registers): Remove.
16438 (child_store_inferior_registers): Go through the low target.
16439 (win32_resume): Remove debug registers references.
16440 Set context using the low target.
16441 (handle_exception): Change return type to void. Don't record
16442 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16443 first chance exception.
16444 (get_child_debug_event): Change return type to void. Remove
16445 goto loop. Always return after waiting for debug event.
16446 (win32_wait): Convert to switch statement. Handle spurious
16447 events.
16448
16449 * win32-i386-low.c (debug_registers_changed,
16450 debug_registers_used): New.
16451 (initial_stuff): Rename to ...
16452 (i386_initial_stuff): ... this. Clear debug registers
16453 state variables.
16454 (store_debug_registers): Delete.
16455 (i386_get_thread_context): New.
16456 (load_debug_registers): Delete.
16457 (i386_set_thread_context): New.
16458 (i386_thread_added): New.
16459 (single_step): Rename to ...
16460 (i386_single_step): ... this.
16461 (do_fetch_inferior_registers): Rename to ...
16462 (i386_fetch_inferior_register): ... this.
16463 (i386_store_inferior_register): New.
16464 (the_low_target): Adapt to new interface.
16465
16466 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16467 (arm_get_thread_context): New.
16468 (arm_set_thread_context): New.
16469 (regptr): New.
16470 (do_fetch_inferior_registers): Rename to ...
16471 (arm_fetch_inferior_register): ... this.
16472 (arm_store_inferior_register): New.
16473 (arm_wince_breakpoint): Reimplement as unsigned long.
16474 (arm_wince_breakpoint_len): Define.
16475 (the_low_target): Adapt to new interface.
16476
16477 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16478 load_debug_registers. Add get_thread_context, set_thread_context,
16479 thread_added and store_inferior_register. Rename
16480 fetch_inferior_registers to fetch_inferior_register.
16481 (regptr): Remove declaration.
16482
16483 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16484
16485 * linux-low.c (linux_detach): Change return type to int. Return 0.
16486 * spu-low.c (spu_detach): Likewise.
16487
16488 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16489
16490 * target.h (target_ops): Change return type of detach to int.
16491 Add join.
16492 (join_inferior): New.
16493 * server.c (main): Don't skip detach support on mingw32.
16494 If the inferior doesn't support detaching return error.
16495 Call join_inferior instead of using waitpid.
16496 * linux-low.c (linux_join): New.
16497 (linux_target_op): Add linux_join.
16498 * spu-low.c (spu_join): New.
16499 (spu_target_ops): Add spu_join.
16500 * win32-low.c (win32_detach): Adapt to new interface.
16501 Reopen current_process_handle before detaching. Issue a child
16502 resume before detaching.
16503 (win32_join): New.
16504 (win32_target_op): Add win32_join.
16505
16506 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16507
16508 * win32-low.c (win32-attach): Fix return value.
16509 * target.h (target_ops): Describe ATTACH return values.
16510
16511 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16512
16513 * win32-low.c (GETPROCADDRESS): Define.
16514 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16515 (winapi_DebugSetProcessKillOnExit): Likewise.
16516 (win32_create_inferior): Force usage of ansi CreateProcessA.
16517 (win32_attach): Use GETPROCADDRESS.
16518 (win32_detach): Likewise.
16519
16520 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16521
16522 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16523
16524 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16525
16526 * win32-low.c: Commit leftover changes from 2007-03-29.
16527
16528 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16529
16530 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16531 fields short instead of int. Add explicit padding.
16532 (i387_cache_to_fsave): Remove unnecessary casts.
16533 (i387_fsave_to_cache): Doc fix.
16534 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16535
16536 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16537
16538 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16539 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16540
16541 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16542
16543 * configure.srv (arm*-*-mingw32ce*): Move near the other
16544 arm targets.
16545
16546 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16547
16548 * configure.ac: Add errno checking.
16549 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16550 sys/file.h and malloc.h.
16551 (AC_CHECK_DECLS): Add perror.
16552 (srv_mingwce): Handle.
16553 * configure.srv (i[34567]86-*-cygwin*): Add
16554 win32-i386-low.o to srv_tgtobj.
16555 (i[34567]86-*-mingw*): Likewise.
16556 (arm*-*-mingw32ce*): Add case.
16557 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16558 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16559 [__MINGW32CE__] (strerror): New function.
16560 [__MINGW32CE__] (errno): Define to GetLastError.
16561 [__MINGW32CE__] (COUNTOF): New macro.
16562 (remote_open): Remove extra close call.
16563 * mem-break.c (delete_breakpoint_at): New function.
16564 * mem-break.h (delete_breakpoint_at): Declare.
16565 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16566 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16567 [USE_WIN32API] (read, write): Add char* casts.
16568 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16569 * server.h: Include wincecompat.h on Windows CE.
16570 [HAVE_ERRNO_H]: Check.
16571 (perror): Declare if not declared.
16572 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16573 (perror_with_name): Remove errno declaration.
16574 * wincecompat.h: New.
16575 * wincecompat.c: New.
16576 * win32-low.h: New.
16577 * win32-arm-low.c: New.
16578 * win32-i386-low.c: New.
16579 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16580 (OUTMSG2): Make it safe.
16581 (_T): New macro.
16582 (COUNTOF): New macro.
16583 (NUM_REGS): Get it from the low target.
16584 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16585 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16586 (thread_rec): Let low target handle debug registers.
16587 (child_add_thread): Likewise.
16588 (child_init_thread_list): Likewise.
16589 (continue_one_thread): Likewise.
16590 (regptr): New.
16591 (do_child_fetch_inferior_registers): Move to ...
16592 * win32-i386-low.c: ... here, and rename to ...
16593 (do_fetch_inferior_registers): ... this.
16594 * win32-low.c (child_fetch_inferior_registers):
16595 Go through the low target.
16596 (do_child_store_inferior_registers): Use regptr.
16597 (strwinerror): New function.
16598 (win32_create_inferior): Handle Windows CE.
16599 Use strwinerror instead of strerror on Windows error
16600 codes. Add program to the error output.
16601 Don't close the main thread handle on Windows CE.
16602 (win32_attach): Use coredll.dll on Windows CE.
16603 (win32_kill): Close current process and current
16604 thread handles.
16605 (win32_detach): Use coredll.dll on Windows CE.
16606 (win32_resume): Let low target handle debug registers, and
16607 step request.
16608 (handle_exception): Add/Remove initial breakpoint. Avoid
16609 non-existant WSTOPSIG on Windows CE.
16610 (win32_read_inferior_memory): Cast to remove warning.
16611 (win32_arch_string): Go through the low target.
16612 (initialize_low): Call set_breakpoint_data with the low
16613 target's breakpoint.
16614 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16615 FOP_REGNUM, mappings): Move to ...
16616 * win32-i386-low.c: ... here.
16617 * win32-low.c (win32_thread_info): Move to ...
16618 * win32-low.h: ... here.
16619 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16620 win32-arm-low.c and wincecompat.c.
16621 (all:): Add $EXEEXT.
16622 (install-only:): Likewise.
16623 (gdbserver:): Likewise.
16624 (gdbreplay:): Likewise.
16625 * config.in: Regenerate.
16626 * configure: Regenerate.
16627
16628 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16629
16630 * win32-low.c: Rename typedef thread_info to
16631 win32_thread_info throughout.
16632
16633 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16634
16635 * win32-i386-low.c: Rename to ...
16636 * win32-low.c: ... this.
16637 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16638 * Makefile.in: Likewise.
16639
16640 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16641
16642 * remote-utils.c (monitor_output): Constify msg parameter.
16643 * server.h (monitor_output): Likewise.
16644 * win32-i386-low.c (handle_output_debug_string): New.
16645 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16646 handle_output_debug_string.
16647 (get_child_debug_event): Likewise.
16648
16649 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16650
16651 * server.c (main): Correct strtoul check.
16652
16653 2007-03-27 Jon Ringle <jon@ringle.org>
16654
16655 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16656
16657 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16658
16659 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16660
16661 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16662
16663 * terminal.h: Check HAVE_SGTTY_H.
16664
16665 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16666
16667 * remote-utils.c (remote_open): Print out the assigned port number.
16668
16669 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * remote-utils.c (monitor_output): New function.
16672 * server.c (debug_threads): Define here.
16673 (monitor_show_help): New function.
16674 (handle_query): Handle qRcmd.
16675 (main): Do not handle 'd' packet.
16676 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16677 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16678 of debug_threads.
16679
16680 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16681
16682 * Makefile.in (EXEEXT): New.
16683 (clean): Use $(EXEEXT).
16684
16685 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16686
16687 * target.h (target_ops): Rename send_signal to request_interrupt,
16688 and remove enum target_signal parameter.
16689 * linux-low.c (linux_request_interrupt): Rename from
16690 linux_send_signal, and always send SIGINT.
16691 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16692 and always send SIGINT.
16693 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16694 of send_signal.
16695 (input_interrupt): Likewise.
16696
16697 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16698
16699 * server.c (get_features_xml): Check if target implemented
16700 arch_string.
16701 * win32-i386-low.c (win32_arch_string): New.
16702 (win32_target_ops): Add win32_arch_string as arch_string member.
16703
16704 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16705
16706 * spu-low.c (spu_arch_string): New.
16707 (spu_target_ops): Add spu_arch_string.
16708
16709 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16710
16711 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16712 * configure.ac: Do not check for terminal.h.
16713 * configure, config.in: Regenerated.
16714
16715 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16716
16717 * Makefile.in (OBS): Add $(XML_BUILTIN).
16718 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16719 (clean): Update.
16720 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16721 (arm-with-iwmmxt.c): New.
16722 * config.in, configure: Regenerate.
16723 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16724 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16725 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16726 (arm*-*-linux*): Add iWMMXt and regset support.
16727 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16728 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16729 (arm_store_wmmxregset, target_regsets): New.
16730 * server.c (get_features_xml): Take annex argument. Check builtin
16731 XML documents.
16732 (handle_query): Handle multiple annexes.
16733
16734 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16735
16736 * remote-utils.c [USE_WIN32API] (read, write): Define.
16737 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16738 write.
16739
16740 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * linux-i386-low.c (the_low_target): Set arch_string.
16743 * linux-x86-64-low.c (the_low_target): Likewise.
16744 * linux-low.c (linux_arch_string): New.
16745 (linux_target_ops): Add it.
16746 * linux-low.h (struct linux_target_ops): Add arch_string.
16747 * server.c (write_qxfer_response): Use const void * for DATA.
16748 (get_features_xml): New.
16749 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16750 * target.h (struct target_ops): Add arch_string method.
16751
16752 2007-01-03 Denis Pilat <denis.pilat@st.com>
16753 Daniel Jacobowitz <dan@codesourcery.com>
16754
16755 * linux-low.c (linux_kill): Handle being called with no threads.
16756 * win32-i386-low.c (win32_kill): Likewise.
16757 (get_child_debug_event): Clear current_process_handle.
16758
16759 2006-12-30 Denis PILAT <denis.pilat@st.com>
16760 Daniel Jacobowitz <dan@codesourcery.com>
16761
16762 * remote-utils.c (remote_open): Check the type of specified
16763 serial port devices before opening them.
16764 * server.c (main): Kill the inferior if an error occurs during
16765 the first remote_open.
16766
16767 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16768
16769 * README: Update supported targets.
16770
16771 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16772
16773 * Makefile.in (clean): Remove reg-mips64.c.
16774 (reg-mips64.c, reg-mips64.o): New rules.
16775 * configure.srv: Handle mips64. Include regset support for mips.
16776 * linux-mips-low.c (union mips_register): New.
16777 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16778 (mips_breakpoint, mips_breakpoint_at): Use int.
16779 (mips_collect_register, mips_supply_register)
16780 (mips_collect_register_32bit, mips_supply_register_32bit)
16781 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16782 (mips_store_fpregset, target_regsets): New.
16783 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16784
16785 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16786
16787 * configure.srv: Add target "spu*-*-*".
16788 * Makefile.in (clean): Remove reg-spu.c.
16789 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16790 * spu-low.c: New file.
16791
16792 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16793
16794 * configure.ac: Correct td_thr_tls_get_addr test.
16795 * configure: Regenerated.
16796
16797 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16798
16799 * linux-low.c (linux_wait_for_event): Reformat. Use the
16800 pass_signals array.
16801 * remote-utils.c (decode_address_to_semicolon): New.
16802 * server.c (pass_signals, handle_general_set): New.
16803 (handle_query): Mention QPassSignals for qSupported.
16804 (main): Call handle_general_set.
16805 * server.h (pass_signals, decode_address_to_semicolon): New.
16806
16807 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16808
16809 * server.c (handle_query): Correct error handling for read_auxv.
16810
16811 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16812
16813 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16814 and srv_linux_thread_db to yes.
16815 * linux-s390-low.c (s390_fill_gregset): New function.
16816 (target_regsets): Define data structure.
16817
16818 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16821 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16822 * config.in, configure: Regenerated.
16823 * inferiors.c (gdb_id_to_thread): New function.
16824 (gdb_id_to_thread_id): Use it.
16825 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16826 * linux-low.h (struct process_info): Add th member.
16827 (thread_db_get_tls_address): New prototype.
16828 * remote-utils.c (decode_address): Make non-static.
16829 * server.c (handle_query): Handle qGetTLSAddr.
16830 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16831 * target.h (struct target_ops): Add get_tls_address.
16832 * thread-db.c (maybe_attach_thread): Save the thread handle.
16833 (thread_db_get_tls_address): New.
16834
16835 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16836
16837 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16838 (linux_resume_one_process): Take a siginfo_t *. Update all
16839 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16840 (struct pending_signals): Add a siginfo_t.
16841 (linux_wait_for_process): Always set last_status.
16842 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16843 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16844 * linux-low.h (struct process_info): Add last_status.
16845
16846 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16847
16848 * remote-utils.c (try_rle): New function.
16849 (putpkt_binary): Use it.
16850
16851 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16852
16853 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16854 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16855 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16856 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16857 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16858 point registers.
16859
16860 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16861
16862 * server.c (terminal_fd): New variable.
16863 (old_foreground_pgrp): Likewise.
16864 (restore_old_foreground_pgrp): New function.
16865 (start_inferior): Record the terminal file descriptor in terminal_fd
16866 and its original foreground group in old_foreground_pgrp. Register
16867 restore_old_foreground_pgrp with atexit().
16868
16869 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16870
16871 * server.c (handle_query): Correct qPart to qXfer.
16872
16873 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * configure.ac: Check for more headers which are missing on
16876 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16877 * configure.srv: Add Cygwin and mingw32.
16878 * remote-utils.c: Don't include headers unconditionally which
16879 are missing on mingw32. Include <winsock.h> for mingw32.
16880 (remote_open): Adjust for mingw32 support. Flush
16881 standard error after writing to it.
16882 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16883 (unblock_async_io, enable_async_io, disable_async_io)
16884 (readchar, getpkt): Update for Winsock support.
16885 (prepare_resume_reply): Expect a protocol signal number.
16886 * server.c: Disable <sys/wait.h> on mingw32.
16887 (start_inferior): Adjust for mingw32 support. Flush
16888 standard error after writing to it.
16889 (attach_inferior): Likewise. Use protocol signal
16890 numbers.
16891 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16892 and names.
16893 * win32-i386-low.c: New file.
16894 * Makefile.in (XM_CLIBS): Set.
16895 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16896 (win32-i386-low.o): New dependency rule.
16897 * linux-low.c (linux_wait): Use target signal numbers.
16898 * target.h (struct target_ops): Doc fix.
16899 * server.h (target_signal_to_name): New prototype.
16900 * gdbreplay.c: Don't include headers unconditionally which
16901 are missing on mingw32. Include <winsock.h> for mingw32.
16902 (remote_close, remote_open): Adjust for Winsock support.
16903 * configure, config.in: Regenerated.
16904
16905 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16906
16907 * server.c (decode_xfer_read, write_qxfer_response): New.
16908 (handle_query): Take a packet length argument. Handle
16909 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16910 the qSupported response.
16911 (main): Update call to handle_query.
16912
16913 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16914
16915 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16916 (putpkt_binary): Renamed from putpkt and adjusted for binary
16917 data.
16918 (putpkt): New wrapper for putpkt_binary.
16919 (readchar): Don't mask off the high bit.
16920 (decode_X_packet): New function.
16921 * server.c (main): Call putpkt_binary if a handler sets the packet
16922 length. Save the length of the incoming packet. Handle 'X'.
16923 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16924
16925 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16926
16927 * server.c (handle_query): Handle qSupported.
16928
16929 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16930
16931 * remote-utils.c (all_symbols_looked_up): New variable.
16932 (look_up_one_symbol): Check it.
16933 * server.h (look_up_one_symbol): New declaration.
16934 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16935
16936 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16937
16938 * Makefile.in (linux-arm-low.o): Update dependencies.
16939 * linux-arm-low.c: Include "gdb_proc_service.h".
16940 (PTRACE_GET_THREAD_AREA): Define.
16941 (ps_get_thread_area): New function.
16942
16943 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16944
16945 * configure.srv (m68k*-*-uclinux*): New target.
16946 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16947 (linux_resume_one_process): Remove extraneous cast.
16948 (linux_read_offsets): New.
16949 (linux_target_op): Add linux_read_offsets on mmuless systems.
16950 * server.c (handle_query): Add qOffsets logic.
16951 * target.h (struct target_ops): Add read_offsets.
16952
16953 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16954
16955 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16956 (PTRACE_GET_THREAD_AREA): Define.
16957 (ps_get_thread_area): New function.
16958 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16959 (linux-x86-64-low.o): Update.
16960
16961 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16962
16963 * configure.ac: Remove checks for prfpregset_t.
16964 * gdb_proc_service.h: New file.
16965 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16966 new "gdb_proc_service.h".
16967 * proc-service.c: Likewise.
16968 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16969 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16970 * Makefile.in (gdb_proc_service_h): Updated.
16971 * configure, config.in: Regenerated.
16972
16973 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16974
16975 * remote-utils.c (prepare_resume_reply): Move declaration
16976 of gdb_id_from_wait to the top of the block.
16977
16978 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16979
16980 * linux-low.c (regsets_store_inferior_registers): Read the regset
16981 from the target before filling it.
16982
16983 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16984
16985 * server.c (attach_inferior): Return SIGTRAP for a successful
16986 attach.
16987
16988 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16989
16990 * Makefile.in (OBS): Add version.o.
16991 (STAGESTUFF): Delete.
16992 (version.o): Add dependencies.
16993 (version.c): Replace rule.
16994 (clean): Remove version.c.
16995 * server.c (gdbserver_version): New.
16996 (gdbserver_usage): Use printf.
16997 (main): Handle --version and --help.
16998 * server.h (version, host_name): Add declarations.
16999
17000 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17001
17002 * linux-arm-low.c:
17003 * linux-arm-low.c:
17004 * inferiors.c:
17005 * i387-fp.h:
17006 * i387-fp.c:
17007 * gdbreplay.c:
17008 * regcache.c:
17009 * proc-service.c:
17010 * mem-break.h:
17011 * mem-break.c:
17012 * linux-x86-64-low.c:
17013 * linux-sh-low.c:
17014 * linux-s390-low.c:
17015 * linux-ppc64-low.c:
17016 * linux-ppc-low.c:
17017 * linux-mips-low.c:
17018 * linux-m68k-low.c:
17019 * linux-m32r-low.c:
17020 * linux-low.h:
17021 * linux-low.c:
17022 * linux-ia64-low.c:
17023 * linux-i386-low.c:
17024 * linux-crisv32-low.c:
17025 * thread-db.c:
17026 * terminal.h:
17027 * target.h:
17028 * target.c:
17029 * server.h:
17030 * server.c:
17031 * remote-utils.c:
17032 * regcache.h:
17033 * utils.c:
17034 * Makefile.in:
17035 * configure.ac:
17036 * gdbserver.1: Add (C) after Copyright. Update the FSF
17037 address.
17038
17039 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17040
17041 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17042 (arm_breakpoint_at): Recognize both breakpoints.
17043 (the_low_target): Use the correct breakpoint instruction.
17044
17045 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17046
17047 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17048 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17049 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17050 (the_low_target): Update.
17051
17052 2005-10-25 Andreas Schwab <schwab@suse.de>
17053
17054 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17055
17056 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17057 (ia64_num_regs): Reduce to 462.
17058
17059 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17060
17061 * acinclude.m4: Correct quoting.
17062 * aclocal.m4: Regenerated.
17063
17064 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17065 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17066 (thread_db_init): Call thread_db_err_str.
17067 * configure.ac: Check for TD_VERSION.
17068 * config.in, configure: Regenerated.
17069
17070 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17071
17072 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17073
17074 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17075
17076 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17077 is not available. Define HAVE_PTRACE_GETREGS if it is.
17078 * config.in, configure: Regenerated.
17079 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17080 * linux-i386-low.c, linux-m68k-low.c: Update to use
17081 HAVE_PTRACE_GETREGS.
17082 * linux-low.c (regsets_fetch_inferior_registers)
17083 (regsets_store_inferior_registers): Only return 0 if we processed
17084 GENERAL_REGS.
17085 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17086 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17087
17088 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17089
17090 * inferiors.c (struct thread_info): Add gdb_id.
17091 (add_thread): Add gdb_id argument.
17092 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17093 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17094 calls to add_thread.
17095 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17096 * server.c (handle_query): Use thread_to_gdb_id.
17097 (handle_v_cont, main): Use gdb_id_to_thread_id.
17098 * server.h (add_thread): Update prototype.
17099 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17100 prototypes.
17101
17102 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17103
17104 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17105 left-padded registers.
17106 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17107 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17108
17109 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17110
17111 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17112 * configure: Regenerate.
17113 * config.in: Regenerate.
17114 * server.h (NEED_DECLARATION_STRERROR):
17115 Replace with !HAVE_DECL_STRERROR.
17116
17117 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17118
17119 * linux-low.c (linux_wait, linux_send_signal): Don't test
17120 an unsigned long variable for > 0 if it could be MAX_ULONG.
17121 * server.c (myresume): Likewise.
17122 * target.c (set_desired_inferior): Likewise.
17123
17124 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17125
17126 * configure.ac: Simplify and improve check for socklen_t.
17127 * configure, config.in: Regenerate.
17128
17129 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17130
17131 * acconfig.h: Remove.
17132 * configure.ac: Add a test for socklen_t. Use three-argument
17133 AC_DEFINE throughout.
17134 * config.in: Regenerated using autoheader 2.59.
17135 * configure: Regenerated.
17136
17137 * gdbreplay.c (socklen_t): Provide a default.
17138 (remote_open): Use socklen_t.
17139 * remote-utils.c (socklen_t): Provide a default.
17140 (remote_open): Use socklen_t.
17141 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17142 unsigned char.
17143
17144 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17145 char for buffers.
17146 * linux-low.c (linux_read_memory, linux_write_memory)
17147 (linux_read_auxv): Likewise.
17148 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17149 (check_mem_write): Likewise.
17150 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17151 Likewise.
17152 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17153 (registers_from_string, register_data): Likewise.
17154 * server.c (handle_query, main): Likewise.
17155 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17156 (decode_M_packet): Likewise.
17157 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17158 * target.h (struct target_ops): Update read_memory, write_memory,
17159 and read_auxv.
17160 (read_inferior_memory, write_inferior_memory): Update.
17161 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17162 to unsigned char *.
17163 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17164 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17165 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17166 linux-s390-low.c, linux-sh-low.c: Update for changes in
17167 read_inferior_memory and the_low_target->breakpoint.
17168
17169 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17170
17171 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17172 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17173 * configure.srv: Add powerpc64-*-linux*.
17174 * linux-ppc64-low.c: New file.
17175
17176 2005-05-23 Orjan Friberg <orjanf@axis.com>
17177
17178 * linux-cris-low.c: New file with support for CRIS.
17179 * linux-crisv32-low.c: Ditto for CRISv32.
17180 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17181 (clean): Add reg-cris.c and reg-crisv32.c.
17182 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17183 reg-crisv32.o, and reg-crisv32.c to make rules.
17184 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17185 recognized targets.
17186
17187 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17188
17189 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17190 of sizeof (PTRACE_XFER_TYPE).
17191 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17192
17193 2005-05-12 Orjan Friberg <orjanf@axis.com>
17194
17195 * target.h (struct target_ops): Add insert_watchpoint,
17196 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17197 pointers for hardware watchpoint support.
17198 * linux-low.h (struct linux_target_ops): Ditto.
17199 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17200 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17201 to linux_target_ops.
17202 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17203 reply packet.
17204 * server.c (main): Recognize 'Z' and 'z' packets.
17205
17206 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17207
17208 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17209 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17210 (the_low_target): Add new members.
17211
17212 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17213
17214 * proc-service.c (ps_lgetregs): Search all_processes instead of
17215 all_threads.
17216
17217 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17218
17219 * server.c (start_inferior): Change return type to int.
17220 (attach_inferior): Change sigptr to int *.
17221 (handle_v_cont, handle_v_requests): Change signal to int *.
17222 (main): Change signal to int.
17223
17224 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17225
17226 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17227 * configure.srv: Add m32r*-*-linux*.
17228 * linux-m32r-low.c: New file.
17229
17230 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17231
17232 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17233
17234 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17235
17236 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17237 Take unsigned long arguments for PIDs.
17238 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17239 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17240 (wait_for_sigstop, linux_resume_one_process)
17241 (regsets_fetch_inferior_registers, linux_send_signal)
17242 (linux_read_auxv): Likewise. Update the types of variables holding
17243 PIDs. Update format string specifiers.
17244 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17245 * remote-utils.c (prepare_resume_reply): Likewise.
17246 * server.c (cont_thread, general_thread, step_thread)
17247 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17248 unsigned long.
17249 (handle_query): Update format specifiers.
17250 (handle_v_cont, main): Use strtoul for thread IDs.
17251 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17252 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17253 (general_thread, step_thread, thread_from_wait)
17254 (old_thread_from_wait): Update.
17255 * target.h (struct thread_resume): Use unsigned long for THREAD.
17256 (struct target_ops): Use unsigned long for arguments to attach and
17257 thread_alive.
17258
17259 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17260
17261 * acinclude.m4: Include bfd/bfd.m4 directly.
17262 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17263 <agriffis@toolchain.org>.
17264 * aclocal.m4, configure: Regenerated.
17265
17266 2005-01-07 Andrew Cagney <cagney@gnu.org>
17267
17268 * configure.ac: Rename configure.in, require autoconf 2.59.
17269 * configure: Re-generate.
17270
17271 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17272
17273 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17274 LIBS when finished.
17275 * aclocal.m4: Regenerated.
17276 * configure: Regenerated.
17277
17278 2004-11-21 Andreas Schwab <schwab@suse.de>
17279
17280 * linux-m68k-low.c (m68k_num_gregs): Define.
17281 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17282 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17283 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17284 (m68k_breakpoint_at): New. Add to the_low_target.
17285
17286 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17287 srv_linux_thread_db to yes.
17288
17289 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17290
17291 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17292 (ARCH_SET_FS): Likewise.
17293 (ARCH_GET_FS): Likewise.
17294 (ARCH_GET_GS): Likewise.
17295
17296 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17297
17298 * linux-i386-low.c (ps_get_thread_area): New.
17299 * linux-x86-64-low.c (ps_get_thread_area): New.
17300 * linux-low.c: Include <sys/syscall.h>.
17301 (linux_kill_one_process): Don't kill the first thread here.
17302 (linux_kill): Kill the first thread here.
17303 (kill_lwp): New function.
17304 (send_sigstop, linux_send_signal): Use it.
17305 * proc-service.c: Clean up #ifdefs.
17306 (fpregset_info): Delete.
17307 (ps_lgetregs): Update and enable implementation.
17308 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17309 implementations.
17310 * remote-utils.c (struct sym_cache, symbol_cache): New.
17311 (input_interrupt): Print a clearer message.
17312 (async_io_enabled): New variable.
17313 (enable_async_io, disable_async_io): Use it. Update comments.
17314 (look_up_one_symbol): Use the symbol cache.
17315 * thread-db.c (thread_db_look_up_symbols): New function.
17316 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17317
17318 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17319
17320 * configure.in: Test for -rdynamic.
17321 * configure: Regenerated.
17322 * Makefile (INTERNAL_LDFLAGS): New.
17323 (gdbserver, gdbreplay): Use it.
17324
17325 2004-09-02 Andrew Cagney <cagney@gnu.org>
17326
17327 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17328
17329 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17330
17331 * linux-low.c (linux_wait): Clear all_processes list also.
17332
17333 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17334
17335 * linux-low.c: Include <errno.h>. Remove extern declaration of
17336 errno.
17337
17338 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17339
17340 * gdbreplay.c, server.h, utils.c: Update copyright years.
17341
17342 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17343
17344 * server.c (main): Print child status or termination signal from
17345 variable 'signal', not 'sig'.
17346
17347 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17348
17349 * linux-low.c (linux_read_memory): Change return type to
17350 int. Check for and return error from ptrace().
17351 * target.c (read_inferior_memory): Change return type to int. Pass
17352 back return status from the_target->read_memory().
17353 * target.h (struct target_ops): Adapt *read_memory() prototype.
17354 Update comment.
17355 (read_inferior_memory): Adapt prototype.
17356 * server.c (main): Return an error packet if
17357 read_inferior_memory() returns an error.
17358
17359 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17360
17361 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17362 Unify with other clean targets.
17363
17364 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17365
17366 * server.c (handle_v_cont): Call set_desired_inferior.
17367
17368 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17369
17370 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17371
17372 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17373
17374 * linux-low.c (linux_wait): Unblock async I/O.
17375 (linux_resume): Block and enable async I/O.
17376 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17377 * server.h (block_async_io, unblock_async_io): Add prototypes.
17378
17379 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17380
17381 * remote-utils.c (remote_open): Print a status notice after
17382 opening a TCP port.
17383 * server.c (attach_inferior): Print a status notice after
17384 attaching.
17385
17386 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17387
17388 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17389
17390 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17391
17392 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17393 error packet.
17394 * server.c, target.h: Update copyright years.
17395
17396 2004-02-25 Roland McGrath <roland@redhat.com>
17397
17398 * target.h (struct target_ops): New member `read_auxv'.
17399 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17400 * linux-low.c (linux_read_auxv): New function.
17401 (linux_target_ops): Initialize `read_auxv' member to that.
17402
17403 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17404
17405 Committed by Jim Blandy <jimb@redhat.com>.
17406
17407 * linux-s390-low.c (s390_num_regs): Update.
17408 (s390_regmap): Remove control registers. Use __s390x__ predefine
17409 instead of GPR_SIZE to distiguish s390 and s390x targets.
17410
17411 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17412
17413 * linux-low.c: Update copyright year.
17414 (check_removed_breakpoint): Clear pending_is_breakpoint.
17415 (linux_set_resume_request, linux_queue_one_thread)
17416 (resume_status_pending_p): New functions.
17417 (linux_continue_one_thread): Use process->resume.
17418 (linux_resume): Only resume threads if there are no pending events.
17419 * linux-low.h (struct process_info): Add resume request
17420 pointer.
17421
17422 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17423
17424 * regcache.c (new_register_cache): Clear the allocated register
17425 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17426
17427 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17428
17429 * linux-low.c (linux_resume): Take a struct thread_resume *
17430 argument.
17431 (linux_wait): Update call.
17432 (resume_ptr): New static variable.
17433 (linux_continue_one_thread): Renamed from
17434 linux_continue_one_process. Use resume_ptr.
17435 (linux_resume): Use linux_continue_one_thread.
17436 * server.c (handle_v_cont, handle_v_requests): New functions.
17437 (myresume): New function.
17438 (main): Handle 'v' case.
17439 * target.h (struct thread_resume): New type.
17440 (struct target_ops): Change argument of "resume" to struct
17441 thread_resume *.
17442 (myresume): Delete macro.
17443
17444 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17445
17446 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17447 (uninstall): Support DESTDIR.
17448
17449 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17450
17451 * configure.srv: Add xscale*linux copy of arm*linux entry.
17452
17453 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17454
17455 * linux-arm-low.c (arm_reinsert_addr): New function.
17456 (the_low_target): Add arm_reinsert_addr.
17457
17458 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17459
17460 * mem-break.c: Remove whitespace at end of file.
17461
17462 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17463
17464 * configure.in: Check whether we need to prototype strerror.
17465 * server.h: Optionally prototype strerror.
17466 * gdbreplay.c (perror_with_name): Use strerror.
17467 * linux-low.c (linux_attach_lwp): Use strerror.
17468 * utils.c (perror_with_name): Use strerror.
17469 * config.in, configure: Regenerated.
17470
17471 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17472
17473 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17474 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17475
17476 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17477
17478 * Makefile.in (SFILES): Update.
17479 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17480 low-sun3.c: Remove files.
17481
17482 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17483
17484 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17485 (linux_detach_one_process, linux_detach): New functions.
17486 (linux_target_ops): Add linux_detach.
17487 * server.c (main): Handle 'D' packet.
17488 * target.h (struct target_ops): Add "detach" member.
17489 (detach_inferior): Define.
17490
17491 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17492
17493 From Kelley Cook <kelleycook@wideopenwest.com>:
17494 * configure.srv: Accept i[34567]86 variants.
17495
17496 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17497
17498 * linux-low.c (linux_wait_for_event): Correct comment typos.
17499 (linux_resume_one_process): Call check_removed_breakpoint.
17500 (linux_send_signal): New function.
17501 (linux_target_ops): Add linux_send_signal.
17502 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17503 of kill.
17504 * target.h (struct target_ops): Add send_signal.
17505
17506 2003-05-29 Jim Blandy <jimb@redhat.com>
17507
17508 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17509 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17510 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17511 away part of the register's value.
17512
17513 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17514
17515 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17516 (linux_wait_for_event, linux_init_signals): Likewise.
17517
17518 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17519
17520 * configure.in: Check for stdlib.h.
17521 * configure: Regenerated.
17522 * config.in: Regenerated.
17523
17524 2003-01-04 Andreas Schwab <schwab@suse.de>
17525
17526 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17527
17528 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17529
17530 * Makefile.in: Remove obsolete code.
17531
17532 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17533
17534 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17535 defined(PT_FPR0_HI).
17536
17537 2002-11-17 Stuart Hughes <seh@zee2.com>
17538
17539 * linux-arm-low.c (arm_num_regs): Increase.
17540 (arm_regmap): Include status register.
17541
17542 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17543
17544 * linux-low.c (register_addr): Remove incorrect -1 check.
17545
17546 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17547
17548 * linux-low.c (linux_create_inferior): Call setpgid. Return
17549 the new PID.
17550 (unstopped_p, linux_signal_pid): Remove.
17551 (linux_target_ops): Remove linux_signal_pid.
17552 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17553 global instead of target method.
17554 * target.h (struct target_ops): Remove signal_pid. Update comment
17555 for create_inferior.
17556 * server.c (signal_pid): New variable.
17557 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17558 gdbserver. Set the child to be the foreground process group.
17559 (attach_inferior): Set signal_pid.
17560
17561 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17562
17563 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17564
17565 2002-08-20 Jim Blandy <jimb@redhat.com>
17566
17567 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17568 default for this.
17569
17570 2002-08-01 Andrew Cagney <cagney@redhat.com>
17571
17572 * Makefile.in: Make chill references obsolete.
17573
17574 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17575
17576 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17577 * configure: Regenerate.
17578 * config.in: Regenerate.
17579
17580 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17581
17582 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17583 (perror_with_name, remote_close, remote_open, expect, play): Static.
17584
17585 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17586
17587 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17588 byte offsets instead of an array of indexes.
17589 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17590
17591 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17592
17593 * regcache.c: Add comment.
17594
17595 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17596
17597 * thread-db.c: New file.
17598 * proc-service.c: New file.
17599 * acinclude.m4: New file.
17600 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17601 proc-service.o, and thread-db.o.
17602 (linux-low.o): Add USE_THREAD_DB.
17603 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17604 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17605 * aclocal.m4: Regenerated.
17606 * config.in: Regenerated.
17607 * configure: Regenerated.
17608 * configure.in: Check for proc_service.h, sys/procfs.h,
17609 thread_db.h, and linux/elf.h headrs.
17610 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17611 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17612 Check for -lthread_db and thread support.
17613 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17614 PowerPC, and SuperH.
17615 * i387-fp.c: Constify arguments.
17616 * i387-fp.h: Likewise.
17617 * inferiors.c: (struct thread_info): Renamed from
17618 `struct inferior_info'. Remove PID member. Use generic inferior
17619 list header. All uses updated.
17620 (inferiors, signal_pid): Removed.
17621 (all_threads): New variable.
17622 (get_thread): Define.
17623 (add_inferior_to_list): New function.
17624 (for_each_inferior): New function.
17625 (change_inferior_id): New function.
17626 (add_inferior): Removed.
17627 (remove_inferior): New function.
17628 (add_thread): New function.
17629 (free_one_thread): New function.
17630 (remove_thread): New function.
17631 (clear_inferiors): Use for_each_inferior and free_one_thread.
17632 (find_inferior): New function.
17633 (find_inferior_id): New function.
17634 (inferior_target_data): Update argument type.
17635 (set_inferior_target_data): Likewise.
17636 (inferior_regcache_data): Likewise.
17637 (set_inferior_regcache_data): Likewise.
17638 * linux-low.c (linux_bp_reinsert): Remove.
17639 (all_processes, stopping_threads, using_thrads)
17640 (struct pending_signals, debug_threads, pid_of): New.
17641 (inferior_pid): Replace with macro.
17642 (struct inferior_linux_data): Remove.
17643 (get_stop_pc, add_process): New functions.
17644 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17645 Use add_process and add_thread.
17646 (linux_attach_lwp): New function, based on old linux_attach. Use
17647 add_process and add_thread. Set stop_expected for new threads.
17648 (linux_attach): New function.
17649 (linux_kill_one_process): New function.
17650 (linux_kill): Kill all LWPs.
17651 (linux_thread_alive): Use find_inferior_id.
17652 (check_removed_breakpoints, status_pending_p): New functions.
17653 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17654 Update. Use WNOHANG. Wait for cloned processes also. Update process
17655 struct for the found process.
17656 (linux_wait_for_event): New function.
17657 (linux_wait): Use it. Support LWPs.
17658 (send_sigstop, wait_for_sigstop, stop_all_processes)
17659 (linux_resume_one_process, linux_continue_one_process): New functions.
17660 (linux_resume): Support LWPs.
17661 (REGISTER_RAW_SIZE): Remove.
17662 (fetch_register): Use register_size instead. Call supply_register.
17663 (usr_store_inferior_registers): Likewise. Call collect_register.
17664 Fix recursive case.
17665 (regsets_fetch_inferior_registers): Improve error message.
17666 (regsets_store_inferior_registers): Add debugging.
17667 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17668 (unstopped_p, linux_signal_pid): New functions.
17669 (linux_target_ops): Add linux_signal_pid.
17670 (linux_init_signals): New function.
17671 (initialize_low): Call it. Initialize using_threads.
17672 * regcache.c (inferior_regcache_data): Add valid
17673 flag.
17674 (get_regcache): Fetch registers lazily. Add fetch argument
17675 and update all callers.
17676 (regcache_invalidate_one, regcache_invalidate): New
17677 functions.
17678 (new_register_cache): Renamed from create_register_cache.
17679 Return the new regcache.
17680 (free_register_cache): Change argument to a void *.
17681 (registers_to_string, registers_from_string): Call get_regcache
17682 with fetch flag set.
17683 (register_data): Make static. Pass fetch flag to get_regcache.
17684 (supply_register): Call get_regcache with fetch flag clear.
17685 (collect_register): Call get_regcache with fetch flag set.
17686 (collect_register_as_string): New function.
17687 * regcache.h: Update.
17688 * remote-utils.c (putpkt): Flush after debug output and use
17689 stderr.
17690 Handle input interrupts while waiting for an ACK.
17691 (input_interrupt): Use signal_pid method.
17692 (getpkt): Flush after debug output and use stderr.
17693 (outreg): Use collect_register_as_string.
17694 (new_thread_notify, dead_thread_notify): New functions.
17695 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17696 and general_thread.
17697 (look_up_one_symbol): Flush after debug output.
17698 * server.c (step_thread, server_waiting): New variables.
17699 (start_inferior): Don't use signal_pid. Update call to mywait.
17700 (attach_inferior): Update call to mywait.
17701 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17702 (main): Don't fetch/store registers explicitly. Use
17703 set_desired_inferior. Support proposed ``Hs'' packet. Update
17704 calls to mywait.
17705 * server.h: Update.
17706 (struct inferior_list, struct_inferior_list_entry): New.
17707 * target.c (set_desired_inferior): New.
17708 (write_inferior_memory): Constify.
17709 (mywait): New function.
17710 * target.h: Update.
17711 (struct target_ops): New signal_pid method.
17712 (mywait): Removed macro, added prototype.
17713
17714 * linux-low.h (regset_func): Removed.
17715 (regset_fill_func, regset_store_func): New.
17716 (enum regset_type): New.
17717 (struct regset_info): Add type field. Use new operation types.
17718 (struct linux_target_ops): stop_pc renamed to get_pc.
17719 Add decr_pc_after_break and breakpoint_at.
17720 (get_process, get_thread_proess, get_process_thread)
17721 (strut process_info, all_processes, linux_attach_lwp)
17722 (thread_db_init): New.
17723
17724 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17725 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17726 (the_low_target): Add new members.
17727 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17728 (i386_store_fpxregset): Constify.
17729 (target_regsets): Add new kind identifier.
17730 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17731 (i386_set_pc): Add debugging.
17732 (i386_breakpoint_at): New function.
17733 (the_low_target): Add new members.
17734 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17735 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17736 (mips_breakpoint_at): New.
17737 (the_low_target): Add new members.
17738 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17739 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17740 (the_low_target): Add new members.
17741 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17742 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17743 (the_low_target): Add new members.
17744 * linux-x86-64-low.c (target_regsets): Add new kind
17745 identifier.
17746
17747 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17748
17749 From Martin Pool <mbp@samba.org>:
17750 * server.c (gdbserver_usage): New function.
17751 (main): Call it.
17752
17753 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17754
17755 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17756 stop_at -> stop_pc.
17757
17758 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17759
17760 * Makefile.in: Remove obsolete code.
17761
17762 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17763
17764 * linux-low.c (regsets_fetch_inferior_registers),
17765 (regsets_store_inferior_registers): Removed cast to int from
17766 ptrace() calls.
17767 * regcache.h: Added declaration of struct inferior_info.
17768
17769 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17770
17771 * inferiors.c (struct inferior_info): Add regcache_data.
17772 (add_inferior): Call create_register_cache.
17773 (clear_inferiors): Call free_register_cache.
17774 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17775 * regcache.c (struct inferior_regcache_data): New.
17776 (registers): Remove.
17777 (get_regcache): New function.
17778 (create_register_cache, free_register_cache): New functions.
17779 (set_register_cache): Don't initialize the register cache here.
17780 (registers_to_string, registers_from_string, register_data): Call
17781 get_regcache.
17782 * regcache.h: Add prototypes.
17783 * server.h: Likewise.
17784
17785 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17786
17787 * mem-break.c: New file.
17788 * mem-break.h: New file.
17789 * Makefile.in: Add mem-break.o rule; update server.h
17790 dependencies.
17791 * inferiors.c (struct inferior_info): Add target_data
17792 member.
17793 (clear_inferiors): Free target_data member if set.
17794 (inferior_target_data, set_inferior_target_data): New functions.
17795 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17796 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17797 * linux-low.c (linux_bp_reinsert): New variable.
17798 (struct inferior_linux_data): New.
17799 (linux_create_inferior): Use set_inferior_target_data.
17800 (linux_attach): Likewise. Call add_inferior.
17801 (linux_wait_for_one_inferior): New function.
17802 (linux_wait): Call it.
17803 (linux_write_memory): Add const.
17804 (initialize_low): Call set_breakpoint_data.
17805 * linux-low.h (struct linux_target_ops): Add breakpoint
17806 handling members.
17807 * server.c (attach_inferior): Remove extra add_inferior
17808 call.
17809 * server.h: Include mem-break.h. Update inferior.c
17810 prototypes.
17811 * target.c (read_inferior_memory)
17812 (write_inferior_memory): New functions.
17813 * target.h (read_inferior_memory)
17814 (write_inferior_memory): Change macros to prototypes.
17815 (struct target_ops): Update comments. Add const to write_memory
17816 definition.
17817
17818 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17819
17820 * linux-low.c (usr_store_inferior_registers): Support
17821 registers which are allowed to fail to store.
17822 * linux-low.h (linux_target_ops): Likewise.
17823 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17824 (ppc_cannot_store_register): FPSCR may not be storable.
17825
17826 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17827
17828 * server.h: Include <string.h> if HAVE_STRING_H.
17829 * ChangeLog: Correct paths in last ChangeLog entry.
17830
17831 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17832
17833 * linux-low.h: Remove obsolete prototypes.
17834 (struct linux_target_ops): New.
17835 (extern the_low_target): New.
17836 * linux-low.c (num_regs, regmap): Remove declarations.
17837 (register_addr): Use the_low_target explicitly.
17838 (fetch_register): Likewise.
17839 (usr_fetch_inferior_registers): Likewise.
17840 (usr_store_inferior_registers): Likewise.
17841 * linux-arm-low.c (num_regs): Remove.
17842 (arm_num_regs): Define.
17843 (arm_regmap): Renamed from regmap, made static.
17844 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17845 made static.
17846 (arm_cannot_store_register): Renamed from cannot_store_register,
17847 made static.
17848 (the_low_target): New.
17849 * linux-i386-low.c (num_regs): Remove.
17850 (i386_num_regs): Define.
17851 (i386_regmap): Renamed from regmap, made static.
17852 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17853 made static.
17854 (i386_cannot_store_register): Renamed from cannot_store_register,
17855 made static.
17856 (the_low_target): New.
17857 * linux-ia64-low.c (num_regs): Remove.
17858 (ia64_num_regs): Define.
17859 (ia64_regmap): Renamed from regmap, made static.
17860 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17861 made static.
17862 (ia64_cannot_store_register): Renamed from cannot_store_register,
17863 made static.
17864 (the_low_target): New.
17865 * linux-m68k-low.c (num_regs): Remove.
17866 (m68k_num_regs): Define.
17867 (m68k_regmap): Renamed from regmap, made static.
17868 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17869 made static.
17870 (m68k_cannot_store_register): Renamed from cannot_store_register,
17871 made static.
17872 (the_low_target): New.
17873 * linux-mips-low.c (num_regs): Remove.
17874 (mips_num_regs): Define.
17875 (mips_regmap): Renamed from regmap, made static.
17876 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17877 made static.
17878 (mips_cannot_store_register): Renamed from cannot_store_register,
17879 made static.
17880 (the_low_target): New.
17881 * linux-ppc-low.c (num_regs): Remove.
17882 (ppc_num_regs): Define.
17883 (ppc_regmap): Renamed from regmap, made static.
17884 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17885 made static.
17886 (ppc_cannot_store_register): Renamed from cannot_store_register,
17887 made static.
17888 (the_low_target): New.
17889 * linux-s390-low.c (num_regs): Remove.
17890 (s390_num_regs): Define.
17891 (s390_regmap): Renamed from regmap, made static.
17892 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17893 made static.
17894 (s390_cannot_store_register): Renamed from cannot_store_register,
17895 made static.
17896 (the_low_target): New.
17897 * linux-sh-low.c (num_regs): Remove.
17898 (sh_num_regs): Define.
17899 (sh_regmap): Renamed from regmap, made static.
17900 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17901 made static.
17902 (sh_cannot_store_register): Renamed from cannot_store_register,
17903 made static.
17904 (the_low_target): New.
17905 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17906 (the_low_target): New.
17907
17908 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17909
17910 * Makefile.in: Add stamp-h target.
17911 * configure.in: Create stamp-h.
17912 * configure: Regenerated.
17913
17914 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17915
17916 * inferiors.c: New file.
17917 * target.c: New file.
17918 * target.h: New file.
17919 * Makefile.in: Add target.o and inferiors.o. Update
17920 dependencies.
17921 * linux-low.c (inferior_pid): New static variable,
17922 moved from server.c.
17923 (linux_create_inferior): Renamed from create_inferior.
17924 Call add_inferior. Return 0 on success instead of a PID.
17925 (linux_attach): Renamed from myattach.
17926 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17927 (linux_thread_alive): Renamed from mythread_alive.
17928 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17929 child dies.
17930 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17931 (regsets_store_inferior_registers): Correct error message.
17932 Add missing ``return 0''.
17933 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17934 (linux_store_registers): Renamed from store_inferior_registers.
17935 (linux_read_memory): Renamed from read_inferior_memory.
17936 (linux_write_memory): Renamed from write_inferior_memory.
17937 (linux_target_ops): New structure.
17938 (initialize_low): Call set_target_ops ().
17939 * remote-utils.c (unhexify): New function.
17940 (hexify): New function.
17941 (input_interrupt): Send signals to ``signal_pid''.
17942 * server.c (inferior_pid): Remove.
17943 (start_inferior): Update create_inferior call.
17944 (attach_inferior): Call add_inferior.
17945 (handle_query): New function.
17946 (main): Call handle_query for `q' packets.
17947 * server.h: Include "target.h". Remove obsolete prototypes.
17948 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17949
17950 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17951
17952 * Makefile.in: Add WARN_CFLAGS. Update configury
17953 dependencies.
17954 * configure.in: Check for <string.h>
17955 * configure: Regenerate.
17956 * config.in: Regenerate.
17957 * gdbreplay.c: Include needed system headers.
17958 (remote_open): Remove strchr prototype.
17959 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17960 * regcache.c (supply_register): Change buf argument to const void *.
17961 (supply_register_by_name): Likewise.
17962 (collect_register): Change buf argument to void *.
17963 (collect_register_by_name): Likewise.
17964 * regcache.h: Add missing prototypes.
17965 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17966 * server.c (handle_query): New function.
17967 (attached): New static variable, moved out of main.
17968 (main): Quiet longjmp clobber warnings.
17969 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17970 * utils.c (error): Remove NORETURN.
17971 (fatal): Likewise.
This page took 0.403314 seconds and 5 git commands to generate.