gdbserver: include linux-arm-tdesc.h in linux-arm-tdesc.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4 * linux-arm-tdesc.h: Include arch/arm.h.
5
6 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
9
10 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
11
12 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
13 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
14
15 2020-01-10 Pedro Alves <palves@redhat.com>
16
17 * fork-child.c (post_fork_inferior): Pass target down to
18 startup_inferior.
19 * inferiors.c (switch_to_thread): Add process_stratum_target
20 parameter.
21 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
22 * nto-low.c (nto_target_ops): Now a process_stratum_target.
23 * linux-low.c (linux_target_ops): Now a process_stratum_target.
24 * remote-utils.c (prepare_resume_reply): Pass the target to
25 switch_to_thread.
26 * target.c (the_target): Now a process_stratum_target.
27 (done_accessing_memory): Pass the target to switch_to_thread.
28 (set_target_ops): Ajust to use process_stratum_target.
29 * target.h (struct target_ops): Rename to ...
30 (struct process_stratum_target): ... this.
31 (the_target, set_target_ops): Adjust.
32 (prepare_to_access_memory): Adjust comment.
33 * win32-low.c (child_xfer_memory): Adjust to use
34 process_stratum_target.
35 (win32_target_ops): Now a process_stratum_target.
36
37 2020-01-06 Eli Zaretskii <eliz@gnu.org>
38 Pedro Alves <palves@redhat.com>
39
40 * win32-low.c (get_child_debug_event): Extract the fatal exception
41 from the exit status and convert to the equivalent Posix signal
42 number.
43 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
44 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
45
46 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
47
48 * Makefile.in: Use INSTALL_PROGRAM_ENV.
49
50 2020-01-01 Joel Brobecker <brobecker@adacore.com>
51
52 * server.c (gdbserver_version): Change copyright year to 2020.
53 * gdbreplay.c (gdbreplay_version): Likewise.
54
55 2019-12-19 Christian Biesinger <cbiesinger@google.com>
56
57 * configure: Regenerate.
58 * configure.ac: Quote variable arguments of test.
59
60 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
61
62 * Makefile.in: Fix build with GNU Make 3.81
63
64 2019-12-16 Tom Tromey <tromey@adacore.com>
65
66 * server.c (get_exec_file): Constify result.
67
68 2019-12-10 Christian Biesinger <cbiesinger@google.com>
69
70 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
71 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
72 * config.in: Regenerate.
73 * configure: Regenerate.
74 * configure.ac: Don't check for strerror.
75 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
76 Call safe_strerror instead of strerror.
77 * server.h (strerror): Remove this now-unnecessary declaration.
78 * tracepoint.c (init_named_socket): Call safe_strerror instead of
79 strerror.
80 (gdb_agent_helper_thread): Likewise.
81 * utils.c (perror_with_name): Likewise.
82
83 2019-11-26 Tom Tromey <tom@tromey.com>
84
85 * configure, config.in: Rebuild.
86
87 2019-11-26 Tom Tromey <tom@tromey.com>
88
89 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
90 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
91 gdb_sigmask.
92 * configure, config.in: Rebuild.
93
94 2019-11-26 Tom Tromey <tom@tromey.com>
95
96 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
97 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
98 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
99 * acinclude.m4: Include ax_pthread.m4.
100 * config.in, configure: Rebuild.
101
102 2019-11-26 Christian Biesinger <cbiesinger@google.com>
103
104 * debug.c (debug_set_output): Call safe_strerror instead of
105 strerror.
106 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
107 (linux_kill_one_lwp): Likewise.
108 (linux_detach_one_lwp): Likewise.
109 (linux_wait_for_event_filtered): Likewise.
110 (store_register): Likewise.
111 * lynx-low.c (lynx_attach): Likewise.
112 * mem-break.c (insert_memory_breakpoint): Likewise.
113 (remove_memory_breakpoint): Likewise.
114 (delete_fast_tracepoint_jump): Likewise.
115 (set_fast_tracepoint_jump): Likewise.
116 (uninsert_fast_tracepoint_jumps_at): Likewise.
117 (reinsert_fast_tracepoint_jumps_at): Likewise.
118 * nto-low.c (nto_xfer_memory): Likewise.
119 (nto_resume): Likewise.
120
121 2019-11-20 Luis Machado <luis.machado@linaro.org>
122
123 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
124 instead of register count.
125 * tdesc.c (tdesc_contains_feature): New function.
126 * tdesc.h (tdesc_contains_feature): New prototype.
127
128 2019-11-15 Christian Biesinger <cbiesinger@google.com>
129
130 * Makefile.in: Add safe-strerror.c.
131 * configure: Regenerate.
132 * configure.ac: Don't source common.host.
133
134 2019-11-15 Christian Biesinger <cbiesinger@google.com>
135
136 * config.in: Regenerate.
137 * configure: Regenerate.
138
139 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
140
141 * ax.c (ax_printf): Handle size_t_arg.
142
143 2019-11-06 Christian Biesinger <cbiesinger@google.com>
144
145 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
146 * mi/mi-main.c (output_cores): Likewise.
147 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
148 (linux_xfer_osdata_modules): Likewise.
149 * remote.c (register_remote_support_xml): Likewise.
150 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
151 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
152
153 2019-11-01 Christian Biesinger <cbiesinger@google.com>
154
155 * configure: Regenerate.
156 * configure.ac: Remove check for strerror_r.
157
158 2019-10-31 Christian Biesinger <cbiesinger@google.com>
159
160 * config.in: Regenerate.
161 * configure: Regenerate.
162 * configure.ac: Also check for strerror_r.
163
164 2019-10-31 Christian Biesinger <cbiesinger@google.com>
165
166 * ax.h (debug_agent): Remove duplicate declaration.
167
168 2019-10-26 Tom de Vries <tdevries@suse.de>
169
170 * linux-aarch64-low.c: Fix typos in comments.
171 * linux-arm-low.c: Same.
172 * linux-low.c: Same.
173 * linux-ppc-low.c: Same.
174 * proc-service.c: Same.
175 * regcache.h: Same.
176 * server.c: Same.
177 * tracepoint.c: Same.
178 * win32-low.c: Same.
179
180 2019-10-25 Tom Tromey <tromey@adacore.com>
181
182 * utils.c (xstrdup): Remove.
183
184 2019-10-23 Tom Tromey <tom@tromey.com>
185
186 * configure, config.in: Rebuild.
187
188 2019-10-23 Tom Tromey <tom@tromey.com>
189
190 * configure: Rebuild.
191 * acinclude.m4: Use m4_include, not sinclude.
192
193 2019-10-17 Tom Tromey <tromey@adacore.com>
194
195 * configure: Rebuild.
196 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
197 in AC_CONFIG_FILES invocation.
198 * Makefile.in (stamp-h, Makefile): Use new-style config.status
199 invocation.
200
201 2019-10-16 Christian Biesinger <cbiesinger@google.com>
202
203 * server.c: Include xml-builtin.h.
204 (get_xml_features): Don't declare xml_builtins here.
205
206 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
207
208 * Makefile.in: Remove references to vec-ipa.o.
209
210 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
211
212 * Makefile.in: Remove references to vec.c.
213
214 2019-10-02 Christian Biesinger <cbiesinger@google.com>
215
216 * server.c (server_waiting): Change to bool.
217 (extended_protocol): Likewise.
218 (response_needed): Likewise.
219 (exit_requested): Likewise.
220 (run_once): Likewise.
221 (report_no_resumed): Likewise.
222 (non_stop): Likewise.
223 (disable_packet_vCont): Likewise.
224 (disable_packet_Tthread): Likewise.
225 (disable_packet_qC): Likewise.
226 (disable_packet_qfThreadInfo): Likewise.
227 (handle_general_set): Update.
228 (handle_detach): Update.
229 (handle_monitor_command): Update.
230 (handle_query): Update.
231 (captured_main): Update.
232 (process_serial_event): Update.
233 * server.h (server_waiting): Change to bool.
234 (disable_packet_vCont): Likewise.
235 (disable_packet_Tthread): Likewise.
236 (disable_packet_qC): Likewise.
237 (disable_packet_qfThreadInfo): Likewise.
238 (run_once): Likewise.
239 (non_stop): Likewise.
240 * target.c (target_stop_and_wait): Update.
241
242 2019-10-02 Tom Tromey <tromey@adacore.com>
243
244 * Makefile.in (SFILES): Add common-inferior.c.
245 (OBS): Add common-inferior.o.
246 * server.c (startup_with_shell): Don't define.
247
248 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
249
250 * linux-low.c (linux_low_read_btrace): Update for change to
251 std::vector.
252
253 2019-09-20 Christian Biesinger <cbiesinger@google.com>
254
255 * debug.c (debug_threads): Remove comment in favor of the header.
256 * debug.h (using_threads): Add declaration.
257 (debug_threads): Add comment.
258 * linux-aarch64-low.c: Include debug.h and remove declaration of
259 debug_threads.
260 * nto-low.c: Likewise.
261 * remote-utils.c: Likewise.
262 * thread-db.c: Likewise.
263
264 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
265
266 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
267 and powerpc-cell64l-ipa.o.
268 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
269 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
270 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
271 (spu*-*-*): Remove.
272
273 * spu-low.c: Remove file.
274
275 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
276 (parse_spufs_run): Remove.
277 (ppc_get_pc): Remove Cell/B.E. support.
278 (ppc_set_pc): Likewise.
279 (ppc_breakpoint_at): Likewise.
280 (ppc_arch_setup): Likewise.
281 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
282 tdesc_powerpc_cell32l.
283 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
284 or init_registers_powerpc_cell32l.
285 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
286 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
287 or init_registers_powerpc_cell32l.
288 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
289 (init_registers_powerpc_cell32l): Remove prototype.
290 (init_registers_powerpc_cell64l): Likewise.
291
292 * target.h (struct target_ops): Remove qxfer_spu member.
293 * server.c (handle_qxfer_spu): Remove.
294 (qxfer_packets): Remove entry for "spu".
295 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
296 * linux-low.c (SPUFS_MAGIC): Remove.
297 (spu_enumerate_spu_ids): Remove.
298 (linux_qxfer_spu): Remove.
299 (linux_target_ops): Remove qxfer_spu member.
300 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
301 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
302 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
303
304 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
305
306 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
307 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
308 * config.in: Regenerate.
309 * configure: Regenerate.
310
311 2019-08-15 Tom Tromey <tromey@adacore.com>
312
313 * target.c (target_write_memory): Use gdb::byte_vector.
314
315 2019-08-15 Tom Tromey <tromey@adacore.com>
316
317 * tracepoint.c (write_inferior_data_pointer)
318 (write_inferior_integer, write_inferior_int8)
319 (write_inferior_uinteger, m_tracepoint_action_download)
320 (r_tracepoint_action_download, x_tracepoint_action_download)
321 (l_tracepoint_action_download, clear_inferior_trace_buffer)
322 (download_agent_expr, download_tracepoint_1)
323 (download_trace_state_variables, upload_fast_traceframes): Update.
324 * server.c (gdb_write_memory): Update.
325 * remote-utils.c (relocate_instruction): Update.
326 * proc-service.c (ps_pdwrite): Update.
327 * mem-break.c (remove_memory_breakpoint)
328 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
329 (uninsert_fast_tracepoint_jumps_at)
330 (reinsert_fast_tracepoint_jumps_at): Update.
331 * linux-x86-low.c (append_insns)
332 (i386_install_fast_tracepoint_jump_pad)
333 (amd64_write_goto_address, i386_write_goto_address): Update.
334 * linux-s390-low.c (append_insns, s390_write_goto_address):
335 Update.
336 * linux-ppc-low.c (ppc_relocate_instruction)
337 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
338 (ppc_write_goto_address): Update.
339 * linux-aarch64-low.c (append_insns): Update.
340 * target.h (struct target_ops): Update.
341 (write_inferior_memory): Don't declare.
342 * target.c (target_write_memory): Rename from
343 write_inferior_memory. Remove old target_write_memory.
344
345 2019-08-15 Tom Tromey <tromey@adacore.com>
346
347 * target.c (write_inferior_memory): Use std::vector.
348
349 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
350
351 PR build/24886
352 * configure.ac: Drop enable-libmcheck support.
353 * configure, config.in: Rebuild.
354 * acinclude.m4: Don't include it.
355
356 2019-07-19 Alan Hayward <alan.hayward@arm.com>
357
358 * configure.srv: Remove Arm xml files.
359
360 2019-07-19 Alan Hayward <alan.hayward@arm.com>
361
362 * configure.srv: Add new files. Remove xml generated files.
363 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
364 registers.
365 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
366 * linux-aarch32-tdesc.c: New file.
367 * linux-aarch32-tdesc.h: New file.
368 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
369 * linux-arm-low.c (init_registers_arm, tdesc_arm)
370 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
371 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
372 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
373 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
374 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
375 (arm_read_description): Call arm_linux_read_description.
376 (initialize_low_arch): Don't init registers.
377 * linux-arm-tdesc.c: New file.
378 * linux-arm-tdesc.h: New file.
379
380 2019-07-10 Alan Hayward <alan.hayward@arm.com>
381
382 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
383 Move counter inside for.
384 (arm_read_description): Check ptrace earlier.
385 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
386
387 2019-07-09 Tom Tromey <tom@tromey.com>
388
389 * configure: Rebuild.
390 * configure.ac: Change common to gdbsupport.
391 * acinclude.m4: Change common to gdbsupport.
392 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
393 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
394 common to gdbsupport.
395 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
396 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
397 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
398 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
399 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
400 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
401 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
402 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
403 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
404 common to gdbsupport.
405
406 2019-07-04 Alan Hayward <alan.hayward@arm.com>
407
408 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
409 defines.
410 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
411
412 2019-07-04 Alan Hayward <alan.hayward@arm.com>
413
414 * configure.srv: Remove legacy xml.
415 * linux-aarch64-low.c (initialize_low_arch): Remove
416 initialize_low_tdesc call.
417 * linux-aarch64-tdesc-selftest.c: Remove file.
418 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
419 * linux-x86-low.c (initialize_low_arch): Remove
420 initialize_low_tdesc call.
421 * linux-x86-tdesc-selftest.c: Remove file.
422 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
423
424 2019-06-20 Tom de Vries <tdevries@suse.de>
425
426 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
427 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
428
429 2019-06-19 Tom de Vries <tdevries@suse.de>
430
431 * debug.h (debug_write): Change return type to ssize_t.
432 * debug.c (debug_write): Same.
433
434 2019-06-14 Tom Tromey <tom@tromey.com>
435
436 * configure.ac: Use new path to gnulib.
437 * configure: Rebuild.
438 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
439 to gnulib.
440
441 2019-06-11 Tom Tromey <tom@tromey.com>
442
443 * Makefile.in (SFILES): Add alloc.c.
444 (OBS): Add alloc.o.
445 (IPA_OBJS): Add alloc-ipa.o.
446 (alloc-ipa.o): New target.
447 (%.o: ../%.c): New pattern rule.
448
449 2019-06-10 Tom Tromey <tromey@adacore.com>
450
451 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
452 end warning with a newline.
453 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
454 newline.
455 * thread-db.c (attach_thread): Don't end warning with a newline.
456 (thread_db_notice_clone): Likewise.
457 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
458 newline.
459 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
460 end warning with a newline.
461
462 2019-06-04 Pedro Alves <palves@redhat.com>
463
464 * server.c (captured_main): Use make_unique_xstrdup.
465
466 2019-06-02 Tom Tromey <tom@tromey.com>
467
468 * gdbreplay.c (fromhex): Remove.
469 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
470
471 2019-05-29 Tom Tromey <tromey@adacore.com>
472
473 * configure: Rebuild.
474
475 2019-05-06 Kevin Buettner <kevinb@redhat.com>
476
477 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
478 sign extension code on 32-bit builds.
479
480 2019-05-03 Eli Zaretskii <eliz@gnu.org>
481
482 * remote-utils.c:
483 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
484
485 2019-04-19 Tom Tromey <tom@tromey.com>
486
487 * server.c (struct vstop_notif): Derive from notif_event.
488 <base>: Remove.
489 (queue_stop_reply): Update.
490 (remove_all_on_match_ptid): Change type. Rewrite.
491 (discard_queued_stop_replies): Rewrite.
492 (in_queued_stop_replies_ptid): Change type.
493 (in_queued_stop_replies): Rewrite.
494 (notif_stop): Update.
495 (queue_stop_reply_callback): Update.
496 (captured_main): Don't call initialize_notif.
497 (push_stop_notification): Update.
498 * notif.c (notif_write_event, handle_notif_ack)
499 (notif_event_enque, notif_push): Update.
500 (notif_event_xfree, initialize_notif): Remove.
501 * notif.h (struct notif_event): Include <list>, not
502 "common/queue.h".
503 (struct notif_server) <queue>: Now a std::list.
504 (notif_event_p): Remove typedef.
505 (initialize_notif): Don't declare.
506 (struct notif_event): Add virtual destructor.
507
508 2019-04-17 Alan Hayward <alan.hayward@arm.com>
509
510 * ax.c (ax_vdebug): Call debug_printf.
511 * debug.c (debug_write): New function.
512 * debug.h (debug_write): New declaration.
513 * linux-low.c (sigchld_handler): Call debug_write.
514
515 2019-04-17 Alan Hayward <alan.hayward@arm.com>
516
517 * debug.c (debug_set_output): New function.
518 (debug_vprintf): Send output to debug_file.
519 (debug_flush): Likewise.
520 * debug.h (debug_set_output): New declaration.
521 * server.c (handle_monitor_command): Add debug-file option.
522 (captured_main): Likewise.
523
524 2019-04-17 Alan Hayward <alan.hayward@arm.com>
525
526 * debug.c (remote_debug): Add definition.
527 * debug.h (remote_debug): Add declaration.
528 * hostio.c (remote_debug): Remove declaration.
529 * remote-utils.c (struct ui_file): Likewise.
530 (remote_debug): Likewise.
531 * remote-utils.h (remote_debug): Likewise,
532 * server.c (remote_debug): Remove definition.
533
534 2019-04-10 Kevin Buettner <kevinb@redhat.com>
535
536 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
537 when using a 64-bit gdbserver.
538
539 2019-04-09 Tom Tromey <tromey@adacore.com>
540
541 * linux-low.c (select_event_lwp): Use find_thread_in_random.
542
543 2019-04-08 Tom Tromey <tom@tromey.com>
544
545 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
546 throw.
547 (linux_resume_one_lwp): Likewise.
548
549 2019-04-08 Tom Tromey <tom@tromey.com>
550
551 * gdbreplay.c: Update.
552 * linux-low.c: Update.
553 * server.c: Update.
554
555 2019-04-08 Tom Tromey <tom@tromey.com>
556
557 * server.c: Use C++ exception handling.
558 * linux-low.c: Use C++ exception handling.
559 * gdbreplay.c: Use C++ exception handling.
560
561 2019-04-08 Tom Tromey <tom@tromey.com>
562
563 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
564 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
565 (captured_main, main): Update.
566 * gdbreplay.c (main): Update.
567
568 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
569
570 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
571 value in argument pointer, return 1 if the entry is found and 0
572 otherwise. Move comment.
573 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
574 * linux-low.h (linux_get_auxv): Declare.
575 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
576
577 2019-04-05 Tom Tromey <tromey@adacore.com>
578
579 * server.c (gdbserver_usage): Use upper-case for metasyntactic
580 variables.
581
582 2019-03-28 Alan Hayward <alan.hayward@arm.com>
583
584 * linux-low.c (AT_HWCAP2): Add define if not already included.
585
586 2019-03-26 Alan Hayward <alan.hayward@arm.com>
587
588 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
589 (aarch64_arch_setup): Call linux_get_hwcap.
590 * linux-arm-low.c (arm_get_hwcap): Remove function.
591 (arm_read_description): Call linux_get_hwcap.
592 * linux-low.c (linux_get_auxv): New function.
593 (linux_get_hwcap): Likewise.
594 (linux_get_hwcap2): Likewise.
595 * linux-low.h (linux_get_hwcap): New declaration.
596 (linux_get_hwcap2): Likewise.
597 * linux-ppc-low.c (ppc_get_auxv): Remove function.
598 (ppc_arch_setup): Call linux_get_hwcap.
599 * linux-s390-low.c (s390_get_hwcap): Remove function.
600 (s390_arch_setup): Call linux_get_hwcap.
601
602 2019-03-22 Alan Hayward <alan.hayward@arm.com>
603 Jiong Wang <jiong.wang@arm.com>
604
605 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
606 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
607 to fail.
608 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
609
610 2019-03-22 Alan Hayward <alan.hayward@arm.com>
611 Jiong Wang <jiong.wang@arm.com>
612
613 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
614 (aarch64_get_hwcap): New function.
615 (aarch64_arch_setup): Read APIA hwcap.
616
617 2019-03-22 Alan Hayward <alan.hayward@arm.com>
618 Jiong Wang <jiong.wang@arm.com>
619
620 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
621 (initialize_low_tracepoint): Likewise.
622 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
623 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
624 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
625 (aarch64_linux_read_description): Likewise.
626 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
627
628 2019-03-12 John Baldwin <jhb@FreeBSD.org>
629
630 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
631 i386_create_target_description for 'segments' parameter.
632 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
633 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
634 * win32-i386-low.c (i386_arch_setup): Likewise.
635
636 2019-03-12 Tom Tromey <tromey@adacore.com>
637
638 * linux-low.c (iterate_over_lwps): Update.
639
640 2019-03-06 Tom Tromey <tom@tromey.com>
641
642 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
643 (captured_main): Use SCOPE_EXIT.
644
645 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
646
647 * configure.srv: Use '$enable_unittest' instead of '$development'
648 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
649 case.
650
651 2019-02-27 Tom Tromey <tromey@adacore.com>
652
653 * gdbreplay.c (logchar): Handle \r\n.
654
655 2019-02-07 Alan Hayward <alan.hayward@arm.com>
656
657 * linux-low.c (linux_attach): Add process before lwp.
658 * server.c (attach_inferior): Check if already attached.
659
660 2019-02-07 Tom Tromey <tom@tromey.com>
661
662 * x86-tdesc.h: Rename include guard.
663 * x86-low.h: Add include guard.
664 * wincecompat.h: Rename include guard.
665 * win32-low.h: Add include guard.
666 * utils.h: Rename include guard.
667 * tracepoint.h: Rename include guard.
668 * tdesc.h: Rename include guard.
669 * target.h: Rename include guard.
670 * server.h: Rename include guard.
671 * remote-utils.h: Rename include guard.
672 * regcache.h: Rename include guard.
673 * nto-low.h: Rename include guard.
674 * notif.h: Add include guard.
675 * mem-break.h: Rename include guard.
676 * lynx-low.h: Add include guard.
677 * linux-x86-tdesc.h: Add include guard.
678 * linux-s390-tdesc.h: Add include guard.
679 * linux-ppc-tdesc-init.h: Add include guard.
680 * linux-low.h: Add include guard.
681 * linux-aarch64-tdesc.h: Add include guard.
682 * linux-aarch32-low.h: Add include guard.
683 * inferiors.h: Rename include guard.
684 * i387-fp.h: Rename include guard.
685 * hostio.h: Rename include guard.
686 * gdbthread.h: Rename include guard.
687 * gdb_proc_service.h: Rename include guard.
688 * event-loop.h: Rename include guard.
689 * dll.h: Rename include guard.
690 * debug.h: Rename include guard.
691 * ax.h: Rename include guard.
692
693 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
694
695 PR gdb/23985
696 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
697 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
698
699 2019-01-25 Tom Tromey <tom@tromey.com>
700
701 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
702
703 2019-01-25 Tom Tromey <tom@tromey.com>
704
705 * win32-low.c: Fix common/ includes.
706 * win32-i386-low.c: Fix common/ includes.
707 * tracepoint.c: Fix common/ includes.
708 * thread-db.c: Fix common/ includes.
709 * target.h: Fix common/ includes.
710 * symbol.c: Fix common/ includes.
711 * spu-low.c: Fix common/ includes.
712 * server.h: Fix common/ includes.
713 * server.c: Fix common/ includes.
714 * remote-utils.c: Fix common/ includes.
715 * regcache.h: Fix common/ includes.
716 * regcache.c: Fix common/ includes.
717 * nto-x86-low.c: Fix common/ includes.
718 * notif.h: Fix common/ includes.
719 * mem-break.h: Fix common/ includes.
720 * lynx-low.c: Fix common/ includes.
721 * lynx-i386-low.c: Fix common/ includes.
722 * linux-x86-tdesc-selftest.c: Fix common/ includes.
723 * linux-x86-low.c: Fix common/ includes.
724 * linux-low.c: Fix common/ includes.
725 * inferiors.h: Fix common/ includes.
726 * i387-fp.c: Fix common/ includes.
727 * hostio.c: Fix common/ includes.
728 * hostio-errno.c: Fix common/ includes.
729 * gdbthread.h: Fix common/ includes.
730 * gdbreplay.c: Fix common/ includes.
731 * fork-child.c: Fix common/ includes.
732 * event-loop.c: Fix common/ includes.
733 * ax.c:
734 (enum gdb_agent_op): Fix common/ includes.
735
736 2019-01-21 Tom Tromey <tom@tromey.com>
737
738 * tracepoint.c: Fix includes.
739 * remote-utils.c: Fix includes.
740 * linux-x86-low.c: Fix includes.
741
742 2019-01-01 Joel Brobecker <brobecker@adacore.com>
743
744 * gdbreplay.c (gdbreplay_version): Update copyright year in
745 version message.
746 * server.c (gdbserver_version): Likewise.
747
748 2018-12-05 Alan Hayward <alan.hayward@arm.com>
749
750 * linux-low.c (add_lwp): Switch ordering.
751
752 2018-11-29 Tom Tromey <tom@tromey.com>
753
754 * win32-low.c (win32_join): Take pid, not process.
755 * target.h (struct target_ops) <join>: Change argument type.
756 (join_inferior): Change argument name.
757 * spu-low.c (spu_join): Take pid, not process.
758 * server.c (handle_detach): Preserve pid before destroying
759 process.
760 * lynx-low.c (lynx_join): Take pid, not process.
761 * linux-low.c (linux_join): Take pid, not process.
762
763 2018-11-23 Alan Hayward <alan.hayward@arm.com>
764
765 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
766 (aarch64_cannot_fetch_register): Likewise.
767 (struct linux_target_ops): Update references.
768
769 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
770
771 * linux-ppc-low.c: Include nat/linux-ptrace.h.
772
773 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
774
775 * configure.srv (ipa_ppc_linux_regobj): Add
776 powerpc-isa207-htm-vsx32l-ipa.o and
777 powerpc-isa207-htm-vsx64l-ipa.o.
778 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
779 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
780 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
781 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
782 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
783 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
784 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
785 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
786 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
787 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
788 (init_registers_powerpc_isa207_htm_vsx32l)
789 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
790 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
791 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
792 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
793 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
794 (ppc_store_tm_ctarregset): New functions.
795 (ppc_regsets): Add entries for HTM regsets.
796 (ppc_arch_setup): Set htm in features struct when needed. Set
797 sizes for the HTM regsets.
798 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
799 (initialize_low_arch): Call
800 init_registers_powerpc_isa207_htm_vsx32l and
801 init_registers_powerpc_isa207_htm_vsx64l.
802 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
803 PPC_TDESC_ISA207_HTM_VSX.
804 (initialize_low_tracepoint): Call
805 init_registers_powerpc_isa207_htm_vsx32l and
806 init_registers_powerpc_isa207_htm_vsx64l.
807
808 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
809
810 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
811 rs6000/power-linux-pmu.xml to srv_xmlfiles.
812 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
813 (ppc_store_pmuregset): New functions.
814 (ppc_regsets): Add entries for ebb and pmu regsets.
815 (ppc_arch_setup): Set isa207 in features struct if the ebb and
816 pmu regsets are available. Set sizes for these regsets.
817
818 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
819
820 * configure.srv (ipa_ppc_linux_regobj): Add
821 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
822 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
823 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
824 rs6000/powerpc-isa207-vsx32l.xml, and
825 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
826 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
827 <PPC_TDESC_ISA207_VSX>: New enum value.
828 (init_registers_powerpc_isa207_vsx32l): Declare.
829 (init_registers_powerpc_isa207_vsx64l): Declare.
830 * linux-ppc-low.c (ppc_fill_tarregset): New function.
831 (ppc_store_tarregset): New function.
832 (ppc_regsets): Add entry for the TAR regset.
833 (ppc_arch_setup): Set isa207 in features struct when needed. Set
834 size for the TAR regsets.
835 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
836 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
837 and init_registers_powerpc_isa207_vsx64l.
838 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
839 (initialize_low_tracepoint): Call
840 init_registers_powerpc_isa207_vsx32l and
841 init_registers_powerpc_isa207_vsx64l.
842
843 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
844 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
845
846 * configure.srv (ipa_ppc_linux_regobj): Add
847 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
848 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
849 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
850 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
851 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
852 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
853 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
854 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
855 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
856 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
857 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
858 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
859 (ppc_hwcap): Add comment.
860 (ppc_hwcap2): New global.
861 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
862 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
863 (ppc_regsets): Add entries for the DSCR and PPR regsets.
864 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
865 when needed. Set sizes for the the DSCR and PPR regsets.
866 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
867 (initialize_low_arch): Call
868 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
869 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
870 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
871 PPC_TDESC_ISA205_PPR_DSCR_VSX.
872 (initialize_low_tracepoint): Call
873 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
874 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
875
876 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
877
878 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
879
880 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
881 Simon Marchi <simark@simark.ca>
882
883 * acinclude.m4: Include "../selftest.m4".
884 * configure: Regenerate.
885 * configure.ac: Use "GDB_AC_SELFTEST".
886 * configure.srv: Use "$enable_unittests" instead of
887 "$development" when checking whether unit tests have been
888 enabled.
889 * server.c (captured_main): Update message informing that
890 selftests have been disabled.
891
892 2018-10-04 Tom Tromey <tom@tromey.com>
893
894 * configure: Rebuild.
895
896 2018-10-04 Tom Tromey <tom@tromey.com>
897
898 * server.c (handle_status): Rename inner "thread".
899 (process_serial_event): Declare "res" in 'm' case.
900 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
901 (iterate_over_lwps): Rename inner "thread".
902 (linux_qxfer_libraries_svr4): Rename inner "len".
903 * gdbthread.h (find_thread_in_random): Rename inner "thread".
904
905 2018-10-01 Gary Benson <gbenson@redhat.com>
906
907 * gdb_proc_service.h: Moved common code to
908 common/gdb_proc_service.h.
909
910 2018-10-01 Gary Benson <gbenson@redhat.com>
911
912 * gdb_proc_service.h: Synchronize comments and whitespace with
913 GDB's version of this file.
914
915 2018-09-25 Tom Tromey <tom@tromey.com>
916
917 * configure: Rebuild.
918 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
919
920 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
921
922 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
923 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
924 ($(IPA_LIB)): Sort IPA_OBJS.
925
926 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
927
928 * Makefile.in: Remove references to $(ADD_DEPS).
929
930 2018-09-16 Tom Tromey <tom@tromey.com>
931
932 * remote-utils.c (remote_open): Use GNU style for metasyntactic
933 variables.
934 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
935 variables.
936
937 2018-09-05 Tom Tromey <tom@tromey.com>
938
939 * configure: Rebuild.
940
941 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
942
943 PR build/23399
944 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
945
946 2018-08-27 Tom Tromey <tom@tromey.com>
947
948 PR build/23087:
949 * configure: Rebuild.
950
951 2018-08-27 Tom Tromey <tom@tromey.com>
952
953 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
954 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
955 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
956 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
957 (s390x_emit_stack_adjust): Add casts to unsigned char.
958
959 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
960
961 PR gdb/23374
962 PR gdb/23375
963 * server.h (struct client_state) <disable_randomization>:
964 Initialize to 1.
965
966 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
967
968 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
969 variable.
970 (mips_supply_ptrace_register): Likewise.
971
972 2018-07-22 Tom Tromey <tom@tromey.com>
973
974 * configure: Rebuild.
975
976 2018-07-22 Tom Tromey <tom@tromey.com>
977
978 * win32-low.c (win32_create_inferior): Remove unused variables.
979 * gdbreplay.c (remote_open): Remove unused variable.
980 * remote-utils.c (remote_prepare): Remove unused variable.
981 * x86-tdesc.h (X86_TDESC_H): Define.
982 (amd64_expedite_regs): Define conditionally.
983 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
984 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
985 * remote-utils.c (readchar): Remove unused variable.
986
987 2018-07-13 Pedro Alves <palves@redhat.com>
988
989 * linux-low.c (linux_kill): Change parameter to process_info
990 pointer instead of pid. Adjust.
991 * lynx-low.c (lynx_kill): Likewise.
992 * nto-low.c (nto_kill): Likewise.
993 * spu-low.c (spu_kill): Likewise.
994 * win32-low.c (win32_kill): Likewise.
995 * server.c (handle_v_kill, kill_inferior_callback)
996 (detach_or_kill_for_exit): Adjust.
997 * target.c (kill_inferior): Change parameter to process_info
998 pointer instead of pid. Adjust.
999 * target.h (struct target_ops) <kill>: Change parameter to
1000 process_info pointer instead of pid. Adjust all implementations
1001 and callers.
1002 (kill_inferior): Likewise.
1003
1004 2018-07-13 Pedro Alves <palves@redhat.com>
1005
1006 * linux-low.c (linux_detach, linux_join): Change parameter to
1007 process_info pointer instead of pid. Adjust.
1008 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1009 * nto-low.c (nto_detach): Likewise.
1010 * spu-low.c (spu_detach, spu_join): Likewise.
1011 * win32-low.c (win32_detach, win32_join): Likewise.
1012 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1013 * target.h (struct target_ops) <detach, join>: Change parameter to
1014 process_info pointer instead of pid. Adjust all implementations
1015 and callers.
1016 (detach_inferior, join_inferior): Rename 'pid' parameter to
1017 'proc'.
1018
1019 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1020 Jan Kratochvil <jan.kratochvil@redhat.com>
1021 Paul Fertser <fercerpav@gmail.com>
1022 Tsutomu Seki <sekiriki@gmail.com>
1023
1024 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1025 (OBS): Add 'common/netstuff.o'.
1026 (GDBREPLAY_OBS): Likewise.
1027 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1028 (remote_open): Implement support for IPv6
1029 connections.
1030 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1031 and 'wspiapi.h'.
1032 (handle_accept_event): Accept connections from IPv6 sources.
1033 (remote_prepare): Handle IPv6-style hostnames; implement
1034 support for IPv6 connections.
1035 (remote_open): Implement support for printing connections from
1036 IPv6 sources.
1037
1038 2018-07-11 Pedro Alves <palves@redhat.com>
1039
1040 PR gdb/23377
1041 * mem-break.c (any_persistent_commands): Add process_info
1042 parameter and use it instead of relying on the current process.
1043 Change return type to bool.
1044 * mem-break.h (any_persistent_commands): Add process_info
1045 parameter and change return type to bool.
1046 * server.c (handle_detach): Remove require_running_or_return call.
1047 Look up the process_info for the process we're about to detach.
1048 If not found, return back error to GDB. Adjust
1049 any_persistent_commands call to pass down a process pointer.
1050
1051 2018-07-11 Pedro Alves <palves@redhat.com>
1052
1053 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1054 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1055 instead of collect_register_by_name.
1056 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1057 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1058
1059 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1060 Pedro Alves <palves@redhat.com>
1061
1062 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1063
1064 2018-07-03 Tom Tromey <tom@tromey.com>
1065
1066 * linux-low.c: Update.
1067 * lynx-low.c: Update.
1068 * mem-break.c: Update.
1069 * nto-low.c: Update.
1070 * remote-utils.c: Update.
1071 * server.c: Update.
1072 * spu-low.c: Update.
1073 * target.c: Update.
1074 * win32-low.c: Update.
1075
1076 2018-07-03 Tom Tromey <tom@tromey.com>
1077
1078 * server.c: Update.
1079
1080 2018-07-03 Tom Tromey <tom@tromey.com>
1081
1082 * linux-low.c: Update.
1083
1084 2018-07-03 Tom Tromey <tom@tromey.com>
1085
1086 * target.c: Update.
1087
1088 2018-07-03 Tom Tromey <tom@tromey.com>
1089
1090 * linux-low.c: Update.
1091 * linux-mips-low.c: Update.
1092 * lynx-low.c: Update.
1093 * nto-low.c: Update.
1094 * remote-utils.c: Update.
1095 * server.c: Update.
1096 * spu-low.c: Update.
1097 * target.c: Update.
1098 * thread-db.c: Update.
1099
1100 2018-07-03 Tom Tromey <tom@tromey.com>
1101
1102 * linux-low.c: Update.
1103 * linux-mips-low.c: Update.
1104 * lynx-low.c: Update.
1105 * mem-break.c: Update.
1106 * nto-low.c: Update.
1107 * remote-utils.c: Update.
1108 * server.c: Update.
1109 * spu-low.c: Update.
1110 * target.c: Update.
1111 * tracepoint.c: Update.
1112
1113 2018-07-03 Tom Tromey <tom@tromey.com>
1114
1115 * linux-low.c: Update.
1116 * linux-ppc-low.c: Update.
1117 * linux-x86-low.c: Update.
1118 * proc-service.c: Update.
1119 * server.c: Update.
1120 * spu-low.c: Update.
1121 * thread-db.c: Update.
1122 * win32-low.c: Update.
1123
1124 2018-07-03 Tom Tromey <tom@tromey.com>
1125
1126 * linux-low.c: Update.
1127 * lynx-low.c: Update.
1128 * nto-low.c: Update.
1129 * remote-utils.c: Update.
1130 * spu-low.c: Update.
1131 * thread-db.c: Update.
1132 * win32-low.c: Update.
1133
1134 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1135
1136 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1137 parameter in call to 'amd64_create_target_description'.
1138
1139 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1140
1141 * x86-tdesc.h: Remove executable permission flag.
1142
1143 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1144
1145 * configure.ac: Remove AC_PREREQ, add missing quoting.
1146 * configure: Re-generate.
1147 * config.in: Re-generate.
1148 * aclocal.m4: Re-generate.
1149
1150 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1151
1152 * tracepoint.h (current_traceframe): Remove declaration.
1153
1154 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1155
1156 * linux-aarch64-low.c (is_sve_tdesc): New function.
1157 (aarch64_sve_regs_copy_to_regcache): Likewise.
1158 (aarch64_sve_regs_copy_from_regcache): Likewise.
1159 (aarch64_regs_info): Add SVE checks.
1160 (initialize_low_arch): Initialize SVE.
1161
1162 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1163
1164 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1165
1166 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1167
1168 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1169 (initialize_low_tracepoint): Likewise
1170 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1171 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1172 param.
1173 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1174 checks.
1175 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1176
1177 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1178
1179 * server.h (PBUFSIZ): Increase size
1180
1181 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1182
1183 * regcache.c (regcache::raw_compare): New function.
1184 * regcache.h (regcache::raw_compare): New declaration.
1185
1186 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1187
1188 * regcache.c (new_register_cache): Use new.
1189 (free_register_cache): Use delete.
1190 (register_data): Use const.
1191 (supply_register): Move body inside regcache.
1192 (regcache::raw_supply): New override function.
1193 (collect_register): Move body inside regcache.
1194 (regcache::raw_collect): New override function.
1195 (regcache::get_register_status): New override function.
1196 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1197
1198 2018-06-09 Tom Tromey <tom@tromey.com>
1199
1200 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1201 declare queue.
1202 (event_queue): Use std::queue.
1203 (gdb_event_xfree): Remove.
1204 (initialize_event_loop, process_event, wait_for_event): Update.
1205
1206 2018-06-08 Stan Cox <scox@redhat.com>
1207
1208 * win32-low.c (win32_create_inferior): last_ptid and last_status
1209 moved to client_state.
1210
1211 2018-06-08 Pedro Alves <palves@redhat.com>
1212
1213 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1214 common/common-exceptions.o, common/common-utils.o,
1215 common/errors.o, common/print-utils.o and utils.o.
1216 * gdbreplay.c: Include "common-defs.h" instead of the two
1217 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1218 string.h or alloca.h.
1219 (perror_with_name): Delete.
1220 (remote_open): Use xstrdup instead of strdup.
1221 (main): Rename to ...
1222 (captured_main): ... this.
1223 (main): New.
1224
1225 2018-06-08 Tom Tromey <tom@tromey.com>
1226
1227 * linux-low.c (linux_low_read_btrace): Update.
1228
1229 2018-06-04 Stan Cox <scox@redhat.com>
1230
1231 * server.h (struct client_state): New.
1232 * server.c (cont_thread, general_thread, multi_process)
1233 (report_fork_events, report_vfork_events, report_exec_events)
1234 (report_thread_events, swbreak_feature, hwbreak_feature)
1235 (vCont_supported, disable_randomization, pass_signals)
1236 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1237 Moved to client_state.
1238 * remote-utils.c (remote_debug, noack_mode)
1239 (transport_is_reliable): Moved to client_state.
1240 * tracepoint.c (current_traceframe): Moved to client_state.
1241
1242 Update all callers.
1243 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1244 linux-low.c, remote-utils.h, target.c: Use client_state.
1245
1246 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1247
1248 * configure.srv: Add new c/h file.
1249
1250 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1251
1252 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1253 null VQ.
1254
1255 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1256
1257 * gdb.arch/mips-fpregset-core.exp: New test.
1258 * gdb.arch/mips-fpregset-core.c: New test source.
1259
1260 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1261
1262 PR server/23198
1263 * hostio.c (require_int): Do not report overflow for integers
1264 between 0xfffffff and 0x7fffffff.
1265
1266 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1267
1268 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1269 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1270 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1271 functions.
1272 (the_low_target): Wire them.
1273
1274 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1275
1276 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1277 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1278 mode. Call collect_register_by_name with vscr using
1279 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1280 (ppc_store_vrregset): Add and set vscr_offset variable as in
1281 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1282 vscr_offset.
1283
1284 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1285
1286 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1287 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1288 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1289
1290 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1291
1292 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1293 (ppc_store_vsxregset): Likewise.
1294 (ppc_fill_vrregset): Likewise.
1295 (ppc_store_vrregset): Likewise.
1296 (ppc_fill_evrregset): Likewise.
1297 (ppc_store_evrregset): Likewise.
1298 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1299 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1300 needed.
1301
1302 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1303
1304 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1305 wordsize of the inferior. Call ppc_linux_target_wordsize.
1306
1307 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1308
1309 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1310 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1311 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1312 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1313 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1314 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1315 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1316 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1317 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1318 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1319 (tdesc_powerpc_e500l): Remove.
1320 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1321 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1322 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1323 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1324 linux-ppc-tdesc.h.
1325 (ppc_arch_setup): Remove target description matching code. Fill a
1326 ppc_linux_features struct and call ppc_linux_match_description
1327 with it.
1328
1329 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1330
1331 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1332 width of the requested register exceeds the width of the
1333 `ptrace' data type.
1334 (mips_cannot_store_register): Likewise.
1335
1336 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1337
1338 * linux-mips-low.c (mips_fetch_register): New function. Update
1339 preceding comment.
1340 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1341 (the_low_target): Wire `mips_fetch_register'.
1342
1343 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1344
1345 * lynx-i386-low.c (LYNXOS_178): New macro.
1346 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1347 the layout on LynxOS-178.
1348 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1349 handle floating point registers that are not supported by
1350 LynxOS-178.
1351
1352 2018-05-10 Tom Tromey <tom@tromey.com>
1353
1354 * configure: Rebuild.
1355
1356 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1357
1358 PR server/23158:
1359 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1360 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1361 Use it to set the expedite_regs field in the given tdesc.
1362 * x86-tdesc.h: New file.
1363 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1364 Adjust following the addition of the new expedite_regs parameter
1365 to init_target_desc.
1366 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1367 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1368 (i386_linux_read_description, amd64_linux_read_description):
1369 Adjust following the addition of the new expedite_regs parameter
1370 to init_target_desc.
1371 * lynx-i386-low.c: #include "x86-tdesc.h".
1372 (lynx_i386_arch_setup): Adjust following the addition of the new
1373 expedite_regs parameter to init_target_desc.
1374 * nto-x86-low.c: #include "x86-tdesc.h".
1375 (nto_x86_arch_setup): Adjust following the addition of the new
1376 expedite_regs parameter to init_target_desc.
1377 * win32-i386-low.c: #include "x86-tdesc.h".
1378 (i386_arch_setup): Adjust following the addition of the new
1379 expedite_regs parameter to init_target_desc.
1380
1381 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1382
1383 PR server/23158:
1384 * win32-low.c (win32_create_inferior): Add call to my_wait
1385 setting last_status global.
1386
1387 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1388
1389 PR server/23158:
1390 * win32-low.c (create_process): Only call gdb_tilde_expand if
1391 inferior_cwd is not NULL.
1392
1393 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1394
1395 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1396 registers to the cache if their values have changed.
1397 (i387_xsave_to_cache): Provide default values for x87 control
1398 registers when these features are available, but disabled.
1399 * regcache.c (supply_register_by_name_zeroed): New function.
1400 * regcache.h (supply_register_by_name_zeroed): Declare new
1401 function.
1402
1403 2018-05-07 Tom Tromey <tom@tromey.com>
1404
1405 * configure: Rebuild.
1406
1407 2018-05-04 Tom Tromey <tom@tromey.com>
1408
1409 * configure: Rebuild.
1410
1411 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1412 Pedro Alves <palves@redhat.com>
1413
1414 * linux-aarch64-low.c (aarch64_stopped_data_address):
1415 Likewise.
1416
1417 2018-04-27 Tom Tromey <tom@tromey.com>
1418
1419 * configure: Rebuild.
1420
1421 2018-04-23 Tom Tromey <tom@tromey.com>
1422
1423 * configure: Rebuild.
1424
1425 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * Makefile.in (depcomp): Add "..".
1428 (all_deps_files): New and use it.
1429
1430 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1431
1432 * configure.srv (aarch64*-*-linux*): Don't include xml.
1433 (i[34567]86-*-cygwin*): Likewise.
1434 (i[34567]86-*-linux*): Likewise.
1435 (i[34567]86-*-lynxos*): Likewise.
1436 (i[34567]86-*-mingw32ce*): Likewise.
1437 (i[34567]86-*-mingw*): Likewise.
1438 (i[34567]86-*-nto*): Likewise.
1439 (tic6x-*-uclinux): Likewise.
1440 (x86_64-*-linux*): Likewise.
1441 (x86_64-*-mingw*): Likewise.
1442 (x86_64-*-cygwin*): Likewise.
1443
1444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1445
1446 * tdesc.c: Remove xml parameter.
1447
1448 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1449
1450 * server.c (get_features_xml): Remove cast.
1451 * tdesc.c (void target_desc::accept): Fill in function.
1452 (tdesc_get_features_xml): Remove old xml creation.
1453 (print_xml_feature::visit_pre): Add xml vistor.
1454 * tdesc.h (struct target_desc): Make xmltarget mutable.
1455 (tdesc_get_features_xml): Remove declaration.
1456
1457 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1458
1459 * tdesc.c (tdesc_architecture_name): Add new function.
1460 (tdesc_osabi_name): Likewise.
1461 (tdesc_get_features_xml): Use new functions.
1462
1463 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1464
1465 * tdesc.c (tdesc_create_flags): Remove.
1466 (tdesc_add_flag): Likewise.
1467 (tdesc_named_type): Likewise.
1468 (tdesc_create_union): Likewise.
1469 (tdesc_create_struct): Likewise.
1470 (tdesc_create_vector): Likewise.
1471 (tdesc_add_bitfield): Likewise.
1472 (tdesc_add_field): Likewise.
1473 (tdesc_set_struct_size): Likewise.
1474
1475 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1476
1477 * tdesc.c (~target_desc): Remove implictly deleted items.
1478 (init_target_desc): Iterate all features.
1479 (tdesc_get_features_xml): Use vector.
1480 (tdesc_create_feature): Create feature.
1481 * tdesc.h (tdesc_feature) Remove
1482 (target_desc): Add features.
1483
1484 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1485
1486 * Makefile.in: Add common/tdesc.c
1487 * tdesc.c (init_target_desc): init all reg_defs from register
1488 vector.
1489 (tdesc_create_reg): Create tdesc_reg.
1490 * tdesc.h (tdesc_feature): Add register vector.
1491
1492 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * tdesc.h (struct target_desc) <features>: Change type to
1495 std::vector<std::string>.
1496 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1497 changes.
1498 (tdesc_get_features_xml): Likewise.
1499 (tdesc_create_feature): Likewise.
1500
1501 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1502
1503 * regcache.c (find_register_by_number): Return a ref.
1504 (find_regno): Use references.
1505 (register_size): Likewise.
1506 (register_data): Likewise.
1507 * tdesc.c (target_desc::~target_desc): Remove free calls.
1508 (target_desc::operator==): Use std::vector compare.
1509 (init_target_desc): Use reference.
1510 (tdesc_create_reg): Use reg constructors.
1511 * tdesc.h (struct target_desc): Replace pointer with object.
1512
1513 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1514
1515 * regcache.c (find_register_by_number): Make static.
1516 (find_regno): Use find_register_by_number
1517 * regcache.h (struct reg): Remove declaration.
1518
1519 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1520
1521 * tdesc.c (target_desc::~target_desc): Move to here.
1522 (target_desc::operator==): Likewise.
1523 * tdesc.h (target_desc::~target_desc): Move from here.
1524 (target_desc::operator==): Likewise.
1525
1526 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1527
1528 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1529
1530 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1531
1532 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1533 S390_TDESC_GS.
1534 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1535 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1536 and init_registers_s390_gs_linux64.
1537
1538 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1539
1540 * linux-s390-low.c (s390_fill_gs): Remove function.
1541 (s390_fill_gsbc): Remove function.
1542 (s390_regsets): Set fill functions for the guarded storage regsets
1543 to NULL.
1544
1545 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1546
1547 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1548 the word size. Add comment.
1549 (s390_get_wordsize): New function.
1550 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1551 pswm with it. Instead, use s390_get_wordsize to determine the
1552 word size first and derive the correct tdesc from that directly.
1553
1554 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1555
1556 * Makefile.in: Include silent-rules.mk.
1557 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1558 (COMPILE): Add ECHO_CXX.
1559 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1560 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1561 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1562 (version-generated.c): Add ECHO_GEN.
1563 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1564 (IPAGENT_COMPILE): Add ECHO_CXX.
1565 (%-generated.c): Add ECHO_REGDAT.
1566
1567 2018-03-14 Tom Tromey <tom@tromey.com>
1568
1569 PR cli/14977:
1570 * ax.c (ax_printf): Special case for NULL.
1571
1572 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1573
1574 * linux-low.c (linux_qxfer_libraries_svr4): Use
1575 xml_escape_text_append.
1576
1577 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1578
1579 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1580
1581 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1582
1583 * server.c (handle_general_set): Remove unnecessary xstrdup.
1584
1585 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1586
1587 * server.c (parse_debug_format_options): Adjust to
1588 delim_string_to_char_ptr_vec changes.
1589 * thread-db.c (thread_db_load_search): Adjust to
1590 dirnames_to_char_ptr_vec changes.
1591
1592 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1593
1594 * target.h (target_enable_btrace, target_disable_btrace)
1595 (target_read_btrace, target_read_btrace_conf): Turn macro into
1596 inline function. Throw error if target method is not defined.
1597 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1598 check for btrace target method. Be prepared to handle exceptions
1599 from btrace target methods.
1600
1601 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1602
1603 * server.c (captured_main): Change order of error message printed
1604 when the current working directory cannot be found.
1605
1606 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1607
1608 * server.c: Include "filenames.h" and "pathstuff.h".
1609 (program_name): Delete variable.
1610 (program_path): New anonymous class.
1611 (get_exec_wrapper): Use "program_path" instead of
1612 "program_name".
1613 (handle_v_run): Likewise.
1614 (captured_main): Likewise.
1615 (process_serial_event): Likewise.
1616
1617 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1618
1619 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1620 (OBJS): Add "pathstuff.o".
1621 * server.c (current_directory): New global variable.
1622 (captured_main): Initialize "current_directory".
1623
1624 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1625
1626 * tdesc.c: Use common/tdesc.h.
1627 * tdesc.h: Likewise.
1628
1629 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1630 Simon Marchi <simon.marchi@ericsson.com>
1631
1632 * Makefile.in: Switch order of make rules.
1633
1634 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1635
1636 * Makefile.in: Add common directory in build.
1637 * configure.ac: Add common reference.
1638 * configure: Regenerate.
1639
1640 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1641
1642 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1643 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1644 * spu-low.c (spu_target_ops): Likewise.
1645 * win32-low.c (win32_target_ops): Likewise.
1646 * server.c (supported_btrace_packets): Report packets unconditionally.
1647 * target.h (target_ops) <supports_btrace>: Remove.
1648 (target_supports_btrace): Remove.
1649
1650 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1651
1652 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1653 (handle_btrace_disable): Change return type to void. Use exceptions
1654 to report errors.
1655 (handle_btrace_general_set): Catch exception and copy message to
1656 return message.
1657
1658 2018-02-08 Tom Tromey <tom@tromey.com>
1659
1660 * linux-low.c (install_software_single_step_breakpoints): Use
1661 make_scoped_restore.
1662 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1663 (do_restore_current_thread_cleanup): Remove.
1664 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1665 declare.
1666
1667 2018-02-08 Tom Tromey <tom@tromey.com>
1668
1669 * mem-break.c (set_raw_breakpoint_at): Use
1670 gdb::unique_xmalloc_ptr.
1671
1672 2018-01-30 Pedro Alves <palves@redhat.com>
1673
1674 PR gdb/13211
1675 * target.c (target_terminal::terminal_state): Rename to ...
1676 (target_terminal::m_terminal_state): ... this.
1677
1678 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1679
1680 * linux-low.c (handle_extended_wait): Surround call to
1681 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1682
1683 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1684
1685 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1686 linux_ptrace_attach_fail_reason_string now returning an
1687 std::string.
1688 (linux_attach): Likewise.
1689 * thread-db.c (attach_thread): Likewise.
1690
1691 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1692
1693 PR gdb/21559
1694 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1695 checking for fs_base/gs_base fields in struct user_regs_struct.
1696 * configure: Regenerate.
1697
1698 2018-01-16 Yao Qi <yao.qi@linaro.org>
1699
1700 PR gdb/18749
1701 * linux-low.c (fetch_register): Call supply_register instead of
1702 error.
1703
1704 2018-01-08 Yao Qi <yao.qi@linaro.org>
1705 Simon Marchi <simon.marchi@ericsson.com>
1706
1707 * Makefile.in (OBS): Remove selftest.o.
1708 * configure.ac: Set srv_selftest_objs if $development is true.
1709 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1710 * configure: Re-generated.
1711 * server.c (captured_main): Wrap variable selftest_filter with
1712 GDB_SELF_TEST.
1713
1714 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1715
1716 * server.c (parse_debug_format_options): Return std::string.
1717 (handle_monitor_command, captured_main): Adjust.
1718
1719 2018-01-05 Pedro Alves <palves@redhat.com>
1720
1721 PR gdb/18653
1722 * server.c (captured_main): Pass quiet=false to
1723 save_original_signals_state.
1724
1725 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1726
1727 * gdbreplay.c (gdbreplay_version): Update copyright year in
1728 version message.
1729 * server.c (gdbserver_version): Likewise.
1730
1731 2017-12-08 Tom Tromey <tom@tromey.com>
1732
1733 * ax.c (ax_printf): Update.
1734
1735 2017-12-07 Yao Qi <yao.qi@linaro.org>
1736
1737 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1738 aarch64_linux_read_description.
1739 * linux-amd64-ipa.c (idx2mask): New array.
1740 (get_ipa_tdesc): Move idx2mask out.
1741 (initialize_low_tracepoint): Initialize target descriptions.
1742 * linux-i386-ipa.c (idx2mask): New array.
1743 (get_ipa_tdesc): Move idx2mask out.
1744 (initialize_low_tracepoint): Initialize target descriptions.
1745
1746 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1747
1748 * tdesc.c (struct tdesc_type): Change return type.
1749 (tdesc_add_flag): Change parameter type.
1750 (tdesc_add_bitfield): Likewise.
1751 (tdesc_add_field): Likewise.
1752 (tdesc_set_struct_size): Likewise.
1753
1754 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1755
1756 * regcache.c (registers_to_string): Remove unused variable.
1757
1758 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1759
1760 * inferiors.c (for_each_inferior_with_data): Remove.
1761 * inferiors.h (for_each_inferior_with_data): Remove.
1762 * server.c (handle_qxfer_threads_worker): Change parameter type.
1763 (handle_qxfer_threads_proper): Use for_each_thread.
1764
1765 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1766
1767 * inferiors.c (for_each_inferior): Remove.
1768 (clear_inferiors): Use for_each_thread.
1769 * inferiors.h (for_each_inferior): Remove.
1770 * linux-low.c (linux_wait_for_event_filtered): Use
1771 for_each_thread.
1772 (linux_stabilize_threads): Likewise.
1773 * regcache.c (regcache_release): Likewise.
1774 * server.c (gdb_wants_all_threads_stopped): Likewise.
1775 (clear_pending_status_callback): Remove.
1776 (handle_status): Use for_each_thread.
1777 (captured_main): Likewise.
1778 * win32-low.c (child_init_thread_list): Likewise.
1779 (win32_clear_inferiors): Likewise.
1780 (fake_breakpoint_event): Likewise.
1781
1782 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1783
1784 * inferiors.h (find_inferior): Remove.
1785 * inferiors.c (find_inferior): Remove.
1786
1787 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * linux-low.c (resume_status_pending_p): Update comment.
1790 (need_step_over_p): Update comment.
1791
1792 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * linux-low.c (proceed_one_lwp): Return void, change parameter
1795 type.
1796 (unsuspend_and_proceed_one_lwp): Likewise.
1797 (proceed_all_lwps): Use for_each_thread.
1798 (unstop_all_lwps): Likewise.
1799
1800 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * linux-low.c (linux_resume_one_thread): Return void, take
1803 parameter directly.
1804 (linux_resume): Use for_each_thread.
1805
1806 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1807
1808 * linux-low.c (send_sigstop_callback): Return void, change
1809 parameter type. Rename to...
1810 (send_sigstop): ... this.
1811 (suspend_and_send_sigstop_callback): Return void, change parameter
1812 type. Rename to...
1813 (suspend_and_send_sigstop): ... this.
1814 (stop_all_lwps): Use for_each_thread.
1815
1816 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1817
1818 * linux-low.c (lwp_running): Return bool, remove unused
1819 argument.
1820 (linux_stabilize_threads): Use find_thread.
1821
1822 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * linux-low.c (select_singlestep_lwp_callback): Remove.
1825 (count_events_callback): Remove.
1826 (select_event_lwp_callback): Remove.
1827 (select_event_lwp): Use find_thread/for_each_thread.
1828
1829 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1830
1831 * linux-low.c (not_stopped_callback): Return bool, take filter
1832 argument directly.
1833 (linux_wait_for_event_filtered): Use find_thread.
1834 (linux_wait_1): Likewise.
1835
1836 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1837
1838 * linux-low.c (same_lwp): Remove.
1839 (find_lwp_pid): Use find_thread.
1840
1841 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * linux-low.c (delete_lwp_callback): Remove.
1844 (linux_mourn): Use for_each_thread.
1845
1846 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1847
1848 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1849 args parameter, don't check for pid.
1850 (linux_detach): Use for_each_thread.
1851
1852 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1853
1854 * linux-low.c (struct counter): Remove.
1855 (second_thread_of_pid_p): Remove.
1856 (last_thread_of_process_p): Use find_thread.
1857
1858 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1859
1860 * inferiors.c (find_inferior_in_random): Remove.
1861 * inferiors.h (find_inferior_in_random): Remove.
1862 * linux-low.c (status_pending_p_callback): Return bool, accept
1863 parameter ptid directly.
1864 (linux_wait_for_event_filtered): Use find_thread_in_random.
1865 (linux_wait_1): Likewise.
1866
1867 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1868
1869 * inferiors.c (find_inferior_id): Remove.
1870 (find_thread_ptid): Move implemention from find_inferior_id to
1871 here.
1872 * inferiors.h (find_inferior_id): Remove.
1873 * server.c (handle_status): Use find_thread_ptid.
1874 (process_serial_event): Likewise.
1875 * thread-db.c (find_one_thread): Likewise.
1876 (thread_db_thread_handle): Likewise.
1877 * win32-low.c (thread_rec): Likewise.
1878 (child_delete_thread): Likewise.
1879 (win32_thread_alive): Likewise.
1880 (get_child_debug_event): Likewise.
1881
1882 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * linux-mips-low.c (update_watch_registers_callback): Return
1885 void, remove pid_p parameter, don't check for pid.
1886 (mips_insert_point, mips_remove_point): Use for_each_thread.
1887
1888 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 * lynx.low (lynx_delete_thread_callback): Remove.
1891 (lynx_mourn): Use for_each_thread.
1892
1893 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1894
1895 * regcache.c (regcache_invalidate_one): Remove.
1896 (regcache_invalidate_pid): use for_each_thread.
1897
1898 2017-11-26 Tom Tromey <tom@tromey.com>
1899
1900 * linux-low.c (linux_create_inferior): Update.
1901
1902 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1903
1904 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1905
1906 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1907
1908 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1909 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1910 * linux-aarch64-tdesc-selftest.c: New file.
1911 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1912
1913 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1914
1915 * configure.srv: Add new file.
1916 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1917 * linux-aarch64-tdesc-selftest.c: New file.
1918 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1919
1920 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1921
1922 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1923 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1924 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1925
1926 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1927
1928 * configure.srv: Add new files.
1929 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1930 aarch64_linux_read_description.
1931 * linux-aarch64-low.c (aarch64_linux_read_description):
1932 Merge with aarch64_arch_setup.
1933 (aarch64_arch_setup): Call aarch64_linux_read_description.
1934 * linux-aarch64-tdesc.c: New file.
1935 * linux-aarch64-tdesc.h: New file.
1936
1937 2017-11-24 Yao Qi <yao.qi@linaro.org>
1938
1939 * configure.srv: Set $srv_regobj for tic6x-linux.
1940 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1941 (tic6x_read_description): Move some code to tic6x_arch_setup.
1942 (tic6x_tdesc_test): New function.
1943 (initialize_low_arch): Call selftests::register_test.
1944
1945 2017-11-22 Yao Qi <yao.qi@linaro.org>
1946
1947 * remote-utils.c (prepare_resume_reply): Use memcpy.
1948
1949 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * linux-low.c (kill_one_lwp_callback): Return void, take
1952 argument directly, don't filter on pid.
1953 (linux_kill): Use for_each_thread.
1954
1955 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1956
1957 * linux-low.c (need_step_over_p): Return bool, remove dummy
1958 argument.
1959 (linux_resume, proceed_all_lwps): Use find_thread.
1960
1961 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1962
1963 * linux-low.c (resume_status_pending_p): Return bool, remove
1964 flag_p argument.
1965 (linux_resume): Use find_thread.
1966
1967 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1968
1969 * linux-low.c (struct thread_resume_array): Remove.
1970 (linux_set_resume_request): Return void, take arguments
1971 directly.
1972 (linux_resume): Use for_each_thread.
1973
1974 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1975
1976 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1977 return bool, remove data argument.
1978 (linux_stabilize_threads): Use find_thread.
1979
1980 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * linux-low.c (unsuspend_one_lwp): Remove.
1983 (unsuspend_all_lwps): Use for_each_thread, inline code from
1984 unsuspend_one_lwp.
1985
1986 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1987
1988 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1989 * linux-low.c (struct iterate_over_lwps_args): Remove.
1990 (iterate_over_lwps_filter): Remove.
1991 (iterate_over_lwps): Use find_thread.
1992
1993 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1994
1995 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1996 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1997 code from reset_lwp_ptrace_options_callback.
1998
1999 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * linux-arm-low.c (struct update_registers_data): Remove.
2002 (update_registers_callback): Return void, take arguments
2003 directly, don't check thread's pid.
2004 (arm_insert_point, arm_remove_point): Use for_each_thread.
2005
2006 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2007
2008 * win32-low.c (continue_one_thread): Return void, take argument
2009 directly.
2010 (child_continue): Use for_each_thread.
2011
2012 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * win32-i386-low.c (update_debug_registers_callback): Rename
2015 to ...
2016 (update_debug_registers): ... this, return void, remove pid_p arg.
2017 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2018
2019 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2020
2021 * inferiors.h (struct process_info): Add constructor, initialize
2022 fields..
2023 <syscalls_to_catch>: Change type to std::vector<int>.
2024 * inferiors.c (add_process): Allocate process_info with new.
2025 (remove_process): Free process_info with delete.
2026 * linux-low.c (handle_extended_wait): Adjust.
2027 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2028 * server.c (handle_general_set): Adjust.
2029
2030 2017-11-16 Pedro Alves <palves@redhat.com>
2031
2032 * remote-utils.c (remote_close): Block SIGIO signals instead of
2033 uninstalling the SIGIO handler.
2034
2035 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2036
2037 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2038
2039 2017-11-16 Yao Qi <yao.qi@linaro.org>
2040
2041 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2042 (tic6x_store_gregset): Likewise.
2043 (tic6x_usrregs_info): Move it up.
2044
2045 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2046
2047 * Makefile.in: Update arch rules.
2048 * configure.srv: Explicitly mark arch/ files.
2049
2050 2017-11-13 Andreas Schwab <schwab@suse.de>
2051
2052 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2053 function.
2054 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2055
2056 2017-11-06 Pedro Alves <palves@redhat.com>
2057
2058 * config.in, configure: Regenerate.
2059
2060 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * target.c (struct thread_search): Remove.
2063 (thread_search_callback): Remove.
2064 (prepare_to_access_memory): Use for_each_thread instead of
2065 find_inferior. Inline code from thread_search_callback.
2066
2067 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2068
2069 * server.c (struct visit_actioned_threads_data): Remove.
2070 (visit_actioned_threads): Change prototype to take arguments
2071 directly.
2072 (resume): Use find_thread instead of find_inferior.
2073
2074 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2075
2076 * server.c (queue_stop_reply_callback): Change prototype, return
2077 void.
2078 (find_status_pending_thread_callback): Remove.
2079 (handle_status): Replace find_inferior with find_thread and
2080 for_each_thread.
2081
2082 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2083
2084 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2085 with REGNO.
2086 (aarch64_store_gregset): Likewise.
2087 (aarch64_fill_fpregset): Likewise.
2088 (aarch64_store_fpregset): Likewise.
2089
2090 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2091
2092 * gdbthread.h (find_thread, for_each_thread): New functions.
2093 * inferiors.c (thread_of_pid): Remove.
2094 (find_any_thread_of_pid): Use find_thread.
2095 * linux-low.c (num_lwps): Use for_each_thread.
2096
2097 2017-10-17 Yao Qi <yao.qi@linaro.org>
2098
2099 * Makefile.in: Remove one rule.
2100 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2101
2102 2017-10-17 Yao Qi <yao.qi@linaro.org>
2103
2104 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2105 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2106
2107 2017-10-17 Yao Qi <yao.qi@linaro.org>
2108
2109 * configure.srv: Rename arm.o with arch/arm.o.
2110
2111 2017-10-17 Yao Qi <yao.qi@linaro.org>
2112
2113 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2114 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2115 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2116 (arch-i386.o, arch-amd64.o): Remove rules.
2117 (arch/%.o): New rule.
2118 Update POSTCOMPILE and COMPILE.pre.
2119 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2120 * configure: Re-generated.
2121 * configure.srv: Replace arch-i386.o with arch/i386.o.
2122 Replace arch-amd64.o with arch/amd64.o.
2123
2124 2017-10-16 Yao Qi <yao.qi@linaro.org>
2125
2126 * configure: Regenerated.
2127
2128 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2129
2130 * inferiors.h: (struct inferior_list): Remove.
2131 (struct inferior_list_entry); Remove.
2132 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2133 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2134 get_first_inferior): Remove.
2135 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2136 find_inferior_id, find_inferior_in_random): Change signature.
2137 * inferiors.c (all_threads): Change type to
2138 std::list<thread_info *>.
2139 (get_thread): Remove macro.
2140 (find_inferior, find_inferior_id): Change signature, implement
2141 using find_thread.
2142 (find_inferior_in_random): Change signature, implement using
2143 find_thread_in_random.
2144 (for_each_inferior, for_each_inferior_with_data): Change
2145 signature, implement using for_each_thread.
2146 (add_inferior_to_list, remove_inferior): Remove.
2147 (add_thread, get_first_thread, thread_of_pid,
2148 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2149 (get_first_inferior, one_inferior_p, clear_inferior_list):
2150 Remove.
2151 (clear_inferiors, get_thread_process): Update.
2152 * gdbthread.h: Include <list>.
2153 (struct thread_info) <entry>: Remove field.
2154 <id>: New field.
2155 (all_threads): Change type to std::list<thread_info *>.
2156 (get_first_inferior): Add doc.
2157 (find_thread, for_each_thread, find_thread_in_random): New
2158 functions.
2159 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2160 * linux-arm-low.c (update_registers_callback): Update.
2161 * linux-low.c (second_thread_of_pid_p): Update.
2162 (kill_one_lwp_callback, linux_detach_lwp_callback,
2163 delete_lwp_callback, status_pending_p_callback, same_lwp,
2164 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2165 iterate_over_lwps, not_stopped_callback,
2166 resume_stopped_resumed_lwps, count_events_callback,
2167 select_singlestep_lwp_callback, select_event_lwp_callback,
2168 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2169 suspend_and_send_sigstop_callback, wait_for_sigstop,
2170 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2171 lwp_running, linux_set_resume_request, resume_status_pending_p,
2172 need_step_over_p, start_step_over, linux_resume_one_thread,
2173 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2174 reset_lwp_ptrace_options_callback): Update.
2175 * linux-mips-low.c (update_watch_registers_callback): Update.
2176 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2177 Update.
2178 (free_register_cache_thread_one): Remove.
2179 (regcache_release): Update.
2180 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2181 handle_qxfer_threads_worker): Update.
2182 (handle_query): Update, use list iterator.
2183 (visit_actioned_threads, handle_pending_status,
2184 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2185 clear_pending_status_callback, set_pending_status_callback,
2186 find_status_pending_thread_callback, handle_status,
2187 process_serial_event): Update.
2188 * target.c (thread_search_callback): Update.
2189 * thread-db.c (thread_db_get_tls_address): Update.
2190 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2191 Update.
2192 * win32-i386-low.c (update_debug_registers_callback): Update.
2193 * win32-low.c (delete_thread_info, child_delete_thread,
2194 continue_one_thread, suspend_one_thread,
2195 get_child_debug_event): Adjust.
2196
2197 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2198
2199 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2200 * inferiors.h: Include <list>.
2201 (struct process_info) <entry>: Remove field.
2202 <pid>: New field.
2203 (pid_of): Change macro to function.
2204 (ptid_of, lwpid_of): Remove macro.
2205 (all_processes): Change type to std::list<process_info *>.
2206 (ALL_PROCESSES): Remove macro.
2207 (for_each_process, find_process): New function.
2208 * inferiors.c (all_processes): Change type to
2209 std::list<process_info *>.
2210 (find_thread_process): Adjust.
2211 (add_process): Likewise.
2212 (remove_process): Likewise.
2213 (find_process_pid): Likewise.
2214 (get_first_process): Likewise.
2215 (started_inferior_callback): Remove.
2216 (have_started_inferiors_p): Adjust.
2217 (attached_inferior_callback): Remove.
2218 (have_attached_inferiors_p): Adjust.
2219 * linux-low.c (check_zombie_leaders): Likewise.
2220 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2221 (x86_linux_update_xmltarget): Adjust.
2222 * server.c (handle_query): Likewise.
2223 (gdb_reattached_process): Remove.
2224 (handle_status): Adjust.
2225 (kill_inferior_callback): Likewise.
2226 (detach_or_kill_inferior): Remove.
2227 (print_started_pid): Likewise.
2228 (print_attached_pid): Likewise.
2229 (detach_or_kill_for_exit): Update.
2230 (process_serial_event): Likewise.
2231 * linux-arm-low.c (arm_new_fork): Likewise.
2232
2233 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2234
2235 * dll.h: Include <list>.
2236 (struct dll_info): Add constructor.
2237 <entry>: Remove field.
2238 (all_dlls): Change type to std::list<dll_info>.
2239 * dll.c: Include <algorithm>.
2240 (get_dll): Remove macro.
2241 (all_dlls): Change type to std::list<dll_info *>.
2242 (free_one_dll): Remove.
2243 (match_dll): Likewise.
2244 (loaded_dll): Adjust.
2245 (unloaded_dll): Adjust to all_dlls type change, use
2246 std::find_if. Inline code from match_dll.
2247 (clear_dlls): Adjust to all_dlls type change.
2248 * server.c (emit_dll_description): Remove.
2249 (handle_qxfer_libraries): Adjust to all_dlls type change,
2250 integrate emit_dll_description's functionality.
2251
2252 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2253
2254 * linux-low.h (struct linux_target_ops) <delete_process>: New
2255 field.
2256 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2257 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2258 (struct linux_target_ops): Add delete_process callback.
2259 * linux-arm-low.c (arm_delete_process): New.
2260 (struct linux_target_ops): Add delete_process callback.
2261 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2262 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2263 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2264 * linux-mips-low.c (mips_linux_delete_process): New.
2265 (struct linux_target_ops): Add delete_process callback.
2266 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2267 * linux-s390-low.c (struct linux_target_ops): Likewise.
2268 * linux-sh-low.c (struct linux_target_ops): Likewise.
2269 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2270 * linux-tile-low.c (struct linux_target_ops): Likewise.
2271 * linux-x86-low.c (x86_linux_delete_process): New.
2272 (struct linux_target_ops): Add delete_process callback.
2273 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2274
2275 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2276
2277 * linux-aarch64-low.c (the_low_target): Add thread delete
2278 callback.
2279 * linux-arm-low.c (arm_delete_thread): New function.
2280 (the_low_target): Add thread delete callback.
2281 * linux-bfin-low.c (the_low_target): Likewise.
2282 * linux-crisv32-low.c (the_low_target): Likewise.
2283 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2284 set.
2285 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2286 field.
2287 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2288 * linux-mips-low.c (mips_linux_delete_thread): New function.
2289 (the_low_target): Add thread delete callback.
2290 * linux-ppc-low.c (the_low_target): Likewise.
2291 * linux-s390-low.c (the_low_target): Likewise.
2292 * linux-sh-low.c (the_low_target): Likewise.
2293 * linux-tic6x-low.c (the_low_target): Likewise.
2294 * linux-tile-low.c (the_low_target): Likewise.
2295 * linux-x86-low.c (the_low_target): Likewise.
2296 * linux-xtensa-low.c (the_low_target): Likewise.
2297
2298 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2299
2300 * win32-low.c: Include "common-inferior.h".
2301
2302 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2303
2304 * inferiors.c (set_inferior_cwd): New function.
2305 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2306 (handle_query): Inform that QSetWorkingDir is supported.
2307 * win32-low.c (create_process): Pass the inferior's cwd to
2308 CreateProcess.
2309
2310 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2311
2312 * inferiors.c (current_inferior_cwd): New global variable.
2313 (get_inferior_cwd): New function.
2314 * inferiors.h (struct process_info) <cwd>: New field.
2315
2316 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2317
2318 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2319 (OBS): Add gdb_tilde_expand.o.
2320
2321 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2322
2323 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2324 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2325
2326 2017-09-29 Pedro Alves <palves@redhat.com>
2327
2328 * ax.c (gdb_parse_agent_expr): Constify.
2329 * ax.h (gdb_parse_agent_expr): Constify.
2330 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2331 Constify.
2332 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2333 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2334 * remote-utils.h (read_ptid): Constify.
2335 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2336 (process_point_options, process_serial_event): Constify.
2337 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2338 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2339 (cmd_qtbuffer): Constify.
2340
2341 2017-09-29 Pedro Alves <palves@redhat.com>
2342
2343 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2344 fails.
2345
2346 2017-09-29 Pedro Alves <palves@redhat.com>
2347
2348 * linux-low.c (handle_extended_wait): Pass parent thread instead
2349 of process to thread_db_notice_clone.
2350 * linux-low.h (thread_db_notice_clone): Replace parent process
2351 parameter with parent thread parameter.
2352 * thread-db.c (find_one_thread): Add comment.
2353 (thread_db_notice_clone): Replace parent process parameter with
2354 parent thread parameter. Temporarily switch to the parent thread.
2355
2356 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2357
2358 * gdbthread.h: Include "common-gdbthread.h".
2359 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2360 "if" when validating the ptid.
2361 * remote-utils.c: Include "gdbthread.h".
2362 (prepare_resume_reply): Use "switch_to_thread".
2363 * target.c (done_accessing_memory): Likewise.
2364
2365 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2366
2367 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2368 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2369 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2370 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2371 s390x-gs-linux64-ipa.o to ipa_obj.
2372 * linux-s390-low.c (HWCAP_S390_GS): New define.
2373 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2374 New functions.
2375 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2376 (s390_arch_setup): Check for guarded-storage support and choose
2377 appropriate tdesc.
2378 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2379 init_registers_s390x_gs_linux64.
2380 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2381 enum value.
2382 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2383 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2384
2385 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2388
2389 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2390
2391 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2392 (thread_db_thread_handle): Declare.
2393 * linux-low.c (linux_target_ops): Initialize thread_handle.
2394 * server.c (handle_qxfer_threads_worker): Add support for
2395 "handle" attribute.
2396 * target.h (struct target_ops): Add new function pointer,
2397 thread_handle.
2398 (target_thread_handle): Define.
2399 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2400 field in lwp.
2401 (thread_db_thread_handle): New function.
2402
2403 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2404
2405 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2406 * linux-low.h (thread_db_notice_clone): Declare.
2407 * thread-db.c (thread_db_notice_clone): New function.
2408
2409 2017-09-21 Pedro Alves <palves@redhat.com>
2410
2411 * server.c (gdb_read_memory, handle_status, process_serial_event)
2412 (handle_serial_event, handle_target_event): Adjust to
2413 set_desired_thread prototype change.
2414 * target.c (set_desired_thread): Remove 'use_general' parameter
2415 and adjust.
2416 * target.h (set_desired_thread): Remove 'use_general' parameter.
2417
2418 2017-09-20 Tom Tromey <tom@tromey.com>
2419
2420 * target.c (target_terminal::terminal_state): Define.
2421 (target_terminal::init): Rename from target_terminal_init.
2422 (target_terminal::inferior): Rename from
2423 target_terminal_inferior.
2424 (target_terminal::ours): Rename from target_terminal_ours.
2425 (target_terminal::ours_for_output, target_terminal::info): New.
2426
2427 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2428
2429 * server.c (accumulate_file_name_length): Remove.
2430 (emit_dll_description): Adjust to std::string change.
2431 (handle_qxfer_libraries): Use std::string to hold document.
2432
2433 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2436 return type of xml_escape_text.
2437 * server.c (emit_dll_description): Likewise.
2438
2439 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * server.c (captured_main): Accept argument for --selftest.
2442 Update run_tests call.
2443 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2444 when registering selftests.
2445
2446 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2447
2448 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2449 instead of "VEC" for "target_desc.reg_defs".
2450 (regcache_cpy): Likewise.
2451 (registers_to_string): Likewise.
2452 (registers_from_string): Likewise.
2453 (find_regno): Likewise.
2454 (supply_regblock): Likewise.
2455 (regcache_raw_read_unsigned): Likewise.
2456 * tdesc.c (init_target_desc): Likewise.
2457 (tdesc_create_reg): Likewise.
2458 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2459 (struct target_desc) <reg_defs>: Convert to "std::vector".
2460 (target_desc): Do not initialize "reg_defs".
2461 (~target_desc): Update code to use "std::vector" instead of "VEC"
2462 for "target_desc.reg_defs".
2463 (operator==): Likewise.
2464
2465 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2466
2467 * inferiors.h (thread_to_gdb_id): Remove.
2468 * inferiors.c (thread_to_gdb_id): Remove.
2469 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2470 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2471 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2472 Likewise.
2473 * nto-low.c (nto_fetch_registers, nto_store_registers,
2474 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2475
2476 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2477
2478 * inferiors.h (gdb_id_to_thread_id): Remove.
2479 * inferiors.c (gdb_id_to_thread_id): Remove.
2480 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2481 removal. Move pid declaration closer to where it's used.
2482
2483 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2484
2485 * server.c (handle_detach): New function.
2486 (process_serial_event): Move code out, call handle_detach.
2487
2488 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2489
2490 * server.c (require_running): Rename to ...
2491 (require_running_or_return): ... this ...
2492 (require_running_or_break): ... and this.
2493 (handle_query, process_serial_event): Adjust.
2494
2495 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2496
2497 * linux-low.c (linux_set_resume_request): Remove unused
2498 variables.
2499
2500 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2501
2502 * server.c (first_thread_of): Remove.
2503 (process_serial_event): Replace usage of first_thread_of with
2504 find_any_thread_of_pid.
2505 * tracepoint.c (same_process_p): Remove.
2506 (gdb_agent_about_to_close): Replace usage of same_process_p with
2507 find_any_thread_of_pid.
2508 * linux-x86-low.c (same_process_callback): Remove.
2509 (x86_arch_setup_process_callback): Replace usage of
2510 same_process_callback with find_any_thread_of_pid.
2511 * thread-db.c (any_thread_of): Remove.
2512 (switch_to_process): Replace usage of any_thread_of with
2513 find_any_thread_of_pid.
2514 * inferiors.c (thread_pid_matches_callback): Remove.
2515 (find_thread_process): Adjust to use find_any_thread_of_pid.
2516
2517 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2518
2519 * regcache.c (get_thread_regcache): Guard calls to "memset"
2520 with "!VEC_empty".
2521
2522 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2523
2524 * linux-low.c (handle_extended_wait): Use
2525 "allocate_target_description" instead of "XNEW".
2526 * linux-x86-low.c (initialize_low_arch): Likewise.
2527
2528 2017-09-05 Yao Qi <yao.qi@linaro.org>
2529
2530 * configure.srv (srv_i386_regobj): Remove.
2531 (srv_amd64_regobj): Remove.
2532 (srv_regobj): Set it to "" for x86 non-linux targets.
2533 * linux-x86-tdesc.c (i386_linux_read_description):
2534 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2535 (init_registers_i386): Remove the declaration.
2536 (tdesc_i386): Remove the declaration.
2537 (lynx_i386_arch_setup): Call i386_create_target_description.
2538 * nto-x86-low.c: Likewise.
2539 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2540 [!__x86_64__]: include arch/i386.h.
2541 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2542
2543 2017-09-05 Yao Qi <yao.qi@linaro.org>
2544
2545 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2546 i386/amd64-XXX-linux from it.
2547
2548 2017-09-05 Yao Qi <yao.qi@linaro.org>
2549
2550 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2551 false.
2552 (ipa_amd64_linux_regobj): Remove.
2553 (ipa_x32_linux_regobj): Remove.
2554
2555 2017-09-05 Yao Qi <yao.qi@linaro.org>
2556
2557 * Makefile.in (arch-amd64.o): New rule.
2558 * configure.srv: Append arch-amd64.o.
2559 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2560 (get_ipa_tdesc): Call amd64_linux_read_description.
2561 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2562 and init_registers_amd64_XXX.
2563 * linux-x86-low.c (x86_linux_read_description): Call
2564 amd64_linux_read_description.
2565 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2566 (initialize_low_arch): Don't call init_registers_x32_XXX and
2567 init_registers_amd64_XXX.
2568 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2569 and tdesc_amd64_XXX.
2570 [__x86_64__] (amd64_tdesc_test): New function.
2571 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2572 and init_registers_amd64_XXX.
2573 * linux-x86-tdesc.c: Include arch/amd64.h.
2574 (xcr0_to_tdesc_idx): New function.
2575 (i386_linux_read_description): New function.
2576 (amd64_get_ipa_tdesc_idx): New function.
2577 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2578 (amd64_get_ipa_tdesc): Declare.
2579
2580 2017-09-05 Yao Qi <yao.qi@linaro.org>
2581
2582 * configure.srv (srv_i386_linux_xmlfiles): Remove
2583 i386/i386-XXX-linux.xml from it.
2584
2585 2017-09-05 Yao Qi <yao.qi@linaro.org>
2586
2587 * configure.srv: Set srv_i386_linux_regobj empty if $development
2588 is false.
2589 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2590 initialize_low_tdesc.
2591 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2592 with #if initialize_low_tdesc.
2593 * linux-x86-tdesc-selftest.c: New file.
2594 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2595
2596 2017-09-05 Yao Qi <yao.qi@linaro.org>
2597
2598 * Makefile.in (arch-i386.o): New rule.
2599 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2600 (x86_64-*-linux*): Likewise.
2601 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2602 include arch/i386.h.
2603 (i386_linux_read_description): Remove code and call
2604 i386_create_target_description.
2605 * tdesc.c (allocate_target_description): New function.
2606 * tdesc.h (set_tdesc_architecture): Remove declaration.
2607 (set_tdesc_osabi): Likewise.
2608
2609 2017-09-05 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2612 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2613 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2614 .xmltarget.
2615 * server.c (get_features_xml): Call tdesc_get_features_xml.
2616 * tdesc.c (set_tdesc_architecture): New function.
2617 (set_tdesc_osabi): New function.
2618 (tdesc_get_features_xml): New function.
2619 (tdesc_create_feature): Add an argument.
2620 * tdesc.h (struct target_desc) <features>: New field.
2621 <arch, osabi>: New field.
2622 (~target_desc): xfree features, arch, and osabi.
2623 (target_desc::oerator==): Don't compare .xmltarget.
2624 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2625 (set_tdesc_osabi): Likewise.
2626 (tdesc_get_features_xml): Likewise.
2627
2628 2017-09-05 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-x86-tdesc.c: Include selftest.h.
2631 (i386_tdesc_test): New function.
2632 (initialize_low_tdesc): Call selftests::register_test.
2633 * tdesc.h: Include regdef.h.
2634 (target_desc): Override operator == and !=.
2635
2636 2017-09-05 Yao Qi <yao.qi@linaro.org>
2637
2638 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2639 (ipa_obj): Likewise.
2640 * linux-i386-ipa.c: Include common/x86-xstate.h
2641 (get_ipa_tdesc): Call i386_linux_read_description.
2642 (initialize_low_tracepoint): Don't call init_registers_XXX
2643 functions, call initialize_low_tdesc instead.
2644 * linux-x86-low.c (x86_linux_read_description): Call
2645 i386_linux_read_description.
2646 (initialize_low_arch): Don't call init_registers_i386_XXX
2647 functions, call initialize_low_tdesc.
2648 * linux-x86-tdesc.c: New file.
2649 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2650 (i386_get_ipa_tdesc_idx): Declare.
2651 (i386_get_ipa_tdesc): Declare.
2652 (initialize_low_tdesc): Declare.
2653
2654 2017-09-05 Yao Qi <yao.qi@linaro.org>
2655
2656 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2657 instead of 0.
2658
2659 2017-09-05 Yao Qi <yao.qi@linaro.org>
2660
2661 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2662 * regcache.c (get_thread_regcache): Use VEC_length.
2663 (init_register_cache): Likewise.
2664 (regcache_cpy): Likewise.
2665 (registers_to_string): Iterate reg_defs via VEC_iterate.
2666 (find_regno): Likewise.
2667 (find_register_by_number): Use VEC_index.
2668 (register_size): Call find_register_by_number.
2669 (register_data): Call find_register_by_number.
2670 (supply_regblock): Use VEC_length.
2671 (regcache_raw_read_unsigned): Likewise.
2672 * tdesc.c (init_target_desc): Iterate reg_defs via
2673 VEC_iterate.
2674 (default_description): Update initializer.
2675 (copy_target_description): Don't update field num_registers.
2676 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2677 <num_registers>: Remove.
2678
2679 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2680
2681 * Makefile.in (.SECONDARY): Define target.
2682
2683 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2684
2685 * linux-low.c (linux_wait_1): Adjust.
2686 * server.c (queue_stop_reply_callback): Adjust.
2687
2688 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2689
2690 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2691 QEnvironmentUnset and QEnvironmentReset packets.
2692 (handle_query): Inform remote that QEnvironmentHexEncoded,
2693 QEnvironmentUnset and QEnvironmentReset are supported.
2694
2695 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2696
2697 * inferiors.h (inferior_target_data): Rename to ...
2698 (thread_target_data): ... this.
2699 (inferior_regcache_data): Rename to ...
2700 (thread_regcache_data): ... this.
2701 (set_inferior_regcache_data): Rename to ...
2702 (set_thread_regcache_data): ... this.
2703 * inferiors.c (inferior_target_data): Rename to ...
2704 (thread_target_data): ... this.
2705 (inferior_regcache_data): Rename to ...
2706 (thread_regcache_data): ... this.
2707 (set_inferior_regcache_data): Rename to ...
2708 (set_thread_regcache_data): ... this.
2709 (free_one_thread): Update.
2710 * linux-low.h (get_thread_lwp): Update.
2711 * regcache.c (get_thread_regcache): Update.
2712 (regcache_invalidate_thread): Update.
2713 (free_register_cache_thread): Update.
2714 * win32-i386-low.c (update_debug_registers_callback): Update.
2715 (win32_get_current_dr): Update.
2716 * win32-low.c (thread_rec): Update.
2717 (delete_thread_info): Update.
2718 (continue_one_thread): Update.
2719 (suspend_one_thread): Update.
2720
2721 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * inferiors.c (set_inferior_target_data): Remove.
2724 * inferiors.h (set_inferior_target_data): Remove.
2725
2726 2017-08-18 Yao Qi <yao.qi@linaro.org>
2727
2728 * Makefile.in (OBS): Add selftest.o.
2729 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2730 * configure, config.in: Re-generated.
2731 * server.c: Include common/sefltest.h.
2732 (captured_main): Handle option --selftest.
2733
2734 2017-08-09 Yao Qi <yao.qi@linaro.org>
2735
2736 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2737 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2738 i386-avx-mpx.o and i386-mmx.o.
2739 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2740 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2741 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2742 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2743 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2744 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2745 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2746 i386/amd64-avx-mpx.xml.
2747
2748 2017-08-09 Yao Qi <yao.qi@linaro.org>
2749
2750 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2751 and x32-avx-avx512.o.
2752 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2753 i386/x32-avx-avx512.xml.
2754
2755 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * tracepoint.h (enum class fast_tpoint_collect_result): New
2758 enumeration.
2759 (fast_tracepoint_collecting): Change return type to
2760 fast_tpoint_collect_result.
2761 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2762 * linux-low.h: Include tracepoint.h.
2763 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2764 fast_tpoint_collect_result.
2765 * linux-low.c (handle_tracepoints): Adjust.
2766 (linux_fast_tracepoint_collecting): Change return type to
2767 fast_tpoint_collect_result.
2768 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2769 linux_wait_1, stuck_in_jump_pad_callback,
2770 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2771 proceed_one_lwp): Adjust to type change.
2772
2773 2017-07-10 Yao Qi <yao.qi@linaro.org>
2774
2775 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2776
2777 2017-06-29 Yao Qi <yao.qi@linaro.org>
2778
2779 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2780 Remove.
2781 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2782
2783 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2784
2785 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2786
2787 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2788
2789 * linux-low.c (linux_create_inferior): Adjust code to access the
2790 environment information via 'gdb_environ' class.
2791 * lynx-low.c (lynx_create_inferior): Likewise.
2792 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2793 (get_environ): Return a pointer to 'our_environ'.
2794 (captured_main): Initialize 'our_environ'.
2795 * server.h (get_environ): Adjust prototype.
2796 * spu-low.c (spu_create_inferior): Adjust code to access the
2797 environment information via 'gdb_environ' class.
2798
2799 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2800
2801 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2802 usage of "register" keyword.
2803
2804 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2805
2806 * configure: Re-generate.
2807
2808 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2809
2810 * configure: Re-generate.
2811
2812 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2813
2814 * Makefile.in (COMPILE.pre): Add "-x c++".
2815
2816 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2817
2818 * fork-child.c: Conditionally include <signal.h>.
2819
2820 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2821
2822 * server.c (handle_general_set): Handle new packet
2823 "QStartupWithShell".
2824 (handle_query): Add "QStartupWithShell" to the list of supported
2825 packets.
2826 (gdbserver_usage): Add help text explaining the
2827 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2828 options.
2829 (captured_main): Recognize and act upon the presence of the new
2830 CLI options.
2831
2832 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2833 Pedro Alves <palves@redhat.com>
2834
2835 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2836 * configure: Regenerate.
2837 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2838 "fork-inferior.o".
2839 (i[34567]86-*-lynxos*): Likewise.
2840 (spu*-*-*): Likewise.
2841 * fork-child.c: New file.
2842 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2843 and "environ.h".
2844 (linux_ptrace_fun): New function.
2845 (linux_create_inferior): Adjust function prototype to reflect
2846 change on "target.h". Adjust function code to use
2847 "fork_inferior".
2848 (linux_request_interrupt): Delete "signal_pid".
2849 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2850 (lynx_ptrace_fun): New function.
2851 (lynx_create_inferior): Adjust function prototype to reflect
2852 change on "target.h". Adjust function code to use
2853 "fork_inferior".
2854 * nto-low.c (nto_create_inferior): Adjust function prototype and
2855 code to reflect change on "target.h". Update comments.
2856 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2857 "common-terminal.h" and "environ.h".
2858 (terminal_fd): Moved to fork-child.c.
2859 (old_foreground_pgrp): Likewise.
2860 (restore_old_foreground_pgrp): Likewise.
2861 (last_status): Make it global.
2862 (last_ptid): Likewise.
2863 (our_environ): New variable.
2864 (startup_with_shell): Likewise.
2865 (program_name): Likewise.
2866 (program_argv): Rename to...
2867 (program_args): ...this.
2868 (wrapper_argv): New variable.
2869 (start_inferior): Delete function.
2870 (get_exec_wrapper): New function.
2871 (get_exec_file): Likewise.
2872 (get_environ): Likewise.
2873 (prefork_hook): Likewise.
2874 (post_fork_inferior): Likewise.
2875 (postfork_hook): Likewise.
2876 (postfork_child_hook): Likewise.
2877 (handle_v_run): Update code to deal with arguments coming from the
2878 remote host. Update calls from "start_inferior" to
2879 "create_inferior".
2880 (captured_main): Likewise. Initialize environment variable. Call
2881 "have_job_control".
2882 * server.h (post_fork_inferior): New prototype.
2883 (get_environ): Likewise.
2884 (last_status): Declare.
2885 (last_ptid): Likewise.
2886 (signal_pid): Likewise.
2887 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2888 (spu_ptrace_fun): New function.
2889 (spu_create_inferior): Adjust function prototype to reflect change
2890 on "target.h". Adjust function code to use "fork_inferior".
2891 * target.c (target_terminal_init): New function.
2892 (target_terminal_inferior): Likewise.
2893 (target_terminal_ours): Likewise.
2894 * target.h: Include <vector>.
2895 (struct target_ops) <create_inferior>: Update prototype.
2896 (create_inferior): Update macro.
2897 * utils.c (gdb_flush_out_err): New function.
2898 * win32-low.c (win32_create_inferior): Adjust function prototype
2899 and code to reflect change on "target.h".
2900
2901 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2902
2903 * inferiors.c (switch_to_thread): New function.
2904
2905 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2906
2907 * Makefile.in (SFILE): Add "common/job-control.c".
2908 (OBS): Add "job-control.o".
2909
2910 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2911
2912 * Makefile: Remove "@host_makefile_frag@".
2913
2914 2017-05-05 Pedro Alves <palves@redhat.com>
2915
2916 * configure: Regenerate.
2917
2918 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2919
2920 * configure: Regenerate.
2921
2922 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2923
2924 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2925 software_single_step change of return type to
2926 std::vector<CORE_ADDR>.
2927 * linux-low.c (install_software_single_step_breakpoints):
2928 Likewise.
2929 * linux-low.h (install_software_single_step_breakpoints):
2930 Likewise.
2931
2932 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2933
2934 * remote-utils.c: Include "gdb_termios.h" instead of
2935 "terminal.h".
2936 * terminal.h: Delete file.
2937
2938 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2939
2940 * server.c: Include <vector>.
2941 <program_argv, wrapper_argv>: Convert to std::vector.
2942 (start_inferior): Rewrite function to use C++.
2943 (handle_v_run): Likewise. Update code that calculates the argv
2944 based on the vRun packet; use C++.
2945 (captured_main): Likewise.
2946
2947 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2948
2949 * server.c (handle_v_cont): Initialize thread_resume::thread
2950 with null_ptid.
2951
2952 2017-04-05 Pedro Alves <palves@redhat.com>
2953
2954 * configure: Regenerate.
2955
2956 2017-04-05 Pedro Alves <palves@redhat.com>
2957
2958 * gdbreplay.c (sync_error): Constify.
2959 * linux-x86-low.c (push_opcode): Constify.
2960
2961 2017-04-05 Pedro Alves <palves@redhat.com>
2962
2963 * win32-low.c (get_child_debug_event)
2964 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2965 Report TARGET_WAITKIND_SPURIOUS instead.
2966
2967 2017-04-05 Pedro Alves <palves@redhat.com>
2968
2969 * remote-utils.c (remote_prepare, remote_open): Constify.
2970 * remote-utils.h (remote_prepare, remote_open): Constify.
2971 * server.c (captured_main): Constify 'port' handling.
2972
2973 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2974
2975 * Makefile.in (clean): Clear .deps.
2976
2977 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2978
2979 * .gitignore: Remove generated files, replace with wildcard.
2980 * (clean): Replace removal of generated files with wildcard.
2981 (version.c): Replace with...
2982 (version-generated.c): ...this.
2983 (xml-builtin.c): Replace with...
2984 (xml-builtin-generated.c): ...this.
2985 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2986 (%.c: *regformats*): Replace with...
2987 (%-generated.c: *regformats*): ...this.
2988
2989 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2990
2991 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2992 (xtensa_fill_gregset): Call collect_register_by_name for
2993 threadptr register.
2994 (xtensa_store_gregset): Call supply_register_by_name for
2995 threadptr register.
2996
2997 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2998
2999 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3000 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3001 (xtensa_store_gregset): Call supply_register for all registers in
3002 a0_regnum..a0_regnum + C0_NREGS range.
3003
3004 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3005
3006 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3007 (ax-ipa.o: ax.c): Remove.
3008 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3009 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3010 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3011 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3012 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3013
3014 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3015
3016 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3017 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3018 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3019 (errors-ipa.o: ../common/errors.c): Remove.
3020 (format-ipa.o: ../common/format.c): Remove.
3021 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3022
3023 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3024
3025 * Makefile.in (%-ipa.o: %.c): New rule.
3026 (tracepoint-ipa.o: tracepoint.c): Remove.
3027 (utils-ipa.o: utils.c): Remove.
3028 (remote-utils-ipa.o: remote-utils.c): Remove.
3029 (regcache-ipa.o: regcache.c): Remove.
3030 (i386-linux-ipa.o: i386-linux.c): Remove.
3031 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3032 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3033 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3034 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3035 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3036 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3037 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3038 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3039 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3040 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3041 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3042 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3043 (aarch64-ipa.o: aarch64.c): Remove.
3044 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3045 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3046 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3047 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3048 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3049 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3050 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3051 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3052 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3053 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3054 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3055 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3056 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3057 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3058 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3059 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3060 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3061 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3062 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3063 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3064 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3065 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3066 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3067 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3068 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3069 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3070 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3071 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3072 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3073 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3074 (tdesc-ipa.o: tdesc.c): Remove.
3075 (x32-linux-ipa.o: x32-linux.c): Remove.
3076 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3077 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3078
3079 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3080
3081 * Makefile.in (%.o: ../arch/%.c): New rule.
3082 (arm.o: ../arch/arm.c): Remove.
3083 (arm-linux.o: ../arch/arm-linux.c): Remove.
3084 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3085 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3086
3087 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * Makefile.in (%.o: ../nat/%.c): New rule.
3090 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3091 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3092 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3093 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3094 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3095 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3096 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3097 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3098 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3099 (linux-personality.o: ../nat/linux-personality.c): Remove.
3100 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3101 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3102 (x86-linux.o: ../nat/x86-linux.c): Remove.
3103 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3104 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3105
3106 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3107
3108 * Makefile.in (%.o: ../common/%.c): New rule.
3109 (signals.o: ../common/signals.c): Remove.
3110 (print-utils.o: ../common/print-utils.c): Remove.
3111 (rsp-low.o: ../common/rsp-low.c): Remove.
3112 (common-utils.o: ../common/common-utils.c): Remove.
3113 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3114 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3115 (vec.o: ../common/vec.c): Remove.
3116 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3117 (xml-utils.o: ../common/xml-utils.c): Remove.
3118 (ptid.o: ../common/ptid.c): Remove.
3119 (buffer.o: ../common/buffer.c): Remove.
3120 (format.o: ../common/format.c): Remove.
3121 (filestuff.o: ../common/filestuff.c): Remove.
3122 (agent.o: ../common/agent.c): Remove.
3123 (errors.o: ../common/errors.c): Remove.
3124 (environ.o: ../common/environ.c): Remove.
3125 (common-debug.o: ../common/common-debug.c): Remove.
3126 (cleanups.o: ../common/cleanups.c): Remove.
3127 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3128 (fileio.o: ../common/fileio.c): Remove.
3129 (common-regcache.o: ../common/common-regcache.c): Remove.
3130 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3131 (new-op.o: ../common/new-op.c): Remove.
3132 (btrace-common.o: ../common/btrace-common.c): Remove.
3133
3134 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3135
3136 * Makefile.in (%.o: ../target/%.c): New rule.
3137 (waitstatus.o: ../target/waitstatus.c): Remove.
3138
3139 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3140
3141 * Makefile.in
3142 (%.c: ../regformats/%.dat,
3143 (%.c: ../regformats/arm/%.dat,
3144 (%.c: ../regformats/i386/%.dat,
3145 (%.c: ../regformats/rs6000/%.dat): New rules.
3146 (aarch64.c): Remove.
3147 (reg-arm.c): Remove.
3148 (arm-with-iwmmxt.c): Remove.
3149 (arm-with-vfpv2.c): Remove.
3150 (arm-with-vfpv3.c): Remove.
3151 (arm-with-neon.c): Remove.
3152 (reg-bfin.c): Remove.
3153 (reg-cris.c): Remove.
3154 (reg-crisv32.c): Remove.
3155 (i386.c): Remove.
3156 (i386-linux.c): Remove.
3157 (i386-avx.c): Remove.
3158 (i386-avx-linux.c): Remove.
3159 (i386-avx-avx512.c): Remove.
3160 (i386-avx-avx512-linux.c): Remove.
3161 (i386-mpx.c): Remove.
3162 (i386-mpx-linux.c): Remove.
3163 (i386-avx-mpx-avx512-pku.c): Remove.
3164 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3165 (i386-avx-mpx.c): Remove.
3166 (i386-avx-mpx-linux.c): Remove.
3167 (i386-mmx.c): Remove.
3168 (i386-mmx-linux.c): Remove.
3169 (reg-ia64.c): Remove.
3170 (reg-m32r.c): Remove.
3171 (reg-m68k.c): Remove.
3172 (reg-cf.c): Remove.
3173 (mips-linux.c): Remove.
3174 (mips-dsp-linux.c): Remove.
3175 (mips64-linux.c): Remove.
3176 (mips64-dsp-linux.c): Remove.
3177 (nios2-linux.c): Remove.
3178 (powerpc-32.c): Remove.
3179 (powerpc-32l.c): Remove.
3180 (powerpc-altivec32l.c): Remove.
3181 (powerpc-cell32l.c): Remove.
3182 (powerpc-vsx32l.c): Remove.
3183 (powerpc-isa205-32l.c): Remove.
3184 (powerpc-isa205-altivec32l.c): Remove.
3185 (powerpc-isa205-vsx32l.c): Remove.
3186 (powerpc-e500l.c): Remove.
3187 (powerpc-64l.c): Remove.
3188 (powerpc-altivec64l.c): Remove.
3189 (powerpc-cell64l.c): Remove.
3190 (powerpc-vsx64l.c): Remove.
3191 (powerpc-isa205-64l.c): Remove.
3192 (powerpc-isa205-altivec64l.c): Remove.
3193 (powerpc-isa205-vsx64l.c): Remove.
3194 (s390-linux32.c): Remove.
3195 (s390-linux32v1.c): Remove.
3196 (s390-linux32v2.c): Remove.
3197 (s390-linux64.c): Remove.
3198 (s390-linux64v1.c): Remove.
3199 (s390-linux64v2.c): Remove.
3200 (s390-te-linux64.c): Remove.
3201 (s390-vx-linux64.c): Remove.
3202 (s390-tevx-linux64.c): Remove.
3203 (s390x-linux64.c): Remove.
3204 (s390x-linux64v1.c): Remove.
3205 (s390x-linux64v2.c): Remove.
3206 (s390x-te-linux64.c): Remove.
3207 (s390x-vx-linux64.c): Remove.
3208 (s390x-tevx-linux64.c): Remove.
3209 (tic6x-c64xp-linux.c): Remove.
3210 (tic6x-c64x-linux.c): Remove.
3211 (tic6x-c62x-linux.c): Remove.
3212 (reg-sh.c): Remove.
3213 (reg-sparc64.c): Remove.
3214 (reg-spu.c): Remove.
3215 (amd64.c): Remove.
3216 (amd64-linux.c): Remove.
3217 (amd64-avx.c): Remove.
3218 (amd64-avx-linux.c): Remove.
3219 (amd64-avx-avx512.c): Remove.
3220 (amd64-avx-avx512-linux.c): Remove.
3221 (amd64-mpx.c): Remove.
3222 (amd64-mpx-linux.c): Remove.
3223 (amd64-avx-mpx-avx512-pku.c): Remove.
3224 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3225 (amd64-avx-mpx.c): Remove.
3226 (amd64-avx-mpx-linux.c): Remove.
3227 (x32.c): Remove.
3228 (x32-linux.c): Remove.
3229 (x32-avx.c): Remove.
3230 (x32-avx-linux.c): Remove.
3231 (x32-avx-avx512.c): Remove.
3232 (x32-avx-avx512-linux.c): Remove.
3233 (reg-xtensa.c): Remove.
3234 (reg-tilegx.c): Remove.
3235 (reg-tilegx32.c): Remove.
3236
3237 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3238
3239 * Makefile.in (SFILES): Add "common/environ.c".
3240 (OBJS): Add "common/environ.h".
3241
3242 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3243
3244 * configure.ac: Check if the fs_base and gs_base members of
3245 `struct user_regs_struct' exist.
3246 * config.in: Regenerated.
3247 * configure: Likewise.
3248
3249 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3250
3251 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3252 target_read_memory.
3253 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3254 (get_next_pcs_syscall_next_pc): Likewise.
3255
3256 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3257
3258 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3259 * nto-x86-low.c: Likewise.
3260
3261 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3262
3263 * Makefile.in: Include disable-implicit-rules.mk.
3264
3265 2016-11-23 Pedro Alves <palves@redhat.com>
3266
3267 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3268 (debug_vprintf): Use std::chrono::steady_clock instead of
3269 gettimeofday. Use '.' instead of ':'.
3270 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3271 (get_timestamp): Use std::chrono::steady_clock instead of
3272 gettimeofday.
3273
3274 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3275
3276 * Makefile.in: Fix whitespace formatting.
3277
3278 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3279
3280 * Makefile.in (SFILES, OBS): Flatten list and order
3281 alphabetically.
3282
3283 2016-11-23 Pedro Alves <palves@redhat.com>
3284
3285 * event-loop.c (handle_file_event): Use warning.
3286 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3287 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3288 Use warning.
3289
3290 2016-11-23 Pedro Alves <palves@redhat.com>
3291
3292 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3293 output.
3294 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3295 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3296 debug_printf and debug_flush for debug output.
3297 * server.c (handle_general_set): Likewise.
3298 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3299 output.
3300
3301 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3302
3303 * Makefile.in (.c.o): Replace rule with ...
3304 (%.o: %.c): ... this one.
3305
3306 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3307
3308 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3309 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3310 make.
3311 * configure.ac: Remove checks for the make program.
3312 * configure: Re-generate.
3313
3314 2016-10-28 Pedro Alves <palves@redhat.com>
3315
3316 * Makefile.in (CXX_DIALECT): Get from configure.
3317 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3318 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3319 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3320 * config.in: Regenerate.
3321 * configure: Regenerate.
3322
3323 2016-10-27 Yao Qi <yao.qi@linaro.org>
3324
3325 * linux-low.c (linux_supports_range_stepping): Return true if
3326 can_software_single_step return true.
3327
3328 2016-10-27 Yao Qi <yao.qi@linaro.org>
3329
3330 * inferiors.c (find_inferior_in_random): New function.
3331 * inferiors.h (find_inferior_in_random): Declare.
3332 * linux-low.c (linux_wait_for_event_filtered): Call
3333 find_inferior_in_random instead of find_inferior.
3334
3335 2016-10-27 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-low.c (linux_wait_1): If single-step breakpoints are
3338 inserted, remove them.
3339
3340 2016-10-26 Pedro Alves <palves@redhat.com>
3341
3342 * linux-low.c (handle_extended_wait): Link parent/child fork
3343 threads.
3344 (linux_wait_1): Unlink them.
3345 (linux_set_resume_request): Ignore resume requests for
3346 already-resumed and unhandled fork child threads.
3347 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3348 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3349 New functions.
3350 (handle_v_requests) <vCont>: Don't call require_running.
3351 * server.h (in_queued_stop_replies): New declaration.
3352
3353 2016-10-24 Yao Qi <yao.qi@linaro.org>
3354
3355 PR server/20733
3356 * linux-aarch64-low.c (append_insns): Cast the return value to
3357 'uint32_t *'.
3358
3359 2016-10-10 Yao Qi <yao.qi@linaro.org>
3360
3361 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3362
3363 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3364
3365 * target.c (target_supports_multi_process): New function, moved
3366 from...
3367 * target.h (target_supports_multi_process): ... here. Remove
3368 macro.
3369
3370 2016-10-05 Tom Tromey <tom@tromey.com>
3371
3372 PR remote/20655:
3373 * tracepoint.c (handle_tracepoint_bkpts): Check
3374 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3375
3376 2016-10-05 Yao Qi <yao.qi@linaro.org>
3377
3378 * configure.srv: Update the path of arm-*.xml files.
3379
3380 2016-10-05 Terry Guo <terry.guo@arm.com>
3381 Yao Qi <yao.qi@linaro.org>
3382
3383 * Makefile.in: Adjust the path of rules.
3384 * configure.srv: Update the path of xml files.
3385 * regformats/arm-with-iwmmxt.dat: Regenerated.
3386 * regformats/arm-with-neon.dat: Likewise.
3387 * regformats/arm-with-vfpv2.dat: Likewise.
3388 * regformats/arm-with-vfpv3.dat Likewise.
3389
3390 2016-09-30 Yao Qi <yao.qi@linaro.org>
3391
3392 PR gdbserver/20627
3393 * target.c (target_stop_and_wait): Don't call
3394 target_continue_no_signal, use resume_stop instead.
3395
3396 2016-09-26 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-low.c (linux_wait_1): Call debug_exit.
3399
3400 2016-09-23 Pedro Alves <palves@redhat.com>
3401
3402 * Makefile.in (SFILES): Add common/new-op.c.
3403 (OBS): Add common/new-op.o.
3404 (new-op.o): New rule.
3405
3406 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3407
3408 * .gitinore: Ignore more files.
3409
3410 2016-09-21 Yao Qi <yao.qi@linaro.org>
3411
3412 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3413 23.
3414
3415 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3416
3417 * server.c (start_inferior): Call target_mourn_inferior instead of
3418 mourn_inferior; pass ptid_t argument to it.
3419 (resume): Likewise.
3420 (handle_target_event): Likewise.
3421 * target.c (target_mourn_inferior): New function.
3422 * target.h (mourn_inferior): Delete macro.
3423
3424 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3425
3426 * linux-low.c (lwp_is_stepping): New function.
3427
3428 2016-09-06 Carl Love <cel@us.ibm.com>
3429
3430 * server.c (start_inferior): Fixed comment, requested comment change
3431 didn't get updated correctly. Removed reference to ptrace () call as
3432 it is only true on Linux systems.
3433
3434 2016-09-06 Carl Love <cel@us.ibm.com>
3435
3436 * server.c (start_inferior): Do not call
3437 function target_post_create_inferior () if the
3438 inferior process has already exited.
3439
3440 2016-09-05 Pedro Alves <palves@redhat.com>
3441
3442 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3443 (COMPILE.pre, CC_LD): Use CXX directly.
3444 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3445 * acinclude.m4: Don't include build-with-cxx.m4.
3446 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3447 * configure: Regenerate.
3448
3449 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3450
3451 PR gdb/19495
3452 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3453 call writing data to own_buf.
3454
3455 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3456
3457 * target.c (mywait): Call target_wait instead of
3458 the_target->wait.
3459 (target_wait): New function.
3460
3461 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3462
3463 * server.c (start_inferior): New variable 'ptid'. Replace calls
3464 to the_target->resume by target_continue{,_no_signal}, depending
3465 on the case.
3466 * target.c (target_stop_and_wait): Call target_continue_no_signal
3467 instead of the_target->resume.
3468 (target_continue): New function.
3469
3470 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3471
3472 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3473
3474 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3475
3476 PR server/20491
3477 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3478 ps_prochandle.
3479 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3480 * linux-arm-low.c (ps_get_thread_area): Likewise.
3481 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3482 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3483 * linux-mips-low.c (ps_get_thread_area): Likewise.
3484 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3485 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3486 * linux-x86-low.c (ps_get_thread_area): Likewise.
3487 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3488
3489 2016-08-19 Pedro Alves <palves@redhat.com>
3490
3491 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3492
3493 2016-08-19 Pedro Alves <palves@redhat.com>
3494
3495 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3496 comment. Use memcpy instead of casting through unsigned long.
3497
3498 2016-08-19 Pedro Alves <palves@redhat.com>
3499
3500 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3501 allocating around 0x80000000.
3502
3503 2016-08-19 Pedro Alves <palves@redhat.com>
3504
3505 PR gdb/20415
3506 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3507 (x32-avx512-linux-ipa.o): New rules.
3508 * configure.ac (x86_64-*-linux*): New x32 check.
3509 * configure.srv (ipa_x32_linux_regobj): New.
3510 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3511 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3512 descriptions.
3513 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3514 descriptions.
3515 * configure: Regenerate.
3516
3517 2016-08-09 Pedro Alves <palves@redhat.com>
3518
3519 PR gdb/18653
3520 * Makefile.in (OBS): Add signals-state-save-restore.o.
3521 (signals-state-save-restore.o): New rule.
3522 * config.in: Regenerate.
3523 * configure: Regenerate.
3524 * linux-low.c: Include "signals-state-save-restore.h".
3525 (linux_create_inferior): Call
3526 restore_original_signals_state.
3527 * server.c: Include "dispositions-save-restore.h".
3528 (captured_main): Call save_original_signals_state.
3529
3530 2016-08-05 Pedro Alves <palves@redhat.com>
3531
3532 * configure: Regenerate.
3533
3534 2016-08-04 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-low.c (regsets_fetch_inferior_registers): Check
3537 errno is ESRCH or not.
3538
3539 2016-08-02 Yao Qi <yao.qi@linaro.org>
3540
3541 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3542 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3543 (thread_db_load_search): Update.
3544 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3545 td_ta_set_event and td_ta_event_getmsg.
3546
3547 2016-07-26 Pedro Alves <palves@redhat.com>
3548
3549 PR server/20414
3550 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3551 of unsigned long for 64-bit registers and use uint32_t instead of
3552 unsigned int for 32-bit registers.
3553
3554 2016-07-26 Pedro Alves <palves@redhat.com>
3555
3556 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3557 to 'ptrace'.
3558
3559 2016-07-21 Tom Tromey <tom@tromey.com>
3560
3561 * configure: Rebuild.
3562
3563 2016-07-21 Yao Qi <yao.qi@linaro.org>
3564
3565 * mem-break.c (find_gdb_breakpoint): Cast bp to
3566 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3567
3568 2016-07-21 Yao Qi <yao.qi@linaro.org>
3569
3570 * server.c (handle_v_requests): Support s and S actions
3571 if target_supports_software_single_step return true.
3572
3573 2016-07-21 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3576 is resume_step, call maybe_hw_step.
3577 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3578 and unstop them.
3579 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3580 breakpoints or not.
3581 (proceed_one_lwp): If resume request is resume_step, install
3582 reinsert breakpoints and call maybe_hw_step.
3583
3584 2016-07-21 Yao Qi <yao.qi@linaro.org>
3585
3586 * linux-low.c (proceed_one_lwp): Declare.
3587 (linux_resume_one_thread): Remove local variable 'step'.
3588 Lift code enqueue signal. Call proceed_one_lwp instead of
3589 linux_resume_one_lwp.
3590
3591 2016-07-21 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-low.c (linux_resume_one_thread): Call
3594 enqueue_pending_signal.
3595
3596 2016-07-21 Yao Qi <yao.qi@linaro.org>
3597
3598 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3599 * inferiors.c (do_restore_current_thread_cleanup): New function.
3600 (make_cleanup_restore_current_thread): Likewise.
3601 * linux-low.c (install_software_single_step_breakpoints): Call
3602 make_cleanup_restore_current_thread. Switch current_thread to
3603 thread.
3604
3605 2016-07-21 Yao Qi <yao.qi@linaro.org>
3606
3607 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3608 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3609 (clone_one_breakpoint): Likewise.
3610 (delete_reinsert_breakpoints): Change parameter to thread.
3611 Callers updated.
3612 (has_reinsert_breakpoints): Likewise.
3613 (uninsert_reinsert_breakpoints): Likewise.
3614 (reinsert_reinsert_breakpoints): Likewise.
3615 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3616 (delete_reinsert_breakpoints): Likewise.
3617 (reinsert_reinsert_breakpoints): Likewise.
3618 (uninsert_reinsert_breakpoints): Likewise.
3619 (has_reinsert_breakpoints): Likewise.
3620
3621 2016-07-21 Yao Qi <yao.qi@linaro.org>
3622
3623 * inferiors.c (get_thread_process): Make parameter const.
3624 * inferiors.h (get_thread_process): Update declaration.
3625 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3626 Add new parameters child_thread and parent_thread. Callers
3627 updated.
3628 * mem-break.h (clone_all_breakpoints): Update declaration.
3629
3630 2016-07-21 Yao Qi <yao.qi@linaro.org>
3631
3632 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3633 <command_list, handler>: Remove.
3634 (struct gdb_breakpoint): New.
3635 (struct other_breakpoint): New.
3636 (struct reinsert_breakpoint): New.
3637 (is_gdb_breakpoint): New function.
3638 (any_persistent_commands): Update command_list if
3639 is_gdb_breakpoint returns true.
3640 (set_breakpoint): Create breakpoints according to their types.
3641 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3642 (set_gdb_breakpoint_1): Likewise.
3643 (set_gdb_breakpoint): Likewise.
3644 (clear_breakpoint_conditions): Change parameter type to
3645 'struct gdb_breakpoint *'.
3646 (clear_breakpoint_commands): Likewise.
3647 (clear_breakpoint_conditions_and_commands): Likewise.
3648 (add_condition_to_breakpoint): Likewise.
3649 (add_breakpoint_condition): Likewise.
3650 (add_commands_to_breakpoint): Likewise.
3651 (check_breakpoints): Check other_breakpoint.
3652 (clone_one_breakpoint): Clone breakpopint according to its type.
3653 * mem-break.h (struct gdb_breakpoint): Declare.
3654 (set_gdb_breakpoint): Update declaration.
3655 (clear_breakpoint_conditions_and_commands): Likewise.
3656 (add_breakpoint_condition): Likewise.
3657 (add_breakpoint_commands): Likewise.
3658 * server.c (process_point_options): Change parameter type to
3659 'struct gdb_breakpoint *'.
3660
3661 2016-07-21 Yao Qi <yao.qi@linaro.org>
3662
3663 * mem-break.c (set_breakpoint_at): Rename it to ...
3664 (set_breakpoint_type_at): ... it.
3665 (set_breakpoint_at): Call set_breakpoint_type_at.
3666 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3667 * mem-break.h (set_breakpoint_at): Update comments.
3668
3669 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3670
3671 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3672 to buf parameter.
3673 (nios2_store_gregset): Likewise.
3674
3675 2016-07-01 Pedro Alves <palves@redhat.com>
3676 Antoine Tremblay <antoine.tremblay@ericsson.com>
3677
3678 * linux-low.c: Change interface to take the target lwp_info
3679 pointer directly and return void. Handle detaching from a zombie
3680 thread.
3681 (linux_detach_lwp_callback): New function.
3682 (linux_detach): Detach from the leader thread after detaching from
3683 the clone threads.
3684
3685 2016-06-28 Yao Qi <yao.qi@linaro.org>
3686
3687 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3688 for variable new_offset.
3689 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3690 (aarch64_ftrace_insn_reloc_cb): Likewise.
3691 (aarch64_ftrace_insn_reloc_tb): Likewise.
3692 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3693 PRIx64 instead of PRIx32.
3694
3695 2016-06-28 Yao Qi <yao.qi@linaro.org>
3696
3697 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3698 (the_low_target): Install arm_get_syscall_trapinfo.
3699
3700 2016-06-28 Yao Qi <yao.qi@linaro.org>
3701
3702 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3703 function.
3704 (the_low_target): Install aarch64_get_syscall_trapinfo.
3705
3706 2016-06-28 Yao Qi <yao.qi@linaro.org>
3707
3708 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3709 Callers updated.
3710 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3711 Remove parameter sysno.
3712 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3713 sysret.
3714
3715 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3716
3717 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3718 (s390_emit_ne_goto): Likewise.
3719 (s390_emit_lt_goto): Likewise.
3720 (s390_emit_le_goto): Likewise.
3721 (s390_emit_gt_goto): Likewise.
3722 (s390_emit_ge_goto): Likewise.
3723 (s390x_emit_eq_goto): Likewise.
3724 (s390x_emit_ne_goto): Likewise.
3725 (s390x_emit_lt_goto): Likewise.
3726 (s390x_emit_le_goto): Likewise.
3727 (s390x_emit_gt_goto): Likewise.
3728 (s390x_emit_ge_goto): Likewise.
3729 (s390_emit_ops_impl): Mark variable static.
3730 (s390x_emit_ops): Likewise.
3731
3732 2016-06-17 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-low.c (handle_extended_wait): Call
3735 uninsert_reinsert_breakpoints for the parent process. Remove
3736 reinsert breakpoints from the child process. Reinsert them to
3737 the parent process when vfork is done.
3738 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3739 (reinsert_reinsert_breakpoints): New function.
3740 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3741 (reinsert_reinsert_breakpoints): Declare.
3742
3743 2016-06-17 Yao Qi <yao.qi@linaro.org>
3744
3745 * linux-low.c (handle_extended_wait): If the parent is doing
3746 step-over, remove the reinsert breakpoints from the forked child.
3747
3748 2016-06-17 Yao Qi <yao.qi@linaro.org>
3749
3750 * linux-low.c (unsuspend_all_lwps): Declare.
3751 (linux_low_filter_event): If thread exited, call finish_step_over.
3752 If step-over is finished, unsuspend other threads.
3753
3754 2016-06-17 Yao Qi <yao.qi@linaro.org>
3755
3756 * linux-low.c (linux_resume_one_lwp_throw): Assert
3757 has_reinsert_breakpoints returns false.
3758 * mem-break.c (delete_disabled_breakpoints): Assert
3759 bp type isn't reinsert_breakpoint.
3760
3761 2016-06-17 Yao Qi <yao.qi@linaro.org>
3762
3763 * linux-low.c (maybe_hw_step): New function.
3764 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3765 (finish_step_over): Switch current_thread to lwp temporarily,
3766 and assert has_reinsert_breakpoints returns true.
3767 (proceed_one_lwp): Call maybe_hw_step.
3768 * mem-break.c (has_reinsert_breakpoints): New function.
3769 * mem-break.h (has_reinsert_breakpoints): Declare.
3770
3771 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3772
3773 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3774
3775 2016-05-17 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3778 instead of find_inferior.
3779
3780 2016-05-05 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3783 Initialize res to zero.
3784
3785 2016-05-05 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3788 to uint32_t.
3789
3790 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3791
3792 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3793 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3794 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3795
3796 2016-04-28 Par Olsson <par.olsson@windriver.com>
3797 Simon Marchi <simon.marchi@ericsson.com>
3798
3799 * tracepoint.c (write_inferior_int8): New function.
3800 (cmd_qtenable_disable): Write enable flag using
3801 write_inferior_int8.
3802
3803 2016-04-25 Yao Qi <yao.qi@linaro.org>
3804
3805 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3806 (need_step_over_p): Return zero if the LWP has pending signals
3807 can be delivered on software single step target.
3808
3809 2016-04-25 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3812 return instead of error.
3813
3814 2016-04-22 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3817 to 23.
3818
3819 2016-04-22 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3822 signal when stepping over breakpoint with software single
3823 step.
3824
3825 2016-04-21 Pedro Alves <palves@redhat.com>
3826
3827 * linux-s390-low.c (s390_collect_ptrace_register)
3828 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3829 add casts.
3830 (s390_check_regset): Use void * instead of gdb_byte *.
3831
3832 2016-04-20 Pedro Alves <palves@redhat.com>
3833
3834 * configure: Renegerate.
3835
3836 2016-04-20 Yao Qi <yao.qi@linaro.org>
3837
3838 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3839 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3840 number 16.
3841 (arm_store_gregset): Likewise.
3842
3843 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3844
3845 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3846 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3847 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3848 (amd64-avx-mpx-linux.c): New rules.
3849 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3850 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3851 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3852 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3853 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3854 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3855 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3856 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3857 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3858 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3859 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3860 * linux-x86-low.c (x86_linux_read_description): Add case for
3861 X86_XSTATE_AVX_MPX_MASK.
3862 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3863 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3864 init_registers_i386_avx_mpx_linux.
3865 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3866 (initialize_low_tracepoint): Call
3867 init_registers_i386_avx_mpx_linux.
3868 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3869 (initialize_low_tracepoint): Call
3870 init_registers_amd64_avx_mpx_linux.
3871 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3872 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3873 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3874 declarations.
3875
3876 2016-04-18 Pedro Alves <palves@redhat.com>
3877
3878 * configure: Regenerate.
3879
3880 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3881
3882 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3883 (aarch64_emit_sub): Likewise.
3884
3885 2016-04-12 Pedro Alves <palves@redhat.com>
3886
3887 * utils.c (prepare_to_throw_exception): Delete.
3888
3889 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3890
3891 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3892
3893 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3894
3895 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3896
3897 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3898
3899 * linux-aarch64-ipa.c: Add <elf.h> include.
3900 * linux-ppc-ipa.c: Add <elf.h> include.
3901 * linux-s390-ipa.c: Add <elf.h> include.
3902
3903 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3904
3905 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3906 (get_raw_reg_ptr): Likewise.
3907 (get_trace_state_variable_value_ptr): Likewise.
3908 (set_trace_state_variable_value_ptr): Likewise.
3909 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3910 char *.
3911
3912 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3913 Marcin Kościelnicki <koriakin@0x04.net>
3914
3915 PR/17221
3916 * linux-ppc-low.c (emit_insns): New function.
3917 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3918 (ppc_emit_prologue): New function.
3919 (ppc_emit_epilogue): New function.
3920 (ppc_emit_add): New function.
3921 (ppc_emit_sub): New function.
3922 (ppc_emit_mul): New function.
3923 (ppc_emit_lsh): New function.
3924 (ppc_emit_rsh_signed): New function.
3925 (ppc_emit_rsh_unsigned): New function.
3926 (ppc_emit_ext): New function.
3927 (ppc_emit_zero_ext): New function.
3928 (ppc_emit_log_not): New function.
3929 (ppc_emit_bit_and): New function.
3930 (ppc_emit_bit_or): New function.
3931 (ppc_emit_bit_xor): New function.
3932 (ppc_emit_bit_not): New function.
3933 (ppc_emit_equal): New function.
3934 (ppc_emit_less_signed): New function.
3935 (ppc_emit_less_unsigned): New function.
3936 (ppc_emit_ref): New function.
3937 (ppc_emit_const): New function.
3938 (ppc_emit_reg): New function.
3939 (ppc_emit_pop): New function.
3940 (ppc_emit_stack_flush): New function.
3941 (ppc_emit_swap): New function.
3942 (ppc_emit_stack_adjust): New function.
3943 (ppc_emit_call): New function.
3944 (ppc_emit_int_call_1): New function.
3945 (ppc_emit_void_call_2): New function.
3946 (ppc_emit_if_goto): New function.
3947 (ppc_emit_goto): New function.
3948 (ppc_emit_eq_goto): New function.
3949 (ppc_emit_ne_goto): New function.
3950 (ppc_emit_lt_goto): New function.
3951 (ppc_emit_le_goto): New function.
3952 (ppc_emit_gt_goto): New function.
3953 (ppc_emit_ge_goto): New function.
3954 (ppc_write_goto_address): New function.
3955 (ppc_emit_ops_impl): New static variable.
3956 (ppc64v1_emit_prologue): New function.
3957 (ppc64v2_emit_prologue): New function.
3958 (ppc64_emit_epilogue): New function.
3959 (ppc64_emit_add): New function.
3960 (ppc64_emit_sub): New function.
3961 (ppc64_emit_mul): New function.
3962 (ppc64_emit_lsh): New function.
3963 (ppc64_emit_rsh_signed): New function.
3964 (ppc64_emit_rsh_unsigned): New function.
3965 (ppc64_emit_ext): New function.
3966 (ppc64_emit_zero_ext): New function.
3967 (ppc64_emit_log_not): New function.
3968 (ppc64_emit_bit_and): New function.
3969 (ppc64_emit_bit_or): New function.
3970 (ppc64_emit_bit_xor): New function.
3971 (ppc64_emit_bit_not): New function.
3972 (ppc64_emit_equal): New function.
3973 (ppc64_emit_less_signed): New function.
3974 (ppc64_emit_less_unsigned): New function.
3975 (ppc64_emit_ref): New function.
3976 (ppc64_emit_const): New function.
3977 (ppc64v1_emit_reg): New function.
3978 (ppc64v2_emit_reg): New function.
3979 (ppc64_emit_pop): New function.
3980 (ppc64_emit_stack_flush): New function.
3981 (ppc64_emit_swap): New function.
3982 (ppc64v1_emit_call): New function.
3983 (ppc64v2_emit_call): New function.
3984 (ppc64v1_emit_int_call_1): New function.
3985 (ppc64v2_emit_int_call_1): New function.
3986 (ppc64v1_emit_void_call_2): New function.
3987 (ppc64v2_emit_void_call_2): New function.
3988 (ppc64_emit_if_goto): New function.
3989 (ppc64_emit_eq_goto): New function.
3990 (ppc64_emit_ne_goto): New function.
3991 (ppc64_emit_lt_goto): New function.
3992 (ppc64_emit_le_goto): New function.
3993 (ppc64_emit_gt_goto): New function.
3994 (ppc64_emit_ge_goto): New function.
3995 (ppc64v1_emit_ops_impl): New static variable.
3996 (ppc64v2_emit_ops_impl): New static variable.
3997 (ppc_emit_ops): New function.
3998 (linux_low_target): Wire in ppc_emit_ops.
3999
4000 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4001 Marcin Kościelnicki <koriakin@0x04.net>
4002
4003 PR/17221
4004 * Makefile.in: Add powerpc-*-ipa.o
4005 * configure.srv: Add ipa_obj for powerpc*-linux.
4006 * linux-ppc-ipa.c: New file.
4007 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4008 includes.
4009 (PPC_FIELD): New macro.
4010 (PPC_SEXT): New macro.
4011 (PPC_OP6): New macro.
4012 (PPC_BO): New macro.
4013 (PPC_LI): New macro.
4014 (PPC_BD): New macro.
4015 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4016 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4017 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4018 (ppc_get_thread_area): New function.
4019 (is_elfv2_inferior): New function.
4020 (gen_ds_form): New function.
4021 (GEN_STD): New macro.
4022 (GEN_STDU): New macro.
4023 (GEN_LD): New macro.
4024 (GEN_LDU): New macro.
4025 (gen_d_form): New function.
4026 (GEN_ADDI): New macro.
4027 (GEN_ADDIS): New macro.
4028 (GEN_LI): New macro.
4029 (GEN_LIS): New macro.
4030 (GEN_ORI): New macro.
4031 (GEN_ORIS): New macro.
4032 (GEN_LWZ): New macro.
4033 (GEN_STW): New macro.
4034 (GEN_STWU): New macro.
4035 (gen_xfx_form): New function.
4036 (GEN_MFSPR): New macro.
4037 (GEN_MTSPR): New macro.
4038 (GEN_MFCR): New macro.
4039 (GEN_MTCR): New macro.
4040 (GEN_SYNC): New macro.
4041 (GEN_LWSYNC): New macro.
4042 (gen_x_form): New function.
4043 (GEN_OR): New macro.
4044 (GEN_MR): New macro.
4045 (GEN_LWARX): New macro.
4046 (GEN_STWCX): New macro.
4047 (GEN_CMPW): New macro.
4048 (gen_md_form): New function.
4049 (GEN_RLDICL): New macro.
4050 (GEN_RLDICR): New macro.
4051 (gen_i_form): New function.
4052 (GEN_B): New macro.
4053 (GEN_BL): New macro.
4054 (gen_b_form): New function.
4055 (GEN_BNE): New macro.
4056 (GEN_LOAD): New macro.
4057 (GEN_STORE): New macro.
4058 (gen_limm): New function.
4059 (gen_atomic_xchg): New function.
4060 (gen_call): New function.
4061 (ppc_relocate_instruction): New function.
4062 (ppc_install_fast_tracepoint_jump_pad): New function.
4063 (ppc_get_min_fast_tracepoint_insn_len): New function.
4064 (ppc_get_ipa_tdesc_idx): New function.
4065 (the_low_target): Wire in the new functions.
4066 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4067 tdescs.
4068 * linux-ppc-tdesc.h: New file.
4069
4070 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4071
4072 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4073 (alloc_jump_pad_buffer): New function.
4074 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4075 (alloc_jump_pad_buffer): New function.
4076 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4077 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4078 (alloc_jump_pad_buffer): New function.
4079 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4080 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4081 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4082 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4083
4084 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4085
4086 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4087 * linux-amd64-ipa.c: Likewise.
4088 * linux-i386-ipa.c: Likewise.
4089 * linux-s390-ipa.c: Likewise.
4090 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4091 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4092 set_trace_state_variable_value_ptr.
4093 (struct ipa_sym_addresses): Likewise.
4094 (symbol_list): Likewise.
4095 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4096 accessing gdb_collect directly.
4097 (gdb_collect_ptr_type): New typedef.
4098 (get_raw_reg_ptr_type): New typedef.
4099 (get_trace_state_variable_value_ptr_type): New typedef.
4100 (set_trace_state_variable_value_ptr_type): New typedef.
4101 (gdb_collect_ptr): New global.
4102 (get_raw_reg_ptr): New global.
4103 (get_trace_state_variable_value_ptr): New global.
4104 (set_trace_state_variable_value_ptr): New global.
4105 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4106 accessing get_raw_reg directly.
4107 (get_get_tsv_func_addr): Likewise for
4108 get_trace_state_variable_value_ptr.
4109 (get_set_tsv_func_addr): Likewise for
4110 set_trace_state_variable_value_ptr.
4111 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4112
4113 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4114
4115 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4116
4117 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4118
4119 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4120 packets.
4121 (relocate_instruction): Remove own_buf.
4122 * server.c (own_buf): Make global.
4123 (handle_v_requests): Make global.
4124 * server.h (own_buf): New declaration.
4125 (handle_v_requests): New prototype.
4126
4127 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4128
4129 PR 18377
4130 * linux-s390-low.c (add_insns): New function.
4131 (s390_emit_prologue): New function.
4132 (s390_emit_epilogue): New function.
4133 (s390_emit_add): New function.
4134 (s390_emit_sub): New function.
4135 (s390_emit_mul): New function.
4136 (s390_emit_lsh): New function.
4137 (s390_emit_rsh_signed): New function.
4138 (s390_emit_rsh_unsigned): New function.
4139 (s390_emit_ext): New function.
4140 (s390_emit_log_not): New function.
4141 (s390_emit_bit_and): New function.
4142 (s390_emit_bit_or): New function.
4143 (s390_emit_bit_xor): New function.
4144 (s390_emit_bit_not): New function.
4145 (s390_emit_equal): New function.
4146 (s390_emit_less_signed): New function.
4147 (s390_emit_less_unsigned): New function.
4148 (s390_emit_ref): New function.
4149 (s390_emit_if_goto): New function.
4150 (s390_emit_goto): New function.
4151 (s390_write_goto_address): New function.
4152 (s390_emit_litpool): New function.
4153 (s390_emit_const): New function.
4154 (s390_emit_call): New function.
4155 (s390_emit_reg): New function.
4156 (s390_emit_pop): New function.
4157 (s390_emit_stack_flush): New function.
4158 (s390_emit_zero_ext): New function.
4159 (s390_emit_swap): New function.
4160 (s390_emit_stack_adjust): New function.
4161 (s390_emit_set_r2): New function.
4162 (s390_emit_int_call_1): New function.
4163 (s390_emit_void_call_2): New function.
4164 (s390_emit_eq_goto): New function.
4165 (s390_emit_ne_goto): New function.
4166 (s390_emit_lt_goto): New function.
4167 (s390_emit_le_goto): New function.
4168 (s390_emit_gt_goto): New function.
4169 (s390_emit_ge_goto): New function.
4170 (s390x_emit_prologue): New function.
4171 (s390x_emit_epilogue): New function.
4172 (s390x_emit_add): New function.
4173 (s390x_emit_sub): New function.
4174 (s390x_emit_mul): New function.
4175 (s390x_emit_lsh): New function.
4176 (s390x_emit_rsh_signed): New function.
4177 (s390x_emit_rsh_unsigned): New function.
4178 (s390x_emit_ext): New function.
4179 (s390x_emit_log_not): New function.
4180 (s390x_emit_bit_and): New function.
4181 (s390x_emit_bit_or): New function.
4182 (s390x_emit_bit_xor): New function.
4183 (s390x_emit_bit_not): New function.
4184 (s390x_emit_equal): New function.
4185 (s390x_emit_less_signed): New function.
4186 (s390x_emit_less_unsigned): New function.
4187 (s390x_emit_ref): New function.
4188 (s390x_emit_if_goto): New function.
4189 (s390x_emit_const): New function.
4190 (s390x_emit_call): New function.
4191 (s390x_emit_reg): New function.
4192 (s390x_emit_pop): New function.
4193 (s390x_emit_stack_flush): New function.
4194 (s390x_emit_zero_ext): New function.
4195 (s390x_emit_swap): New function.
4196 (s390x_emit_stack_adjust): New function.
4197 (s390x_emit_int_call_1): New function.
4198 (s390x_emit_void_call_2): New function.
4199 (s390x_emit_eq_goto): New function.
4200 (s390x_emit_ne_goto): New function.
4201 (s390x_emit_lt_goto): New function.
4202 (s390x_emit_le_goto): New function.
4203 (s390x_emit_gt_goto): New function.
4204 (s390x_emit_ge_goto): New function.
4205 (s390_emit_ops): New function.
4206 (struct linux_target_ops): Fill in emit_ops hook.
4207
4208 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4209
4210 PR 18377
4211 * Makefile.in: Add s390 IPA files.
4212 * configure.srv: Build IPA for s390.
4213 * linux-s390-ipa.c: New file.
4214 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4215 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4216 (tdesc_s390_linux32): Likewise.
4217 (init_registers_s390_linux32v1): Likewise.
4218 (tdesc_s390_linux32v1): Likewise.
4219 (init_registers_s390_linux32v2): Likewise.
4220 (tdesc_s390_linux32v2): Likewise.
4221 (init_registers_s390_linux64): Likewise.
4222 (tdesc_s390_linux64): Likewise.
4223 (init_registers_s390_linux64v1): Likewise.
4224 (tdesc_s390_linux64v1): Likewise.
4225 (init_registers_s390_linux64v2): Likewise.
4226 (tdesc_s390_linux64v2): Likewise.
4227 (init_registers_s390_te_linux64): Likewise.
4228 (tdesc_s390_te_linux64): Likewise.
4229 (init_registers_s390_vx_linux64): Likewise.
4230 (tdesc_s390_vx_linux64): Likewise.
4231 (init_registers_s390_tevx_linux64): Likewise.
4232 (tdesc_s390_tevx_linux64): Likewise.
4233 (init_registers_s390x_linux64): Likewise.
4234 (tdesc_s390x_linux64): Likewise.
4235 (init_registers_s390x_linux64v1): Likewise.
4236 (tdesc_s390x_linux64v1): Likewise.
4237 (init_registers_s390x_linux64v2): Likewise.
4238 (tdesc_s390x_linux64v2): Likewise.
4239 (init_registers_s390x_te_linux64): Likewise.
4240 (tdesc_s390x_te_linux64): Likewise.
4241 (init_registers_s390x_vx_linux64): Likewise.
4242 (tdesc_s390x_vx_linux64): Likewise.
4243 (init_registers_s390x_tevx_linux64): Likewise.
4244 (tdesc_s390x_tevx_linux64): Likewise.
4245 (have_hwcap_s390_vx): New static variable.
4246 (s390_arch_setup): Fill have_hwcap_s390_vx.
4247 (s390_get_thread_area): New function.
4248 (s390_ft_entry_gpr_esa): New const.
4249 (s390_ft_entry_gpr_zarch): New const.
4250 (s390_ft_entry_misc): New const.
4251 (s390_ft_entry_fr): New const.
4252 (s390_ft_entry_vr): New const.
4253 (s390_ft_main_31): New const.
4254 (s390_ft_main_64): New const.
4255 (s390_ft_exit_fr): New const.
4256 (s390_ft_exit_vr): New const.
4257 (s390_ft_exit_misc): New const.
4258 (s390_ft_exit_gpr_esa): New const.
4259 (s390_ft_exit_gpr_zarch): New const.
4260 (append_insns): New function.
4261 (s390_relocate_instruction): New function.
4262 (s390_install_fast_tracepoint_jump_pad): New function.
4263 (s390_get_min_fast_tracepoint_insn_len): New function.
4264 (s390_get_ipa_tdesc_idx): New function.
4265 (struct linux_target_ops): Wire in the above functions.
4266 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4267 * linux-s390-tdesc.h: New file.
4268
4269 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4270
4271 * linux-s390-low.c (s390_supports_tracepoints): New function.
4272 (struct linux_target_ops): Fill supports_tracepoints hook.
4273
4274 2016-03-18 Yao Qi <yao.qi@linaro.org>
4275
4276 * linux-low.c (lwp_signal_can_be_delivered): New function.
4277 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4278
4279 2016-03-18 Yao Qi <yao.qi@linaro.org>
4280
4281 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4282 0 if signal is enqueued. Remove 'signal' from one debugging
4283 message. Move one debugging message to some lines below.
4284 Remove code setting 'signal' to 0.
4285
4286 2016-03-18 Yao Qi <yao.qi@linaro.org>
4287
4288 * linux-low.c (linux_low_filter_event): Remove redundant
4289 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4290
4291 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4292
4293 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4294 (struct linux_target_ops): Wire in the above.
4295
4296 2016-03-03 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-low.c: Update comments to start_step_over.
4299
4300 2016-03-03 Yao Qi <yao.qi@linaro.org>
4301
4302 PR server/19736
4303 * linux-low.c (handle_extended_wait): Set child suspended
4304 if event_lwp->bp_reinsert isn't zero.
4305
4306 2016-03-02 Yao Qi <yao.qi@linaro.org>
4307
4308 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4309 enqueue_pending_signal.
4310
4311 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4312
4313 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4314 is actually loaded.
4315
4316 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4317
4318 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4319 (s390_regmap_3264) [!__s390x__]: New global.
4320 (s390_collect_ptrace_register): Skip map entries containing -1.
4321 (s390_supply_ptrace_register): Ditto.
4322 (s390_fill_gprs_high): New function.
4323 (s390_store_gprs_high): New function.
4324 (s390_regsets): Add NT_S390_HIGH_GPRS.
4325 (s390_get_hwcap): Enable on 31-bit.
4326 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4327 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4328 Detect NT_S390_HIGH_GPRS.
4329 (s390_usrregs_info_3264): Enable on 31-bit.
4330 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4331 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4332
4333 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4334
4335 PR gdb/13808
4336 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4337 * configure.srv: Ditto.
4338 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4339 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4340 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4341 (init_registers_amd64_linux): Remove prototype.
4342 (tdesc_amd64_linux): Remove declaration.
4343 (get_ipa_tdesc): New function.
4344 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4345 initialize remaining tdescs.
4346 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4347 (init_registers_i386_linux): Remove prototype.
4348 (tdesc_i386_linux): Remove declaration.
4349 (get_ipa_tdesc): New function.
4350 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4351 initialize remaining tdescs.
4352 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4353 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4354 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4355 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4356 (x86_get_ipa_tdesc_idx): New function.
4357 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4358 * linux-x86-tdesc.h: New file.
4359 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4360 (target_get_ipa_tdesc_idx): New macro.
4361 * tracepoint.c (ipa_tdesc_idx): New macro.
4362 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4363 (symbol_list): Add ipa_tdesc_idx.
4364 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4365 (ipa_tdesc): Remove.
4366 (ipa_tdesc_idx): New variable.
4367 (get_context_regcache): Use get_ipa_tdesc.
4368 (gdb_collect): Ditto.
4369 (gdb_probe): Ditto.
4370 * tracepoint.h (get_ipa_tdesc): New prototype.
4371 (ipa_tdesc): Remove.
4372
4373 2016-02-24 Pedro Alves <palves@redhat.com>
4374
4375 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4376 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4377 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4378 Factor out common code between the USE_SIGTRAP_SIGINFO and
4379 !USE_SIGTRAP_SIGINFO blocks.
4380 (linux_low_filter_event): Call save_stop_reason instead of
4381 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4382 Update comments.
4383 (linux_wait_1): Update comments.
4384
4385 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4386
4387 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4388 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4389 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4390 ppc_insert_point, ppc_remove_point.
4391
4392 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4393
4394 * linux-s390-low.c (s390_supports_z_point_type): New function.
4395 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4396
4397 2016-02-16 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4400 PC. Get pc from regcache_read_pc.
4401
4402 2016-02-12 Yao Qi <yao.qi@linaro.org>
4403
4404 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4405 or linux_get_pc_32bit.
4406 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4407
4408 2016-02-12 Yao Qi <yao.qi@linaro.org>
4409
4410 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4411 arm_linux_get_next_pcs_fixup.
4412
4413 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4414
4415 * tracepoint.c (x_tracepoint_action_download): Change
4416 write_inferior_data_ptr to write_inferior_data_pointer.
4417 (cmd_qtstart): Likewise.
4418 (write_inferior_data_ptr): Remove.
4419 (download_agent_expr): Change write_inferior_data_ptr to
4420 write_inferior_data_pointer.
4421 (download_tracepoint_1): Likewise.
4422 (download_tracepoint): Likewise.
4423 (download_trace_state_variables): Likewise.
4424
4425 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4426 Marcin Kościelnicki <koriakin@0x04.net>
4427
4428 * tracepoint.c (struct tracepoint_action_ops): Remove.
4429 (struct tracepoint_action): Remove ops.
4430 (m_tracepoint_action_download, r_tracepoint_action_download)
4431 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4432 size and offset accordingly.
4433 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4434 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4435 (tracepoint_action_send, tracepoint_action_download): New functions.
4436 Helpers for trace action handlers.
4437 (add_tracepoint_action): Remove setup actions ops.
4438 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4439
4440 2016-02-10 Yao Qi <yao.qi@linaro.org>
4441
4442 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4443
4444 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4445
4446 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4447 to AC_OUTPUT.
4448 * configure: Regenerate.
4449
4450 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4451
4452 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4453 void * to gdb_byte *.
4454 * linux-low.c (siginfo_fixup): Likewise.
4455 (linux_xfer_siginfo): Likewise.
4456 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4457 Likewise.
4458 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4459
4460 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4461
4462 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4463 to srv_tgtobj.
4464 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4465 to srv_tgtobj.
4466 * linux-x86-low.c [__x86_64__]: Include
4467 "nat/amd64-linux-siginfo.h".
4468 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4469 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4470 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4471 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4472 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4473 (cpt_si_fd, si_timerid, si_overrun): Move from
4474 nat/amd64-linux-siginfo.c.
4475 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4476
4477 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4478
4479 * server.c (skip_to_semicolon): Remove.
4480 (process_point_options): Use strchrnul instead of
4481 skip_to_semicolon.
4482
4483 2016-01-26 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4486 * linux-low.c (install_software_single_step_breakpoints): Don't
4487 call regcache_read_pc.
4488 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4489 argument pc.
4490
4491 2016-01-26 Yao Qi <yao.qi@linaro.org>
4492
4493 * linux-low.c (install_software_single_step_breakpoints): Call
4494 regcache_read_pc instead of get_pc.
4495
4496 2016-01-26 Yao Qi <yao.qi@linaro.org>
4497
4498 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4499 (unblock_async_io): Rename to ...
4500 (block_unblock_async_io): ... it. New function.
4501 (enable_async_io): Don't install SIGIO handler. Unblock it
4502 instead.
4503 (disable_async_io): Don't ignore SIGIO. Block it instead.
4504 (initialize_async_io): Install SIGIO handler. Don't call
4505 unblock_async_io.
4506
4507 2016-01-26 Yao Qi <yao.qi@linaro.org>
4508
4509 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4510 first character is '\003', call *the_target->request_interrupt.
4511
4512 2016-01-25 Yao Qi <yao.qi@linaro.org>
4513
4514 * remote-utils.c (new_thread_notify): Remove.
4515 (dead_thread_notify): Likewise.
4516 * remote-utils.h (new_thread_notify): Remove declaration.
4517 (dead_thread_notify): Likewise.
4518
4519 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4520
4521 * gdb.trace/pending.exp: Fix expected message on continue.
4522
4523 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4524
4525 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4526 it works properly on big-endian machines where sizeof (CORE_ADDR)
4527 != sizeof (void *).
4528
4529 2016-01-21 Pedro Alves <palves@redhat.com>
4530
4531 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4532 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4533 * configure: Regenerate.
4534
4535 2016-01-21 Yao Qi <yao.qi@linaro.org>
4536
4537 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4538 is_thumb and set it according to CPSR saved on the stack.
4539 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4540 arm_sigreturn_next_pc.
4541
4542 2016-01-18 Yao Qi <yao.qi@linaro.org>
4543
4544 * linux-low.c (linux_set_pc_64bit): New function.
4545 (linux_get_pc_64bit): New function.
4546 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4547 Declare.
4548 * linux-sparc-low.c (debug_threads): Remove declaration.
4549 (sparc_get_pc): Remove.
4550 (the_low_target): Use linux_get_pc_64bit instead of
4551 sparc_get_pc.
4552 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4553 (the_low_target): Use linux_get_pc_64bit and
4554 linux_set_pc_64bit.
4555
4556 2016-01-18 Yao Qi <yao.qi@linaro.org>
4557
4558 * linux-arm-low.c (debug_threads): Remove declaration.
4559 (arm_get_pc, arm_set_pc): Remove.
4560 (the_low_target): Use linux_get_pc_32bit and
4561 linux_set_pc_32bit.
4562 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4563 (the_low_target): Use linux_get_pc_32bit and
4564 linux_set_pc_32bit.
4565 * linux-cris-low.c (debug_threads): Remove declaration.
4566 (cris_get_pc, cris_set_pc,): Remove.
4567 (the_low_target): Use linux_get_pc_32bit and
4568 linux_set_pc_32bit.
4569 * linux-crisv32-low.c (debug_threads): Remove declaration.
4570 (cris_get_pc, cris_set_pc): Remove.
4571 (the_low_target): Use linux_get_pc_32bit and
4572 linux_set_pc_32bit.
4573 * linux-low.c: Include inttypes.h.
4574 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4575 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4576 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4577 (the_low_target): Use linux_get_pc_32bit and
4578 linux_set_pc_32bit.
4579 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4580 (the_low_target): Use linux_get_pc_32bit and
4581 linux_set_pc_32bit.
4582 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4583 (the_low_target): Use linux_get_pc_32bit and
4584 linux_set_pc_32bit.
4585 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4586 (the_low_target): Use linux_get_pc_32bit and
4587 linux_set_pc_32bit.
4588 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4589 (the_low_target): Use linux_get_pc_32bit and
4590 linux_set_pc_32bit.
4591
4592 2016-01-18 Gary Benson <gbenson@redhat.com>
4593
4594 * configure.ac (AC_FUNC_FORK): New check.
4595 * config.in: Regenerate.
4596 * configure: Likewise.
4597
4598 2016-01-14 Yao Qi <yao.qi@linaro.org>
4599
4600 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4601 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4602 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4603 arm_get_next_pcs_ctor.
4604
4605 2016-01-12 Josh Stone <jistone@redhat.com>
4606 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4607
4608 * inferiors.h: Include "gdb_vecs.h".
4609 (struct process_info): Add syscalls_to_catch.
4610 * inferiors.c (remove_process): Free syscalls_to_catch.
4611 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4612 syscall_return stops.
4613 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4614 * server.c (handle_general_set): Handle QCatchSyscalls.
4615 (handle_query): Report support for QCatchSyscalls.
4616 * target.h (struct target_ops): Add supports_catch_syscall.
4617 (target_supports_catch_syscall): New macro.
4618 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4619 (struct lwp_info): Add syscall_state.
4620 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4621 Maintain syscall_state and syscalls_to_catch across exec.
4622 (get_syscall_trapinfo): New function, proxy to the_low_target.
4623 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4624 (linux_low_filter_event): Toggle syscall_state entry/return for
4625 syscall traps, and set it ignored for all others.
4626 (gdb_catching_syscalls_p): New function.
4627 (gdb_catch_this_syscall_p): New function.
4628 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4629 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4630 (linux_supports_catch_syscall): New function.
4631 (linux_target_ops): Install it.
4632 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4633 (the_low_target): Install it.
4634
4635 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4636
4637 * acinclude.m4: Include new ../warning.m4 file.
4638 * configure: Regenerated.
4639 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4640
4641 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4642
4643 * ax.c (is_goto_target): Mark static.
4644 * linux-low.c (register_addr): Likewise.
4645 (linux_fetch_registers, linux_store_registers): Likewise.
4646 * mem-break.c (any_persistent_commands): Fix old prototype.
4647 (add_commands_to_breakpoint): Mark static.
4648 * regcache.c (find_register_by_name): Delete unused func.
4649 * remote-utils.c (hex_or_minus_one): Mark static.
4650 * server.c (monitor_show_help): Mark static.
4651 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4652 handle_v_requests): Likewise.
4653
4654 2016-01-12 Pedro Alves <palves@redhat.com>
4655
4656 Remove use of the registered trademark symbol throughout.
4657
4658 2016-01-08 Yao Qi <yao.qi@linaro.org>
4659
4660 * remote-utils.c (getpkt): If c is '\003', call target hook
4661 request_interrupt.
4662
4663 2016-01-06 Yao Qi <yao.qi@linaro.org>
4664
4665 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4666 linux-aarch32-low.c.
4667 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4668 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4669 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4670 (thumb2_breakpoint): Declare.
4671 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4672 linux-aarch32-low.h.
4673 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4674 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4675 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4676
4677 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4678
4679 * gdbreplay.c (gdbreplay_version): Change copyright year in
4680 version message.
4681 * server.c (gdbserver_version): Likewise.
4682
4683 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4684
4685 * server.c (crc32_table): Delete.
4686 (crc32): Use libiberty's xcrc32 function.
4687
4688 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4689
4690 * lynx-low.c (lynx_delete_thread_callback): New function.
4691 (lynx_mourn): Properly delete our process and all of its
4692 threads. Remove call to clear_inferiors.
4693
4694 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4695
4696 * target.c (thread_search_callback): Add check that
4697 the thread_stopped target callback is not NULL before
4698 calling it.
4699
4700 2015-12-21 Yao Qi <yao.qi@linaro.org>
4701
4702 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4703 arm breakpoint.
4704
4705 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4706
4707 * server.c (handle_query): Call target_supports_software_single_step.
4708
4709 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4710
4711 * linux-low.c (single_step): New function.
4712 (linux_resume_one_lwp_throw): Call single_step.
4713 (start_step_over): Likewise.
4714
4715 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4716
4717 * Makefile.in (SFILES): Append arch/arm-linux.c,
4718 arch/arm-get-next-pcs.c.
4719 (arm-linux.o): New rule.
4720 (arm-get-next-pcs.o): New rule.
4721 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4722 arm-linux.o.
4723 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4724 to linux-aarch32-low.c.
4725 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4726 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4727 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4728 (thumb2_breakpoint_len): Likewise.
4729 (arm_is_thumb_mode): Make non-static.
4730 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4731 from linux-aarch32-low.c.
4732 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4733 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4734 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4735 (thumb2_breakpoint_len): Likewise.
4736 (arm_is_thumb_mode): New declaration.
4737 * linux-arm-low.c: Include arch/arm-linux.h
4738 aarch/arm-get-next-pcs.h, sys/syscall.h.
4739 (get_next_pcs_ops): New struct.
4740 (get_next_pcs_addr_bits_remove): New function.
4741 (get_next_pcs_is_thumb): New function.
4742 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4743 (arm_sigreturn_next_pc): Likewise.
4744 (get_next_pcs_syscall_next_pc): Likewise.
4745 (arm_gdbserver_get_next_pcs): Likewise.
4746 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4747 Initialize.
4748 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4749 * server.h: Include gdb_vecs.h.
4750
4751 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4752
4753 * Makefile.in (SFILES): Append common/common-regcache.c.
4754 (OBS): Append common-regcache.o.
4755 (common-regcache.o): New rule.
4756 * regcache.c (init_register_cache): Initialize cache to
4757 REG_UNAVAILABLE.
4758 (regcache_raw_read_unsigned): New function.
4759 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4760 register_status enum.
4761
4762 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4763
4764 * linux-aarch64-low.c (the_low_targets): Rename
4765 breakpoint_reinsert_addr to get_next_pcs.
4766 * linux-arm-low.c (the_low_targets): Likewise.
4767 * linux-bfin-low.c (the_low_targets): Likewise.
4768 * linux-cris-low.c (the_low_targets): Likewise.
4769 * linux-crisv32-low.c (the_low_targets): Likewise.
4770 * linux-low.c (can_software_single_step): Likewise.
4771 (install_software_single_step_breakpoints): New function.
4772 (start_step_over): Use install_software_single_step_breakpoints.
4773 * linux-low.h: New CORE_ADDR vector.
4774 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4775 get_next_pcs.
4776 * linux-mips-low.c (the_low_targets): Likewise.
4777 * linux-nios2-low.c (the_low_targets): Likewise.
4778 * linux-sparc-low.c (the_low_targets): Likewise.
4779
4780 2015-12-17 Pedro Alves <palves@redhat.com>
4781
4782 * linux-low.c (linux_kill_one_lwp): Remove references to
4783 LinuxThreads.
4784 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4785 to 'kill'.
4786 (linux_init_signals): Delete.
4787 (initialize_low): Adjust.
4788 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4789
4790 2015-12-16 Pedro Alves <palves@redhat.com>
4791
4792 * configure.ac (compiler warning flags): When testing a
4793 -Wno-foo option, check whether -Wfoo works instead.
4794 * configure: Regenerate.
4795
4796 2015-12-11 Don Breazeal <donb@codesourcery.com>
4797
4798 * server.c (process_serial_event): Don't exit from gdbserver
4799 in remote mode if there are still active inferiors.
4800
4801 2015-12-11 Yao Qi <yao.qi@linaro.org>
4802
4803 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4804 arm_breakpoint_at if the process is 32-bit.
4805
4806 2015-12-11 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4809 arm breakpoint.
4810
4811 2015-12-07 Yao Qi <yao.qi@linaro.org>
4812
4813 * configure.srv: Append arm.o to srv_tgtobj for
4814 aarch64*-*-linux* target.
4815 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4816 from linux-arm-low.c.
4817 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4818 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4819 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4820 (thumb2_breakpoint_len): Likewise.
4821 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4822 (arm_breakpoint_kinds): Likewise.
4823 (arm_breakpoint_kind_from_pc): Likewise.
4824 (arm_sw_breakpoint_from_kind): Likewise.
4825 (arm_breakpoint_kind_from_current_state): Likewise.
4826 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4827 (arm_sw_breakpoint_from_kind): Declare.
4828 (arm_breakpoint_kind_from_current_state): Declare.
4829 (arm_breakpoint_at): Declare.
4830 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4831 arm_sw_breakpoint_from_kind if process is 32-bit.
4832 (aarch64_breakpoint_kind_from_pc): New function.
4833 (aarch64_breakpoint_kind_from_current_state): New function.
4834 (the_low_target): Initialize fields breakpoint_kind_from_pc
4835 and breakpoint_kind_from_current_state.
4836 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4837 linux-aarch32-low.c.
4838 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4839 (arm_breakpoint, arm_breakpoint_len): Likewise.
4840 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4841 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4842 (arm_is_thumb_mode): Likewise.
4843 (arm_breakpoint_at): Likewise.
4844 (arm_breakpoint_kind_from_pc): Likewise.
4845 (arm_sw_breakpoint_from_kind): Likewise.
4846 (arm_breakpoint_kind_from_current_state): Likewise.
4847
4848 Revert:
4849 2015-08-04 Yao Qi <yao.qi@linaro.org>
4850
4851 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4852 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4853 * server.c (extended_protocol): Remove "static".
4854 * server.h (extended_protocol): Declare it.
4855
4856 2015-12-04 Josh Stone <jistone@redhat.com>
4857
4858 * target.h (struct target_ops) <arch_setup>: Rename to ...
4859 (struct target_ops) <post_create_inferior>: ... this.
4860 (target_arch_setup): Rename to ...
4861 (target_post_create_inferior): ... this, calling post_create_inferior.
4862 * server.c (start_inferior): Update target_arch_setup calls to
4863 target_post_create_inferior.
4864 * linux-low.c (linux_low_ptrace_options): Forward declare.
4865 (linux_arch_setup): Update its comment for general use.
4866 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4867 (struct linux_target_ops): Use linux_post_create_inferior.
4868 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4869 to post_create_inferior.
4870 * nto-low.c (struct nto_target_ops): Likewise.
4871 * spu-low.c (struct spu_target_ops): Likewise.
4872 * win32-low.c (struct win32_target_ops): Likewise.
4873
4874 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4875
4876 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4877
4878 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4879
4880 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4881 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4882 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4883 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4884 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4885 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4886 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4887 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4888 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4889 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4890 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4891 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4892
4893 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4894
4895 * linux-low.c (linux_look_up_symbols): Don't call
4896 linux_supports_traceclone.
4897 * linux-low.h (thread_db_init): Remove use_events argument.
4898 * thread-db.c (thread_db_use_event): Remove global variable.
4899 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4900 (struct thread_db) <td_create_bp>: Remove field.
4901 (thread_db_create_event): Remove function.
4902 (thread_db_enable_reporting): Likewise.
4903 (find_one_thread): Don't check for thread_db_use_events.
4904 (attach_thread): Likewise.
4905 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4906 (try_thread_db_load_1): Don't check for thread_db_use_events.
4907 (thread_db_init): Remove use_events argument and thread events
4908 handling.
4909 (remove_thread_event_breakpoints): Remove function.
4910 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4911
4912 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4913
4914 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4915 New function.
4916 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4917 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4918 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4919 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4920 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4921 Initialize.
4922 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4923 New function.
4924 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4925 * linux-low.c (can_hardware_single_step): Use
4926 supports_hardware_single_step.
4927 (can_software_single_step): New function.
4928 (start_step_over): Call can_software_single_step.
4929 (linux_supports_hardware_single_step): New function.
4930 (struct target_ops) <supports_software_single_step>: Initialize.
4931 * linux-low.h (struct linux_target_ops)
4932 <supports_hardware_single_step>: Initialize.
4933 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4934 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4935 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4936 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4937 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4938 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4939 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4940 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4941 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4942 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4943 Initialize.
4944 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4945 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4946 Initialize.
4947 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4948 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4949 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4950 New function.
4951 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4952 * target.h (struct target_ops): <supports_software_single_step>:
4953 New field.
4954 (target_supports_software_single_step): New macro.
4955
4956 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4957
4958 * linux-low.c (linux_wait_1): Fix pc advance condition.
4959 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4960 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4961
4962 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4963
4964 * linux-arm-low.c (arm_is_thumb_mode): New function.
4965 (arm_breakpoint_at): Use arm_is_thumb_mode.
4966 (arm_breakpoint_kind_from_current_state): New function.
4967 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4968 Initialize.
4969 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4970 (linux_breakpoint_kind_from_current_state): New function.
4971 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4972 * linux-low.h (struct linux_target_ops)
4973 <breakpoint_kind_from_current_state>: New field.
4974 * target.h (struct target_ops): Likewise.
4975 (target_breakpoint_kind_from_current_state): New macro.
4976
4977 2015-11-30 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (linux_resume): Wake up the event loop before
4980 returning.
4981
4982 2015-11-30 Pedro Alves <palves@redhat.com>
4983
4984 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4985 check.
4986 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4987 to -1.
4988 * target.c (struct thread_search): New structure.
4989 (thread_search_callback): New function.
4990 (prev_general_thread): New global.
4991 (prepare_to_access_memory, done_accessing_memory): New functions.
4992 * target.h (prepare_to_access_memory, done_accessing_memory):
4993 Replace macros with function declarations.
4994
4995 2015-11-30 Pedro Alves <palves@redhat.com>
4996
4997 PR 14618
4998 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4999 report TARGET_WAITKIND_NO_RESUMED.
5000 * remote-utils.c (prepare_resume_reply): Handle
5001 TARGET_WAITKIND_NO_RESUMED.
5002 * server.c (report_no_resumed): New global.
5003 (handle_query) <qSupported>: Handle "no-resumed+". Report
5004 "no-resumed+" support.
5005 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5006 return error if the client doesn't support no-resumed events.
5007 (push_stop_notification): New function.
5008 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5009 events if the client supports them.
5010
5011 2015-11-30 Pedro Alves <palves@redhat.com>
5012
5013 * linux-low.c (thread_still_has_status_pending_p): Don't check
5014 vCont;t here.
5015 (lwp_resumed): New function.
5016 (status_pending_p_callback): Return early if the LWP is not
5017 supposed to be resumed.
5018
5019 2015-11-30 Pedro Alves <palves@redhat.com>
5020
5021 * linux-low.c (handle_extended_wait): Assert that the LWP's
5022 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5023 thread create events, leave the new child's status pending.
5024 (linux_low_filter_event): If GDB wants to hear about thread exit
5025 events, leave the LWP marked dead and don't delete it.
5026 (linux_wait_for_event_filtered): Don't check for thread exit.
5027 (filter_exit_event): New function.
5028 (linux_wait_1): Use it, when returning an exit event.
5029 (linux_resume_one_lwp_throw): Assert that the LWP's
5030 waitstatus is TARGET_WAITKIND_IGNORE.
5031 * remote-utils.c (prepare_resume_reply): Handle
5032 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5033 * server.c (report_thread_events): New global.
5034 (handle_general_set): Handle QThreadEvents.
5035 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5036 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5037 TARGET_WAITKIND_THREAD_EXITED.
5038 * server.h (report_thread_events): Declare.
5039
5040 2015-11-30 Pedro Alves <palves@redhat.com>
5041
5042 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5043 the thread's last_resume_kind was resume_stop.
5044
5045 2015-11-30 Pedro Alves <palves@redhat.com>
5046
5047 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5048 before returning.
5049
5050 2015-11-30 Pedro Alves <palves@redhat.com>
5051
5052 * server.c (handle_v_requests): Handle vCtrlC.
5053
5054 2015-11-30 Pedro Alves <palves@redhat.com>
5055
5056 * gdbthread.h (find_any_thread_of_pid): Declare.
5057 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5058 functions.
5059 * server.c (handle_query): If current_thread is NULL, look for
5060 another thread of the selected process.
5061
5062 2015-11-26 Daniel Colascione <dancol@dancol.org>
5063 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5066 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5067 name in reply.
5068 * target.h (struct target_ops) <thread_name>: New field.
5069 (target_thread_name): New macro.
5070
5071 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5072
5073 * regcache.h (regcache_invalidate_pid): Add declaration.
5074 * regcache.c (regcache_invalidate_pid): New function, extracted
5075 from regcache_invalidate.
5076 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5077 Add trivial documentation comment.
5078 * lynx-low.c: Use regcache_invalidate_pid instead of
5079 regcache_invalidate.
5080
5081 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5082
5083 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5084 and Elf64_auxv_t if the target is Android.
5085
5086 2015-11-22 Doug Evans <xdje42@gmail.com>
5087
5088 * target.h: #include <sys/types.h>.
5089
5090 2015-11-19 Pedro Alves <palves@redhat.com>
5091
5092 * linux-low.c (linux_process_qsupported): Change prototype.
5093 Adjust.
5094 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5095 Change prototype.
5096 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5097 and adjust to loop over all features.
5098 * server.c (handle_query) <qSupported>: Adjust to call
5099 target_process_qsupported once, passing it a vector of unprocessed
5100 features.
5101 * target.h (struct target_ops) <process_qsupported>: Change
5102 prototype.
5103 (target_process_qsupported): Adjust.
5104
5105 2015-11-19 Pedro Alves <palves@redhat.com>
5106
5107 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5108 mode.
5109 * configure: Regenerate.
5110
5111 2015-11-19 Pedro Alves <palves@redhat.com>
5112
5113 * configure: Regenerate.
5114
5115 2015-11-19 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5118 type to uint32_t.
5119
5120 2015-11-19 Yao Qi <yao.qi@linaro.org>
5121
5122 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5123 (struct aarch64_operand): Move enum out.
5124
5125 2015-11-19 Yao Qi <yao.qi@linaro.org>
5126
5127 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5128 struct user_fpsimd_state *.
5129 (aarch64_store_fpregset): Likewise.
5130
5131 2015-11-19 Yao Qi <yao.qi@linaro.org>
5132
5133 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5134 struct user_pt_regs *.
5135 (aarch64_store_gregset): Likewise.
5136
5137 2015-11-18 Pedro Alves <palves@redhat.com>
5138
5139 * Makefile.in (all_object_files): Add $IPA_OBJS.
5140
5141 2015-11-17 Pedro Alves <palves@redhat.com>
5142
5143 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5144 GDB_SIGNAL_0 and gdb_signal_to_string.
5145
5146 2015-11-17 Pedro Alves <palves@redhat.com>
5147
5148 * win32-low.c (handle_output_debug_string): Remove parameter.
5149 (win32_kill): Remove our_status local and adjust call to
5150 handle_output_debug_string.
5151 (get_child_debug_event): Adjust call to
5152 handle_output_debug_string.
5153
5154 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5155
5156 * linux-mips-low.c (mips_fill_gregset): Add cast.
5157 (mips_store_gregset): Likewise.
5158 (mips_fill_fpregset): Likewise.
5159 (mips_store_fpregset): Likewise.
5160
5161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5162
5163 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5164 priv.
5165
5166 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5167
5168 * linux-mips-low.c (mips_linux_new_thread): Change type of
5169 watch_type to enum target_hw_bp_type.
5170
5171 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5172
5173 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5174 Change return type to arm_hwbp_type.
5175
5176 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5177
5178 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5179 (arm_store_gregset): Likewise.
5180 * linux-arm-low.c (arm_get_hwcap): Likewise.
5181 (arm_read_description): Likewise.
5182
5183 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5184
5185 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5186
5187 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5188
5189 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5190 (ppc_fill_vsxregset): Likewise.
5191 (ppc_store_vsxregset): Likewise.
5192 (ppc_fill_vrregset): Likewise.
5193 (ppc_store_vrregset): Likewise.
5194 (ppc_fill_evrregset): Likewise.
5195 (ppc_store_evrregset): Likewise.
5196
5197 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5198
5199 * linux-ppc-low.c (ppc_usrregs_info): Remove
5200 forward-declaration.
5201 (ppc_arch_setup): Move lower in file.
5202
5203 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5204
5205 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5206 (ps_pdwrite): Likewise.
5207
5208 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5209
5210 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5211 to after assert checks.
5212
5213 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5214
5215 * proc-service.c (ps_pdread): Add/adjust casts.
5216 (ps_pdwrite): Add/adjust casts.
5217
5218 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5219
5220 * server.c (handle_search_memory_1): Cast return value of
5221 memmem.
5222
5223 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5224
5225 * server.c (write_qxfer_response): Change type of data to
5226 gdb_byte *.
5227
5228 2015-10-29 Pedro Alves <palves@redhat.com>
5229
5230 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5231
5232 2015-10-29 Pedro Alves <palves@redhat.com>
5233
5234 * tracepoint.c (clear_installed_tracepoints): Add casts.
5235
5236 2015-10-29 Pedro Alves <palves@redhat.com>
5237
5238 * server.c (handle_v_cont, process_serial_event): Add enum
5239 gdb_signal casts to signal parsing code.
5240
5241 2015-10-29 Pedro Alves <palves@redhat.com>
5242
5243 * linux-low.h (NULL_REGSET): Define.
5244 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5245 * linux-arm-low.c (arm_regsets): Likewise.
5246 * linux-crisv32-low.c (cris_regsets): Likewise.
5247 * linux-m68k-low.c (m68k_regsets): Likewise.
5248 * linux-mips-low.c (mips_regsets): Likewise.
5249 * linux-nios2-low.c (nios2_regsets): Likewise.
5250 * linux-ppc-low.c (ppc_regsets): Likewise.
5251 * linux-s390-low.c (s390_regsets): Likewise.
5252 * linux-sh-low.c (sh_regsets): Likewise.
5253 * linux-sparc-low.c (sparc_regsets): Likewise.
5254 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5255 * linux-tile-low.c (tile_regsets): Likewise.
5256 * linux-x86-low.c (x86_regsets): Likewise.
5257 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5258
5259 2015-10-29 Pedro Alves <palves@redhat.com>
5260
5261 * linux-low.h (NULL_REGSET): Define.
5262 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5263 * linux-arm-low.c (arm_regsets): Likewise.
5264 * linux-crisv32-low.c (cris_regsets): Likewise.
5265 * linux-m68k-low.c (m68k_regsets): Likewise.
5266 * linux-mips-low.c (mips_regsets): Likewise.
5267 * linux-nios2-low.c (nios2_regsets): Likewise.
5268 * linux-ppc-low.c (ppc_regsets): Likewise.
5269 * linux-s390-low.c (s390_regsets): Likewise.
5270 * linux-sh-low.c (sh_regsets): Likewise.
5271 * linux-sparc-low.c (sparc_regsets): Likewise.
5272 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5273 * linux-tile-low.c (tile_regsets): Likewise.
5274 * linux-x86-low.c (x86_regsets): Likewise.
5275 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5276
5277 2015-10-26 Doug Evans <dje@google.com>
5278
5279 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5280
5281 2015-10-26 Doug Evans <dje@google.com>
5282
5283 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5284
5285 2015-10-26 Doug Evans <dje@google.com>
5286
5287 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5288 for debug_printf.
5289 (attach_thread, find_new_threads_callback): Ditto.
5290
5291 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5292
5293 * mem-break.h (set_breakpoint_data): Remove.
5294
5295 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5296
5297 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5298 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5299 (initialize_low): Remove set_breakpoint_data call.
5300 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5301 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5302 (initialize_low): Remove set_breakpoint_data call.
5303 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5304 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5305 (initialize_low): Remove set_breakpoint_data call.
5306
5307 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5308
5309 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5310 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5311 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5312 * target.h (target_breakpoint_kind_from_pc): New macro.
5313
5314 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5315
5316 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5317 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5318 the default breakpoint kind.
5319
5320 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5321
5322 * linux-arm-low.c (arm_supports_z_point_type): Add software
5323 breakpoint support.
5324
5325 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5326
5327 * linux-arm-low.c: Refactor breakpoint definitions.
5328 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5329 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5330
5331 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5332
5333 * Makefile.in: Add arm.c/o.
5334 * configure.srv: Likewise.
5335 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5336 (arm_breakpoint_kind_from_pc): New function.
5337 (arm_sw_breakpoint_from_kind): Return proper kind.
5338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5339
5340 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5341
5342 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5343 removal.
5344 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5345 (struct raw_breakpoint) <size>: Remove.
5346 (struct raw_breakpoint) <kind>: Add.
5347 (bp_size): New function.
5348 (bp_opcode): Likewise.
5349 (find_raw_breakpoint_at): Adjust for kind.
5350 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5351 (remove_memory_breakpoint): Adjust for kind call bp_size.
5352 (set_raw_breakpoint_at): Adjust for kind.
5353 (set_breakpoint): Likewise.
5354 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5355 (delete_raw_breakpoint): Adjust for kind.
5356 (delete_breakpoint): Likewise.
5357 (find_gdb_breakpoint): Likewise.
5358 (set_gdb_breakpoint_1): Likewise.
5359 (set_gdb_breakpoint): Likewise.
5360 (delete_gdb_breakpoint_1): Likewise.
5361 (delete_gdb_breakpoint): Likewise.
5362 (uninsert_raw_breakpoint): Likewise.
5363 (reinsert_raw_breakpoint): Likewise.
5364 (set_breakpoint_data): Remove.
5365 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5366 (check_mem_read): Adjust for kind call bp_size.
5367 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5368 (clone_one_breakpoint): Adjust for kind.
5369 * mem-break.h (set_gdb_breakpoint): Likewise.
5370 (delete_gdb_breakpoint): Likewise.
5371 * server.c (process_serial_event): Likewise.
5372
5373 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5374
5375 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5376 (struct linux_target_ops) <breakpoint>: Remove.
5377 (struct linux_target_ops) <breakpoint_len>: Remove.
5378 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5379 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5380 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5381 (arm_sw_breakpoint_from_kind): New function.
5382 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5383 (struct linux_target_ops) <breakpoint>: Remove.
5384 (struct linux_target_ops) <breakpoint_len>: Remove.
5385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5387 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5388 (struct linux_target_ops) <breakpoint>: Remove.
5389 (struct linux_target_ops) <breakpoint_len>: Remove.
5390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5392 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5393 (struct linux_target_ops) <breakpoint>: Remove.
5394 (struct linux_target_ops) <breakpoint_len>: Remove.
5395 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5396 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5397 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5398 and sw_breakpoint_from_kind to increment the pc.
5399 (linux_breakpoint_kind_from_pc): New function.
5400 (linux_sw_breakpoint_from_kind): New function.
5401 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5402 (initialize_low): Call breakpoint_kind_from_pc and
5403 sw_breakpoint_from_kind to replace breakpoint_data/len.
5404 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5405 New field.
5406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5407 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5408 (struct linux_target_ops) <breakpoint>: Remove.
5409 (struct linux_target_ops) <breakpoint_len>: Remove.
5410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5412 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5413 (struct linux_target_ops) <breakpoint>: Remove.
5414 (struct linux_target_ops) <breakpoint_len>: Remove.
5415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5417 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5418 (struct linux_target_ops) <breakpoint>: Remove.
5419 (struct linux_target_ops) <breakpoint_len>: Remove.
5420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5422 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5423 (struct linux_target_ops) <breakpoint>: Remove.
5424 (struct linux_target_ops) <breakpoint_len>: Remove.
5425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5427 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5428 (struct linux_target_ops) <breakpoint>: Remove.
5429 (struct linux_target_ops) <breakpoint_len>: Remove.
5430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5432 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5433 (struct linux_target_ops) <breakpoint>: Remove.
5434 (struct linux_target_ops) <breakpoint_len>: Remove.
5435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5437 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5438 (struct linux_target_ops) <breakpoint>: Remove.
5439 (struct linux_target_ops) <breakpoint_len>: Remove.
5440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5442 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5443 (struct linux_target_ops) <breakpoint>: Remove.
5444 (struct linux_target_ops) <breakpoint_len>: Remove.
5445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5447 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5448 (struct linux_target_ops) <breakpoint>: Remove.
5449 (struct linux_target_ops) <breakpoint_len>: Remove.
5450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5452 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5453 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5454 (struct linux_target_ops) <breakpoint>: Remove.
5455 (struct linux_target_ops) <breakpoint_len>: Remove.
5456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5458 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5459 (struct linux_target_ops) <breakpoint>: Remove.
5460 (struct linux_target_ops) <breakpoint_len>: Remove.
5461 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5462 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5463
5464 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5465
5466 * linux-cris-low.c (cris_get_pc): Remove void arg.
5467
5468 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5469
5470 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5471 variable name.
5472
5473 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5474
5475 * inferiors.c (thread_pid_matches_callback): New function.
5476 (find_thread_process): New function.
5477 (remove_thread): Reset current_thread.
5478 (remove_process): Assert threads have been removed first.
5479
5480 2015-10-15 Yao Qi <yao.qi@linaro.org>
5481
5482 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5483 if it is 3.
5484 (aarch64_remove_point): Likewise.
5485 * regcache.c (regcache_register_size): New function.
5486
5487 2015-10-12 Yao Qi <yao.qi@linaro.org>
5488
5489 * linux-aarch64-low.c: Update all callers as emit_load_store
5490 is renamed to aarch64_emit_load_store.
5491
5492 2015-10-12 Yao Qi <yao.qi@linaro.org>
5493
5494 * linux-aarch64-low.c: Update all callers of function renaming
5495 from emit_insn to aarch64_emit_insn.
5496
5497 2015-10-12 Yao Qi <yao.qi@linaro.org>
5498
5499 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5500 arch/aarch64-insn.h.
5501 (struct aarch64_memory_operand): Likewise.
5502 (ENCODE): Likewise.
5503 (emit_insn): Move to arch/aarch64-insn.c.
5504 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5505 (emit_load_store): Move to arch/aarch64-insn.c.
5506 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5507 (can_encode_int32): Remove.
5508
5509 2015-10-12 Yao Qi <yao.qi@linaro.org>
5510
5511 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5512 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5513 (aarch64_relocate_instruction): Likewise.
5514 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5515 (struct aarch64_insn_visitor): Likewise.
5516
5517 2015-10-12 Yao Qi <yao.qi@linaro.org>
5518
5519 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5520 (struct aarch64_insn_visitor): New.
5521 (struct aarch64_insn_relocation_data): New.
5522 (aarch64_ftrace_insn_reloc_b): New function.
5523 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5524 (aarch64_ftrace_insn_reloc_cb): Likewise.
5525 (aarch64_ftrace_insn_reloc_tb): Likewise.
5526 (aarch64_ftrace_insn_reloc_adr): Likewise.
5527 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5528 (aarch64_ftrace_insn_reloc_others): Likewise.
5529 (visitor): New.
5530 (aarch64_relocate_instruction): Use visitor.
5531
5532 2015-10-12 Yao Qi <yao.qi@linaro.org>
5533
5534 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5535 int. Add argument buf.
5536 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5537 aarch64_relocate_instruction.
5538
5539 2015-10-12 Yao Qi <yao.qi@linaro.org>
5540
5541 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5542 argument insn. Remove local variable insn. Don't call
5543 target_read_uint32.
5544 (aarch64_install_fast_tracepoint_jump_pad): Call
5545 target_read_uint32.
5546
5547 2015-09-30 Yao Qi <yao.qi@linaro.org>
5548
5549 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5550 (emit_load_store_pair): Likewise.
5551
5552 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5553
5554 * dll.c (match_dll): Add cast(s).
5555 (unloaded_dll): Likewise.
5556 * linux-low.c (second_thread_of_pid_p): Likewise.
5557 (delete_lwp_callback): Likewise.
5558 (count_events_callback): Likewise.
5559 (select_event_lwp_callback): Likewise.
5560 (linux_set_resume_request): Likewise.
5561 * server.c (accumulate_file_name_length): Likewise.
5562 (emit_dll_description): Likewise.
5563 (handle_qxfer_threads_worker): Likewise.
5564 (visit_actioned_threads): Likewise.
5565 * thread-db.c (any_thread_of): Likewise.
5566 * tracepoint.c (same_process_p): Likewise.
5567 (match_blocktype): Likewise.
5568 (build_traceframe_info_xml): Likewise.
5569
5570 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5571
5572 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5573 assignment.
5574 (gdb_unparse_agent_expr): Likewise.
5575 * hostio.c (require_data): Likewise.
5576 (handle_pread): Likewise.
5577 * linux-low.c (disable_regset): Likewise.
5578 (fetch_register): Likewise.
5579 (store_register): Likewise.
5580 (get_dynamic): Likewise.
5581 (linux_qxfer_libraries_svr4): Likewise.
5582 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5583 (set_fast_tracepoint_jump): Likewise.
5584 (uninsert_fast_tracepoint_jumps_at): Likewise.
5585 (reinsert_fast_tracepoint_jumps_at): Likewise.
5586 (validate_inserted_breakpoint): Likewise.
5587 (clone_agent_expr): Likewise.
5588 * regcache.c (init_register_cache): Likewise.
5589 * remote-utils.c (putpkt_binary_1): Likewise.
5590 (decode_M_packet): Likewise.
5591 (decode_X_packet): Likewise.
5592 (look_up_one_symbol): Likewise.
5593 (relocate_instruction): Likewise.
5594 (monitor_output): Likewise.
5595 * server.c (handle_search_memory): Likewise.
5596 (handle_qxfer_exec_file): Likewise.
5597 (handle_qxfer_libraries): Likewise.
5598 (handle_qxfer): Likewise.
5599 (handle_query): Likewise.
5600 (handle_v_cont): Likewise.
5601 (handle_v_run): Likewise.
5602 (captured_main): Likewise.
5603 * target.c (write_inferior_memory): Likewise.
5604 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5605 * tracepoint.c (init_trace_buffer): Likewise.
5606 (add_tracepoint_action): Likewise.
5607 (add_traceframe): Likewise.
5608 (add_traceframe_block): Likewise.
5609 (cmd_qtdpsrc): Likewise.
5610 (cmd_qtdv): Likewise.
5611 (cmd_qtstatus): Likewise.
5612 (response_source): Likewise.
5613 (response_tsv): Likewise.
5614 (cmd_qtnotes): Likewise.
5615 (gdb_collect): Likewise.
5616 (initialize_tracepoint): Likewise.
5617
5618 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5619
5620 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5621 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5622 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5623 <NOP>: New.
5624 (enum aarch64_condition_codes): New enum.
5625 (w0): New static global.
5626 (fp): Likewise.
5627 (lr): Likewise.
5628 (struct aarch64_memory_operand) <type>: New
5629 MEMORY_OPERAND_POSTINDEX type.
5630 (postindex_memory_operand): New helper function.
5631 (emit_ret): New function.
5632 (emit_load_store_pair): New function, factored out of emit_stp
5633 with support for MEMORY_OPERAND_POSTINDEX.
5634 (emit_stp): Rewrite using emit_load_store_pair.
5635 (emit_ldp): New function.
5636 (emit_load_store): Likewise.
5637 (emit_ldr): Mention post-index instruction in comment.
5638 (emit_ldrh): New function.
5639 (emit_ldrb): New function.
5640 (emit_ldrsw): Mention post-index instruction in comment.
5641 (emit_str): Likewise.
5642 (emit_subs): New function.
5643 (emit_cmp): Likewise.
5644 (emit_and): Likewise.
5645 (emit_orr): Likewise.
5646 (emit_orn): Likewise.
5647 (emit_eor): Likewise.
5648 (emit_mvn): Likewise.
5649 (emit_lslv): Likewise.
5650 (emit_lsrv): Likewise.
5651 (emit_asrv): Likewise.
5652 (emit_mul): Likewise.
5653 (emit_sbfm): Likewise.
5654 (emit_sbfx): Likewise.
5655 (emit_ubfm): Likewise.
5656 (emit_ubfx): Likewise.
5657 (emit_csinc): Likewise.
5658 (emit_cset): Likewise.
5659 (emit_nop): Likewise.
5660 (emit_ops_insns): New helper function.
5661 (emit_pop): Likewise.
5662 (emit_push): Likewise.
5663 (aarch64_emit_prologue): New function.
5664 (aarch64_emit_epilogue): Likewise.
5665 (aarch64_emit_add): Likewise.
5666 (aarch64_emit_sub): Likewise.
5667 (aarch64_emit_mul): Likewise.
5668 (aarch64_emit_lsh): Likewise.
5669 (aarch64_emit_rsh_signed): Likewise.
5670 (aarch64_emit_rsh_unsigned): Likewise.
5671 (aarch64_emit_ext): Likewise.
5672 (aarch64_emit_log_not): Likewise.
5673 (aarch64_emit_bit_and): Likewise.
5674 (aarch64_emit_bit_or): Likewise.
5675 (aarch64_emit_bit_xor): Likewise.
5676 (aarch64_emit_bit_not): Likewise.
5677 (aarch64_emit_equal): Likewise.
5678 (aarch64_emit_less_signed): Likewise.
5679 (aarch64_emit_less_unsigned): Likewise.
5680 (aarch64_emit_ref): Likewise.
5681 (aarch64_emit_if_goto): Likewise.
5682 (aarch64_emit_goto): Likewise.
5683 (aarch64_write_goto_address): Likewise.
5684 (aarch64_emit_const): Likewise.
5685 (aarch64_emit_call): Likewise.
5686 (aarch64_emit_reg): Likewise.
5687 (aarch64_emit_pop): Likewise.
5688 (aarch64_emit_stack_flush): Likewise.
5689 (aarch64_emit_zero_ext): Likewise.
5690 (aarch64_emit_swap): Likewise.
5691 (aarch64_emit_stack_adjust): Likewise.
5692 (aarch64_emit_int_call_1): Likewise.
5693 (aarch64_emit_void_call_2): Likewise.
5694 (aarch64_emit_eq_goto): Likewise.
5695 (aarch64_emit_ne_goto): Likewise.
5696 (aarch64_emit_lt_goto): Likewise.
5697 (aarch64_emit_le_goto): Likewise.
5698 (aarch64_emit_gt_goto): Likewise.
5699 (aarch64_emit_ge_got): Likewise.
5700 (aarch64_emit_ops_impl): New static global variable.
5701 (aarch64_emit_ops): New target function, return
5702 &aarch64_emit_ops_impl.
5703 (struct linux_target_ops): Install it.
5704
5705 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5706
5707 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5708 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5709 aarch64-ipa.o.
5710 * linux-aarch64-ipa.c: New file.
5711 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5712 and endian.h.
5713 (aarch64_get_thread_area): New target method.
5714 (extract_signed_bitfield): New helper function.
5715 (aarch64_decode_ldr_literal): New function.
5716 (enum aarch64_opcodes): New enum.
5717 (struct aarch64_register): New struct.
5718 (struct aarch64_operand): New struct.
5719 (x0): New static global.
5720 (x1): Likewise.
5721 (x2): Likewise.
5722 (x3): Likewise.
5723 (x4): Likewise.
5724 (w2): Likewise.
5725 (ip0): Likewise.
5726 (sp): Likewise.
5727 (xzr): Likewise.
5728 (aarch64_register): New helper function.
5729 (register_operand): Likewise.
5730 (immediate_operand): Likewise.
5731 (struct aarch64_memory_operand): New struct.
5732 (offset_memory_operand): New helper function.
5733 (preindex_memory_operand): Likewise.
5734 (enum aarch64_system_control_registers): New enum.
5735 (ENCODE): New macro.
5736 (emit_insn): New helper function.
5737 (emit_b): New function.
5738 (emit_bcond): Likewise.
5739 (emit_cb): Likewise.
5740 (emit_tb): Likewise.
5741 (emit_blr): Likewise.
5742 (emit_stp): Likewise.
5743 (emit_ldp_q_offset): Likewise.
5744 (emit_stp_q_offset): Likewise.
5745 (emit_load_store): Likewise.
5746 (emit_ldr): Likewise.
5747 (emit_ldrsw): Likewise.
5748 (emit_str): Likewise.
5749 (emit_ldaxr): Likewise.
5750 (emit_stxr): Likewise.
5751 (emit_stlr): Likewise.
5752 (emit_data_processing_reg): Likewise.
5753 (emit_data_processing): Likewise.
5754 (emit_add): Likewise.
5755 (emit_sub): Likewise.
5756 (emit_mov): Likewise.
5757 (emit_movk): Likewise.
5758 (emit_mov_addr): Likewise.
5759 (emit_mrs): Likewise.
5760 (emit_msr): Likewise.
5761 (emit_sevl): Likewise.
5762 (emit_wfe): Likewise.
5763 (append_insns): Likewise.
5764 (can_encode_int32_in): New helper function.
5765 (aarch64_relocate_instruction): New function.
5766 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5767 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5768 (struct linux_target_ops): Install aarch64_get_thread_area,
5769 aarch64_install_fast_tracepoint_jump_pad and
5770 aarch64_get_min_fast_tracepoint_insn_len.
5771
5772 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5773
5774 * Makefile.in (aarch64-insn.o): New rule.
5775 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5776
5777 2015-09-21 Yao Qi <yao.qi@linaro.org>
5778
5779 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5780
5781 2015-09-21 Yao Qi <yao.qi@linaro.org>
5782
5783 * tracepoint.c (max_jump_pad_size): Remove.
5784
5785 2015-09-18 Yao Qi <yao.qi@linaro.org>
5786
5787 * linux-aarch64-low.c: Don't include sys/uio.h.
5788 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5789
5790 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5791
5792 * tracepoint.c (eval_result_type): Change prototype.
5793 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5794
5795 2015-09-15 Pedro Alves <palves@redhat.com>
5796
5797 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5798 Check whether to report exec events instead of checking whether
5799 multiprocess is enabled.
5800
5801 2015-09-15 Pedro Alves <palves@redhat.com>
5802
5803 PR remote/18965
5804 * remote-utils.c (prepare_resume_reply): Merge
5805 TARGET_WAITKIND_VFORK_DONE switch case with the
5806 TARGET_WAITKIND_FORKED case.
5807
5808 2015-09-15 Yao Qi <yao.qi@linaro.org>
5809
5810 * server.c (handle_query): Check string comparison using
5811 "else if" instead of "if".
5812
5813 2015-09-15 Yao Qi <yao.qi@linaro.org>
5814
5815 * server.c (vCont_supported): New global variable.
5816 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5817 matches. Append ";vContSupported+" to own_buf.
5818 (handle_v_requests): Append ";s;S" to own_buf if target supports
5819 hardware single step or vCont_supported is false.
5820 (capture_main): Set vCont_supported to zero.
5821
5822 2015-09-15 Yao Qi <yao.qi@linaro.org>
5823
5824 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5825 it to ...
5826 (linux_supports_hardware_single_step): ... New function.
5827 (linux_target_ops): Update.
5828 * lynx-low.c (lynx_target_ops): Set field
5829 supports_hardware_single_step to target_can_do_hardware_single_step.
5830 * nto-low.c (nto_target_ops): Likewise.
5831 * spu-low.c (spu_target_ops): Likewise.
5832 * win32-low.c (win32_target_ops): Likewise.
5833 * target.c (target_can_do_hardware_single_step): New function.
5834 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5835 Remove. <supports_hardware_single_step>: New field.
5836 (target_supports_conditional_breakpoints): Remove.
5837 (target_supports_hardware_single_step): New macro.
5838 (target_can_do_hardware_single_step): Declare.
5839 * server.c (handle_query): Use target_supports_hardware_single_step
5840 instead of target_supports_conditional_breakpoints.
5841
5842 2015-09-15 Yao Qi <yao.qi@linaro.org>
5843
5844 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5845 function.
5846 (struct linux_target_ops the_low_target): Install
5847 aarch64_linux_siginfo_fixup.
5848
5849 2015-09-11 Don Breazeal <donb@codesourcery.com>
5850 Luis Machado <lgustavo@codesourcery.com>
5851
5852 * linux-low.c (linux_mourn): Static declaration.
5853 (linux_arch_setup): Move in front of
5854 handle_extended_wait.
5855 (linux_arch_setup_thread): New function.
5856 (handle_extended_wait): Handle exec events. Call
5857 linux_arch_setup_thread. Make event_lwp argument a
5858 pointer-to-a-pointer.
5859 (check_zombie_leaders): Do not check stopped threads.
5860 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5861 (linux_low_filter_event): Add lwp and thread for exec'ing
5862 non-leader thread if leader thread has been deleted.
5863 Refactor code into linux_arch_setup_thread and call it.
5864 Pass child lwp pointer by reference to handle_extended_wait.
5865 (linux_wait_for_event_filtered): Update comment.
5866 (linux_wait_1): Prevent clobbering exec event status.
5867 (linux_supports_exec_events): New function.
5868 (linux_target_ops) <supports_exec_events>: Initialize new member.
5869 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5870 new member.
5871 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5872 * server.c (report_exec_events): New global variable.
5873 (handle_query): Handle qSupported query for exec-events feature.
5874 (captured_main): Initialize report_exec_events.
5875 * server.h (report_exec_events): Declare new global variable.
5876 * target.h (struct target_ops) <supports_exec_events>: New
5877 member.
5878 (target_supports_exec_events): New macro.
5879 * win32-low.c (win32_target_ops) <supports_exec_events>:
5880 Initialize new member.
5881
5882 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5883
5884 * linux-low.c (linux_low_enable_btrace): Remove.
5885 (linux_target_ops): Replace linux_low_enable_btrace with
5886 linux_enable_btrace.
5887
5888 2015-09-03 Yao Qi <yao.qi@linaro.org>
5889
5890 * linux-aarch64-low.c (aarch64_insert_point): Call
5891 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5892 returns true.
5893
5894 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5895
5896 * linux-low.c (check_stopped_by_breakpoint): Use
5897 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5898
5899 2015-08-27 Pedro Alves <palves@redhat.com>
5900
5901 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5902
5903 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5904
5905 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5906 the XNEW-family equivalent.
5907 (compile_bytecodes): Likewise.
5908 * dll.c (loaded_dll): Likewise.
5909 * event-loop.c (append_callback_event): Likewise.
5910 (create_file_handler): Likewise.
5911 (create_file_event): Likewise.
5912 * hostio.c (handle_open): Likewise.
5913 * inferiors.c (add_thread): Likewise.
5914 (add_process): Likewise.
5915 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5916 * linux-arm-low.c (arm_new_process): Likewise.
5917 (arm_new_thread): Likewise.
5918 * linux-low.c (add_to_pid_list): Likewise.
5919 (linux_add_process): Likewise.
5920 (handle_extended_wait): Likewise.
5921 (add_lwp): Likewise.
5922 (enqueue_one_deferred_signal): Likewise.
5923 (enqueue_pending_signal): Likewise.
5924 (linux_resume_one_lwp_throw): Likewise.
5925 (linux_resume_one_thread): Likewise.
5926 (linux_read_memory): Likewise.
5927 (linux_write_memory): Likewise.
5928 * linux-mips-low.c (mips_linux_new_process): Likewise.
5929 (mips_linux_new_thread): Likewise.
5930 (mips_add_watchpoint): Likewise.
5931 * linux-x86-low.c (initialize_low_arch): Likewise.
5932 * lynx-low.c (lynx_add_process): Likewise.
5933 * mem-break.c (set_raw_breakpoint_at): Likewise.
5934 (set_breakpoint): Likewise.
5935 (add_condition_to_breakpoint): Likewise.
5936 (add_commands_to_breakpoint): Likewise.
5937 (clone_agent_expr): Likewise.
5938 (clone_one_breakpoint): Likewise.
5939 * regcache.c (new_register_cache): Likewise.
5940 * remote-utils.c (look_up_one_symbol): Likewise.
5941 * server.c (queue_stop_reply): Likewise.
5942 (start_inferior): Likewise.
5943 (queue_stop_reply_callback): Likewise.
5944 (handle_target_event): Likewise.
5945 * spu-low.c (fetch_ppc_memory): Likewise.
5946 (store_ppc_memory): Likewise.
5947 * target.c (set_target_ops): Likewise.
5948 * thread-db.c (thread_db_load_search): Likewise.
5949 (try_thread_db_load_1): Likewise.
5950 * tracepoint.c (add_tracepoint): Likewise.
5951 (add_tracepoint_action): Likewise.
5952 (create_trace_state_variable): Likewise.
5953 (cmd_qtdpsrc): Likewise.
5954 (cmd_qtro): Likewise.
5955 (add_while_stepping_state): Likewise.
5956 * win32-low.c (child_add_thread): Likewise.
5957 (get_image_name): Likewise.
5958
5959 2015-08-25 Yao Qi <yao.qi@linaro.org>
5960
5961 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5962
5963 2015-08-25 Yao Qi <yao.qi@linaro.org>
5964
5965 * Makefile.in (aarch64-linux.o): New rule.
5966 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5967 srv_tgtobj.
5968 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5969 (aarch64_init_debug_reg_state): Make it extern.
5970 (aarch64_linux_prepare_to_resume): Remove.
5971
5972 2015-08-25 Yao Qi <yao.qi@linaro.org>
5973
5974 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5975 lwp_arch_private_info and ptid_of_lwp.
5976
5977 2015-08-25 Yao Qi <yao.qi@linaro.org>
5978
5979 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5980 Find proc_info by find_process_pid. All callers updated.
5981
5982 2015-08-25 Yao Qi <yao.qi@linaro.org>
5983
5984 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5985 Remove.
5986 (debug_reg_change_callback): Remove.
5987 (aarch64_notify_debug_reg_change): Remove.
5988
5989 2015-08-25 Yao Qi <yao.qi@linaro.org>
5990
5991 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5992 Call current_lwp_ptid.
5993
5994 2015-08-25 Yao Qi <yao.qi@linaro.org>
5995
5996 * linux-aarch64-low.c (debug_reg_change_callback): Use
5997 debug_printf.
5998
5999 2015-08-25 Yao Qi <yao.qi@linaro.org>
6000
6001 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6002
6003 2015-08-25 Yao Qi <yao.qi@linaro.org>
6004
6005 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6006
6007 2015-08-25 Yao Qi <yao.qi@linaro.org>
6008
6009 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6010 the code.
6011
6012 2015-08-25 Yao Qi <yao.qi@linaro.org>
6013
6014 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6015 Remove.
6016 (debug_reg_change_callback): Remove argument entry and add argument
6017 lwp. Remove local variable thread. Don't print thread id in the
6018 debugging output. Don't check whether pid of thread equals to pid.
6019 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6020 iterate_over_lwps instead find_inferior.
6021
6022 2015-08-24 Pedro Alves <palves@redhat.com>
6023
6024 * inferiors.c (get_first_process): New function.
6025 * inferiors.h (get_first_process): New declaration.
6026 * remote-utils.c (read_ptid): Default to the first process in the
6027 list, instead of to the current thread's process.
6028
6029 2015-08-24 Pedro Alves <palves@redhat.com>
6030
6031 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6032 * event-loop.c: Likewise.
6033 * remote-utils.c: Likewise.
6034 * tracepoint.c: Likewise.
6035
6036 2015-08-24 Pedro Alves <palves@redhat.com>
6037
6038 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6039 ptid_get_lwp.
6040
6041 2015-08-21 Pedro Alves <palves@redhat.com>
6042
6043 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6044 instead of literal 1.
6045
6046 2015-08-21 Pedro Alves <palves@redhat.com>
6047
6048 * tdesc.c (default_description): Explicitly zero-initialize.
6049
6050 2015-08-21 Pedro Alves <palves@redhat.com>
6051
6052 PR gdb/18749
6053 * inferiors.c (remove_thread): Discard any pending stop reply for
6054 this thread.
6055 * server.c (remove_all_on_match_pid): Rename to ...
6056 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6057 instead of a pid.
6058 (discard_queued_stop_replies): Change parameter to a ptid. Now
6059 extern.
6060 (handle_v_kill, kill_inferior_callback, captured_main)
6061 (process_serial_event): Adjust.
6062 * server.h (discard_queued_stop_replies): Declare.
6063
6064 2015-08-21 Pedro Alves <palves@redhat.com>
6065
6066 * linux-low.c (wait_for_sigstop): Always switch to no thread
6067 selected if the previously current thread dies.
6068 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6069 process instead of the current thread's.
6070 * remote-utils.c (input_interrupt): Don't check if there's no
6071 current thread.
6072 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6073 current thread to the general thread fails, error out.
6074 (handle_qxfer_auxv, handle_qxfer_libraries)
6075 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6076 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6077 (handle_query): Check if there's a thread selected instead of
6078 checking whether there's any thread in the thread list.
6079 (handle_qxfer_threads, handle_qxfer_btrace)
6080 (handle_qxfer_btrace_conf): Don't error out early if there's no
6081 thread in the thread list.
6082 (handle_v_cont, myresume): Don't set the current thread to the
6083 continue thread.
6084 (process_serial_event) <Hg handling>: Also set thread_id if the
6085 previous general thread is still alive.
6086 (process_serial_event) <g/G handling>: If setting the current
6087 thread to the general thread fails, error out.
6088 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6089 thread's lwp instead of the current thread's.
6090 * target.c (set_desired_thread): If the desired thread was not
6091 found, leave the current thread pointing to NULL. Return an int
6092 (boolean) indicating success.
6093 * target.h (set_desired_thread): Change return type to int.
6094
6095 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6096
6097 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6098 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6099 #includes.
6100 (ps_get_thread_area): New function.
6101
6102 2015-08-19 Gary Benson <gbenson@redhat.com>
6103
6104 * hostio.c (handle_pread): Do not attempt to read more data
6105 than hostio_reply_with_data can fit in a packet.
6106
6107 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6108
6109 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6110
6111 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6112
6113 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6114
6115 2015-08-06 Pedro Alves <palves@redhat.com>
6116
6117 * tracepoint.c (expr_eval_result): Now an int.
6118
6119 2015-08-06 Pedro Alves <palves@redhat.com>
6120
6121 * gdbthread.h (struct regcache): Forward declare.
6122 (struct thread_info) <regcache_data>: Now a struct regcache
6123 pointer.
6124 * inferiors.c (inferior_regcache_data)
6125 (set_inferior_regcache_data): Now work with struct regcache
6126 pointers.
6127 * inferiors.h (struct regcache): Forward declare.
6128 (inferior_regcache_data, set_inferior_regcache_data): Now work
6129 with struct regcache pointers.
6130 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6131 (free_register_cache_thread): Remove struct regcache pointer
6132 casts.
6133
6134 2015-08-06 Pedro Alves <palves@redhat.com>
6135
6136 * server.c (captured_main): On error, print the exception message
6137 to stderr, and if run_once is set, throw a quit.
6138
6139 2015-08-06 Pedro Alves <palves@redhat.com>
6140
6141 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6142 the current thread.
6143
6144 2015-08-06 Pedro Alves <palves@redhat.com>
6145
6146 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6147 reading beyond the passed in buffer length.
6148
6149 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6150
6151 * tracepoint.c (symbol_list) <required>: Remove.
6152
6153 2015-08-06 Pedro Alves <palves@redhat.com>
6154
6155 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6156 count if stopping and suspending threads.
6157 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6158 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6159 (linux_detach): Complete an ongoing step-over.
6160 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6161 throughout.
6162 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6163 (linux_wait_1): If passing a signal to the inferior after
6164 finishing a step-over, unsuspend and re-resume all lwps. If we
6165 see a single-step event but the thread should be continuing, don't
6166 pass the trap to gdb.
6167 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6168 internal_error instead of gdb_assert.
6169 (enqueue_pending_signal): New function.
6170 (check_ptrace_stopped_lwp_gone): Add debug output.
6171 (start_step_over): Use internal_error instead of gdb_assert.
6172 (complete_ongoing_step_over): New function.
6173 (linux_resume_one_thread): Don't resume a suspended thread.
6174 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6175 it stepping.
6176
6177 2015-08-06 Pedro Alves <palves@redhat.com>
6178
6179 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6180 (linux_thread_alive): Use lwp_is_marked_dead.
6181 (extended_event_reported): Delete.
6182 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6183 instead of extended_event_reported.
6184 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6185 as well.
6186 (lwp_is_marked_dead): New function.
6187 (lwp_running): Use lwp_is_marked_dead.
6188 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6189 comment.
6190
6191 2015-08-06 Pedro Alves <palves@redhat.com>
6192
6193 * linux-low.c (linux_wait_1): Move fork event output out of the
6194 !report_to_gdb check. Pass event_child->waitstatus to
6195 target_waitstatus_to_string instead of ourstatus.
6196
6197 2015-08-04 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6200 if current_thread is 32 bit.
6201
6202 2015-08-04 Yao Qi <yao.qi@linaro.org>
6203
6204 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6205 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6206 * server.c (extended_protocol): Remove "static".
6207 * server.h (extended_protocol): Declare it.
6208
6209 2015-08-04 Yao Qi <yao.qi@linaro.org>
6210
6211 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6212 both aarch64 and aarch32.
6213 (aarch64_set_pc): Likewise.
6214
6215 2015-08-04 Yao Qi <yao.qi@linaro.org>
6216
6217 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6218 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6219 arm-with-neon.xml to srv_xmlfiles.
6220 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6221 (is_64bit_tdesc): New function.
6222 (aarch64_linux_read_description): New function.
6223 (aarch64_arch_setup): Call aarch64_linux_read_description.
6224 (regs_info): Rename to regs_info_aarch64.
6225 (aarch64_regs_info): Return right regs_info.
6226 (initialize_low_arch): Call initialize_low_arch_aarch32.
6227
6228 2015-08-04 Yao Qi <yao.qi@linaro.org>
6229
6230 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6231 * linux-aarch32-low.c: New file.
6232 * linux-aarch32-low.h: New file.
6233 * linux-arm-low.c (arm_fill_gregset): Move it to
6234 linux-aarch32-low.c.
6235 (arm_store_gregset): Likewise.
6236 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6237 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6238 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6239 (regs_info): Rename to regs_info_arm.
6240 (arm_regs_info): Return regs_info_aarch32 if
6241 have_ptrace_getregset is 1 and target description is
6242 arm_with_neon or arm_with_vfpv3.
6243 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6244 Call initialize_low_arch_aarch32 instead.
6245
6246 2015-08-04 Yao Qi <yao.qi@linaro.org>
6247
6248 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6249 * linux-low.c: ... here.
6250 * linux-low.h (have_ptrace_getregset): Declare it.
6251
6252 2015-08-04 Pedro Alves <palves@redhat.com>
6253
6254 * thread-db.c (struct thread_db): Use new typedefs.
6255 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6256 CHK calls.
6257 (disable_thread_event_reporting): Cast result of dlsym to
6258 destination function pointer type.
6259 (thread_db_mourn): Use td_ta_delete_ftype.
6260
6261 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6262
6263 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6264 arch variant.
6265 (CDX_BREAKPOINT): Define for R2.
6266 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6267 (the_low_target): Add comments.
6268
6269 2015-07-30 Yao Qi <yao.qi@linaro.org>
6270
6271 * linux-arm-low.c (arm_hwcap): Remove it.
6272 (arm_read_description): New local variable arm_hwcap. Don't
6273 set arm_hwcap to zero.
6274
6275 2015-07-30 Yao Qi <yao.qi@linaro.org>
6276
6277 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6278 Use regcache->tdesc instead.
6279 (arm_store_wmmxregset): Likewise.
6280 (arm_fill_vfpregset): Likewise.
6281 (arm_store_vfpregset): Likewise.
6282
6283 2015-07-30 Yao Qi <yao.qi@linaro.org>
6284
6285 * linux-arm-low.c: Include arch/arm.h.
6286 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6287 (arm_store_gregset): Likewise.
6288
6289 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6290
6291 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6292 ptrace's 4th parameter.
6293
6294 2015-07-27 Yao Qi <yao.qi@linaro.org>
6295
6296 * configure.srv (case aarch64*-*-linux*): Don't set
6297 srv_linux_usrregs.
6298
6299 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6300
6301 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6302 sys/ptrace.h.
6303 * linux-arm-low.c: Likewise.
6304 * linux-cris-low.c: Likewise.
6305 * linux-crisv32-low.c: Likewise.
6306 * linux-low.c: Likewise.
6307 * linux-m68k-low.c: Likewise.
6308 * linux-mips-low.c: Likewise.
6309 * linux-nios2-low.c: Likewise.
6310 * linux-s390-low.c: Likewise.
6311 * linux-sparc-low.c: Likewise.
6312 * linux-tic6x-low.c: Likewise.
6313 * linux-tile-low.c: Likewise.
6314 * linux-x86-low.c: Likewise.
6315
6316 2015-07-24 Pedro Alves <palves@redhat.com>
6317
6318 * config.in: Regenerate.
6319 * configure: Regenerate.
6320
6321 2015-07-24 Pedro Alves <palves@redhat.com>
6322
6323 * acinclude.m4: Include ../ptrace.m4.
6324 * configure.ac: Call GDB_AC_PTRACE.
6325 * config.in, configure: Regenerate.
6326
6327 2015-07-24 Yao Qi <yao.qi@linaro.org>
6328
6329 * linux-low.c (linux_create_inferior): Remove setting to
6330 proc->priv->new_inferior.
6331 (linux_attach): Likewise.
6332 (linux_low_filter_event): Likewise.
6333 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6334
6335 2015-07-24 Yao Qi <yao.qi@linaro.org>
6336
6337 * linux-low.c (linux_arch_setup): New function.
6338 (linux_low_filter_event): If proc->tdesc is NULL and
6339 proc->attached is true, call the_low_target.arch_setup.
6340 Otherwise, keep status pending, and return.
6341 (linux_resume_one_lwp_throw): Don't call get_pc if
6342 thread->while_stepping isn't NULL. Don't call
6343 get_thread_regcache if proc->tdesc is NULL.
6344 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6345 (linux_target_ops): Install arch_setup.
6346 * server.c (start_inferior): Call the_target->arch_setup.
6347 * target.h (struct target_ops) <arch_setup>: New field.
6348 (target_arch_setup): New marco.
6349 * lynx-low.c (lynx_target_ops): Update.
6350 * nto-low.c (nto_target_ops): Update.
6351 * spu-low.c (spu_target_ops): Update.
6352 * win32-low.c (win32_target_ops): Update.
6353
6354 2015-07-24 Yao Qi <yao.qi@linaro.org>
6355
6356 * linux-low.c (linux_add_process): Don't set
6357 proc->priv->new_inferior.
6358 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6359 (linux_attach): Likewise.
6360
6361 2015-07-24 Yao Qi <yao.qi@linaro.org>
6362
6363 * server.c (start_inferior): Code refactor.
6364
6365 2015-07-24 Yao Qi <yao.qi@linaro.org>
6366
6367 * server.c (process_serial_event): Set general_thread.
6368
6369 2015-07-21 Yao Qi <yao.qi@linaro.org>
6370
6371 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6372 aarch64_linux_get_debug_reg_capacity.
6373
6374 2015-07-17 Yao Qi <yao.qi@linaro.org>
6375
6376 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6377 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6378 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6379 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6380 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6381 (AARCH64_HWP_ALIGNMENT): Likewise.
6382 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6383 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6384 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6385 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6386 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6387 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6388 (struct aarch64_debug_reg_state): Likewise.
6389 (struct arch_lwp_info): Likewise.
6390 (aarch64_align_watchpoint): Likewise.
6391 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6392 (aarch64_watchpoint_length): Likewise.
6393 (aarch64_point_encode_ctrl_reg): Likewise
6394 (aarch64_point_is_aligned): Likewise.
6395 (aarch64_align_watchpoint): Likewise.
6396 (aarch64_linux_set_debug_regs):
6397 (aarch64_dr_state_insert_one_point): Likewise.
6398 (aarch64_dr_state_remove_one_point): Likewise.
6399 (aarch64_handle_breakpoint): Likewise.
6400 (aarch64_handle_aligned_watchpoint): Likewise.
6401 (aarch64_handle_unaligned_watchpoint): Likewise.
6402 (aarch64_handle_watchpoint): Likewise.
6403
6404 2015-07-17 Yao Qi <yao.qi@linaro.org>
6405
6406 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6407 and don't aarch64_get_debug_reg_state. All callers update.
6408 (aarch64_handle_aligned_watchpoint): Likewise.
6409 (aarch64_handle_unaligned_watchpoint): Likewise.
6410 (aarch64_handle_watchpoint): Likewise.
6411 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6412 (aarch64_remove_point): Likewise.
6413
6414 2015-07-17 Yao Qi <yao.qi@linaro.org>
6415
6416 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6417 debug_printf.
6418 (aarch64_handle_unaligned_watchpoint): Likewise.
6419
6420 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6421
6422 Revert the previous 3 commits:
6423 Move gdb_regex* to common/
6424 Move linux_find_memory_regions_full & co.
6425 gdbserver build-id attribute generator
6426
6427 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6428 Jan Kratochvil <jan.kratochvil@redhat.com>
6429
6430 gdbserver build-id attribute generator.
6431 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6432 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6433 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6434 (find_phdr): New.
6435 (get_dynamic): Use find_pdhr to traverse program headers.
6436 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6437 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6438 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6439 (get_hex_build_id): New.
6440 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6441 to reply XML document.
6442
6443 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6444 Jan Kratochvil <jan.kratochvil@redhat.com>
6445
6446 * target.c: Include target/target-utils.h and fcntl.h.
6447 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6448 (target_fileio_read_stralloc): New functions.
6449
6450 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6451
6452 * Makefile.in (OBS): Add gdb_regex.o.
6453 (gdb_regex.o): New.
6454 * config.in: Rebuilt.
6455 * configure: Rebuilt.
6456
6457 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6458 Jan Kratochvil <jan.kratochvil@redhat.com>
6459
6460 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6461 * Makefile.in (OBS): Add target-utils.o.
6462 (linux-maps.o, target-utils.o): New.
6463 * configure.srv (srv_linux_obj): Add linux-maps.o.
6464
6465 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6466
6467 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6468 function, return 1.
6469 (the_low_target): Install it.
6470
6471 2015-07-14 Pedro Alves <palves@redhat.com>
6472
6473 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6474 Instead, ignore ECHILD, and throw an error for other errnos.
6475
6476 2015-07-10 Pedro Alves <palves@redhat.com>
6477
6478 * event-loop.c (struct callback_event) <data>: Change type to
6479 gdb_client_data instance instead of gdb_client_data pointer.
6480 (append_callback_event): Adjust.
6481
6482 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6483
6484 * linux-aarch64-low.c: Add comments for each linux_target_ops
6485 method. Remove comments already covered in target_ops and
6486 linux_target_ops definitions.
6487 (the_low_target): Add comments for each unimplemented method.
6488
6489 2015-07-09 Yao Qi <yao.qi@linaro.org>
6490
6491 * linux-aarch64-low.c (aarch64_regmap): Remove.
6492 (aarch64_usrregs_info): Remove.
6493 (regs_info): Set field usrregs to NULL.
6494
6495 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6496
6497 * linux-low.c: Include "rsp-low.h"
6498 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6499 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6500 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6501 (handle_btrace_enable_pt): New.
6502 (handle_btrace_general_set): Support "pt".
6503 (handle_btrace_conf_general_set): Support "pt:size".
6504
6505 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6506
6507 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6508 Z_PACKET_SW_BP.
6509
6510 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6511
6512 * linux-aarch64-low.c: Remove comment about endianness.
6513 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6514 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6515 memcmp.
6516
6517 2015-06-24 Gary Benson <gbenson@redhat.com>
6518
6519 * linux-i386-ipa.c (stdint.h): Do not include.
6520 * lynx-i386-low.c (stdint.h): Likewise.
6521 * lynx-ppc-low.c (stdint.h): Likewise.
6522 * mem-break.c (stdint.h): Likewise.
6523 * thread-db.c (stdint.h): Likewise.
6524 * tracepoint.c (stdint.h): Likewise.
6525 * win32-low.c (stdint.h): Likewise.
6526
6527 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6528
6529 * server.c (write_qxfer_response): Update call to
6530 remote_escape_output.
6531
6532 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6533 Jan Kratochvil <jan.kratochvil@redhat.com>
6534
6535 Merge multiple hex conversions.
6536 * gdbreplay.c (tohex): Rename to 'fromhex'.
6537 (logchar): Use fromhex.
6538
6539 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6540
6541 * server.c (handle_qxfer_libraries): Set `version' attribute for
6542 <library-list>.
6543
6544 2015-06-10 Gary Benson <gbenson@redhat.com>
6545
6546 * target.h (struct target_ops) <multifs_open>: New field.
6547 <multifs_unlink>: Likewise.
6548 <multifs_readlink>: Likewise.
6549 * linux-low.c (nat/linux-namespaces.h): New include.
6550 (linux_target_ops): Initialize the_target->multifs_open,
6551 the_target->multifs_unlink and the_target->multifs_readlink.
6552 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6553 * hostio.c (hostio_fs_pid): New static variable.
6554 (hostio_handle_new_gdb_connection): New function.
6555 (handle_setfs): Likewise.
6556 (handle_open): Use the_target->multifs_open as appropriate.
6557 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6558 (handle_readlink): Use the_target->multifs_readlink as
6559 appropriate.
6560 (handle_vFile): Handle vFile:setfs packets.
6561 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6562 after target_handle_new_gdb_connection.
6563
6564 2015-06-10 Gary Benson <gbenson@redhat.com>
6565
6566 * configure.ac (AC_CHECK_FUNCS): Add setns.
6567 * config.in: Regenerate.
6568 * configure: Likewise.
6569 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6570 (linux-namespaces.o): New rule.
6571 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6572
6573 2015-06-09 Gary Benson <gbenson@redhat.com>
6574
6575 * hostio.c (handle_open): Process mode argument with
6576 fileio_to_host_mode.
6577
6578 2015-06-01 Yao Qi <yao.qi@linaro.org>
6579
6580 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6581 * linux-x86-low.c: Likewise.
6582
6583 2015-05-28 Don Breazeal <donb@codesourcery.com>
6584
6585 * linux-low.c (handle_extended_wait): Initialize
6586 thread_info.last_resume_kind for new fork children.
6587
6588 2015-05-15 Pedro Alves <palves@redhat.com>
6589
6590 * target.h (target_handle_new_gdb_connection): Rewrite using if
6591 wrapped in do/while.
6592
6593 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6594
6595 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6596 * configure, config.in: Regenerate.
6597 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6598 Declare typedef.
6599
6600 2015-05-12 Don Breazeal <donb@codesourcery.com>
6601
6602 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6603 PTRACE_EVENT_VFORK_DONE.
6604 (linux_low_ptrace_options, extended_event_reported): Add vfork
6605 events.
6606 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6607 and "vforkdone" for RSP 'T' Stop Reply Packet.
6608 * server.h (report_vfork_events): Declare
6609 global variable.
6610
6611 2015-05-12 Don Breazeal <donb@codesourcery.com>
6612
6613 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6614 (the_low_target) <new_fork>: Initialize new member.
6615 * linux-arm-low.c (arm_new_fork): New function.
6616 (the_low_target) <new_fork>: Initialize new member.
6617 * linux-low.c (handle_extended_wait): Call new target function
6618 new_fork.
6619 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6620 * linux-mips-low.c (mips_add_watchpoint): New function
6621 extracted from mips_insert_point.
6622 (the_low_target) <new_fork>: Initialize new member.
6623 (mips_linux_new_fork): New function.
6624 (mips_insert_point): Call mips_add_watchpoint.
6625 * linux-x86-low.c (x86_linux_new_fork): New function.
6626 (the_low_target) <new_fork>: Initialize new member.
6627
6628 2015-05-12 Don Breazeal <donb@codesourcery.com>
6629
6630 * linux-low.c (handle_extended_wait): Implement return value,
6631 rename argument 'event_child' to 'event_lwp', handle
6632 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6633 (linux_low_ptrace_options): New function.
6634 (linux_low_filter_event): Call linux_low_ptrace_options,
6635 use different argument fo linux_enable_event_reporting,
6636 use return value from handle_extended_wait.
6637 (extended_event_reported): New function.
6638 (linux_wait_1): Call extended_event_reported and set
6639 status to report fork events.
6640 (linux_write_memory): Add pid to debug message.
6641 (reset_lwp_ptrace_options_callback): New function.
6642 (linux_handle_new_gdb_connection): New function.
6643 (linux_target_ops): Initialize new structure member.
6644 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6645 * lynx-low.c: Initialize new structure member.
6646 * remote-utils.c (prepare_resume_reply): Implement stop reason
6647 "fork" for "T" stop message.
6648 * server.c (handle_query): Call handle_new_gdb_connection.
6649 * server.h (report_fork_events): Declare global flag.
6650 * target.h (struct target_ops) <handle_new_gdb_connection>:
6651 New member.
6652 (target_handle_new_gdb_connection): New macro.
6653 * win32-low.c: Initialize new structure member.
6654
6655 2015-05-12 Don Breazeal <donb@codesourcery.com>
6656
6657 * mem-break.c (APPEND_TO_LIST): Define macro.
6658 (clone_agent_expr): New function.
6659 (clone_one_breakpoint): New function.
6660 (clone_all_breakpoints): New function.
6661 * mem-break.h: Declare new functions.
6662
6663 2015-05-12 Don Breazeal <donb@codesourcery.com>
6664
6665 * linux-low.c (linux_supports_fork_events): New function.
6666 (linux_supports_vfork_events): New function.
6667 (linux_target_ops): Initialize new structure members.
6668 (initialize_low): Call linux_check_ptrace_features.
6669 * lynx-low.c (lynx_target_ops): Initialize new structure
6670 members.
6671 * server.c (report_fork_events, report_vfork_events):
6672 New global flags.
6673 (handle_query): Add new features to qSupported packet and
6674 response.
6675 (captured_main): Initialize new global variables.
6676 * target.h (struct target_ops) <supports_fork_events>:
6677 New member.
6678 <supports_vfork_events>: New member.
6679 (target_supports_fork_events): New macro.
6680 (target_supports_vfork_events): New macro.
6681 * win32-low.c (win32_target_ops): Initialize new structure
6682 members.
6683
6684 2015-05-12 Gary Benson <gbenson@redhat.com>
6685
6686 * server.c (handle_qxfer_exec_file): Use current process
6687 if annex is empty.
6688
6689 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6690
6691 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6692 Remove HAVE_PTRACE_GETREGS conditionals.
6693 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6694 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6695
6696 2015-05-08 Yao Qi <yao.qi@linaro.org>
6697
6698 * linux-low.c (linux_supports_conditional_breakpoints): New
6699 function.
6700 (linux_target_ops): Install new target method.
6701 * lynx-low.c (lynx_target_ops): Install NULL hook for
6702 supports_conditional_breakpoints.
6703 * nto-low.c (nto_target_ops): Likewise.
6704 * spu-low.c (spu_target_ops): Likewise.
6705 * win32-low.c (win32_target_ops): Likewise.
6706 * server.c (handle_query): Check
6707 target_supports_conditional_breakpoints.
6708 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6709 New field.
6710 (target_supports_conditional_breakpoints): New macro.
6711
6712 2015-05-06 Pedro Alves <palves@redhat.com>
6713
6714 PR server/18081
6715 * server.c (start_inferior): If the process exits, mourn it.
6716
6717 2015-04-21 Gary Benson <gbenson@redhat.com>
6718
6719 * hostio.c (fileio_open_flags_to_host): Factored out to
6720 fileio_to_host_openflags in common/fileio.c. Single use
6721 updated.
6722
6723 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6724
6725 * linux-xtensa-low.c (xtensa_fill_gregset)
6726 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6727 XCHAL_HAVE_LOOP.
6728
6729 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6730
6731 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6732 (regs_info): Replace usrregs pointer with NULL.
6733
6734 2015-04-17 Gary Benson <gbenson@redhat.com>
6735
6736 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6737 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6738 * server.c (handle_qxfer_exec_file): New function.
6739 (qxfer_packets): Add exec-file entry.
6740 (handle_query): Report qXfer:exec-file:read as supported packet.
6741
6742 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6743
6744 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6745
6746 2015-04-09 Gary Benson <gbenson@redhat.com>
6747
6748 * hostio-errno.c (errno_to_fileio_error): Remove function.
6749 Update caller to use remote_fileio_to_fio_error.
6750
6751 2015-04-09 Yao Qi <yao.qi@linaro.org>
6752
6753 * linux-low.c (linux_insert_point): Call
6754 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6755 (linux_remove_point): Call remove_memory_breakpoint if type is
6756 raw_bkpt_type_sw.
6757 * linux-x86-low.c (x86_insert_point): Don't call
6758 insert_memory_breakpoint.
6759 (x86_remove_point): Don't call remove_memory_breakpoint.
6760
6761 2015-04-01 Pedro Alves <palves@redhat.com>
6762 Cleber Rosa <crosa@redhat.com>
6763
6764 * server.c (gdbserver_usage): Reorganize and extend the usage
6765 message.
6766
6767 2015-03-24 Pedro Alves <palves@redhat.com>
6768
6769 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6770 output. Also dump TRAP_TRACE.
6771 (linux_low_filter_event): In debug output, distinguish a
6772 resume_stop SIGSTOP from a delayed SIGSTOP.
6773
6774 2015-03-24 Gary Benson <gbenson@redhat.com>
6775
6776 * linux-x86-low.c (x86_linux_new_thread): Moved to
6777 nat/x86-linux.c.
6778 (x86_linux_prepare_to_resume): Likewise.
6779
6780 2015-03-24 Gary Benson <gbenson@redhat.com>
6781
6782 * Makefile.in (x86-linux-dregs.o): New rule.
6783 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6784 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6785 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6786 (x86_linux_dr_get): Likewise.
6787 (x86_linux_dr_set): Likewise.
6788 (update_debug_registers_callback): Likewise.
6789 (x86_linux_dr_set_addr): Likewise.
6790 (x86_linux_dr_get_addr): Likewise.
6791 (x86_linux_dr_set_control): Likewise.
6792 (x86_linux_dr_get_control): Likewise.
6793 (x86_linux_dr_get_status): Likewise.
6794 (x86_linux_update_debug_registers): Likewise.
6795
6796 2015-03-24 Gary Benson <gbenson@redhat.com>
6797
6798 * linux-x86-low.c (x86_linux_update_debug_registers):
6799 New function, factored out from...
6800 (x86_linux_prepare_to_resume): ...this.
6801
6802 2015-03-24 Gary Benson <gbenson@redhat.com>
6803
6804 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6805 (x86_linux_dr_set): Likewise.
6806 (update_debug_registers_callback): Likewise.
6807 (x86_linux_dr_set_addr): Likewise.
6808 (x86_linux_dr_get_addr): Likewise.
6809 (x86_linux_dr_set_control): Likewise.
6810 (x86_linux_dr_get_control): Likewise.
6811 (x86_linux_dr_get_status): Likewise.
6812 (x86_linux_prepare_to_resume): Likewise.
6813
6814 2015-03-24 Gary Benson <gbenson@redhat.com>
6815
6816 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6817 Use perror_with_name. Pass string through gettext.
6818 (x86_linux_dr_set): Likewise.
6819
6820 2015-03-24 Gary Benson <gbenson@redhat.com>
6821
6822 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6823 (x86_linux_dr_set_addr): ...this.
6824 (x86_dr_low_get_addr): Rename to...
6825 (x86_linux_dr_get_addr): ...this.
6826 (x86_dr_low_set_control): Rename to...
6827 (x86_linux_dr_set_control): ...this.
6828 (x86_dr_low_get_control): Rename to...
6829 (x86_linux_dr_get_control): ...this.
6830 (x86_dr_low_get_status): Rename to...
6831 (x86_linux_dr_get_status): ...this.
6832 (x86_dr_low): Update with new function names.
6833
6834 2015-03-24 Gary Benson <gbenson@redhat.com>
6835
6836 * Makefile.in (x86-linux.o): New rule.
6837 * configure.srv: Add x86-linux.o to relevant targets.
6838 * linux-low.c (lwp_set_arch_private_info): New function.
6839 (lwp_arch_private_info): Likewise.
6840 * linux-x86-low.c: Include nat/x86-linux.h.
6841 (arch_lwp_info): Removed structure.
6842 (update_debug_registers_callback):
6843 Use lwp_set_debug_registers_changed.
6844 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6845 and lwp_set_debug_registers_changed.
6846 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6847
6848 2015-03-24 Gary Benson <gbenson@redhat.com>
6849
6850 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6851 * linux-arm-low.c (arm_new_thread): Likewise.
6852 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6853 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6854 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6855 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6856
6857 2015-03-24 Gary Benson <gbenson@redhat.com>
6858
6859 * linux-low.c (ptid_of_lwp): New function.
6860 (lwp_is_stopped): Likewise.
6861 (lwp_stop_reason): Likewise.
6862 * linux-x86-low.c (update_debug_registers_callback):
6863 Use lwp_is_stopped.
6864 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6865 lwp_stop_reason.
6866
6867 2015-03-24 Gary Benson <gbenson@redhat.com>
6868
6869 * linux-low.h (linux_stop_lwp): Remove declaration.
6870
6871 2015-03-24 Gary Benson <gbenson@redhat.com>
6872
6873 * linux-low.h: Include nat/linux-nat.h.
6874 * linux-low.c (iterate_over_lwps_args): New structure.
6875 (iterate_over_lwps_filter): New function.
6876 (iterate_over_lwps): Likewise.
6877 * linux-x86-low.c (update_debug_registers_callback):
6878 Update signature to what iterate_over_lwps expects.
6879 Remove PID check that iterate_over_lwps now performs.
6880 (x86_dr_low_set_addr): Use iterate_over_lwps.
6881 (x86_dr_low_set_control): Likewise.
6882
6883 2015-03-24 Gary Benson <gbenson@redhat.com>
6884
6885 * linux-x86-low.c (x86_debug_reg_state): New function.
6886 (x86_linux_prepare_to_resume): Use the above.
6887
6888 2015-03-24 Gary Benson <gbenson@redhat.com>
6889
6890 * linux-low.c (current_lwp_ptid): New function.
6891 * linux-x86-low.c: Include nat/linux-nat.h.
6892 (x86_dr_low_get_addr): Use current_lwp_ptid.
6893 (x86_dr_low_get_control): Likewise.
6894 (x86_dr_low_get_status): Likewise.
6895
6896 2015-03-20 Pedro Alves <palves@redhat.com>
6897
6898 * tracepoint.c (cmd_qtstatus): Make "str" const.
6899
6900 2015-03-20 Pedro Alves <palves@redhat.com>
6901
6902 * server.c (handle_general_set): Make "req_str" const.
6903
6904 2015-03-19 Pedro Alves <palves@redhat.com>
6905
6906 * linux-low.c (linux_resume_one_lwp): Rename to ...
6907 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6908 instead call perror_with_name.
6909 (check_ptrace_stopped_lwp_gone): New function.
6910 (linux_resume_one_lwp): Reimplement as wrapper around
6911 linux_resume_one_lwp_throw that swallows errors if the LWP is
6912 gone.
6913
6914 2015-03-19 Pedro Alves <palves@redhat.com>
6915
6916 * linux-low.c (count_events_callback, select_event_lwp_callback):
6917 No longer check whether the thread has resume_stop as last resume
6918 kind.
6919
6920 2015-03-19 Pedro Alves <palves@redhat.com>
6921
6922 * linux-low.c (count_events_callback, select_event_lwp_callback):
6923 Use the lwp's status_pending_p field, not the thread's.
6924
6925 2015-03-19 Pedro Alves <palves@redhat.com>
6926
6927 * linux-low.c (select_event_lwp_callback): Update comments to
6928 no longer mention SIGTRAP.
6929
6930 2015-03-18 Gary Benson <gbenson@redhat.com>
6931
6932 * server.c (handle_query): Do not report vFile:fstat as supported.
6933
6934 2015-03-11 Gary Benson <gbenson@redhat.com>
6935
6936 * hostio.c (sys/types.h): New include.
6937 (sys/stat.h): Likewise.
6938 (common-remote-fileio.h): Likewise.
6939 (handle_fstat): New function.
6940 (handle_vFile): Handle vFile:fstat packets.
6941
6942 2015-03-11 Gary Benson <gbenson@redhat.com>
6943
6944 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6945 struct stat.st_blocks and struct stat.st_blksize.
6946 * configure: Regenerate.
6947 * config.in: Likewise.
6948 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6949 (OBS): Add common-remote-fileio.o.
6950 (common-remote-fileio.o): New rule.
6951
6952 2015-03-09 Pedro Alves <palves@redhat.com>
6953
6954 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6955 'struct sockaddr' pointer in 'accept' call.
6956
6957 2015-03-09 Pedro Alves <palves@redhat.com>
6958
6959 Revert:
6960 2015-03-07 Pedro Alves <palves@redhat.com>
6961 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6962 or <winsock2.h> here. Instead include "gdb_socket.h".
6963 (remote_open): Use union gdb_sockaddr_u.
6964 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6965 or <winsock2.h> here. Instead include "gdb_socket.h".
6966 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6967 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6968 or <sys/un.h>.
6969 (init_named_socket, gdb_agent_helper_thread): Use union
6970 gdb_sockaddr_u.
6971
6972 2015-03-07 Pedro Alves <palves@redhat.com>
6973
6974 * configure.ac (build_warnings): Move
6975 -Wdeclaration-after-statement to the C-specific set.
6976 * configure: Regenerate.
6977
6978 2015-03-07 Pedro Alves <palves@redhat.com>
6979
6980 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6981 or <winsock2.h> here. Instead include "gdb_socket.h".
6982 (remote_open): Use union gdb_sockaddr_u.
6983 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6984 or <winsock2.h> here. Instead include "gdb_socket.h".
6985 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6986 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6987 or <sys/un.h>.
6988 (init_named_socket, gdb_agent_helper_thread): Use union
6989 gdb_sockaddr_u.
6990
6991 2015-03-07 Pedro Alves <palves@redhat.com>
6992
6993 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6994 instead.
6995
6996 2015-03-06 Yao Qi <yao.qi@linaro.org>
6997
6998 * linux-aarch64-low.c (aarch64_insert_point): Use
6999 show_debug_regs as a boolean.
7000 (aarch64_remove_point): Likewise.
7001
7002 2015-03-05 Pedro Alves <palves@redhat.com>
7003
7004 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7005 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7006 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7007 * nto-low.c (nto_target_ops): Likewise.
7008 * spu-low.c (spu_target_ops): Likewise.
7009 * win32-low.c (win32_target_ops): Likewise.
7010
7011 2015-03-04 Pedro Alves <palves@redhat.com>
7012
7013 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7014 Decide whether a breakpoint triggered based on the SIGTRAP's
7015 siginfo.si_code.
7016 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7017 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7018 (linux_low_filter_event): Check for breakpoints before checking
7019 watchpoints.
7020 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7021 siginfo.si_code.
7022 (linux_stopped_by_sw_breakpoint)
7023 (linux_supports_stopped_by_sw_breakpoint)
7024 (linux_stopped_by_hw_breakpoint)
7025 (linux_supports_stopped_by_hw_breakpoint): New functions.
7026 (linux_target_ops): Install new target methods.
7027
7028 2015-03-04 Pedro Alves <palves@redhat.com>
7029
7030 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7031 * server.c (swbreak_feature, hwbreak_feature): New globals.
7032 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7033 (captured_main): Clear swbreak_feature and hwbreak_feature.
7034 * server.h (swbreak_feature, hwbreak_feature): Declare.
7035 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7036 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7037 supports_stopped_by_hw_breakpoint>: New fields.
7038 (target_supports_stopped_by_sw_breakpoint)
7039 (target_stopped_by_sw_breakpoint)
7040 (target_supports_stopped_by_hw_breakpoint)
7041 (target_stopped_by_hw_breakpoint): Declare.
7042
7043 2015-03-04 Pedro Alves <palves@redhat.com>
7044
7045 enum lwp_stop_reason -> enum target_stop_reason
7046 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7047 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7048 (linux_wait_1, stuck_in_jump_pad_callback)
7049 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7050 (linux_stopped_by_watchpoint):
7051 * linux-low.h (enum lwp_stop_reason): Delete.
7052 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7053 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7054
7055 2015-03-04 Yao Qi <yao.qi@linaro.org>
7056
7057 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7058
7059 2015-03-03 Gary Benson <gbenson@redhat.com>
7060
7061 * hostio.c (handle_vFile): Fix prefix lengths.
7062
7063 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7064
7065 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7066 ptr_bits.
7067
7068 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7069
7070 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7071 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7072 (clean): Add "rm -f" for above C files.
7073 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7074 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7075 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7076 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7077 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7078 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7079 (init_registers_s390x_vx_linux64)
7080 (init_registers_s390x_tevx_linux64)
7081 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7082 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7083 declarations.
7084 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7085 (s390_store_vxrs_high): New functions.
7086 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7087 NT_S390_VXRS_HIGH.
7088 (s390_arch_setup): Add logic for selecting one of the new target
7089 descriptions. Activate the new vector regsets if applicable.
7090 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7091 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7092 and init_registers_s390x_tevx_linux64.
7093
7094 2015-03-01 Pedro Alves <palves@redhat.com>
7095
7096 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7097 parameter.
7098
7099 2015-02-27 Pedro Alves <palves@redhat.com>
7100
7101 * linux-x86-low.c (u_debugreg_offset): New function.
7102 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7103
7104 2015-02-27 Pedro Alves <palves@redhat.com>
7105
7106 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7107 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7108 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7109 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7110 (ps_lsetfpregs, ps_getpid)
7111 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7112 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7113 (ps_lsetxregs, ps_plog): Declare.
7114
7115 2015-02-27 Pedro Alves <palves@redhat.com>
7116
7117 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7118 IP_AGENT_EXPORT_FUNC.
7119 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7120 IP_AGENT_EXPORT_FUNC.
7121 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7122 (IP_AGENT_EXPORT): Delete.
7123 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7124 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7125 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7126 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7127 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7128 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7129 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7130 (traceframe_read_count, traceframe_write_count)
7131 (traceframes_created, trace_state_variables, get_raw_reg)
7132 (get_trace_state_variable_value, set_trace_state_variable_value)
7133 (ust_loaded, helper_thread_id, cmd_buf): Use
7134 IPA_SYM_EXPORTED_NAME.
7135 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7136 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7137 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7138 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7139 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7140 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7141 EXTERN_C_PUSH/EXTERN_C_POP.
7142 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7143 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7144 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7145 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7146 (traceframe_write_count, traceframe_read_count)
7147 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7148 (about_to_request_buffer_space, get_trace_state_variable_value)
7149 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7150 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7151 EXTERN_C_PUSH/EXTERN_C_POP.
7152 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7153 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7154 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7155 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7156 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7157 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7158 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7159 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7160 Define.
7161 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7162 (IP_AGENT_EXPORT_VAR_DECL): Define.
7163 (tracing): Declare.
7164 (gdb_agent_get_raw_reg): Declare.
7165
7166 2015-02-27 Tom Tromey <tromey@redhat.com>
7167 Pedro Alves <palves@redhat.com>
7168
7169 Rename symbols whose names are reserved C++ keywords throughout.
7170
7171 2015-02-27 Pedro Alves <palves@redhat.com>
7172
7173 * Makefile.in (COMPILER): New, get it from autoconf.
7174 (CXX): Get from autoconf instead.
7175 (COMPILE.pre): Use COMPILER.
7176 (CC-LD): Rename to ...
7177 (CC_LD): ... this. Use COMPILER.
7178 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7179 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7180 * acinclude.m4: Include build-with-cxx.m4.
7181 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7182 Disable -Werror by default if building in C++ mode.
7183 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7184 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7185 the C++ compiler. Save/restore CXXFLAGS too.
7186 * configure: Regenerate.
7187
7188 2015-02-27 Pedro Alves <palves@redhat.com>
7189
7190 * acinclude.m4: Include libiberty.m4.
7191 * configure.ac: Call libiberty_INIT.
7192 * config.in, configure: Regenerate.
7193
7194 2015-02-26 Pedro Alves <palves@redhat.com>
7195
7196 * linux-low.c (linux_wait_1): When incrementing the PC past a
7197 program breakpoint always use the_low_target.breakpoint_len as
7198 increment, rather than the maximum between that and
7199 the_low_target.decr_pc_after_break.
7200
7201 2015-02-23 Pedro Alves <palves@redhat.com>
7202
7203 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7204 thread was doing a step-over; always adjust the PC if
7205 we stepped over a permanent breakpoint.
7206 (linux_wait_1): If we stepped over breakpoint that was on top of a
7207 permanent breakpoint, manually advance the PC past it.
7208
7209 2015-02-23 Pedro Alves <palves@redhat.com>
7210
7211 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7212 modes.
7213 (x86_fill_gregset, x86_store_gregset): Use it when handling
7214 $orig_eax.
7215
7216 2015-02-20 Pedro Alves <palves@redhat.com>
7217
7218 * thread-db.c: Include "nat/linux-procfs.h".
7219 (thread_db_init): Skip listing new threads if the kernel supports
7220 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7221
7222 2015-02-20 Pedro Alves <palves@redhat.com>
7223
7224 * linux-low.c (status_pending_p_callback): Use ptid_match.
7225
7226 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7227
7228 PR breakpoints/16812
7229 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7230 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7231 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7232
7233 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7234
7235 PR breakpoints/15956
7236 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7237
7238 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7239
7240 * linux-low.c (linux_low_btrace_conf): Print size.
7241 * server.c (handle_btrace_conf_general_set): New.
7242 (hanle_general_set): Call handle_btrace_conf_general_set.
7243 (handle_query): Report Qbtrace-conf:bts:size as supported.
7244
7245 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7246
7247 * linux-low.c (linux_low_enable_btrace): Update parameters.
7248 (linux_low_btrace_conf): New.
7249 (linux_target_ops)<to_btrace_conf>: Initialize.
7250 * server.c (current_btrace_conf): New.
7251 (handle_btrace_enable): Rename to ...
7252 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7253 to target_enable_btrace. Update comment. Update users.
7254 (handle_qxfer_btrace_conf): New.
7255 (qxfer_packets): Add btrace-conf entry.
7256 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7257 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7258 (target_ops)<read_btrace_conf>: New.
7259 (target_enable_btrace): Update parameters.
7260 (target_read_btrace_conf): New.
7261
7262 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7263
7264 * server.c (handle_btrace_general_set): Remove call to
7265 target_supports_btrace.
7266 (supported_btrace_packets): New.
7267 (handle_query): Call supported_btrace_packets.
7268 * target.h: include btrace-common.h.
7269 (btrace_target_info): Removed.
7270 (supports_btrace, target_supports_btrace): Update parameters.
7271
7272 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7273
7274 * Makefile.in (SFILES): Add common/btrace-common.c.
7275 (OBS): Add common/btrace-common.o.
7276 (btrace-common.o): Add build rules.
7277 * linux-low: Include btrace-common.h.
7278 (linux_low_read_btrace): Use struct btrace_data. Call
7279 btrace_data_init and btrace_data_fini.
7280
7281 2015-02-06 Pedro Alves <palves@redhat.com>
7282
7283 * thread-db.c (find_new_threads_callback): Add debug output.
7284
7285 2015-02-04 Pedro Alves <palves@redhat.com>
7286
7287 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7288 (resume_stopped_resumed_lwps): New function.
7289 (linux_wait_for_event_filtered): Use it.
7290
7291 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7292
7293 * Makefile.in (SFILES): Add linux-personality.c.
7294 (linux-personality.o): New rule.
7295 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7296 list of objects to be built.
7297 * linux-low.c: Include nat/linux-personality.h.
7298 (linux_create_inferior): Remove code to disable address space
7299 randomization (moved to ../nat/linux-personality.c). Create
7300 cleanup to disable address space randomization.
7301
7302 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7303
7304 * Makefile.in (posix-strerror.o): New rule.
7305 (mingw-strerror.o): Likewise.
7306 * configure: Regenerated.
7307 * configure.ac: Source file ../common/common.host. Initialize new
7308 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7309
7310 2015-01-14 Yao Qi <yao@codesourcery.com>
7311
7312 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7313 (ppc-linux.o): New rule.
7314 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7315 * configure.ac: AC_CHECK_FUNCS(getauxval).
7316 * config.in: Re-generated.
7317 * configure: Re-generated.
7318 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7319 ppc64_64bit_inferior_p
7320
7321 2015-01-14 Yao Qi <yao@codesourcery.com>
7322
7323 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7324 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7325 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7326 (PT_ORIG_R3, PT_TRAP): Likewise.
7327 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7328 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7329 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7330
7331 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7332
7333 * i387-fp.c (i387_cache_to_xsave): In look over
7334 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7335 zmmh_low_space field by use of zmmh_high_space.
7336
7337 2015-01-09 Pedro Alves <palves@redhat.com>
7338
7339 * linux-low.c (step_over_bkpt): Move higher up in the file.
7340 (handle_extended_wait): Don't store the stop_pc here.
7341 (get_stop_pc): Adjust comments and rename to ...
7342 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7343 stopped for a software breakpoint or hardware breakpoint.
7344 (thread_still_has_status_pending_p): New function.
7345 (status_pending_p_callback): Use
7346 thread_still_has_status_pending_p. If the event is no longer
7347 interesting, resume the LWP.
7348 (handle_tracepoints): Add assert.
7349 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7350 (wstatus_maybe_breakpoint): New function.
7351 (cancel_breakpoint): Delete function.
7352 (check_stopped_by_watchpoint): New function, factored out from
7353 linux_low_filter_event.
7354 (lp_status_maybe_breakpoint): Delete function.
7355 (linux_low_filter_event): Remove filter_ptid argument.
7356 Leave thread group exits pending here. Store the LWP's stop PC.
7357 Always leave events pending.
7358 (linux_wait_for_event_filtered): Pull all events out of the
7359 kernel, and leave them all pending.
7360 (count_events_callback, select_event_lwp_callback): Consider all
7361 events.
7362 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7363 (select_event_lwp): Only give preference to the stepping LWP in
7364 all-stop mode. Adjust comments.
7365 (ignore_event): New function.
7366 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7367 references to cancel_breakpoints. Adjust to renames. Also give
7368 equal priority to all LWPs that have had events in non-stop mode.
7369 If reporting a software breakpoint event, unadjust the LWP's PC.
7370 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7371 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7372 Adjust.
7373 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7374 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7375 (linux_stopped_by_watchpoint): Adjust.
7376 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7377 * linux-low.h (enum lwp_stop_reason): New.
7378 (struct lwp_info) <stop_pc>: Adjust comment.
7379 <stopped_by_watchpoint>: Delete field.
7380 <stop_reason>: New field.
7381 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7382 * mem-break.c (software_breakpoint_inserted_here)
7383 (hardware_breakpoint_inserted_here): New function.
7384 * mem-break.h (software_breakpoint_inserted_here)
7385 (hardware_breakpoint_inserted_here): Declare.
7386 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7387 (cancel_breakpoints): Delete.
7388 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7389 (upload_fast_traceframes): Remove references to
7390 cancel_breakpoints.
7391
7392 2015-01-09 Pedro Alves <palves@redhat.com>
7393
7394 * thread-db.c (find_new_threads_callback): Ignore thread if the
7395 kernel thread ID is -1.
7396
7397 2015-01-09 Pedro Alves <palves@redhat.com>
7398
7399 * linux-low.c (linux_attach_fail_reason_string): Move to
7400 nat/linux-ptrace.c, and rename.
7401 (linux_attach_lwp): Update comment.
7402 (attach_proc_task_lwp_callback): New function.
7403 (linux_attach): Adjust to rename and use
7404 linux_proc_attach_tgid_threads.
7405 (linux_attach_fail_reason_string): Delete declaration.
7406
7407 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7408
7409 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7410 * server.c (gdbserver_version): Likewise.
7411
7412 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7413
7414 * remote-utils.c: Include ctype.h.
7415 (input_interrupt): Explicitly handle the case when the char
7416 received is the NUL byte. Improve the printing of non-ASCII
7417 characters.
7418
7419 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7420
7421 * linux-low.c (linux_low_filter_event): Update call to
7422 linux_enable_event_reporting following the addition of
7423 a new parameter to that function.
7424
7425 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7426
7427 PR server/17457
7428 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7429 (AARCH64_FPCR_REGNO): Likewise.
7430 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7431 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7432 (aarch64_store_fpregset): Likewise.
7433
7434 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7435
7436 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7437 Remove FIXME comment about assumption about N.
7438
7439 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7440
7441 * configure.ac: If large-file support is disabled in GDBserver,
7442 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7443 * configure: Regenerate.
7444
7445 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7446
7447 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7448 warning upon ENODATA from ptrace.
7449 * linux-s390-low.c (s390_store_tdb): New.
7450 (s390_regsets): Add regset for NT_S390_TDB.
7451
7452 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7453
7454 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7455 without a fill_function.
7456 * linux-s390-low.c (s390_fill_last_break): Remove.
7457 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7458 (s390_arch_setup): Use regset's size instead of fill_function for
7459 loop end condition.
7460
7461 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7462
7463 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7464 the regset's store function when ptrace returned an error.
7465 * regcache.c (get_thread_regcache): Invalidate register cache
7466 before fetching inferior's registers.
7467
7468 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7469
7470 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7471 while-loop as for-loop.
7472 (regsets_store_inferior_registers): Likewise.
7473
7474 2014-11-28 Yao Qi <yao@codesourcery.com>
7475
7476 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7477 * config.in, configure: Re-generate.
7478 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7479 is defined.
7480
7481 2014-11-21 Yao Qi <yao@codesourcery.com>
7482
7483 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7484 (AC_CHECK_HEADERS): Remove malloc.h.
7485 * configure: Re-generated.
7486 * config.in: Re-generated.
7487 * server.h: Don't include alloca.h and malloc.h.
7488 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7489 Don't include malloc.h.
7490
7491 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7492
7493 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7494 corresponding ERRNO check in same block.
7495
7496 2014-11-12 Pedro Alves <palves@redhat.com>
7497
7498 * server.c (cont_thread): Update comment.
7499 (start_inferior, attach_inferior): No longer clear cont_thread.
7500 (handle_v_cont): No longer set cont_thread.
7501 (captured_main): Clear cont_thread each time a GDB connects.
7502
7503 2014-11-12 Pedro Alves <palves@redhat.com>
7504
7505 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7506 thread, and don't resume all threads if the Hc thread has exited.
7507
7508 2014-11-12 Pedro Alves <palves@redhat.com>
7509
7510 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7511 the process group instead of to a specific LWP.
7512
7513 2014-10-15 Pedro Alves <palves@redhat.com>
7514
7515 PR server/17487
7516 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7517 parameter.
7518 (arm_set_thread_context): Delete.
7519 (the_low_target): Adjust.
7520 * win32-i386-low.c (debug_registers_changed)
7521 (debug_registers_used): Delete.
7522 (update_debug_registers_callback): New function.
7523 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7524 needing to update their debug registers.
7525 (win32_get_current_dr): New function.
7526 (x86_dr_low_get_addr, x86_dr_low_get_control)
7527 (x86_dr_low_get_status): Fetch the debug register from the thread
7528 record's context.
7529 (i386_initial_stuff): Adjust.
7530 (i386_get_thread_context): Remove current_event parameter. Don't
7531 clear debug_registers_changed nor copy DR values to
7532 debug_reg_state.
7533 (i386_set_thread_context): Delete.
7534 (i386_prepare_to_resume): New function.
7535 (i386_thread_added): Mark the thread as needing to update irs
7536 debug registers.
7537 (the_low_target): Remove i386_set_thread_context and install
7538 i386_prepare_to_resume.
7539 * win32-low.c (win32_get_thread_context): Adjust.
7540 (win32_set_thread_context): Use SetThreadContext
7541 directly.
7542 (win32_prepare_to_resume): New function.
7543 (win32_require_context): New function, factored out from ...
7544 (thread_rec): ... this.
7545 (continue_one_thread): Call win32_prepare_to_resume on each thread
7546 we're about to continue.
7547 (win32_resume): Call win32_prepare_to_resume on the event thread.
7548 * win32-low.h (struct win32_thread_info)
7549 <debug_registers_changed>: New field.
7550 (struct win32_target_ops): Change prototype of set_thread_context,
7551 delete set_thread_context and add prepare_to_resume.
7552 (win32_require_context): New declaration.
7553
7554 2014-10-08 Gary Benson <gbenson@redhat.com>
7555
7556 * server.h: Do not include common-exceptions.h.
7557
7558 2014-10-08 Gary Benson <gbenson@redhat.com>
7559
7560 * server.h: Do not include cleanups.h.
7561
7562 2014-09-30 James Hogan <james.hogan@imgtec.com>
7563
7564 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7565 mips64-dsp-linux.c.
7566
7567 2014-09-23 Yao Qi <yao@codesourcery.com>
7568
7569 * linux-low.c (lp_status_maybe_breakpoint): New function.
7570 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7571 (count_events_callback): Likewise.
7572 (select_event_lwp_callback): Likewise.
7573 (cancel_breakpoints_callback): Likewise.
7574
7575 2014-09-19 Don Breazeal <donb@codesourcery.com>
7576
7577 * linux-low.c (handle_extended_wait): Call
7578 linux_ptrace_get_extended_event.
7579 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7580 linux_is_extended_waitstatus.
7581
7582 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7583
7584 * Makefile.in (CPPFLAGS): Define.
7585 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7586 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7587
7588 2014-09-16 Gary Benson <gbenson@redhat.com>
7589
7590 * inferiors.h (current_inferior): Renamed as...
7591 (current_thread): New variable. All uses updated.
7592 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7593 (maybe_move_out_of_jump_pad): Likewise.
7594 (cancel_breakpoint): Likewise.
7595 (linux_low_filter_event): Likewise.
7596 (wait_for_sigstop): Likewise.
7597 (linux_resume_one_lwp): Likewise.
7598 (need_step_over_p): Likewise.
7599 (start_step_over): Likewise.
7600 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7601 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7602 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7603 and save_inferior as saved_thread.
7604 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7605 saved_thread.
7606 (regcache_invalidate_thread): Likewise.
7607 * remote-utils.c (prepare_resume_reply): Likewise.
7608 * thread-db.c (thread_db_get_tls_address): Likewise.
7609 (disable_thread_event_reporting): Likewise.
7610 (remove_thread_event_breakpoints): Likewise.
7611 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7612 as saved_thread.
7613 * target.h (set_desired_inferior): Renamed as...
7614 (set_desired_thread): New declaration. All uses updated.
7615 * server.c (myresume): Updated comment to reference thread instead
7616 of inferior.
7617 (handle_serial_event): Likewise.
7618 (handle_target_event): Likewise.
7619
7620 2014-09-12 Tom Tromey <tromey@redhat.com>
7621 Gary Benson <gbenson@redhat.com>
7622
7623 * regcache.h: Include common-regcache.h.
7624 (regcache_read_pc): Don't declare.
7625 * regcache.c (get_thread_regcache_for_ptid): New function.
7626
7627 2014-09-11 Tom Tromey <tromey@redhat.com>
7628 Gary Benson <gbenson@redhat.com>
7629
7630 * symbol.c: New file.
7631 * Makefile.in (SFILES): Add symbol.c.
7632 (OBS): Add symbol.o.
7633
7634 2014-09-11 Gary Benson <gbenson@redhat.com>
7635
7636 * target.c (target_stop_ptid, target_continue_ptid): New
7637 functions.
7638
7639 2014-09-11 Tom Tromey <tromey@redhat.com>
7640 Gary Benson <gbenson@redhat.com>
7641
7642 * target.h: Include target/target.h.
7643 * target.c (target_read_memory, target_read_uint32)
7644 (target_write_memory): New functions.
7645
7646 2014-09-11 Gary Benson <gbenson@redhat.com>
7647
7648 * server.h (debug_hw_points): Don't declare.
7649 * server.c (debug_hw_points): Don't define. Replace all uses
7650 with show_debug_regs.
7651 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7652 all uses with show_debug_regs.
7653
7654 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7655
7656 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7657 endianness into account.
7658 (ppc_supply_ptrace_register): Likewise.
7659
7660 2014-09-03 James Hogan <james.hogan@imgtec.com>
7661
7662 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7663 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7664
7665 2014-09-03 Gary Benson <gbenson@redhat.com>
7666
7667 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7668 ALL_DEBUG_ADDRESS_REGISTERS.
7669
7670 2014-09-02 Gary Benson <gbenson@redhat.com>
7671
7672 * i386-low.h: Renamed as...
7673 * x86-low.h: New file. All type, function and variable name
7674 prefixes changed from "i386_" to "x86_". All references updated.
7675 * i386-low.c: Renamed as...
7676 * x86-low.c: New file. All type, function and variable name
7677 prefixes changed from "i386_" to "x86_". All references updated.
7678
7679 2014-09-02 Gary Benson <gbenson@redhat.com>
7680
7681 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7682 (x86_linux_new_thread): Likewise.
7683
7684 2014-08-29 Gary Benson <gbenson@redhat.com>
7685
7686 * server.h (setjmp.h): Do not include.
7687 (toplevel): Do not declare.
7688 (common-exceptions.h): Include.
7689 (cleanups.h): Likewise.
7690 * server.c (toplevel): Do not define.
7691 (exit_code): New static global.
7692 (detach_or_kill_for_exit_cleanup): New function.
7693 (main): New function. Original main renamed to...
7694 (captured_main): New function.
7695 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7696
7697 2014-08-29 Gary Benson <gbenson@redhat.com>
7698
7699 * Makefile.in (SFILES): Add common/common-exceptions.c.
7700 (OBS): Add common-exceptions.o.
7701 (common-exceptions.o): New rule.
7702 * utils.c (prepare_to_throw_exception): New function.
7703
7704 2014-08-29 Gary Benson <gbenson@redhat.com>
7705
7706 * config.in: Regenerate.
7707 * configure: Likewise.
7708
7709 2014-08-29 Gary Benson <gbenson@redhat.com>
7710
7711 * Makefile.in (SFILES): Add common/cleanups.c.
7712 (OBS): cleanups.o.
7713 (cleanups.o): New rule.
7714
7715 2014-08-29 Gary Benson <gbenson@redhat.com>
7716
7717 * utils.c (internal_vwarning): New function.
7718
7719 2014-08-28 Gary Benson <gbenson@redhat.com>
7720
7721 * utils.h (fatal): Remove declaration.
7722 * utils.c (fatal): Remove function.
7723
7724 2014-08-28 Gary Benson <gbenson@redhat.com>
7725
7726 * tracepoint.c (gdb_agent_init): Replace fatal with
7727 perror_with_name.
7728 (initialize_tracepoint): Likewise.
7729
7730 2014-08-28 Gary Benson <gbenson@redhat.com>
7731
7732 * remote-utils.c (remote_prepare): Replace fatal with error.
7733
7734 2014-08-28 Gary Benson <gbenson@redhat.com>
7735
7736 * linux-low.c (linux_async): Replace fatal with warning.
7737 Tidy up and return.
7738 (linux_start_non_stop): Return -1 if linux_async failed.
7739
7740 2014-08-28 Gary Benson <gbenson@redhat.com>
7741
7742 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7743 gdb_assert.
7744 (i386_dr_low_get_addr): Remove vague comment.
7745 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7746 gdb_assert.
7747
7748 2014-08-28 Gary Benson <gbenson@redhat.com>
7749
7750 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7751 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7752 internal_error.
7753 (linux_resume_one_lwp): Likewise.
7754 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7755 gdb_assert.
7756 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7757 with internal_error.
7758 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7759 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7760 (find_register_by_name): Replace fatal with internal_error.
7761 (find_regno): Likewise.
7762 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7763 * thread-db.c (thread_db_create_event): Likewise.
7764 (thread_db_load_search): Likewise.
7765 (try_thread_db_load_1): Likewise.
7766 * tracepoint.c (get_jump_space_head): Replace fatal with
7767 internal_error.
7768 (claim_trampoline_space): Likewise.
7769 (have_fast_tracepoint_trampoline_buffer): Likewise.
7770 (cmd_qtstart): Likewise.
7771 (stop_tracing): Likewise.
7772 (fast_tracepoint_collecting): Likewise.
7773 (target_malloc): Likewise.
7774 (download_tracepoint): Likewise.
7775 (download_trace_state_variables): Replace check with gdb_assert.
7776 (upload_fast_traceframes): Replace fatal with internal_error.
7777
7778 2014-08-19 Tom Tromey <tromey@redhat.com>
7779 Gary Benson <gbenson@redhat.com>
7780
7781 * Makefile.in (SFILES): Add common/common-debug.c.
7782 (OBS): Add common-debug.o.
7783 (common-debug.o): New rule.
7784 * debug.h (debug_printf): Don't declare.
7785 * debug.c (debug_printf): Renamed and rewritten as...
7786 (debug_vprintf): New function.
7787
7788 2014-08-19 Gary Benson <gbenson@redhat.com>
7789
7790 * utils.h: Do not include print-utils.h.
7791
7792 2014-08-19 Tom Tromey <tromey@redhat.com>
7793 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h: Add static assertion.
7796 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7797
7798 2014-08-19 Tom Tromey <tromey@redhat.com>
7799 Gary Benson <gbenson@redhat.com>
7800
7801 * Makefile.in (SFILES): Add common/errors.c.
7802 (OBS): Add errors.o.
7803 (IPA_OBS): Add errors-ipa.o.
7804 (errors.o): New rule.
7805 (errors-ipa.o): Likewise.
7806 * utils.h (perror_with_name, error, warning): Don't declare.
7807 * utils.c (warning): Renamed and rewritten as...
7808 (vwarning): New function.
7809 (error): Renamed and rewritten as...
7810 (verror): New function.
7811 (internal_error): Renamed and rewritten as...
7812 (internal_verror): New function.
7813
7814 2014-08-07 Gary Benson <gbenson@redhat.com>
7815
7816 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7817 * configure: Regenerate.
7818 * config.in: Likewise.
7819 * server.h: Do not include errno.h.
7820 * event-loop.c: Likewise.
7821 * hostio-errno.c: Likewise.
7822 * linux-low.c: Likewise.
7823 * remote-utils.c: Likewise.
7824 * spu-low.c: Likewise.
7825 * utils.c: Likewise.
7826 * gdbreplay.c: Unconditionally include errno.h.
7827
7828 2014-08-07 Gary Benson <gbenson@redhat.com>
7829
7830 * server.h: Do not include string.h.
7831 * event-loop.c: Likewise.
7832 * linux-low.c: Likewise.
7833 * regcache.c: Likewise.
7834 * remote-utils.c: Likewise.
7835 * spu-low.c: Likewise.
7836 * utils.c: Likewise.
7837
7838 2014-08-07 Gary Benson <gbenson@redhat.com>
7839
7840 * server.h: Do not include gdb_assert.h.
7841
7842 2014-08-07 Gary Benson <gbenson@redhat.com>
7843
7844 * server.h: Do not include common-utils.h.
7845
7846 2014-08-07 Gary Benson <gbenson@redhat.com>
7847
7848 * server.h: Do not include ptid.h.
7849 * notif.h: Likewise.
7850
7851 2014-08-07 Gary Benson <gbenson@redhat.com>
7852
7853 * server.h: Do not include gdb_locale.h.
7854
7855 2014-08-07 Gary Benson <gbenson@redhat.com>
7856
7857 * server.h: Do not include gdb/signals.h.
7858 * win32-low.c: Likewise.
7859
7860 2014-08-07 Gary Benson <gbenson@redhat.com>
7861
7862 * server.h: Do not include pathmax.h.
7863
7864 2014-08-07 Gary Benson <gbenson@redhat.com>
7865
7866 * server.h: Do not include libiberty.h.
7867 * linux-bfin-low.c: Likewise.
7868
7869 2014-08-07 Gary Benson <gbenson@redhat.com>
7870
7871 * server.h: Do not include ansidecl.h.
7872
7873 2014-08-07 Gary Benson <gbenson@redhat.com>
7874
7875 * linux-x86-low.c: Do not include stddef.h.
7876 * lynx-ppc-low.c: Likewise.
7877 * tracepoint.c: Likewise.
7878
7879 2014-08-07 Gary Benson <gbenson@redhat.com>
7880
7881 * server.h: Do not include stdarg.h.
7882 * nto-low.c: Likewise.
7883
7884 2014-08-07 Gary Benson <gbenson@redhat.com>
7885
7886 * server.h: Do not include stdlib.h.
7887 * inferiors.c: Likewise.
7888 * linux-low.c: Likewise.
7889 * regcache.c: Likewise.
7890 * spu-low.c: Likewise.
7891 * tracepoint.c: Likewise.
7892 * utils.c: Likewise.
7893
7894 2014-08-07 Gary Benson <gbenson@redhat.com>
7895
7896 * server.h: Do not include stdio.h.
7897 * linux-low.c: Likewise.
7898 * remote-utils.c: Likewise.
7899 * spu-low.c: Likewise.
7900 * utils.c: Likewise.
7901 * wincecompat.c: Likewise.
7902
7903 2014-08-06 Gary Benson <gbenson@redhat.com>
7904
7905 * regcache.c (init_register_cache): Move conditionals inside if.
7906
7907 2014-08-06 Gary Benson <gbenson@redhat.com>
7908
7909 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7910
7911 2014-07-31 Gary Benson <gbenson@redhat.com>
7912
7913 * ax.h: Do not include server.h.
7914 * gdbthread.h: Likewise.
7915 * lynx-low.h: Likewise.
7916 * notif.h: Likewise.
7917
7918 2014-07-30 Gary Benson <gbenson@redhat.com>
7919
7920 * server.h: Include common-defs.h.
7921 Do not include config.h or build-gnulib-gdbserver/config.h.
7922
7923 2014-07-30 Gary Benson <gbenson@redhat.com>
7924
7925 * hostio-errno.c: Move server.h to top of includes list.
7926 * inferiors.c: Likewise.
7927 * linux-x86-low.c: Likewise.
7928 * notif.c: Include server.h.
7929
7930 2014-07-24 Tom Tromey <tromey@redhat.com>
7931 Gary Benson <gbenson@redhat.com>
7932
7933 * server.h (CORE_ADDR): Now unsigned.
7934
7935 2014-07-16 Pedro Alves <palves@redhat.com>
7936
7937 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7938
7939 2014-07-15 Pedro Alves <palves@redhat.com>
7940
7941 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7942 copy.
7943
7944 2014-07-11 Pedro Alves <palves@redhat.com>
7945
7946 * linux-low.c (kill_wait_lwp): New function, based on
7947 kill_one_lwp_callback, but use my_waitpid directly.
7948 (kill_one_lwp_callback, linux_kill): Use it.
7949
7950 2014-06-23 Pedro Alves <palves@redhat.com>
7951
7952 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7953 before setting DR0..DR3.
7954
7955 2014-06-20 Gary Benson <gbenson@redhat.com>
7956
7957 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7958 * configure: Regenerated.
7959 * config.in: Likewise.
7960
7961 2014-06-20 Gary Benson <gbenson@redhat.com>
7962
7963 * Makefile.in (SFILES): Update locations for files moved
7964 from common to nat.
7965 (object file files): Reordered.
7966
7967 2014-06-20 Gary Benson <gbenson@redhat.com>
7968
7969 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7970 (i386_dr_low_set_addr): Likewise.
7971 (i386_dr_low_get_addr): Likewise.
7972 (i386_dr_low_can_set_control): Likewise.
7973 (i386_dr_low_set_control): Likewise.
7974 (i386_dr_low_get_control): Likewise.
7975 (i386_dr_low_get_status): Likewise.
7976 (i386_get_debug_register_length): Likewise.
7977 * linux-x86-low.c (i386_dr_low_set_addr):
7978 Changed signature. Made static.
7979 (i386_dr_low_get_addr): Likewise.
7980 (i386_dr_low_set_control): Likewise.
7981 (i386_dr_low_get_control): Likewise.
7982 (i386_dr_low_get_status): Likewise.
7983 (i386_dr_low): New global variable.
7984 * win32-i386-low.c (i386_dr_low_set_addr):
7985 Changed signature. Made static.
7986 (i386_dr_low_get_addr): Likewise.
7987 (i386_dr_low_set_control): Likewise.
7988 (i386_dr_low_get_control): Likewise.
7989 (i386_dr_low_get_status): Likewise.
7990 (i386_dr_low): New global variable.
7991
7992 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7993
7994 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7995 * Makefile.in (AR, AR_FLAGS): Define.
7996 * configure: Regenerate.
7997
7998 2014-06-19 Gary Benson <gbenson@redhat.com>
7999
8000 * Makefile.in (i386-dregs.o): New rule.
8001 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8002 * i386-low.c (target.h): Remove include.
8003 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8004 (DR_CONTROL_SHIFT): Likewise.
8005 (DR_CONTROL_SIZE): Likewise.
8006 (DR_RW_EXECUTE): Likewise.
8007 (DR_RW_WRITE): Likewise.
8008 (DR_RW_READ): Likewise.
8009 (DR_RW_IORW): Likewise.
8010 (DR_LEN_1): Likewise.
8011 (DR_LEN_2): Likewise.
8012 (DR_LEN_4): Likewise.
8013 (DR_LEN_8): Likewise.
8014 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8015 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8016 (DR_ENABLE_SIZE): Likewise.
8017 (DR_LOCAL_SLOWDOWN): Likewise.
8018 (DR_GLOBAL_SLOWDOWN): Likewise.
8019 (DR_CONTROL_RESERVED): Likewise.
8020 (I386_DR_CONTROL_MASK): Likewise.
8021 (I386_DR_VACANT): Likewise.
8022 (I386_DR_LOCAL_ENABLE): Likewise.
8023 (I386_DR_GLOBAL_ENABLE): Likewise.
8024 (I386_DR_DISABLE): Likewise.
8025 (I386_DR_SET_RW_LEN): Likewise.
8026 (I386_DR_GET_RW_LEN): Likewise.
8027 (I386_DR_WATCH_HIT): Likewise.
8028 (i386_wp_op_t): Likewise.
8029 (i386_show_dr): Likewise.
8030 (i386_length_and_rw_bits): Likewise.
8031 (i386_insert_aligned_watchpoint): Likewise.
8032 (i386_remove_aligned_watchpoint): Likewise.
8033 (i386_handle_nonaligned_watchpoint): Likewise.
8034 i386_update_inferior_debug_regs(): Likewise.
8035 (i386_dr_insert_watchpoint): Likewise.
8036 (i386_dr_remove_watchpoint): Likewise.
8037 (i386_dr_region_ok_for_watchpoint): Likewise.
8038 (i386_dr_stopped_data_address): Likewise.
8039 (i386_dr_stopped_by_watchpoint): Likewise.
8040
8041 2014-06-19 Gary Benson <gbenson@redhat.com>
8042
8043 * i386-low.c (i386_dr_show): Renamed to
8044 i386_show_dr and made static. All uses updated.
8045 (i386_dr_length_and_rw_bits): Renamed to
8046 i386_length_and_rw_bits and made static.
8047 All uses updated.
8048 (i386_dr_insert_aligned_watchpoint): Renamed to
8049 i386_insert_aligned_watchpoint and made static.
8050 All uses updated.
8051 (i386_dr_remove_aligned_watchpoint): Renamed to
8052 i386_remove_aligned_watchpoint and made static.
8053 All uses updated.
8054 (i386_dr_update_inferior_debug_regs): Renamed to
8055 i386_update_inferior_debug_regs and made static.
8056 All uses updated.
8057
8058 2014-06-18 Gary Benson <gbenson@redhat.com>
8059
8060 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8061 (i386_dr_low_can_set_control): Likewise.
8062 (i386_get_debug_register_length): Likewise.
8063 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8064 (i386_dr_low_can_set_control): Likewise.
8065 (i386_get_debug_register_length): Likewise.
8066
8067 2014-06-17 Gary Benson <gbenson@redhat.com>
8068
8069 * i386-low.h (i386-dregs.h): New include.
8070 (DR_FIRSTADDR): Now in i386-dregs.h.
8071 (DR_LASTADDR): Likewise.
8072 (DR_NADDR): Likewise.
8073 (DR_STATUS): Likewise.
8074 (DR_CONTROL): Likewise.
8075 (i386_debug_reg_state): Likewise.
8076 (i386_dr_insert_watchpoint): Likewise.
8077 (i386_dr_remove_watchpoint): Likewise.
8078 (i386_dr_region_ok_for_watchpoint): Likewise.
8079 (i386_dr_stopped_data_address): Likewise.
8080 (i386_dr_stopped_by_watchpoint): Likewise.
8081 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8082
8083 2014-06-18 Gary Benson <gbenson@redhat.com>
8084
8085 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8086 i386_dr_insert_watchpoint.
8087 (i386_low_remove_watchpoint): Renamed to
8088 i386_dr_remove_watchpoint.
8089 (i386_low_region_ok_for_watchpoint): Renamed to
8090 i386_dr_region_ok_for_watchpoint.
8091 (i386_low_stopped_data_address): Renamed to
8092 i386_dr_stopped_data_address.
8093 (i386_low_stopped_by_watchpoint): Renamed to
8094 i386_dr_stopped_by_watchpoint.
8095 * i386-low.c (i386_show_dr): Renamed to
8096 i386_dr_show and made nonstatic. All uses updated.
8097 (i386_length_and_rw_bits): Renamed to
8098 i386_dr_length_and_rw_bits and made nonstatic.
8099 All uses updated.
8100 (i386_insert_aligned_watchpoint): Renamed to
8101 i386_dr_insert_aligned_watchpoint and made nonstatic.
8102 All uses updated.
8103 (i386_remove_aligned_watchpoint): Renamed to
8104 i386_dr_remove_aligned_watchpoint and made nonstatic.
8105 All uses updated.
8106 (i386_update_inferior_debug_regs): Renamed to
8107 i386_dr_update_inferior_debug_regs and made nonstatic.
8108 All uses updated.
8109 (i386_low_insert_watchpoint): Renamed to
8110 i386_dr_insert_watchpoint. All uses updated.
8111 (i386_low_remove_watchpoint): Renamed to
8112 i386_dr_remove_watchpoint. All uses updated.
8113 (i386_low_region_ok_for_watchpoint): Renamed to
8114 i386_dr_region_ok_for_watchpoint. All uses updated.
8115 (i386_low_stopped_data_address): Renamed to
8116 i386_dr_stopped_data_address. All uses updated.
8117 (i386_low_stopped_by_watchpoint): Renamed to
8118 i386_dr_stopped_by_watchpoint. All uses updated.
8119
8120 2014-06-18 Gary Benson <gbenson@redhat.com>
8121
8122 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8123 (i386_dr_low_can_set_control): Likewise.
8124 (i386_insert_aligned_watchpoint): New check.
8125
8126 2014-06-18 Gary Benson <gbenson@redhat.com>
8127
8128 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8129 Renamed to state.
8130
8131 2014-06-18 Gary Benson <gbenson@redhat.com>
8132
8133 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8134 instead of fatal and error.
8135 (i386_handle_nonaligned_watchpoint): Likewise.
8136
8137 2014-06-18 Gary Benson <gbenson@redhat.com>
8138
8139 * i386-low.c (i386_get_debug_register_length): New macro.
8140 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8141 (i386_show_dr): Use debug_printf instead of fprintf. Use
8142 phex to format values.
8143
8144 2014-06-18 Gary Benson <gbenson@redhat.com>
8145
8146 * i386-low.h: Comment changes.
8147 * i386-low.c: Likewise.
8148
8149 2014-06-18 Gary Benson <gbenson@redhat.com>
8150
8151 * i386-low.c: Whitespace changes.
8152
8153 2014-06-12 Tom Tromey <tromey@redhat.com>
8154
8155 * utils.c (freeargv): Remove.
8156
8157 2014-06-12 Tom Tromey <tromey@redhat.com>
8158
8159 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8160 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8161 (parse_debug_format_options): Likewise.
8162 (gdbserver_usage): Likewise.
8163 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8164 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8165 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8166 against libiberty.
8167 ($(LIBGNU)): Depend on libiberty.
8168 (all-lib): Recurse into all subdirs.
8169 (install-only): Invoke "install" target in subdirs.
8170 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8171 targets.
8172 * configure: Rebuild.
8173 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8174 for vasprintf, vsnprintf, or gettimeofday.
8175 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8176 srv_tgtobj.
8177
8178 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8179
8180 * development.sh: Delete.
8181 * Makefile.in (config.status): Adjust dependency on development.sh.
8182 * configure.ac: Adjust development.sh source call.
8183 * configure: Regenerate.
8184
8185 2014-06-02 Pedro Alves <palves@redhat.com>
8186
8187 * ax.c (gdb_free_agent_expr): New function.
8188 * ax.h (gdb_free_agent_expr): New declaration.
8189 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8190 list.
8191 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8192 static.
8193 (clear_breakpoint_conditions_and_commands): New function.
8194 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8195 (clear_breakpoint_conditions_and_commands): New declaration.
8196
8197 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8198
8199 * linux-aarch64-low.c (asm/ptrace.h): Include.
8200
8201 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8202
8203 Fix TLS access for -static -pthread.
8204 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8205 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8206 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8207
8208 2014-05-20 Pedro Alves <palves@redhat.com>
8209
8210 * linux-aarch64-low.c (aarch64_insert_point)
8211 (aarch64_remove_point): No longer check whether the type is
8212 supported here. Adjust to new interface.
8213 (the_low_target): Install aarch64_supports_z_point_type as
8214 supports_z_point_type method.
8215 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8216 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8217 instead of a Z packet char. Adjust.
8218 (arm_supports_z_point_type): New function.
8219 (arm_insert_point, arm_remove_point): Adjust to new interface.
8220 (the_low_target): Install arm_supports_z_point_type.
8221 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8222 (cris_insert_point, cris_remove_point): Adjust to new interface.
8223 Don't check whether the type is supported here.
8224 (the_low_target): Install cris_supports_z_point_type.
8225 * linux-low.c (linux_supports_z_point_type): New function.
8226 (linux_insert_point, linux_remove_point): Adjust to new interface.
8227 * linux-low.h (struct linux_target_ops) <insert_point,
8228 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8229 raw_breakpoint pointer parameter.
8230 <supports_z_point_type>: New method.
8231 * linux-mips-low.c (mips_supports_z_point_type): New function.
8232 (mips_insert_point, mips_remove_point): Adjust to new interface.
8233 Use mips_supports_z_point_type.
8234 (the_low_target): Install mips_supports_z_point_type.
8235 * linux-ppc-low.c (the_low_target): Install NULL as
8236 supports_z_point_type method.
8237 * linux-s390-low.c (the_low_target): Install NULL as
8238 supports_z_point_type method.
8239 * linux-sparc-low.c (the_low_target): Install NULL as
8240 supports_z_point_type method.
8241 * linux-x86-low.c (x86_supports_z_point_type): New function.
8242 (x86_insert_point): Adjust to new insert_point interface. Use
8243 insert_memory_breakpoint. Adjust to new
8244 i386_low_insert_watchpoint interface.
8245 (x86_remove_point): Adjust to remove_point interface. Use
8246 remove_memory_breakpoint. Adjust to new
8247 i386_low_remove_watchpoint interface.
8248 (the_low_target): Install x86_supports_z_point_type.
8249 * lynx-low.c (lynx_target_ops): Install NULL as
8250 supports_z_point_type callback.
8251 * nto-low.c (nto_supports_z_point_type): New.
8252 (nto_insert_point, nto_remove_point): Adjust to new interface.
8253 (nto_target_ops): Install nto_supports_z_point_type.
8254 * mem-break.c: Adjust intro comment.
8255 (struct raw_breakpoint) <raw_type, size>: New fields.
8256 <inserted>: Update comment.
8257 <shlib_disabled>: Delete field.
8258 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8259 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8260 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8261 (raw_bkpt_type_to_target_hw_bp_type): New function.
8262 (find_enabled_raw_code_breakpoint_at): New function.
8263 (find_raw_breakpoint_at): New type and size parameters. Use them.
8264 (insert_memory_breakpoint): New function, based off
8265 set_raw_breakpoint_at.
8266 (remove_memory_breakpoint): New function.
8267 (set_raw_breakpoint_at): Reimplement.
8268 (set_breakpoint): New, based on set_breakpoint_at.
8269 (set_breakpoint_at): Reimplement.
8270 (delete_raw_breakpoint): Go through the_target->remove_point
8271 instead of assuming memory breakpoints.
8272 (find_gdb_breakpoint_at): Delete.
8273 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8274 (find_gdb_breakpoint): New function.
8275 (set_gdb_breakpoint_at): Delete.
8276 (z_type_supported): New function.
8277 (set_gdb_breakpoint_1): New function, loosely based off
8278 set_gdb_breakpoint_at.
8279 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8280 (delete_gdb_breakpoint_at): Delete.
8281 (delete_gdb_breakpoint_1): New function, loosely based off
8282 delete_gdb_breakpoint_at.
8283 (delete_gdb_breakpoint): New function.
8284 (clear_gdb_breakpoint_conditions): Rename to ...
8285 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8286 breakpoint.
8287 (add_condition_to_breakpoint): Make static.
8288 (add_breakpoint_condition): Take a struct breakpoint pointer
8289 instead of an address. Adjust.
8290 (gdb_condition_true_at_breakpoint): Rename to ...
8291 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8292 z_type parameter.
8293 (gdb_condition_true_at_breakpoint): Reimplement.
8294 (add_breakpoint_commands): Take a struct breakpoint pointer
8295 instead of an address. Adjust.
8296 (gdb_no_commands_at_breakpoint): Rename to ...
8297 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8298 parameter. Return true if no breakpoint was found. Change debug
8299 output.
8300 (gdb_no_commands_at_breakpoint): Reimplement.
8301 (run_breakpoint_commands): Rename to ...
8302 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8303 and change return type to boolean.
8304 (run_breakpoint_commands): New function.
8305 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8306 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8307 breakpoint. Go through the_target->remove_point instead of
8308 assuming memory breakpoint.
8309 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8310 software and hardware breakpoints.
8311 (reinsert_raw_breakpoint): Go through the_target->insert_point
8312 instead of assuming memory breakpoint.
8313 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8314 software and hardware breakpoints.
8315 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8316 Check both software and hardware breakpoints.
8317 (validate_inserted_breakpoint): Assert the breakpoint is a
8318 software breakpoint. Set the inserted flag to -1 instead of
8319 setting shlib_disabled.
8320 (delete_disabled_breakpoints): Adjust.
8321 (validate_breakpoints): Only validate software breakpoints.
8322 Adjust to inserted flag change.
8323 (check_mem_read, check_mem_write): Skip breakpoint types other
8324 than software breakpoints. Adjust to inserted flag change.
8325 * mem-break.h (enum raw_bkpt_type): New enum.
8326 (raw_breakpoint, struct process_info): Forward declare.
8327 (Z_packet_to_target_hw_bp_type): Delete declaration.
8328 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8329 (set_gdb_breakpoint, delete_gdb_breakpoint)
8330 (clear_breakpoint_conditions): New declarations.
8331 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8332 (breakpoint_inserted_here): Update comment.
8333 (add_breakpoint_condition, add_breakpoint_commands): Replace
8334 address parameter with a breakpoint pointer parameter.
8335 (gdb_breakpoint_here): Update comment.
8336 (delete_gdb_breakpoint_at): Delete.
8337 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8338 * server.c (process_point_options): Take a struct breakpoint
8339 pointer instead of an address. Adjust.
8340 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8341 delete_gdb_breakpoint.
8342 * spu-low.c (spu_target_ops): Install NULL as
8343 supports_z_point_type method.
8344 * target.h: Include mem-break.h.
8345 (struct target_ops) <prepare_to_access_memory>: Update comment.
8346 <supports_z_point_type>: New field.
8347 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8348 instead of a char. Also take a raw breakpoint pointer.
8349 * win32-arm-low.c (the_low_target): Install NULL as
8350 supports_z_point_type.
8351 * win32-i386-low.c (i386_supports_z_point_type): New function.
8352 (i386_insert_point, i386_remove_point): Adjust to new interface.
8353 (the_low_target): Install i386_supports_z_point_type.
8354 * win32-low.c (win32_supports_z_point_type): New function.
8355 (win32_insert_point, win32_remove_point): Adjust to new interface.
8356 (win32_target_ops): Install win32_supports_z_point_type.
8357 * win32-low.h (struct win32_target_ops):
8358 <supports_z_point_type>: New method.
8359 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8360 instead of a char. Also take a raw breakpoint pointer.
8361
8362 2014-05-20 Pedro Alves <palves@redhat.com>
8363
8364 * mem-break.h: Include break-common.h.
8365 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8366 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8367 (Z_packet_to_target_hw_bp_type): New declaration.
8368 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8369 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8370 (Z_PACKET_ACCESS_WP): Delete macros.
8371 (Z_packet_to_hw_type): Delete function.
8372 * i386-low.h: Don't include break-common.h here.
8373 (Z_packet_to_hw_type): Delete declaration.
8374 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8375 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8376 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8377 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8378 * linux-aarch64-low.c: Don't include break-common.h here.
8379 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8380 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8381 (Z_packet_to_target_hw_bp_type): Delete function.
8382 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8383 function.
8384 (mips_insert_point, mips_remove_point): Use
8385 Z_packet_to_target_hw_bp_type.
8386
8387 2014-05-20 Pedro Alves <palves@redhat.com>
8388
8389 * linux-aarch64-low.c: Include break-common.h.
8390 (enum target_point_type): Delete.
8391 (Z_packet_to_point_type): Rename to ...
8392 (Z_packet_to_target_hw_bp_type): ... this, and return a
8393 target_hw_bp_type instead.
8394 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8395 instead of an enum target_point_type.
8396 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8397 breakpoint type.
8398 (aarch64_dr_state_insert_one_point)
8399 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8400 (aarch64_handle_aligned_watchpoint)
8401 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8402 Take an enum target_hw_bp_type instead of an enum
8403 target_point_type.
8404 (aarch64_supports_z_point_type): New function.
8405 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8406 use Z_packet_to_target_hw_bp_type.
8407
8408 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8409
8410 * configure.ac: Only use -Werror by default when DEVELOPMENT
8411 is true.
8412 * configure: Regenerate.
8413
8414 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8415
8416 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8417 * linux-x86-low.c (X86_64_USER_REGS): New.
8418 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8419
8420 2014-04-28 Yao Qi <yao@codesourcery.com>
8421
8422 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8423 name.
8424
8425 2014-04-25 Pedro Alves <palves@redhat.com>
8426
8427 PR server/16255
8428 * linux-low.c (linux_attach_fail_reason_string): New function.
8429 (linux_attach_lwp): Delete.
8430 (linux_attach_lwp_1): Rename to ...
8431 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8432 argument. Remove "initial" parameter. Return int instead of
8433 void. Don't error or warn here.
8434 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8435 failure to attach to the tgid. Call warning when failing to
8436 attach to an lwp.
8437 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8438 argument. Remove "initial" parameter. Return int instead of
8439 void. Don't error or warn here.
8440 (linux_attach_fail_reason_string): New declaration.
8441 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8442 interface change. Use linux_attach_fail_reason_string.
8443
8444 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8445 Walfred Tedeschi <walfred.tedeschi@intel.com>
8446
8447 * Makefile.in: Added rules to handle new files
8448 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8449 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8450 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8451 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8452 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8453 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8454 x32-avx512-linux.o.
8455 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8456 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8457 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8458 i386/x32-avx512.xml.
8459 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8460 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8461 i386/x32-avx512-linux.xml.
8462 * i387-fp.c (num_avx512_k_registers): New constant for number
8463 of K registers.
8464 (num_avx512_zmmh_low_registers): New constant for number of
8465 lower ZMM registers (0-15).
8466 (num_avx512_zmmh_high_registers): New constant for number of
8467 higher ZMM registers (16-31).
8468 (num_avx512_ymmh_registers): New contant for number of higher
8469 YMM registers (ymm16-31 added by avx521 on x86_64).
8470 (num_avx512_xmm_registers): New constant for number of higher
8471 XMM registers (xmm16-31 added by AVX512 on x86_64).
8472 (struct i387_xsave): Add space for AVX512 registers.
8473 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8474 Add code to handle AVX512 registers.
8475 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8476 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8477 prototypei from generated file.
8478 (tdesc_amd64_avx512_linux): Likewise.
8479 (init_registers_x32_avx512_linux): Likewise.
8480 (tdesc_x32_avx512_linux): Likewise.
8481 (init_registers_i386_avx512_linux): Likewise.
8482 (tdesc_i386_avx512_linux): Likewise.
8483 (x86_64_regmap): Add AVX512 registers.
8484 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8485 mask.
8486 (initialize_low_arch): Add code to initialize AVX512 registers.
8487
8488 2014-04-23 Pedro Alves <palves@redhat.com>
8489
8490 * mem-break.c (find_gdb_breakpoint_at): Make static.
8491 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8492
8493 2014-04-23 Pedro Alves <palves@redhat.com>
8494
8495 * i386-low.c: Don't include break-common.h here.
8496 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8497 prototype to take target_hw_bp_type as argument instead of a Z
8498 packet char.
8499 * i386-low.h: Include break-common.h here.
8500 (Z_packet_to_hw_type): Declare.
8501 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8502 prototypes.
8503 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8504 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8505 (x86_remove_point): Convert the packet number to a
8506 target_hw_bp_type before calling i386_low_remove_watchpoint.
8507 * win32-i386-low.c (i386_insert_point): Convert the packet number
8508 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8509 (i386_remove_point): Convert the packet number to a
8510 target_hw_bp_type before calling i386_low_remove_watchpoint.
8511
8512 2014-04-23 Pedro Alves <palves@redhat.com>
8513
8514 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8515
8516 2014-04-10 Pedro Alves <palves@redhat.com>
8517
8518 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8519 Check if the condition or command is NULL before checking if the
8520 breakpoint is known. On success, return true.
8521 * mem-break.h (add_breakpoint_condition): Document return.
8522 (add_breakpoint_commands): Add describing comment.
8523 * server.c (skip_to_semicolon): New function.
8524 (process_point_options): Use it.
8525
8526 2014-04-09 Pedro Alves <palves@redhat.com>
8527
8528 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8529 to lwpid_of.
8530
8531 2014-02-27 Pedro Alves <palves@redhat.com>
8532
8533 PR 12702
8534 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8535 macros.
8536 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8537 output.
8538 (last_thread_of_process_p): Take a PID argument instead of a
8539 thread pointer.
8540 (linux_wait_for_lwp): Delete.
8541 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8542 functions.
8543 (linux_low_filter_event): New function, party factored out from
8544 linux_wait_for_event.
8545 (linux_wait_for_event): Rename to ...
8546 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8547 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8548 sigsuspend. Check for zombie leaders.
8549 (linux_wait_for_event): Reimplement as wrapper around
8550 linux_wait_for_event_filtered.
8551 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8552 a normal or signal exit is seen, it's the whole process exiting.
8553 (wait_for_sigstop): No longer a for_each_inferior callback.
8554 Rewrite on top of linux_wait_for_event_filtered.
8555 (stop_all_lwps): Call wait_for_sigstop directly.
8556 * server.c (resume, handle_target_event): Handle
8557 TARGET_WAITKIND_NO_RESUMED.
8558
8559 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8560
8561 * win32-low.c (psapi_get_dll_name,
8562 * win32_CreateToolhelp32Snapshot): Delete.
8563 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8564 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8565 Delete.
8566 (handle_load_dll): Add function description.
8567 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8568
8569 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8570
8571 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8572 Add comment.
8573 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8574 base address when calling win32_add_one_solib.
8575 (handle_load_dll): Delete local variable load_addr.
8576 Remove 0x1000 offset applied to DLL base address when calling
8577 win32_add_one_solib.
8578 (handle_unload_dll): Add comment.
8579
8580 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8581
8582 * win32-low.c (win32_add_all_dlls): Renames
8583 win32_ensure_ntdll_loaded. Rewrite function documentation.
8584 Adjust implementation to always load all DLLs.
8585 Add 0x1000 offset to DLL base address when calling
8586 win32_add_one_solib.
8587 (child_initialization_done): New static global.
8588 (do_initial_child_stuff): Set child_initialization_done to
8589 zero during child initialization, and 1 after. Replace call
8590 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8591 Add comment.
8592 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8593 (handle_unload_dll): Add function documentation.
8594 (get_child_debug_event): Ignore load and unload DLL events
8595 during child initialization.
8596
8597 2014-02-20 Doug Evans <dje@google.com>
8598
8599 Remove global all_lwps.
8600 * inferiors.h (ptid_of): Move here from linux-low.h.
8601 (pid_of, lwpid_of): Ditto.
8602 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8603 parameter is a struct thread_info * now.
8604 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8605 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8606 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8607 directly.
8608 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8609 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8610 * linux-arm-low.c (update_registers_callback): Update, "entry"
8611 parameter is a struct thread_info * now.
8612 Fetch lwpid from current_inferior directly.
8613 (arm_insert_point): Pass &all_threads to find_inferior instead of
8614 &all_lwps.
8615 (arm_remove_point): Ditto.
8616 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8617 (arm_prepare_to_resume): Fetch pid from thread.
8618 (arm_read_description): Fetch lwpid from current_inferior directly.
8619 * linux-low.c (all_lwps): Delete.
8620 (delete_lwp): Delete call to remove_inferior.
8621 (handle_extended_wait): Fetch lwpid from thread.
8622 (add_lwp): Don't set lwp->entry.id. Remove call to
8623 add_inferior_to_list.
8624 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8625 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8626 (kill_one_lwp_callback): Ditto.
8627 (linux_kill): Don't dereference NULL pointer.
8628 Fetch ptid,lwpid from thread.
8629 (get_detach_signal): Fetch ptid from thread.
8630 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8631 Simplify call to regcache_invalidate_thread.
8632 (delete_lwp_callback): Update, "entry" parameter is a
8633 struct thread_info * now. Fetch pid from thread.
8634 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8635 (status_pending_p_callback): Update, "entry" parameter is a
8636 struct thread_info * now. Fetch ptid from thread.
8637 (find_lwp_pid): Update, "entry" parameter is a
8638 struct thread_info * now.
8639 (linux_wait_for_lwp): Fetch pid from thread.
8640 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8641 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8642 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8643 (dequeue_one_deferred_signal): Ditto.
8644 (cancel_breakpoint): Fetch ptid from current_inferior.
8645 (linux_wait_for_event): Pass &all_threads to find_inferior,
8646 not &all_lwps. Fetch ptid, lwpid from thread.
8647 (count_events_callback): Update, "entry" parameter is a
8648 struct thread_info * now.
8649 (select_singlestep_lwp_callback): Ditto.
8650 (select_event_lwp_callback): Ditto.
8651 (cancel_breakpoints_callback): Ditto.
8652 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8653 not &all_lwps.
8654 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8655 (unsuspend_one_lwp): Update, "entry" parameter is a
8656 struct thread_info * now.
8657 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8658 not &all_lwps.
8659 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8660 Fetch lwpid from thread, not lwp.
8661 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8662 Pass &all_threads to find_inferior, not &all_lwps.
8663 (send_sigstop): Fetch lwpid from thread, not lwp.
8664 (send_sigstop_callback): Update, "entry" parameter is a
8665 struct thread_info * now.
8666 (suspend_and_send_sigstop_callback): Ditto.
8667 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8668 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8669 struct thread_info * now.
8670 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8671 from thread, lwp.
8672 (lwp_running): Update, "entry" parameter is a
8673 struct thread_info * now.
8674 (stop_all_lwps): Fetch ptid from thread.
8675 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8676 (linux_resume_one_lwp): Fetch lwpid from thread.
8677 (linux_set_resume_request): Update, "entry" parameter is a
8678 struct thread_info * now. Fetch pid, lwpid from thread.
8679 (resume_status_pending_p): Update, "entry" parameter is a
8680 struct thread_info * now.
8681 (need_step_over_p): Ditto. Fetch lwpid from thread.
8682 (start_step_over): Fetch lwpid from thread.
8683 (linux_resume_one_thread): Update, "entry" parameter is a
8684 struct thread_info * now. Fetch lwpid from thread.
8685 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8686 (proceed_one_lwp): Update, "entry" parameter is a
8687 struct thread_info * now. Fetch lwpid from thread.
8688 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8689 struct thread_info * now.
8690 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8691 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8692 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8693 directly.
8694 (regsets_store_inferior_registers): Ditto.
8695 (fetch_register, store_register): Ditto.
8696 (linux_read_memory, linux_write_memory): Ditto.
8697 (linux_request_interrupt): Ditto.
8698 (linux_read_auxv): Ditto.
8699 (linux_xfer_siginfo): Ditto.
8700 (linux_qxfer_spu): Ditto.
8701 (linux_qxfer_libraries_svr4): Ditto.
8702 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8703 moved to inferiors.h.
8704 (get_lwp): Delete.
8705 (get_thread_lwp): Update.
8706 (struct lwp_info): Delete member "entry". Simplify comment for
8707 member "thread".
8708 (all_lwps): Delete.
8709 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8710 current_inferior directly.
8711 (update_watch_registers_callback): Update, "entry" parameter is a
8712 struct thread_info * now. Fetch pid from thread.
8713 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8714 (mips_insert_point): Fetch lwpid from current_inferior.
8715 Pass &all_threads to find_inferior, not &all_lwps.
8716 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8717 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8718 directly.
8719 (mips_stopped_data_address): Ditto.
8720 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8721 directly.
8722 * linux-tile-low.c (tile_arch_setup): Ditto.
8723 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8724 (update_debug_registers_callback): Update, "entry" parameter is a
8725 struct thread_info * now. Fetch pid from thread.
8726 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8727 Pass &all_threads to find_inferior, not &all_lwps.
8728 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8729 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8730 Pass &all_threads to find_inferior, not &all_lwps.
8731 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8732 (i386_dr_low_get_status): Ditto.
8733 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8734 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8735 (x86_linux_read_description): Ditto.
8736 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8737
8738 2014-02-20 Doug Evans <dje@google.com>
8739
8740 * inferiors.c (get_first_inferior): Fix buglet.
8741
8742 2014-02-19 Doug Evans <dje@google.com>
8743
8744 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8745 * inferiors.c (add_thread): Change result type to struct thread_info *.
8746 All callers updated.
8747 (add_lwp): Call add_thread here instead of in callers.
8748 All callers updated.
8749 * linux-low.h (get_lwp_thread): Rewrite.
8750 (struct lwp_info): New member "thread".
8751
8752 2014-02-19 Doug Evans <dje@google.com>
8753
8754 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8755 All callers updated.
8756
8757 2014-02-19 Doug Evans <dje@google.com>
8758
8759 * inferiors.c (add_thread): Fix whitespace.
8760
8761 2014-02-19 Doug Evans <dje@google.com>
8762
8763 * dll.c (clear_dlls): Replace accessing list implemention details
8764 with API function.
8765 * gdbthread.h (get_first_thread): Declare.
8766 * inferiors.c (for_each_inferior_with_data): New function.
8767 (get_first_thread): New function.
8768 (find_thread_ptid): Simplify.
8769 (get_first_inferior): New function.
8770 (clear_list): Delete.
8771 (one_inferior_p): New function.
8772 (clear_inferior_list): New function.
8773 (clear_inferiors): Update.
8774 * inferiors.h (for_each_inferior_with_data): Declare.
8775 (clear_inferior_list): Declare.
8776 (one_inferior_p): Declare.
8777 (get_first_inferior): Declare.
8778 * linux-low.c (linux_wait_for_event): Replace accessing list
8779 implemention details with API function.
8780 * server.c (target_running): Ditto.
8781 (accumulate_file_name_length): New function.
8782 (emit_dll_description): New function.
8783 (handle_qxfer_libraries): Replace accessing list implemention
8784 details with API function.
8785 (handle_qxfer_threads_worker): New function.
8786 (handle_qxfer_threads_proper): Replace accessing list implemention
8787 details with API function.
8788 (handle_query): Ditto.
8789 (visit_actioned_threads_callback_ftype): New typedef.
8790 (visit_actioned_threads_data): New struct.
8791 (visit_actioned_threads): Rewrite to be find_inferior callback.
8792 (resume): Call find_inferior.
8793 (handle_status): Replace accessing list implemention
8794 details with API function.
8795 (process_serial_event): Replace accessing list implemention details
8796 with API function.
8797 * target.c (set_desired_inferior): Replace accessing list implemention
8798 details with API function.
8799 * tracepoint.c (same_process_p): New function.
8800 (gdb_agent_about_to_close): Replace accessing list implemention
8801 details with API function.
8802 * win32-low.c (child_delete_thread): Replace accessing list
8803 implemention details with API function.
8804 (match_dll_by_basename): New function.
8805 (dll_is_loaded_by_basename): New function.
8806 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8807 details call to dll_is_loaded_by_basename.
8808
8809 2014-02-19 Doug Evans <dje@google.com>
8810
8811 * dll.h (struct dll_info): Add comment.
8812 * gdbthread.h (struct thread_info): Add comment.
8813 (current_ptid): Simplify.
8814 * inferiors.c (add_process): Update.
8815 (remove_process): Update.
8816 * inferiors.h (struct process_info): Rename member "head" to "entry".
8817 * linux-low.c (delete_lwp): Update.
8818 (add_lwp): Update.
8819 (last_thread_of_process_p): Update.
8820 (kill_one_lwp_callback, linux_kill): Update.
8821 (status_pending_p_callback): Update.
8822 (wait_for_sigstop): Update. Simplify read of ptid.
8823 (start_step_over): Update.
8824 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8825 (get_lwp_thread): Update.
8826 (struct lwp_info): Rename member "head" to "entry".
8827 * regcache.h (inferior_list_entry): Delete.
8828 * server.c (kill_inferior_callback): Update.
8829 (detach_or_kill_inferior_callback): Update.
8830 (print_started_pid): Update.
8831 (print_attached_pid): Update.
8832 (process_serial_event): Simplify read of ptid.
8833 * thread-db.c (thread_db_create_event): Update.
8834 (thread_db_get_tls_address): Update.
8835 * win32-low.c (current_inferior_ptid): Simplify.
8836
8837 2014-02-19 Tom Tromey <tromey@redhat.com>
8838
8839 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8840 argument.
8841 (target_supports_btrace): Update.
8842
8843 2014-02-14 Yao Qi <yao@codesourcery.com>
8844
8845 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8846 (rsp-low-ipa.o): New target.
8847
8848 2014-02-12 Tom Tromey <tromey@redhat.com>
8849
8850 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8851 convert_ascii_to_int.
8852 * regcache.c (registers_to_string): Likewise.
8853 * remote-utils.c (decode_M_packet): Likewise.
8854 * server.c (process_serial_event): Likewise.
8855
8856 2014-02-12 Tom Tromey <tromey@redhat.com>
8857
8858 * server.c (handle_query, handle_v_run): Use hex2bin, not
8859 unhexify.
8860 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8861
8862 2014-02-12 Tom Tromey <tromey@redhat.com>
8863
8864 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8865 convert_int_to_ascii.
8866 * regcache.c (registers_to_string, collect_register_as_string):
8867 Likewise.
8868 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8869 Likewise.
8870 * server.c (process_serial_event): Likewise.
8871 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8872 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8873
8874 2014-02-12 Tom Tromey <tromey@redhat.com>
8875
8876 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8877 bin2hex, not hexify.
8878 * tracepoint.c (cmd_qtstatus): Likewise.
8879
8880 2014-02-12 Tom Tromey <tromey@redhat.com>
8881
8882 * remote-utils.c (monitor_output): Pass explicit length to
8883 hexify.
8884
8885 2014-02-12 Tom Tromey <tromey@redhat.com>
8886
8887 * tracepoint.c: Include rsp-low.h.
8888 * server.c: Include rsp-low.h.
8889 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8890 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8891 declare.
8892 * remote-utils.c: Include rsp-low.h.
8893 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8894 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8895 (convert_int_to_ascii, convert_ascii_to_int): Move to
8896 common/rsp-low.c.
8897 * regcache.c: Include rsp-low.h.
8898 * ax.c: Include rsp-low.h.
8899 * Makefile.in (SFILES): Add common/rsp-low.c.
8900 (OBS): Add rsp-low.o.
8901 (rsp-low.o): New target.
8902
8903 2014-02-12 Tom Tromey <tromey@redhat.com>
8904
8905 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8906 Include print-utils.h.
8907 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8908 (plongest, thirty_two, phex_nz): Remove.
8909 * Makefile.in (SFILES): Add common/print-utils.c.
8910 (OBS): Add print-utils.o.
8911 (print-utils-ipa.o): New target.
8912 (print-utils.o): New target.
8913 (IPA_OBJS): Add print-utils-ipa.o.
8914
8915 2014-02-06 Tom Tromey <tromey@redhat.com>
8916
8917 * Makefile.in (SFILES): Fix indentation.
8918
8919 2014-02-05 Doug Evans <dje@google.com>
8920
8921 * linux-low.c (linux_wait_for_event): Improve comment.
8922 (linux_wait_1): Keep current_inferior in sync with event_child.
8923
8924 2014-01-22 Doug Evans <dje@google.com>
8925
8926 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8927
8928 2014-01-22 Doug Evans <dje@google.com>
8929
8930 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8931 * configure: Regenerate.
8932 * config.in: Regenerate.
8933 * Makefile.in (SFILES): Add debug.c.
8934 (OBS): Add debug.o.
8935 * debug.c: New file.
8936 * debug.h: New file.
8937 * linux-aarch64-low.c (*): Update all debugging printfs to use
8938 debug_printf instead of fprintf.
8939 * linux-arm-low.c (*): Ditto.
8940 * linux-cris-low.c (*): Ditto.
8941 * linux-crisv32-low.c (*): Ditto.
8942 * linux-m32r-low.c (*): Ditto.
8943 * linux-sparc-low.c (*): Ditto.
8944 * linux-x86.c (*): Ditto.
8945 * linux-low.c (*): Ditto.
8946 (linux_wait_1): Add calls to debug_enter, debug_exit.
8947 (linux_wait): Remove redundant debugging printf.
8948 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8949 (linux_resume, unstop_all_lwps): Ditto.
8950 * mem-break.c (*): Update all debugging printfs to use
8951 debug_printf instead of fprintf.
8952 * remote-utils.c (*): Ditto.
8953 * thread-db.c (*): Ditto.
8954 * server.c #include <ctype.h>, "gdb_vecs.h".
8955 (debug_threads): Moved to debug.c.
8956 (*): Update all debugging printfs to use debug_printf instead of
8957 fprintf.
8958 (start_inferior): Replace call to fflush with call to debug_flush.
8959 (monitor_show_help): Mention set debug-format.
8960 (parse_debug_format_options): New function.
8961 (handle_monitor_command): Handle "monitor set debug-format".
8962 (gdbserver_usage): Mention --debug-format.
8963 (main): Parse --debug-format.
8964 * server.h (debug_threads): Declaration moved to debug.h.
8965 #include "debug.h".
8966 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8967 trace_debug_1 that uses debug_printf.
8968 (tracepoint_look_up_symbols): Update all debugging printfs to use
8969 debug_printf instead of fprintf.
8970
8971 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8972
8973 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8974 sys/ptrace.h.
8975
8976 2014-01-17 Pedro Alves <palves@redhat.com>
8977
8978 PR build/16445
8979 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8980 defined after including gdb_proc_service.h.
8981
8982 2014-01-16 Doug Evans <dje@google.com>
8983
8984 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8985 (match_dll): Use it.
8986
8987 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8988
8989 * target.h (target_ops) <read_btrace>: Change parameters and
8990 return type to allow error reporting.
8991 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8992 trace reading errors on.
8993 * linux-low.c (linux_low_read_btrace): Pass trace reading
8994 errors on.
8995 (linux_low_disable_btrace): New.
8996
8997 2014-01-15 Doug Evans <dje@google.com>
8998
8999 * inferiors.c (thread_id_to_gdb_id): Delete.
9000 * inferiors.h (thread_id_to_gdb_id): Delete.
9001
9002 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9003
9004 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9005 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9006 versions.
9007
9008 2014-01-08 Pedro Alves <palves@redhat.com>
9009
9010 * server.c (handle_status): Don't discard previous queued stop
9011 replies or thread's pending status here.
9012 (main) <disconnection>: Do it here instead.
9013
9014 2014-01-08 Pedro Alves <palves@redhat.com>
9015
9016 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9017 * server.c (visit_actioned_threads, handle_pending_status): New
9018 function.
9019 (handle_v_cont): Factor out parts to ...
9020 (resume): ... this new function. If in all-stop, and a thread
9021 being resumed has a pending status, report it without actually
9022 resuming.
9023 (myresume): Adjust to use the new 'resume' function.
9024 (clear_pending_status_callback, set_pending_status_callback)
9025 (find_status_pending_thread_callback): New functions.
9026 (handle_status): Handle the case of multiple threads having
9027 interesting statuses to report. Report threads' real last signal
9028 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9029 with an interesting thread to report the status for, instead of
9030 always reporting the status of the first thread.
9031
9032 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9033
9034 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9035 * gdbreplay.c (gdbreplay_version): Likewise.
9036
9037 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9038
9039 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9040 iov.iov_len with the real length in use.
9041
9042 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9043
9044 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9045 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9046 for all targets that use win32-low.c.
9047 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9048 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9049
9050 2013-12-13 Pedro Alves <palves@redhat.com>
9051
9052 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9053 if equal to TARGET_WAITKIND_LOADED.
9054 * win32-low.c (cached_status): New static global.
9055 (win32_wait): Add declaration.
9056 (do_initial_child_stuff): Flush all initial pending debug events
9057 up to the initial breakpoint.
9058 (win32_wait): If CACHED_STATUS was set, return that instead
9059 of doing a real wait. Remove the code resuming the execution
9060 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9061 during the initial phase. Also remove the code changing
9062 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9063 TARGET_WAITKIND_STOPPED.
9064
9065 2013-12-11 Yao Qi <yao@codesourcery.com>
9066
9067 * notif.c (handle_notif_ack): Return 0 if no notification
9068 matches.
9069
9070 2013-11-20 Doug Evans <dje@google.com>
9071
9072 * linux-low.c (linux_set_resume_request): Fix comment.
9073
9074 2013-11-20 Doug Evans <dje@google.com>
9075
9076 * linux-low.c (resume_status_pending_p): Tweak comment.
9077
9078 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9079
9080 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9081 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9082 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9083 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9084 (srv_amd64_regobj): Add amd64-mpx.o.
9085 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9086 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9087 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9088 * i387-fp.c (num_pl_bnd_register) Added constant.
9089 (num_pl_bnd_cfg_registers) Added constant.
9090 (struct i387_xsave) Added reserved area and MPX fields.
9091 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9092 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9093 function.
9094 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9095 (init_registers_amd64_mpx_linux): Declare new function.
9096 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9097 (x86_64_regmap): Add MPX registers.
9098 (x86_linux_read_description): Add MPX case.
9099 (initialize_low_arch): Initialize MPX targets.
9100
9101 2013-11-18 Tom Tromey <tromey@redhat.com>
9102
9103 * configure: Rebuild.
9104 * configure.ac: Don't check for stdlib.h.
9105 * gdbreplay.c: Unconditionally include stdlib.h.
9106
9107 2013-11-18 Tom Tromey <tromey@redhat.com>
9108
9109 * config.in: Rebuild.
9110 * configure: Rebuild.
9111 * configure.ac: Don't use AC_HEADER_DIRENT.
9112
9113 2013-11-18 Tom Tromey <tromey@redhat.com>
9114
9115 * server.h: Don't check HAVE_STRING_H.
9116 * gdbreplay.c: Don't check HAVE_STRING_H.
9117 * configure: Rebuild.
9118
9119 2013-11-18 Tom Tromey <tromey@redhat.com>
9120
9121 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9122 LIBGNU.
9123
9124 2013-11-08 Tom Tromey <tromey@redhat.com>
9125
9126 * configure, config.in: Rebuild.
9127 * configure.ac: Remove unused configury.
9128
9129 2013-11-08 Tom Tromey <tromey@redhat.com>
9130
9131 * acinclude.m4: Include common.m4, codeset.m4.
9132 * configure, config.in: Rebuild.
9133 * configure.ac: Use GDB_AC_COMMON.
9134
9135 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9136
9137 * linux-s390-low.c (HWCAP_S390_TE): New define.
9138 (s390_arch_setup): Consider the TE field in the HWCAP for
9139 determining 'have_regset_tdb'.
9140
9141 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9142
9143 PR gdb/16014
9144 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9145 call to sizeof.
9146
9147 2013-10-02 Pedro Alves <palves@redhat.com>
9148
9149 * server.c (process_serial_event): Don't output "GDBserver
9150 exiting" if GDB is connected through stdio.
9151 * target.c (mywait): Likewise, be silent if GDB is connected
9152 through stdio.
9153
9154 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9155
9156 * lynx-low.c (lynx_add_threads_after_attach): New function.
9157 (lynx_attach): Remove call to add_thread. Add call to
9158 lynx_add_threads_after_attach instead.
9159
9160 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9161
9162 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9163 * config.in, configure: Regenerated.
9164
9165 2013-09-18 Yao Qi <yao@codesourcery.com>
9166
9167 PR server/15959
9168 * server.c (start_inferior): Clear 'resume_info'.
9169
9170 2013-09-16 Jiong Wang <jiwang@tilera.com>
9171
9172 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9173 for each register.
9174
9175 2013-09-16 Jiong Wang <jiwang@tilera.com>
9176
9177 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9178 linux-tile-low.o to srv_tgtobj.
9179
9180 2013-09-16 Will Newton <will.newton@linaro.org>
9181
9182 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9183 out regs.
9184
9185 2013-09-06 Pedro Alves <palves@redhat.com>
9186
9187 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9188 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9189 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9190 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9191 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9192 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9193
9194 2013-09-06 Pedro Alves <palves@redhat.com>
9195
9196 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9197 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9198
9199 2013-09-06 Pedro Alves <palves@redhat.com>
9200
9201 * linux-amd64-ipa.c: Include tracepoint.h.
9202 * linux-i386-ipa.c: Include tracepoint.h.
9203
9204 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9205
9206 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9207 (ps_get_thread_area): New function.
9208
9209 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9210
9211 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9212 (initialize_low_arch): Call init_registers_crisv32 rather than
9213 init_register_crisv32.
9214
9215 2013-09-05 Pedro Alves <palves@redhat.com>
9216
9217 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9218 to ...
9219 * hostio.h: ... this new file.
9220 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9221 win32-low.c: Include hostio.h.
9222
9223 2013-09-05 Pedro Alves <palves@redhat.com>
9224
9225 * server.h (gdb_client_data, handler_func, callback_handler_func)
9226 (delete_file_handler, add_file_handler, append_callback_event)
9227 (delete_callback_event, start_event_loop, initialize_event_loop):
9228 Move to event-loop.h and include it.
9229 * event-loop.h: New file.
9230
9231 2013-09-05 Pedro Alves <palves@redhat.com>
9232
9233 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9234 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9235 (loaded_dll, unloaded_dll): Move to ...
9236 * dll.h: ... this new file.
9237 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9238
9239 2013-09-05 Pedro Alves <palves@redhat.com>
9240
9241 * server.h (current_process, get_thread_process, all_processes)
9242 (add_inferior_to_list, for_each_inferior, current_inferior)
9243 (remove_inferior, add_process, remove_process, find_process_pid)
9244 (have_started_inferiors_p, have_attached_inferiors_p)
9245 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9246 (clear_inferiors, find_inferior, find_inferior_id)
9247 (inferior_target_data, set_inferior_target_data)
9248 (inferior_regcache_data, set_inferior_regcache_data): Move to
9249 inferiors.h, and include it.
9250 * inferiors.h: New file.
9251
9252 2013-09-05 Pedro Alves <palves@redhat.com>
9253
9254 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9255 Move ...
9256 * ax.h: ... here.
9257
9258 2013-09-05 Pedro Alves <palves@redhat.com>
9259
9260 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9261 tracepoint.h.
9262 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9263 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9264 (handle_tracepoint_general_set, handle_tracepoint_query)
9265 (tracepoint_finished_step, tracepoint_was_hit)
9266 (release_while_stepping_state_list, current_traceframe)
9267 (in_readonly_region, traceframe_read_mem)
9268 (fetch_traceframe_registers, traceframe_read_sdata)
9269 (traceframe_read_info, struct fast_tpoint_collect_status)
9270 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9271 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9272 (supply_fast_tracepoint_registers)
9273 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9274 (ipa_tdesc, claim_trampoline_space)
9275 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9276 (agent_mem_read, agent_get_trace_state_variable_value)
9277 (agent_set_trace_state_variable_value, agent_tsv_read)
9278 (agent_mem_read_string, get_raw_reg_func_addr)
9279 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9280 * tracepoint.h: ... this new file.
9281
9282 2013-09-05 Pedro Alves <palves@redhat.com>
9283
9284 * server.h (perror_with_name, error, fatal, warning, paddress)
9285 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9286 include it.
9287 * utils.h: New file.
9288
9289 2013-09-05 Pedro Alves <palves@redhat.com>
9290
9291 * server.h (remote_debug, noack_mode, transport_is_reliable)
9292 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9293 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9294 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9295 (write_enn, initialize_async_io, enable_async_io)
9296 (disable_async_io, check_remote_input_interrupt_request)
9297 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9298 (dead_thread_notify, prepare_resume_reply)
9299 (decode_address_to_semicolon, decode_address, decode_m_packet)
9300 (decode_M_packet, decode_X_packet, decode_xfer_write)
9301 (decode_search_memory_packet, unhexify, hexify)
9302 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9303 (look_up_one_symbol, relocate_instruction)
9304 (monitor_output): Move to remote-utils.h, and include it.
9305 * remote-utils.h: New file.
9306
9307 2013-09-05 Pedro Alves <palves@redhat.com>
9308
9309 * server.h (_): Delete.
9310
9311 2013-09-02 Pedro Alves <palves@redhat.com>
9312
9313 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9314 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9315 allocated.
9316 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9317
9318 2013-09-02 Pierre Muller <muller@sourceware.org>
9319
9320 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9321 or WriteProcessMemory complete successfully and handle
9322 ERROR_PARTIAL_COPY error.
9323
9324 2013-09-02 Pedro Alves <palves@redhat.com>
9325
9326 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9327 error instead of EIO.
9328
9329 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9330
9331 PR server/15604
9332 * linux-low.c: Include filestuff.h.
9333 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9334 * lynx-low.c: Include filestuff.h.
9335 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9336 * server.c: Include filestuff.h.
9337 (main): Call notice_open_fds.
9338 * spu-low.c: Include filestuff.h.
9339 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9340
9341 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9342
9343 * Makefile.in: Explain why ../target and ../nat are not
9344 listed as include file search paths.
9345 (linux-waitpid.o): New object file rule.
9346 * configure.srv (srv_native_linux_obj): New variable.
9347 Replace all occurrences of linux native object files with
9348 $srv_native_linux_obj.
9349 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9350 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9351 (linux_enable_event_reporting): Remove declaration.
9352 (my_waitpid): Moved to common/linux-waitpid.c.
9353 (linux_wait_for_event): Pass ptid when calling
9354 linux_enable_event_reporting.
9355 (linux_supports_tracefork_flag): Remove.
9356 (linux_enable_event_reporting): Likewise.
9357 (linux_tracefork_grandchild): Remove.
9358 (STACK_SIZE): Moved to common/linux-ptrace.c.
9359 (linux_tracefork_child): Remove.
9360 (linux_test_for_tracefork): Remove.
9361 (linux_look_up_symbols): Call linux_supports_traceclone.
9362 (initialize_low): Remove call to linux_test_for_tracefork.
9363 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9364 common/linux-ptrace.h.
9365 (PTRACE_TYPE_ARG4): Likewise.
9366 Include linux-ptrace.h.
9367
9368 2013-08-21 Pedro Alves <palves@redhat.com>
9369
9370 * config.in: Renegerate.
9371
9372 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9373
9374 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9375 (SFILES): Remove $(srcdir)/common/target-common.c and
9376 add $(srcdir)/target/waitstatus.c.
9377 (OBS): Remove target-common.o and add waitstatus.o.
9378 (server_h): Remove $(srcdir)/../common/target-common.h and
9379 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9380 and $(srcdir)/../target/waitstatus.h.
9381 (target-common.o): Remove.
9382 (waitstatus.o): New target object file.
9383 * target.h: Do not include target-common.h and
9384 include target/resume.h, target/wait.h and
9385 target/waitstatus.h.
9386
9387 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9388
9389 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9390 to PTRACE_TYPE_ARG3.
9391 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9392 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9393 PTRACE_TYPE_ARG4.
9394 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9395 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9396
9397 2013-07-27 Jie Zhang <jie@codesourcery.com>
9398 Daniel Jacobowitz <dan@codesourcery.com>
9399 Yao Qi <yao@codesourcery.com>
9400
9401 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9402 (mips-linux-watch.o): New rule.
9403 (mips_linux_watch_h): New variable.
9404 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9405 srv_tgtobj.
9406 * linux-mips-low.c: Include mips-linux-watch.h.
9407 (struct arch_process_info, struct arch_lwp_info): New.
9408 (update_watch_registers_callback): New function.
9409 (mips_linux_new_process, mips_linux_new_thread) New functions.
9410 (mips_linux_prepare_to_resume, mips_insert_point): New
9411 functions.
9412 (mips_remove_point, mips_stopped_by_watchpoint): New
9413 functions.
9414 (rsp_bp_type_to_target_hw_bp_type): New function.
9415 (mips_stopped_data_address): New function.
9416 (the_low_target): Add watchpoint support functions.
9417
9418 2013-07-27 Yao Qi <yao@codesourcery.com>
9419
9420 * i386-low.c: Include break-common.h.
9421 (enum target_hw_bp_type): Remove.
9422
9423 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9424
9425 * Makefile.in (SFILES): /common/target-common.c.
9426 (OBS): Add target-common.o.
9427 (server_h): Add $(srcdir)/../common/target-common.h.
9428 (target-common.o): New target.
9429 * server.c (queue_stop_reply_callback): Free
9430 status string after use.
9431 * target.c (target_waitstatus_to_string): Remove.
9432 * target.h: Include target-common.h.
9433 (resume_kind): Likewise.
9434 (target_waitkind): Likewise.
9435 (target_waitstatus): Likewise.
9436 (TARGET_WNOHANG): Likewise.
9437
9438 2013-07-04 Yao Qi <yao@codesourcery.com>
9439
9440 * Makefile.in (host_alias): Use @host_noncanonical@.
9441 (target_alias): Use @target_noncanonical@.
9442 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9443 ACX_NONCANONICAL_HOST.
9444 * configure: Regenerated.
9445
9446 Revert:
9447 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9448
9449 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9450 * configure: Rebuild.
9451 * Makefile.in (version_host, version_target): Get from configure.
9452 (version.c): Use $(version_host) and $(version_target).
9453
9454 2013-07-03 Pedro Alves <palves@redhat.com>
9455
9456 * Makefile.in (config.status): Depend on development.sh.
9457 * acinclude.m4: Include libmcheck.m4.
9458 * configure: Regenerate.
9459
9460 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9461
9462 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9463 attribute inside the parentheses.
9464 (winapi_DebugSetProcessKillOnExit): Ditto.
9465 (winapi_DebugBreakProcess): Ditto.
9466 (winapi_GenerateConsoleCtrlEvent): Ditto.
9467
9468 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9469
9470 * notif.h (notif_event): Add a dummy member to avoid compiler
9471 errors.
9472
9473 2013-07-01 Pedro Alves <palves@redhat.com>
9474
9475 * hostio.c (HOSTIO_PATH_MAX): Define.
9476 (require_filename, handle_open, handle_unlink, handle_readlink):
9477 Use it.
9478
9479 2013-07-01 Pedro Alves <palves@redhat.com>
9480
9481 * server.h: Include "pathmax.h".
9482 * linux-low.c: Don't include sys/param.h.
9483 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9484 MAXPATHLEN.
9485 * win32-low.c: Don't include sys/param.h.
9486 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9487
9488 2013-07-01 Pedro Alves <palves@redhat.com>
9489
9490 * event-loop.c: Don't check HAVE_UNISTD_H before including
9491 <unistd.h>.
9492 * gdbreplay.c: Likewise.
9493 * remote-utils.c: Likewise.
9494 * server.c: Likewise.
9495 * configure.ac: Don't check for unistd.h.
9496 * configure: Regenerate.
9497
9498 2013-06-28 Tom Tromey <tromey@redhat.com>
9499
9500 * Makefile.in (version.c): Use version.in, not
9501 common/version.in.
9502
9503 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9504
9505 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9506 * configure: Rebuild.
9507 * Makefile.in (version_host, version_target): Get from configure.
9508 (version.c): Use $(version_host) and $(version_target).
9509
9510 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9511
9512 Fix trace-status to output user name without trailing colon.
9513 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9514
9515 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9516
9517 Fix trace-status to output proper start-time and stop-time.
9518 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9519 output start time and stop time in hex as gdb expects.
9520
9521 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9522
9523 * tracepoint.c (build_traceframe_info_xml): Output trace state
9524 variables present in the trace buffer.
9525
9526 2013-06-24 Tom Tromey <tromey@redhat.com>
9527
9528 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9529 create-version.sh.
9530 (version.o): Remove.
9531 * gdbreplay.c: Include version.h.
9532 (version, host_name): Don't declare.
9533 * server.h: Include version.h.
9534 (version, host_name): Don't declare.
9535
9536 2013-06-12 Pedro Alves <palves@redhat.com>
9537
9538 * linux-x86-low.c (linux_is_elf64): Delete global.
9539 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9540 with local linux_pid_exe_is_elf_64_file use.
9541
9542 2013-06-11 Pedro Alves <palves@redhat.com>
9543
9544 * linux-low.c (regset_disabled, disable_regset): New functions.
9545 (regsets_fetch_inferior_registers)
9546 (regsets_store_inferior_registers): Use them.
9547 (initialize_regsets_info); Don't allocate the disabled_regsets
9548 array here.
9549 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9550 comment.
9551
9552 2013-06-11 Pedro Alves <palves@redhat.com>
9553
9554 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9555 xmalloc.
9556
9557 2013-06-11 Pedro Alves <palves@redhat.com>
9558
9559 * linux-x86-low.c (initialize_low_arch): Call
9560 init_registers_x32_avx_linux.
9561
9562 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9563
9564 Fix compatibility with Android Bionic.
9565 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9566 it is not empty.
9567
9568 2013-06-07 Pedro Alves <palves@redhat.com>
9569
9570 PR server/14823
9571 * Makefile.in (OBS): Add tdesc.o.
9572 (IPA_OBJS): Add tdesc-ipa.o.
9573 (tdesc-ipa.o): New rule.
9574 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9575 interface.
9576 * linux-low.c (new_inferior): Delete.
9577 (disabled_regsets, num_regsets): Delete.
9578 (linux_add_process): Adjust to set the new per-process
9579 new_inferior flag.
9580 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9581 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9582 was a stop. When calling arch_setup, switch the current inferior
9583 to the thread that got an event.
9584 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9585 (regsets_fetch_inferior_registers)
9586 (regsets_store_inferior_registers): New regsets_info parameter.
9587 Adjust to use it.
9588 (linux_register_in_regsets): New regs_info parameter. Adjust to
9589 use it.
9590 (register_addr, fetch_register, store_register): New usrregs_info
9591 parameter. Adjust to use it.
9592 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9593 parameter regs_info. Adjust to use it.
9594 (linux_fetch_registers): Get the current inferior's regs_info, and
9595 adjust to use it.
9596 (linux_store_registers): Ditto.
9597 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9598 (initialize_low): Don't initialize the target_regsets here. Call
9599 initialize_low_arch.
9600 * linux-low.h (target_regsets): Delete declaration.
9601 (struct regsets_info): New.
9602 (struct usrregs_info): New.
9603 (struct regs_info): New.
9604 (struct process_info_private) <new_inferior>: New field.
9605 (struct linux_target_ops): Delete the num_regs, regmap, and
9606 regset_bitmap fields. New field regs_info.
9607 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9608 * i387-fp.c (num_xmm_registers): Delete.
9609 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9610 calls to new interface.
9611 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9612 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9613 Infer the number of xmm registers from the regcache's target
9614 description.
9615 * i387-fp.h (num_xmm_registers): Delete.
9616 * inferiors.c (add_thread): Don't install the thread's regcache
9617 here.
9618 * proc-service.c (gregset_info): Fetch the current inferior's
9619 regs_info. Adjust to use it.
9620 * regcache.c: Include tdesc.h.
9621 (register_bytes, reg_defs, num_registers)
9622 (gdbserver_expedite_regs): Delete.
9623 (get_thread_regcache): If the thread doesn't have a regcache yet,
9624 create one, instead of aborting gdbserver.
9625 (regcache_invalidate_one): Rename to ...
9626 (regcache_invalidate_thread): ... this.
9627 (regcache_invalidate_one): New.
9628 (regcache_invalidate): Only invalidate registers of the current
9629 process.
9630 (init_register_cache): Add target_desc parameter, and use it.
9631 (new_register_cache): Ditto. Assert the target description has a
9632 non zero registers_size.
9633 (regcache_cpy): Add assertions. Adjust.
9634 (realloc_register_cache, set_register_cache): Delete.
9635 (registers_to_string, registers_from_string): Adjust.
9636 (find_register_by_name, find_regno, find_register_by_number)
9637 (register_cache_size): Add target_desc parameter, and use it.
9638 (free_register_cache_thread, free_register_cache_thread_one)
9639 (regcache_release, register_cache_size): New.
9640 (register_size): Add target_desc parameter, and use it.
9641 (register_data, supply_register, supply_register_zeroed)
9642 (supply_regblock, supply_register_by_name, collect_register)
9643 (collect_register_as_string, collect_register_by_name): Adjust.
9644 * regcache.h (struct target_desc): Forward declare.
9645 (struct regcache) <tdesc>: New field.
9646 (init_register_cache, new_register_cache): Add target_desc
9647 parameter.
9648 (regcache_invalidate_thread): Declare.
9649 (regcache_invalidate_one): Delete declaration.
9650 (regcache_release): Declare.
9651 (find_register_by_number, register_cache_size, register_size)
9652 (find_regno): Add target_desc parameter.
9653 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9654 declarations.
9655 * remote-utils.c: Include tdesc.h.
9656 (outreg, prepare_resume_reply): Adjust.
9657 * server.c: Include tdesc.h.
9658 (gdbserver_xmltarget): Delete declaration.
9659 (get_features_xml, process_serial_event): Adjust.
9660 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9661 declare.
9662 (struct process_info) <tdesc>: New field.
9663 (ipa_tdesc): Declare.
9664 * tdesc.c: New file.
9665 * tdesc.h: New file.
9666 * tracepoint.c: Include tdesc.h.
9667 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9668 (get_context_regcache): Adjust to pass ipa_tdesc down.
9669 (do_action_at_tracepoint): Adjust to get the register cache size
9670 from the context regcache's description.
9671 (traceframe_walk_blocks): Adjust to get the register cache size
9672 from the current trace frame's description.
9673 (traceframe_get_pc): Adjust to get current trace frame's
9674 description and pass it down.
9675 (gdb_collect): Adjust to get the register cache size from the
9676 IPA's description.
9677 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9678 (gdbserver_xmltarget): Delete.
9679 (initialize_low_tracepoint): Set the ipa's target description.
9680 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9681 (initialize_low_tracepoint): Set the ipa's target description.
9682 * linux-x86-low.c: Include tdesc.h.
9683 [__x86_64__] (is_64bit_tdesc): New.
9684 (ps_get_thread_area, x86_get_thread_area): Use it.
9685 (i386_cannot_store_register): Rename to ...
9686 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9687 (i386_cannot_fetch_register): Rename to ...
9688 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9689 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9690 to new interface.
9691 (target_regsets): Rename to ...
9692 (x86_regsets): ... this.
9693 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9694 interface.
9695 (x86_siginfo_fixup): Use is_64bit_tdesc.
9696 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9697 (tdesc_x32_avx_linux, tdesc_x32_linux)
9698 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9699 Declare.
9700 (x86_linux_update_xmltarget): Delete.
9701 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9702 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9703 (AMD64_LINUX_USER64_CS): New.
9704 (x86_linux_read_description): New, based on
9705 x86_linux_update_xmltarget.
9706 (same_process_callback): New.
9707 (x86_arch_setup_process_callback): New.
9708 (x86_linux_update_xmltarget): New.
9709 (x86_regsets_info): New.
9710 (amd64_linux_regs_info): New.
9711 (i386_linux_usrregs_info): New.
9712 (i386_linux_regs_info): New.
9713 (x86_linux_regs_info): New.
9714 (x86_arch_setup): Reimplement.
9715 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9716 (x86_emit_ops): Ditto.
9717 (the_low_target): Adjust. Install x86_linux_regs_info,
9718 x86_cannot_fetch_register, and x86_cannot_store_register.
9719 (initialize_low_arch): New.
9720 * linux-ia64-low.c (tdesc_ia64): Declare.
9721 (ia64_fetch_register): Adjust.
9722 (ia64_usrregs_info, regs_info): New globals.
9723 (ia64_regs_info): New function.
9724 (the_low_target): Adjust.
9725 (initialize_low_arch): New function.
9726 * linux-sparc-low.c (tdesc_sparc64): Declare.
9727 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9728 Adjust.
9729 (sparc_arch_setup): New function.
9730 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9731 (the_low_target): Adjust.
9732 (initialize_low_arch): New function.
9733 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9734 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9735 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9736 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9737 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9738 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9739 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9740 (tdesc_powerpc_isa205_vsx64l): Declare.
9741 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9742 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9743 (ppc_set_pc, ppc_get_hwcap): Adjust.
9744 (ppc_usrregs_info): Forward declare.
9745 (!__powerpc64__) ppc_regmap_adjusted: New global.
9746 (ppc_arch_setup): Adjust to the current process'es target
9747 description.
9748 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9749 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9750 (ppc_store_evrregset): Adjust.
9751 (target_regsets): Rename to ...
9752 (ppc_regsets): ... this, and make static.
9753 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9754 (ppc_regs_info): New function.
9755 (the_low_target): Adjust.
9756 (initialize_low_arch): New function.
9757 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9758 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9759 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9760 (tdesc_s390x_linux64v2): Declare.
9761 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9762 (s390_fill_gregset, s390_store_last_break): Adjust.
9763 (target_regsets): Rename to ...
9764 (s390_regsets): ... this, and make static.
9765 (s390_get_pc, s390_set_pc): Adjust.
9766 (s390_get_hwcap): New target_desc parameter, and use it.
9767 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9768 (s390_arch_setup): Adjust to set the current process'es target
9769 description. Don't adjust the regmap.
9770 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9771 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9772 (regs_info_3264): New globals.
9773 (s390_regs_info): New function.
9774 (the_low_target): Adjust.
9775 (initialize_low_arch): New function.
9776 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9777 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9778 [__mips64] (init_registers_mips_linux)
9779 (init_registers_mips_dsp_linux): Delete defines.
9780 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9781 (have_dsp): New global.
9782 (mips_read_description): New, based on mips_arch_setup.
9783 (mips_arch_setup): Reimplement.
9784 (get_usrregs_info): New function.
9785 (mips_cannot_fetch_register, mips_cannot_store_register)
9786 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9787 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9788 (target_regsets): Rename to ...
9789 (mips_regsets): ... this, and make static.
9790 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9791 (dsp_regs_info, regs_info): New globals.
9792 (mips_regs_info): New function.
9793 (the_low_target): Adjust.
9794 (initialize_low_arch): New function.
9795 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9796 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9797 Declare.
9798 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9799 (arm_read_description): New, with bits factored from
9800 arm_arch_setup.
9801 (arm_arch_setup): Reimplement.
9802 (target_regsets): Rename to ...
9803 (arm_regsets): ... this, and make static.
9804 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9805 (arm_regs_info): New function.
9806 (the_low_target): Adjust.
9807 (initialize_low_arch): New function.
9808 * linux-m68k-low.c (tdesc_m68k): Declare.
9809 (target_regsets): Rename to ...
9810 (m68k_regsets): ... this, and make static.
9811 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9812 (m68k_regs_info): New function.
9813 (m68k_arch_setup): New function.
9814 (the_low_target): Adjust.
9815 (initialize_low_arch): New function.
9816 * linux-sh-low.c (tdesc_sharch): Declare.
9817 (target_regsets): Rename to ...
9818 (sh_regsets): ... this, and make static.
9819 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9820 (sh_regs_info, sh_arch_setup): New functions.
9821 (the_low_target): Adjust.
9822 (initialize_low_arch): New function.
9823 * linux-bfin-low.c (tdesc_bfin): Declare.
9824 (bfin_arch_setup): New function.
9825 (bfin_usrregs_info, regs_info): New globals.
9826 (bfin_regs_info): New function.
9827 (the_low_target): Adjust.
9828 (initialize_low_arch): New function.
9829 * linux-cris-low.c (tdesc_cris): Declare.
9830 (cris_arch_setup): New function.
9831 (cris_usrregs_info, regs_info): New globals.
9832 (cris_regs_info): New function.
9833 (the_low_target): Adjust.
9834 (initialize_low_arch): New function.
9835 * linux-cris-low.c (tdesc_crisv32): Declare.
9836 (cris_arch_setup): New function.
9837 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9838 (cris_regs_info): New function.
9839 (the_low_target): Adjust.
9840 (initialize_low_arch): New function.
9841 * linux-m32r-low.c (tdesc_m32r): Declare.
9842 (m32r_arch_setup): New function.
9843 (m32r_usrregs_info, regs_info): New globals.
9844 (m32r_regs_info): Adjust.
9845 (initialize_low_arch): New function.
9846 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9847 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9848 (tic6x_usrregs_info): Forward declare.
9849 (tic6x_read_description): New function, based on ...
9850 (tic6x_arch_setup): ... this. Reimplement.
9851 (target_regsets): Rename to ...
9852 (tic6x_regsets): ... this, and make static.
9853 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9854 (tic6x_regs_info): New function.
9855 (the_low_target): Adjust.
9856 (initialize_low_arch): New function.
9857 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9858 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9859 (target_regsets): Rename to ...
9860 (xtensa_regsets): ... this, and make static.
9861 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9862 globals.
9863 (xtensa_arch_setup, xtensa_regs_info): New functions.
9864 (the_low_target): Adjust.
9865 (initialize_low_arch): New function.
9866 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9867 (nios2_arch_setup): Set the current process'es tdesc.
9868 (target_regsets): Rename to ...
9869 (nios2_regsets): ... this.
9870 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9871 (nios2_regs_info): New function.
9872 (the_low_target): Adjust.
9873 (initialize_low_arch): New function.
9874 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9875 (aarch64_arch_setup): Set the current process'es tdesc.
9876 (target_regsets): Rename to ...
9877 (aarch64_regsets): ... this.
9878 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9879 (aarch64_regs_info): New function.
9880 (the_low_target): Adjust.
9881 (initialize_low_arch): New function.
9882 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9883 globals.
9884 (target_regsets): Rename to ...
9885 (tile_regsets): ... this.
9886 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9887 (tile_regs_info): New function.
9888 (tile_arch_setup): Set the current process'es tdesc.
9889 (the_low_target): Adjust.
9890 (initialize_low_arch): New function.
9891 * spu-low.c (tdesc_spu): Declare.
9892 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9893 * win32-arm-low.c (tdesc_arm): Declare.
9894 (arm_arch_setup): New function.
9895 (the_low_target): Install arm_arch_setup instead of
9896 init_registers_arm.
9897 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9898 (init_windows_x86): Rename to ...
9899 (i386_arch_setup): ... this. Set `win32_tdesc'.
9900 (the_low_target): Adjust.
9901 * win32-low.c (win32_tdesc): New global.
9902 (child_add_thread): Don't create the thread cache here.
9903 (do_initial_child_stuff): Set the new process'es tdesc.
9904 * win32-low.h (struct target_desc): Forward declare.
9905 (win32_tdesc): Declare.
9906 * lynx-i386-low.c (tdesc_i386): Declare global.
9907 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9908 * lynx-low.c (lynx_tdesc): New global.
9909 (lynx_add_process): Set the new process'es tdesc.
9910 * lynx-low.h (struct target_desc): Forward declare.
9911 (lynx_tdesc): Declare global.
9912 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9913 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9914 * nto-low.c (nto_tdesc): New global.
9915 (do_attach): Set the new process'es tdesc.
9916 * nto-low.h (struct target_desc): Forward declare.
9917 (nto_tdesc): Declare.
9918 * nto-x86-low.c (tdesc_i386): Declare.
9919 (nto_x86_arch_setup): Set `nto_tdesc'.
9920
9921 2013-06-04 Gary Benson <gbenson@redhat.com>
9922
9923 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9924 to qSupported response when appropriate.
9925 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9926 with nonzero-length annex.
9927 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9928 arguments supplied in annex.
9929
9930 2013-05-31 Doug Evans <dje@google.com>
9931
9932 PR server/15594
9933 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9934 64 bits in 64-cross-32 environment.
9935
9936 2013-05-28 Pedro Alves <palves@redhat.com>
9937
9938 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9939 (aarch64-without-fpu.c): Delete rule.
9940 * configure.srv (aarch64*-*-linux*): Remove references to
9941 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9942 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9943 declaration.
9944
9945 2013-05-24 Pedro Alves <palves@redhat.com>
9946
9947 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9948 instead of strchr/decode_address. Error if the range isn't split
9949 with a ','. Don't assume there's be a ':' in the action.
9950
9951 2013-05-23 Yao Qi <yao@codesourcery.com>
9952 Pedro Alves <palves@redhat.com>
9953
9954 * linux-low.c (lwp_in_step_range): New function.
9955 (linux_wait_1): If the thread was range stepping and stopped
9956 outside the stepping range, report the stop to GDB. Otherwise,
9957 continue stepping. Add range stepping debug output.
9958 (linux_set_resume_request): Copy the step range from the resume
9959 request to the lwp.
9960 (linux_supports_range_stepping): New.
9961 (linux_target_ops) <supports_range_stepping>: Set to
9962 linux_supports_range_stepping.
9963 * linux-low.h (struct linux_target_ops)
9964 <supports_range_stepping>: New field.
9965 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9966 * linux-x86-low.c (x86_supports_range_stepping): New.
9967 (the_low_target) <supports_range_stepping>: Set to
9968 x86_supports_range_stepping.
9969 * server.c (handle_v_cont): Handle 'r' action.
9970 (handle_v_requests): Append ";r" if the target supports range
9971 stepping.
9972 * target.h (struct thread_resume) <step_range_start,
9973 step_range_end>: New fields.
9974 (struct target_ops) <supports_range_stepping>:
9975 New field.
9976 (target_supports_range_stepping): New macro.
9977
9978 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9979
9980 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9981 confusion in comment.
9982
9983 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9984
9985 * lynx-low.c (struct process_info_private): New type.
9986 (lynx_add_process): New function.
9987 (lynx_create_inferior, lynx_attach): Replace calls to
9988 add_process by calls to lynx_add_process.
9989 (lynx_resume): If PTID is null, then try using
9990 current_process()->private->last_wait_event_ptid.
9991 Add comments.
9992 (lynx_clear_inferiors): Delete. The contents of that function
9993 has been inlined in lynx_mourn;
9994 (lynx_wait_1): Save the ptid in the process's private data.
9995 (lynx_mourn): Free the process' private data. Replace call
9996 to lynx_clear_inferiors by call to clear_inferiors.
9997
9998 2013-05-17 Yao Qi <yao@codesourcery.com>
9999
10000 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10001 the right place.
10002
10003 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10004
10005 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10006 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10007 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10008 PT_TEXT_END_ADDR guards. Update comments.
10009 (linux_target_op) <read_offsets>: Conditionally define to
10010 linux_read_offsets if the target is UCLIBC and if it defines
10011 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10012
10013 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10014 Andrew Jenner <andrew@codesourcery.com>
10015
10016 * Makefile.in (SFILES): Add linux-nios2-low.c.
10017 (clean): Add action to delete nios2-linux.c.
10018 (nios2-linux.c): New rule.
10019 * configure.srv: Add nios2*-*-linux*.
10020 * linux-nios2-low.c: New.
10021
10022 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10023
10024 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10025
10026 2013-04-25 Hui Zhu <hui@codesourcery.com>
10027
10028 PR gdb/15186
10029 * ax.c (ax_printf): Add fflush.
10030
10031 2013-04-22 Tom Tromey <tromey@redhat.com>
10032
10033 * Makefile.in (SFILES): Add filestuff.c.
10034 (OBS): Add filestuff.o.
10035 (filestuff.o): New target.
10036 * config.in, configure: Rebuild.
10037 * configure.ac: Check for fdwalk, pipe2.
10038
10039 2013-04-17 Pedro Alves <palves@redhat.com>
10040
10041 * configure.ac (USE_THREAD_DB): Delete variable.
10042 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10043 Don't AC_SUBST USE_THREAD_DB.
10044 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10045 * config.in, configure: Regenerate.
10046
10047 2013-04-16 Pedro Alves <palves@redhat.com>
10048
10049 * linux-low.h (struct lwp_info) <thread_known>: Move under
10050 the USE_THREAD_DB #ifdef.
10051
10052 2013-04-16 Pedro Alves <palves@redhat.com>
10053
10054 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10055 (linux-low.o): Delete rule.
10056 * linux-low.h: Always include "gdb_thread_db.h" instead of
10057 conditionally including thread_db.h.
10058 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10059 HAVE_THREAD_DB_H.
10060
10061 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10062
10063 * Makefile.in (install-only): Fix make install regression.
10064
10065 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10066
10067 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10068 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10069 installation.
10070 * gdbserver.1: Remove.
10071
10072 2013-03-22 Pedro Alves <palves@redhat.com>
10073
10074 * linux-low.c (handle_extended_wait): Don't call
10075 linux_enable_event_reporting.
10076
10077 2013-03-15 Tony Theodore <tonyt@logyst.com>
10078
10079 PR build/9098:
10080 * Makefile.in (SHELL): Use @SHELL@.
10081
10082 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10083
10084 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10085 compiler warning.
10086
10087 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10088
10089 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10090 Remove extraneous NULL element.
10091
10092 2013-03-13 Yao Qi <yao@codesourcery.com>
10093
10094 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10095 'V' block in trace frame.
10096
10097 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10098
10099 * target.h (struct target_ops): Add btrace ops.
10100 (target_supports_btrace): New macro.
10101 (target_enable_btrace): New macro.
10102 (target_disable_btrace): New macro.
10103 (target_read_btrace): New macro.
10104 * gdbthread.h (struct thread_info): Add btrace field.
10105 * server.c: Include btrace-common.h.
10106 (handle_btrace_general_set): New function.
10107 (handle_btrace_enable): New function.
10108 (handle_btrace_disable): New function.
10109 (handle_general_set): Call handle_btrace_general_set.
10110 (handle_qxfer_btrace): New function.
10111 (struct qxfer qxfer_packets[]): Add btrace entry.
10112 * inferiors.c (remove_thread): Disable btrace.
10113 * linux-low: Include linux-btrace.h.
10114 (linux_low_enable_btrace): New function.
10115 (linux_low_read_btrace): New function.
10116 (linux_target_ops): Add btrace ops.
10117 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10118 Add srv_linux_btrace=yes.
10119 (x86_64-*-linux*): Add linux-btrace.o.
10120 Add srv_linux_btrace=yes.
10121 * configure.ac: Define HAVE_LINUX_BTRACE.
10122 * config.in: Regenerated.
10123 * configure: Regenerated.
10124
10125 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10126
10127 * server.c (handle_qxfer): Preserve error message if -3 is
10128 returned.
10129 (qxfer): Document the -3 return value.
10130
10131 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10132
10133 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10134 (linux_btrace_h): New variable.
10135 (linux-btrace.o): New rule.
10136
10137 2013-03-08 Stan Shebs <stan@codesourcery.com>
10138 Hafiz Abid Qadeer <abidh@codesourcery.com>
10139
10140 * tracepoint.c (trace_buffer_size): New global.
10141 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10142 (init_trace_buffer): Change to one-argument function. Allocate
10143 trace buffer memory.
10144 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10145 handle QTBuffer:size packet.
10146 (cmd_bigqtbuffer_size): New function.
10147 (initialize_tracepoint): Call init_trace_buffer with
10148 DEFAULT_TRACE_BUFFER_SIZE.
10149 * server.c (handle_query): Add QTBuffer:size in the
10150 supported packets.
10151
10152 2013-03-07 Yao Qi <yao@codesourcery.com>
10153
10154 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10155 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10156 of -1.
10157 (cmd_qtsp): Adjust condition. Do post increment.
10158 Set cur_action and cur_step_action back to 0.
10159
10160 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10161
10162 PR server/15236
10163 * linux-low.c (linux_write_memory): Return early success if LEN is
10164 zero.
10165
10166 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10167
10168 * configure.srv: Add x86_64-*-cygwin* as target.
10169
10170 2013-02-28 Tom Tromey <tromey@redhat.com>
10171
10172 * configure.ac: Invoke AC_SYS_LARGEFILE.
10173 * configure, config.in: Rebuild.
10174
10175 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10176
10177 * win32-low.c: Throughout, fix format strings and casts of
10178 printf-like functions to avoid type related warnings on all
10179 platforms.
10180 (get_child_debug_event): Print dwDebugEventCode as hex since
10181 that's how it's usually documented.
10182
10183 2013-02-28 Yao Qi <yao@codesourcery.com>
10184
10185 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10186 pulongest.
10187
10188 2013-02-27 Jiong Wang <jiwang@tilera.com>
10189
10190 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10191 (reg-tilegx32.c): New rule.
10192 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10193 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10194 different register info initializer according to elf class.
10195 (init_registers_tilgx32): New function. The tilegx32 register info
10196 initializer.
10197 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10198 (tile_store_gregset): Likewise.
10199
10200 2013-02-27 Yao Qi <yao@codesourcery.com>
10201
10202 * server.c (process_point_options): Print debug message when
10203 debug_threads is true.
10204
10205 2013-02-26 Yao Qi <yao@codesourcery.com>
10206
10207 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10208
10209 2013-02-19 Pedro Alves <palves@redhat.com>
10210 Kai Tietz <ktietz@redhat.com>
10211
10212 PR gdb/15161
10213
10214 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10215 instead of strtoul to extract address from packet.
10216 (process_serial_event) <'z'>: Likewise.
10217
10218 2013-02-18 Yao Qi <yao@codesourcery.com>
10219
10220 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10221
10222 2013-02-14 Pedro Alves <palves@redhat.com>
10223
10224 Plug memory leak.
10225
10226 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10227 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10228
10229 2013-02-14 Pedro Alves <palves@redhat.com>
10230
10231 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10232
10233 2013-02-14 Pedro Alves <palves@redhat.com>
10234
10235 * tracepoint.c (save_string): Delete.
10236 (add_tracepoint_action): Use savestring instead of save_string.
10237
10238 2013-02-12 Pedro Alves <palves@redhat.com>
10239
10240 * linux-xtensa-low.c: Ditto.
10241 * xtensa-xtregs.c: Ditto.
10242
10243 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10244
10245 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10246 thread_db.
10247
10248 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10249
10250 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10251 aarch64_num_wp_regs and aarch64_num_bp_regs to
10252 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10253
10254 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10255
10256 * linux-aarch64-low.c (ps_get_thread_area): Replace
10257 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10258
10259 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10260 Marcus Shawcroft <marcus.shawcroft@arm.com>
10261 Nigel Stephens <nigel.stephens@arm.com>
10262 Yufeng Zhang <yufeng.zhang@arm.com>
10263
10264 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10265 (aarch64.c, aarch64-without-fpu.c): New targets.
10266 * configure.srv (aarch64*-*-linux*): New.
10267 * linux-aarch64-low.c: New file.
10268
10269 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10270
10271 * linux-low.c (handle_extended_wait, linux_create_inferior)
10272 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10273 (dequeue_one_deferred_signal, linux_resume_one_thread)
10274 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10275 (linux_tracefork_grandchild, linux_test_for_tracefork)
10276 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10277 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10278 where the argument is 0.
10279
10280 2013-01-25 Yao Qi <yao@codesourcery.com>
10281
10282 * event-loop.c: Include "queue.h".
10283 (gdb_event_p): New typedef.
10284 (struct gdb_event) <next_event>: Remove.
10285 (event_queue): Change to QUEUE(gdb_event_p).
10286 (async_queue_event): Remove.
10287 (gdb_event_xfree): New.
10288 (initialize_event_loop): New.
10289 (process_event): Use API from QUEUE.
10290 (wait_for_event): Likewise.
10291 * server.c (main): Call initialize_event_loop.
10292 * server.h (initialize_event_loop): Declare.
10293
10294 2013-01-18 Yao Qi <yao@codesourcery.com>
10295
10296 * ax.h (struct eval_agent_expr_context): New.
10297 (gdb_eval_agent_expr): Update declaration.
10298 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10299 TFRAME. Add new argument CTX.
10300 * server.h (struct eval_agent_expr_context): Declare.
10301 (agent_mem_read, agent_tsv_read): Update declaration.
10302 (agent_mem_read_string): Likewise.
10303 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10304 (add_traceframe_block): Add new argument TPOINT.
10305 Increase TPOINT->traceframe_usage.
10306 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10307 eval_tracepoint_agent_expr.
10308 (condition_true_at_tracepoint): Likewise.
10309 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10310 (agent_mem_read_string, agent_tsv_read): Likewise.
10311
10312 2013-01-16 Yao Qi <yao@codesourcery.com>
10313
10314 * linux-low.c (linux_resume_one_lwp): Don't check
10315 'lwp->bp_reinsert != 0'.
10316
10317 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10318 Pedro Alves <palves@redhat.com>
10319
10320 * lynx-low.c (ptrace_request_to_str): Define a temporary
10321 macro and use it to simplify this function's implementation.
10322
10323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10324
10325 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10326 sets errno.
10327
10328 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10329
10330 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10331
10332 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10333
10334 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10335
10336 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10337
10338 * lynx-low.c (lynx_resume): Use the resume_info parameter
10339 to determine the ptid for the lynx_ptrace call, unless
10340 it is equal to minus_one_ptid, in which case we use the
10341 ptid of the current_inferior.
10342 (lynx_wait_1): After having received a thread create/exit
10343 event, resume the inferior's execution using the signaling
10344 thread's ptid, rather than the old ptid.
10345
10346 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10347
10348 * lynx-low.c (lynx_resume): Delete variable ret.
10349
10350 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10351
10352 * gdbreplay.c (gdbreplay_version): Update copyright year.
10353 * server.c (gdbserver_version): Likewise.
10354
10355 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10356
10357 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10358 new thread.
10359
10360 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10361
10362 * lynx-low.c (ptrace_request_to_str): Add handling for
10363 PTRACE_GETTRACESIG.
10364
10365 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10366
10367 * lynx-low.c (lynx_attach): Delete variable new_process.
10368
10369 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10370
10371 * lynx-low.c (lynx_create_inferior): Delete variable
10372 new_process.
10373
10374 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10375
10376 * lynx-low.c (ptrace_request_to_str): Do not handle
10377 PTRACE_GETTHREADLIST if this macro does not exist.
10378
10379 2012-12-15 Yao Qi <yao@codesourcery.com>
10380
10381 * Makefile.in (OBS): Add notif.o.
10382 * notif.c, notif.h: New.
10383 * server.c: Include "notif.h".
10384 (struct vstop_notif) <next>: Remove.
10385 <base>: New field.
10386 (queue_stop_reply): Update.
10387 (push_event, send_next_stop_reply): Remove.
10388 (discard_queued_stop_replies): Update.
10389 (notif_stop): New variable.
10390 (handle_v_stopped): Remove.
10391 (handle_v_requests): Don't call handle_v_stopped. Call
10392 handle_ack_notif instead.
10393 (queue_stop_reply_callback): Call notif_event_enque instead
10394 of queue_stop_reply.
10395 (handle_status): Don't call send_next_stop_reply, call
10396 notif_write_event instead.
10397 (kill_inferior_callback): Likewise.
10398 (detach_or_kill_inferior_callback): Likewise.
10399 (main): Call initialize_notif.
10400 (process_serial_event): Call QUEUE_is_empty.
10401 (handle_target_event): Call notif_push instead of push event.
10402 * server.h (push_event): Remove declaration.
10403
10404 2012-12-10 Tom Tromey <tromey@redhat.com>
10405
10406 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10407 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10408 macros.
10409 (.c.o): Rewrite.
10410 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10411 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10412 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10413 (amd64-linux-ipa.o, ax.o): Rewrite.
10414 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10415 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10416 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10417 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10418 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10419 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10420 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10421 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10422 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10423 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10424 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10425 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10426 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10427 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10428 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10429 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10430 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10431 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10432 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10433 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10434 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10435 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10436 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10437 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10438 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10439 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10440 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10441 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10442 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10443 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10444 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10445 (reg-tilegx.o): Remove.
10446 (all_object_files): New macro.
10447 Include .deps files.
10448 * aclocal.m4, configure: Rebuild.
10449 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10450 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10451 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10452
10453 2012-12-05 Tom Tromey <tromey@redhat.com>
10454
10455 PR gdb/14917:
10456 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10457
10458 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10459
10460 * configure.ac: Check for linux/perf_event.h.
10461 * config.in: Regenerated.
10462 * configure: Regenerated.
10463
10464 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10465
10466 * hostio.c (handle_readlink): Decrease buffer size
10467 parameter passed to readlink by one byte.
10468
10469 2012-11-26 Yao Qi <yao@codesourcery.com>
10470
10471 * configure.ac (build_warnings): Append '-Wempty-body'.
10472 * configure: Regenerated.
10473 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10474 body.
10475
10476 2012-11-15 Pierre Muller <muller@sourceware.org>
10477
10478 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10479 * config.in: Regenerate.
10480 * configure: Regenerate.
10481 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10482 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10483 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10484 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10485 header.
10486 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10487 instead of <sys/wait.h> header.
10488 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10489
10490 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10491
10492 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10493 (various make rules): Remove -DGDBSERVER
10494
10495 2012-11-09 Yao Qi <yao@codesourcery.com>
10496
10497 * spu-low.c (current_ptid): Move it to ..
10498 * gdbthread.h: ... here. New.
10499 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10500 * server.c (myresume, process_serial_event): Likewise.
10501 * thread-db.c (thread_db_find_new_threads): Likewise.
10502 * tracepoint.c (run_inferior_command): Likewise.
10503
10504 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10505
10506 * server.c (handle_search_memory_1): Include access length in
10507 warning message.
10508
10509 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10510
10511 * linux-crisv32-low.c: Fix compile errors.
10512
10513 2012-09-04 Yao Qi <yao@codesourcery.com>
10514
10515 * tracepoint.c (cmd_qtsv): Adjust debug message.
10516 Don't check CUR_TPOINT.
10517
10518 2012-08-28 Yao Qi <yao@codesourcery.com>
10519
10520 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10521 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10522 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10523 Remove declarations of xmalloc, xreallloc, xstrdup and
10524 freeargv.
10525 * Makefile.in (libiberty_h): New.
10526 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10527 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10528
10529 2012-08-23 Yao Qi <yao@codesourcery.com>
10530
10531 * server.h: Remove declaration of 'xsnprintf'.
10532
10533 2012-08-22 Keith Seitz <keiths@redhat.com>
10534
10535 * server.h: Include build-gnulib-gbserver/config.h.
10536 * gdbreplay.c: Likewise.
10537
10538 2012-08-08 Doug Evans <dje@google.com>
10539
10540 * Makefile.in (SFILES): Add gdb_vecs.c.
10541 (OBS): Add gdb_vecs.o.
10542 (gdb_vecs_h, host_defs_h): New variables.
10543 (thread-db.o): Add $(gdb_vecs_h) dependency.
10544 (gdb_vecs.o): New rule.
10545 * thread-db.c: #include "gdb_vecs.h".
10546 (thread_db_load_search): Use a vector to iterate over path elements.
10547 Handle text appearing after "$pdir".
10548
10549 * configure.ac: Add check for strstr.
10550 * config.in: Regenerate.
10551 * configure: Regenerate.
10552
10553 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10554
10555 * hostio.c (handle_pread): If pread fails, fall back to attempting
10556 lseek/read.
10557 (handle_pwrite): Likewise for pwrite.
10558
10559 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10560
10561 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10562 between unsupported TYPE and unimplementable ADDR/LEN combination.
10563 (arm_insert_point): Act on new return value.
10564
10565 2012-07-31 Pedro Alves <palves@redhat.com>
10566
10567 * server.c (process_point_options): Only skip tokens if we find
10568 one that is unrecognized. Don't treat 'X' specially while
10569 skipping unrecognized tokens.
10570
10571 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10572
10573 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10574 to 4-byte-align HW breakpoint addresses for Thumb.
10575
10576 2012-07-27 Yao Qi <yao@codesourcery.com>
10577
10578 PR remote/14161.
10579
10580 * server.h: Declare gdb_agent_about_to_close.
10581 * target.c (kill_inferior): Include "agent.h".
10582 New. Send command 'kill'.
10583 * target.h (kill_inferior): Removed macro.
10584 * tracepoint.c (gdb_agent_about_to_close): New.
10585 (gdb_agent_helper_thread): Handle command 'close'.
10586 Wait endlessly until the inferior stops.
10587 Install gdb_agent_remove_socket to atexit hook.
10588 (agent_socket_name): New static variable.
10589 (gdb_agent_socket_init): Replace local variable 'name' with
10590 'agent_socket_name'.
10591 (gdb_agent_remove_socket): New.
10592
10593 2012-07-27 Yao Qi <yao@codesourcery.com>
10594
10595 * server.c (process_point_options): Stop at 'X' when parsing.
10596
10597 2012-07-19 Michael Eager <eager@eagercon.com>
10598
10599 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10600 to hw_execute.
10601 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10602 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10603 hardware breakpoint.
10604
10605 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10606
10607 * gdbserver/linux-low.c (initialize_low): Call
10608 linux_ptrace_init_warnings.
10609
10610 2012-07-02 Doug Evans <dje@google.com>
10611
10612 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10613 pointer to int.
10614
10615 2012-07-02 Stan Shebs <stan@codesourcery.com>
10616
10617 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10618 (ax.o): Add it to build rule.
10619 (ax-ipa.o): Ditto.
10620 (OBS): Add format.o.
10621 (IPA_OBS): Add format.o.
10622 * server.c (handle_query): Claim support for breakpoint commands.
10623 (process_point_options): Add command case.
10624 (process_serial_event): Leave running if there are printfs in
10625 effect.
10626 * mem-break.h (any_persistent_commands): Declare.
10627 (add_breakpoint_commands): Declare.
10628 (gdb_no_commands_at_breakpoint): Declare.
10629 (run_breakpoint_commands): Declare.
10630 * mem-break.c (struct point_command_list): New struct.
10631 (struct breakpoint): New field command_list.
10632 (any_persistent_commands): New function.
10633 (add_commands_to_breakpoint): New function.
10634 (add_breakpoint_commands): New function.
10635 (gdb_no_commands_at_breakpoint): New function.
10636 (run_breakpoint_commands): New function.
10637 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10638 locally.
10639 * ax.c: Include format.h.
10640 (ax_printf): New function.
10641 (gdb_eval_agent_expr): Add printf opcode.
10642
10643 2012-06-13 Yao Qi <yao@codesourcery.com>
10644
10645 * server.c (start_inferior): Remove duplicated writes to fields
10646 'last_resume_kind' and 'last_status' of 'current_inferior'.
10647
10648 2012-06-12 Yao Qi <yao@codesourcery.com>
10649 Pedro Alves <palves@redhat.com>
10650
10651 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10652 comment.
10653 * server.c (handle_v_cont): Extend comment.
10654
10655 2012-06-11 Yao Qi <yao@codesourcery.com>
10656
10657 * linux-low.c (linux_attach): Add 'static'.
10658
10659 2012-06-06 Yao Qi <yao@codesourcery.com>
10660
10661 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10662
10663 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10664
10665 Fix gcc -flto compilation warning.
10666 * server.c (main): Make variable multi_mode and attach volatile.
10667
10668 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10669
10670 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10671 if the platform doesn't know about it.
10672
10673 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10674
10675 * Makefile.in (SFILES): Add linux-tile-low.c.
10676 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10677 * configure.srv: Handle tilegx-*-linux*.
10678 * linux-tile-low.c: New file.
10679
10680 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10681
10682 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10683
10684 2012-05-24 Pedro Alves <palves@redhat.com>
10685
10686 PR gdb/7205
10687
10688 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10689
10690 2012-05-24 Pedro Alves <palves@redhat.com>
10691
10692 PR gdb/7205
10693
10694 Replace target_signal with gdb_signal throughout.
10695
10696 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10697
10698 * linux-low.c (linux_store_registers): Avoid the copying sequence
10699 when no data has been retrieved by ptrace.
10700
10701 2012-05-22 Will Deacon <will.deacon@arm.com>
10702
10703 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10704 Include asm/ptrace.h.
10705 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10706 already defined.
10707
10708 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10709
10710 * linux-low.c (linux_store_registers): Don't re-retrieve data
10711 with ptrace that has already been obtained from /proc. Always
10712 copy any data retrieved with ptrace to the buffer supplied.
10713
10714 2012-05-11 Yao Qi <yao@codesourcery.com>
10715 Pedro Alves <palves@redhat.com>
10716
10717 * linux-low.c (enum stopping_threads_kind): New.
10718 (stopping_threads): Change type to `enum stopping_threads_kind'.
10719 (handle_extended_wait): If stopping and suspending threads, leave
10720 the new_lwp suspended too.
10721 (linux_wait_for_event): Adjust.
10722 (stop_all_lwps): Set `stopping_threads' to
10723 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10724 whether we're suspending threads or just stopping them. Assert no
10725 recursion happens.
10726
10727 2012-04-29 Yao Qi <yao@codesourcery.com>
10728
10729 * server.h: Move some code to ...
10730 * gdbthread.h: ... here. New.
10731 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10732 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10733 (nto-low.o, win32-low.o): Likewise.
10734 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10735 * regcache.c, remote-utils.c, server.c: Likewise.
10736 * target.c, tracepoint.c, win32-low.c: Likewise.
10737
10738 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10739
10740 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10741 (PTRACE_ARG4_TYPE): Likewise.
10742 (PTRACE_XFER_TYPE): Likewise.
10743 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10744 ptrace to PTRACE_ARG3_TYPE.
10745 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10746 (PTRACE_ARG4_TYPE): Likewise.
10747 (PTRACE_XFER_TYPE): Likewise.
10748 (linux_detach_one_lwp): Cast fourth argument of
10749 ptrace to long then PTRACE_ARG4_TYPE.
10750 (regsets_fetch_inferior_registers): Cast third argument of
10751 ptrace to long then PTRACE_ARG3_TYPE.
10752 (regsets_store_inferior_registers): Likewise.
10753
10754 2012-04-20 Pedro Alves <palves@redhat.com>
10755
10756 * configure: Regenerate.
10757
10758 2012-04-19 Pedro Alves <palves@redhat.com>
10759
10760 * Makefile.in (GNULIB_BUILDDIR): New.
10761 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10762 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10763 (all, install-only, uninstall, clean-info, all-lib, clean): No
10764 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10765 (maintainer-clean realclean distclean): Use subdir_do.
10766 (subdir_do): New.
10767 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10768 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10769 * acinclude.m4: Include acx_configure_dir.m4.
10770 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10771 calls. Call AC_PROG_RANLIB. Configure gnulib using
10772 ACX_CONFIGURE_DIR.
10773 (GNULIB): New.
10774 (GNULIB_STDINT_H): Adjust.
10775 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10776 * gdbreplay.c: Include build-gnulib/config.h.
10777 * server.h: Likewise.
10778 * aclocal.m4: Regenerate.
10779 * config.in: Regenerate.
10780 * configure: Regenerate.
10781
10782 2012-04-19 Pedro Alves <palves@redhat.com>
10783
10784 * Makefile.in (LIBGNU, INCGNU): Adjust.
10785 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10786 (all, install-only, uninstall, clean-info, all-lib, clean)
10787 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10788 * configure.ac: Adjust AC_OUTPUT output.
10789 * aclocal.m4: Regenerate.
10790 * configure: Regenerate.
10791
10792 2012-04-19 Pedro Alves <palves@redhat.com>
10793
10794 * Makefile.in (generated_files): New.
10795 (server_h): Remove the explicit dependency on config.h, and depend
10796 on $generated_files.
10797
10798 2012-04-19 Pedro Alves <palves@redhat.com>
10799
10800 * Makefile.in (INCGNU): Add -Ignulib.
10801
10802 2012-04-19 Pedro Alves <palves@redhat.com>
10803
10804 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10805 (INCGNU): ... this, and spell out -I here.
10806 (GNULIB_LIB): Rename to ...
10807 (LIBGNU): ... this.
10808 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10809
10810 2012-04-19 Pedro Alves <palves@redhat.com>
10811
10812 * config.in: Regenerate.
10813
10814 2012-04-19 Pedro Alves <palves@redhat.com>
10815
10816 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10817 * server.h (memmem): Remove declaration.
10818 * config.in: Regenerate.
10819 * configure: Regenerate.
10820
10821 2012-04-19 Yao Qi <yao@codesourcery.com>
10822
10823 * Makefile.in (SFILES): Add common/vec.c.
10824 (OBS): Add vec.o.
10825 (vec.o): New rule.
10826
10827 2012-04-19 Yao Qi <yao@codesourcery.com>
10828
10829 * remote-utils.c (prepare_resume_reply): Replace with macro
10830 target_core_of_thread.
10831 * server.c (handle_qxfer_threads_proper): Likewise.
10832 * target.h (traget_core_of_thread): New macro.
10833
10834 2012-04-18 Pedro Alves <palves@redhat.com>
10835
10836 * aclocal.m4: Regenerate.
10837 * configure: Regenerate.
10838
10839 2012-04-16 Yao Qi <yao@codesourcery.com>
10840
10841 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10842 duplicated on address.
10843
10844 2012-04-16 Yao Qi <yao@codesourcery.com>
10845
10846 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10847 (struct tracepoint_action_ops) <send>: New field.
10848 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10849 (agent_expr_send, x_tracepoint_action_send): New.
10850 (l_tracepoint_action_send): New.
10851 (cmd_qtdp): Download and install tracepoint
10852 according to `use_agent'.
10853 (run_inferior_command): Add one more parameter `len'.
10854 Update callers.
10855 (tracepoint_send_agent): New.
10856 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10857
10858 2012-04-16 Yao Qi <yao@codesourcery.com>
10859
10860 * tracepoint.c (download_tracepoints): Moved to ...
10861 (cmd_qtstart): ... here.
10862
10863 2012-04-14 Yao Qi <yao@codesourcery.com>
10864
10865 * tracepoint.c: Include inttypes.h.
10866 (struct collect_memory_action): Use sized types.
10867 (struct tracepoint): Likewise.
10868 (cmd_qtdp, stop_tracing): Update print specifiers.
10869 (cmd_qtp, response_tracepoint): Likewise.
10870 (collect_data_at_tracepoint): Likewise.
10871 (collect_data_at_step): Likewise.
10872
10873 2012-04-14 Yao Qi <yao@codesourcery.com>
10874
10875 Import gnulib module inttypes.
10876 * aclocal.m4, config.in, configure: Regenerated.
10877
10878 2012-04-14 Yao Qi <yao@codesourcery.com>
10879
10880 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10881 Makefile and config.status at last.
10882
10883 2012-04-13 Yao Qi <yao@codesourcery.com>
10884
10885 * tracepoint.c: Include stdint.h unconditionally.
10886
10887 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10888
10889 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10890 on BFD_HAVE_SYS_PROCFS_TYPE.
10891 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10892 * configure: Regenerate.
10893 * config.in: Likewise.
10894
10895 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10896
10897 * Makefile.in (clean): Also remove x32.c x32-linux.c
10898 x32-avx.c x32-avx-linux.c.
10899 (x32.o): New target.
10900 (x32.c): Likewise.
10901 (x32-linux.o): Likewise.
10902 (x32-linux.c): Likewise.
10903 (x32-avx.o): Likewise.
10904 (x32-avx.c): Likewise.
10905 (x32-avx-linux.o): Likewise.
10906 (x32-avx-linux.c): Likewise.
10907
10908 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10909 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10910 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10911 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10912 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10913 i386/x32-avx-linux.xml.
10914
10915 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10916 (init_registers_x32_avx_linux): Likwise.
10917 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10918 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10919
10920 2012-04-13 Pedro Alves <palves@redhat.com>
10921
10922 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10923 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10924 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10925 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10926 the sub-make.
10927
10928 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10929
10930 * linux-x86-low.c (compat_x32_clock_t): New.
10931 (compat_x32_siginfo_t): Likewise.
10932 (compat_x32_siginfo_from_siginfo): Likewise.
10933 (siginfo_from_compat_x32_siginfo): Likewise.
10934 (linux_is_elf64): Likewise.
10935 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10936 and siginfo_from_compat_x32_siginfo for x32.
10937 (x86_arch_setup): Set linux_is_elf64.
10938
10939 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10940
10941 PR gdb/13969
10942 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10943 e_machine field.
10944 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10945 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10946 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10947 compatible with process.
10948
10949 2012-04-12 Yao Qi <yao@codesourcery.com>
10950
10951 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10952 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10953 (install-only, install-info, clean): Handle sub dir gnulib.
10954 (all-lib, am--refresh): New targets.
10955 (memmem.o): Remove target.
10956 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10957 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10958 (AC_REPLACE_FUNCS): Remove memmem.
10959 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10960 (AC_OUTPUT): Generate Makefile in gnulib/.
10961 * aclocal.m4, config.in, configure: Regenerated.
10962
10963 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10964
10965 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10966
10967 2012-04-05 Pedro Alves <palves@redhat.com>
10968
10969 -Werror=strict-aliasing
10970
10971 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10972 pointer.
10973
10974 2012-04-04 Pedro Alves <palves@redhat.com>
10975
10976 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10977 (sparc_store_gregset_from_stack, sparc_store_gregset)
10978 (sparc_breakpoint_at): Fix formatting.
10979
10980 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10981
10982 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10983 are available.
10984 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10985 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10986 * config.in: Regenerate.
10987 * configure: Likewise.
10988
10989 2012-03-29 Pedro Alves <palves@redhat.com>
10990
10991 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10992 Correct ptrace arguments.
10993
10994 2012-03-28 Pedro Alves <palves@redhat.com>
10995
10996 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10997 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10998 (IA64_FR1_REGNUM): New defines.
10999 (ia64_fetch_register): New.
11000 (the_low_target): Install it.
11001 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11002 field.
11003 * linux-low.c (linux_fetch_registers): Try the
11004 the_low_target.fetch_register hook first.
11005
11006 * linux-arm-low.c (the_low_target): Adjust.
11007 * linux-bfin-low.c (the_low_target): Adjust.
11008 * linux-cris-low.c (the_low_target): Adjust.
11009 * linux-crisv32-low.c (the_low_target): Adjust.
11010 * linux-m32r-low.c (the_low_target): Adjust.
11011 * linux-m68k-low.c (the_low_target): Adjust.
11012 * linux-mips-low.c (the_low_target): Adjust.
11013 * linux-ppc-low.c (the_low_target): Adjust.
11014 * linux-s390-low.c (the_low_target): Adjust.
11015 * linux-sh-low.c (the_low_target): Adjust.
11016 * linux-sparc-low.c (the_low_target): Adjust.
11017 * linux-tic6x-low.c (the_low_target): Adjust.
11018 * linux-x86-low.c (the_low_target): Adjust.
11019 * linux-xtensa-low.c (the_low_target): Adjust.
11020
11021 2012-03-26 Pedro Alves <palves@redhat.com>
11022
11023 * server.c (handle_qxfer_libraries): Don't bail early if
11024 the_target->qxfer_libraries_svr4 is not NULL.
11025
11026 2012-03-26 Pedro Alves <palves@redhat.com>
11027
11028 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11029
11030 2012-03-23 Pedro Alves <palves@redhat.com>
11031
11032 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11033 "library-list-svr4" element's start tag when the the DSO list is
11034 empty.
11035
11036 2012-03-23 Pedro Alves <palves@redhat.com>
11037
11038 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11039 a variable whose type size is the same as the inferior's pointer
11040 size.
11041
11042 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11043
11044 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11045 struct siginfo.
11046 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11047 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11048 * linux-low.h: Include <signal.h>.
11049 (struct siginfo): Remove forward declaration.
11050 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11051 struct siginfo.
11052
11053 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11054
11055 * .gitignore: Ignore more files.
11056
11057 2012-03-19 Pedro Alves <palves@redhat.com>
11058 Jan Kratochvil <jan.kratochvil@redhat.com>
11059
11060 * server.c (cont_thread, general_thread): Add describing comments.
11061 (start_inferior): Clear `cont_thread'.
11062 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11063 of a process.
11064
11065 2012-03-15 Yao Qi <yao@codesourcery.com>
11066
11067 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11068 handling to ...
11069 (cmd_qtdp): ... here.
11070
11071 2012-03-15 Yao Qi <yao@codesourcery.com>
11072
11073 * tracepoint.c (struct tracepoint_action_ops): New.
11074 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11075 (m_tracepoint_action_download): New.
11076 (r_tracepoint_action_download): New.
11077 (x_tracepoint_action_download): New.
11078 (l_tracepoint_action_download): New.
11079 (add_tracepoint_action): Install `action->ops' according type.
11080 (download_tracepoint_1): Move code `download' function pointer
11081 of various tracepoint_action_ops.
11082
11083 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11084
11085 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11086 linux_ptrace_attach_warnings.
11087
11088 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11089
11090 * Makefile.in (linux-ptrace.o): New.
11091 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11092 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11093 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11094 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11095 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11096 of these targets.
11097 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11098
11099 2012-03-08 Yao Qi <yao@codesourcery.com>
11100 Pedro Alves <palves@redhat.com>
11101
11102 Fix PR server/13392.
11103 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11104 offset of JMP insn.
11105 * tracepoint.c (remove_tracepoint): New.
11106 (cmd_qtdp): Call remove_tracepoint when failed to install.
11107
11108 2012-03-07 Pedro Alves <palves@redhat.com>
11109
11110 * linux-low.c (get_detach_signal): New.
11111 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11112 Pass on pending signals to PTRACE_DETACH. Check the result of the
11113 ptrace call.
11114 * server.c (program_signals, program_signals_p): New.
11115 (handle_general_set): Handle QProgramSignals.
11116 * server.h (program_signals, program_signals_p): Declare.
11117
11118 2012-03-05 Pedro Alves <palves@redhat.com>
11119 Jan Kratochvil <jan.kratochvil@redhat.com>
11120
11121 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11122 New comment why.
11123
11124 2012-03-03 Yao Qi <yao@codesourcery.com>
11125
11126 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11127 agent_look_up_symbols.
11128
11129 2012-03-03 Yao Qi <yao@codesourcery.com>
11130
11131 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11132 (linux-x86-low.o): Likewise.
11133 * server.h: Remove in_process_agent_loaded.
11134 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11135 common/agent.c.
11136 Update callers.
11137
11138 2012-03-03 Yao Qi <yao@codesourcery.com>
11139
11140 * tracepoint.c (gdb_agent_capability): New global.
11141 (in_process_agent_loaded_ust): Renamed to
11142 `in_process_agent_supports_ust'.
11143 Update callers.
11144 (in_process_agent_supports_ust): Call agent_capability_check.
11145 (clear_installed_tracepoints): Assert that agent supports
11146 agent.
11147
11148 2012-03-03 Yao Qi <yao@codesourcery.com>
11149
11150 * linux-low.c (linux_supports_agent): New.
11151 (linux_target_ops): Initialize field `supports_agent' with
11152 linux_supports_agent.
11153 * target.h (struct target_ops) <supports_agent>: New.
11154 (target_supports_agent): New macro.
11155 * server.c (handle_general_set): Handle packet 'QAgent'.
11156 (handle_query): Send `QAgent+'.
11157 * Makefile.in (server.o): Depends on agent.h.
11158
11159 2012-03-03 Yao Qi <yao@codesourcery.com>
11160
11161 * Makefile.in (OBS): Add agent.o.
11162 Add new rule for agent.o.
11163 Track dependence of tracepoint.c on agent.h.
11164 * tracepoint.c (run_inferior_command_1):
11165 (run_inferior_command): Call agent_run_command.
11166 (gdb_ust_connect_sync_socket): Deleted. Move it to
11167 common/agent.c.
11168 (resume_thread, stop_thread): Likewise.
11169 (gdb_ust_socket_init): Renamed to ...
11170 (gdb_agent_socket_init): ... New.
11171 (gdb_ust_thread): Renamed to ...
11172 (gdb_agent_helper_thread): ... New.
11173 (gdb_ust_init): Move some code to ...
11174 (gdb_agent_init): ... here. New.
11175 [HAVE_UST]: Call gdb_ust_init.
11176 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11177 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11178 * config.in, configure: Regenerated.
11179
11180 2012-03-02 Pedro Alves <palves@redhat.com>
11181
11182 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11183 * linux-low.c (struct simple_pid_list): New.
11184 (stopped_pids): New a struct simple_pid_list pointer.
11185 (add_to_pid_list, pull_pid_from_list): New.
11186 (handle_extended_wait): Don't assume the first signal new children
11187 report is SIGSTOP. Adjust call to pull_pid_from_list.
11188 (linux_wait_for_lwp): Adjust.
11189
11190 2012-03-02 Yao Qi <yao@codesourcery.com>
11191
11192 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11193 debug log.
11194
11195 2012-03-02 Yao Qi <yao@codesourcery.com>
11196
11197 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11198 `stop_pc' and `tpoint'. Update caller.
11199
11200 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11201
11202 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11203 * linux-low.c (use_linux_regsets): New macro.
11204 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11205 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11206 (linux_register_in_regsets): New function.
11207 (usr_fetch_inferior_registers): Skip registers covered by
11208 regsets.
11209 (usr_store_inferior_registers): Likewise.
11210 (usr_fetch_inferior_registers): New macro.
11211 (usr_store_inferior_registers): Likewise.
11212 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11213 (linux_store_registers): Likewise.
11214 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11215 prototype.
11216 (init_registers_mips64_dsp_linux): Likewise.
11217 (init_registers_mips_linux): New macro.
11218 (init_registers_mips_dsp_linux): Likewise.
11219 (mips_dsp_num_regs): Likewise.
11220 (DSP_BASE, DSP_CONTROL): New fallback macros.
11221 (mips_base_regs): New macro.
11222 (mips_regmap): Use it. Fix the size.
11223 (mips_dsp_regmap): New variable.
11224 (mips_dsp_regset_bitmap): Likewise.
11225 (mips_arch_setup): New function.
11226 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11227 than mips_regmap.
11228 (mips_cannot_store_register): Likewise.
11229 (the_low_target): Update .arch_setup, .num_regs and .regmap
11230 initializers. Add .regset_bitmap initializer.
11231 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11232 initializer.
11233 * linux-bfin-low.c (the_low_target): Likewise.
11234 * linux-cris-low.c (the_low_target): Likewise.
11235 * linux-crisv32-low.c (the_low_target): Likewise.
11236 * linux-ia64-low.c (the_low_target): Likewise.
11237 * linux-m32r-low.c (the_low_target): Likewise.
11238 * linux-m68k-low.c (the_low_target): Likewise.
11239 * linux-ppc-low.c (the_low_target): Likewise.
11240 * linux-s390-low.c (the_low_target): Likewise.
11241 * linux-sh-low.c (the_low_target): Likewise.
11242 * linux-sparc-low.c (the_low_target): Likewise.
11243 * linux-tic6x-low.c (the_low_target): Likewise.
11244 * linux-x86-low.c (the_low_target): Likewise.
11245 * linux-xtensa-low.c (the_low_target): Likewise.
11246 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11247 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11248 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11249 srv_xmlfiles.
11250 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11251 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11252
11253 2012-02-29 Yao Qi <yao@codesourcery.com>
11254 Pedro Alves <palves@redhat.com>
11255
11256 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11257 `step_over_finished' is true.
11258
11259 2012-02-27 Pedro Alves <palves@redhat.com>
11260
11261 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11262 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11263
11264 2012-02-27 Pedro Alves <palves@redhat.com>
11265
11266 PR server/9684
11267 * linux-low.c (pid_is_stopped): New.
11268 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11269
11270 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11271
11272 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11273 of conditions.
11274
11275 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11276
11277 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11278
11279 2012-02-24 Luis Machado <lgustavo@codesourcery>
11280
11281 * server.c (handle_query): Advertise support for target-side
11282 breakpoint condition evaluation.
11283 (process_point_options): New function.
11284 (process_serial_event): When inserting a breakpoint, check for
11285 a target-side condition that should be evaluated.
11286
11287 * mem-break.c: Include regcache.h and ax.h.
11288 (point_cond_list_t): New data structure.
11289 (breakpoint) <cond_list>: New field.
11290 (find_gdb_breakpoint_at): Make non-static.
11291 (delete_gdb_breakpoint_at): Clear any target-side
11292 conditions.
11293 (clear_gdb_breakpoint_conditions): New function.
11294 (add_condition_to_breakpoint): Likewise.
11295 (add_breakpoint_condition): Likewise.
11296 (gdb_condition_true_at_breakpoint): Likewise.
11297 (gdb_breakpoint_here): Return result directly instead
11298 of going through a local variable.
11299
11300 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11301 (clear_gdb_breakpoint_conditions): Likewise.
11302 (add_breakpoint_condition): Likewise.
11303 (gdb_condition_true_at_breakpoint): Likewise.
11304
11305 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11306 (need_step_over_p): Take target-side breakpoint condition into
11307 consideration.
11308
11309 2012-02-24 Luis Machado <lgustavo@codesourcery>
11310
11311 * server.h: Include tracepoint.h.
11312 (agent_mem_read, agent_get_trace_state_variable_value,
11313 agent_set_trace_state_variable_value,
11314 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11315 get_set_tsv_func_addr): New prototypes.
11316
11317 * ax.h: New include file.
11318 * ax.c: New source file.
11319
11320 * tracepoint.c: Include ax.h.
11321 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11322 agent_expr, eval_result_type): Move to ax.h.
11323 (parse_agent_expr): Rename to ...
11324 (gdb_parse_agent_expr): ... this, make it non-static and move
11325 to ax.h.
11326 (unparse_agent_expr) Rename to ...
11327 (gdb_unparse_agent_expr): ... this, make it non-static and move
11328 to ax.h.
11329 (eval_agent_expr): Rename to ...
11330 (eval_tracepoint_agent_expr): ... this.
11331 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11332 forward declarations.
11333 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11334 (agent_get_trace_state_variable_value): New function.
11335 (agent_set_trace_state_variable_value): New function.
11336 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11337 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11338 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11339 (condition_true_at_tracepoint): Likewise.
11340 (parse_agent_expr): Rename to ...
11341 (gdb_parse_agent_expr): ... this and move to ax.c.
11342 (unparse_agent_expr): Rename to ...
11343 (gdb_unparse_agent_expr): ... this and move to ax.c.
11344 (gdb_agent_op_name): Move to ax.c.
11345 (eval_agent_expr): Rename to ...
11346 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11347 and move to ax.c.
11348 (eval_tracepoint_agent_expr): New function.
11349 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11350 non-static.
11351 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11352 ax.c.
11353 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11354 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11355 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11356 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11357 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11358 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11359 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11360 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11361 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11362 (compile_bytecodes): Remove forward declaration.
11363 (is_goto_target): Move to ax.c.
11364 (compile_bytecodes): Move to ax.c and call
11365 agent_get_trace_state_variable_value (...) and
11366 agent_set_trace_state_variable_value (...).
11367
11368 * Makefile.in: Update ax.c and IPA dependencies.
11369
11370 2012-02-24 Pedro Alves <palves@redhat.com>
11371
11372 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11373 (cmd_bigqtbuffer_circular): ... this. Only handle
11374 'QTBuffer:circular:'.
11375 (handle_tracepoint_general_set): Adjust.
11376
11377 2012-02-16 Yao Qi <yao@codesourcery.com>
11378
11379 * inferiors.c: Move code to ...
11380 * dll.c: .... here. New.
11381 * server.h: Declare clear_dlls.
11382 * Makefile.in (SFILES): Add dll.c.
11383 (OBS): Add dll.o
11384 (dll.o): New rule.
11385
11386 2012-02-11 Yao Qi <yao@codesourcery.com>
11387
11388 * server.c: (handle_monitor_command): Add a new parameter
11389 `own_buf'.
11390 (handle_query): Update caller.
11391
11392 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11393
11394 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11395 * configure, config.in: Regenerate.
11396 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11397 is not defined.
11398
11399 2012-02-02 Pedro Alves <palves@redhat.com>
11400
11401 Try SIGKILL first, then PTRACE_KILL.
11402 * linux-low.c (linux_kill_one_lwp): New.
11403 (linux_kill_one_lwp): Rename to ...
11404 (kill_one_lwp_callback): ... this. Use the new
11405 linux_kill_one_lwp.
11406
11407 2012-02-02 Pedro Alves <palves@redhat.com>
11408
11409 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11410 inferior.
11411
11412 2012-01-27 Pedro Alves <palves@redhat.com>
11413
11414 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11415 (elf_64_file_p): Make static.
11416 (linux_pid_exe_is_elf_64_file): New.
11417 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11418 Delete declarations.
11419 (linux_pid_exe_is_elf_64_file): Declare.
11420 * linux-x86-low.c (x86_arch_setup): Use
11421 linux_pid_exe_is_elf_64_file.
11422
11423 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11424
11425 * linux-low.c (linux_wait_for_event_1): Rename to ...
11426 (linux_wait_for_event): ... here and merge it with former
11427 linux_wait_for_event - new variable wait_ptid, use it.
11428 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11429
11430 2012-01-23 Pedro Alves <palves@redhat.com>
11431
11432 * server.c (main): Avoid yet another case of infinite loop while
11433 detaching/killing after a longjmp.
11434
11435 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11436
11437 Code cleanup.
11438 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11439
11440 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11441
11442 * hostio.c (handle_readlink): New function.
11443 (handle_vFile): Call it to handle "vFile:readlink" packets.
11444
11445 2012-01-20 Pedro Alves <palves@redhat.com>
11446 Ulrich Weigand <ulrich.weigand@linaro.org>
11447
11448 * server.c (handle_v_requests): Only support vAttach and vRun to
11449 start multiple processes when in extended protocol mode.
11450
11451 2012-01-17 Pedro Alves <palves@redhat.com>
11452
11453 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11454 memalign plus mprotect to allocate the scratch buffer.
11455
11456 2012-01-13 Pedro Alves <palves@redhat.com>
11457
11458 * server.c (attach_inferior): Clear `cont_thread'.
11459
11460 2012-01-13 Pedro Alves <palves@redhat.com>
11461
11462 * server.c (main): Avoid infinite loop while detaching/killing
11463 after a longjmp.
11464
11465 2012-01-09 Doug Evans <dje@google.com>
11466
11467 * server.c (start_inferior): Set last_ptid in --wrapper case.
11468
11469 2012-01-06 Yao Qi <yao@codesourcery.com>
11470
11471 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11472 defined.
11473 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11474
11475 2012-01-04 Yao Qi <yao@codesourcery.com>
11476
11477 * tracepoint.c (cmd_qtdp): Print debug message
11478 for static tracepoint.
11479
11480 2012-01-04 Yao Qi <yao@codesourcery.com>
11481
11482 * tracepoint.c (trace_vdebug): Differentiate debug message
11483 between gdbserver and IPA.
11484
11485 2012-01-03 Yao Qi <yao@codesourcery.com>
11486
11487 * tracepoint.c (tracepoint_was_hit): Don't collect for
11488 static tracepoint.
11489
11490 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11491
11492 * terminal.h: Reformat copyright header.
11493
11494 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11495
11496 * server.c (gdbserver_version): Update copyright year.
11497 * gdbreplay.c (gdbreplay_version): Likewise.
11498
11499 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11500
11501 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11502
11503 Revert:
11504 2011-12-18 Hui Zhu <teawater@gmail.com>
11505 * linux-low.c (linux_create_inferior): Save return value to ret.
11506
11507 2011-12-18 Hui Zhu <teawater@gmail.com>
11508
11509 * linux-low.c (linux_create_inferior): Save return value to ret.
11510
11511 2011-12-16 Doug Evans <dje@google.com>
11512
11513 * linux-low.c (linux_create_inferior): If stdio connection,
11514 redirect stdin from /dev/null, stdout to stderr.
11515 * remote-utils.c (remote_is_stdio): New static global.
11516 (remote_connection_is_stdio): New function.
11517 (remote_prepare): Handle stdio connection.
11518 (remote_open): Ditto.
11519 (remote_close): Don't close stdin for stdio connections.
11520 (read_prim,write_prim): New functions. Replace all calls to
11521 read/write to these.
11522 * server.c (main): Watch for "-" argument. Move call to
11523 remote_prepare before start_inferior.
11524 * server.h (STDIO_CONNECTION_NAME): New macro.
11525 (remote_connection_is_stdio): Declare.
11526
11527 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11528 in debugging output.
11529
11530 2011-12-15 Yao Qi <yao@codesourcery.com>
11531
11532 * tracepoint.c: Include sys/syscall.h.
11533 (gdb_ust_thread): Remove preprocessor conditional.
11534
11535 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11536
11537 * linux-low.c (linux_detach_one_lwp): Call
11538 the_low_target.prepare_to_resume before detaching.
11539
11540 2011-12-14 Yao Qi <yao@codesourcery.com>
11541
11542 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11543 of write.
11544
11545 2011-12-14 Yao Qi <yao@codesourcery.com>
11546
11547 * i386-low.c (i386_low_stopped_data_address): Initialize local
11548 variable `control'.
11549
11550 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11551
11552 PR remote/13492
11553
11554 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11555 DR_CONTROL unless necessary. Extend comments.
11556 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11557 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11558
11559 2011-12-13 Yao Qi <yao@codesourcery.com>
11560
11561 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11562 macros.
11563 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11564
11565 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11566
11567 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11568 Print new debug message for such case.
11569
11570 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11571
11572 Fix overlapping memcpy.
11573 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11574 the read_inferior_memory transfer.
11575 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11576 write_inferior_memory transfer.
11577 (set_fast_tracepoint_jump): New variable buf. Use it for the
11578 read_inferior_memory and write_inferior_memory transfers.
11579 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11580 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11581 Use it for the write_inferior_memory transfer.
11582 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11583 buffers.
11584
11585 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11586
11587 * linux-low.c (fetch_register, store_register): Make code
11588 consistent, fix formatting.
11589
11590 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11591
11592 * linux-low.c (usr_store_inferior_registers): Factor out code
11593 to handle individual registers into...
11594 (store_register): ... this new function.
11595
11596 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11597
11598 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11599 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11600 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11601 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11602 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11603 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11604 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11605 (srv_xmlfiles): Add new XML files.
11606
11607 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11608 and <sys/uio.h>.
11609 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11610 (init_registers_s390_linux32v1): Add prototype.
11611 (init_registers_s390_linux32v2): Likewise.
11612 (init_registers_s390_linux64v1): Likewise.
11613 (init_registers_s390_linux64v2): Likewise.
11614 (init_registers_s390x_linux64v1): Likewise.
11615 (init_registers_s390x_linux64v2): Likewise.
11616 (s390_num_regs): Increment to 52.
11617 (s390_regmap): Add orig_r2 register.
11618 (s390_num_regs_3264): Increment to 68.
11619 (s390_regmap_3264): Add orig_r2 register.
11620 (s390_collect_ptrace_register): Handle orig_r2 register.
11621 (s390_supply_ptrace_register): Likewise.
11622 (s390_fill_last_break): New function.
11623 (s390_store_last_break): Likewise.
11624 (s390_fill_system_call): New function.
11625 (s390_store_system_call): Likewise.
11626 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11627 register sets.
11628 (s390_check_regset): New function.
11629 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11630 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11631 Update target_regsets for available register sets.
11632
11633 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11634 Jan Kratochvil <jan.kratochvil@redhat.com>
11635
11636 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11637 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11638 New.
11639 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11640 * linux-low.h (struct process_info_private): New member r_debug.
11641 * server.c (handle_qxfer_libraries): Call
11642 the_target->qxfer_libraries_svr4.
11643 (handle_qxfer_libraries_svr4): New function.
11644 (qxfer_packets): New entry "libraries-svr4".
11645 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11646 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11647 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11648 PACKET_qXfer_libraries_svr4.
11649
11650 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11651
11652 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11653 PSW address/mask between 8-byte and 16-byte formats.
11654 (s390_supply_ptrace_register): Likewise.
11655 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11656 basic addressing mode bit.
11657
11658 2011-11-24 Stan Shebs <stan@codesourcery.com>
11659
11660 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11661
11662 2011-11-17 Stan Shebs <stan@codesourcery.com>
11663
11664 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11665 (tracing_start_time): New global.
11666 (tracing_stop_time): New global.
11667 (tracing_user_name): New global.
11668 (tracing_notes): New global.
11669 (tracing_stop_note): New global.
11670 (cmd_qtstart): Set traceframe_usage, start_time.
11671 (stop_tracing): Set stop_time.
11672 (cmd_qtstatus): Report additional status.
11673 (cmd_qtp): New function.
11674 (handle_tracepoint_query): Call it.
11675 (cmd_qtnotes): New function.
11676 (handle_tracepoint_general_set): Call it.
11677 (get_timestamp): Rename from tsv_get_timestamp.
11678
11679 2011-11-14 Stan Shebs <stan@codesourcery.com>
11680 Kwok Cheung Yeung <kcy@codesourcery.com>
11681
11682 * linux-x86-low.c (small_jump_insn): New.
11683 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11684 trampoline and error message, build a trampoline and issue a small
11685 jump instruction to it.
11686 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11687 trampoline and error message.
11688 (x86_get_min_fast_tracepoint_insn_len): New.
11689 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11690 * linux-low.h (struct linux_target_ops): Add arguments to
11691 install_fast_tracepoint_jump_pad operation, add new operation.
11692 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11693 arguments.
11694 (linux_get_min_fast_tracepoint_insn_len): New function.
11695 (linux_target_op): Add new operation.
11696 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11697 (gdb_trampoline_buffer_end): Ditto.
11698 (gdb_trampoline_buffer_error): Ditto.
11699 (struct ipa_sym_addresses): Add fields for new IPA variables.
11700 (symbol_list): Add entries for new IPA variables.
11701 (struct tracepoint): Add fields to hold the address range of the
11702 trampoline used by the tracepoint.
11703 (trampoline_buffer_head): New static variable.
11704 (trampoline_buffer_tail): Ditto.
11705 (claim_trampoline_space): New function.
11706 (have_fast_tracepoint_trampoline_buffer): New function.
11707 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11708 structure.
11709 (install_fast_tracepoint): Ditto, also add error buffer argument.
11710 (cmd_qtminftpilen): New function.
11711 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11712 (fast_tracepoint_from_trampoline_address): New function.
11713 (fast_tracepoint_collecting): Handle trampoline as part of jump
11714 pad space.
11715 (set_trampoline_buffer_space): New function.
11716 (initialize_tracepoint): Initialize new IPA variables.
11717 * target.h (struct target_ops): Add arguments to
11718 install_fast_tracepoint_jump_pad operation, add new
11719 get_min_fast_tracepoint_insn_len operation.
11720 (target_get_min_fast_tracepoint_insn_len): New.
11721 (install_fast_tracepoint_jump_pad): Add arguments.
11722 * server.h (IPA_BUFSIZ): Define.
11723 * linux-i386-ipa.c: Include extra header files.
11724 (initialize_fast_tracepoint_trampoline_buffer): New function.
11725 (initialize_low_tracepoint): Call it.
11726 * server.h (set_trampoline_buffer_space): Declare.
11727 (claim_trampoline_space): Ditto.
11728 (have_fast_tracepoint_trampoline_buffer): Ditto.
11729
11730 2011-11-14 Yao Qi <yao@codesourcery.com>
11731
11732 * server.c (handle_query): Handle InstallInTrace for qSupported.
11733 * tracepoint.c (add_tracepoint): Sort list.
11734 (install_tracepoint, download_tracepoint): New.
11735 (cmd_qtdp): Call them to install and download tracepoints.
11736 (sort_tracepoints): Removed.
11737 (cmd_qtstart): Update.
11738
11739 2011-11-14 Yao Qi <yao@codesourcery.com>
11740
11741 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11742 * mem-break.h: Declare.
11743 * tracepoint.c (cmd_qtstart): Move some code to ...
11744 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11745 New.
11746 (download_tracepoints): Move some code to ...
11747 (download_tracepoint_1): ... here. New.
11748
11749 2011-11-08 Yao Qi <yao@codesourcery.com>
11750
11751 * remote-utils.c (relocate_instruction): A comment fix.
11752
11753 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11754
11755 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11756 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11757 dr_status_mirror and dr_control_mirror from debug_reg_state.
11758 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11759 (i386_initial_stuff): Remove use of deleted globals.
11760 (i386_get_thread_context, i386_set_thread_context,
11761 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11762 from debug_reg_state.
11763
11764 2011-11-05 Yao Qi <yao@codesourcery.com>
11765
11766 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11767 address as TPOINT's.
11768
11769 2011-11-02 Stan Shebs <stan@codesourcery.com>
11770
11771 * tracepoint.c (agent_mem_read_string): New function.
11772 (eval_agent_expr): Call it for tracenz.
11773 * server.c (handle_query): Report support for tracenz.
11774
11775 2011-11-02 Yao Qi <yao@codesourcery.com>
11776
11777 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11778
11779 2011-11-02 Yao Qi <yao@codesourcery.com>
11780
11781 * target.h: Fix a typo in comment.
11782
11783 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11784
11785 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11786 clobber the breakpoints' shadows with fast tracepoint jumps.
11787 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11788 * target.c (write_inferior_memory): Also pass MYADDR down to
11789 check_mem_write.
11790
11791 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11792
11793 * configure.ac: Check support for personality routine.
11794 * configure: Regenerate.
11795 * config.in: Likewise.
11796 * linux-low.c: Include <sys/personality.h>.
11797 Define ADDR_NO_RANDOMIZE if necessary.
11798 (linux_create_inferior): Disable address space randomization when
11799 forking inferior, if requested.
11800 (linux_supports_disable_randomization): New function.
11801 (linux_target_ops): Install it.
11802 * server.h (disable_randomization): Declare.
11803 * server.c (disable_randomization): New global variable.
11804 (handle_general_set): Handle QDisableRandomization.
11805 (handle_query): Likewise for qSupported.
11806 (main): Support --disable-randomization and --no-disable-randomization
11807 command line arguments.
11808 * target.h (struct target_ops): Add supports_disable_randomization.
11809 (target_supports_disable_randomization): New macro.
11810
11811 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11812
11813 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11814 ifdef check.
11815 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11816 [!PT_GETDSBT] (target_loadmap): New definition.
11817 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11818 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11819 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11820 and PT_GETDSBT to LINUX_LOADMAP.
11821 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11822 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11823
11824 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11825
11826 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11827 (arm_linux_hwbp_cap): New static variable.
11828 (arm_linux_get_hwbp_cap): Replace by ...
11829 (arm_linux_init_hwbp_cap): ... this new function.
11830 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11831 (arm_linux_get_hw_watchpoint_count): Likewise.
11832 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11833 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11834 (arm_prepare_to_resume): Use perror_with_name instead of error.
11835
11836 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11837
11838 * linux-arm-low.c: Include <signal.h>.
11839 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11840 (struct arm_linux_hwbp_cap): New data type.
11841 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11842 (struct arm_linux_hw_breakpoint): New data type.
11843 (MAX_BPTS, MAX_WPTS): Define.
11844 (struct arch_process_info, struct arch_lwp_info): New data types.
11845 (arm_linux_get_hwbp_cap): New function.
11846 (arm_linux_get_hw_breakpoint_count): Likewise.
11847 (arm_linux_get_hw_watchpoint_count): Likewise.
11848 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11849 (arm_hwbp_control_initialize): Likewise.
11850 (arm_hwbp_control_is_enabled): Likewise.
11851 (arm_hwbp_control_is_initialized): Likewise.
11852 (arm_hwbp_control_disable): Likewise.
11853 (arm_linux_hw_breakpoint_equal): Likewise.
11854 (arm_linux_hw_point_initialize): Likewise.
11855 (struct update_registers_data): New data structure.
11856 (update_registers_callback: New function.
11857 (arm_insert_point): Likewise.
11858 (arm_remove_point): Likewise.
11859 (arm_stopped_by_watchpoint): Likewise.
11860 (arm_stopped_data_address): Likewise.
11861 (arm_new_process): Likewise.
11862 (arm_new_thread): Likewise.
11863 (arm_prepare_to_resume): Likewise.
11864 (the_low_target): Register arm_insert_point, arm_remove_point,
11865 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11866 arm_new_thread, and arm_prepare_to_resume.
11867
11868 2011-09-15 Stan Shebs <stan@codesourcery.com>
11869
11870 * server.h (struct emit_ops): Add compare-goto fields.
11871 * tracepoint.c (gdb_agent_op_sizes): New table.
11872 (emit_eq_goto): New function.
11873 (emit_ne_goto): New function.
11874 (emit_lt_goto): New function.
11875 (emit_le_goto): New function.
11876 (emit_gt_goto): New function.
11877 (emit_ge_goto): New function.
11878 (is_goto_target): New function.
11879 (compile_bytecodes): Recognize special cases of compare-goto
11880 combinations and call specialized emitters for them.
11881 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11882 (amd64_emit_ne_goto): New function.
11883 (amd64_emit_lt_goto): New function.
11884 (amd64_emit_le_goto): New function.
11885 (amd64_emit_gt_goto): New function.
11886 (amd64_emit_ge_goto): New function.
11887 (amd64_emit_ops): Add the new functions.
11888 (i386_emit_eq_goto): New function.
11889 (i386_emit_ne_goto): New function.
11890 (i386_emit_lt_goto): New function.
11891 (i386_emit_le_goto): New function.
11892 (i386_emit_gt_goto): New function.
11893 (i386_emit_ge_goto): New function.
11894 (i386_emit_ops): Add the new functions.
11895
11896 2011-09-08 Stan Shebs <stan@codesourcery.com>
11897
11898 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11899 (i386_emit_epilogue): Restore %ebx.
11900
11901 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11902
11903 * server.c (step_thread): Remove definition.
11904 (process_serial_event): Don't handle Hs.
11905 * server.h (step_thread): Remove declaration.
11906 * target.c (set_desired_inferior): Remove use of step_thread.
11907
11908 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11909
11910 * linux-low.c: Include linux-procfs.h.
11911 (linux_attach_lwp_1): Update comments.
11912 (linux_attach): Scan for existing threads when attaching to a
11913 process that is the tgid.
11914 * Makefile.in: Update dependencies.
11915
11916 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11917
11918 * configure.srv: Add linux-procfs.o dependencies.
11919
11920 2011-08-14 Yao Qi <yao@codesourcery.com>
11921
11922 * target.h (struct target_ops): Fix indent.
11923 * win32-low.c (win32_target_ops): Fix comment.
11924
11925 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11926 Yao Qi <yao@codesourcery.com>
11927
11928 * Makefile.in (clean): Remove tic6x-*.c files.
11929 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11930 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11931 (tic6x-c64xp-linux.c): Likewise.
11932 * configure.srv: Add support for tic6x-*-uclinux.
11933 * linux-tic6x-low.c: New.
11934 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11935
11936 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11937 Yao Qi <yao@codesourcery.com>
11938
11939 * target.h (struct target_ops): Add read_loadmap.
11940 * linux-low.c (struct target_loadseg): New type.
11941 (struct target_loadmap): New type.
11942 (linux_read_loadmap): New function.
11943 (linux_target_ops): Add linux_read_loadmap.
11944 * server.c (handle_query): Support qXfer:fdpic:read packet.
11945 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11946 to NULL.
11947
11948 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11949
11950 * win32-low.c: Include <stdint.h>.
11951
11952 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11953
11954 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11955 to the inferior here.
11956 (i386_remove_aligned_watchpoint): Ditto.
11957 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11958 fit part of the watchpoint in the debug registers.
11959 (i386_update_inferior_debug_regs): New.
11960 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11961 registers, and only update the inferior on success.
11962 (i386_low_remove_watchpoint): Ditto.
11963
11964 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11965
11966 * linux-low.c (compare_ints, unique, list_threads, show_process,
11967 linux_core_of_thread): Delete.
11968 (linux_target_ops): Change linux_core_of_thread to
11969 linux_common_core_of_thread.
11970 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11971 * utils.c (malloc_failure): Change type of argument.
11972 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11973 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11974 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11975 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11976 (IPA_OBJS): Add common-utils-ipa.o.
11977 (ptid_h, linux_osdata_h): New macros.
11978 (server_h): Add common/common-utils.h, common/xml-utils.h,
11979 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11980 common/ptid.h.
11981 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11982 ptid.o, buffer.o): New rules.
11983 (linux-low.o): Add common/linux-osdata.h as a dependency.
11984 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11985 * configure.ac: Add AC_HEADER_DIRENT check.
11986 * config.in: Regenerate.
11987 * configure: Regenerate.
11988 * remote-utils.c (xml_escape_text): Delete.
11989 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11990 buffer_xml_printf): Move to common/buffer.c.
11991 * server.c (main): Remove call to initialize_inferiors.
11992 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11993 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11994 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11995 internal_error, gdb_assert, gdb_assert_fail): Delete.
11996 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11997 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11998 common/buffer.h.
11999 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12000 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12001 initialize_inferiors): Delete.
12002
12003 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12004
12005 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12006 symbol error.
12007
12008 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12009
12010 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12011 assertion.
12012 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12013
12014 2011-05-26 Yao Qi <yao@codesourcery.com>
12015
12016 * Makefile.in (thread-db.o): Track dependence to
12017 common/gdb_thread_db.h.
12018 * thread-db.c: include gdb_thread_db.h from right place.
12019
12020 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12021
12022 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12023 __FILE__ and __LINE__ to internal_error.
12024
12025 2011-05-13 Doug Evans <dje@google.com>
12026
12027 * thread-db.c (try_thread_db_load_from_sdir): New function.
12028 (try_thread_db_load_from_dir): New function.
12029 (thread_db_load_search): Handle $sdir, ignore $pdir.
12030 Remove trying of system directories if search of
12031 libthread-db-search-path fails, that is now done via $sdir.
12032
12033 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12034
12035 * server.c (handle_query): Add EnableDisableTracepoints to the list
12036 of supported features.
12037 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12038 tracepoints.
12039 (cmd_qtenable_disable): New.
12040 (cmd_qtstart): Install tracepoints even if disabled.
12041 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12042 receiving a QTEnable or QTDisable packet.
12043 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12044 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12045 tracepoints.
12046 (gdb_probe): Skip data collection if static tracepoint is disabled.
12047
12048 2011-05-10 Doug Evans <dje@google.com>
12049
12050 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12051
12052 2011-05-04 Doug Evans <dje@google.com>
12053
12054 * linux-low.c (linux_join): Skip process lookup.
12055 * spu-low.c (spu_join): Ditto.
12056 * server.c (join_inferiors_callback): Delete.
12057 (process_serial_event): For 'D' packet (detach) call join_inferior
12058 directly.
12059
12060 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12061
12062 * README: Don't mention xscale*-*-linux*.
12063 * configure.srv (xscale*-*-linux*): Don't handle target.
12064
12065 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12066
12067 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12068 casting pointers.
12069 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12070 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12071 (i386_emit_void_call_2): Likewise.
12072
12073 2011-04-26 Yao Qi <yao@codesourcery.com>
12074
12075 * linux-low.c: Move common macros to linux-ptrace.h.
12076 Include linux-ptrace.h.
12077 * Makefile.in (linux_ptrace_h): New.
12078 (linux-low.o): Depends on linux-ptrace.h.
12079
12080 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12081
12082 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12083 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12084 (remote_prepare): New function with most of the TCP code from ...
12085 (remote_open): ... here. Detect PORT here unconditionally. Move also
12086 setting transport_is_reliable.
12087 * server.c (run_once): New variable.
12088 (gdbserver_usage): Document it.
12089 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12090 the first run if RUN_ONCE.
12091 * server.h (run_once, remote_prepare): New declarations.
12092
12093 2011-04-19 Tom Tromey <tromey@redhat.com>
12094
12095 * win32-low.c (handle_load_dll): Remove duplicate "the".
12096
12097 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12098
12099 Remove support for old Cygwin 1.5 versions.
12100 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12101 function to avoid warning.
12102 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12103 warning.
12104
12105 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12106
12107 * gdbserver/server.h (Macro _): Define it if not available.
12108
12109 2011-03-14 Michael Snyder <msnyder@vmware.com>
12110
12111 * hostio.c (handle_close): Remove unnecessary null test.
12112
12113 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12114
12115 * Makefile.in (maintainer-clean realclean distclean): Remove
12116 "make ... subdir_do" command.
12117
12118 2011-03-10 Michael Snyder <msnyder@vmware.com>
12119
12120 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12121
12122 * server.c (handle_v_run): Free alloced buffer on early return.
12123
12124 2011-03-09 Yao Qi <yao@codesourcery.com>
12125
12126 Revert:
12127 2011-03-04 Yao Qi <yao@codesourcery.com>
12128
12129 * Makefile.in: Remove GNU make feature --directory.
12130
12131 2011-03-05 Yao Qi <yao@codesourcery.com>
12132
12133 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12134 (subdir_do): New make target. Copied from gdb/Makefile.
12135 (maintainer-clean, realclean, distclean, clean): Call corresponding
12136 make targets in common/Makefile.
12137
12138 2011-02-11 Yao Qi <yao@codesourcery.com>
12139
12140 * configure.ac: Call AC_PROG_RANLIB.
12141 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12142 * configure: Regenerate.
12143
12144 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12145
12146 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12147
12148 2011-03-06 Yao Qi <yao@codesourcery.com>
12149
12150 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12151
12152 2011-03-05 Yao Qi <yao@codesourcery.com>
12153
12154 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12155 (subdir_do): New make target. Copied from gdb/Makefile.
12156 (maintainer-clean, realclean, distclean, clean): Call corresponding
12157 make targets in common/Makefile.
12158
12159 2011-03-04 Yao Qi <yao@codesourcery.com>
12160
12161 * Makefile.in: Remove GNU make feature --directory.
12162
12163 2011-03-04 Michael Snyder <msnyder@vmware.com>
12164
12165 * server.c (queue_stop_reply): Call xmalloc not malloc.
12166
12167 2011-03-02 Michael Snyder <msnyder@vmware.com>
12168
12169 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12170
12171 2011-02-28 Michael Snyder <msnyder@vmware.com>
12172
12173 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12174 (cmd_qtframe): Ditto.
12175 (cmd_qtbuffer): Ditto.
12176 (cmd_bigqtbuffer): Ditto.
12177
12178 * utils.c (decimal2str): Initialize 'width' to nine, then
12179 don't mess with it.
12180
12181 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12182
12183 * hostio.c (require_data): Free *data, not data.
12184
12185 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12186
12187 * hostio.c (require_data): Use free, not xfree.
12188
12189 2011-02-27 Michael Snyder <msnyder@vmware.com>
12190
12191 * server.c (handle_query): Discard unused value.
12192
12193 * hostio.c (require_data): Free malloc memory before returning
12194 error.
12195
12196 2011-02-26 Michael Snyder <msnyder@vmware.com>
12197
12198 * linux-low.c (list_threads): Call closedir for dirent.
12199
12200 2011-02-27 Michael Snyder <msnyder@vmware.com>
12201
12202 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12203 a case statement falls through.
12204
12205 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12206
12207 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12208 in comparison.
12209
12210 2011-02-26 Michael Snyder <msnyder@vmware.com>
12211
12212 * utils.c (decimal2str): Eliminate dead code and dead param.
12213 (pulongest): Drop dead param from call to decimal2str.
12214 (plongest): Ditto.
12215
12216 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12217
12218 Revert the following patch (not approved yet):
12219 2011-02-21 Hui Zhu <teawater@gmail.com>
12220 * tracepoint.c (tp_printf): New function.
12221 (eval_agent_expr): Handle gdb_agent_op_printf.
12222
12223 2011-02-21 Hui Zhu <teawater@gmail.com>
12224
12225 * tracepoint.c (tp_printf): New function.
12226 (eval_agent_expr): Handle gdb_agent_op_printf.
12227
12228 2011-02-18 Tom Tromey <tromey@redhat.com>
12229
12230 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12231 (tracepoint.o): Likewise.
12232 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12233 (gdb_agent_op_names): Likewise.
12234
12235 2011-02-18 Tom Tromey <tromey@redhat.com>
12236
12237 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12238 gdb_agent_op_rot>: New constants.
12239 (gdb_agent_op_names): Add pick and roll.
12240 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12241 cases.
12242
12243 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12244
12245 * aclocal.m4: Regenerated with aclocal-1.11.1.
12246
12247 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12248
12249 * server.c (handle_qxfer_traceframe_info): New.
12250 (qxfer_packets): Register "traceframe-info".
12251 (handle_query): Report support for qXfer:traceframe-info:read+.
12252 * tracepoint.c (match_blocktype): New.
12253 (traceframe_find_block_type): Rename to ...
12254 (traceframe_walk_blocks): ... this. Add callback filter argument,
12255 and use it.
12256 (traceframe_find_block_type): New, reimplemented on top of
12257 traceframe_walk_blocks.
12258 (build_traceframe_info_xml): New.
12259 (traceframe_read_info): New.
12260 * server.h (traceframe_read_info): Declare.
12261
12262 2011-02-11 Yao Qi <yao@codesourcery.com>
12263
12264 * configure.ac: Call AC_PROG_RANLIB.
12265 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12266 * configure: Regenerate.
12267
12268 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12269
12270 * server.c (gdb_read_memory): Change return semantics to allow
12271 partial transfers.
12272 (handle_search_memory_1): Adjust.
12273 (process_serial_event) <'m' packet>: Handle partial transfers.
12274 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12275
12276 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12277
12278 * regcache.c (init_register_cache): Initialize
12279 regcache->register_status.
12280 (free_register_cache): Release regcache->register_status.
12281 (regcache_cpy): Copy register_status.
12282 (registers_to_string): Print 'x's for unavailable registers.
12283 (supply_register): Mark the register's status valid or
12284 unavailable, depending on whether a buffer was passed in or not.
12285 (supply_register_zeroed): New.
12286 (supply_regblock): Mark the registers' status valid or
12287 unavailable, depending on whether a buffer was passed in or not.
12288 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12289 (struct regcache): New `register_status' field.
12290 (supply_register_zeroed): Declare.
12291 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12292 supply_register_zeroed, rather than passing a NULL buffer to
12293 supply_register.
12294 * tracepoint.c (fetch_traceframe_registers): Update comment.
12295
12296 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12297
12298 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12299 buffer explicit.
12300
12301 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12302
12303 * server.h (decode_xfer_write): Change prototype.
12304 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12305 and don't extract the annex here.
12306 * server.c (decode_xfer_read): Remove `annex' parameter,
12307 and don't extract the annex here.
12308 (decode_xfer): New.
12309 (struct qxfer): New.
12310 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12311 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12312 (handle_qxfer_statictrace): New functions, abstracted out from
12313 handle_query, and made to use the struct qxfer interface.
12314 (handle_threads_qxfer_proper): Rename to ...
12315 (handle_qxfer_threads_proper): ... this.
12316 (handle_threads_qxfer): Rename to ...
12317 (handle_qxfer_threads): ... this. Adjust.
12318 (qxfer_packets): New array.
12319 (handle_qxfer): New function.
12320 (handle_query): Use handle_qxfer.
12321
12322 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12323
12324 * gdbreplay.c: Shorten lines of >= 80 columns.
12325 * linux-low.c: Ditto.
12326 * linux-ppc-low.c: Ditto.
12327 * linux-s390-low.c: Ditto.
12328 * linux-sparc-low.c: Ditto.
12329 * linux-x86-low.c: Ditto.
12330 * linux-xtensa-low.c: Ditto.
12331 * mem-break.c: Ditto.
12332 * nto-low.c: Ditto.
12333 * regcache.h: Ditto.
12334 * remote-utils.c: Ditto.
12335 * server.c: Ditto.
12336 * server.h: Ditto.
12337 * thread-db.c: Ditto.
12338 * tracepoint.c: Ditto.
12339 * utils.c: Ditto.
12340 * win32-low.h: Ditto.
12341
12342 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12343
12344 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12345 update.
12346
12347 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12348
12349 * server.c (gdbserver_version): Update copyright year in version
12350 output.
12351 * gdbreplay.c (gdbreplay_version): Ditto.
12352
12353 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12354
12355 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12356 * linux-bfin-low.c: New file.
12357 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12358 PT_DATA_ADDR for BFIN targets.
12359 * Makefile.in (SFILES): Add linux-bfin-low.c.
12360 (clean): Remove reg-bfin.c.
12361 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12362 * README: Mention supported Blackfin targets.
12363
12364 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12365
12366 * .gitignore: New file.
12367
12368 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12369
12370 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12371
12372 2010-10-22 Jie Zhang <jie@codesourcery.com>
12373
12374 * Makefile.in: Add FLAGS_TO_PASS variable.
12375 (install): Remove dependency of install-only and recursively
12376 invoke make for install-only.
12377
12378 2010-10-04 Doug Evans <dje@google.com>
12379
12380 * Makefile.in (uninstall): Use $(DESTDIR).
12381
12382 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12383
12384 PR gdb/11842
12385
12386 * linux-x86-low.c (compat_siginfo_from_siginfo)
12387 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12388 si_code is < 0. Check for si_code == SI_TIMER before checking for
12389 si_code < 0.
12390
12391 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12392
12393 * lynx-i386-low.c: New file.
12394 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12395
12396 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12397
12398 * lynx-low.c (ptrace_request_to_str): Remove handling for
12399 request values that have been removed in LynxOS 5.x.
12400
12401 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12402
12403 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12404 <ptrace.h>
12405
12406 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12407
12408 * configure.ac: Add --enable-inprocess-agent option.
12409 * configure: Rebuilt.
12410
12411 2010-09-06 Yao Qi <yao@codesourcery.com>
12412
12413 * linux-low.c (linux_kill): Remove unused variable.
12414 (linux_stabilize_threads): Likewise.
12415 * server.c (start_inferior): Likewise.
12416 (queue_stop_reply_callback): Likewise.
12417 * tracepoint.c (do_action_at_tracepoint): Likewise.
12418
12419 2010-09-06 Yao Qi <yao@codesourcery.com>
12420
12421 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12422 on return.
12423
12424 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12425
12426 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12427
12428 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12429
12430 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12431 "$(IPA_DEPFILES)".
12432
12433 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12434
12435 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12436 gdbserver/lynx-ppc-low.c: New files.
12437 * Makefile.in (lynx_low_h): New variable.
12438 (lynx-low.o, lynx-ppc-low.o): New rules.
12439 * configure.ac: On LynxOS, link with -lnetinet.
12440 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12441 * configure: regenerate.
12442
12443 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12444
12445 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12446 * configure.ac: Add check for vasprintf and vsnprintf.
12447 * configure, config.in: Regenerate.
12448 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12449
12450 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12451
12452 * gdbreplay.c: Move include of alloca.h up, next to include of
12453 malloc.h.
12454 * server.h: Add include of malloc.h.
12455 * mem-break.c: Remove include of malloc.h.
12456 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12457
12458 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12459
12460 * Makefile.in (memmem.o): Build with -Wno-error.
12461
12462 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12463
12464 * utils.c (xsnprintf): Make non-static.
12465 * server.h: Add xsnprintf declaration.
12466 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12467 replace calls to snprintf by calls to xsnprintf throughout.
12468
12469 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12470
12471 * configure.ac: Add configure check for alloca.
12472 * configure, config.in: Regenerate.
12473 * server.h: Include alloca.h if it exists.
12474 * gdbreplay.c: Include alloca.h if it exists.
12475
12476 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12477
12478 * linux-low.c (__SIGRTMIN): Define if not already defined.
12479 (linux_create_inferior): Check for __ANDROID__ rather than
12480 __SIGRTMIN.
12481 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12482 are already deferred.
12483 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12484 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12485 stopped and already has a pending signal to report.
12486 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12487 a pending signal to report or is moving out of a jump pad.
12488 (linux_init_signals): Check for __ANDROID__ rather than
12489 __SIGRTMIN.
12490
12491 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12492
12493 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12494 debug_threads check. Avoid a linear search when not doing debug
12495 output.
12496
12497 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12498
12499 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12500 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12501 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12502 (process_event): Change local fd's type to gdb_fildes_t.
12503 (create_file_handler): Adjust prototype.
12504 (delete_file_handler): Adjust prototype.
12505 (handle_file_event): Adjust prototype. Use pfildes.
12506 (create_file_event): Adjsut prototype.
12507 * remote-utils.c (remote_desc, listen_desc): Change type to
12508 gdb_fildes_t.
12509 * server.h: New gdb_fildes_t typedef.
12510 [USE_WIN32API]: Include winsock2.h.
12511 (delete_file_handler, add_file_handler): Adjust prototypes.
12512 (pfildes): Declare.
12513 * utils.c (pfildes): New.
12514
12515 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12516
12517 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12518 * configure: Regenerate.
12519
12520 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12521
12522 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12523 (linux_done_accessing_memory): ... this.
12524 (linux_target_ops): Adjust.
12525 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12526 * nto-low.c (nto_target_ops): Adjust comment.
12527 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12528 * spu-low.c (spu_target_ops): Adjust comment.
12529 * target.h (target_ops): Rename unprepare_to_access_memory field
12530 to done_accessing_memory.
12531 (unprepare_to_access_memory): Rename to ...
12532 (done_accessing_memory): ... this.
12533
12534 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12535
12536 * linux-low.c (linux_prepare_to_access_memory): New.
12537 (linux_unprepare_to_access_memory): New.
12538 (linux_target_ops): Install them.
12539 * server.c (read_memory): Rename to ...
12540 (gdb_read_memory): ... this. Use
12541 prepare_to_access_memory/prepare_to_access_memory.
12542 (write_memory): Rename to ...
12543 (gdb_write_memory): ... this. Use
12544 prepare_to_access_memory/prepare_to_access_memory.
12545 (handle_search_memory_1): Adjust.
12546 (process_serial_event): Adjust.
12547 * target.h (struct target_ops): New fields
12548 prepare_to_access_memory and unprepare_to_access_memory.
12549 (prepare_to_access_memory, unprepare_to_access_memory): New.
12550 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12551 prepare_to_access_memory/prepare_to_access_memory.
12552 * nto-low.c (nto_target_ops): Adjust.
12553 * spu-low.c (spu_target_ops): Adjust.
12554 * win32-low.c (win32_target_ops): Adjust.
12555
12556 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12557
12558 * Makefile.in (WARN_CFLAGS): Get it from configure.
12559 (WERROR_CFLAGS): New.
12560 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12561 * configure.ac: Introduce --enable-werror, which adds -Werror to
12562 the compiler command line. Enabled by default. Disable with
12563 --disable-werror. Add -Wdeclaration-after-statement
12564 Wpointer-arith and -Wformat-nonliteral to warning flags.
12565 * configure: Regenerate.
12566
12567 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12568
12569 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12570
12571 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12572
12573 * gdbreplay.c (remote_error): New.
12574 (gdbchar): New.
12575 (expect): Use gdbchar. Check for error reading from GDB.
12576 Clarify sync error output.
12577 (play): Check for errors writing to GDB.
12578 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12579 * remote-utils.c (getpkt): Check for errors writing to the remote
12580 descriptor.
12581
12582 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12583
12584 * linux-low.c (linux_wait_1): Move non-debugging code out of
12585 `debug_threads' control.
12586
12587 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12588
12589 * linux-low.c (linux_wait_1): Don't set last_status here.
12590 * server.c (push_event, queue_stop_reply_callback): Assert we're
12591 not pushing a TARGET_WAITKIND_IGNORE event.
12592 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12593 (myresume, handle_target_event): Set the thread's last_resume_kind
12594 and last_status from the target returned status.
12595
12596 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12597
12598 PR threads/10729
12599
12600 * linux-x86-low.c (update_debug_registers_callback): New.
12601 (i386_dr_low_set_addr): Use it.
12602 (i386_dr_low_get_addr): New.
12603 (i386_dr_low_set_control): Use update_debug_registers_callback.
12604 (i386_dr_low_get_control): New.
12605 (i386_dr_low_get_status): Adjust.
12606 * linux-low.c (linux_stop_lwp): New.
12607 * linux-low.h (linux_stop_lwp): Declare.
12608
12609 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12610 argument instead of a i386_debug_reg_state.
12611 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12612 a i386_debug_reg_state.
12613 (i386_insert_aligned_watchpoint): Adjust.
12614 (i386_remove_aligned_watchpoint): Adjust.
12615 (i386_low_stopped_data_address): Read the debug registers from the
12616 inferior instead of from the mirrors.
12617 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12618 (i386_dr_low_get_addr): Declare.
12619 (i386_dr_low_get_control): Declare.
12620 (i386_dr_low_get_status): Change prototype.
12621
12622 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12623 (i386_dr_low_get_addr): New.
12624 (i386_dr_low_get_control): New.
12625 (i386_dr_low_get_status): Adjust prototype. Return
12626 dr_status_mirror.
12627 (i386_initial_stuff): Clear dr_status_mirror and
12628 dr_control_mirror.
12629 (i386_get_thread_context): Adjust.
12630 (i386_set_thread_context): Adjust.
12631 (i386_thread_added): Adjust.
12632
12633 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12634
12635 * linux-low.h (linux_thread_area): Delete declaration.
12636
12637 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12638
12639 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12640 after its termination.
12641
12642 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12643
12644 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12645 (gdb_wants_all_stopped): Delete.
12646 (linux_wait_1): Don't call them.
12647 * server.c (handle_v_cont): Tag all threads as want-stopped.
12648 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12649 stopped as "client-wants-stopped".
12650
12651 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12652
12653 * Makefile.in (signals_h): New.
12654 (server_h): Depend on it.
12655 (server.o): Don't depend on $(signals_def).
12656 (signals.o): Depend on $(signals_def).
12657
12658 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12659
12660 * Makefile.in (signals_def): New.
12661 (server_h): Append include/gdb/signals.h and signals_def.
12662 (server.o): Append signals_def.
12663
12664 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12665
12666 * server.c (handle_target_event): Use target_signal_to_host for
12667 resume_info.sig initialization.
12668 * target.h (struct thread_resume) <sig>: New comment.
12669
12670 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12671
12672 * server.c (handle_query): strcpy() the returned string from paddress()
12673 instead of sprintf().
12674 * utils.c (paddress): Return phex_nz().
12675
12676 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12677
12678 * server.c (handle_v_cont): Call mourn_inferior if process
12679 just exited.
12680 (myresume): Likewise.
12681
12682 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12683
12684 Static tracepoints, and integration with UST.
12685
12686 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12687 * mem-break.c (uninsert_all_breakpoints)
12688 (reinsert_all_breakpoints): New.
12689 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12690 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12691 (gdb_agent_ust_loaded, helper_thread_id)
12692 (gdb_agent_helper_thread_id): New macros.
12693 (struct ipa_sym_addresses): Add addr_ust_loaded,
12694 addr_helper_thread_id, addr_cmd_buf.
12695 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12696 (in_process_agent_loaded_ust): New.
12697 (write_e_ust_not_loaded): New.
12698 (maybe_write_ipa_ust_not_loaded): New.
12699 (struct collect_static_trace_data_action): New.
12700 (enum tracepoint_type) <static_tracepoint>: New.
12701 (struct tracepoint) <handle>: Mention static tracepoints.
12702 (struct static_tracepoint_ctx): New.
12703 (CMD_BUF_SIZE): New.
12704 (add_tracepoint_action): Handle static tracepoint actions.
12705 (unprobe_marker_at): New.
12706 (clear_installed_tracepoints): Handle static tracepoints.
12707 (cmd_qtdp): Handle static tracepoints.
12708 (probe_marker_at): New.
12709 (cmd_qtstart): Handle static tracepoints.
12710 (response_tracepoint): Handle static tracepoints.
12711 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12712 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12713 (get_context_regcache): Handle static tracepoints.
12714 (do_action_at_tracepoint): Handle static tracepoint actions.
12715 (traceframe_find_block_type): Handle static trace data blocks.
12716 (traceframe_read_sdata): New.
12717 (download_tracepoints): Download static tracepoint actions.
12718 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12719 (GDB_PROBE_NAME): New.
12720 (ust_ops): New.
12721 (GET_UST_SYM): New.
12722 (USTF): New.
12723 (dlsym_ust): New.
12724 (ust_marker_to_static_tracepoint): New.
12725 (gdb_probe): New.
12726 (collect_ust_data_at_tracepoint): New.
12727 (gdb_ust_probe): New.
12728 (UNIX_PATH_MAX, SOCK_DIR): New.
12729 (gdb_ust_connect_sync_socket): New.
12730 (resume_thread, stop_thread): New.
12731 (run_inferior_command): New.
12732 (init_named_socket): New.
12733 (gdb_ust_socket_init): New.
12734 (cstr_to_hexstr): New.
12735 (next_st): New.
12736 (first_marker, next_marker): New.
12737 (response_ust_marker): New.
12738 (cmd_qtfstm, cmd_qtsstm): New.
12739 (unprobe_marker_at, probe_marker_at): New.
12740 (cmd_qtstmat, gdb_ust_thread): New.
12741 (gdb_ust_init): New.
12742 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12743 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12744 (ST_REGENTRY): New.
12745 (x86_64_st_collect_regmap): New.
12746 (X86_64_NUM_ST_COLLECT_GREGS): New.
12747 (AMD64_RIP_REGNUM): New.
12748 (supply_static_tracepoint_registers): New.
12749 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12750 (ST_REGENTRY): New.
12751 (i386_st_collect_regmap): New.
12752 (i386_NUM_ST_COLLECT_GREGS): New.
12753 (supply_static_tracepoint_registers): New.
12754 * server.c (handle_query): Handle qXfer:statictrace:read.
12755 <qSupported>: Report support for StaticTracepoints, and
12756 qXfer:statictrace:read features.
12757 * server.h (traceframe_read_sdata)
12758 (supply_static_tracepoint_registers): Declare.
12759 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12760 (unpack_varlen_hex): Include in IPA build.
12761 * Makefile.in (ustlibs, ustinc): New.
12762 (IPA_OBJS): Add remote-utils-ipa.o.
12763 ($(IPA_LIB)): Link -ldl and -lpthread.
12764 (UST_CFLAGS): New.
12765 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12766 * config.in, configure: Regenerate.
12767
12768 2010-06-20 Ian Lance Taylor <iant@google.com>
12769 Pedro Alves <pedro@codesourcery.com>
12770
12771 * linux-x86-low.c (always_true): Delete.
12772 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12773 trying to fool the compiler with always_true.
12774
12775 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12776
12777 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12778 conditions in gdbserver.
12779
12780 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12781
12782 * spu-low.c (spu_read_memory): Wrap around local store limit.
12783 (spu_write_memory): Likewise.
12784
12785 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12786
12787 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12788 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12789 LONGEST uses.
12790 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12791 uses.
12792 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12793 uses with LONGEST uses.
12794
12795 2010-06-14 Stan Shebs <stan@codesourcery.com>
12796 Pedro Alves <pedro@codesourcery.com>
12797
12798 Bytecode compiler.
12799
12800 * linux-x86-low.c: Include limits.h.
12801 (add_insns): New.
12802 (always_true): New.
12803 (EMIT_ASM): New.
12804 (EMIT_ASM32): New.
12805 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12806 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12807 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12808 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12809 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12810 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12811 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12812 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12813 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12814 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12815 (amd64_emit_void_call_2): New.
12816 (amd64_emit_ops): New.
12817 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12818 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12819 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12820 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12821 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12822 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12823 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12824 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12825 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12826 (i386_emit_stack_adjust, i386_emit_int_call_1)
12827 (i386_emit_void_call_2): New.
12828 (i386_emit_ops): New.
12829 (x86_emit_ops): New.
12830 (the_low_target): Install x86_emit_ops.
12831 * server.h (struct emit_ops): New.
12832 (get_raw_reg_func_addr): Declare.
12833 (current_insn_ptr, emit_error): Declare.
12834 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12835 (set_trace_state_variable_value): New defines.
12836 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12837 addr_get_trace_state_variable_value and
12838 addr_set_trace_state_variable_value.
12839 (symbol_list): New fields for get_raw_reg,
12840 get_trace_state_variable_value and set_trace_state_variable_value.
12841 (condfn): New typedef.
12842 (struct tracepoint): New field `compiled_cond'.
12843 (do_action_at_tracepoint): Clear compiled_cond.
12844 (get_trace_state_variable_value, set_trace_state_variable_value):
12845 Export in the IPA.
12846 (condition_true_at_tracepoint): If there's a compiled condition,
12847 run that.
12848 (current_insn_ptr, emit_error): New globals.
12849 (struct bytecode_address): New.
12850 (get_raw_reg_func_addr): New.
12851 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12852 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12853 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12854 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12855 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12856 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12857 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12858 (compile_tracepoint_condition, compile_bytecodes): New.
12859 * target.h (emit_ops): Forward declare.
12860 (struct target_ops): New field emit_ops.
12861 (target_emit_ops): New.
12862 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12863 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12864 * linux-low.c (linux_emit_ops): New.
12865 (linux_target_ops): Install it.
12866 * linux-low.h (struct linux_target_ops): New field emit_ops.
12867
12868 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12869
12870 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12871 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12872
12873 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12874 Stan Shebs <stan@codesourcery.com>
12875
12876 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12877 (all): Depend on $(extra_libraries).
12878 (install-only): Install the IPA.
12879 (IPA_OBJS, IPA_LIB): New.
12880 (clean): Remove the IPA lib.
12881 (IPAGENT_CFLAGS): New.
12882 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12883 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12884 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12885 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12886 * configure.ac: Check for atomic builtins support in the compiler.
12887 (IPA_DEPFILES, extra_libraries): Define.
12888 * configure.srv (ipa_obj): Add description.
12889 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12890 (i[34567]86-*-linux*): Set ipa_obj.
12891 (x86_64-*-linux*): Set ipa_obj.
12892 * linux-low.c (stabilizing_threads): New.
12893 (supports_fast_tracepoints): New.
12894 (linux_detach): Stabilize threads before detaching.
12895 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12896 the lwp is either not stabilizing, or is moving out of a jump pad.
12897 (linux_fast_tracepoint_collecting): New.
12898 (maybe_move_out_of_jump_pad): New.
12899 (enqueue_one_deferred_signal): New.
12900 (dequeue_one_deferred_signal): New.
12901 (linux_wait_for_event_1): If moving out of a jump pad, defer
12902 pending signals to later.
12903 (linux_stabilize_threads): New.
12904 (linux_wait_1): Check if threads need moving out of jump pads, and
12905 do it if so.
12906 (stuck_in_jump_pad_callback): New.
12907 (move_out_of_jump_pad_callback): New.
12908 (lwp_running): New.
12909 (linux_resume_one_lwp): Handle moving out of jump pads.
12910 (linux_set_resume_request): Dequeue deferred signals.
12911 (need_step_over_p): Also step over fast tracepoint jumps.
12912 (start_step_over): Also uninsert fast tracepoint jumps.
12913 (finish_step_over): Also reinsert fast tracepoint jumps.
12914 (linux_install_fast_tracepoint_jump): New.
12915 (linux_target_ops): Install linux_stabilize_threads and
12916 linux_install_fast_tracepoint_jump_pad.
12917 * linux-low.h (linux_target_ops) <get_thread_area,
12918 install_fast_tracepoint_jump_pad>: New fields.
12919 (struct lwp_info) <collecting_fast_tracepoint,
12920 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12921 (linux_get_thread_area): Declare.
12922 * linux-x86-low.c (jump_insn): New.
12923 (x86_get_thread_area): New.
12924 (append_insns): New.
12925 (push_opcode): New.
12926 (amd64_install_fast_tracepoint_jump_pad): New.
12927 (i386_install_fast_tracepoint_jump_pad): New.
12928 (x86_install_fast_tracepoint_jump_pad): New.
12929 (the_low_target): Install x86_get_thread_area and
12930 x86_install_fast_tracepoint_jump_pad.
12931 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12932 (struct fast_tracepoint_jump): New.
12933 (fast_tracepoint_jump_insn): New.
12934 (fast_tracepoint_jump_shadow): New.
12935 (find_fast_tracepoint_jump_at): New.
12936 (fast_tracepoint_jump_here): New.
12937 (delete_fast_tracepoint_jump): New.
12938 (set_fast_tracepoint_jump): New.
12939 (uninsert_fast_tracepoint_jumps_at): New.
12940 (reinsert_fast_tracepoint_jumps_at): New.
12941 (set_breakpoint_at): Use write_inferior_memory.
12942 (uninsert_raw_breakpoint): Use write_inferior_memory.
12943 (check_mem_read): Mask out fast tracepoint jumps.
12944 (check_mem_write): Mask out fast tracepoint jumps.
12945 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12946 (set_fast_tracepoint_jump): Declare.
12947 (delete_fast_tracepoint_jump)
12948 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12949 (reinsert_fast_tracepoint_jumps_at): Declare.
12950 * regcache.c: Don't compile many functions when building the
12951 in-process agent library.
12952 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12953 the register buffer in the heap.
12954 (free_register_cache): If the register buffer isn't owned by the
12955 regcache, don't free it.
12956 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12957 pre-existing register caches.
12958 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12959 type.
12960 (convert_ascii_to_int): : Constify `from' parameter type.
12961 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12962 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12963 the needed buffer in-place.
12964 (relocate_instruction): New.
12965 * server.c (handle_query) <qSymbols>: If the target supports
12966 tracepoints, give it a chance of looking up symbols. Report
12967 support for fast tracepoints.
12968 (handle_status): Stabilize threads.
12969 (process_serial_event): Adjust.
12970 * server.h (struct fast_tracepoint_jump): Forward declare.
12971 (struct process_info) <fast_tracepoint_jumps>: New field.
12972 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12973 (decode_X_packet, decode_M_packet): Adjust.
12974 (relocate_instruction): Declare.
12975 (in_process_agent_loaded): Declare.
12976 (tracepoint_look_up_symbols): Declare.
12977 (struct fast_tpoint_collect_status): Declare.
12978 (fast_tracepoint_collecting): Declare.
12979 (force_unlock_trace_buffer): Declare.
12980 (handle_tracepoint_bkpts): Declare.
12981 (initialize_low_tracepoint)
12982 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12983 * target.h (struct target_ops) <stabilize_threads,
12984 install_fast_tracepoint_jump_pad>: New fields.
12985 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12986 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12987 [HAVE_STDINT_H]: Include stdint.h.
12988 (trace_debug_1): Rename to ...
12989 (trace_vdebug): ... this.
12990 (trace_debug): Rename to ...
12991 (trace_debug_1): ... this. Add `level' parameter.
12992 (trace_debug): New.
12993 (ATTR_USED, ATTR_NOINLINE): New.
12994 (IP_AGENT_EXPORT): New.
12995 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12996 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12997 (about_to_request_buffer_space, trace_buffer_is_full)
12998 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12999 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13000 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13001 (traceframe_write_count, traceframes_created)
13002 (trace_state_variables)
13003 New renaming defines.
13004 (struct ipa_sym_addresses): New.
13005 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13006 (symbol_list): New.
13007 (ipa_sym_addrs): New.
13008 (all_tracepoint_symbols_looked_up): New.
13009 (in_process_agent_loaded): New.
13010 (write_e_ipa_not_loaded): New.
13011 (maybe_write_ipa_not_loaded): New.
13012 (tracepoint_look_up_symbols): New.
13013 (debug_threads) [IN_PROCESS_AGENT]: New.
13014 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13015 (UNKNOWN_SIDE_EFFECTS): New.
13016 (stop_tracing): New.
13017 (flush_trace_buffer): New.
13018 (stop_tracing_bkpt): New.
13019 (flush_trace_buffer_bkpt): New.
13020 (read_inferior_integer): New.
13021 (read_inferior_uinteger): New.
13022 (read_inferior_data_pointer): New.
13023 (write_inferior_data_pointer): New.
13024 (write_inferior_integer): New.
13025 (write_inferior_uinteger): New.
13026 (struct collect_static_trace_data_action): Delete.
13027 (enum tracepoint_type): New.
13028 (struct tracepoint) <type>: New field `type'.
13029 <actions_str, step_actions, step_actions_str>: Only include in
13030 GDBserver.
13031 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13032 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13033 (tracepoints): Use IP_AGENT_EXPORT.
13034 (last_tracepoint): Don't include in the IPA.
13035 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13036 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13037 (alloced_trace_state_variables): New.
13038 (trace_state_variables): Use IP_AGENT_EXPORT.
13039 (traceframe_t): Delete unused variable.
13040 (circular_trace_buffer): Don't include in the IPA.
13041 (trace_buffer_start): Delete.
13042 (struct trace_buffer_control): New.
13043 (trace_buffer_free): Delete.
13044 (struct ipa_trace_buffer_control): New.
13045 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13046 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13047 New.
13048 (trace_buffer_ctrl): New.
13049 (TRACE_BUFFER_CTRL_CURR): New.
13050 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13051 Reimplement as macros.
13052 (trace_buffer_wrap): Delete.
13053 (traceframe_write_count, traceframe_read_count)
13054 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13055 (struct tracepoint_hit_ctx) <type>: New field.
13056 (struct fast_tracepoint_ctx): New.
13057 (memory_barrier): New.
13058 (cmpxchg): New.
13059 (record_tracepoint_error): Update atomically in the IPA.
13060 (clear_inferior_trace_buffer): New.
13061 (about_to_request_buffer_space): New.
13062 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13063 updating the same buffer.
13064 (add_tracepoint): Default the tracepoint's type to trap
13065 tracepoint, and orig_size to -1.
13066 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13067 internal variables.
13068 (create_trace_state_variable): New parameter `gdb'. Handle it.
13069 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13070 (cmd_qtdp): Handle fast tracepoints.
13071 (cmd_qtdv): Adjust.
13072 (max_jump_pad_size): New.
13073 (gdb_jump_pad_head): New.
13074 (get_jump_space_head): New.
13075 (claim_jump_space): New.
13076 (sort_tracepoints): New.
13077 (MAX_JUMP_SIZE): New.
13078 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13079 IPA.
13080 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13081 support. Upload fast traceframes, and delete internal IPA
13082 breakpoints.
13083 (stop_tracing_handler): New.
13084 (flush_trace_buffer_handler): New.
13085 (cmd_qtstop): Upload fast tracepoints.
13086 (response_tracepoint): Handle fast tracepoints.
13087 (tracepoint_finished_step): Upload fast traceframes. Set the
13088 tracepoint hit context's tracepoint type.
13089 (handle_tracepoint_bkpts): New.
13090 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13091 type. Add comment about fast tracepoints.
13092 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13093 non-existing action_str field.
13094 (get_context_regcache): Handle fast tracepoints.
13095 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13096 to the regcache.
13097 (fast_tracepoint_from_jump_pad_address): New.
13098 (fast_tracepoint_from_ipa_tpoint_address): New.
13099 (collecting_t): New.
13100 (force_unlock_trace_buffer): New.
13101 (fast_tracepoint_collecting): New.
13102 (collecting): New.
13103 (gdb_collect): New.
13104 (write_inferior_data_ptr): New.
13105 (target_tp_heap): New.
13106 (target_malloc): New.
13107 (download_agent_expr): New.
13108 (UALIGN): New.
13109 (download_tracepoints): New.
13110 (download_trace_state_variables): New.
13111 (upload_fast_traceframes): New.
13112 (IPA_FIRST_TRACEFRAME): New.
13113 (IPA_NEXT_TRACEFRAME_1): New.
13114 (IPA_NEXT_TRACEFRAME): New.
13115 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13116 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13117 (gdb_jump_pad_buffer_end): New.
13118 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13119 (initialize_tracepoint): Adjust.
13120 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13121 buffer. Initialize the low module.
13122 * utils.c (PREFIX, TOOLNAME): New.
13123 (malloc_failure): Use PREFIX.
13124 (error): In the IPA, an error causes an exit.
13125 (fatal, warning): Use PREFIX.
13126 (internal_error): Use TOOLNAME.
13127 (NUMCELLS): Increase to 10.
13128 * configure, config.in: Regenerate.
13129
13130 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13131
13132 * server.c (handle_query) <qSupported>: Do two passes over the
13133 qSupported string to avoid nesting strtok.
13134
13135 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13136
13137 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13138 (CDEPS): New.
13139 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13140 -Wl,--dynamic-list.
13141 * configure: Regenerate.
13142 * proc-service.list: New.
13143
13144 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13145
13146 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13147 New comment.
13148
13149 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13150
13151 * gdbreplay.c (remote_open): Check error return from socket() call by
13152 its equality to -1 not by it being negative.
13153 * remote-utils.c (remote_open): Likewise.
13154
13155 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13156
13157 * config.h: Regenerate.
13158
13159 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13160
13161 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13162 doesn't provide PTRACE_GET_THREAD_AREA.
13163
13164 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13165
13166 * linux-m68k-low.c: Include <asm/ptrace.h>
13167 (ps_get_thread_area): Implement.
13168
13169 2010-05-03 Doug Evans <dje@google.com>
13170
13171 * event-loop.c (struct callback_event): New struct.
13172 (callback_list): New global.
13173 (append_callback_event, delete_callback_event): New functions.
13174 (process_callback): New function.
13175 (start_event_loop): Call it.
13176 * remote-utils.c (NOT_SCHEDULED): Define.
13177 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13178 moved out of readchar.
13179 (readchar): Rewrite. Call reschedule before returning.
13180 (reset_readchar): New function.
13181 (remote_close): Call it.
13182 (process_remaining, reschedule): New functions.
13183 * server.h (callback_handler_func): New typedef.
13184 (append_callback_event, delete_callback_event): Declare.
13185
13186 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13187
13188 * proc-service.c (ps_pglobal_lookup): Use
13189 thread_db_look_up_one_symbol.
13190 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13191 parameter. Use it instead of all_symbols_looked_up.
13192 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13193 field.
13194 (all_symbols_looked_up): Don't declare.
13195 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13196 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13197 field.
13198 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13199 Set all_symbols_looked_up here.
13200 (thread_db_look_up_one_symbol): New.
13201 (thread_db_get_tls_address): Adjust.
13202 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13203 thread_db object on the heap, and tentatively set it in the
13204 process structure.
13205 (thread_db_init): Don't set all_symbols_looked_up here.
13206 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13207
13208 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13209
13210 * linux-low.c (linux_kill, linux_detach): Adjust.
13211 (status_pending_p_callback): Remove redundant statement. Check
13212 for !TARGET_WAITIKIND_IGNORE, instead of
13213 TARGET_WAITKIND_STOPPED.
13214 (handle_tracepoints): Make sure LWP is locked. Adjust.
13215 (linux_wait_for_event_1): Adjust.
13216 (linux_cancel_breakpoints): New.
13217 (unsuspend_one_lwp): New.
13218 (unsuspend_all_lwps): New.
13219 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13220 (send_sigstop_callback): Change return type to int, add new
13221 `except' parameter and handle it.
13222 (suspend_and_send_sigstop_callback): New.
13223 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13224 pass them down. If SUSPEND, also increment the lwp's suspend
13225 count.
13226 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13227 (need_step_over_p): Don't consider suspended LWPs.
13228 (start_step_over): Adjust.
13229 (proceed_one_lwp): Change return type to int, add new `except'
13230 parameter and handle it.
13231 (unsuspend_and_proceed_one_lwp): New.
13232 (proceed_all_lwps): Use find_inferior instead of
13233 for_each_inferior.
13234 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13235 also decrement the suspend count of LWPs. Pass `except' down,
13236 instead of hacking its suspend count.
13237 (linux_pause_all): Add `freeze' parameter. Adjust.
13238 (linux_unpause_all): New.
13239 (linux_target_ops): Install linux_unpause_all.
13240 * server.c (handle_status): Adjust.
13241 * target.h (struct target_ops): New fields `unpause_all' and
13242 `cancel_breakpoints'. Add new parameter to `pause_all'.
13243 (pause_all): Add new `freeze' parameter.
13244 (unpause_all): New.
13245 (cancel_breakpoints): New.
13246 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13247 cancel breakpoints.
13248 (cmd_qtstart): Pause threads.
13249 (stop_tracing): Pause threads, and cancel breakpoints.
13250 * win32-low.c (win32_target_ops): Adjust.
13251
13252 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13253
13254 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13255 the inferior right away from here...
13256 (linux_wait_1): ... to here, and adjust to check the thread's
13257 last_resume_kind instead of the lwp's step or stop_expected flags.
13258
13259 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13260
13261 * README: Use consistent `GDB' and `GDBserver' spellings.
13262
13263 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13264
13265 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13266 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13267 (linux_detach_one_lwp): Assume the lwp is stopped.
13268 (any_thread_of): Delete.
13269 (linux_detach): Stop all lwps here. Don't blindly delete all
13270 breakpoints.
13271 (delete_lwp_callback): New.
13272 (linux_mourn): Delete all lwps of the process that is gone.
13273 (linux_wait_1): Don't delete the last lwp of the process here.
13274 * mem-break.h (mark_breakpoints_out): Declare.
13275 * mem-break.c (mark_breakpoints_out): New.
13276 (free_all_breakpoints): Use it.
13277 * server.c (handle_target_event): If the process is gone, mark
13278 breakpoints out.
13279 * thread-db.c (struct thread_db) <create_bp>: New field.
13280 (thread_db_enable_reporting): Fix prototype. Store a thread event
13281 breakpoint reference in the thread_db struct.
13282 (thread_db_load_search): Clear the thread_db object.
13283 (try_thread_db_load_1): Ditto.
13284 (switch_to_process): New.
13285 (disable_thread_event_reporting): Use it.
13286 (remove_thread_event_breakpoints): New.
13287 (thread_db_detach, thread_db_mourn): Use it.
13288
13289 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13290
13291 * linux-low.c (linux_enable_event_reporting): New.
13292 (linux_wait_for_event_1, handle_extended_wait): Use it.
13293
13294 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13295
13296 * linux-low.c (linux_kill_one_lwp, linux_kill)
13297 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13298 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13299 SIGSTOP even if the LWP is stopped.
13300 (send_sigstop_callback): New.
13301 (stop_all_lwps): Use send_sigstop_callback instead.
13302 (linux_resume_one_thread): Adjust.
13303 (proceed_one_lwp): Still proceed an LWP that the client has
13304 requested to stop, if we haven't reported it as stopped yet. Make
13305 sure that LWPs the client want stopped, have a pending SIGSTOP.
13306
13307 2010-04-26 Doug Evans <dje@google.com>
13308
13309 * server.c (handle_general_set): Make static.
13310
13311 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13312 Print received char after testing for error/eof instead of before.
13313 (input_interrupt): Tweak comment.
13314
13315 2010-04-23 Doug Evans <dje@google.com>
13316
13317 * server.c (start_inferior): Print inferior argv if --debug.
13318
13319 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13320
13321 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13322 * nto-x86-low.c: Include server.h
13323
13324 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13325
13326 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13327 be consistent with other sources of this directory.
13328 (init_registers_amd64): Correct name of source file of this function
13329 in the comment.
13330
13331 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13332
13333 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13334 64-bit executables.
13335
13336 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13337
13338 * win32-i386-low.c: Add 64-bit support.
13339 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13340 (init_registers_amd64): Declare.
13341 (mappings): Add 64-bit version of array.
13342 (init_windows_x86): New function.
13343 (the_low_target): Change init_arch field to init_windows_x86.
13344
13345 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13346
13347 * win32-low.c: Adapt to support also 64-bit architecture.
13348 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13349 (get_image_name): Use SIZE_T type for local variable `done'.
13350 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13351 (toolhelp_get_dll_name): Idem.
13352 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13353 Use uintptr_t typecast to avoid warning.
13354 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13355 (handle_exception): Use phex_nz to avoid warning.
13356 (win32_wait): Remove unused local variable `process'.
13357
13358 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13359
13360 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13361 `amd64-avx.o'.
13362
13363 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13364
13365 * configure.ac: Use `ws2_32' library for srv_mingw.
13366 * configure: Regenerate.
13367 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13368 * remote-utils.c: Likewise.
13369
13370 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13371
13372 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13373 if __x86_64__ is defined.
13374
13375 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13376
13377 * configure: Regenerate.
13378
13379 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13380
13381 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13382 * target.h (target_ops): New get_tib_address field.
13383 * win32-low.h (win32_thread_info): Add thread_local_base field.
13384 * win32-low.c (child_add_thread): Add tlb argument.
13385 Set thread_local_base field to TLB.
13386 (get_child_debug_event): Adapt to child_add_thread change.
13387 (win32_get_tib_address): New function.
13388 (win32_target_ops): Set get_tib_address field to
13389 win32_get_tib_address.
13390 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13391
13392 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13393
13394 * linux-low.c (linux_mourn): Also remove the process.
13395 * server.c (handle_target_event): Don't remove the process here.
13396 * nto-low.c (nto_mourn): New.
13397 (nto_target_ops): Install it.
13398 * spu-low.c (spu_mourn): New.
13399 (spu_target_ops): Install it.
13400 * win32-low.c (win32_mourn): New.
13401 (win32_target_ops): Install it.
13402
13403 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13404
13405 * server.h (buffer_xml_printf): Remove redundant `;'.
13406
13407 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13408
13409 * regcache.c (set_register_cache): Invalidate regcaches before
13410 changing the register cache layout.
13411 (regcache_invalidate_one): Allow a NULL regcache.
13412 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13413 regcaches before changing the register cache layout or the target
13414 regsets.
13415
13416 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13417
13418 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13419 variable warning on Linux/x86-64.
13420
13421 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13422
13423 GDBserver disconnected tracing support.
13424
13425 * linux-low.c (linux_remove_process): Delete.
13426 (add_lwp): Don't set last_resume_kind here.
13427 (linux_kill): Use `mourn'.
13428 (linux_detach): Use `thread_db_detach', and `mourn'.
13429 (linux_mourn): New.
13430 (linux_attach_lwp_1): Adjust comment.
13431 (linux_attach): last_resume_kind moved the thread_info; adjust.
13432 (status_pending_p_callback): Adjust.
13433 (linux_wait_for_event_1): Adjust.
13434 (count_events_callback, select_singlestep_lwp_callback)
13435 (select_event_lwp_callback, cancel_breakpoints_callback)
13436 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13437 (proceed_one_lwp): Adjust.
13438 (linux_async): Add debug output.
13439 (linux_thread_stopped): New.
13440 (linux_pause_all): New.
13441 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13442 linux_pause_all.
13443 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13444 (thread_db_free): Delete declaration.
13445 (thread_db_detach, thread_db_mourn): Declare.
13446 * thread-db.c (thread_db_init): Use thread_db_mourn.
13447 (thread_db_free): Delete, split in two.
13448 (disable_thread_event_reporting): New.
13449 (thread_db_detach): New.
13450 (thread_db_mourn): New.
13451
13452 * server.h (struct thread_info) <last_resume_kind>: New field.
13453 <attached>: Add comment.
13454 <gdb_detached>: New field.
13455 (handler_func): Change return type to int.
13456 (handle_serial_event, handle_target_event): Ditto.
13457 (gdb_connected): Declare.
13458 (tracing): Delete.
13459 (disconnected_tracing): Declare.
13460 (stop_tracing): Declare.
13461
13462 * server.c (handle_query) <qSupported>: Report support for
13463 disconnected tracing.
13464 (queue_stop_reply_callback): Account for running threads.
13465 (gdb_wants_thread_stopped): New.
13466 (gdb_wants_all_threads_stopped): New.
13467 (gdb_reattached_process): New.
13468 (handle_status): Clear the `gdb_detached' flag of all processes.
13469 In all-stop, stop all threads.
13470 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13471 (process_serial_event): If the remote connection breaks, or if an
13472 exit was forced with "monitor exit", force an event loop exit.
13473 Handle disconnected tracing on detach.
13474 (handle_serial_event): Adjust.
13475 (handle_target_event): If GDB isn't connected, forward events back
13476 to the inferior, unless the last process exited, in which case,
13477 exit gdbserver. Adjust interface.
13478
13479 * remote-utils.c (remote_open): Don't block in accept. Instead
13480 register an event loop source on the listen socket file
13481 descriptor. Refactor bits into ...
13482 (listen_desc): ... this new global.
13483 (gdb_connected): ... this new function.
13484 (enable_async_notification): ... this new function.
13485 (handle_accept_event): ... this new function.
13486 (remote_close): Clear remote_desc.
13487
13488 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13489
13490 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13491 New fields.
13492 (mourn_inferior): Define.
13493 (target_process_qsupported): Avoid the dangling else problem.
13494 (thread_stopped): Define.
13495 (pause_all): Define.
13496 (target_waitstatus_to_string): Declare.
13497 * target.c (target_waitstatus_to_string): New.
13498
13499 * tracepoint.c (tracing): Make extern.
13500 (disconnected_tracing): New.
13501 (stop_tracing): Make extern. Handle tracing stops due to GDB
13502 disconnecting.
13503 (cmd_qtdisconnected): New.
13504 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13505 (handle_tracepoint_general_set): Handle QTDisconnected.
13506
13507 * event-loop.c (event_handler_func): Change return type to int.
13508 (process_event): Bail out if the event handler wants the event
13509 loop to stop.
13510 (handle_file_event): Ditto.
13511 (start_event_loop): Bail out if the event handler wants the event
13512 loop to stop.
13513
13514 * nto-low.c (nto_target_ops): Adjust.
13515 * spu-low.c (spu_wait): Don't remove the process here.
13516 (spu_target_ops): Adjust.
13517 * win32-low.c (win32_wait): Don't remove the process here.
13518 (win32_target_ops): Adjust.
13519
13520 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13521
13522 * regcache.c (realloc_register_cache): Invalidate inferior's
13523 regcache before recreating it.
13524
13525 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13526
13527 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13528
13529 2010-04-09 Stan Shebs <stan@codesourcery.com>
13530 Pedro Alves <pedro@codesourcery.com>
13531
13532 * server.h (LONGEST): New.
13533 (struct thread_info) <while_stepping>: New field.
13534 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13535 Declare.
13536 (initialize_tracepoint, handle_tracepoint_general_set)
13537 (handle_tracepoint_query, tracepoint_finished_step)
13538 (tracepoint_was_hit, release_while_stepping_state_list):
13539 (current_traceframe): Declare.
13540 * server.c (handle_general_set): Handle tracepoint packets.
13541 (read_memory): New.
13542 (write_memory): New.
13543 (handle_search_memory_1): Use read_memory.
13544 (handle_query): Report support for conditional tracepoints, trace
13545 state variables, and tracepoint sources. Handle tracepoint
13546 queries.
13547 (main): Initialize the tracepoints module.
13548 (process_serial_event): Handle traceframe reads/writes.
13549
13550 * linux-low.c (handle_tracepoints): New.
13551 (linux_wait_1): Call it.
13552 (linux_resume_one_lwp): Handle while-stepping.
13553 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13554 (linux_target_ops): Install them.
13555 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13556 New field.
13557 * linux-x86-low.c (x86_supports_tracepoints): New.
13558 (the_low_target). Install it.
13559
13560 * mem-break.h (delete_breakpoint): Declare.
13561 * mem-break.c (delete_breakpoint): Make external.
13562
13563 * target.h (struct target_ops): Add `supports_tracepoints',
13564 `read_pc', and `write_pc' fields.
13565 (target_supports_tracepoints): Define.
13566 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13567 (phex_nz): New.
13568
13569 * regcache.h (struct regcache) <registers_owned>: New field.
13570 (init_register_cache, regcache_cpy): Declare.
13571 (regcache_read_pc, regcache_write_pc): Declare.
13572 (register_cache_size): Declare.
13573 (supply_regblock): Declare.
13574 * regcache.c (init_register_cache): New.
13575 (new_register_cache): Use it.
13576 (regcache_cpy): New.
13577 (register_cache_size): New.
13578 (supply_regblock): New.
13579 (regcache_read_pc, regcache_write_pc): New.
13580
13581 * tracepoint.c: New.
13582
13583 * Makefile.in (OBS): Add tracepoint.o.
13584 (tracepoint.o): New rule.
13585
13586 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13587
13588 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13589 (i386-mmx.o): New.
13590 (i386-mmx.c): Likewise.
13591 (i386-mmx-linux.o): Likewise.
13592 (i386-mmx-linux.c): Likewise.
13593
13594 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13595 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13596 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13597 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13598
13599 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13600 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13601 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13602
13603 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13604
13605 * Makefile.in (clean): Updated.
13606 (i386-avx.o): New.
13607 (i386-avx.c): Likewise.
13608 (i386-avx-linux.o): Likewise.
13609 (i386-avx-linux.c): Likewise.
13610 (amd64-avx.o): Likewise.
13611 (amd64-avx.c): Likewise.
13612 (amd64-avx-linux.o): Likewise.
13613 (amd64-avx-linux.c): Likewise.
13614
13615 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13616 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13617 (srv_amd64_regobj): Add amd64-avx.o.
13618 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13619 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13620 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13621 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13622 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13623 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13624 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13625
13626 * i387-fp.c: Include "i386-xstate.h".
13627 (i387_xsave): New.
13628 (i387_cache_to_xsave): Likewise.
13629 (i387_xsave_to_cache): Likewise.
13630 (x86_xcr0): Likewise.
13631
13632 * i387-fp.h (i387_cache_to_xsave): Likewise.
13633 (i387_xsave_to_cache): Likewise.
13634 (x86_xcr0): Likewise.
13635
13636 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13637 * linux-crisv32-low.c (target_regsets): Likewise.
13638 * linux-m68k-low.c (target_regsets): Likewise.
13639 * linux-mips-low.c (target_regsets): Likewise.
13640 * linux-ppc-low.c (target_regsets): Likewise.
13641 * linux-s390-low.c (target_regsets): Likewise.
13642 * linux-sh-low.c (target_regsets): Likewise.
13643 * linux-sparc-low.c (target_regsets): Likewise.
13644 * linux-xtensa-low.c (target_regsets): Likewise.
13645
13646 * linux-low.c: Include <sys/uio.h>.
13647 (regsets_fetch_inferior_registers): Support nt_type.
13648 (regsets_store_inferior_registers): Likewise.
13649 (linux_process_qsupported): New.
13650 (linux_target_ops): Add linux_process_qsupported.
13651
13652 * linux-low.h (regset_info): Add nt_type.
13653 (linux_target_ops): Add process_qsupported.
13654
13655 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13656 and <sys/uio.h>.
13657 (init_registers_i386_avx_linux): New.
13658 (init_registers_amd64_avx_linux): Likewise.
13659 (xmltarget_i386_linux_no_xml): Likewise.
13660 (xmltarget_amd64_linux_no_xml): Likewise.
13661 (PTRACE_GETREGSET): Likewise.
13662 (PTRACE_SETREGSET): Likewise.
13663 (x86_fill_xstateregset): Likewise.
13664 (x86_store_xstateregset): Likewise.
13665 (use_xml): Likewise.
13666 (x86_linux_update_xmltarget): Likewise.
13667 (x86_linux_process_qsupported): Likewise.
13668 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13669 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13670 init_registers_i386_linux here. Call
13671 x86_linux_update_xmltarget.
13672 (the_low_target): Add x86_linux_process_qsupported.
13673
13674 * server.c (handle_query): Call target_process_qsupported.
13675
13676 * target.h (target_ops): Add process_qsupported.
13677 (target_process_qsupported): New.
13678
13679 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13680
13681 * inferiors.c (add_thread): Set last_status kind to
13682 TARGET_WAITKIND_IGNORE.
13683 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13684 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13685 (linux_wait_1): Move `thread' local definition to block that uses
13686 it. Don't NULL initialize `event_child'.
13687 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13688 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13689 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13690
13691 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13692
13693 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13694 an extended waitstatus, or by a watchpoint.
13695 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13696 thread was stepping or has been stopped by a watchpoint.
13697
13698 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13699
13700 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13701 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13702 of another, then delete the previous, and validate all
13703 breakpoints.
13704 (validate_inserted_breakpoint): New.
13705 (delete_disabled_breakpoints): New.
13706 (validate_breakpoints): New.
13707 (check_mem_read): Validate breakpoints before trusting their
13708 shadow. Delete disabled breakpoints.
13709 (check_mem_write): Validate breakpoints before trusting they
13710 should be inserted. Delete disabled breakpoints.
13711 * mem-break.h (validate_breakpoints):
13712 * server.c (handle_query): Validate breakpoints when we see a
13713 qSymbol query.
13714
13715 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13716
13717 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13718 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13719 if we could tell there's a GDB breakpoint at stop_pc.
13720 (need_step_over_p): Don't do a step over if we find a GDB
13721 breakpoint at the resume PC.
13722
13723 * mem-break.c (struct raw_breakpoint): New.
13724 (enum bkpt_type): New type `gdb_breakpoint'.
13725 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13726 fields. New field `raw'.
13727 (find_raw_breakpoint_at): New.
13728 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13729 breakpoint instead.
13730 (set_breakpoint_at): Adjust.
13731 (delete_raw_breakpoint): New.
13732 (release_breakpoint): New.
13733 (delete_breakpoint): Rename to...
13734 (delete_breakpoint_1): ... this. Add proc parameter. Use
13735 release_breakpoint. Return ENOENT.
13736 (delete_breakpoint): Reimplement.
13737 (find_breakpoint_at): Delete.
13738 (find_gdb_breakpoint_at): New.
13739 (delete_breakpoint_at): Delete.
13740 (set_gdb_breakpoint_at): New.
13741 (delete_gdb_breakpoint_at): New.
13742 (gdb_breakpoint_here): New.
13743 (set_reinsert_breakpoint): Use release_breakpoint.
13744 (uninsert_breakpoint): Rename to ...
13745 (uninsert_raw_breakpoint): ... this.
13746 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13747 (reinsert_raw_breakpoint): Change parameter type to
13748 raw_breakpoint.
13749 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13750 instead.
13751 (check_breakpoints): Adjust. Use release_breakpoint.
13752 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13753 (breakpoint_inserted_here): Ditto.
13754 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13755 Don't trust the breakpoint's shadow if it is not inserted.
13756 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13757 (delete_all_breakpoints): Adjust.
13758 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13759 use delete_breakpoint_1.
13760
13761 * mem-break.h (breakpoints_supported): Delete declaration.
13762 (set_gdb_breakpoint_at): Declare.
13763 (gdb_breakpoint_here): Declare.
13764 (delete_breakpoint_at): Delete.
13765 (delete_gdb_breakpoint_at): Declare.
13766
13767 * server.h (struct raw_breakpoint): Forward declare.
13768 (struct process_info): New field `raw_breakpoints'.
13769
13770 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13771 breakpoints.
13772
13773 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13774
13775 * linux-low.c (status_pending_p_callback): Fix comment.
13776 (linux_wait_for_event_1): Move most of the internal breakpoint
13777 handling from here...
13778 (linux_wait_1): ... to here.
13779 (count_events_callback): New.
13780 (select_singlestep_lwp_callback): New.
13781 (select_event_lwp_callback): New.
13782 (cancel_breakpoints_callback): New.
13783 (select_event_lwp): New.
13784 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13785 priority to all LWPs that have had events that should be reported
13786 to the client. Cancel breakpoints when about to reporting the
13787 event to the client, not while stopping lwps. No longer cancel
13788 finished single-steps here.
13789 (cancel_finished_single_step): Delete.
13790 (cancel_finished_single_steps): Delete.
13791
13792 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13793
13794 * mem-break.c (enum bkpt_type): New.
13795 (struct breakpoint): New field `type'.
13796 (set_breakpoint_at): Change return type to struct breakpoint
13797 pointer. Set type to `other_breakpoint' by default.
13798 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13799 in the breakpoint list.
13800 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13801 (reinsert_breakpoint): Rename to ...
13802 (reinsert_raw_breakpoint): ... this.
13803 (reinsert_breakpoints_at): Adjust.
13804 * mem-break.h (struct breakpoint): Declare.
13805 (set_breakpoint_at): Change return type to struct breakpoint
13806 pointer.
13807
13808 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13809
13810 * server.c (handle_query): Assign, not compare.
13811
13812 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13813
13814 Teach linux gdbserver to step-over-breakpoints.
13815
13816 * linux-low.c (can_hardware_single_step): New.
13817 (supports_breakpoints): New.
13818 (handle_extended_wait): If stopping threads, read the stop pc of
13819 the new cloned LWP.
13820 (get_pc): New.
13821 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13822 low target doesn't support retrieving the PC.
13823 (add_lwp): Set last_resume_kind to resume_continue.
13824 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13825 (linux_attach): Don't clear stop_expected. Set the lwp's
13826 last_resume_kind to resume_stop.
13827 (linux_detach_one_lwp): Don't check for removed breakpoints.
13828 (check_removed_breakpoint): Delete.
13829 (status_pending_p): Rename to ...
13830 (status_pending_p_callback): ... this. Don't check for removed
13831 breakpoints. Don't consider threads that are stopped from GDB's
13832 perspective.
13833 (linux_wait_for_lwp): Always read the stop_pc here.
13834 (cancel_breakpoint): New.
13835 (step_over_bkpt): New global.
13836 (linux_wait_for_event_1): Implement stepping over breakpoints.
13837 (gdb_wants_lwp_stopped): New.
13838 (gdb_wants_all_stopped): New.
13839 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13840 single-step traps here. Store the thread's last reported target
13841 wait status.
13842 (send_sigstop): Don't clear stop_expected. Always set it,
13843 instead.
13844 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13845 (cancel_finished_single_step): New.
13846 (cancel_finished_single_steps): New.
13847 (wait_for_sigstop): Don't cancel finished single-step traps here.
13848 (linux_resume_one_lwp): Don't check for removed breakpoints.
13849 Don't set `step' on non-hardware step archs.
13850 (linux_set_resume_request): Ignore resume_stop requests if already
13851 stopping or stopped. Set the lwp's last_resume_kind.
13852 (resume_status_pending_p): Don't check for removed breakpoints.
13853 (need_step_over_p): New.
13854 (start_step_over): New.
13855 (finish_step_over): New.
13856 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13857 requests. Clear the thread's last reported target waitstatus.
13858 Don't use the `suspended' flag. Don't consider pending breakpoints.
13859 (linux_resume): Start a step-over if necessary.
13860 (proceed_one_lwp): New.
13861 (proceed_all_lwps): New.
13862 (unstop_all_lwps): New.
13863 * linux-low.h (struct lwp_info): Rewrite comment for the
13864 `suspended' flag. Add the `stop_pc' field. Delete the
13865 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13866 Add `'last_resume_kind' and `need_step_over' fields.
13867 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13868 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13869 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13870 (set_raw_breakpoint_at): New.
13871 (set_breakpoint_at): Rewrite to use it.
13872 (reinsert_breakpoint_handler): Delete.
13873 (set_reinsert_breakpoint): New.
13874 (reinsert_breakpoint_by_bp): Delete.
13875 (delete_reinsert_breakpoints): New.
13876 (uninsert_breakpoint): Rewrite.
13877 (uninsert_breakpoints_at): New.
13878 (reinsert_breakpoint): Rewrite.
13879 (reinsert_breakpoints_at): New.
13880 (check_breakpoints): Rewrite.
13881 (breakpoint_here): New.
13882 (breakpoint_inserted_here): New.
13883 (check_mem_read): Adjust.
13884 * mem-break.h (breakpoints_supported, breakpoint_here)
13885 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13886 (reinsert_breakpoint_by_bp): Delete declaration.
13887 (delete_reinsert_breakpoints): Declare.
13888 (reinsert_breakpoint): Delete declaration.
13889 (reinsert_breakpoints_at): Declare.
13890 (uninsert_breakpoint): Delete declaration.
13891 (uninsert_breakpoints_at): Declare.
13892 (check_breakpoints): Adjust prototype.
13893 * server.h: Adjust include order.
13894 (struct thread_info): Declare here. Add a `last_status' field.
13895
13896 2010-03-23 Michael Snyder <msnyder@vmware.com>
13897
13898 * server.c (crc32): New function.
13899 (handle_query): Add handling for 'qCRC:' request.
13900
13901 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13902
13903 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13904 lwp had been stopped by a watchpoint.
13905
13906 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13907
13908 * server.h (internal_error): Declare.
13909 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13910 * utils.c (internal_error): New function.
13911
13912 2010-03-15 Andreas Schwab <schwab@redhat.com>
13913
13914 * configure.srv: Fix typo setting srv_regobj.
13915
13916 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13917
13918 * linux-low.c (fetch_register): Avoid passing a non string literal
13919 format to `error'.
13920 (usr_store_inferior_registers): Ditto.
13921
13922 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13923
13924 * linux-low.c (linux_write_memory): Bail out early if peeking
13925 memory failed.
13926
13927 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13928
13929 * linux-low.h (struct lwp_info): New fields
13930 `stopped_by_watchpoint' and `stopped_data_address'.
13931 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13932 here, and cache them in the lwp object.
13933 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13934 directly.
13935 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13936 field.
13937 (linux_stopped_by_watchpoint): Rewrite.
13938 (linux_stopped_data_address): Rewrite.
13939
13940 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13941
13942 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13943 switching the current inferior, not before.
13944
13945 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13946
13947 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13948 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13949 i386-linux.c and amd64-linux.c.
13950 (reg-i386.o): Removed.
13951 (reg-i386.c): Likewise.
13952 (reg-i386-linux.o): Likewise.
13953 (reg-i386-linux.c): Likewise.
13954 (reg-x86-64.o): Likewise.
13955 (reg-x86-64.c): Likewise.
13956 (reg-x86-64-linux.o): Likewise.
13957 (reg-x86-64-linux.c): Likewise.
13958 (i386.o): New.
13959 (i386.c): Likewise.
13960 (i386-linux.o): Likewise.
13961 (i386-linux.c): Likewise.
13962 (amd64.o): Likewise.
13963 (amd64.c): Likewise.
13964 (amd64-linux.o): Likewise.
13965 (amd64-linux.c): Likewise.
13966
13967 * configure.srv (srv_i386_regobj): New.
13968 (srv_i386_linux_regobj): Likewise.
13969 (srv_amd64_regobj): Likewise.
13970 (srv_amd64_linux_regobj): Likewise.
13971 (srv_i386_32bit_xmlfiles): Likewise.
13972 (srv_i386_64bit_xmlfiles): Likewise.
13973 (srv_i386_xmlfiles): Likewise.
13974 (srv_amd64_xmlfiles): Likewise.
13975 (srv_i386_linux_xmlfiles): Likewise.
13976 (srv_amd64_linux_xmlfiles): Likewise.
13977 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13978 srv_xmlfiles to $srv_i386_xmlfiles.
13979 (i[34567]86-*-mingw32ce*): Likewise.
13980 (i[34567]86-*-mingw*): Likewise.
13981 (i[34567]86-*-nto*): Likewise.
13982 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13983 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13984 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13985 (x86_64-*-linux*): Likewise.
13986
13987 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13988 (init_registers_amd64_linux): New.
13989 (x86_arch_setup): Replace init_registers_x86_64_linux with
13990 init_registers_amd64_linux.
13991
13992 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13993
13994 * configure.ac: Check for libdl. If it is not available link against
13995 static libthread_db.
13996 * configure: Regenerate.
13997
13998 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13999
14000 PR9605
14001
14002 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14003 handing a read watchpoint.
14004 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14005
14006 2010-02-12 Doug Evans <dje@google.com>
14007
14008 * linux-low.c (linux_supports_tracefork_flag): Document.
14009 (linux_look_up_symbols): Add comment.
14010
14011 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14012
14013 * regcache.c (supply_register): Clear regcache if buf is NULL.
14014
14015 2010-02-02 Nicolas Roche <roche@sourceware.org>
14016 Joel Brobecker <brobecker@adacore.com>
14017
14018 * inferiors.c (find_inferior): Add function documentation.
14019 (unloaded_dll): Handle the case where the unloaded dll has not
14020 been previously registered in the dll list.
14021
14022 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14025 (thumb2_breakpoint): New.
14026 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14027
14028 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14031 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14032 breakpoints.
14033
14034 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14035
14036 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14037
14038 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14039
14040 * linux-s390-low.c (s390_collect_ptrace_register)
14041 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14042
14043 2010-01-21 Doug Evans <dje@google.com>
14044
14045 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14046 (PTRACE_ARG4_TYPE): New macro.
14047 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14048 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14049 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14050 (usr_store_inferior_registers): Ditto.
14051 (linux_read_memory, linux_write_memory): Ditto.
14052 (linux_test_for_tracefork): Ditto.
14053
14054 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14055 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14056
14057 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14058
14059 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14060 target.
14061
14062 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14063
14064 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14065 prototype to take a regcache. Adjust.
14066
14067 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14068
14069 * regcache.h (struct thread_info): Forward declare.
14070 (struct regcache): New.
14071 (new_register_cache): Adjust prototype.
14072 (get_thread_regcache): Declare.
14073 (free_register_cache): Adjust prototype.
14074 (registers_to_string, registers_from_string): Ditto.
14075 (supply_register, supply_register_by_name, collect_register)
14076 (collect_register_as_string, collect_register_by_name): Ditto.
14077 * regcache.c (struct inferior_regcache_data): Delete.
14078 (get_regcache): Rename to ...
14079 (get_thread_regcache): ... this. Adjust. Switch inferior before
14080 fetching registers.
14081 (regcache_invalidate_one): Adjust.
14082 (regcache_invalidate): Fix prototype.
14083 (new_register_cache): Return the new register cache.
14084 (free_register_cache): Change prototype.
14085 (realloc_register_cache): Adjust.
14086 (registers_to_string): Change prototype to take a regcache. Adjust.
14087 (registers_from_string): Ditto.
14088 (register_data): Ditto.
14089 (supply_register): Ditto.
14090 (supply_register_by_name): Ditto.
14091 (collect_register): Ditto.
14092 (collect_register_as_string): Ditto.
14093 (collect_register_by_name): Ditto.
14094 * server.c (process_serial_event): Adjust.
14095 * linux-low.h (regset_fill_func, regset_store_func): Change
14096 prototype.
14097 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14098 Change prototype.
14099 * linux-low.c (get_stop_pc): Adjust.
14100 (check_removed_breakpoint): Adjust.
14101 (linux_wait_for_event): Adjust.
14102 (linux_resume_one_lwp): Adjust.
14103 (fetch_register): Add regcache parameter. Adjust.
14104 (usr_store_inferior_registers): Ditto.
14105 (regsets_fetch_inferior_registers): Ditto.
14106 (regsets_store_inferior_registers): Ditto.
14107 (linux_fetch_registers, linux_store_registers): Ditto.
14108 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14109 regcache. Adjust.
14110 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14111 Ditto.
14112 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14113 prototype to take a regcache.
14114 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14115 * remote-utils.c (convert_ascii_to_int, outreg)
14116 (prepare_resume_reply): Change prototype to take a regcache.
14117 Adjust.
14118 * target.h (struct target_ops) <fetch_registers, store_registers>:
14119 Change prototype to take a regcache.
14120 (fetch_inferior_registers, store_inferior_registers): Change
14121 prototype to take a regcache. Adjust.
14122 * proc-service.c (ps_lgetregs): Adjust.
14123 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14124 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14125 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14126 take a regcache. Adjust.
14127 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14128 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14129 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14130 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14131 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14132 (cris_cannot_fetch_register):
14133 (cris_breakpoint_at): Change prototype to take a regcache.
14134 Adjust.
14135 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14136 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14137 to take a regcache. Adjust.
14138 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14139 Adjust.
14140 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14141 take a regcache. Adjust.
14142 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14143 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14144 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14145 * linux-mips-low.c (mips_get_pc):
14146 (mips_set_pc): Change prototype to take a regcache. Adjust.
14147 (mips_reinsert_addr): Adjust.
14148 (mips_collect_register): Change prototype to take a regcache.
14149 Adjust.
14150 (mips_supply_register):
14151 (mips_collect_register_32bit, mips_supply_register_32bit)
14152 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14153 (mips_store_fpregset): Ditto.
14154 * linux-ppc-low.c (ppc_supply_ptrace_register)
14155 (ppc_supply_ptrace_register): Ditto.
14156 (parse_spufs_run): Adjust.
14157 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14158 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14159 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14160 take a regcache. Adjust.
14161 * linux-s390-low.c (s390_collect_ptrace_register)
14162 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14163 (s390_set_pc): Change prototype to take a regcache. Adjust.
14164 (s390_arch_setup): Adjust.
14165 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14166 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14167 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14168 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14169 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14170 regcache. Adjust.
14171 (sparc_breakpoint_at): Adjust.
14172 * linux-xtensa-low.c (xtensa_fill_gregset):
14173 (xtensa_store_gregset):
14174 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14175 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14176 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14177 prototype to take a regcache. Adjust.
14178 * win32-arm-low.c (arm_fetch_inferior_register)
14179 (arm_store_inferior_register): Change prototype to take a
14180 regcache. Adjust.
14181 * win32-i386-low.c (i386_fetch_inferior_register)
14182 (i386_store_inferior_register): Change prototype to take a
14183 regcache. Adjust.
14184 * win32-low.c (child_fetch_inferior_registers)
14185 (child_store_inferior_registers): Change prototype to take a
14186 regcache. Adjust.
14187 (win32_wait): Adjust.
14188 (win32_fetch_inferior_registers): Change prototype to take a
14189 regcache. Adjust.
14190 (win32_store_inferior_registers): Adjust.
14191 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14192 store_inferior_register>: Change prototype to take a regcache.
14193
14194 2010-01-20 Doug Evans <dje@google.com>
14195
14196 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14197 #ifdef.
14198 (linux_wait_for_event1, linux_init_signals): Ditto.
14199 (W_STOPCODE): Provide definition if missing.
14200
14201 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14202
14203 * linux-low.c (linux_core_of_thread): New.
14204 (compare_ints, show_process, list_threads): New.
14205 (linux_qxfer_osdata): Report threads and cores.
14206 (linux_target_op): Register linux_core_of_thread.
14207 * remote-utils.c (prepare_resume_reply): Report the core.
14208 (buffer_xml_printf): Support %d specifier.
14209 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14210 New.
14211 (handle_query): Handle qXfer:threads. Announce availability
14212 thereof.
14213 * target.h (struct target_ops): New field core_of_thread.
14214
14215 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14216
14217 * Makefile.in (clean): Remove new generated files.
14218 (reg-s390.o, reg-s390.c): Remove rules.
14219 (reg-s390x.o, reg-s390x.c): Likewise.
14220 (s390-linux32.o, s390-linux32.c): Add rules.
14221 (s390-linux64.o, s390-linux64.c): Likewise.
14222 (s390x-linux64.o, s390x-linux64.c): Likewise.
14223 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14224 * linux-s390-low.c: Include <elf.h>.
14225 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14226 (init_registers_s390): Remove prototype.
14227 (init_registers_s390x): Likewise.
14228 (init_registers_s390_linux32): Add prototype.
14229 (init_registers_s390_linux64): Likewise.
14230 (init_registers_s390x_linux64): Likewise.
14231 (s390_num_regs_3264): New define.
14232 (s390_regmap_3264): New global variable.
14233 (s390_cannot_fetch_register): Remove obsolete check.
14234 (s390_cannot_store_register): Likewise.
14235 (s390_collect_ptrace_register): Handle upper/lower register halves.
14236 (s390_supply_ptrace_register): Likewise.
14237 (s390_fill_gregset): Update to register number changes.
14238 (s390_get_hwcap): New routine.
14239 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14240 Install appropriate regmap and register set.
14241
14242 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14243
14244 * server.c (gdbserver_version): Update copyright year to 2010.
14245 * gdbreplay.c (gdbreplay_version): Likewise.
14246
14247 2009-12-28 Doug Evans <dje@google.com>
14248
14249 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14250 elf/external.h. Include <elf.h> instead but only if necessary.
14251
14252 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14253
14254 * linux-low.c (linux_remove_process): Remove `detaching'
14255 parameter. Don't release/detach from thread_db here.
14256 (linux_kill): Release/detach from thread_db here, ...
14257 (linux_detach): ... and here, before actually detaching.
14258 (linux_wait_1): ... and here, when a process exits.
14259 * thread-db.c (any_thread_of): New.
14260 (thread_db_free): Switch the current inferior to a thread of the
14261 passed in process.
14262
14263 2009-12-21 Doug Evans <dje@google.com>
14264
14265 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14266
14267 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14268 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14269 warning ifndef __NR_tkill. Move setting of errno there too.
14270 Delete unnecessary resetting of errno after syscall.
14271 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14272
14273 * configure.ac: Check for dladdr.
14274 * config.in: Regenerate.
14275 * configure: Regenerate.
14276 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14277 (try_thread_db_load): Update.
14278
14279 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14280
14281 2009-12-18 Doug Evans <dje@google.com>
14282
14283 * event-loop.c: Include unistd.h if it exists.
14284
14285 * linux-low.c (my_waitpid): Move definition away from being in
14286 between linux_tracefork_child/linux_test_for_tracefork.
14287
14288 * gdb_proc_service.h (psaddr_t): Fix type.
14289 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14290 signature to match glibc.
14291
14292 2009-12-16 Doug Evans <dje@google.com>
14293
14294 * linux-low.c (linux_read_memory): Fix argument to read.
14295
14296 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14297
14298 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14299 events, don't leave current_inferior pointing at null.
14300
14301 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14302
14303 * win32-low.c (LOG): Delete.
14304 (OUTMSG): Output to stderr.
14305 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14306 on compile time LOG macro.
14307 (win32_wait): Fix debug output.
14308
14309 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14310
14311 * win32-low.c (win32_add_one_solib): If the dll name is
14312 "ntdll.dll", prepend the system directory to the dll path.
14313
14314 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14317
14318 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14319 Vladimir Prus <vladimir@codesourcery.com>
14320
14321 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14322 * configure.ac: Check for __mcoldfire__ and set
14323 gdb_cv_m68k_is_coldfire.
14324 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14325 reg-cf.o and reg-m68k.o.
14326 * configure: Regenerated.
14327
14328 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14329
14330 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14331 Pass it to thread_db_free.
14332 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14333 proper `detaching' argument to linux_remove_process.
14334 * linux-low.h (thread_db_free): Add `detaching' parameter.
14335 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14336 to thread_db_free.
14337 (thread_db_free): Add `detaching' parameter. Only
14338 call td_ta_clear_event if detaching from process.
14339
14340 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14341
14342 * thread-db.c (thread_db_free): Fix typo.
14343
14344 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14345
14346 PR gdb/10838
14347 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14348
14349 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14350
14351 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14352 with an i686 compiler.
14353 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14354 needed.
14355 * configure: Rebuilt.
14356
14357 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14358
14359 PR gdb/10783
14360
14361 * server.c (handle_search_memory_1): Correct read_addr initialization
14362 in loop for searching subsequent chunks.
14363
14364 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14365
14366 * configure.ac: New --with-libthread-db option.
14367 * thread-db.c: Allow direct dependence on libthread_db.
14368 (thread_db_free): Adjust.
14369 * config.in: Regenerate.
14370 * configure: Likewise.
14371
14372 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14373
14374 PR gdb/10757
14375 * thread-db.c (attach_thread): New function.
14376 (maybe_attach_thread): Return success/failure.
14377 (find_new_threads_callback): Adjust.
14378 (thread_db_find_new_threads): Loop until no new threads.
14379
14380 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14381
14382 * proc-service.c (ps_lgetregs): Formatting.
14383
14384 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14385
14386 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14387 * configure.ac: Adjust.
14388 * linux-low.h (struct process_info_private): Move members to struct
14389 thread_db.
14390 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14391 * linux-low.c (linux_remove_process): Adjust.
14392 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14393 * server.c (handle_query): Move code ...
14394 (handle_monitor_command): ... here. New function.
14395 * target.h (struct target_ops): New member.
14396 * thread-db.c (struct thread_db): New.
14397 (libthread_db_search_path): New variable.
14398 (thread_db_create_event, thread_db_enable_reporting)
14399 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14400 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14401 (try_thread_db_load_1, dladdr_to_soname): New functions.
14402 (try_thread_db_load, thread_db_load_search): New functions.
14403 (thread_db_init): Search for libthread_db.
14404 (thread_db_free): New function.
14405 (thread_db_handle_monitor_command): Likewise.
14406 * config.in: Regenerate.
14407 * configure: Regenerate.
14408
14409 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14410
14411 * spu-low.c (spu_kill): Wait for inferior to terminate.
14412 Call clear_inferiors.
14413 (spu_detach): Call clear_inferiors.
14414
14415 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14416
14417 * aclocal.m4: Regenerate.
14418 * config.in: Likewise.
14419 * configure: Likewise.
14420
14421 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14422
14423 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14424 (parse_spufs_run): New function.
14425 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14426 (ppc_breakpoint_at): Handle SPU breakpoints.
14427
14428 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14429
14430 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14431 (SPUFS_MAGIC): Define.
14432 (spu_enumerate_spu_ids): New function.
14433 (linux_qxfer_spu): New function.
14434 (linux_target_ops): Install linux_qxfer_spu.
14435
14436 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14437
14438 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14439 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14440 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14441 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14442 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14443 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14444 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14445 (init_registers_powerpc_cell32l): Add prototype.
14446 (init_registers_powerpc_cell64l): Likewise.
14447 (ppc_arch_setup): Detect Cell/B.E. architecture.
14448
14449 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14450
14451 * Makefile.in (datarootdir): New variable.
14452
14453 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14454
14455 * linux-low.c (linux_write_memory): Update debugging output.
14456 * Makefile.in (clean): Add new descriptions.
14457 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14458 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14459 * configure.srv: Add new files for arm*-*-linux*.
14460 * linux-arm-low.c: Add new declarations.
14461 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14462 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14463 (HWCAP_VFPv3D16): New.
14464 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14465 instead of __IWMMXT__.
14466 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14467 (arm_arch_setup): New.
14468 (target_regsets): Remove #ifdef. Add VFP regset.
14469 (the_low_target): Use arm_arch_setup.
14470
14471 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14472
14473 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14474 the main thread again.
14475
14476 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14477
14478 Adding Neutrino gdbserver.
14479 * configure: Regenerated.
14480 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14481 * configure.srv (i[34567]86-*-nto*): New target.
14482 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14483 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14484 (nto_comctrl) [__QNX__]: New function.
14485 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14486
14487 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14488
14489 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14490 srv_tgtobj.
14491
14492 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14493 Pedro Alves <pedro@codesourcery.com>
14494
14495 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14496 don't support CONTEXT_EXTENDED_REGISTERS.
14497 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14498 (the_low_target): Install them.
14499 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14500 failing with ERROR_PIPE_NOT_CONNECTED.
14501
14502 2009-06-30 Doug Evans <dje@google.com>
14503 Pierre Muller <muller@ics.u-strasbg.fr>
14504
14505 Add h/w watchpoint support to x86-linux, win32-i386.
14506 * Makefile.in (SFILES): Add i386-low.c
14507 (i386_low_h): Define.
14508 (i386-low.o): Add dependencies.
14509 (linux-x86-low.o): Add i386-low.h dependency.
14510 (win32-i386-low.o): Ditto.
14511 * i386-low.c: New file.
14512 * i386-low.h: New file.
14513 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14514 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14515 * linux-low.c (linux_add_process): Initialize arch_private.
14516 (linux_remove_process): Free arch_private.
14517 (add_lwp): Initialize arch_private.
14518 (delete_lwp): Free arch_private.
14519 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14520 provided.
14521 * linux-low.h (process_info_private): New member arch_private.
14522 (lwp_info): New member arch_private.
14523 (linux_target_ops): New members new_process, new_thread,
14524 prepare_to_resume.
14525 (ptid_of): New macro.
14526 * linux-x86-low.c: Include stddef.h, i386-low.h.
14527 (arch_process_info): New struct.
14528 (arch_lwp_info): New struct.
14529 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14530 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14531 (i386_dr_low_get_status): New function.
14532 (x86_insert_point, x86_remove_point): New functions.
14533 (x86_stopped_by_watchpoint): New function.
14534 (x86_stopped_data_address): New function.
14535 (x86_linux_new_process, x86_linux_new_thread): New functions.
14536 (x86_linux_prepare_to_resume): New function.
14537 (the_low_target): Add entries for insert_point, remove_point,
14538 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14539 prepare_to_resume.
14540 * server.c (debug_hw_points): New global.
14541 (monitor_show_help): Document set debug-hw-points.
14542 (handle_query): Process "set debug-hw-points".
14543 * server.h (debug_hw_points): Declare.
14544 (paddress): Declare.
14545 * utils.c (NUMCELLS, CELLSIZE): New macros.
14546 (get_sell, xsnprintf, paddress): New functions.
14547 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14548 remove_point, stopped_by_watchpoint, stopped_data_address.
14549 * win32-i386-low.c: Include i386-low.h.
14550 (debug_reg_state): Replaces dr.
14551 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14552 (i386_dr_low_get_status): New function.
14553 (i386_insert_point, i386_remove_point): New functions.
14554 (i386_stopped_by_watchpoint): New function.
14555 (i386_stopped_data_address): New function.
14556 (i386_initial_stuff): Update.
14557 (get_thread_context,set_thread_context,i386_thread_added): Update.
14558 (the_low_target): Add entries for insert_point,
14559 remove_point, stopped_by_watchpoint, stopped_data_address.
14560 * win32-low.c (win32_insert_watchpoint): New function.
14561 (win32_remove_watchpoint): New function.
14562 (win32_stopped_by_watchpoint): New function.
14563 (win32_stopped_data_address): New function.
14564 (win32_target_ops): Add entries for insert_watchpoint,
14565 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14566 * win32-low.h (win32_target_ops): New members insert_point,
14567 remove_point, stopped_by_watchpoint, stopped_data_address.
14568
14569 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14570
14571 * server.c (process_serial_event): Re-return unsupported, not
14572 error, if the type isn't recognized. Re-allow supporting only
14573 insert or remove packets. Also call require_running for
14574 breakpoints. Add missing break statement to default case. Tidy.
14575 * target.h (struct target_ops): Rename insert_watchpoint to
14576 insert_point, and remove_watchpoint to remove_point.
14577
14578 * linux-low.h (struct linux_target_ops): Likewise.
14579 * linux-low.c (linux_insert_watchpoint): Rename to ...
14580 (linux_insert_point): ... this. Adjust.
14581 (linux_remove_watchpoint): Rename to ...
14582 (linux_remove_point): ... this. Adjust.
14583 (linux_target_ops): Adjust.
14584 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14585 (cris_insert_point): ... this.
14586 (cris_remove_watchpoint): Rename to ...
14587 (cris_remove_point): ... this.
14588 (the_low_target): Adjust.
14589
14590 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14591
14592 * server.c (handle_v_kill): Pass signal_pid to
14593 kill_inferior if multi_process is zero.
14594
14595 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14596
14597 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14598 * target.h (target_ops): Comment for *_watchpoint to make it clear
14599 the functions can get types '0' and '1'.
14600
14601 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14602
14603 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14604 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14605 * regcache.c (get_regcache): Likewise.
14606 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14607 * win32-low.c (child_fetch_inferior_registers): Remove check for
14608 regno 0.
14609
14610 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14611 Pedro Alves <pedro@codesourcery.com>
14612
14613 * target.h (struct target_ops) <supports_multi_process>: New
14614 callback.
14615 (target_supports_multi_process): New.
14616 * server.c (handle_query): Even if GDB reports support, only
14617 enable multi-process if the target also supports it. Report
14618 multi-process support only if the target backend supports it.
14619 * linux-low.c (linux_supports_multi_process): New function.
14620 (linux_target_ops): Install it as target_supports_multi_process
14621 callback.
14622
14623 2009-05-24 Doug Evans <dje@google.com>
14624
14625 Global renaming of find_thread_pid to find_thread_ptid.
14626 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14627 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14628 All callers updated.
14629
14630 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14631 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14632 directly.
14633
14634 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14635 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14636 (linux_resume_one_lwp): Ditto.
14637
14638 2009-05-23 Doug Evans <dje@google.com>
14639
14640 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14641 from struct inferior_list_entry * to struct lwp_info *.
14642 All callers updated.
14643
14644 2009-05-13 Doug Evans <dje@google.com>
14645
14646 * linux-x86-low.c: Don't include assert.h.
14647 (x86_siginfo_fixup): Use fatal, not assert.
14648 (x86_arch_setup): Fix comment.
14649
14650 2009-05-12 Doug Evans <dje@google.com>
14651
14652 Biarch support for i386/amd64 gdbserver.
14653 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14654 Add linux-x86-low.c.
14655 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14656 (linux-x86-low.o): Add.
14657 * linux-x86-64-low.c: Delete.
14658 * linux-i386-low.c: Delete.
14659 * linux-x86-low.c: New file.
14660 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14661 linux-x86-low.o.
14662 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14663 linux-x86-low.o.
14664 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14665 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14666 (linux_child_pid_to_exec_file): New function.
14667 (elf_64_header_p, elf_64_file_p): New functions.
14668 (siginfo_fixup): New function.
14669 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14670 give target a chance to convert layout.
14671 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14672 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14673
14674 2009-05-07 Doug Evans <dje@google.com>
14675
14676 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14677 (regsets_store_inferior_registers): Ditto.
14678
14679 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14680
14681 PR server/10048
14682
14683 * linux-low.c (must_set_ptrace_flags): Delete.
14684 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14685 of the global.
14686 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14687 `lwp->must_set_ptrace_flags' instead.
14688 (linux_wait_for_event_1): Set ptrace options here.
14689 (linux_wait_1): ... not here.
14690
14691 2009-04-30 Doug Evans <dje@google.com>
14692
14693 * inferiors.c (started_inferior_callback): New function.
14694 (attached_inferior_callback): New function.
14695 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14696 * server.c (print_started_pid, print_attached_pid): New functions.
14697 (detach_or_kill_for_exit): New function.
14698 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14699 * server.h (have_started_inferiors_p): Declare.
14700 (have_attached_inferiors_p): Declare.
14701
14702 * inferiors.c (remove_process): Fix memory leak, free process.
14703 * linux-low.c (linux_remove_process): New function.
14704 (linux_kill): Call it instead of remove_process.
14705 (linux_detach, linux_wait_1): Ditto.
14706
14707 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14708
14709 * configure.srv: Add x86 Windows CE target.
14710
14711 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14712
14713 * inferiors.c (get_thread_process): Make global.
14714 * server.h (get_thread_process): Add prototype.
14715 * thread-db.c (find_one_thread): Use get_thread_process
14716 instead of current_process.
14717 (thread_db_get_tls_address): Do not crash if called when
14718 thread layer is not yet initialized.
14719
14720 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14721
14722 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14723 * spu-low.c (current_tid): Rename to ...
14724 (current_ptid): ... this.
14725 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14726 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14727 ptid_get_lwp (current_ptid) instead of current_tid.
14728 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14729 instead of current_tid. Use find_process_pid to verify pid
14730 argument is valid. Pass proper argument to remove_process.
14731 (spu_thread_alive): Compare current_ptid instead of current_tid.
14732 (spu_resume): Likewise.
14733
14734 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14735
14736 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14737 variable.
14738
14739 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14740
14741 Implement the multiprocess extensions, and add linux multiprocess
14742 support.
14743
14744 * server.h (ULONGEST): Declare.
14745 (struct ptid, ptid_t): New.
14746 (minus_one_ptid, null_ptid): Declare.
14747 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14748 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14749 (struct inferior_list_entry): Change `id' type from unsigned from
14750 to ptid_t.
14751 (struct sym_cache, struct breakpoint, struct
14752 process_info_private): Forward declare.
14753 (struct process_info): Declare.
14754 (current_process): Declare.
14755 (all_processes): Declare.
14756 (initialize_inferiors): Declare.
14757 (add_thread): Adjust to use ptid_t.
14758 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14759 (add_process, remove_process, find_thread_pid): Declare.
14760 (find_inferior_id): Adjust to use ptid_t.
14761 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14762 (multi_process): Declare.
14763 (push_event): Adjust to use ptid_t.
14764 (read_ptid, write_ptid): Declare.
14765 (prepare_resume_reply): Adjust to use ptid_t.
14766 (clear_symbol_cache): Declare.
14767 * inferiors.c (all_processes): New.
14768 (null_ptid, minus_one_ptid): New.
14769 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14770 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14771 (add_thread): Change unsigned long to ptid. Remove gdb_id
14772 parameter. Adjust.
14773 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14774 (gdb_id_to_thread): Rename to ...
14775 (find_thread_pid): ... this. Change unsigned long to ptid.
14776 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14777 (loaded_dll, pull_pid_from_list): Adjust.
14778 (add_process, remove_process, find_process_pid)
14779 (get_thread_process, current_process, initialize_inferiors): New.
14780 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14781 (struct target_waitstatus) <related_pid>: Ditto.
14782 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14783 return type to int.
14784 (struct target_ops) <join>: Add `pid' argument.
14785 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14786 (struct target_ops) <wait>: Add `ptid' field. Change return type
14787 to ptid.
14788 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14789 (mywait): Add `ptid' argument. Change return type to ptid_t.
14790 (target_pid_to_str): Declare.
14791 * target.c (set_desired_inferior): Adjust to use ptids.
14792 (mywait): Add new `ptid' argument. Adjust.
14793 (target_pid_to_str): New.
14794 * mem-break.h (free_all_breakpoints): Declare.
14795 * mem-break.c (breakpoints): Delelete.
14796 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14797 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14798 to use per-process breakpoint list.
14799 (free_all_breakpoints): New.
14800 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14801 (symbol_cache, all_symbols_looked_up): Delete.
14802 (hexchars): New.
14803 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14804 read_ptid): New.
14805 (prepare_resume_reply): Change ptid argument's type from unsigned
14806 long to ptid_t. Adjust. Implement W;process and X;process.
14807 (free_sym_cache, clear_symbol_cache): New.
14808 (look_up_one_symbol): Adjust to per-process symbol cache. *
14809 * server.c (cont_thread, general_thread, step_thread): Change type
14810 to ptid_t.
14811 (attached): Delete.
14812 (multi_process): New.
14813 (last_ptid): Change type to ptid_t.
14814 (struct vstop_notif) <ptid>: Change type to ptid_t.
14815 (queue_stop_reply, push_event): Change `ptid' argument's type to
14816 ptid_t.
14817 (discard_queued_stop_replies): Add `pid' argument.
14818 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14819 changes. Don't reference the `attached' global.
14820 (attach_inferior): Adjust to mywait interface changes.
14821 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14822 features. Handle and report "multiprocess+". Handle
14823 "qAttached:PID".
14824 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14825 changes.
14826 (handle_v_kill): New.
14827 (handle_v_stopped): Adjust to use target_pid_to_str.
14828 (handle_v_requests): Allow multiple attaches and runs when
14829 multiprocess extensions are in effect. Handle "vKill".
14830 (myresume): Adjust to use ptids.
14831 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14832 (handle_status): Adjust to discard_queued_stop_replies interface
14833 change.
14834 (first_thread_of, kill_inferior_callback)
14835 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14836 (main): Call initialize_inferiors. Adjust to use ptids, killing
14837 and detaching from all inferiors. Handle multiprocess packet
14838 variants.
14839 * linux-low.h: Include gdb_proc_service.h.
14840 (struct process_info_private): New.
14841 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14842 <lwpid_of>: Use ptid_get_lwp.
14843 (get_lwp_thread): Adjust.
14844 (struct lwp_info): Add `dead' member.
14845 (find_lwp_pid): Declare.
14846 * linux-low.c (thread_db_active): Delete.
14847 (new_inferior): Adjust comment.
14848 (inferior_pid): Delete.
14849 (linux_add_process): New.
14850 (handle_extended_wait): Adjust.
14851 (add_lwp): Change unsigned long to ptid.
14852 (linux_create_inferior): Add process to processes table. Adjust
14853 to use ptids. Don't set new_inferior here.
14854 (linux_attach_lwp): Rename to ...
14855 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14856 it. Adjust to use ptids.
14857 (linux_attach_lwp): New.
14858 (linux_attach): Add process to processes table. Don't set
14859 new_inferior here.
14860 (struct counter): New.
14861 (second_thread_of_pid_p, last_thread_of_process_p): New.
14862 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14863 multiple processes.
14864 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14865 processes. Remove process from process table.
14866 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14867 to multiple processes.
14868 (any_thread_of): New.
14869 (linux_detach): Add `pid' argument, and handle it. Remove process
14870 from processes table.
14871 (linux_join): Add `pid' argument. Handle it.
14872 (linux_thread_alive): Change unsighed long argument to ptid_t.
14873 Consider dead lwps as not being alive.
14874 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14875 threads we're not interested in.
14876 (same_lwp, find_lwp_pid): New.
14877 (linux_wait_for_lwp): Change `pid' argument's type from int to
14878 ptid_t. Adjust.
14879 (linux_wait_for_event): Rename to ...
14880 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14881 from int to ptid_t. Adjust.
14882 (linux_wait_for_event): New.
14883 (linux_wait_1): Add `ptid' argument. Change return type to
14884 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14885 that exit from the process table.
14886 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14887 Adjust.
14888 (mark_lwp_dead): New.
14889 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14890 stopping all threads, mark its main lwp as dead.
14891 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14892 ptids.
14893 (fetch_register, usr_store_inferior_registers)
14894 (regsets_fetch_inferior_registers)
14895 (regsets_store_inferior_registers, linux_read_memory)
14896 (linux_write_memory): Inline `inferior_pid'.
14897 (linux_look_up_symbols): Adjust to use per-process
14898 `thread_db_active'.
14899 (linux_request_interrupt): Adjust to use ptids.
14900 (linux_read_auxv): Inline `inferior_pid'.
14901 (initialize_low): Don't reference thread_db_active.
14902 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14903 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14904 (ps_getpid): Return the pid of the current inferior.
14905 * thread-db.c (proc_handle, thread_agent): Delete.
14906 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14907 per-process data.
14908 (find_one_thread): Change argument type to ptid_t. Adjust to
14909 per-process data.
14910 (maybe_attach_thread): Adjust to per-process data and ptids.
14911 (thread_db_find_new_threads): Ditto.
14912 (thread_db_init): Ditto.
14913 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14914 processes table. Adjust to use ptids.
14915 (spu_kill, spu_detach): Adjust interface. Remove process from
14916 processes table.
14917 (spu_join, spu_thread_alive): Adjust interface.
14918 (spu_wait): Adjust interface. Remove process from processes
14919 table. Adjust to use ptids.
14920 * win32-low.c (current_inferior_tid): Delete.
14921 (current_inferior_ptid): New.
14922 (debug_event_ptid): New.
14923 (thread_rec): Take a ptid. Adjust.
14924 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14925 (child_delete_thread): Ditto.
14926 (do_initial_child_stuff): Add `attached' argument. Add process to
14927 processes table.
14928 (child_fetch_inferior_registers, child_store_inferior_registers):
14929 Adjust.
14930 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14931 (win32_attach): Pass 1 to do_initial_child_stuff.
14932 (win32_kill): Adjust interface. Remove process from processes
14933 table.
14934 (win32_detach): Ditto.
14935 (win32_join): Adjust interface.
14936 (win32_thread_alive): Take a ptid.
14937 (win32_resume): Adjust to use ptids.
14938 (get_child_debug_event): Ditto.
14939 (win32_wait): Adjust interface. Remove exiting process from
14940 processes table.
14941
14942 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14943
14944 Non-stop mode support.
14945
14946 * server.h (non_stop): Declare.
14947 (gdb_client_data, handler_func): Declare.
14948 (delete_file_handler, add_file_handler, start_event_loop):
14949 Declare.
14950 (handle_serial_event, handle_target_event, push_event)
14951 (putpkt_notif): Declare.
14952 * target.h (enum resume_kind): New.
14953 (struct thread_resume): Replace `step' field by `kind' field.
14954 (TARGET_WNOHANG): Define.
14955 (struct target_ops) <wait>: Add `options' argument.
14956 <supports_non_stop, async, start_non_stop>: New fields.
14957 (target_supports_non_stop, target_async): New.
14958 (start_non_stop): Declare.
14959 (mywait): Add `options' argument.
14960 * target.c (mywait): Add `options' argument. Print child exit
14961 notifications here.
14962 (start_non_stop): New.
14963 * server.c (non_stop, own_buf, mem_buf): New globals.
14964 (struct vstop_notif): New.
14965 (notif_queue): New global.
14966 (queue_stop_reply, push_event, discard_queued_stop_replies)
14967 (send_next_stop_reply): New.
14968 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14969 interface changes.
14970 (attach_inferior): In non-stop mode, don't wait for the target
14971 here.
14972 (handle_general_set): Handle QNonStop.
14973 (handle_query): When handling qC, return the current general
14974 thread, instead of the first thread of the list.
14975 (handle_query): If the backend supports non-stop mode, include
14976 QNonStop+ in the qSupported query response.
14977 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14978 and non-stop mode.
14979 (handle_v_attach, handle_v_run): Handle non-stop mode.
14980 (handle_v_stopped): New.
14981 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14982 (myresume): Adjust to use resume_kind. Handle non-stop.
14983 (queue_stop_reply_callback): New.
14984 (handle_status): Handle non-stop mode.
14985 (main): Clear non_stop flag on reconnection. Use the event-loop.
14986 Refactor serial protocol handling from here ...
14987 (process_serial_event): ... to this new function. When GDB
14988 selects any thread, select one here. In non-stop mode, wait until
14989 GDB acks all pending events before exiting.
14990 (handle_serial_event, handle_target_event): New.
14991 * remote-utils.c (remote_open): Install remote_desc in the event
14992 loop.
14993 (remote_close): Remove remote_desc from the event loop.
14994 (putpkt_binary): Rename to...
14995 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14996 (putpkt_binary): New as wrapper around putpkt_binary_1.
14997 (putpkt_notif): New.
14998 (prepare_resume_reply): In non-stop mode, don't change the
14999 general_thread.
15000 * event-loop.c: New.
15001 * Makefile.in (OBJ): Add event-loop.o.
15002 (event-loop.o): New rule.
15003
15004 * linux-low.h (pid_of): Moved here.
15005 (lwpid_of): New.
15006 (get_lwp_thread): Use lwpid_of.
15007 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15008 * linux-low.c (pid_of): Delete.
15009 (inferior_pid): Use lwpid_of.
15010 (linux_event_pipe): New.
15011 (target_is_async_p): New.
15012 (delete_lwp): New.
15013 (handle_extended_wait): Use lwpid_of.
15014 (add_lwp): Don't set lwpid field.
15015 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15016 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15017 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15018 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15019 first. Adjust to linux_wait_for_event interface changes. Use
15020 lwpid_of.
15021 (linux_detach): Don't delete the main lwp here.
15022 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15023 (status_pending_p): Don't consider explicitly suspended lwps.
15024 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15025 pointer. Add OPTIONS argument. Change return type to int. Use
15026 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15027 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15028 pointer. Add status pointer argument. Return a pid instead of a
15029 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15030 changes. In non-stop mode, don't switch to a random thread.
15031 (linux_wait): Rename to...
15032 (linux_wait_1): ... this. Add target_options argument, and handle
15033 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15034 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15035 clean exit and signal exit code. Don't stop all threads in
15036 non-stop mode. In all-stop mode, only stop all threads when
15037 reporting a stop to GDB. Handle explicit thread stop requests.
15038 (async_file_flush, async_file_mark): New.
15039 (linux_wait): New.
15040 (send_sigstop): Use lwpid_of.
15041 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15042 interface changes. In non-stop mode, don't switch to a random
15043 thread.
15044 (linux_resume_one_lwp): Use lwpid_of.
15045 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15046 (linux_resume_one_thread): ... this. Handle resume_stop. In
15047 non-stop mode, don't look for pending flag in all threads.
15048 (resume_status_pending_p): Don't consider explicitly suspended
15049 threads.
15050 (my_waitpid): Reimplement. Emulate __WALL.
15051 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15052 Use lwpid_of.
15053 (sigchld_handler, linux_supports_non_stop, linux_async)
15054 (linux_start_non_stop): New.
15055 (linux_target_ops): Register linux_supports_non_stop, linux_async
15056 and linux_start_non_stop.
15057 (initialize_low): Install SIGCHLD handler.
15058 * thread-db.c (thread_db_create_event, find_one_thread)
15059 (thread_db_get_tls_address): Use lwpid_of.
15060 * win32-low.c (win32_detach): Adjust to use resume_kind.
15061 (win32_wait): Add `options' argument.
15062 * spu-low.c (spu_resume): Adjust to use resume_kind.
15063 (spu_wait): Add `options' argument.
15064
15065 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15066
15067 Decouple target code from remote protocol.
15068
15069 * target.h (enum target_waitkind): New.
15070 (struct target_waitstatus): New.
15071 (struct target_ops) <wait>: Return an unsigned long. Take a
15072 target_waitstatus pointer instead of a char pointer.
15073 (mywait): Likewise.
15074 * target.c (mywait): Change prototype to return an unsigned long.
15075 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15076 * server.h (thread_from_wait, old_thread_from_wait): Delete
15077 declarations.
15078 (prepare_resume_reply): Change prototype to take a
15079 target_waitstatus.
15080 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15081 (last_status, last_ptid): New.
15082 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15083 pid instead of a signal.
15084 (attach_inferior): Remove "status" and "signal" parameters.
15085 Adjust.
15086 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15087 not as an address.
15088 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15089 (handle_v_requests, myresume): Remove "status" and "signal"
15090 parameters. Adjust.
15091 (handle_status): New.
15092 (main): Delete local `status'. Adjust.
15093 * remote-utils.c: Include target.h.
15094 (prepare_resume_reply): Change prototype to take a
15095 target_waitstatus. Adjust.
15096
15097 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15098 interface.
15099 * spu-low.c (spu_wait): Adjust.
15100 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15101 Delete.
15102 (win32_wait): Adjust.
15103
15104 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15105
15106 * target.h (struct thread_resume): Delete leave_stopped member.
15107 (struct target_ops): Add a `n' argument to the `resume' callback.
15108 * server.c (start_inferior): Adjust.
15109 (handle_v_cont, myresume): Adjust.
15110 * linux-low.c (check_removed_breakpoint): Adjust to resume
15111 interface change, and to removed leave_stopped field.
15112 (resume_ptr): Delete.
15113 (struct thread_resume_array): New.
15114 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15115 resume interface change.
15116 (linux_continue_one_thread, linux_queue_one_thread)
15117 (resume_status_pending_p): Check if the resume field is NULL
15118 instead of checking the leave_stopped member.
15119 (linux_resume): Adjust to the target resume interface change.
15120 * spu-low.c (spu_resume): Adjust to the target resume interface
15121 change.
15122 * win32-low.c (win32_detach, win32_resume): Ditto.
15123
15124 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15125
15126 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15127 flag.
15128 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15129 pending.
15130 (linux_continue_one_thread): Only preserve the stepping flag if
15131 there's a pending breakpoint.
15132
15133 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15134
15135 * server.c (main): After the inferior having exited, call
15136 remote_close before exiting gdbserver.
15137
15138 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15139
15140 Fix size of FPSCR in Power 7 processors.
15141 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15142 (PPC_FEATURE_HAS_DFP): New #define.
15143 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15144 size of the FPSCR.
15145
15146 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15147
15148 * server.c (handle_query) Whitespace and formatting.
15149
15150 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15151
15152 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15153 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15154 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15155 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15156 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15157 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15158 Makefile.in, configure.ac: Fix whitespace throughout.
15159 * configure: Regenerate.
15160
15161 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15162
15163 * inferiors.c (find_inferior): Make it safe for the callback
15164 function to delete the currently iterated inferior.
15165
15166 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15167
15168 * Makefile.in (linuw_low_h): Move higher.
15169 (thread-db.o): Depend on $(linux_low_h).
15170
15171 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15172
15173 Rename "process" to "lwp" throughout.
15174
15175 * linux-low.c (all_processes): Rename to...
15176 (all_lwps): ... this.
15177 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15178 (add_process): Rename to ...
15179 (add_lwp): ... this. Adjust.
15180 (linux_create_inferior): Adjust.
15181 (linux_attach_lwp): Adjust.
15182 (linux_attach): Adjust.
15183 (linux_kill_one_process): Rename to ...
15184 (linux_kill_one_lwp): ... this. Adjust.
15185 (linux_kill): Adjust.
15186 (linux_detach_one_process): Rename to ...
15187 (linux_detach_one_lwp): ... this. Adjust.
15188 (linux_detach): Adjust.
15189 (check_removed_breakpoint): Adjust.
15190 (status_pending_p): Adjust.
15191 (linux_wait_for_process): Rename to ...
15192 (linux_wait_for_lwp): ... this. Adjust.
15193 (linux_wait_for_event): Adjust.
15194 (send_sigstop): Adjust.
15195 (wait_for_sigstop): Adjust.
15196 (stop_all_processes): Rename to ...
15197 (stop_all_lwps): ... this.
15198 (linux_resume_one_process): Rename to ...
15199 (linux_resume_one_lwp): ... this. Adjust.
15200 (linux_set_resume_request, linux_continue_one_thread)
15201 (linux_queue_one_thread, resume_status_pending_p)
15202 (usr_store_inferior_registers, regsets_store_inferior_registers)
15203 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15204 Adjust.
15205 * linux-low.h (get_process): Rename to ...
15206 (get_lwp): ... this. Adjust.
15207 (get_thread_process): Rename to ...
15208 (get_thread_lwp): ... this. Adjust.
15209 (get_process_thread): Rename to ...
15210 (get_lwp_thread): ... this. Adjust.
15211 (struct process_info): Rename to ...
15212 (struct lwp_info): ... this.
15213 (all_processes): Rename to ...
15214 (all_lwps): ... this.
15215 * proc-service.c (ps_lgetregs): Adjust.
15216 * thread-db.c (thread_db_create_event, find_one_thread)
15217 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15218
15219 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15220
15221 * server.c (handle_query): Handle "qAttached".
15222
15223 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15224
15225 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15226 GPLv3, update license URL.
15227
15228 2009-03-01 Doug Evans <dje@google.com>
15229
15230 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15231 (server_h): Add gdb_signals.h.
15232 (signals.o): Update.
15233 * server.h (target_signal_from_host,target_signal_to_host_p)
15234 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15235
15236 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15237
15238 * remote-utils.c (getpkt): Also generate remote-debug
15239 information if noack_mode is set.
15240
15241 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15242
15243 * server.c (handle_query): Report qXfer:siginfo:read and
15244 qXfer:siginfo:write as supported and handle them.
15245 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15246 * linux-low.c (linux_xfer_siginfo): New.
15247 (linux_target_ops): Set it.
15248
15249 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15250
15251 * server.c (gdbserver_usage): Mention --remote-debug.
15252 (main): Accept '--remote-debug' switch.
15253
15254 2009-01-18 Doug Evans <dje@google.com>
15255
15256 * regcache.c (new_register_cache): No need to check result of xcalloc.
15257 * server.c (handle_search_memory): Back out calls to xmalloc,
15258 result is checked and error is returned to user upon failure.
15259 (handle_query): Ditto. Add more checks for result of malloc.
15260 (handle_v_cont): Check result of malloc, report error back to
15261 user upon failure.
15262 (handle_v_run): Ditto. Call freeargv.
15263 * server.h (freeargv): Declare.
15264 * utils.c (freeargv): New fn.
15265
15266 2009-01-15 Doug Evans <dje@google.com>
15267
15268 * gdbreplay.c (perror_with_name): Make arg const char *.
15269 * server.h (target_signal_to_name): Make return type const char *.
15270 * thread-db.c (thread_db_err_str): Make return type const char *.
15271 * utils.c (perror_with_name): Make arg const char *.
15272
15273 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15274
15275 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15276 when handling a EXIT_PROCESS_DEBUG_EVENT.
15277
15278 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15279
15280 * gdbreplay.c (gdbreplay_version): Update copyright year.
15281 * server.c (gdbserver_version): Likewise.
15282
15283 2009-01-05 Doug Evans <dje@google.com>
15284
15285 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15286 (handle_extended_wait): Improve comment.
15287
15288 2008-12-13 Doug Evans <dje@google.com>
15289
15290 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15291 * server.h (ATTR_MALLOC): New macro.
15292 (xmalloc,xcalloc,xstrdup): Declare.
15293 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15294 * inferiors.c: Ditto.
15295 * linux-low.c: Ditto.
15296 * mem-break.c: Ditto.
15297 * regcache.c: Ditto.
15298 * remote-utils.c: Ditto.
15299 * server.c: Ditto.
15300 * target.c: Ditto.
15301 * win32-low.c: Ditto.
15302
15303 2008-12-12 Doug Evans <dje@google.com>
15304
15305 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15306 in debugging printf.
15307
15308 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15309
15310 2008-12-09 Doug Evans <dje@google.com>
15311
15312 * linux-low.h (struct process_info): Delete member tid, unused.
15313 * thread-db.c (find_one_thread): Update.
15314 (maybe_attach_thread): Update.
15315
15316 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15317
15318 * target.h (struct target_ops): Add qxfer_osdata member.
15319 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15320 and dirent.h.
15321 (linux_qxfer_osdata): New functions.
15322 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15323 callback.
15324 * server.c (handle_query): Handle "qXfer:osdata:read:".
15325 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15326 (buffer_xml_printf): New functions.
15327 * server.h (struct buffer): New.
15328 (buffer_grow_str, buffer_grow_str0): New macros.
15329 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15330 (buffer_xml_printf): Declare.
15331
15332 2008-11-24 Doug Evans <dje@google.com>
15333
15334 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15335
15336 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * server.c (handle_v_run): Always use the supplied argument list.
15339
15340 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15341
15342 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15343 (xtensa_regmap_table): Add entry for scompare1.
15344
15345 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15346
15347 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15348 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15349 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15350 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15351 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15352 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15353 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15354 XML target descriptions.
15355 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15356 when inferior is running on an ISA 2.05 or later processor. Add
15357 special case to return offset for full 64-bit slot of FPSCR when
15358 in 32-bits.
15359
15360 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15361
15362 * Makefile.in (SFILES, clean): Added sparc64 files.
15363 (reg-sparc64.o, reg-sparc64.c): New.
15364 * configure.srv (sparc*-*-linux*): New configuration.
15365 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15366 syscall arguments for SPARC.
15367 (regsets_store_inferior_registers): Likewise.
15368 * linux-sparc-low.c: New file.
15369
15370 2008-10-21 Doug Evans <dje@google.com>
15371
15372 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15373 (READLINE_DIR,READLINE_DEP): Delete.
15374 (INTERNAL_CFLAGS): Update.
15375 (LINTFLAGS): Update.
15376
15377 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15378
15379 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15380 whole argv from the last run, not just argv[0].
15381
15382 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15383
15384 * regcache.c (new_register_cache): Return NULL if the register
15385 cache size isn't known yet.
15386 (free_register_cache): Avoid dereferencing a NULL regcache.
15387
15388 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15389
15390 * configure.srv: Merge MIPS and MIPS64.
15391
15392 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15393
15394 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15395
15396 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15397
15398 * Makefile.in: Add required vsx dependencies.
15399
15400 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15401 Declare init_registers_powerpc_vsx32l.
15402 Declare init_registers_powerpc_vsx64l.
15403 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15404 (ppc_arch_setup): Check for VSX in hwcap.
15405 (ppc_fill_vsxregset): New function.
15406 (ppc_store_vsxregset): New function.
15407 Add new VSX entry in regset_info target_regsets.
15408
15409 * configure.srv: Add new VSX dependencies.
15410
15411 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15412
15413 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15414 (remote_open): Set or clear transport_is_reliable.
15415 (putpkt_binary): Don't expect acks in noack mode.
15416 (getpkt): Don't send ack/nac in noack mode.
15417 * server.c (handle_general_set): Handle QStartNoAckMode.
15418 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15419 qSupported.
15420 (main): Reset noack_mode on every connection.
15421 * server.h (noack_mode): Declare.
15422
15423 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15424
15425 * Makefile.in (GDBREPLAY_OBS): New variable.
15426 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15427
15428 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15429 Daniel Jacobowitz <dan@codesourcery.com>
15430
15431 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15432 (usr_store_inferior_registers): Likewise.
15433 (regsets_store_inferior_registers): Likewise.
15434
15435 2008-07-31 Rolf Jansen <rj@surtec.com>
15436 Pedro Alves <pedro@codesourcery.com>
15437
15438 * configure.ac: Check for memmem declaration.
15439 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15440 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15441 (disable_packet_qfThreadInfo): Unconditionally compile.
15442 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15443 * configure, config.in: Regenerate.
15444
15445 2008-07-28 Doug Kwan <dougkwan@google.com>
15446
15447 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15448 (linux_write_memory): Remove declaration of errno.
15449
15450 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15451
15452 * linux-low.c (handle_extended_wait): Do not use "status"
15453 variable uninitialized.
15454
15455 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15456
15457 * server.c (handle_v_attach): Inhibit reporting dll changes.
15458
15459 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15460
15461 * remote-utils.c (prepare_resume_reply): If requested, don't
15462 output "thread:TID" in the T stop reply.
15463
15464 * server.c (disable_packet_vCont, disable_packet_Tthread)
15465 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15466 (handle_query): If requested, disable support for qC, qfThreadInfo
15467 and qsThreadInfo.
15468 (handle_v_requests): If requested, disable support for vCont.
15469 (gdbserver_show_disableable): New.
15470 (main): Handle --disable-packet and --disable-packet=LIST.
15471
15472 * server.h (disable_packet_vCont, disable_packet_Tthread)
15473 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15474
15475 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15476
15477 * server.c (gdbserver_usage): Mention --version.
15478
15479 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15480
15481 * Makefile.in (gdbreplay.o): New rule.
15482
15483 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15484
15485 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15486 message, not gdbserver.
15487
15488 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15489 Nathan Sidwell <nathan@codesourcery.com>
15490 Joseph Myers <joseph@codesourcery.com>
15491
15492 * acinclude.m4: Include ../../config/acx.m4.
15493 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15494 * configure, config.in: Regenerate.
15495 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15496 * server.c (gdbserver_version): Print PKGVERSION.
15497 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15498 (main): Adjust gdbserver_usage calls.
15499 * gdbreplay.c (version, host_name): Add declarations.
15500 (gdbreplay_version, gdbreplay_usage): New.
15501 (main): Accept --version and --help options.
15502
15503 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15504
15505 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15506 (arm_breakpoint_at): Handle Thumb.
15507 (the_low_target): Add comment.
15508
15509 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15510
15511 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15512
15513 2008-05-09 Doug Evans <dje@google.com>
15514
15515 * server.h (decode_search_memory_packet): Declare.
15516 * remote-utils.c (decode_search_memory_packet): New fn.
15517 * server.c (handle_search_memory_1): New fn.
15518 (handle_search_memory): New fn.
15519 (handle_query): Process qSearch:memory packets.
15520
15521 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15522
15523 * regcache.c (registers_length): Remove.
15524 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15525 full register packet.
15526 * regcache.h (registers_length): Remove prototype.
15527 * server.h (PBUFSIZ): Define to 16384.
15528
15529 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15530
15531 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15532 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15533 powerpc-64l.o, and powerpc-altivec64l.o.
15534 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15535 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15536 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15537 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15538 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15539 to srv_xmlfiles.
15540
15541 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15542 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15543 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15544 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15545 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15546 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15547 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15548 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15549 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15550 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15551 (clean): Update.
15552
15553 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15554 (init_registers_powerpc_32l): ... this new prototype.
15555 (init_registers_powerpc_32): Remove, replace by ...
15556 (init_registers_powerpc_altivec32l): ... this new prototype.
15557 (init_registers_powerpc_e500): Remove, replace by ...
15558 (init_registers_powerpc_e500l): ... this new prototype.
15559 (init_registers_ppc64): Remove, replace by ...
15560 (init_registers_powerpc_64l): ... this new prototype.
15561 (init_registers_powerpc_64): Remove, replace by ...
15562 (init_registers_powerpc_altivec64l): ... this new prototype.
15563 (ppc_num_regs): Set to 73.
15564 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15565 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15566 (ppc_cannot_store_register): Handle orig_r3 and trap.
15567 (ppc_arch_setup): Update init_registers_... calls.
15568 (ppc_fill_gregset): Handle orig_r3 and trap.
15569
15570 * inferiors.c (clear_inferiors): Reset current_inferior.
15571
15572 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15573
15574 * acinclude.m4: Add override.m4.
15575 * configure: Regenerate.
15576
15577 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15578
15579 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15580 initial call to init_register_ppc64.
15581
15582 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15583
15584 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15585 single powerpc*-*-linux* case.
15586 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15587
15588 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15589
15590 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15591 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15592 from reg_xmlfiles.
15593 * linux-ppc-low.c: Include <elf.h>.
15594 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15595 (ppc_hwcap): New global variable.
15596 (ppc_regmap): Remove __SPE__ #ifdef sections.
15597 (ppc_regmap_e500): New global variable.
15598 (ppc_cannot_store_register): Update __SPE__ special case.
15599 (ppc_get_hwcap): New function.
15600 (ppc_arch_setup): Use it to determine whether inferior supports
15601 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15602 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15603 Do not access registers if target does not support AltiVec.
15604 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15605 Do not access registers if target does not support SPE.
15606 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15607
15608 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * linux-low.c (disabled_regsets, num_regsets): New.
15611 (use_regsets_p): Delete.
15612 (linux_wait_for_process): Clear disabled_regsets.
15613 (regsets_fetch_inferior_registers): Check and set it.
15614 (regsets_store_inferior_registers): Likewise.
15615 (linux_fetch_registers, linux_store_registers): Do not use
15616 use_regsets_p.
15617 (initialize_low): Allocate disabled_regsets.
15618
15619 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15620
15621 * Makefile.in (LIBOBJS): New.
15622 (OBS): Use LIBOBJS.
15623 (memmem.o): New rule.
15624 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15625 * configure: Regenerated.
15626
15627 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15628
15629 * server.c (handle_query): Never return "unsupported" for
15630 qXfer:features:read queries.
15631
15632 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15633
15634 * server.c (get_features_xml): Fix inverted condition.
15635 (handle_query): Always support qXfer:feature:read.
15636
15637 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15638
15639 * server.c (wrapper_argv): New.
15640 (start_inferior): Handle wrapper_argv. If set, expect an extra
15641 trap.
15642 (gdbserver_usage): Document --wrapper.
15643 (main): Parse --wrapper.
15644
15645 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15646
15647 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15648 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15649 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15650 (ppc_set_pc): Likewise.
15651 (ppc_arch_setup): New function.
15652 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15653 of collect_register.
15654 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15655
15656 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15657
15658 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15659 instead of linux-ppc64-low.o.
15660 * linux-ppc64-low.c: Remove file.
15661 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15662 (linux-ppc64-low.o): Remove rule.
15663
15664 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15665 (init_registers_powerpc_64): Likewise.
15666 (ppc_regmap): Conditionally define depending on __powerpc64__.
15667 (ppc_cannot_store_register): Do not special-case "fpscr" when
15668 compiled on __powerpc64__.
15669 (ppc_collect_ptrace_register): New function.
15670 (ppc_supply_ptrace_register): New function.
15671 (ppc_breakpoint): Change type to "unsigned int".
15672 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15673 (the_low_target): Conditionally provide initializers for the
15674 arch_setup member depending on __powerpc64__. Install
15675 collect_ptrace_register and supply_ptrace_register members.
15676
15677 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15678
15679 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15680 * server.c (gdbserver_xmltarget): Define.
15681 (get_features_xml): Use it to replace "target.xml" and arch_string.
15682
15683 * configure.srv: Remove srv_xmltarget. Add XML files that were
15684 mentioned there to srv_xmlfiles instead. Remove conditional tests
15685 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15686 srv_xmlfiles and srv_regobj to include all possible choices.
15687 * configure.ac (srv_xmltarget): Remove.
15688 (srv_xmlfiles): Do not add "target.xml".
15689 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15690 checks for supplementary target information.
15691 * configure: Regenerate.
15692 * Makefile.in (XML_TARGET): Remove.
15693 (target.xml): Remove rule.
15694 (clean): Do not clean up target.xml.
15695 (.PRECIOUS): Do not mention target.xml.
15696
15697 * target.h (struct target_ops): Remove arch_string member.
15698 * linux-low.c (linux_arch_string): Remove.
15699 (linux_target_ops): Remove arch_string initializer.
15700 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15701 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15702 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15703 * spu-low.c (spu_arch_string): Remove.
15704 (spu_target_ops): Remove arch_string initializer.
15705 * win32-low.c (win32_arch_string): Remove.
15706 (win32_target_ops): Remove arch_string initializer.
15707 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15708 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15709 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15710
15711 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15712
15713 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15714 by collect_ptrace_register and supply_ptrace_register hooks.
15715 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15716 instead of checking for the_low_target.left_pad_xfer.
15717 (usr_store_inferior_registers): Use collect_ptrace_register callback
15718 instead of checking for the_low_target.left_pad_xfer.
15719
15720 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15721 (s390_supply_ptrace_register): Likewise.
15722 (s390_fill_gregset): Call s390_collect_ptrace_register.
15723 (the_low_target): Update.
15724
15725 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15726 (ppc_supply_ptrace_register): Likewise.
15727 (the_low_target): Update.
15728
15729 * linux-i386-low.c (the_low_target): Update.
15730 * linux-x86-64-low.c (the_low_target): Update.
15731
15732 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15733
15734 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15735 reg-s390.o and reg-s390x.o.
15736
15737 * linux-low.c (new_inferior): New global variable.
15738 (linux_create_inferior, linux_attach): Set it.
15739 (linux_wait_for_process): Call the_low_target.arch_setup after the
15740 target has stopped for the first time.
15741 (initialize_low): Do not call the_low_target.arch_setup.
15742
15743 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15744 (s390_set_pc): Likewise.
15745 (s390_arch_setup): New function.
15746 (the_low_target): Use s390_arch_setup as arch_setup routine.
15747
15748 * regcache.c (realloc_register_cache): New function.
15749 (set_register_cache): Call it for each existing regcache.
15750
15751 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15752
15753 * server.h (init_registers): Remove prototype.
15754
15755 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15756 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15757 instead of init_registers ().
15758 * linux-arm-low.c (init_registers_arm): Add prototype.
15759 (init_registers_arm_with_iwmmxt): Likewise.
15760 (the_low_target): Add initializer for arch_setup field.
15761 * linux-cris-low.c (init_registers_cris): Add prototype.
15762 (the_low_target): Add initializer for arch_setup field.
15763 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15764 (the_low_target): Add initializer for arch_setup field.
15765 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15766 (the_low_target): Add initializer for arch_setup field.
15767 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15768 (the_low_target): Add initializer for arch_setup field.
15769 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15770 (the_low_target): Add initializer for arch_setup field.
15771 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15772 (the_low_target): Add initializer for arch_setup field.
15773 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15774 (init_registers_mips64_linux): Likewise.
15775 (the_low_target): Add initializer for arch_setup field.
15776 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15777 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15778 (the_low_target): Add initializer for arch_setup field.
15779 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15780 (init_registers_powerpc_64): Likewise.
15781 (the_low_target): Add initializer for arch_setup field.
15782 * linux-s390-low.c (init_registers_s390): Add prototype.
15783 (init_registers_s390x): Likewise.
15784 (the_low_target): Add initializer for arch_setup field.
15785 * linux-sh-low.c (init_registers_sh): Add prototype.
15786 (the_low_target): Add initializer for arch_setup field.
15787 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15788 (the_low_target): Add initializer for arch_setup field.
15789 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15790 (the_low_target): Add initializer for arch_setup field.
15791
15792 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15793 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15794 instead of init_registers ().
15795 * win32-arm-low.c (init_registers_arm): Add prototype.
15796 (the_low_target): Add initializer for arch_setup field.
15797 * win32-i386-low.c (init_registers_i386): Add prototype.
15798 (the_low_target): Add initializer for arch_setup field.
15799
15800 * spu-low.c (init_registers_spu): Add prototype.
15801 (initialize_low): Call initialie_registers_spu () instead of
15802 initialize_registers ().
15803
15804 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15805
15806 * server.c (handle_v_requests): When handling the vRun and vAttach
15807 packets, if already debugging a process, don't kill it. Return an
15808 error instead.
15809
15810 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15811
15812 * server.c (handle_query): Correct length check.
15813
15814 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15815
15816 * win32-low.c (do_initial_child_stuff): Add process handle
15817 parameter. Set current_process_handle and current_process_id from the
15818 parameters. Clear globals.
15819 (win32_create_inferior): Don't set current_process_handle and
15820 current_process_id here. Instead pass them on the call to
15821 do_initial_child_stuff.
15822 (win32_attach): Likewise.
15823 (win32_clear_inferiors): New.
15824 (win32_kill): Don't close the current process handle or the
15825 current thread handle here. Instead call win32_clear_inferiors.
15826 (win32_detach): Don't open a new handle to the process. Call
15827 win32_clear_inferiors.
15828 (win32_join): Don't rely on current_process_handle; open a new
15829 handle using the process id.
15830 (win32_wait): Call win32_clear_inferiors when the inferior process
15831 has exited.
15832
15833 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15834
15835 * server.c (monitor_show_help): Add "exit".
15836
15837 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15838
15839 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15840 (clean): Add reg-xtensa.c.
15841 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15842 * configure.srv (xtensa*-*-linux*) New target.
15843 * linux-xtensa-low.c: New.
15844 * xtensa-xtregs.c: New.
15845
15846 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15847
15848 * hostio.c: Don't include errno.h.
15849 (errno_to_fileio_errno): Move to hostio-errno.
15850 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15851 error number outputting to the target->hostio_last_error callback.
15852 (hostio_packet_error): Use FILEIO_EINVAL directly.
15853 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15854 calls to hostio_error.
15855 * hostio-errno.c: New.
15856 * server.h (hostio_last_error_from_errno): Declare.
15857 * target.h (target_ops): Add hostio_last_error member.
15858 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15859 as hostio_last_error handler.
15860 * spu-low.c (spu_target_ops): Likewise.
15861 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15862 (wince_hostio_last_error): New functions.
15863 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15864 as hostio_last_error handler.
15865 (win32_target_ops) [!_WIN32_WCE]: Register
15866 hostio_last_error_from_errno as hostio_last_error handler.
15867 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15868 (hostio-errno.o): New rule.
15869 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15870 * configure.srv (srv_hostio_err_objs): New variable. Default to
15871 hostio-errno.o.
15872 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15873 * configure: Regenerate.
15874
15875 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15878 (linux_kill, linux_detach): Clean up the process list.
15879 * remote-utils.c (remote_open): Improve port number parsing.
15880 (putpkt_binary, input_interrupt): Only send interrupts if the target
15881 is running.
15882 * server.c (extended_protocol): Make static.
15883 (attached): Define earlier.
15884 (exit_requested, response_needed, program_argv): New variables.
15885 (target_running): New.
15886 (start_inferior): Clear attached here.
15887 (attach_inferior): Set attached here.
15888 (require_running): Define.
15889 (handle_query): Use require_running and target_running. Implement
15890 "monitor exit".
15891 (handle_v_attach, handle_v_run): New.
15892 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15893 (gdbserver_usage): Update.
15894 (main): Redo argument parsing. Handle --debug and --multi. Handle
15895 --attach along with other options or after the port. Save
15896 program_argv. Support no initial program. Resynchronize
15897 communication with GDB after an error. Handle "monitor exit".
15898 Use require_running and target_running. Always allow the extended
15899 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15900 restart in extended mode.
15901 * README: Refer to the GDB manual. Update --attach usage.
15902
15903 2007-12-20 Andreas Schwab <schwab@suse.de>
15904
15905 * linux-low.c (STACK_SIZE): Define.
15906 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15907 (linux_test_for_tracefork): Likewise.
15908
15909 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15910
15911 * linux-low.c (linux_wait_for_event): Update messages. Do not
15912 reinsert auto-delete breakpoints.
15913 * mem-break.c (struct breakpoint): Change return type of handler to
15914 int.
15915 (set_breakpoint_at): Update handler type.
15916 (reinsert_breakpoint_handler): Return 1 instead of calling
15917 delete_breakpoint.
15918 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15919 setting a new one.
15920 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15921 * mem-break.h (set_breakpoint_at): Update handler type.
15922 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15923 * win32-low.c (auto_delete_breakpoint): New.
15924 (get_child_debug_event): Use it.
15925
15926 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15927
15928 * configure.ac: Check for pread and pwrite.
15929 * hostio.c (handle_pread): Fall back to lseek and read.
15930 (handle_pwrite): Fall back to lseek and write.
15931 * config.in, configure: Regenerated.
15932
15933 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15934
15935 * server.c (myresume): Add own_buf argument.
15936 (main): Update calls.
15937
15938 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15939
15940 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15941 * remote-utils.c (remote_open): Do not call disable_async_io.
15942 (block_async_io): Delete.
15943 (unblock_async_io): Make static.
15944 (initialize_async_io): New.
15945 * server.c (handle_v_cont): Handle async I/O here.
15946 (myresume): Likewise. Move other common resume tasks here...
15947 (main): ... from here. Call initialize_async_io. Disable async
15948 I/O before the main loop.
15949 * server.h (initialize_async_io): Declare.
15950 (block_async_io, unblock_async_io): Delete prototypes.
15951 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15952
15953 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15954
15955 * remote-utils.c (readchar): Allow binary data in received messages.
15956
15957 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15958
15959 * win32-low.c (attaching): New global.
15960 (win32_create_inferior): Clear the `attaching' global.
15961 (win32_attach): Set the `attaching' global.
15962 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15963 attaching. Only set a breakpoint at the entry point if not
15964 attaching.
15965
15966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * server.c (main): Don't report dll events on the initial
15969 connection on attaches.
15970
15971 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15972
15973 * server.c (main): Relax numerical bases supported for the pid of
15974 the --attach command line argument.
15975
15976 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15977
15978 * win32-low.c (win32_attach): Call OpenProcess before
15979 DebugActiveProcess, not after. Add last error output to error
15980 call.
15981
15982 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15983
15984 * win32-low.c (win32_get_thread_context)
15985 (win32_set_thread_context): New functions.
15986 (thread_rec): Use win32_get_thread_context.
15987 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15988 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15989 field.
15990
15991 2007-12-03 Leo Zayas
15992 Pedro Alves <pedro_alves@portugalmail.pt>
15993
15994 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15995 global variables.
15996 (child_add_thread): Minor cleanup.
15997 (child_continue): Resume artificially suspended threads before
15998 calling ContinueDebugEvent.
15999 (suspend_one_thread): New.
16000 (fake_breakpoint_event): New.
16001 (get_child_debug_event): Change return type to int. Check here if
16002 gdb sent an interrupt request. If a soft interrupt was requested,
16003 fake a breakpoint event. Return 0 if there is no event to handle,
16004 and 1 otherwise.
16005 (win32_wait): Don't check here if gdb sent an interrupt request.
16006 Ensure there is a valid event to handle.
16007 (win32_request_interrupt): Add soft interruption method as last
16008 resort.
16009
16010 2007-12-03 Leo Zayas
16011 Pedro Alves <pedro_alves@portugalmail.pt>
16012
16013 * win32-low.h (win32_thread_info): Add descriptions to the
16014 structure members. Replace `suspend_count' counter by a
16015 `suspended' flag.
16016 * win32-low.c (thread_rec): Update condition of when to get the
16017 context from the inferior. Rely on ContextFlags being set if it
16018 has already been retrieved. Only suspend the inferior thread if
16019 we haven't already. Warn if that fails.
16020 (continue_one_thread): s/suspend_count/suspended/. Only call
16021 ResumeThread once. Warn if that fails.
16022
16023 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16024
16025 * win32-low.c (win32_wait): Don't read from the inferior when it
16026 has already exited.
16027
16028 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16029
16030 * Makefile.in (win32_low_h): New variable.
16031 (win32-low.o): Add dependency on $(win32_low_h).
16032 (win32-arm-low.o, win32-i386-low.o): New rules.
16033
16034 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16035
16036 * hostio.c: Correct copyright year.
16037
16038 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16039
16040 * Makefile.in (OBS): Add hostio.o.
16041 (hostio.o): New rule.
16042 * server.h (handle_vFile): Declare.
16043 * hostio.c: New file.
16044 * server.c (handle_v_requests): Take packet_len and new_packet_len
16045 for binary packets. Call handle_vFile.
16046 (main): Update call to handle_v_requests.
16047
16048 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16049
16050 * linux-low.c: Include <sched.h>.
16051
16052 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16053
16054 * linux-low.c (linux_tracefork_grandchild): New.
16055 (linux_tracefork_child): Use clone.
16056 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16057
16058 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16059
16060 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16061
16062 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16063
16064 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16065
16066 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16067
16068 * inferiors.c (change_inferior_id): Delete.
16069 (add_pid_to_list, pull_pid_from_list): New.
16070 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16071 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16072 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16073 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16074 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16075 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16076 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16077 (using_threads): Always set to 1.
16078 (handle_extended_wait): New.
16079 (add_process): Do not set TID.
16080 (linux_create_inferior): Set must_set_ptrace_flags.
16081 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16082 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16083 (linux_thread_alive): Rename TID argument to LWPID.
16084 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16085 (linux_wait_for_event): Do not use TID or check using_threads. Update
16086 call to dead_thread_notify. Call handle_extended_wait.
16087 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16088 (send_sigstop): Delete sigstop_sent.
16089 (wait_for_sigstop): Avoid TID.
16090 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16091 (linux_test_for_tracefork): New.
16092 (linux_lookup_signals): Use thread_db_active and
16093 linux_supports_tracefork_flag.
16094 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16095 * linux-low.h (get_process_thread): Avoid TID.
16096 (struct process_ifo): Move thread_known and tid to the end. Remove
16097 sigstop_sent.
16098 (linux_attach_lwp, thread_db_init): Update prototypes.
16099 * server.h (change_inferior_id): Delete prototype.
16100 (add_pid_to_list, pull_pid_from_list): New prototypes.
16101 * thread-db.c (thread_db_use_events): New.
16102 (find_first_thread): Rename to...
16103 (find_one_thread): ...this. Update callers and messages. Do not
16104 call fatal. Check thread_db_use_events. Do not call
16105 change_inferior_id or new_thread_notify.
16106 (maybe_attach_thread): Update. Do not call new_thread_notify.
16107 (thread_db_init): Set thread_db_use_events. Check use_events.
16108 * utils.c (fatal, warning): Correct message prefix.
16109
16110 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16111
16112 * Makefile.in (clean): Remove new files.
16113 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16114 (powerpc-64.o, powerpc-64.c): New rules.
16115 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16116 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16117 with SPE.
16118 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16119 SPE targets.
16120 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16121 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16122 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16123 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16124 (target_regsets): Add AltiVec and SPE register sets.
16125 * configure.ac: Check for AltiVec and SPE.
16126 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16127 (ppc_fill_vrregset, ppc_store_vrregset): New.
16128 (target_regsets): Add AltiVec register set.
16129 * configure: Regenerated.
16130
16131 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16132
16133 * linux-low.c (O_LARGEFILE): Define.
16134 (linux_read_memory): Use /proc/PID/mem.
16135 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16136 * configure, config.in: Regenerated.
16137
16138 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * linux-low.c (linux_wait_for_event): Do not pass signals while
16141 single-stepping.
16142
16143 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16144
16145 * win32-low.c (create_process): New.
16146 (win32_create_inferior): Use create_process instead of
16147 CreateProcess. If create_process failed retry appending an ".exe"
16148 suffix. Store the GetLastError result immediatelly after
16149 create_process calls and use it on the call to error.
16150
16151 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16152
16153 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16154
16155 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16156
16157 * configure.ac: Switch license to GPLv3.
16158
16159 2007-08-01 Michael Snyder <msnyder@access-company.com>
16160
16161 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16162
16163 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16164
16165 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16166 typedef.
16167 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16168 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16169 CloseToolhelp32Snapshot.
16170 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16171 CloseToolhelp32Snapshot.
16172
16173 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16174
16175 * server.c (main): Check for inferior exit before main loop.
16176
16177 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16178
16179 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16180 instead of on tmp_desc.
16181
16182 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16183 Daniel Jacobowitz <dan@codesourcery.com>
16184
16185 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16186 (add_thread): Minor cleanups.
16187 (clear_inferiors): Move lower in the file. Clear the DLL
16188 list.
16189 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16190 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16191 (xml_escape_text): New.
16192 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16193 for qSupported.
16194 (handle_v_cont): Report errors.
16195 (gdbserver_version): Update.
16196 (main): Correct size of own_buf. Do not report initial DLL events.
16197 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16198 (unloaded_dll, xml_escape_text): New.
16199 * win32-low.c (enum target_waitkind): Update comments.
16200 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16201 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16202 (win32_EnumProcessModules, win32_GetModuleInformation)
16203 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16204 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16205 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16206 (win32_Module32First, win32_Module32Next, load_toolhelp)
16207 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16208 (get_child_debug_event): Handle DLL events.
16209 (win32_wait): Likewise.
16210
16211 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16212
16213 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16214 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16215
16216 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16217
16218 * win32-low.c (handle_output_debug_string): Ignore event if not
16219 waiting.
16220
16221 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16222
16223 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16224
16225 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16226
16227 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16228
16229 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16230
16231 * inferiors.c (change_inferior_id): Add comment.
16232 * linux-low.c (check_removed_breakpoint): Add an early
16233 prototype. Improve debug output.
16234 (linux_attach): Doc update.
16235 (linux_detach_one_process, linux_detach): Clean up before releasing
16236 each process.
16237 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16238 * linux-low.h (struct process_info): Doc improvement.
16239 * mem-break.c (delete_all_breakpoints): New.
16240 * mem-break.h (delete_all_breakpoints): New prototype.
16241 * thread-db.c (find_first_thread): New.
16242 (thread_db_create_event): Call it instead of
16243 thread_db_find_new_threads. Clean up unused variables.
16244 (maybe_attach_thread): Remove first thread handling.
16245 (thread_db_find_new_threads): Use find_first_thread.
16246 (thread_db_get_tls_address): Likewise.
16247
16248 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16249
16250 * thread-db.c (thread_db_find_new_threads): Add prototype.
16251 (thread_db_create_event): Check for the main thread before adding
16252 a new thread.
16253 (maybe_attach_thread): Only enable event reporting if TID == 0.
16254 (thread_db_get_tls_address): Check for new threads.
16255
16256 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16257
16258 * linux-low.c (linux_create_inferior): Try execv before execvp.
16259 * spu-low.c (spu_create_inferior): Likewise.
16260
16261 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16262
16263 * linux-low.c (linux_create_inferior): Change execv to execvp.
16264 * spu-low.c (spu_create_inferior): Likewies.
16265
16266 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16267
16268 * Makefile.in (clean): Clean new files instead of deleted ones.
16269 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16270 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16271 rules.
16272 * configure.srv: Specify XML files and new regformats for MIPS and
16273 MIPS64 GNU/Linux.
16274 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16275 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16276 an entry for the restart register.
16277 (mips_cannot_fetch_register, mips_cannot_store_register)
16278 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16279 register names to match the XML descriptions.
16280 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16281 restart register instead of $0.
16282
16283 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16284 Markus Deuling <deuling@de.ibm.com>
16285
16286 * remote-utils.c (decode_xfer_write): New function.
16287 * server.h (decode_xfer_write): Add prototype.
16288 * server.c (handle_query): Add PACKET_LEN argument. Support
16289 qXfer:spu:read and qXfer:spu:write packets.
16290 (main): Pass packet_len to handle_query.
16291 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16292 * target.h (target_ops): Add qxfer_spu.
16293
16294 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16295
16296 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16297 accessing non-seekable spufs files.
16298
16299 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16300
16301 * server.c (handle_query): Add reply for qC packet.
16302
16303 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16304 Leo Zayas <lerele@champenstudios@com>
16305
16306 * server.h (check_remote_input_interrupt_request): New function.
16307 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16308 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16309 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16310 (check_remote_input_interrupt_request): New function.
16311 * server.h (check_remote_input_interrupt_request): Declare.
16312 * win32-low.c (winapi_DebugBreakProcess,
16313 winapi_GenerateConsoleCtrlEvent): New typedefs.
16314 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16315 to 250 ms.
16316 (win32_wait): Check for remote interrupt request
16317 with check_remote_input_interrupt_request.
16318 (win32_request_interrupt): New function.
16319 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16320
16321 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16322
16323 * win32-low.c (debug_registers_changed,
16324 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16325 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16326 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16327 (thread_rec): Get context using the low target.
16328 (child_add_thread): Call thread_added on the low target,
16329 which does the same thing.
16330 (regptr): Delete.
16331 (do_initial_child_stuff): Remove debug registers references.
16332 Set context using the low target. Resume threads after
16333 setting the contexts.
16334 (child_continue): Remove dead variable. Remove debug
16335 registers references.
16336 (child_fetch_inferior_registers): Go through the low target.
16337 (do_child_store_inferior_registers): Remove.
16338 (child_store_inferior_registers): Go through the low target.
16339 (win32_resume): Remove debug registers references.
16340 Set context using the low target.
16341 (handle_exception): Change return type to void. Don't record
16342 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16343 first chance exception.
16344 (get_child_debug_event): Change return type to void. Remove
16345 goto loop. Always return after waiting for debug event.
16346 (win32_wait): Convert to switch statement. Handle spurious
16347 events.
16348
16349 * win32-i386-low.c (debug_registers_changed,
16350 debug_registers_used): New.
16351 (initial_stuff): Rename to ...
16352 (i386_initial_stuff): ... this. Clear debug registers
16353 state variables.
16354 (store_debug_registers): Delete.
16355 (i386_get_thread_context): New.
16356 (load_debug_registers): Delete.
16357 (i386_set_thread_context): New.
16358 (i386_thread_added): New.
16359 (single_step): Rename to ...
16360 (i386_single_step): ... this.
16361 (do_fetch_inferior_registers): Rename to ...
16362 (i386_fetch_inferior_register): ... this.
16363 (i386_store_inferior_register): New.
16364 (the_low_target): Adapt to new interface.
16365
16366 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16367 (arm_get_thread_context): New.
16368 (arm_set_thread_context): New.
16369 (regptr): New.
16370 (do_fetch_inferior_registers): Rename to ...
16371 (arm_fetch_inferior_register): ... this.
16372 (arm_store_inferior_register): New.
16373 (arm_wince_breakpoint): Reimplement as unsigned long.
16374 (arm_wince_breakpoint_len): Define.
16375 (the_low_target): Adapt to new interface.
16376
16377 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16378 load_debug_registers. Add get_thread_context, set_thread_context,
16379 thread_added and store_inferior_register. Rename
16380 fetch_inferior_registers to fetch_inferior_register.
16381 (regptr): Remove declaration.
16382
16383 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16384
16385 * linux-low.c (linux_detach): Change return type to int. Return 0.
16386 * spu-low.c (spu_detach): Likewise.
16387
16388 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16389
16390 * target.h (target_ops): Change return type of detach to int.
16391 Add join.
16392 (join_inferior): New.
16393 * server.c (main): Don't skip detach support on mingw32.
16394 If the inferior doesn't support detaching return error.
16395 Call join_inferior instead of using waitpid.
16396 * linux-low.c (linux_join): New.
16397 (linux_target_op): Add linux_join.
16398 * spu-low.c (spu_join): New.
16399 (spu_target_ops): Add spu_join.
16400 * win32-low.c (win32_detach): Adapt to new interface.
16401 Reopen current_process_handle before detaching. Issue a child
16402 resume before detaching.
16403 (win32_join): New.
16404 (win32_target_op): Add win32_join.
16405
16406 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16407
16408 * win32-low.c (win32-attach): Fix return value.
16409 * target.h (target_ops): Describe ATTACH return values.
16410
16411 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16412
16413 * win32-low.c (GETPROCADDRESS): Define.
16414 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16415 (winapi_DebugSetProcessKillOnExit): Likewise.
16416 (win32_create_inferior): Force usage of ansi CreateProcessA.
16417 (win32_attach): Use GETPROCADDRESS.
16418 (win32_detach): Likewise.
16419
16420 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16421
16422 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16423
16424 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16425
16426 * win32-low.c: Commit leftover changes from 2007-03-29.
16427
16428 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16429
16430 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16431 fields short instead of int. Add explicit padding.
16432 (i387_cache_to_fsave): Remove unnecessary casts.
16433 (i387_fsave_to_cache): Doc fix.
16434 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16435
16436 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16439 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16440
16441 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16442
16443 * configure.srv (arm*-*-mingw32ce*): Move near the other
16444 arm targets.
16445
16446 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16447
16448 * configure.ac: Add errno checking.
16449 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16450 sys/file.h and malloc.h.
16451 (AC_CHECK_DECLS): Add perror.
16452 (srv_mingwce): Handle.
16453 * configure.srv (i[34567]86-*-cygwin*): Add
16454 win32-i386-low.o to srv_tgtobj.
16455 (i[34567]86-*-mingw*): Likewise.
16456 (arm*-*-mingw32ce*): Add case.
16457 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16458 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16459 [__MINGW32CE__] (strerror): New function.
16460 [__MINGW32CE__] (errno): Define to GetLastError.
16461 [__MINGW32CE__] (COUNTOF): New macro.
16462 (remote_open): Remove extra close call.
16463 * mem-break.c (delete_breakpoint_at): New function.
16464 * mem-break.h (delete_breakpoint_at): Declare.
16465 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16466 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16467 [USE_WIN32API] (read, write): Add char* casts.
16468 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16469 * server.h: Include wincecompat.h on Windows CE.
16470 [HAVE_ERRNO_H]: Check.
16471 (perror): Declare if not declared.
16472 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16473 (perror_with_name): Remove errno declaration.
16474 * wincecompat.h: New.
16475 * wincecompat.c: New.
16476 * win32-low.h: New.
16477 * win32-arm-low.c: New.
16478 * win32-i386-low.c: New.
16479 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16480 (OUTMSG2): Make it safe.
16481 (_T): New macro.
16482 (COUNTOF): New macro.
16483 (NUM_REGS): Get it from the low target.
16484 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16485 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16486 (thread_rec): Let low target handle debug registers.
16487 (child_add_thread): Likewise.
16488 (child_init_thread_list): Likewise.
16489 (continue_one_thread): Likewise.
16490 (regptr): New.
16491 (do_child_fetch_inferior_registers): Move to ...
16492 * win32-i386-low.c: ... here, and rename to ...
16493 (do_fetch_inferior_registers): ... this.
16494 * win32-low.c (child_fetch_inferior_registers):
16495 Go through the low target.
16496 (do_child_store_inferior_registers): Use regptr.
16497 (strwinerror): New function.
16498 (win32_create_inferior): Handle Windows CE.
16499 Use strwinerror instead of strerror on Windows error
16500 codes. Add program to the error output.
16501 Don't close the main thread handle on Windows CE.
16502 (win32_attach): Use coredll.dll on Windows CE.
16503 (win32_kill): Close current process and current
16504 thread handles.
16505 (win32_detach): Use coredll.dll on Windows CE.
16506 (win32_resume): Let low target handle debug registers, and
16507 step request.
16508 (handle_exception): Add/Remove initial breakpoint. Avoid
16509 non-existant WSTOPSIG on Windows CE.
16510 (win32_read_inferior_memory): Cast to remove warning.
16511 (win32_arch_string): Go through the low target.
16512 (initialize_low): Call set_breakpoint_data with the low
16513 target's breakpoint.
16514 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16515 FOP_REGNUM, mappings): Move to ...
16516 * win32-i386-low.c: ... here.
16517 * win32-low.c (win32_thread_info): Move to ...
16518 * win32-low.h: ... here.
16519 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16520 win32-arm-low.c and wincecompat.c.
16521 (all:): Add $EXEEXT.
16522 (install-only:): Likewise.
16523 (gdbserver:): Likewise.
16524 (gdbreplay:): Likewise.
16525 * config.in: Regenerate.
16526 * configure: Regenerate.
16527
16528 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16529
16530 * win32-low.c: Rename typedef thread_info to
16531 win32_thread_info throughout.
16532
16533 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16534
16535 * win32-i386-low.c: Rename to ...
16536 * win32-low.c: ... this.
16537 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16538 * Makefile.in: Likewise.
16539
16540 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16541
16542 * remote-utils.c (monitor_output): Constify msg parameter.
16543 * server.h (monitor_output): Likewise.
16544 * win32-i386-low.c (handle_output_debug_string): New.
16545 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16546 handle_output_debug_string.
16547 (get_child_debug_event): Likewise.
16548
16549 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16550
16551 * server.c (main): Correct strtoul check.
16552
16553 2007-03-27 Jon Ringle <jon@ringle.org>
16554
16555 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16556
16557 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16558
16559 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16560
16561 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16562
16563 * terminal.h: Check HAVE_SGTTY_H.
16564
16565 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16566
16567 * remote-utils.c (remote_open): Print out the assigned port number.
16568
16569 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * remote-utils.c (monitor_output): New function.
16572 * server.c (debug_threads): Define here.
16573 (monitor_show_help): New function.
16574 (handle_query): Handle qRcmd.
16575 (main): Do not handle 'd' packet.
16576 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16577 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16578 of debug_threads.
16579
16580 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16581
16582 * Makefile.in (EXEEXT): New.
16583 (clean): Use $(EXEEXT).
16584
16585 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16586
16587 * target.h (target_ops): Rename send_signal to request_interrupt,
16588 and remove enum target_signal parameter.
16589 * linux-low.c (linux_request_interrupt): Rename from
16590 linux_send_signal, and always send SIGINT.
16591 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16592 and always send SIGINT.
16593 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16594 of send_signal.
16595 (input_interrupt): Likewise.
16596
16597 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16598
16599 * server.c (get_features_xml): Check if target implemented
16600 arch_string.
16601 * win32-i386-low.c (win32_arch_string): New.
16602 (win32_target_ops): Add win32_arch_string as arch_string member.
16603
16604 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16605
16606 * spu-low.c (spu_arch_string): New.
16607 (spu_target_ops): Add spu_arch_string.
16608
16609 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16610
16611 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16612 * configure.ac: Do not check for terminal.h.
16613 * configure, config.in: Regenerated.
16614
16615 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * Makefile.in (OBS): Add $(XML_BUILTIN).
16618 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16619 (clean): Update.
16620 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16621 (arm-with-iwmmxt.c): New.
16622 * config.in, configure: Regenerate.
16623 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16624 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16625 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16626 (arm*-*-linux*): Add iWMMXt and regset support.
16627 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16628 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16629 (arm_store_wmmxregset, target_regsets): New.
16630 * server.c (get_features_xml): Take annex argument. Check builtin
16631 XML documents.
16632 (handle_query): Handle multiple annexes.
16633
16634 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16635
16636 * remote-utils.c [USE_WIN32API] (read, write): Define.
16637 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16638 write.
16639
16640 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16641
16642 * linux-i386-low.c (the_low_target): Set arch_string.
16643 * linux-x86-64-low.c (the_low_target): Likewise.
16644 * linux-low.c (linux_arch_string): New.
16645 (linux_target_ops): Add it.
16646 * linux-low.h (struct linux_target_ops): Add arch_string.
16647 * server.c (write_qxfer_response): Use const void * for DATA.
16648 (get_features_xml): New.
16649 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16650 * target.h (struct target_ops): Add arch_string method.
16651
16652 2007-01-03 Denis Pilat <denis.pilat@st.com>
16653 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * linux-low.c (linux_kill): Handle being called with no threads.
16656 * win32-i386-low.c (win32_kill): Likewise.
16657 (get_child_debug_event): Clear current_process_handle.
16658
16659 2006-12-30 Denis PILAT <denis.pilat@st.com>
16660 Daniel Jacobowitz <dan@codesourcery.com>
16661
16662 * remote-utils.c (remote_open): Check the type of specified
16663 serial port devices before opening them.
16664 * server.c (main): Kill the inferior if an error occurs during
16665 the first remote_open.
16666
16667 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16668
16669 * README: Update supported targets.
16670
16671 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16672
16673 * Makefile.in (clean): Remove reg-mips64.c.
16674 (reg-mips64.c, reg-mips64.o): New rules.
16675 * configure.srv: Handle mips64. Include regset support for mips.
16676 * linux-mips-low.c (union mips_register): New.
16677 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16678 (mips_breakpoint, mips_breakpoint_at): Use int.
16679 (mips_collect_register, mips_supply_register)
16680 (mips_collect_register_32bit, mips_supply_register_32bit)
16681 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16682 (mips_store_fpregset, target_regsets): New.
16683 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16684
16685 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16686
16687 * configure.srv: Add target "spu*-*-*".
16688 * Makefile.in (clean): Remove reg-spu.c.
16689 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16690 * spu-low.c: New file.
16691
16692 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16693
16694 * configure.ac: Correct td_thr_tls_get_addr test.
16695 * configure: Regenerated.
16696
16697 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16698
16699 * linux-low.c (linux_wait_for_event): Reformat. Use the
16700 pass_signals array.
16701 * remote-utils.c (decode_address_to_semicolon): New.
16702 * server.c (pass_signals, handle_general_set): New.
16703 (handle_query): Mention QPassSignals for qSupported.
16704 (main): Call handle_general_set.
16705 * server.h (pass_signals, decode_address_to_semicolon): New.
16706
16707 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16708
16709 * server.c (handle_query): Correct error handling for read_auxv.
16710
16711 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16712
16713 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16714 and srv_linux_thread_db to yes.
16715 * linux-s390-low.c (s390_fill_gregset): New function.
16716 (target_regsets): Define data structure.
16717
16718 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16719
16720 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16721 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16722 * config.in, configure: Regenerated.
16723 * inferiors.c (gdb_id_to_thread): New function.
16724 (gdb_id_to_thread_id): Use it.
16725 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16726 * linux-low.h (struct process_info): Add th member.
16727 (thread_db_get_tls_address): New prototype.
16728 * remote-utils.c (decode_address): Make non-static.
16729 * server.c (handle_query): Handle qGetTLSAddr.
16730 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16731 * target.h (struct target_ops): Add get_tls_address.
16732 * thread-db.c (maybe_attach_thread): Save the thread handle.
16733 (thread_db_get_tls_address): New.
16734
16735 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16736
16737 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16738 (linux_resume_one_process): Take a siginfo_t *. Update all
16739 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16740 (struct pending_signals): Add a siginfo_t.
16741 (linux_wait_for_process): Always set last_status.
16742 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16743 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16744 * linux-low.h (struct process_info): Add last_status.
16745
16746 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * remote-utils.c (try_rle): New function.
16749 (putpkt_binary): Use it.
16750
16751 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16752
16753 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16754 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16755 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16756 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16757 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16758 point registers.
16759
16760 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16761
16762 * server.c (terminal_fd): New variable.
16763 (old_foreground_pgrp): Likewise.
16764 (restore_old_foreground_pgrp): New function.
16765 (start_inferior): Record the terminal file descriptor in terminal_fd
16766 and its original foreground group in old_foreground_pgrp. Register
16767 restore_old_foreground_pgrp with atexit().
16768
16769 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16770
16771 * server.c (handle_query): Correct qPart to qXfer.
16772
16773 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16774
16775 * configure.ac: Check for more headers which are missing on
16776 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16777 * configure.srv: Add Cygwin and mingw32.
16778 * remote-utils.c: Don't include headers unconditionally which
16779 are missing on mingw32. Include <winsock.h> for mingw32.
16780 (remote_open): Adjust for mingw32 support. Flush
16781 standard error after writing to it.
16782 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16783 (unblock_async_io, enable_async_io, disable_async_io)
16784 (readchar, getpkt): Update for Winsock support.
16785 (prepare_resume_reply): Expect a protocol signal number.
16786 * server.c: Disable <sys/wait.h> on mingw32.
16787 (start_inferior): Adjust for mingw32 support. Flush
16788 standard error after writing to it.
16789 (attach_inferior): Likewise. Use protocol signal
16790 numbers.
16791 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16792 and names.
16793 * win32-i386-low.c: New file.
16794 * Makefile.in (XM_CLIBS): Set.
16795 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16796 (win32-i386-low.o): New dependency rule.
16797 * linux-low.c (linux_wait): Use target signal numbers.
16798 * target.h (struct target_ops): Doc fix.
16799 * server.h (target_signal_to_name): New prototype.
16800 * gdbreplay.c: Don't include headers unconditionally which
16801 are missing on mingw32. Include <winsock.h> for mingw32.
16802 (remote_close, remote_open): Adjust for Winsock support.
16803 * configure, config.in: Regenerated.
16804
16805 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16806
16807 * server.c (decode_xfer_read, write_qxfer_response): New.
16808 (handle_query): Take a packet length argument. Handle
16809 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16810 the qSupported response.
16811 (main): Update call to handle_query.
16812
16813 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16814
16815 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16816 (putpkt_binary): Renamed from putpkt and adjusted for binary
16817 data.
16818 (putpkt): New wrapper for putpkt_binary.
16819 (readchar): Don't mask off the high bit.
16820 (decode_X_packet): New function.
16821 * server.c (main): Call putpkt_binary if a handler sets the packet
16822 length. Save the length of the incoming packet. Handle 'X'.
16823 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16824
16825 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16826
16827 * server.c (handle_query): Handle qSupported.
16828
16829 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16830
16831 * remote-utils.c (all_symbols_looked_up): New variable.
16832 (look_up_one_symbol): Check it.
16833 * server.h (look_up_one_symbol): New declaration.
16834 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16835
16836 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16837
16838 * Makefile.in (linux-arm-low.o): Update dependencies.
16839 * linux-arm-low.c: Include "gdb_proc_service.h".
16840 (PTRACE_GET_THREAD_AREA): Define.
16841 (ps_get_thread_area): New function.
16842
16843 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16844
16845 * configure.srv (m68k*-*-uclinux*): New target.
16846 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16847 (linux_resume_one_process): Remove extraneous cast.
16848 (linux_read_offsets): New.
16849 (linux_target_op): Add linux_read_offsets on mmuless systems.
16850 * server.c (handle_query): Add qOffsets logic.
16851 * target.h (struct target_ops): Add read_offsets.
16852
16853 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16854
16855 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16856 (PTRACE_GET_THREAD_AREA): Define.
16857 (ps_get_thread_area): New function.
16858 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16859 (linux-x86-64-low.o): Update.
16860
16861 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16862
16863 * configure.ac: Remove checks for prfpregset_t.
16864 * gdb_proc_service.h: New file.
16865 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16866 new "gdb_proc_service.h".
16867 * proc-service.c: Likewise.
16868 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16869 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16870 * Makefile.in (gdb_proc_service_h): Updated.
16871 * configure, config.in: Regenerated.
16872
16873 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * remote-utils.c (prepare_resume_reply): Move declaration
16876 of gdb_id_from_wait to the top of the block.
16877
16878 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * linux-low.c (regsets_store_inferior_registers): Read the regset
16881 from the target before filling it.
16882
16883 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * server.c (attach_inferior): Return SIGTRAP for a successful
16886 attach.
16887
16888 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16889
16890 * Makefile.in (OBS): Add version.o.
16891 (STAGESTUFF): Delete.
16892 (version.o): Add dependencies.
16893 (version.c): Replace rule.
16894 (clean): Remove version.c.
16895 * server.c (gdbserver_version): New.
16896 (gdbserver_usage): Use printf.
16897 (main): Handle --version and --help.
16898 * server.h (version, host_name): Add declarations.
16899
16900 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16901
16902 * linux-arm-low.c:
16903 * linux-arm-low.c:
16904 * inferiors.c:
16905 * i387-fp.h:
16906 * i387-fp.c:
16907 * gdbreplay.c:
16908 * regcache.c:
16909 * proc-service.c:
16910 * mem-break.h:
16911 * mem-break.c:
16912 * linux-x86-64-low.c:
16913 * linux-sh-low.c:
16914 * linux-s390-low.c:
16915 * linux-ppc64-low.c:
16916 * linux-ppc-low.c:
16917 * linux-mips-low.c:
16918 * linux-m68k-low.c:
16919 * linux-m32r-low.c:
16920 * linux-low.h:
16921 * linux-low.c:
16922 * linux-ia64-low.c:
16923 * linux-i386-low.c:
16924 * linux-crisv32-low.c:
16925 * thread-db.c:
16926 * terminal.h:
16927 * target.h:
16928 * target.c:
16929 * server.h:
16930 * server.c:
16931 * remote-utils.c:
16932 * regcache.h:
16933 * utils.c:
16934 * Makefile.in:
16935 * configure.ac:
16936 * gdbserver.1: Add (C) after Copyright. Update the FSF
16937 address.
16938
16939 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16940
16941 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16942 (arm_breakpoint_at): Recognize both breakpoints.
16943 (the_low_target): Use the correct breakpoint instruction.
16944
16945 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16946
16947 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16948 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16949 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16950 (the_low_target): Update.
16951
16952 2005-10-25 Andreas Schwab <schwab@suse.de>
16953
16954 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16955
16956 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16957 (ia64_num_regs): Reduce to 462.
16958
16959 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16960
16961 * acinclude.m4: Correct quoting.
16962 * aclocal.m4: Regenerated.
16963
16964 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16965 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16966 (thread_db_init): Call thread_db_err_str.
16967 * configure.ac: Check for TD_VERSION.
16968 * config.in, configure: Regenerated.
16969
16970 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16971
16972 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16973
16974 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16975
16976 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16977 is not available. Define HAVE_PTRACE_GETREGS if it is.
16978 * config.in, configure: Regenerated.
16979 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16980 * linux-i386-low.c, linux-m68k-low.c: Update to use
16981 HAVE_PTRACE_GETREGS.
16982 * linux-low.c (regsets_fetch_inferior_registers)
16983 (regsets_store_inferior_registers): Only return 0 if we processed
16984 GENERAL_REGS.
16985 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16986 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16987
16988 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16989
16990 * inferiors.c (struct thread_info): Add gdb_id.
16991 (add_thread): Add gdb_id argument.
16992 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16993 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16994 calls to add_thread.
16995 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16996 * server.c (handle_query): Use thread_to_gdb_id.
16997 (handle_v_cont, main): Use gdb_id_to_thread_id.
16998 * server.h (add_thread): Update prototype.
16999 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17000 prototypes.
17001
17002 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17005 left-padded registers.
17006 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17007 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17008
17009 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17010
17011 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17012 * configure: Regenerate.
17013 * config.in: Regenerate.
17014 * server.h (NEED_DECLARATION_STRERROR):
17015 Replace with !HAVE_DECL_STRERROR.
17016
17017 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17018
17019 * linux-low.c (linux_wait, linux_send_signal): Don't test
17020 an unsigned long variable for > 0 if it could be MAX_ULONG.
17021 * server.c (myresume): Likewise.
17022 * target.c (set_desired_inferior): Likewise.
17023
17024 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17025
17026 * configure.ac: Simplify and improve check for socklen_t.
17027 * configure, config.in: Regenerate.
17028
17029 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17030
17031 * acconfig.h: Remove.
17032 * configure.ac: Add a test for socklen_t. Use three-argument
17033 AC_DEFINE throughout.
17034 * config.in: Regenerated using autoheader 2.59.
17035 * configure: Regenerated.
17036
17037 * gdbreplay.c (socklen_t): Provide a default.
17038 (remote_open): Use socklen_t.
17039 * remote-utils.c (socklen_t): Provide a default.
17040 (remote_open): Use socklen_t.
17041 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17042 unsigned char.
17043
17044 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17045 char for buffers.
17046 * linux-low.c (linux_read_memory, linux_write_memory)
17047 (linux_read_auxv): Likewise.
17048 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17049 (check_mem_write): Likewise.
17050 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17051 Likewise.
17052 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17053 (registers_from_string, register_data): Likewise.
17054 * server.c (handle_query, main): Likewise.
17055 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17056 (decode_M_packet): Likewise.
17057 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17058 * target.h (struct target_ops): Update read_memory, write_memory,
17059 and read_auxv.
17060 (read_inferior_memory, write_inferior_memory): Update.
17061 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17062 to unsigned char *.
17063 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17064 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17065 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17066 linux-s390-low.c, linux-sh-low.c: Update for changes in
17067 read_inferior_memory and the_low_target->breakpoint.
17068
17069 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17070
17071 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17072 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17073 * configure.srv: Add powerpc64-*-linux*.
17074 * linux-ppc64-low.c: New file.
17075
17076 2005-05-23 Orjan Friberg <orjanf@axis.com>
17077
17078 * linux-cris-low.c: New file with support for CRIS.
17079 * linux-crisv32-low.c: Ditto for CRISv32.
17080 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17081 (clean): Add reg-cris.c and reg-crisv32.c.
17082 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17083 reg-crisv32.o, and reg-crisv32.c to make rules.
17084 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17085 recognized targets.
17086
17087 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17088
17089 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17090 of sizeof (PTRACE_XFER_TYPE).
17091 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17092
17093 2005-05-12 Orjan Friberg <orjanf@axis.com>
17094
17095 * target.h (struct target_ops): Add insert_watchpoint,
17096 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17097 pointers for hardware watchpoint support.
17098 * linux-low.h (struct linux_target_ops): Ditto.
17099 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17100 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17101 to linux_target_ops.
17102 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17103 reply packet.
17104 * server.c (main): Recognize 'Z' and 'z' packets.
17105
17106 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17107
17108 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17109 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17110 (the_low_target): Add new members.
17111
17112 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17113
17114 * proc-service.c (ps_lgetregs): Search all_processes instead of
17115 all_threads.
17116
17117 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17118
17119 * server.c (start_inferior): Change return type to int.
17120 (attach_inferior): Change sigptr to int *.
17121 (handle_v_cont, handle_v_requests): Change signal to int *.
17122 (main): Change signal to int.
17123
17124 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17125
17126 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17127 * configure.srv: Add m32r*-*-linux*.
17128 * linux-m32r-low.c: New file.
17129
17130 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17133
17134 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17137 Take unsigned long arguments for PIDs.
17138 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17139 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17140 (wait_for_sigstop, linux_resume_one_process)
17141 (regsets_fetch_inferior_registers, linux_send_signal)
17142 (linux_read_auxv): Likewise. Update the types of variables holding
17143 PIDs. Update format string specifiers.
17144 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17145 * remote-utils.c (prepare_resume_reply): Likewise.
17146 * server.c (cont_thread, general_thread, step_thread)
17147 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17148 unsigned long.
17149 (handle_query): Update format specifiers.
17150 (handle_v_cont, main): Use strtoul for thread IDs.
17151 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17152 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17153 (general_thread, step_thread, thread_from_wait)
17154 (old_thread_from_wait): Update.
17155 * target.h (struct thread_resume): Use unsigned long for THREAD.
17156 (struct target_ops): Use unsigned long for arguments to attach and
17157 thread_alive.
17158
17159 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17160
17161 * acinclude.m4: Include bfd/bfd.m4 directly.
17162 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17163 <agriffis@toolchain.org>.
17164 * aclocal.m4, configure: Regenerated.
17165
17166 2005-01-07 Andrew Cagney <cagney@gnu.org>
17167
17168 * configure.ac: Rename configure.in, require autoconf 2.59.
17169 * configure: Re-generate.
17170
17171 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17172
17173 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17174 LIBS when finished.
17175 * aclocal.m4: Regenerated.
17176 * configure: Regenerated.
17177
17178 2004-11-21 Andreas Schwab <schwab@suse.de>
17179
17180 * linux-m68k-low.c (m68k_num_gregs): Define.
17181 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17182 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17183 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17184 (m68k_breakpoint_at): New. Add to the_low_target.
17185
17186 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17187 srv_linux_thread_db to yes.
17188
17189 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17190
17191 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17192 (ARCH_SET_FS): Likewise.
17193 (ARCH_GET_FS): Likewise.
17194 (ARCH_GET_GS): Likewise.
17195
17196 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17197
17198 * linux-i386-low.c (ps_get_thread_area): New.
17199 * linux-x86-64-low.c (ps_get_thread_area): New.
17200 * linux-low.c: Include <sys/syscall.h>.
17201 (linux_kill_one_process): Don't kill the first thread here.
17202 (linux_kill): Kill the first thread here.
17203 (kill_lwp): New function.
17204 (send_sigstop, linux_send_signal): Use it.
17205 * proc-service.c: Clean up #ifdefs.
17206 (fpregset_info): Delete.
17207 (ps_lgetregs): Update and enable implementation.
17208 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17209 implementations.
17210 * remote-utils.c (struct sym_cache, symbol_cache): New.
17211 (input_interrupt): Print a clearer message.
17212 (async_io_enabled): New variable.
17213 (enable_async_io, disable_async_io): Use it. Update comments.
17214 (look_up_one_symbol): Use the symbol cache.
17215 * thread-db.c (thread_db_look_up_symbols): New function.
17216 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17217
17218 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17219
17220 * configure.in: Test for -rdynamic.
17221 * configure: Regenerated.
17222 * Makefile (INTERNAL_LDFLAGS): New.
17223 (gdbserver, gdbreplay): Use it.
17224
17225 2004-09-02 Andrew Cagney <cagney@gnu.org>
17226
17227 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17228
17229 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17230
17231 * linux-low.c (linux_wait): Clear all_processes list also.
17232
17233 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17234
17235 * linux-low.c: Include <errno.h>. Remove extern declaration of
17236 errno.
17237
17238 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17239
17240 * gdbreplay.c, server.h, utils.c: Update copyright years.
17241
17242 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17243
17244 * server.c (main): Print child status or termination signal from
17245 variable 'signal', not 'sig'.
17246
17247 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17248
17249 * linux-low.c (linux_read_memory): Change return type to
17250 int. Check for and return error from ptrace().
17251 * target.c (read_inferior_memory): Change return type to int. Pass
17252 back return status from the_target->read_memory().
17253 * target.h (struct target_ops): Adapt *read_memory() prototype.
17254 Update comment.
17255 (read_inferior_memory): Adapt prototype.
17256 * server.c (main): Return an error packet if
17257 read_inferior_memory() returns an error.
17258
17259 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17260
17261 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17262 Unify with other clean targets.
17263
17264 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17265
17266 * server.c (handle_v_cont): Call set_desired_inferior.
17267
17268 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17269
17270 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17271
17272 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17273
17274 * linux-low.c (linux_wait): Unblock async I/O.
17275 (linux_resume): Block and enable async I/O.
17276 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17277 * server.h (block_async_io, unblock_async_io): Add prototypes.
17278
17279 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17280
17281 * remote-utils.c (remote_open): Print a status notice after
17282 opening a TCP port.
17283 * server.c (attach_inferior): Print a status notice after
17284 attaching.
17285
17286 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17287
17288 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17289
17290 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17291
17292 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17293 error packet.
17294 * server.c, target.h: Update copyright years.
17295
17296 2004-02-25 Roland McGrath <roland@redhat.com>
17297
17298 * target.h (struct target_ops): New member `read_auxv'.
17299 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17300 * linux-low.c (linux_read_auxv): New function.
17301 (linux_target_ops): Initialize `read_auxv' member to that.
17302
17303 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17304
17305 Committed by Jim Blandy <jimb@redhat.com>.
17306
17307 * linux-s390-low.c (s390_num_regs): Update.
17308 (s390_regmap): Remove control registers. Use __s390x__ predefine
17309 instead of GPR_SIZE to distiguish s390 and s390x targets.
17310
17311 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17312
17313 * linux-low.c: Update copyright year.
17314 (check_removed_breakpoint): Clear pending_is_breakpoint.
17315 (linux_set_resume_request, linux_queue_one_thread)
17316 (resume_status_pending_p): New functions.
17317 (linux_continue_one_thread): Use process->resume.
17318 (linux_resume): Only resume threads if there are no pending events.
17319 * linux-low.h (struct process_info): Add resume request
17320 pointer.
17321
17322 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17323
17324 * regcache.c (new_register_cache): Clear the allocated register
17325 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17326
17327 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17328
17329 * linux-low.c (linux_resume): Take a struct thread_resume *
17330 argument.
17331 (linux_wait): Update call.
17332 (resume_ptr): New static variable.
17333 (linux_continue_one_thread): Renamed from
17334 linux_continue_one_process. Use resume_ptr.
17335 (linux_resume): Use linux_continue_one_thread.
17336 * server.c (handle_v_cont, handle_v_requests): New functions.
17337 (myresume): New function.
17338 (main): Handle 'v' case.
17339 * target.h (struct thread_resume): New type.
17340 (struct target_ops): Change argument of "resume" to struct
17341 thread_resume *.
17342 (myresume): Delete macro.
17343
17344 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17345
17346 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17347 (uninstall): Support DESTDIR.
17348
17349 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17350
17351 * configure.srv: Add xscale*linux copy of arm*linux entry.
17352
17353 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17354
17355 * linux-arm-low.c (arm_reinsert_addr): New function.
17356 (the_low_target): Add arm_reinsert_addr.
17357
17358 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17359
17360 * mem-break.c: Remove whitespace at end of file.
17361
17362 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17363
17364 * configure.in: Check whether we need to prototype strerror.
17365 * server.h: Optionally prototype strerror.
17366 * gdbreplay.c (perror_with_name): Use strerror.
17367 * linux-low.c (linux_attach_lwp): Use strerror.
17368 * utils.c (perror_with_name): Use strerror.
17369 * config.in, configure: Regenerated.
17370
17371 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17374 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17375
17376 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17377
17378 * Makefile.in (SFILES): Update.
17379 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17380 low-sun3.c: Remove files.
17381
17382 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17383
17384 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17385 (linux_detach_one_process, linux_detach): New functions.
17386 (linux_target_ops): Add linux_detach.
17387 * server.c (main): Handle 'D' packet.
17388 * target.h (struct target_ops): Add "detach" member.
17389 (detach_inferior): Define.
17390
17391 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17392
17393 From Kelley Cook <kelleycook@wideopenwest.com>:
17394 * configure.srv: Accept i[34567]86 variants.
17395
17396 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17397
17398 * linux-low.c (linux_wait_for_event): Correct comment typos.
17399 (linux_resume_one_process): Call check_removed_breakpoint.
17400 (linux_send_signal): New function.
17401 (linux_target_ops): Add linux_send_signal.
17402 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17403 of kill.
17404 * target.h (struct target_ops): Add send_signal.
17405
17406 2003-05-29 Jim Blandy <jimb@redhat.com>
17407
17408 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17409 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17410 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17411 away part of the register's value.
17412
17413 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17414
17415 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17416 (linux_wait_for_event, linux_init_signals): Likewise.
17417
17418 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17419
17420 * configure.in: Check for stdlib.h.
17421 * configure: Regenerated.
17422 * config.in: Regenerated.
17423
17424 2003-01-04 Andreas Schwab <schwab@suse.de>
17425
17426 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17427
17428 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17429
17430 * Makefile.in: Remove obsolete code.
17431
17432 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17433
17434 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17435 defined(PT_FPR0_HI).
17436
17437 2002-11-17 Stuart Hughes <seh@zee2.com>
17438
17439 * linux-arm-low.c (arm_num_regs): Increase.
17440 (arm_regmap): Include status register.
17441
17442 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17443
17444 * linux-low.c (register_addr): Remove incorrect -1 check.
17445
17446 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17447
17448 * linux-low.c (linux_create_inferior): Call setpgid. Return
17449 the new PID.
17450 (unstopped_p, linux_signal_pid): Remove.
17451 (linux_target_ops): Remove linux_signal_pid.
17452 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17453 global instead of target method.
17454 * target.h (struct target_ops): Remove signal_pid. Update comment
17455 for create_inferior.
17456 * server.c (signal_pid): New variable.
17457 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17458 gdbserver. Set the child to be the foreground process group.
17459 (attach_inferior): Set signal_pid.
17460
17461 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17462
17463 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17464
17465 2002-08-20 Jim Blandy <jimb@redhat.com>
17466
17467 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17468 default for this.
17469
17470 2002-08-01 Andrew Cagney <cagney@redhat.com>
17471
17472 * Makefile.in: Make chill references obsolete.
17473
17474 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17475
17476 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17477 * configure: Regenerate.
17478 * config.in: Regenerate.
17479
17480 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17481
17482 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17483 (perror_with_name, remote_close, remote_open, expect, play): Static.
17484
17485 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17486
17487 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17488 byte offsets instead of an array of indexes.
17489 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17490
17491 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17492
17493 * regcache.c: Add comment.
17494
17495 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17496
17497 * thread-db.c: New file.
17498 * proc-service.c: New file.
17499 * acinclude.m4: New file.
17500 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17501 proc-service.o, and thread-db.o.
17502 (linux-low.o): Add USE_THREAD_DB.
17503 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17504 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17505 * aclocal.m4: Regenerated.
17506 * config.in: Regenerated.
17507 * configure: Regenerated.
17508 * configure.in: Check for proc_service.h, sys/procfs.h,
17509 thread_db.h, and linux/elf.h headrs.
17510 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17511 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17512 Check for -lthread_db and thread support.
17513 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17514 PowerPC, and SuperH.
17515 * i387-fp.c: Constify arguments.
17516 * i387-fp.h: Likewise.
17517 * inferiors.c: (struct thread_info): Renamed from
17518 `struct inferior_info'. Remove PID member. Use generic inferior
17519 list header. All uses updated.
17520 (inferiors, signal_pid): Removed.
17521 (all_threads): New variable.
17522 (get_thread): Define.
17523 (add_inferior_to_list): New function.
17524 (for_each_inferior): New function.
17525 (change_inferior_id): New function.
17526 (add_inferior): Removed.
17527 (remove_inferior): New function.
17528 (add_thread): New function.
17529 (free_one_thread): New function.
17530 (remove_thread): New function.
17531 (clear_inferiors): Use for_each_inferior and free_one_thread.
17532 (find_inferior): New function.
17533 (find_inferior_id): New function.
17534 (inferior_target_data): Update argument type.
17535 (set_inferior_target_data): Likewise.
17536 (inferior_regcache_data): Likewise.
17537 (set_inferior_regcache_data): Likewise.
17538 * linux-low.c (linux_bp_reinsert): Remove.
17539 (all_processes, stopping_threads, using_thrads)
17540 (struct pending_signals, debug_threads, pid_of): New.
17541 (inferior_pid): Replace with macro.
17542 (struct inferior_linux_data): Remove.
17543 (get_stop_pc, add_process): New functions.
17544 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17545 Use add_process and add_thread.
17546 (linux_attach_lwp): New function, based on old linux_attach. Use
17547 add_process and add_thread. Set stop_expected for new threads.
17548 (linux_attach): New function.
17549 (linux_kill_one_process): New function.
17550 (linux_kill): Kill all LWPs.
17551 (linux_thread_alive): Use find_inferior_id.
17552 (check_removed_breakpoints, status_pending_p): New functions.
17553 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17554 Update. Use WNOHANG. Wait for cloned processes also. Update process
17555 struct for the found process.
17556 (linux_wait_for_event): New function.
17557 (linux_wait): Use it. Support LWPs.
17558 (send_sigstop, wait_for_sigstop, stop_all_processes)
17559 (linux_resume_one_process, linux_continue_one_process): New functions.
17560 (linux_resume): Support LWPs.
17561 (REGISTER_RAW_SIZE): Remove.
17562 (fetch_register): Use register_size instead. Call supply_register.
17563 (usr_store_inferior_registers): Likewise. Call collect_register.
17564 Fix recursive case.
17565 (regsets_fetch_inferior_registers): Improve error message.
17566 (regsets_store_inferior_registers): Add debugging.
17567 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17568 (unstopped_p, linux_signal_pid): New functions.
17569 (linux_target_ops): Add linux_signal_pid.
17570 (linux_init_signals): New function.
17571 (initialize_low): Call it. Initialize using_threads.
17572 * regcache.c (inferior_regcache_data): Add valid
17573 flag.
17574 (get_regcache): Fetch registers lazily. Add fetch argument
17575 and update all callers.
17576 (regcache_invalidate_one, regcache_invalidate): New
17577 functions.
17578 (new_register_cache): Renamed from create_register_cache.
17579 Return the new regcache.
17580 (free_register_cache): Change argument to a void *.
17581 (registers_to_string, registers_from_string): Call get_regcache
17582 with fetch flag set.
17583 (register_data): Make static. Pass fetch flag to get_regcache.
17584 (supply_register): Call get_regcache with fetch flag clear.
17585 (collect_register): Call get_regcache with fetch flag set.
17586 (collect_register_as_string): New function.
17587 * regcache.h: Update.
17588 * remote-utils.c (putpkt): Flush after debug output and use
17589 stderr.
17590 Handle input interrupts while waiting for an ACK.
17591 (input_interrupt): Use signal_pid method.
17592 (getpkt): Flush after debug output and use stderr.
17593 (outreg): Use collect_register_as_string.
17594 (new_thread_notify, dead_thread_notify): New functions.
17595 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17596 and general_thread.
17597 (look_up_one_symbol): Flush after debug output.
17598 * server.c (step_thread, server_waiting): New variables.
17599 (start_inferior): Don't use signal_pid. Update call to mywait.
17600 (attach_inferior): Update call to mywait.
17601 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17602 (main): Don't fetch/store registers explicitly. Use
17603 set_desired_inferior. Support proposed ``Hs'' packet. Update
17604 calls to mywait.
17605 * server.h: Update.
17606 (struct inferior_list, struct_inferior_list_entry): New.
17607 * target.c (set_desired_inferior): New.
17608 (write_inferior_memory): Constify.
17609 (mywait): New function.
17610 * target.h: Update.
17611 (struct target_ops): New signal_pid method.
17612 (mywait): Removed macro, added prototype.
17613
17614 * linux-low.h (regset_func): Removed.
17615 (regset_fill_func, regset_store_func): New.
17616 (enum regset_type): New.
17617 (struct regset_info): Add type field. Use new operation types.
17618 (struct linux_target_ops): stop_pc renamed to get_pc.
17619 Add decr_pc_after_break and breakpoint_at.
17620 (get_process, get_thread_proess, get_process_thread)
17621 (strut process_info, all_processes, linux_attach_lwp)
17622 (thread_db_init): New.
17623
17624 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17625 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17626 (the_low_target): Add new members.
17627 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17628 (i386_store_fpxregset): Constify.
17629 (target_regsets): Add new kind identifier.
17630 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17631 (i386_set_pc): Add debugging.
17632 (i386_breakpoint_at): New function.
17633 (the_low_target): Add new members.
17634 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17635 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17636 (mips_breakpoint_at): New.
17637 (the_low_target): Add new members.
17638 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17639 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17640 (the_low_target): Add new members.
17641 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17642 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17643 (the_low_target): Add new members.
17644 * linux-x86-64-low.c (target_regsets): Add new kind
17645 identifier.
17646
17647 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17648
17649 From Martin Pool <mbp@samba.org>:
17650 * server.c (gdbserver_usage): New function.
17651 (main): Call it.
17652
17653 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17654
17655 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17656 stop_at -> stop_pc.
17657
17658 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17659
17660 * Makefile.in: Remove obsolete code.
17661
17662 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17663
17664 * linux-low.c (regsets_fetch_inferior_registers),
17665 (regsets_store_inferior_registers): Removed cast to int from
17666 ptrace() calls.
17667 * regcache.h: Added declaration of struct inferior_info.
17668
17669 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17670
17671 * inferiors.c (struct inferior_info): Add regcache_data.
17672 (add_inferior): Call create_register_cache.
17673 (clear_inferiors): Call free_register_cache.
17674 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17675 * regcache.c (struct inferior_regcache_data): New.
17676 (registers): Remove.
17677 (get_regcache): New function.
17678 (create_register_cache, free_register_cache): New functions.
17679 (set_register_cache): Don't initialize the register cache here.
17680 (registers_to_string, registers_from_string, register_data): Call
17681 get_regcache.
17682 * regcache.h: Add prototypes.
17683 * server.h: Likewise.
17684
17685 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17686
17687 * mem-break.c: New file.
17688 * mem-break.h: New file.
17689 * Makefile.in: Add mem-break.o rule; update server.h
17690 dependencies.
17691 * inferiors.c (struct inferior_info): Add target_data
17692 member.
17693 (clear_inferiors): Free target_data member if set.
17694 (inferior_target_data, set_inferior_target_data): New functions.
17695 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17696 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17697 * linux-low.c (linux_bp_reinsert): New variable.
17698 (struct inferior_linux_data): New.
17699 (linux_create_inferior): Use set_inferior_target_data.
17700 (linux_attach): Likewise. Call add_inferior.
17701 (linux_wait_for_one_inferior): New function.
17702 (linux_wait): Call it.
17703 (linux_write_memory): Add const.
17704 (initialize_low): Call set_breakpoint_data.
17705 * linux-low.h (struct linux_target_ops): Add breakpoint
17706 handling members.
17707 * server.c (attach_inferior): Remove extra add_inferior
17708 call.
17709 * server.h: Include mem-break.h. Update inferior.c
17710 prototypes.
17711 * target.c (read_inferior_memory)
17712 (write_inferior_memory): New functions.
17713 * target.h (read_inferior_memory)
17714 (write_inferior_memory): Change macros to prototypes.
17715 (struct target_ops): Update comments. Add const to write_memory
17716 definition.
17717
17718 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17719
17720 * linux-low.c (usr_store_inferior_registers): Support
17721 registers which are allowed to fail to store.
17722 * linux-low.h (linux_target_ops): Likewise.
17723 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17724 (ppc_cannot_store_register): FPSCR may not be storable.
17725
17726 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17727
17728 * server.h: Include <string.h> if HAVE_STRING_H.
17729 * ChangeLog: Correct paths in last ChangeLog entry.
17730
17731 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17732
17733 * linux-low.h: Remove obsolete prototypes.
17734 (struct linux_target_ops): New.
17735 (extern the_low_target): New.
17736 * linux-low.c (num_regs, regmap): Remove declarations.
17737 (register_addr): Use the_low_target explicitly.
17738 (fetch_register): Likewise.
17739 (usr_fetch_inferior_registers): Likewise.
17740 (usr_store_inferior_registers): Likewise.
17741 * linux-arm-low.c (num_regs): Remove.
17742 (arm_num_regs): Define.
17743 (arm_regmap): Renamed from regmap, made static.
17744 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17745 made static.
17746 (arm_cannot_store_register): Renamed from cannot_store_register,
17747 made static.
17748 (the_low_target): New.
17749 * linux-i386-low.c (num_regs): Remove.
17750 (i386_num_regs): Define.
17751 (i386_regmap): Renamed from regmap, made static.
17752 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17753 made static.
17754 (i386_cannot_store_register): Renamed from cannot_store_register,
17755 made static.
17756 (the_low_target): New.
17757 * linux-ia64-low.c (num_regs): Remove.
17758 (ia64_num_regs): Define.
17759 (ia64_regmap): Renamed from regmap, made static.
17760 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17761 made static.
17762 (ia64_cannot_store_register): Renamed from cannot_store_register,
17763 made static.
17764 (the_low_target): New.
17765 * linux-m68k-low.c (num_regs): Remove.
17766 (m68k_num_regs): Define.
17767 (m68k_regmap): Renamed from regmap, made static.
17768 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17769 made static.
17770 (m68k_cannot_store_register): Renamed from cannot_store_register,
17771 made static.
17772 (the_low_target): New.
17773 * linux-mips-low.c (num_regs): Remove.
17774 (mips_num_regs): Define.
17775 (mips_regmap): Renamed from regmap, made static.
17776 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17777 made static.
17778 (mips_cannot_store_register): Renamed from cannot_store_register,
17779 made static.
17780 (the_low_target): New.
17781 * linux-ppc-low.c (num_regs): Remove.
17782 (ppc_num_regs): Define.
17783 (ppc_regmap): Renamed from regmap, made static.
17784 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17785 made static.
17786 (ppc_cannot_store_register): Renamed from cannot_store_register,
17787 made static.
17788 (the_low_target): New.
17789 * linux-s390-low.c (num_regs): Remove.
17790 (s390_num_regs): Define.
17791 (s390_regmap): Renamed from regmap, made static.
17792 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17793 made static.
17794 (s390_cannot_store_register): Renamed from cannot_store_register,
17795 made static.
17796 (the_low_target): New.
17797 * linux-sh-low.c (num_regs): Remove.
17798 (sh_num_regs): Define.
17799 (sh_regmap): Renamed from regmap, made static.
17800 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17801 made static.
17802 (sh_cannot_store_register): Renamed from cannot_store_register,
17803 made static.
17804 (the_low_target): New.
17805 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17806 (the_low_target): New.
17807
17808 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17809
17810 * Makefile.in: Add stamp-h target.
17811 * configure.in: Create stamp-h.
17812 * configure: Regenerated.
17813
17814 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17815
17816 * inferiors.c: New file.
17817 * target.c: New file.
17818 * target.h: New file.
17819 * Makefile.in: Add target.o and inferiors.o. Update
17820 dependencies.
17821 * linux-low.c (inferior_pid): New static variable,
17822 moved from server.c.
17823 (linux_create_inferior): Renamed from create_inferior.
17824 Call add_inferior. Return 0 on success instead of a PID.
17825 (linux_attach): Renamed from myattach.
17826 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17827 (linux_thread_alive): Renamed from mythread_alive.
17828 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17829 child dies.
17830 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17831 (regsets_store_inferior_registers): Correct error message.
17832 Add missing ``return 0''.
17833 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17834 (linux_store_registers): Renamed from store_inferior_registers.
17835 (linux_read_memory): Renamed from read_inferior_memory.
17836 (linux_write_memory): Renamed from write_inferior_memory.
17837 (linux_target_ops): New structure.
17838 (initialize_low): Call set_target_ops ().
17839 * remote-utils.c (unhexify): New function.
17840 (hexify): New function.
17841 (input_interrupt): Send signals to ``signal_pid''.
17842 * server.c (inferior_pid): Remove.
17843 (start_inferior): Update create_inferior call.
17844 (attach_inferior): Call add_inferior.
17845 (handle_query): New function.
17846 (main): Call handle_query for `q' packets.
17847 * server.h: Include "target.h". Remove obsolete prototypes.
17848 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17849
17850 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17851
17852 * Makefile.in: Add WARN_CFLAGS. Update configury
17853 dependencies.
17854 * configure.in: Check for <string.h>
17855 * configure: Regenerate.
17856 * config.in: Regenerate.
17857 * gdbreplay.c: Include needed system headers.
17858 (remote_open): Remove strchr prototype.
17859 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17860 * regcache.c (supply_register): Change buf argument to const void *.
17861 (supply_register_by_name): Likewise.
17862 (collect_register): Change buf argument to void *.
17863 (collect_register_by_name): Likewise.
17864 * regcache.h: Add missing prototypes.
17865 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17866 * server.c (handle_query): New function.
17867 (attached): New static variable, moved out of main.
17868 (main): Quiet longjmp clobber warnings.
17869 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17870 * utils.c (error): Remove NORETURN.
17871 (fatal): Likewise.
This page took 0.397502 seconds and 4 git commands to generate.