Constify get_exec_file
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-12-16 Tom Tromey <tromey@adacore.com>
2
3 * server.c (get_exec_file): Constify result.
4
5 2019-12-10 Christian Biesinger <cbiesinger@google.com>
6
7 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
8 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
9 * config.in: Regenerate.
10 * configure: Regenerate.
11 * configure.ac: Don't check for strerror.
12 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
13 Call safe_strerror instead of strerror.
14 * server.h (strerror): Remove this now-unnecessary declaration.
15 * tracepoint.c (init_named_socket): Call safe_strerror instead of
16 strerror.
17 (gdb_agent_helper_thread): Likewise.
18 * utils.c (perror_with_name): Likewise.
19
20 2019-11-26 Tom Tromey <tom@tromey.com>
21
22 * configure, config.in: Rebuild.
23
24 2019-11-26 Tom Tromey <tom@tromey.com>
25
26 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
27 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
28 gdb_sigmask.
29 * configure, config.in: Rebuild.
30
31 2019-11-26 Tom Tromey <tom@tromey.com>
32
33 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
34 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
35 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
36 * acinclude.m4: Include ax_pthread.m4.
37 * config.in, configure: Rebuild.
38
39 2019-11-26 Christian Biesinger <cbiesinger@google.com>
40
41 * debug.c (debug_set_output): Call safe_strerror instead of
42 strerror.
43 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
44 (linux_kill_one_lwp): Likewise.
45 (linux_detach_one_lwp): Likewise.
46 (linux_wait_for_event_filtered): Likewise.
47 (store_register): Likewise.
48 * lynx-low.c (lynx_attach): Likewise.
49 * mem-break.c (insert_memory_breakpoint): Likewise.
50 (remove_memory_breakpoint): Likewise.
51 (delete_fast_tracepoint_jump): Likewise.
52 (set_fast_tracepoint_jump): Likewise.
53 (uninsert_fast_tracepoint_jumps_at): Likewise.
54 (reinsert_fast_tracepoint_jumps_at): Likewise.
55 * nto-low.c (nto_xfer_memory): Likewise.
56 (nto_resume): Likewise.
57
58 2019-11-20 Luis Machado <luis.machado@linaro.org>
59
60 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
61 instead of register count.
62 * tdesc.c (tdesc_contains_feature): New function.
63 * tdesc.h (tdesc_contains_feature): New prototype.
64
65 2019-11-15 Christian Biesinger <cbiesinger@google.com>
66
67 * Makefile.in: Add safe-strerror.c.
68 * configure: Regenerate.
69 * configure.ac: Don't source common.host.
70
71 2019-11-15 Christian Biesinger <cbiesinger@google.com>
72
73 * config.in: Regenerate.
74 * configure: Regenerate.
75
76 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
77
78 * ax.c (ax_printf): Handle size_t_arg.
79
80 2019-11-06 Christian Biesinger <cbiesinger@google.com>
81
82 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
83 * mi/mi-main.c (output_cores): Likewise.
84 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
85 (linux_xfer_osdata_modules): Likewise.
86 * remote.c (register_remote_support_xml): Likewise.
87 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
88 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
89
90 2019-11-01 Christian Biesinger <cbiesinger@google.com>
91
92 * configure: Regenerate.
93 * configure.ac: Remove check for strerror_r.
94
95 2019-10-31 Christian Biesinger <cbiesinger@google.com>
96
97 * config.in: Regenerate.
98 * configure: Regenerate.
99 * configure.ac: Also check for strerror_r.
100
101 2019-10-31 Christian Biesinger <cbiesinger@google.com>
102
103 * ax.h (debug_agent): Remove duplicate declaration.
104
105 2019-10-26 Tom de Vries <tdevries@suse.de>
106
107 * linux-aarch64-low.c: Fix typos in comments.
108 * linux-arm-low.c: Same.
109 * linux-low.c: Same.
110 * linux-ppc-low.c: Same.
111 * proc-service.c: Same.
112 * regcache.h: Same.
113 * server.c: Same.
114 * tracepoint.c: Same.
115 * win32-low.c: Same.
116
117 2019-10-25 Tom Tromey <tromey@adacore.com>
118
119 * utils.c (xstrdup): Remove.
120
121 2019-10-23 Tom Tromey <tom@tromey.com>
122
123 * configure, config.in: Rebuild.
124
125 2019-10-23 Tom Tromey <tom@tromey.com>
126
127 * configure: Rebuild.
128 * acinclude.m4: Use m4_include, not sinclude.
129
130 2019-10-17 Tom Tromey <tromey@adacore.com>
131
132 * configure: Rebuild.
133 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
134 in AC_CONFIG_FILES invocation.
135 * Makefile.in (stamp-h, Makefile): Use new-style config.status
136 invocation.
137
138 2019-10-16 Christian Biesinger <cbiesinger@google.com>
139
140 * server.c: Include xml-builtin.h.
141 (get_xml_features): Don't declare xml_builtins here.
142
143 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
144
145 * Makefile.in: Remove references to vec-ipa.o.
146
147 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
148
149 * Makefile.in: Remove references to vec.c.
150
151 2019-10-02 Christian Biesinger <cbiesinger@google.com>
152
153 * server.c (server_waiting): Change to bool.
154 (extended_protocol): Likewise.
155 (response_needed): Likewise.
156 (exit_requested): Likewise.
157 (run_once): Likewise.
158 (report_no_resumed): Likewise.
159 (non_stop): Likewise.
160 (disable_packet_vCont): Likewise.
161 (disable_packet_Tthread): Likewise.
162 (disable_packet_qC): Likewise.
163 (disable_packet_qfThreadInfo): Likewise.
164 (handle_general_set): Update.
165 (handle_detach): Update.
166 (handle_monitor_command): Update.
167 (handle_query): Update.
168 (captured_main): Update.
169 (process_serial_event): Update.
170 * server.h (server_waiting): Change to bool.
171 (disable_packet_vCont): Likewise.
172 (disable_packet_Tthread): Likewise.
173 (disable_packet_qC): Likewise.
174 (disable_packet_qfThreadInfo): Likewise.
175 (run_once): Likewise.
176 (non_stop): Likewise.
177 * target.c (target_stop_and_wait): Update.
178
179 2019-10-02 Tom Tromey <tromey@adacore.com>
180
181 * Makefile.in (SFILES): Add common-inferior.c.
182 (OBS): Add common-inferior.o.
183 * server.c (startup_with_shell): Don't define.
184
185 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
186
187 * linux-low.c (linux_low_read_btrace): Update for change to
188 std::vector.
189
190 2019-09-20 Christian Biesinger <cbiesinger@google.com>
191
192 * debug.c (debug_threads): Remove comment in favor of the header.
193 * debug.h (using_threads): Add declaration.
194 (debug_threads): Add comment.
195 * linux-aarch64-low.c: Include debug.h and remove declaration of
196 debug_threads.
197 * nto-low.c: Likewise.
198 * remote-utils.c: Likewise.
199 * thread-db.c: Likewise.
200
201 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
202
203 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
204 and powerpc-cell64l-ipa.o.
205 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
206 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
207 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
208 (spu*-*-*): Remove.
209
210 * spu-low.c: Remove file.
211
212 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
213 (parse_spufs_run): Remove.
214 (ppc_get_pc): Remove Cell/B.E. support.
215 (ppc_set_pc): Likewise.
216 (ppc_breakpoint_at): Likewise.
217 (ppc_arch_setup): Likewise.
218 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
219 tdesc_powerpc_cell32l.
220 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
221 or init_registers_powerpc_cell32l.
222 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
223 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
224 or init_registers_powerpc_cell32l.
225 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
226 (init_registers_powerpc_cell32l): Remove prototype.
227 (init_registers_powerpc_cell64l): Likewise.
228
229 * target.h (struct target_ops): Remove qxfer_spu member.
230 * server.c (handle_qxfer_spu): Remove.
231 (qxfer_packets): Remove entry for "spu".
232 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
233 * linux-low.c (SPUFS_MAGIC): Remove.
234 (spu_enumerate_spu_ids): Remove.
235 (linux_qxfer_spu): Remove.
236 (linux_target_ops): Remove qxfer_spu member.
237 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
238 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
239 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
240
241 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
242
243 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
244 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
245 * config.in: Regenerate.
246 * configure: Regenerate.
247
248 2019-08-15 Tom Tromey <tromey@adacore.com>
249
250 * target.c (target_write_memory): Use gdb::byte_vector.
251
252 2019-08-15 Tom Tromey <tromey@adacore.com>
253
254 * tracepoint.c (write_inferior_data_pointer)
255 (write_inferior_integer, write_inferior_int8)
256 (write_inferior_uinteger, m_tracepoint_action_download)
257 (r_tracepoint_action_download, x_tracepoint_action_download)
258 (l_tracepoint_action_download, clear_inferior_trace_buffer)
259 (download_agent_expr, download_tracepoint_1)
260 (download_trace_state_variables, upload_fast_traceframes): Update.
261 * server.c (gdb_write_memory): Update.
262 * remote-utils.c (relocate_instruction): Update.
263 * proc-service.c (ps_pdwrite): Update.
264 * mem-break.c (remove_memory_breakpoint)
265 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
266 (uninsert_fast_tracepoint_jumps_at)
267 (reinsert_fast_tracepoint_jumps_at): Update.
268 * linux-x86-low.c (append_insns)
269 (i386_install_fast_tracepoint_jump_pad)
270 (amd64_write_goto_address, i386_write_goto_address): Update.
271 * linux-s390-low.c (append_insns, s390_write_goto_address):
272 Update.
273 * linux-ppc-low.c (ppc_relocate_instruction)
274 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
275 (ppc_write_goto_address): Update.
276 * linux-aarch64-low.c (append_insns): Update.
277 * target.h (struct target_ops): Update.
278 (write_inferior_memory): Don't declare.
279 * target.c (target_write_memory): Rename from
280 write_inferior_memory. Remove old target_write_memory.
281
282 2019-08-15 Tom Tromey <tromey@adacore.com>
283
284 * target.c (write_inferior_memory): Use std::vector.
285
286 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
287
288 PR build/24886
289 * configure.ac: Drop enable-libmcheck support.
290 * configure, config.in: Rebuild.
291 * acinclude.m4: Don't include it.
292
293 2019-07-19 Alan Hayward <alan.hayward@arm.com>
294
295 * configure.srv: Remove Arm xml files.
296
297 2019-07-19 Alan Hayward <alan.hayward@arm.com>
298
299 * configure.srv: Add new files. Remove xml generated files.
300 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
301 registers.
302 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
303 * linux-aarch32-tdesc.c: New file.
304 * linux-aarch32-tdesc.h: New file.
305 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
306 * linux-arm-low.c (init_registers_arm, tdesc_arm)
307 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
308 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
309 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
310 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
311 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
312 (arm_read_description): Call arm_linux_read_description.
313 (initialize_low_arch): Don't init registers.
314 * linux-arm-tdesc.c: New file.
315 * linux-arm-tdesc.h: New file.
316
317 2019-07-10 Alan Hayward <alan.hayward@arm.com>
318
319 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
320 Move counter inside for.
321 (arm_read_description): Check ptrace earlier.
322 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
323
324 2019-07-09 Tom Tromey <tom@tromey.com>
325
326 * configure: Rebuild.
327 * configure.ac: Change common to gdbsupport.
328 * acinclude.m4: Change common to gdbsupport.
329 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
330 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
331 common to gdbsupport.
332 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
333 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
334 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
335 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
336 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
337 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
338 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
339 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
340 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
341 common to gdbsupport.
342
343 2019-07-04 Alan Hayward <alan.hayward@arm.com>
344
345 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
346 defines.
347 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
348
349 2019-07-04 Alan Hayward <alan.hayward@arm.com>
350
351 * configure.srv: Remove legacy xml.
352 * linux-aarch64-low.c (initialize_low_arch): Remove
353 initialize_low_tdesc call.
354 * linux-aarch64-tdesc-selftest.c: Remove file.
355 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
356 * linux-x86-low.c (initialize_low_arch): Remove
357 initialize_low_tdesc call.
358 * linux-x86-tdesc-selftest.c: Remove file.
359 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
360
361 2019-06-20 Tom de Vries <tdevries@suse.de>
362
363 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
364 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
365
366 2019-06-19 Tom de Vries <tdevries@suse.de>
367
368 * debug.h (debug_write): Change return type to ssize_t.
369 * debug.c (debug_write): Same.
370
371 2019-06-14 Tom Tromey <tom@tromey.com>
372
373 * configure.ac: Use new path to gnulib.
374 * configure: Rebuild.
375 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
376 to gnulib.
377
378 2019-06-11 Tom Tromey <tom@tromey.com>
379
380 * Makefile.in (SFILES): Add alloc.c.
381 (OBS): Add alloc.o.
382 (IPA_OBJS): Add alloc-ipa.o.
383 (alloc-ipa.o): New target.
384 (%.o: ../%.c): New pattern rule.
385
386 2019-06-10 Tom Tromey <tromey@adacore.com>
387
388 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
389 end warning with a newline.
390 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
391 newline.
392 * thread-db.c (attach_thread): Don't end warning with a newline.
393 (thread_db_notice_clone): Likewise.
394 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
395 newline.
396 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
397 end warning with a newline.
398
399 2019-06-04 Pedro Alves <palves@redhat.com>
400
401 * server.c (captured_main): Use make_unique_xstrdup.
402
403 2019-06-02 Tom Tromey <tom@tromey.com>
404
405 * gdbreplay.c (fromhex): Remove.
406 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
407
408 2019-05-29 Tom Tromey <tromey@adacore.com>
409
410 * configure: Rebuild.
411
412 2019-05-06 Kevin Buettner <kevinb@redhat.com>
413
414 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
415 sign extension code on 32-bit builds.
416
417 2019-05-03 Eli Zaretskii <eliz@gnu.org>
418
419 * remote-utils.c:
420 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
421
422 2019-04-19 Tom Tromey <tom@tromey.com>
423
424 * server.c (struct vstop_notif): Derive from notif_event.
425 <base>: Remove.
426 (queue_stop_reply): Update.
427 (remove_all_on_match_ptid): Change type. Rewrite.
428 (discard_queued_stop_replies): Rewrite.
429 (in_queued_stop_replies_ptid): Change type.
430 (in_queued_stop_replies): Rewrite.
431 (notif_stop): Update.
432 (queue_stop_reply_callback): Update.
433 (captured_main): Don't call initialize_notif.
434 (push_stop_notification): Update.
435 * notif.c (notif_write_event, handle_notif_ack)
436 (notif_event_enque, notif_push): Update.
437 (notif_event_xfree, initialize_notif): Remove.
438 * notif.h (struct notif_event): Include <list>, not
439 "common/queue.h".
440 (struct notif_server) <queue>: Now a std::list.
441 (notif_event_p): Remove typedef.
442 (initialize_notif): Don't declare.
443 (struct notif_event): Add virtual destructor.
444
445 2019-04-17 Alan Hayward <alan.hayward@arm.com>
446
447 * ax.c (ax_vdebug): Call debug_printf.
448 * debug.c (debug_write): New function.
449 * debug.h (debug_write): New declaration.
450 * linux-low.c (sigchld_handler): Call debug_write.
451
452 2019-04-17 Alan Hayward <alan.hayward@arm.com>
453
454 * debug.c (debug_set_output): New function.
455 (debug_vprintf): Send output to debug_file.
456 (debug_flush): Likewise.
457 * debug.h (debug_set_output): New declaration.
458 * server.c (handle_monitor_command): Add debug-file option.
459 (captured_main): Likewise.
460
461 2019-04-17 Alan Hayward <alan.hayward@arm.com>
462
463 * debug.c (remote_debug): Add definition.
464 * debug.h (remote_debug): Add declaration.
465 * hostio.c (remote_debug): Remove declaration.
466 * remote-utils.c (struct ui_file): Likewise.
467 (remote_debug): Likewise.
468 * remote-utils.h (remote_debug): Likewise,
469 * server.c (remote_debug): Remove definition.
470
471 2019-04-10 Kevin Buettner <kevinb@redhat.com>
472
473 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
474 when using a 64-bit gdbserver.
475
476 2019-04-09 Tom Tromey <tromey@adacore.com>
477
478 * linux-low.c (select_event_lwp): Use find_thread_in_random.
479
480 2019-04-08 Tom Tromey <tom@tromey.com>
481
482 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
483 throw.
484 (linux_resume_one_lwp): Likewise.
485
486 2019-04-08 Tom Tromey <tom@tromey.com>
487
488 * gdbreplay.c: Update.
489 * linux-low.c: Update.
490 * server.c: Update.
491
492 2019-04-08 Tom Tromey <tom@tromey.com>
493
494 * server.c: Use C++ exception handling.
495 * linux-low.c: Use C++ exception handling.
496 * gdbreplay.c: Use C++ exception handling.
497
498 2019-04-08 Tom Tromey <tom@tromey.com>
499
500 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
501 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
502 (captured_main, main): Update.
503 * gdbreplay.c (main): Update.
504
505 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
506
507 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
508 value in argument pointer, return 1 if the entry is found and 0
509 otherwise. Move comment.
510 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
511 * linux-low.h (linux_get_auxv): Declare.
512 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
513
514 2019-04-05 Tom Tromey <tromey@adacore.com>
515
516 * server.c (gdbserver_usage): Use upper-case for metasyntactic
517 variables.
518
519 2019-03-28 Alan Hayward <alan.hayward@arm.com>
520
521 * linux-low.c (AT_HWCAP2): Add define if not already included.
522
523 2019-03-26 Alan Hayward <alan.hayward@arm.com>
524
525 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
526 (aarch64_arch_setup): Call linux_get_hwcap.
527 * linux-arm-low.c (arm_get_hwcap): Remove function.
528 (arm_read_description): Call linux_get_hwcap.
529 * linux-low.c (linux_get_auxv): New function.
530 (linux_get_hwcap): Likewise.
531 (linux_get_hwcap2): Likewise.
532 * linux-low.h (linux_get_hwcap): New declaration.
533 (linux_get_hwcap2): Likewise.
534 * linux-ppc-low.c (ppc_get_auxv): Remove function.
535 (ppc_arch_setup): Call linux_get_hwcap.
536 * linux-s390-low.c (s390_get_hwcap): Remove function.
537 (s390_arch_setup): Call linux_get_hwcap.
538
539 2019-03-22 Alan Hayward <alan.hayward@arm.com>
540 Jiong Wang <jiong.wang@arm.com>
541
542 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
543 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
544 to fail.
545 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
546
547 2019-03-22 Alan Hayward <alan.hayward@arm.com>
548 Jiong Wang <jiong.wang@arm.com>
549
550 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
551 (aarch64_get_hwcap): New function.
552 (aarch64_arch_setup): Read APIA hwcap.
553
554 2019-03-22 Alan Hayward <alan.hayward@arm.com>
555 Jiong Wang <jiong.wang@arm.com>
556
557 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
558 (initialize_low_tracepoint): Likewise.
559 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
560 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
561 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
562 (aarch64_linux_read_description): Likewise.
563 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
564
565 2019-03-12 John Baldwin <jhb@FreeBSD.org>
566
567 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
568 i386_create_target_description for 'segments' parameter.
569 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
570 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
571 * win32-i386-low.c (i386_arch_setup): Likewise.
572
573 2019-03-12 Tom Tromey <tromey@adacore.com>
574
575 * linux-low.c (iterate_over_lwps): Update.
576
577 2019-03-06 Tom Tromey <tom@tromey.com>
578
579 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
580 (captured_main): Use SCOPE_EXIT.
581
582 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
583
584 * configure.srv: Use '$enable_unittest' instead of '$development'
585 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
586 case.
587
588 2019-02-27 Tom Tromey <tromey@adacore.com>
589
590 * gdbreplay.c (logchar): Handle \r\n.
591
592 2019-02-07 Alan Hayward <alan.hayward@arm.com>
593
594 * linux-low.c (linux_attach): Add process before lwp.
595 * server.c (attach_inferior): Check if already attached.
596
597 2019-02-07 Tom Tromey <tom@tromey.com>
598
599 * x86-tdesc.h: Rename include guard.
600 * x86-low.h: Add include guard.
601 * wincecompat.h: Rename include guard.
602 * win32-low.h: Add include guard.
603 * utils.h: Rename include guard.
604 * tracepoint.h: Rename include guard.
605 * tdesc.h: Rename include guard.
606 * target.h: Rename include guard.
607 * server.h: Rename include guard.
608 * remote-utils.h: Rename include guard.
609 * regcache.h: Rename include guard.
610 * nto-low.h: Rename include guard.
611 * notif.h: Add include guard.
612 * mem-break.h: Rename include guard.
613 * lynx-low.h: Add include guard.
614 * linux-x86-tdesc.h: Add include guard.
615 * linux-s390-tdesc.h: Add include guard.
616 * linux-ppc-tdesc-init.h: Add include guard.
617 * linux-low.h: Add include guard.
618 * linux-aarch64-tdesc.h: Add include guard.
619 * linux-aarch32-low.h: Add include guard.
620 * inferiors.h: Rename include guard.
621 * i387-fp.h: Rename include guard.
622 * hostio.h: Rename include guard.
623 * gdbthread.h: Rename include guard.
624 * gdb_proc_service.h: Rename include guard.
625 * event-loop.h: Rename include guard.
626 * dll.h: Rename include guard.
627 * debug.h: Rename include guard.
628 * ax.h: Rename include guard.
629
630 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
631
632 PR gdb/23985
633 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
634 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
635
636 2019-01-25 Tom Tromey <tom@tromey.com>
637
638 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
639
640 2019-01-25 Tom Tromey <tom@tromey.com>
641
642 * win32-low.c: Fix common/ includes.
643 * win32-i386-low.c: Fix common/ includes.
644 * tracepoint.c: Fix common/ includes.
645 * thread-db.c: Fix common/ includes.
646 * target.h: Fix common/ includes.
647 * symbol.c: Fix common/ includes.
648 * spu-low.c: Fix common/ includes.
649 * server.h: Fix common/ includes.
650 * server.c: Fix common/ includes.
651 * remote-utils.c: Fix common/ includes.
652 * regcache.h: Fix common/ includes.
653 * regcache.c: Fix common/ includes.
654 * nto-x86-low.c: Fix common/ includes.
655 * notif.h: Fix common/ includes.
656 * mem-break.h: Fix common/ includes.
657 * lynx-low.c: Fix common/ includes.
658 * lynx-i386-low.c: Fix common/ includes.
659 * linux-x86-tdesc-selftest.c: Fix common/ includes.
660 * linux-x86-low.c: Fix common/ includes.
661 * linux-low.c: Fix common/ includes.
662 * inferiors.h: Fix common/ includes.
663 * i387-fp.c: Fix common/ includes.
664 * hostio.c: Fix common/ includes.
665 * hostio-errno.c: Fix common/ includes.
666 * gdbthread.h: Fix common/ includes.
667 * gdbreplay.c: Fix common/ includes.
668 * fork-child.c: Fix common/ includes.
669 * event-loop.c: Fix common/ includes.
670 * ax.c:
671 (enum gdb_agent_op): Fix common/ includes.
672
673 2019-01-21 Tom Tromey <tom@tromey.com>
674
675 * tracepoint.c: Fix includes.
676 * remote-utils.c: Fix includes.
677 * linux-x86-low.c: Fix includes.
678
679 2019-01-01 Joel Brobecker <brobecker@adacore.com>
680
681 * gdbreplay.c (gdbreplay_version): Update copyright year in
682 version message.
683 * server.c (gdbserver_version): Likewise.
684
685 2018-12-05 Alan Hayward <alan.hayward@arm.com>
686
687 * linux-low.c (add_lwp): Switch ordering.
688
689 2018-11-29 Tom Tromey <tom@tromey.com>
690
691 * win32-low.c (win32_join): Take pid, not process.
692 * target.h (struct target_ops) <join>: Change argument type.
693 (join_inferior): Change argument name.
694 * spu-low.c (spu_join): Take pid, not process.
695 * server.c (handle_detach): Preserve pid before destroying
696 process.
697 * lynx-low.c (lynx_join): Take pid, not process.
698 * linux-low.c (linux_join): Take pid, not process.
699
700 2018-11-23 Alan Hayward <alan.hayward@arm.com>
701
702 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
703 (aarch64_cannot_fetch_register): Likewise.
704 (struct linux_target_ops): Update references.
705
706 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
707
708 * linux-ppc-low.c: Include nat/linux-ptrace.h.
709
710 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
711
712 * configure.srv (ipa_ppc_linux_regobj): Add
713 powerpc-isa207-htm-vsx32l-ipa.o and
714 powerpc-isa207-htm-vsx64l-ipa.o.
715 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
716 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
717 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
718 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
719 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
720 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
721 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
722 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
723 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
724 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
725 (init_registers_powerpc_isa207_htm_vsx32l)
726 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
727 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
728 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
729 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
730 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
731 (ppc_store_tm_ctarregset): New functions.
732 (ppc_regsets): Add entries for HTM regsets.
733 (ppc_arch_setup): Set htm in features struct when needed. Set
734 sizes for the HTM regsets.
735 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
736 (initialize_low_arch): Call
737 init_registers_powerpc_isa207_htm_vsx32l and
738 init_registers_powerpc_isa207_htm_vsx64l.
739 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
740 PPC_TDESC_ISA207_HTM_VSX.
741 (initialize_low_tracepoint): Call
742 init_registers_powerpc_isa207_htm_vsx32l and
743 init_registers_powerpc_isa207_htm_vsx64l.
744
745 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
746
747 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
748 rs6000/power-linux-pmu.xml to srv_xmlfiles.
749 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
750 (ppc_store_pmuregset): New functions.
751 (ppc_regsets): Add entries for ebb and pmu regsets.
752 (ppc_arch_setup): Set isa207 in features struct if the ebb and
753 pmu regsets are available. Set sizes for these regsets.
754
755 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
756
757 * configure.srv (ipa_ppc_linux_regobj): Add
758 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
759 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
760 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
761 rs6000/powerpc-isa207-vsx32l.xml, and
762 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
763 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
764 <PPC_TDESC_ISA207_VSX>: New enum value.
765 (init_registers_powerpc_isa207_vsx32l): Declare.
766 (init_registers_powerpc_isa207_vsx64l): Declare.
767 * linux-ppc-low.c (ppc_fill_tarregset): New function.
768 (ppc_store_tarregset): New function.
769 (ppc_regsets): Add entry for the TAR regset.
770 (ppc_arch_setup): Set isa207 in features struct when needed. Set
771 size for the TAR regsets.
772 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
773 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
774 and init_registers_powerpc_isa207_vsx64l.
775 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
776 (initialize_low_tracepoint): Call
777 init_registers_powerpc_isa207_vsx32l and
778 init_registers_powerpc_isa207_vsx64l.
779
780 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
781 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
782
783 * configure.srv (ipa_ppc_linux_regobj): Add
784 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
785 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
786 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
787 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
788 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
789 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
790 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
791 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
792 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
793 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
794 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
795 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
796 (ppc_hwcap): Add comment.
797 (ppc_hwcap2): New global.
798 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
799 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
800 (ppc_regsets): Add entries for the DSCR and PPR regsets.
801 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
802 when needed. Set sizes for the the DSCR and PPR regsets.
803 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
804 (initialize_low_arch): Call
805 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
806 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
807 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
808 PPC_TDESC_ISA205_PPR_DSCR_VSX.
809 (initialize_low_tracepoint): Call
810 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
811 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
812
813 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
814
815 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
816
817 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
818 Simon Marchi <simark@simark.ca>
819
820 * acinclude.m4: Include "../selftest.m4".
821 * configure: Regenerate.
822 * configure.ac: Use "GDB_AC_SELFTEST".
823 * configure.srv: Use "$enable_unittests" instead of
824 "$development" when checking whether unit tests have been
825 enabled.
826 * server.c (captured_main): Update message informing that
827 selftests have been disabled.
828
829 2018-10-04 Tom Tromey <tom@tromey.com>
830
831 * configure: Rebuild.
832
833 2018-10-04 Tom Tromey <tom@tromey.com>
834
835 * server.c (handle_status): Rename inner "thread".
836 (process_serial_event): Declare "res" in 'm' case.
837 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
838 (iterate_over_lwps): Rename inner "thread".
839 (linux_qxfer_libraries_svr4): Rename inner "len".
840 * gdbthread.h (find_thread_in_random): Rename inner "thread".
841
842 2018-10-01 Gary Benson <gbenson@redhat.com>
843
844 * gdb_proc_service.h: Moved common code to
845 common/gdb_proc_service.h.
846
847 2018-10-01 Gary Benson <gbenson@redhat.com>
848
849 * gdb_proc_service.h: Synchronize comments and whitespace with
850 GDB's version of this file.
851
852 2018-09-25 Tom Tromey <tom@tromey.com>
853
854 * configure: Rebuild.
855 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
856
857 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
858
859 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
860 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
861 ($(IPA_LIB)): Sort IPA_OBJS.
862
863 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
864
865 * Makefile.in: Remove references to $(ADD_DEPS).
866
867 2018-09-16 Tom Tromey <tom@tromey.com>
868
869 * remote-utils.c (remote_open): Use GNU style for metasyntactic
870 variables.
871 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
872 variables.
873
874 2018-09-05 Tom Tromey <tom@tromey.com>
875
876 * configure: Rebuild.
877
878 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
879
880 PR build/23399
881 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
882
883 2018-08-27 Tom Tromey <tom@tromey.com>
884
885 PR build/23087:
886 * configure: Rebuild.
887
888 2018-08-27 Tom Tromey <tom@tromey.com>
889
890 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
891 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
892 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
893 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
894 (s390x_emit_stack_adjust): Add casts to unsigned char.
895
896 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
897
898 PR gdb/23374
899 PR gdb/23375
900 * server.h (struct client_state) <disable_randomization>:
901 Initialize to 1.
902
903 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
904
905 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
906 variable.
907 (mips_supply_ptrace_register): Likewise.
908
909 2018-07-22 Tom Tromey <tom@tromey.com>
910
911 * configure: Rebuild.
912
913 2018-07-22 Tom Tromey <tom@tromey.com>
914
915 * win32-low.c (win32_create_inferior): Remove unused variables.
916 * gdbreplay.c (remote_open): Remove unused variable.
917 * remote-utils.c (remote_prepare): Remove unused variable.
918 * x86-tdesc.h (X86_TDESC_H): Define.
919 (amd64_expedite_regs): Define conditionally.
920 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
921 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
922 * remote-utils.c (readchar): Remove unused variable.
923
924 2018-07-13 Pedro Alves <palves@redhat.com>
925
926 * linux-low.c (linux_kill): Change parameter to process_info
927 pointer instead of pid. Adjust.
928 * lynx-low.c (lynx_kill): Likewise.
929 * nto-low.c (nto_kill): Likewise.
930 * spu-low.c (spu_kill): Likewise.
931 * win32-low.c (win32_kill): Likewise.
932 * server.c (handle_v_kill, kill_inferior_callback)
933 (detach_or_kill_for_exit): Adjust.
934 * target.c (kill_inferior): Change parameter to process_info
935 pointer instead of pid. Adjust.
936 * target.h (struct target_ops) <kill>: Change parameter to
937 process_info pointer instead of pid. Adjust all implementations
938 and callers.
939 (kill_inferior): Likewise.
940
941 2018-07-13 Pedro Alves <palves@redhat.com>
942
943 * linux-low.c (linux_detach, linux_join): Change parameter to
944 process_info pointer instead of pid. Adjust.
945 * lynx-low.c (lynx_detach, lynx_join): Likewise.
946 * nto-low.c (nto_detach): Likewise.
947 * spu-low.c (spu_detach, spu_join): Likewise.
948 * win32-low.c (win32_detach, win32_join): Likewise.
949 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
950 * target.h (struct target_ops) <detach, join>: Change parameter to
951 process_info pointer instead of pid. Adjust all implementations
952 and callers.
953 (detach_inferior, join_inferior): Rename 'pid' parameter to
954 'proc'.
955
956 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
957 Jan Kratochvil <jan.kratochvil@redhat.com>
958 Paul Fertser <fercerpav@gmail.com>
959 Tsutomu Seki <sekiriki@gmail.com>
960
961 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
962 (OBS): Add 'common/netstuff.o'.
963 (GDBREPLAY_OBS): Likewise.
964 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
965 (remote_open): Implement support for IPv6
966 connections.
967 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
968 and 'wspiapi.h'.
969 (handle_accept_event): Accept connections from IPv6 sources.
970 (remote_prepare): Handle IPv6-style hostnames; implement
971 support for IPv6 connections.
972 (remote_open): Implement support for printing connections from
973 IPv6 sources.
974
975 2018-07-11 Pedro Alves <palves@redhat.com>
976
977 PR gdb/23377
978 * mem-break.c (any_persistent_commands): Add process_info
979 parameter and use it instead of relying on the current process.
980 Change return type to bool.
981 * mem-break.h (any_persistent_commands): Add process_info
982 parameter and change return type to bool.
983 * server.c (handle_detach): Remove require_running_or_return call.
984 Look up the process_info for the process we're about to detach.
985 If not found, return back error to GDB. Adjust
986 any_persistent_commands call to pass down a process pointer.
987
988 2018-07-11 Pedro Alves <palves@redhat.com>
989
990 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
991 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
992 instead of collect_register_by_name.
993 * regcache.c (regcache_raw_get_unsigned_by_name): New.
994 * regcache.h (regcache_raw_get_unsigned_by_name): New.
995
996 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
997 Pedro Alves <palves@redhat.com>
998
999 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1000
1001 2018-07-03 Tom Tromey <tom@tromey.com>
1002
1003 * linux-low.c: Update.
1004 * lynx-low.c: Update.
1005 * mem-break.c: Update.
1006 * nto-low.c: Update.
1007 * remote-utils.c: Update.
1008 * server.c: Update.
1009 * spu-low.c: Update.
1010 * target.c: Update.
1011 * win32-low.c: Update.
1012
1013 2018-07-03 Tom Tromey <tom@tromey.com>
1014
1015 * server.c: Update.
1016
1017 2018-07-03 Tom Tromey <tom@tromey.com>
1018
1019 * linux-low.c: Update.
1020
1021 2018-07-03 Tom Tromey <tom@tromey.com>
1022
1023 * target.c: Update.
1024
1025 2018-07-03 Tom Tromey <tom@tromey.com>
1026
1027 * linux-low.c: Update.
1028 * linux-mips-low.c: Update.
1029 * lynx-low.c: Update.
1030 * nto-low.c: Update.
1031 * remote-utils.c: Update.
1032 * server.c: Update.
1033 * spu-low.c: Update.
1034 * target.c: Update.
1035 * thread-db.c: Update.
1036
1037 2018-07-03 Tom Tromey <tom@tromey.com>
1038
1039 * linux-low.c: Update.
1040 * linux-mips-low.c: Update.
1041 * lynx-low.c: Update.
1042 * mem-break.c: Update.
1043 * nto-low.c: Update.
1044 * remote-utils.c: Update.
1045 * server.c: Update.
1046 * spu-low.c: Update.
1047 * target.c: Update.
1048 * tracepoint.c: Update.
1049
1050 2018-07-03 Tom Tromey <tom@tromey.com>
1051
1052 * linux-low.c: Update.
1053 * linux-ppc-low.c: Update.
1054 * linux-x86-low.c: Update.
1055 * proc-service.c: Update.
1056 * server.c: Update.
1057 * spu-low.c: Update.
1058 * thread-db.c: Update.
1059 * win32-low.c: Update.
1060
1061 2018-07-03 Tom Tromey <tom@tromey.com>
1062
1063 * linux-low.c: Update.
1064 * lynx-low.c: Update.
1065 * nto-low.c: Update.
1066 * remote-utils.c: Update.
1067 * spu-low.c: Update.
1068 * thread-db.c: Update.
1069 * win32-low.c: Update.
1070
1071 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1072
1073 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1074 parameter in call to 'amd64_create_target_description'.
1075
1076 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1077
1078 * x86-tdesc.h: Remove executable permission flag.
1079
1080 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1081
1082 * configure.ac: Remove AC_PREREQ, add missing quoting.
1083 * configure: Re-generate.
1084 * config.in: Re-generate.
1085 * aclocal.m4: Re-generate.
1086
1087 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1088
1089 * tracepoint.h (current_traceframe): Remove declaration.
1090
1091 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1092
1093 * linux-aarch64-low.c (is_sve_tdesc): New function.
1094 (aarch64_sve_regs_copy_to_regcache): Likewise.
1095 (aarch64_sve_regs_copy_from_regcache): Likewise.
1096 (aarch64_regs_info): Add SVE checks.
1097 (initialize_low_arch): Initialize SVE.
1098
1099 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1100
1101 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1102
1103 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1104
1105 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1106 (initialize_low_tracepoint): Likewise
1107 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1108 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1109 param.
1110 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1111 checks.
1112 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1113
1114 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1115
1116 * server.h (PBUFSIZ): Increase size
1117
1118 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1119
1120 * regcache.c (regcache::raw_compare): New function.
1121 * regcache.h (regcache::raw_compare): New declaration.
1122
1123 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1124
1125 * regcache.c (new_register_cache): Use new.
1126 (free_register_cache): Use delete.
1127 (register_data): Use const.
1128 (supply_register): Move body inside regcache.
1129 (regcache::raw_supply): New override function.
1130 (collect_register): Move body inside regcache.
1131 (regcache::raw_collect): New override function.
1132 (regcache::get_register_status): New override function.
1133 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1134
1135 2018-06-09 Tom Tromey <tom@tromey.com>
1136
1137 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1138 declare queue.
1139 (event_queue): Use std::queue.
1140 (gdb_event_xfree): Remove.
1141 (initialize_event_loop, process_event, wait_for_event): Update.
1142
1143 2018-06-08 Stan Cox <scox@redhat.com>
1144
1145 * win32-low.c (win32_create_inferior): last_ptid and last_status
1146 moved to client_state.
1147
1148 2018-06-08 Pedro Alves <palves@redhat.com>
1149
1150 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1151 common/common-exceptions.o, common/common-utils.o,
1152 common/errors.o, common/print-utils.o and utils.o.
1153 * gdbreplay.c: Include "common-defs.h" instead of the two
1154 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1155 string.h or alloca.h.
1156 (perror_with_name): Delete.
1157 (remote_open): Use xstrdup instead of strdup.
1158 (main): Rename to ...
1159 (captured_main): ... this.
1160 (main): New.
1161
1162 2018-06-08 Tom Tromey <tom@tromey.com>
1163
1164 * linux-low.c (linux_low_read_btrace): Update.
1165
1166 2018-06-04 Stan Cox <scox@redhat.com>
1167
1168 * server.h (struct client_state): New.
1169 * server.c (cont_thread, general_thread, multi_process)
1170 (report_fork_events, report_vfork_events, report_exec_events)
1171 (report_thread_events, swbreak_feature, hwbreak_feature)
1172 (vCont_supported, disable_randomization, pass_signals)
1173 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1174 Moved to client_state.
1175 * remote-utils.c (remote_debug, noack_mode)
1176 (transport_is_reliable): Moved to client_state.
1177 * tracepoint.c (current_traceframe): Moved to client_state.
1178
1179 Update all callers.
1180 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1181 linux-low.c, remote-utils.h, target.c: Use client_state.
1182
1183 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1184
1185 * configure.srv: Add new c/h file.
1186
1187 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1188
1189 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1190 null VQ.
1191
1192 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1193
1194 * gdb.arch/mips-fpregset-core.exp: New test.
1195 * gdb.arch/mips-fpregset-core.c: New test source.
1196
1197 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1198
1199 PR server/23198
1200 * hostio.c (require_int): Do not report overflow for integers
1201 between 0xfffffff and 0x7fffffff.
1202
1203 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1204
1205 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1206 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1207 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1208 functions.
1209 (the_low_target): Wire them.
1210
1211 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1212
1213 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1214 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1215 mode. Call collect_register_by_name with vscr using
1216 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1217 (ppc_store_vrregset): Add and set vscr_offset variable as in
1218 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1219 vscr_offset.
1220
1221 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1222
1223 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1224 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1225 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1226
1227 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1228
1229 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1230 (ppc_store_vsxregset): Likewise.
1231 (ppc_fill_vrregset): Likewise.
1232 (ppc_store_vrregset): Likewise.
1233 (ppc_fill_evrregset): Likewise.
1234 (ppc_store_evrregset): Likewise.
1235 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1236 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1237 needed.
1238
1239 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1240
1241 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1242 wordsize of the inferior. Call ppc_linux_target_wordsize.
1243
1244 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1245
1246 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1247 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1248 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1249 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1250 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1251 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1252 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1253 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1254 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1255 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1256 (tdesc_powerpc_e500l): Remove.
1257 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1258 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1259 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1260 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1261 linux-ppc-tdesc.h.
1262 (ppc_arch_setup): Remove target description matching code. Fill a
1263 ppc_linux_features struct and call ppc_linux_match_description
1264 with it.
1265
1266 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1267
1268 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1269 width of the requested register exceeds the width of the
1270 `ptrace' data type.
1271 (mips_cannot_store_register): Likewise.
1272
1273 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1274
1275 * linux-mips-low.c (mips_fetch_register): New function. Update
1276 preceding comment.
1277 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1278 (the_low_target): Wire `mips_fetch_register'.
1279
1280 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1281
1282 * lynx-i386-low.c (LYNXOS_178): New macro.
1283 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1284 the layout on LynxOS-178.
1285 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1286 handle floating point registers that are not supported by
1287 LynxOS-178.
1288
1289 2018-05-10 Tom Tromey <tom@tromey.com>
1290
1291 * configure: Rebuild.
1292
1293 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1294
1295 PR server/23158:
1296 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1297 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1298 Use it to set the expedite_regs field in the given tdesc.
1299 * x86-tdesc.h: New file.
1300 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1301 Adjust following the addition of the new expedite_regs parameter
1302 to init_target_desc.
1303 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1304 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1305 (i386_linux_read_description, amd64_linux_read_description):
1306 Adjust following the addition of the new expedite_regs parameter
1307 to init_target_desc.
1308 * lynx-i386-low.c: #include "x86-tdesc.h".
1309 (lynx_i386_arch_setup): Adjust following the addition of the new
1310 expedite_regs parameter to init_target_desc.
1311 * nto-x86-low.c: #include "x86-tdesc.h".
1312 (nto_x86_arch_setup): Adjust following the addition of the new
1313 expedite_regs parameter to init_target_desc.
1314 * win32-i386-low.c: #include "x86-tdesc.h".
1315 (i386_arch_setup): Adjust following the addition of the new
1316 expedite_regs parameter to init_target_desc.
1317
1318 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1319
1320 PR server/23158:
1321 * win32-low.c (win32_create_inferior): Add call to my_wait
1322 setting last_status global.
1323
1324 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1325
1326 PR server/23158:
1327 * win32-low.c (create_process): Only call gdb_tilde_expand if
1328 inferior_cwd is not NULL.
1329
1330 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1331
1332 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1333 registers to the cache if their values have changed.
1334 (i387_xsave_to_cache): Provide default values for x87 control
1335 registers when these features are available, but disabled.
1336 * regcache.c (supply_register_by_name_zeroed): New function.
1337 * regcache.h (supply_register_by_name_zeroed): Declare new
1338 function.
1339
1340 2018-05-07 Tom Tromey <tom@tromey.com>
1341
1342 * configure: Rebuild.
1343
1344 2018-05-04 Tom Tromey <tom@tromey.com>
1345
1346 * configure: Rebuild.
1347
1348 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1349 Pedro Alves <palves@redhat.com>
1350
1351 * linux-aarch64-low.c (aarch64_stopped_data_address):
1352 Likewise.
1353
1354 2018-04-27 Tom Tromey <tom@tromey.com>
1355
1356 * configure: Rebuild.
1357
1358 2018-04-23 Tom Tromey <tom@tromey.com>
1359
1360 * configure: Rebuild.
1361
1362 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * Makefile.in (depcomp): Add "..".
1365 (all_deps_files): New and use it.
1366
1367 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1368
1369 * configure.srv (aarch64*-*-linux*): Don't include xml.
1370 (i[34567]86-*-cygwin*): Likewise.
1371 (i[34567]86-*-linux*): Likewise.
1372 (i[34567]86-*-lynxos*): Likewise.
1373 (i[34567]86-*-mingw32ce*): Likewise.
1374 (i[34567]86-*-mingw*): Likewise.
1375 (i[34567]86-*-nto*): Likewise.
1376 (tic6x-*-uclinux): Likewise.
1377 (x86_64-*-linux*): Likewise.
1378 (x86_64-*-mingw*): Likewise.
1379 (x86_64-*-cygwin*): Likewise.
1380
1381 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1382
1383 * tdesc.c: Remove xml parameter.
1384
1385 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1386
1387 * server.c (get_features_xml): Remove cast.
1388 * tdesc.c (void target_desc::accept): Fill in function.
1389 (tdesc_get_features_xml): Remove old xml creation.
1390 (print_xml_feature::visit_pre): Add xml vistor.
1391 * tdesc.h (struct target_desc): Make xmltarget mutable.
1392 (tdesc_get_features_xml): Remove declaration.
1393
1394 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1395
1396 * tdesc.c (tdesc_architecture_name): Add new function.
1397 (tdesc_osabi_name): Likewise.
1398 (tdesc_get_features_xml): Use new functions.
1399
1400 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1401
1402 * tdesc.c (tdesc_create_flags): Remove.
1403 (tdesc_add_flag): Likewise.
1404 (tdesc_named_type): Likewise.
1405 (tdesc_create_union): Likewise.
1406 (tdesc_create_struct): Likewise.
1407 (tdesc_create_vector): Likewise.
1408 (tdesc_add_bitfield): Likewise.
1409 (tdesc_add_field): Likewise.
1410 (tdesc_set_struct_size): Likewise.
1411
1412 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1413
1414 * tdesc.c (~target_desc): Remove implictly deleted items.
1415 (init_target_desc): Iterate all features.
1416 (tdesc_get_features_xml): Use vector.
1417 (tdesc_create_feature): Create feature.
1418 * tdesc.h (tdesc_feature) Remove
1419 (target_desc): Add features.
1420
1421 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1422
1423 * Makefile.in: Add common/tdesc.c
1424 * tdesc.c (init_target_desc): init all reg_defs from register
1425 vector.
1426 (tdesc_create_reg): Create tdesc_reg.
1427 * tdesc.h (tdesc_feature): Add register vector.
1428
1429 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1430
1431 * tdesc.h (struct target_desc) <features>: Change type to
1432 std::vector<std::string>.
1433 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1434 changes.
1435 (tdesc_get_features_xml): Likewise.
1436 (tdesc_create_feature): Likewise.
1437
1438 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1439
1440 * regcache.c (find_register_by_number): Return a ref.
1441 (find_regno): Use references.
1442 (register_size): Likewise.
1443 (register_data): Likewise.
1444 * tdesc.c (target_desc::~target_desc): Remove free calls.
1445 (target_desc::operator==): Use std::vector compare.
1446 (init_target_desc): Use reference.
1447 (tdesc_create_reg): Use reg constructors.
1448 * tdesc.h (struct target_desc): Replace pointer with object.
1449
1450 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1451
1452 * regcache.c (find_register_by_number): Make static.
1453 (find_regno): Use find_register_by_number
1454 * regcache.h (struct reg): Remove declaration.
1455
1456 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1457
1458 * tdesc.c (target_desc::~target_desc): Move to here.
1459 (target_desc::operator==): Likewise.
1460 * tdesc.h (target_desc::~target_desc): Move from here.
1461 (target_desc::operator==): Likewise.
1462
1463 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1464
1465 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1466
1467 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1468
1469 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1470 S390_TDESC_GS.
1471 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1472 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1473 and init_registers_s390_gs_linux64.
1474
1475 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1476
1477 * linux-s390-low.c (s390_fill_gs): Remove function.
1478 (s390_fill_gsbc): Remove function.
1479 (s390_regsets): Set fill functions for the guarded storage regsets
1480 to NULL.
1481
1482 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1483
1484 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1485 the word size. Add comment.
1486 (s390_get_wordsize): New function.
1487 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1488 pswm with it. Instead, use s390_get_wordsize to determine the
1489 word size first and derive the correct tdesc from that directly.
1490
1491 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1492
1493 * Makefile.in: Include silent-rules.mk.
1494 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1495 (COMPILE): Add ECHO_CXX.
1496 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1497 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1498 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1499 (version-generated.c): Add ECHO_GEN.
1500 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1501 (IPAGENT_COMPILE): Add ECHO_CXX.
1502 (%-generated.c): Add ECHO_REGDAT.
1503
1504 2018-03-14 Tom Tromey <tom@tromey.com>
1505
1506 PR cli/14977:
1507 * ax.c (ax_printf): Special case for NULL.
1508
1509 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * linux-low.c (linux_qxfer_libraries_svr4): Use
1512 xml_escape_text_append.
1513
1514 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1515
1516 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1517
1518 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1519
1520 * server.c (handle_general_set): Remove unnecessary xstrdup.
1521
1522 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1523
1524 * server.c (parse_debug_format_options): Adjust to
1525 delim_string_to_char_ptr_vec changes.
1526 * thread-db.c (thread_db_load_search): Adjust to
1527 dirnames_to_char_ptr_vec changes.
1528
1529 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1530
1531 * target.h (target_enable_btrace, target_disable_btrace)
1532 (target_read_btrace, target_read_btrace_conf): Turn macro into
1533 inline function. Throw error if target method is not defined.
1534 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1535 check for btrace target method. Be prepared to handle exceptions
1536 from btrace target methods.
1537
1538 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1539
1540 * server.c (captured_main): Change order of error message printed
1541 when the current working directory cannot be found.
1542
1543 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1544
1545 * server.c: Include "filenames.h" and "pathstuff.h".
1546 (program_name): Delete variable.
1547 (program_path): New anonymous class.
1548 (get_exec_wrapper): Use "program_path" instead of
1549 "program_name".
1550 (handle_v_run): Likewise.
1551 (captured_main): Likewise.
1552 (process_serial_event): Likewise.
1553
1554 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1555
1556 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1557 (OBJS): Add "pathstuff.o".
1558 * server.c (current_directory): New global variable.
1559 (captured_main): Initialize "current_directory".
1560
1561 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1562
1563 * tdesc.c: Use common/tdesc.h.
1564 * tdesc.h: Likewise.
1565
1566 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1567 Simon Marchi <simon.marchi@ericsson.com>
1568
1569 * Makefile.in: Switch order of make rules.
1570
1571 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1572
1573 * Makefile.in: Add common directory in build.
1574 * configure.ac: Add common reference.
1575 * configure: Regenerate.
1576
1577 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1578
1579 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1580 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1581 * spu-low.c (spu_target_ops): Likewise.
1582 * win32-low.c (win32_target_ops): Likewise.
1583 * server.c (supported_btrace_packets): Report packets unconditionally.
1584 * target.h (target_ops) <supports_btrace>: Remove.
1585 (target_supports_btrace): Remove.
1586
1587 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1588
1589 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1590 (handle_btrace_disable): Change return type to void. Use exceptions
1591 to report errors.
1592 (handle_btrace_general_set): Catch exception and copy message to
1593 return message.
1594
1595 2018-02-08 Tom Tromey <tom@tromey.com>
1596
1597 * linux-low.c (install_software_single_step_breakpoints): Use
1598 make_scoped_restore.
1599 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1600 (do_restore_current_thread_cleanup): Remove.
1601 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1602 declare.
1603
1604 2018-02-08 Tom Tromey <tom@tromey.com>
1605
1606 * mem-break.c (set_raw_breakpoint_at): Use
1607 gdb::unique_xmalloc_ptr.
1608
1609 2018-01-30 Pedro Alves <palves@redhat.com>
1610
1611 PR gdb/13211
1612 * target.c (target_terminal::terminal_state): Rename to ...
1613 (target_terminal::m_terminal_state): ... this.
1614
1615 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1616
1617 * linux-low.c (handle_extended_wait): Surround call to
1618 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1619
1620 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1623 linux_ptrace_attach_fail_reason_string now returning an
1624 std::string.
1625 (linux_attach): Likewise.
1626 * thread-db.c (attach_thread): Likewise.
1627
1628 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1629
1630 PR gdb/21559
1631 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1632 checking for fs_base/gs_base fields in struct user_regs_struct.
1633 * configure: Regenerate.
1634
1635 2018-01-16 Yao Qi <yao.qi@linaro.org>
1636
1637 PR gdb/18749
1638 * linux-low.c (fetch_register): Call supply_register instead of
1639 error.
1640
1641 2018-01-08 Yao Qi <yao.qi@linaro.org>
1642 Simon Marchi <simon.marchi@ericsson.com>
1643
1644 * Makefile.in (OBS): Remove selftest.o.
1645 * configure.ac: Set srv_selftest_objs if $development is true.
1646 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1647 * configure: Re-generated.
1648 * server.c (captured_main): Wrap variable selftest_filter with
1649 GDB_SELF_TEST.
1650
1651 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1652
1653 * server.c (parse_debug_format_options): Return std::string.
1654 (handle_monitor_command, captured_main): Adjust.
1655
1656 2018-01-05 Pedro Alves <palves@redhat.com>
1657
1658 PR gdb/18653
1659 * server.c (captured_main): Pass quiet=false to
1660 save_original_signals_state.
1661
1662 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1663
1664 * gdbreplay.c (gdbreplay_version): Update copyright year in
1665 version message.
1666 * server.c (gdbserver_version): Likewise.
1667
1668 2017-12-08 Tom Tromey <tom@tromey.com>
1669
1670 * ax.c (ax_printf): Update.
1671
1672 2017-12-07 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1675 aarch64_linux_read_description.
1676 * linux-amd64-ipa.c (idx2mask): New array.
1677 (get_ipa_tdesc): Move idx2mask out.
1678 (initialize_low_tracepoint): Initialize target descriptions.
1679 * linux-i386-ipa.c (idx2mask): New array.
1680 (get_ipa_tdesc): Move idx2mask out.
1681 (initialize_low_tracepoint): Initialize target descriptions.
1682
1683 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * tdesc.c (struct tdesc_type): Change return type.
1686 (tdesc_add_flag): Change parameter type.
1687 (tdesc_add_bitfield): Likewise.
1688 (tdesc_add_field): Likewise.
1689 (tdesc_set_struct_size): Likewise.
1690
1691 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1692
1693 * regcache.c (registers_to_string): Remove unused variable.
1694
1695 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * inferiors.c (for_each_inferior_with_data): Remove.
1698 * inferiors.h (for_each_inferior_with_data): Remove.
1699 * server.c (handle_qxfer_threads_worker): Change parameter type.
1700 (handle_qxfer_threads_proper): Use for_each_thread.
1701
1702 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1703
1704 * inferiors.c (for_each_inferior): Remove.
1705 (clear_inferiors): Use for_each_thread.
1706 * inferiors.h (for_each_inferior): Remove.
1707 * linux-low.c (linux_wait_for_event_filtered): Use
1708 for_each_thread.
1709 (linux_stabilize_threads): Likewise.
1710 * regcache.c (regcache_release): Likewise.
1711 * server.c (gdb_wants_all_threads_stopped): Likewise.
1712 (clear_pending_status_callback): Remove.
1713 (handle_status): Use for_each_thread.
1714 (captured_main): Likewise.
1715 * win32-low.c (child_init_thread_list): Likewise.
1716 (win32_clear_inferiors): Likewise.
1717 (fake_breakpoint_event): Likewise.
1718
1719 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1720
1721 * inferiors.h (find_inferior): Remove.
1722 * inferiors.c (find_inferior): Remove.
1723
1724 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1725
1726 * linux-low.c (resume_status_pending_p): Update comment.
1727 (need_step_over_p): Update comment.
1728
1729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1730
1731 * linux-low.c (proceed_one_lwp): Return void, change parameter
1732 type.
1733 (unsuspend_and_proceed_one_lwp): Likewise.
1734 (proceed_all_lwps): Use for_each_thread.
1735 (unstop_all_lwps): Likewise.
1736
1737 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1738
1739 * linux-low.c (linux_resume_one_thread): Return void, take
1740 parameter directly.
1741 (linux_resume): Use for_each_thread.
1742
1743 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * linux-low.c (send_sigstop_callback): Return void, change
1746 parameter type. Rename to...
1747 (send_sigstop): ... this.
1748 (suspend_and_send_sigstop_callback): Return void, change parameter
1749 type. Rename to...
1750 (suspend_and_send_sigstop): ... this.
1751 (stop_all_lwps): Use for_each_thread.
1752
1753 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1754
1755 * linux-low.c (lwp_running): Return bool, remove unused
1756 argument.
1757 (linux_stabilize_threads): Use find_thread.
1758
1759 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1760
1761 * linux-low.c (select_singlestep_lwp_callback): Remove.
1762 (count_events_callback): Remove.
1763 (select_event_lwp_callback): Remove.
1764 (select_event_lwp): Use find_thread/for_each_thread.
1765
1766 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1767
1768 * linux-low.c (not_stopped_callback): Return bool, take filter
1769 argument directly.
1770 (linux_wait_for_event_filtered): Use find_thread.
1771 (linux_wait_1): Likewise.
1772
1773 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1774
1775 * linux-low.c (same_lwp): Remove.
1776 (find_lwp_pid): Use find_thread.
1777
1778 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * linux-low.c (delete_lwp_callback): Remove.
1781 (linux_mourn): Use for_each_thread.
1782
1783 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1784
1785 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1786 args parameter, don't check for pid.
1787 (linux_detach): Use for_each_thread.
1788
1789 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1790
1791 * linux-low.c (struct counter): Remove.
1792 (second_thread_of_pid_p): Remove.
1793 (last_thread_of_process_p): Use find_thread.
1794
1795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * inferiors.c (find_inferior_in_random): Remove.
1798 * inferiors.h (find_inferior_in_random): Remove.
1799 * linux-low.c (status_pending_p_callback): Return bool, accept
1800 parameter ptid directly.
1801 (linux_wait_for_event_filtered): Use find_thread_in_random.
1802 (linux_wait_1): Likewise.
1803
1804 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1805
1806 * inferiors.c (find_inferior_id): Remove.
1807 (find_thread_ptid): Move implemention from find_inferior_id to
1808 here.
1809 * inferiors.h (find_inferior_id): Remove.
1810 * server.c (handle_status): Use find_thread_ptid.
1811 (process_serial_event): Likewise.
1812 * thread-db.c (find_one_thread): Likewise.
1813 (thread_db_thread_handle): Likewise.
1814 * win32-low.c (thread_rec): Likewise.
1815 (child_delete_thread): Likewise.
1816 (win32_thread_alive): Likewise.
1817 (get_child_debug_event): Likewise.
1818
1819 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1820
1821 * linux-mips-low.c (update_watch_registers_callback): Return
1822 void, remove pid_p parameter, don't check for pid.
1823 (mips_insert_point, mips_remove_point): Use for_each_thread.
1824
1825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1826
1827 * lynx.low (lynx_delete_thread_callback): Remove.
1828 (lynx_mourn): Use for_each_thread.
1829
1830 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1831
1832 * regcache.c (regcache_invalidate_one): Remove.
1833 (regcache_invalidate_pid): use for_each_thread.
1834
1835 2017-11-26 Tom Tromey <tom@tromey.com>
1836
1837 * linux-low.c (linux_create_inferior): Update.
1838
1839 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1840
1841 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1842
1843 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1844
1845 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1846 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1847 * linux-aarch64-tdesc-selftest.c: New file.
1848 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1849
1850 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1851
1852 * configure.srv: Add new file.
1853 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1854 * linux-aarch64-tdesc-selftest.c: New file.
1855 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1856
1857 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1858
1859 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1860 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1861 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1862
1863 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1864
1865 * configure.srv: Add new files.
1866 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1867 aarch64_linux_read_description.
1868 * linux-aarch64-low.c (aarch64_linux_read_description):
1869 Merge with aarch64_arch_setup.
1870 (aarch64_arch_setup): Call aarch64_linux_read_description.
1871 * linux-aarch64-tdesc.c: New file.
1872 * linux-aarch64-tdesc.h: New file.
1873
1874 2017-11-24 Yao Qi <yao.qi@linaro.org>
1875
1876 * configure.srv: Set $srv_regobj for tic6x-linux.
1877 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1878 (tic6x_read_description): Move some code to tic6x_arch_setup.
1879 (tic6x_tdesc_test): New function.
1880 (initialize_low_arch): Call selftests::register_test.
1881
1882 2017-11-22 Yao Qi <yao.qi@linaro.org>
1883
1884 * remote-utils.c (prepare_resume_reply): Use memcpy.
1885
1886 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1887
1888 * linux-low.c (kill_one_lwp_callback): Return void, take
1889 argument directly, don't filter on pid.
1890 (linux_kill): Use for_each_thread.
1891
1892 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1893
1894 * linux-low.c (need_step_over_p): Return bool, remove dummy
1895 argument.
1896 (linux_resume, proceed_all_lwps): Use find_thread.
1897
1898 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * linux-low.c (resume_status_pending_p): Return bool, remove
1901 flag_p argument.
1902 (linux_resume): Use find_thread.
1903
1904 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * linux-low.c (struct thread_resume_array): Remove.
1907 (linux_set_resume_request): Return void, take arguments
1908 directly.
1909 (linux_resume): Use for_each_thread.
1910
1911 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1914 return bool, remove data argument.
1915 (linux_stabilize_threads): Use find_thread.
1916
1917 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * linux-low.c (unsuspend_one_lwp): Remove.
1920 (unsuspend_all_lwps): Use for_each_thread, inline code from
1921 unsuspend_one_lwp.
1922
1923 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1926 * linux-low.c (struct iterate_over_lwps_args): Remove.
1927 (iterate_over_lwps_filter): Remove.
1928 (iterate_over_lwps): Use find_thread.
1929
1930 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1931
1932 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1933 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1934 code from reset_lwp_ptrace_options_callback.
1935
1936 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1937
1938 * linux-arm-low.c (struct update_registers_data): Remove.
1939 (update_registers_callback): Return void, take arguments
1940 directly, don't check thread's pid.
1941 (arm_insert_point, arm_remove_point): Use for_each_thread.
1942
1943 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * win32-low.c (continue_one_thread): Return void, take argument
1946 directly.
1947 (child_continue): Use for_each_thread.
1948
1949 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * win32-i386-low.c (update_debug_registers_callback): Rename
1952 to ...
1953 (update_debug_registers): ... this, return void, remove pid_p arg.
1954 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1955
1956 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1957
1958 * inferiors.h (struct process_info): Add constructor, initialize
1959 fields..
1960 <syscalls_to_catch>: Change type to std::vector<int>.
1961 * inferiors.c (add_process): Allocate process_info with new.
1962 (remove_process): Free process_info with delete.
1963 * linux-low.c (handle_extended_wait): Adjust.
1964 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1965 * server.c (handle_general_set): Adjust.
1966
1967 2017-11-16 Pedro Alves <palves@redhat.com>
1968
1969 * remote-utils.c (remote_close): Block SIGIO signals instead of
1970 uninstalling the SIGIO handler.
1971
1972 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1973
1974 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1975
1976 2017-11-16 Yao Qi <yao.qi@linaro.org>
1977
1978 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1979 (tic6x_store_gregset): Likewise.
1980 (tic6x_usrregs_info): Move it up.
1981
1982 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1983
1984 * Makefile.in: Update arch rules.
1985 * configure.srv: Explicitly mark arch/ files.
1986
1987 2017-11-13 Andreas Schwab <schwab@suse.de>
1988
1989 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1990 function.
1991 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1992
1993 2017-11-06 Pedro Alves <palves@redhat.com>
1994
1995 * config.in, configure: Regenerate.
1996
1997 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1998
1999 * target.c (struct thread_search): Remove.
2000 (thread_search_callback): Remove.
2001 (prepare_to_access_memory): Use for_each_thread instead of
2002 find_inferior. Inline code from thread_search_callback.
2003
2004 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * server.c (struct visit_actioned_threads_data): Remove.
2007 (visit_actioned_threads): Change prototype to take arguments
2008 directly.
2009 (resume): Use find_thread instead of find_inferior.
2010
2011 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * server.c (queue_stop_reply_callback): Change prototype, return
2014 void.
2015 (find_status_pending_thread_callback): Remove.
2016 (handle_status): Replace find_inferior with find_thread and
2017 for_each_thread.
2018
2019 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2020
2021 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2022 with REGNO.
2023 (aarch64_store_gregset): Likewise.
2024 (aarch64_fill_fpregset): Likewise.
2025 (aarch64_store_fpregset): Likewise.
2026
2027 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2028
2029 * gdbthread.h (find_thread, for_each_thread): New functions.
2030 * inferiors.c (thread_of_pid): Remove.
2031 (find_any_thread_of_pid): Use find_thread.
2032 * linux-low.c (num_lwps): Use for_each_thread.
2033
2034 2017-10-17 Yao Qi <yao.qi@linaro.org>
2035
2036 * Makefile.in: Remove one rule.
2037 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2038
2039 2017-10-17 Yao Qi <yao.qi@linaro.org>
2040
2041 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2042 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2043
2044 2017-10-17 Yao Qi <yao.qi@linaro.org>
2045
2046 * configure.srv: Rename arm.o with arch/arm.o.
2047
2048 2017-10-17 Yao Qi <yao.qi@linaro.org>
2049
2050 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2051 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2052 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2053 (arch-i386.o, arch-amd64.o): Remove rules.
2054 (arch/%.o): New rule.
2055 Update POSTCOMPILE and COMPILE.pre.
2056 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2057 * configure: Re-generated.
2058 * configure.srv: Replace arch-i386.o with arch/i386.o.
2059 Replace arch-amd64.o with arch/amd64.o.
2060
2061 2017-10-16 Yao Qi <yao.qi@linaro.org>
2062
2063 * configure: Regenerated.
2064
2065 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2066
2067 * inferiors.h: (struct inferior_list): Remove.
2068 (struct inferior_list_entry); Remove.
2069 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2070 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2071 get_first_inferior): Remove.
2072 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2073 find_inferior_id, find_inferior_in_random): Change signature.
2074 * inferiors.c (all_threads): Change type to
2075 std::list<thread_info *>.
2076 (get_thread): Remove macro.
2077 (find_inferior, find_inferior_id): Change signature, implement
2078 using find_thread.
2079 (find_inferior_in_random): Change signature, implement using
2080 find_thread_in_random.
2081 (for_each_inferior, for_each_inferior_with_data): Change
2082 signature, implement using for_each_thread.
2083 (add_inferior_to_list, remove_inferior): Remove.
2084 (add_thread, get_first_thread, thread_of_pid,
2085 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2086 (get_first_inferior, one_inferior_p, clear_inferior_list):
2087 Remove.
2088 (clear_inferiors, get_thread_process): Update.
2089 * gdbthread.h: Include <list>.
2090 (struct thread_info) <entry>: Remove field.
2091 <id>: New field.
2092 (all_threads): Change type to std::list<thread_info *>.
2093 (get_first_inferior): Add doc.
2094 (find_thread, for_each_thread, find_thread_in_random): New
2095 functions.
2096 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2097 * linux-arm-low.c (update_registers_callback): Update.
2098 * linux-low.c (second_thread_of_pid_p): Update.
2099 (kill_one_lwp_callback, linux_detach_lwp_callback,
2100 delete_lwp_callback, status_pending_p_callback, same_lwp,
2101 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2102 iterate_over_lwps, not_stopped_callback,
2103 resume_stopped_resumed_lwps, count_events_callback,
2104 select_singlestep_lwp_callback, select_event_lwp_callback,
2105 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2106 suspend_and_send_sigstop_callback, wait_for_sigstop,
2107 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2108 lwp_running, linux_set_resume_request, resume_status_pending_p,
2109 need_step_over_p, start_step_over, linux_resume_one_thread,
2110 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2111 reset_lwp_ptrace_options_callback): Update.
2112 * linux-mips-low.c (update_watch_registers_callback): Update.
2113 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2114 Update.
2115 (free_register_cache_thread_one): Remove.
2116 (regcache_release): Update.
2117 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2118 handle_qxfer_threads_worker): Update.
2119 (handle_query): Update, use list iterator.
2120 (visit_actioned_threads, handle_pending_status,
2121 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2122 clear_pending_status_callback, set_pending_status_callback,
2123 find_status_pending_thread_callback, handle_status,
2124 process_serial_event): Update.
2125 * target.c (thread_search_callback): Update.
2126 * thread-db.c (thread_db_get_tls_address): Update.
2127 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2128 Update.
2129 * win32-i386-low.c (update_debug_registers_callback): Update.
2130 * win32-low.c (delete_thread_info, child_delete_thread,
2131 continue_one_thread, suspend_one_thread,
2132 get_child_debug_event): Adjust.
2133
2134 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2135
2136 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2137 * inferiors.h: Include <list>.
2138 (struct process_info) <entry>: Remove field.
2139 <pid>: New field.
2140 (pid_of): Change macro to function.
2141 (ptid_of, lwpid_of): Remove macro.
2142 (all_processes): Change type to std::list<process_info *>.
2143 (ALL_PROCESSES): Remove macro.
2144 (for_each_process, find_process): New function.
2145 * inferiors.c (all_processes): Change type to
2146 std::list<process_info *>.
2147 (find_thread_process): Adjust.
2148 (add_process): Likewise.
2149 (remove_process): Likewise.
2150 (find_process_pid): Likewise.
2151 (get_first_process): Likewise.
2152 (started_inferior_callback): Remove.
2153 (have_started_inferiors_p): Adjust.
2154 (attached_inferior_callback): Remove.
2155 (have_attached_inferiors_p): Adjust.
2156 * linux-low.c (check_zombie_leaders): Likewise.
2157 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2158 (x86_linux_update_xmltarget): Adjust.
2159 * server.c (handle_query): Likewise.
2160 (gdb_reattached_process): Remove.
2161 (handle_status): Adjust.
2162 (kill_inferior_callback): Likewise.
2163 (detach_or_kill_inferior): Remove.
2164 (print_started_pid): Likewise.
2165 (print_attached_pid): Likewise.
2166 (detach_or_kill_for_exit): Update.
2167 (process_serial_event): Likewise.
2168 * linux-arm-low.c (arm_new_fork): Likewise.
2169
2170 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2171
2172 * dll.h: Include <list>.
2173 (struct dll_info): Add constructor.
2174 <entry>: Remove field.
2175 (all_dlls): Change type to std::list<dll_info>.
2176 * dll.c: Include <algorithm>.
2177 (get_dll): Remove macro.
2178 (all_dlls): Change type to std::list<dll_info *>.
2179 (free_one_dll): Remove.
2180 (match_dll): Likewise.
2181 (loaded_dll): Adjust.
2182 (unloaded_dll): Adjust to all_dlls type change, use
2183 std::find_if. Inline code from match_dll.
2184 (clear_dlls): Adjust to all_dlls type change.
2185 * server.c (emit_dll_description): Remove.
2186 (handle_qxfer_libraries): Adjust to all_dlls type change,
2187 integrate emit_dll_description's functionality.
2188
2189 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2190
2191 * linux-low.h (struct linux_target_ops) <delete_process>: New
2192 field.
2193 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2194 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2195 (struct linux_target_ops): Add delete_process callback.
2196 * linux-arm-low.c (arm_delete_process): New.
2197 (struct linux_target_ops): Add delete_process callback.
2198 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2199 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2200 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2201 * linux-mips-low.c (mips_linux_delete_process): New.
2202 (struct linux_target_ops): Add delete_process callback.
2203 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2204 * linux-s390-low.c (struct linux_target_ops): Likewise.
2205 * linux-sh-low.c (struct linux_target_ops): Likewise.
2206 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2207 * linux-tile-low.c (struct linux_target_ops): Likewise.
2208 * linux-x86-low.c (x86_linux_delete_process): New.
2209 (struct linux_target_ops): Add delete_process callback.
2210 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2211
2212 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2213
2214 * linux-aarch64-low.c (the_low_target): Add thread delete
2215 callback.
2216 * linux-arm-low.c (arm_delete_thread): New function.
2217 (the_low_target): Add thread delete callback.
2218 * linux-bfin-low.c (the_low_target): Likewise.
2219 * linux-crisv32-low.c (the_low_target): Likewise.
2220 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2221 set.
2222 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2223 field.
2224 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2225 * linux-mips-low.c (mips_linux_delete_thread): New function.
2226 (the_low_target): Add thread delete callback.
2227 * linux-ppc-low.c (the_low_target): Likewise.
2228 * linux-s390-low.c (the_low_target): Likewise.
2229 * linux-sh-low.c (the_low_target): Likewise.
2230 * linux-tic6x-low.c (the_low_target): Likewise.
2231 * linux-tile-low.c (the_low_target): Likewise.
2232 * linux-x86-low.c (the_low_target): Likewise.
2233 * linux-xtensa-low.c (the_low_target): Likewise.
2234
2235 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2236
2237 * win32-low.c: Include "common-inferior.h".
2238
2239 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2240
2241 * inferiors.c (set_inferior_cwd): New function.
2242 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2243 (handle_query): Inform that QSetWorkingDir is supported.
2244 * win32-low.c (create_process): Pass the inferior's cwd to
2245 CreateProcess.
2246
2247 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2248
2249 * inferiors.c (current_inferior_cwd): New global variable.
2250 (get_inferior_cwd): New function.
2251 * inferiors.h (struct process_info) <cwd>: New field.
2252
2253 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2254
2255 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2256 (OBS): Add gdb_tilde_expand.o.
2257
2258 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2259
2260 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2261 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2262
2263 2017-09-29 Pedro Alves <palves@redhat.com>
2264
2265 * ax.c (gdb_parse_agent_expr): Constify.
2266 * ax.h (gdb_parse_agent_expr): Constify.
2267 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2268 Constify.
2269 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2270 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2271 * remote-utils.h (read_ptid): Constify.
2272 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2273 (process_point_options, process_serial_event): Constify.
2274 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2275 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2276 (cmd_qtbuffer): Constify.
2277
2278 2017-09-29 Pedro Alves <palves@redhat.com>
2279
2280 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2281 fails.
2282
2283 2017-09-29 Pedro Alves <palves@redhat.com>
2284
2285 * linux-low.c (handle_extended_wait): Pass parent thread instead
2286 of process to thread_db_notice_clone.
2287 * linux-low.h (thread_db_notice_clone): Replace parent process
2288 parameter with parent thread parameter.
2289 * thread-db.c (find_one_thread): Add comment.
2290 (thread_db_notice_clone): Replace parent process parameter with
2291 parent thread parameter. Temporarily switch to the parent thread.
2292
2293 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2294
2295 * gdbthread.h: Include "common-gdbthread.h".
2296 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2297 "if" when validating the ptid.
2298 * remote-utils.c: Include "gdbthread.h".
2299 (prepare_resume_reply): Use "switch_to_thread".
2300 * target.c (done_accessing_memory): Likewise.
2301
2302 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2303
2304 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2305 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2306 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2307 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2308 s390x-gs-linux64-ipa.o to ipa_obj.
2309 * linux-s390-low.c (HWCAP_S390_GS): New define.
2310 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2311 New functions.
2312 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2313 (s390_arch_setup): Check for guarded-storage support and choose
2314 appropriate tdesc.
2315 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2316 init_registers_s390x_gs_linux64.
2317 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2318 enum value.
2319 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2320 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2321
2322 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2323
2324 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2325
2326 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2327
2328 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2329 (thread_db_thread_handle): Declare.
2330 * linux-low.c (linux_target_ops): Initialize thread_handle.
2331 * server.c (handle_qxfer_threads_worker): Add support for
2332 "handle" attribute.
2333 * target.h (struct target_ops): Add new function pointer,
2334 thread_handle.
2335 (target_thread_handle): Define.
2336 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2337 field in lwp.
2338 (thread_db_thread_handle): New function.
2339
2340 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2341
2342 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2343 * linux-low.h (thread_db_notice_clone): Declare.
2344 * thread-db.c (thread_db_notice_clone): New function.
2345
2346 2017-09-21 Pedro Alves <palves@redhat.com>
2347
2348 * server.c (gdb_read_memory, handle_status, process_serial_event)
2349 (handle_serial_event, handle_target_event): Adjust to
2350 set_desired_thread prototype change.
2351 * target.c (set_desired_thread): Remove 'use_general' parameter
2352 and adjust.
2353 * target.h (set_desired_thread): Remove 'use_general' parameter.
2354
2355 2017-09-20 Tom Tromey <tom@tromey.com>
2356
2357 * target.c (target_terminal::terminal_state): Define.
2358 (target_terminal::init): Rename from target_terminal_init.
2359 (target_terminal::inferior): Rename from
2360 target_terminal_inferior.
2361 (target_terminal::ours): Rename from target_terminal_ours.
2362 (target_terminal::ours_for_output, target_terminal::info): New.
2363
2364 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * server.c (accumulate_file_name_length): Remove.
2367 (emit_dll_description): Adjust to std::string change.
2368 (handle_qxfer_libraries): Use std::string to hold document.
2369
2370 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2371
2372 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2373 return type of xml_escape_text.
2374 * server.c (emit_dll_description): Likewise.
2375
2376 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2377
2378 * server.c (captured_main): Accept argument for --selftest.
2379 Update run_tests call.
2380 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2381 when registering selftests.
2382
2383 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2384
2385 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2386 instead of "VEC" for "target_desc.reg_defs".
2387 (regcache_cpy): Likewise.
2388 (registers_to_string): Likewise.
2389 (registers_from_string): Likewise.
2390 (find_regno): Likewise.
2391 (supply_regblock): Likewise.
2392 (regcache_raw_read_unsigned): Likewise.
2393 * tdesc.c (init_target_desc): Likewise.
2394 (tdesc_create_reg): Likewise.
2395 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2396 (struct target_desc) <reg_defs>: Convert to "std::vector".
2397 (target_desc): Do not initialize "reg_defs".
2398 (~target_desc): Update code to use "std::vector" instead of "VEC"
2399 for "target_desc.reg_defs".
2400 (operator==): Likewise.
2401
2402 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2403
2404 * inferiors.h (thread_to_gdb_id): Remove.
2405 * inferiors.c (thread_to_gdb_id): Remove.
2406 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2407 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2408 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2409 Likewise.
2410 * nto-low.c (nto_fetch_registers, nto_store_registers,
2411 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2412
2413 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * inferiors.h (gdb_id_to_thread_id): Remove.
2416 * inferiors.c (gdb_id_to_thread_id): Remove.
2417 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2418 removal. Move pid declaration closer to where it's used.
2419
2420 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2421
2422 * server.c (handle_detach): New function.
2423 (process_serial_event): Move code out, call handle_detach.
2424
2425 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2426
2427 * server.c (require_running): Rename to ...
2428 (require_running_or_return): ... this ...
2429 (require_running_or_break): ... and this.
2430 (handle_query, process_serial_event): Adjust.
2431
2432 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2433
2434 * linux-low.c (linux_set_resume_request): Remove unused
2435 variables.
2436
2437 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2438
2439 * server.c (first_thread_of): Remove.
2440 (process_serial_event): Replace usage of first_thread_of with
2441 find_any_thread_of_pid.
2442 * tracepoint.c (same_process_p): Remove.
2443 (gdb_agent_about_to_close): Replace usage of same_process_p with
2444 find_any_thread_of_pid.
2445 * linux-x86-low.c (same_process_callback): Remove.
2446 (x86_arch_setup_process_callback): Replace usage of
2447 same_process_callback with find_any_thread_of_pid.
2448 * thread-db.c (any_thread_of): Remove.
2449 (switch_to_process): Replace usage of any_thread_of with
2450 find_any_thread_of_pid.
2451 * inferiors.c (thread_pid_matches_callback): Remove.
2452 (find_thread_process): Adjust to use find_any_thread_of_pid.
2453
2454 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2455
2456 * regcache.c (get_thread_regcache): Guard calls to "memset"
2457 with "!VEC_empty".
2458
2459 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2460
2461 * linux-low.c (handle_extended_wait): Use
2462 "allocate_target_description" instead of "XNEW".
2463 * linux-x86-low.c (initialize_low_arch): Likewise.
2464
2465 2017-09-05 Yao Qi <yao.qi@linaro.org>
2466
2467 * configure.srv (srv_i386_regobj): Remove.
2468 (srv_amd64_regobj): Remove.
2469 (srv_regobj): Set it to "" for x86 non-linux targets.
2470 * linux-x86-tdesc.c (i386_linux_read_description):
2471 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2472 (init_registers_i386): Remove the declaration.
2473 (tdesc_i386): Remove the declaration.
2474 (lynx_i386_arch_setup): Call i386_create_target_description.
2475 * nto-x86-low.c: Likewise.
2476 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2477 [!__x86_64__]: include arch/i386.h.
2478 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2479
2480 2017-09-05 Yao Qi <yao.qi@linaro.org>
2481
2482 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2483 i386/amd64-XXX-linux from it.
2484
2485 2017-09-05 Yao Qi <yao.qi@linaro.org>
2486
2487 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2488 false.
2489 (ipa_amd64_linux_regobj): Remove.
2490 (ipa_x32_linux_regobj): Remove.
2491
2492 2017-09-05 Yao Qi <yao.qi@linaro.org>
2493
2494 * Makefile.in (arch-amd64.o): New rule.
2495 * configure.srv: Append arch-amd64.o.
2496 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2497 (get_ipa_tdesc): Call amd64_linux_read_description.
2498 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2499 and init_registers_amd64_XXX.
2500 * linux-x86-low.c (x86_linux_read_description): Call
2501 amd64_linux_read_description.
2502 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2503 (initialize_low_arch): Don't call init_registers_x32_XXX and
2504 init_registers_amd64_XXX.
2505 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2506 and tdesc_amd64_XXX.
2507 [__x86_64__] (amd64_tdesc_test): New function.
2508 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2509 and init_registers_amd64_XXX.
2510 * linux-x86-tdesc.c: Include arch/amd64.h.
2511 (xcr0_to_tdesc_idx): New function.
2512 (i386_linux_read_description): New function.
2513 (amd64_get_ipa_tdesc_idx): New function.
2514 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2515 (amd64_get_ipa_tdesc): Declare.
2516
2517 2017-09-05 Yao Qi <yao.qi@linaro.org>
2518
2519 * configure.srv (srv_i386_linux_xmlfiles): Remove
2520 i386/i386-XXX-linux.xml from it.
2521
2522 2017-09-05 Yao Qi <yao.qi@linaro.org>
2523
2524 * configure.srv: Set srv_i386_linux_regobj empty if $development
2525 is false.
2526 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2527 initialize_low_tdesc.
2528 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2529 with #if initialize_low_tdesc.
2530 * linux-x86-tdesc-selftest.c: New file.
2531 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2532
2533 2017-09-05 Yao Qi <yao.qi@linaro.org>
2534
2535 * Makefile.in (arch-i386.o): New rule.
2536 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2537 (x86_64-*-linux*): Likewise.
2538 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2539 include arch/i386.h.
2540 (i386_linux_read_description): Remove code and call
2541 i386_create_target_description.
2542 * tdesc.c (allocate_target_description): New function.
2543 * tdesc.h (set_tdesc_architecture): Remove declaration.
2544 (set_tdesc_osabi): Likewise.
2545
2546 2017-09-05 Yao Qi <yao.qi@linaro.org>
2547
2548 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2549 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2550 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2551 .xmltarget.
2552 * server.c (get_features_xml): Call tdesc_get_features_xml.
2553 * tdesc.c (set_tdesc_architecture): New function.
2554 (set_tdesc_osabi): New function.
2555 (tdesc_get_features_xml): New function.
2556 (tdesc_create_feature): Add an argument.
2557 * tdesc.h (struct target_desc) <features>: New field.
2558 <arch, osabi>: New field.
2559 (~target_desc): xfree features, arch, and osabi.
2560 (target_desc::oerator==): Don't compare .xmltarget.
2561 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2562 (set_tdesc_osabi): Likewise.
2563 (tdesc_get_features_xml): Likewise.
2564
2565 2017-09-05 Yao Qi <yao.qi@linaro.org>
2566
2567 * linux-x86-tdesc.c: Include selftest.h.
2568 (i386_tdesc_test): New function.
2569 (initialize_low_tdesc): Call selftests::register_test.
2570 * tdesc.h: Include regdef.h.
2571 (target_desc): Override operator == and !=.
2572
2573 2017-09-05 Yao Qi <yao.qi@linaro.org>
2574
2575 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2576 (ipa_obj): Likewise.
2577 * linux-i386-ipa.c: Include common/x86-xstate.h
2578 (get_ipa_tdesc): Call i386_linux_read_description.
2579 (initialize_low_tracepoint): Don't call init_registers_XXX
2580 functions, call initialize_low_tdesc instead.
2581 * linux-x86-low.c (x86_linux_read_description): Call
2582 i386_linux_read_description.
2583 (initialize_low_arch): Don't call init_registers_i386_XXX
2584 functions, call initialize_low_tdesc.
2585 * linux-x86-tdesc.c: New file.
2586 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2587 (i386_get_ipa_tdesc_idx): Declare.
2588 (i386_get_ipa_tdesc): Declare.
2589 (initialize_low_tdesc): Declare.
2590
2591 2017-09-05 Yao Qi <yao.qi@linaro.org>
2592
2593 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2594 instead of 0.
2595
2596 2017-09-05 Yao Qi <yao.qi@linaro.org>
2597
2598 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2599 * regcache.c (get_thread_regcache): Use VEC_length.
2600 (init_register_cache): Likewise.
2601 (regcache_cpy): Likewise.
2602 (registers_to_string): Iterate reg_defs via VEC_iterate.
2603 (find_regno): Likewise.
2604 (find_register_by_number): Use VEC_index.
2605 (register_size): Call find_register_by_number.
2606 (register_data): Call find_register_by_number.
2607 (supply_regblock): Use VEC_length.
2608 (regcache_raw_read_unsigned): Likewise.
2609 * tdesc.c (init_target_desc): Iterate reg_defs via
2610 VEC_iterate.
2611 (default_description): Update initializer.
2612 (copy_target_description): Don't update field num_registers.
2613 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2614 <num_registers>: Remove.
2615
2616 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * Makefile.in (.SECONDARY): Define target.
2619
2620 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2621
2622 * linux-low.c (linux_wait_1): Adjust.
2623 * server.c (queue_stop_reply_callback): Adjust.
2624
2625 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2626
2627 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2628 QEnvironmentUnset and QEnvironmentReset packets.
2629 (handle_query): Inform remote that QEnvironmentHexEncoded,
2630 QEnvironmentUnset and QEnvironmentReset are supported.
2631
2632 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * inferiors.h (inferior_target_data): Rename to ...
2635 (thread_target_data): ... this.
2636 (inferior_regcache_data): Rename to ...
2637 (thread_regcache_data): ... this.
2638 (set_inferior_regcache_data): Rename to ...
2639 (set_thread_regcache_data): ... this.
2640 * inferiors.c (inferior_target_data): Rename to ...
2641 (thread_target_data): ... this.
2642 (inferior_regcache_data): Rename to ...
2643 (thread_regcache_data): ... this.
2644 (set_inferior_regcache_data): Rename to ...
2645 (set_thread_regcache_data): ... this.
2646 (free_one_thread): Update.
2647 * linux-low.h (get_thread_lwp): Update.
2648 * regcache.c (get_thread_regcache): Update.
2649 (regcache_invalidate_thread): Update.
2650 (free_register_cache_thread): Update.
2651 * win32-i386-low.c (update_debug_registers_callback): Update.
2652 (win32_get_current_dr): Update.
2653 * win32-low.c (thread_rec): Update.
2654 (delete_thread_info): Update.
2655 (continue_one_thread): Update.
2656 (suspend_one_thread): Update.
2657
2658 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * inferiors.c (set_inferior_target_data): Remove.
2661 * inferiors.h (set_inferior_target_data): Remove.
2662
2663 2017-08-18 Yao Qi <yao.qi@linaro.org>
2664
2665 * Makefile.in (OBS): Add selftest.o.
2666 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2667 * configure, config.in: Re-generated.
2668 * server.c: Include common/sefltest.h.
2669 (captured_main): Handle option --selftest.
2670
2671 2017-08-09 Yao Qi <yao.qi@linaro.org>
2672
2673 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2674 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2675 i386-avx-mpx.o and i386-mmx.o.
2676 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2677 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2678 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2679 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2680 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2681 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2682 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2683 i386/amd64-avx-mpx.xml.
2684
2685 2017-08-09 Yao Qi <yao.qi@linaro.org>
2686
2687 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2688 and x32-avx-avx512.o.
2689 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2690 i386/x32-avx-avx512.xml.
2691
2692 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2693
2694 * tracepoint.h (enum class fast_tpoint_collect_result): New
2695 enumeration.
2696 (fast_tracepoint_collecting): Change return type to
2697 fast_tpoint_collect_result.
2698 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2699 * linux-low.h: Include tracepoint.h.
2700 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2701 fast_tpoint_collect_result.
2702 * linux-low.c (handle_tracepoints): Adjust.
2703 (linux_fast_tracepoint_collecting): Change return type to
2704 fast_tpoint_collect_result.
2705 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2706 linux_wait_1, stuck_in_jump_pad_callback,
2707 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2708 proceed_one_lwp): Adjust to type change.
2709
2710 2017-07-10 Yao Qi <yao.qi@linaro.org>
2711
2712 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2713
2714 2017-06-29 Yao Qi <yao.qi@linaro.org>
2715
2716 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2717 Remove.
2718 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2719
2720 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2721
2722 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2723
2724 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2725
2726 * linux-low.c (linux_create_inferior): Adjust code to access the
2727 environment information via 'gdb_environ' class.
2728 * lynx-low.c (lynx_create_inferior): Likewise.
2729 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2730 (get_environ): Return a pointer to 'our_environ'.
2731 (captured_main): Initialize 'our_environ'.
2732 * server.h (get_environ): Adjust prototype.
2733 * spu-low.c (spu_create_inferior): Adjust code to access the
2734 environment information via 'gdb_environ' class.
2735
2736 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2737
2738 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2739 usage of "register" keyword.
2740
2741 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2742
2743 * configure: Re-generate.
2744
2745 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2746
2747 * configure: Re-generate.
2748
2749 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2750
2751 * Makefile.in (COMPILE.pre): Add "-x c++".
2752
2753 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2754
2755 * fork-child.c: Conditionally include <signal.h>.
2756
2757 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2758
2759 * server.c (handle_general_set): Handle new packet
2760 "QStartupWithShell".
2761 (handle_query): Add "QStartupWithShell" to the list of supported
2762 packets.
2763 (gdbserver_usage): Add help text explaining the
2764 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2765 options.
2766 (captured_main): Recognize and act upon the presence of the new
2767 CLI options.
2768
2769 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2770 Pedro Alves <palves@redhat.com>
2771
2772 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2773 * configure: Regenerate.
2774 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2775 "fork-inferior.o".
2776 (i[34567]86-*-lynxos*): Likewise.
2777 (spu*-*-*): Likewise.
2778 * fork-child.c: New file.
2779 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2780 and "environ.h".
2781 (linux_ptrace_fun): New function.
2782 (linux_create_inferior): Adjust function prototype to reflect
2783 change on "target.h". Adjust function code to use
2784 "fork_inferior".
2785 (linux_request_interrupt): Delete "signal_pid".
2786 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2787 (lynx_ptrace_fun): New function.
2788 (lynx_create_inferior): Adjust function prototype to reflect
2789 change on "target.h". Adjust function code to use
2790 "fork_inferior".
2791 * nto-low.c (nto_create_inferior): Adjust function prototype and
2792 code to reflect change on "target.h". Update comments.
2793 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2794 "common-terminal.h" and "environ.h".
2795 (terminal_fd): Moved to fork-child.c.
2796 (old_foreground_pgrp): Likewise.
2797 (restore_old_foreground_pgrp): Likewise.
2798 (last_status): Make it global.
2799 (last_ptid): Likewise.
2800 (our_environ): New variable.
2801 (startup_with_shell): Likewise.
2802 (program_name): Likewise.
2803 (program_argv): Rename to...
2804 (program_args): ...this.
2805 (wrapper_argv): New variable.
2806 (start_inferior): Delete function.
2807 (get_exec_wrapper): New function.
2808 (get_exec_file): Likewise.
2809 (get_environ): Likewise.
2810 (prefork_hook): Likewise.
2811 (post_fork_inferior): Likewise.
2812 (postfork_hook): Likewise.
2813 (postfork_child_hook): Likewise.
2814 (handle_v_run): Update code to deal with arguments coming from the
2815 remote host. Update calls from "start_inferior" to
2816 "create_inferior".
2817 (captured_main): Likewise. Initialize environment variable. Call
2818 "have_job_control".
2819 * server.h (post_fork_inferior): New prototype.
2820 (get_environ): Likewise.
2821 (last_status): Declare.
2822 (last_ptid): Likewise.
2823 (signal_pid): Likewise.
2824 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2825 (spu_ptrace_fun): New function.
2826 (spu_create_inferior): Adjust function prototype to reflect change
2827 on "target.h". Adjust function code to use "fork_inferior".
2828 * target.c (target_terminal_init): New function.
2829 (target_terminal_inferior): Likewise.
2830 (target_terminal_ours): Likewise.
2831 * target.h: Include <vector>.
2832 (struct target_ops) <create_inferior>: Update prototype.
2833 (create_inferior): Update macro.
2834 * utils.c (gdb_flush_out_err): New function.
2835 * win32-low.c (win32_create_inferior): Adjust function prototype
2836 and code to reflect change on "target.h".
2837
2838 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2839
2840 * inferiors.c (switch_to_thread): New function.
2841
2842 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2843
2844 * Makefile.in (SFILE): Add "common/job-control.c".
2845 (OBS): Add "job-control.o".
2846
2847 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2848
2849 * Makefile: Remove "@host_makefile_frag@".
2850
2851 2017-05-05 Pedro Alves <palves@redhat.com>
2852
2853 * configure: Regenerate.
2854
2855 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2856
2857 * configure: Regenerate.
2858
2859 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2860
2861 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2862 software_single_step change of return type to
2863 std::vector<CORE_ADDR>.
2864 * linux-low.c (install_software_single_step_breakpoints):
2865 Likewise.
2866 * linux-low.h (install_software_single_step_breakpoints):
2867 Likewise.
2868
2869 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2870
2871 * remote-utils.c: Include "gdb_termios.h" instead of
2872 "terminal.h".
2873 * terminal.h: Delete file.
2874
2875 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2876
2877 * server.c: Include <vector>.
2878 <program_argv, wrapper_argv>: Convert to std::vector.
2879 (start_inferior): Rewrite function to use C++.
2880 (handle_v_run): Likewise. Update code that calculates the argv
2881 based on the vRun packet; use C++.
2882 (captured_main): Likewise.
2883
2884 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2885
2886 * server.c (handle_v_cont): Initialize thread_resume::thread
2887 with null_ptid.
2888
2889 2017-04-05 Pedro Alves <palves@redhat.com>
2890
2891 * configure: Regenerate.
2892
2893 2017-04-05 Pedro Alves <palves@redhat.com>
2894
2895 * gdbreplay.c (sync_error): Constify.
2896 * linux-x86-low.c (push_opcode): Constify.
2897
2898 2017-04-05 Pedro Alves <palves@redhat.com>
2899
2900 * win32-low.c (get_child_debug_event)
2901 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2902 Report TARGET_WAITKIND_SPURIOUS instead.
2903
2904 2017-04-05 Pedro Alves <palves@redhat.com>
2905
2906 * remote-utils.c (remote_prepare, remote_open): Constify.
2907 * remote-utils.h (remote_prepare, remote_open): Constify.
2908 * server.c (captured_main): Constify 'port' handling.
2909
2910 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2911
2912 * Makefile.in (clean): Clear .deps.
2913
2914 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2915
2916 * .gitignore: Remove generated files, replace with wildcard.
2917 * (clean): Replace removal of generated files with wildcard.
2918 (version.c): Replace with...
2919 (version-generated.c): ...this.
2920 (xml-builtin.c): Replace with...
2921 (xml-builtin-generated.c): ...this.
2922 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2923 (%.c: *regformats*): Replace with...
2924 (%-generated.c: *regformats*): ...this.
2925
2926 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2927
2928 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2929 (xtensa_fill_gregset): Call collect_register_by_name for
2930 threadptr register.
2931 (xtensa_store_gregset): Call supply_register_by_name for
2932 threadptr register.
2933
2934 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2935
2936 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2937 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2938 (xtensa_store_gregset): Call supply_register for all registers in
2939 a0_regnum..a0_regnum + C0_NREGS range.
2940
2941 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2944 (ax-ipa.o: ax.c): Remove.
2945 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2946 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2947 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2948 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2949 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2950
2951 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2952
2953 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2954 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2955 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2956 (errors-ipa.o: ../common/errors.c): Remove.
2957 (format-ipa.o: ../common/format.c): Remove.
2958 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2959
2960 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2961
2962 * Makefile.in (%-ipa.o: %.c): New rule.
2963 (tracepoint-ipa.o: tracepoint.c): Remove.
2964 (utils-ipa.o: utils.c): Remove.
2965 (remote-utils-ipa.o: remote-utils.c): Remove.
2966 (regcache-ipa.o: regcache.c): Remove.
2967 (i386-linux-ipa.o: i386-linux.c): Remove.
2968 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2969 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2970 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2971 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2972 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2973 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2974 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2975 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2976 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2977 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2978 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2979 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2980 (aarch64-ipa.o: aarch64.c): Remove.
2981 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2982 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2983 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2984 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2985 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2986 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2987 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2988 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2989 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2990 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2991 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2992 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2993 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2994 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2995 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2996 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2997 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2998 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2999 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3000 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3001 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3002 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3003 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3004 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3005 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3006 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3007 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3008 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3009 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3010 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3011 (tdesc-ipa.o: tdesc.c): Remove.
3012 (x32-linux-ipa.o: x32-linux.c): Remove.
3013 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3014 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3015
3016 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3017
3018 * Makefile.in (%.o: ../arch/%.c): New rule.
3019 (arm.o: ../arch/arm.c): Remove.
3020 (arm-linux.o: ../arch/arm-linux.c): Remove.
3021 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3022 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3023
3024 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3025
3026 * Makefile.in (%.o: ../nat/%.c): New rule.
3027 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3028 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3029 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3030 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3031 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3032 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3033 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3034 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3035 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3036 (linux-personality.o: ../nat/linux-personality.c): Remove.
3037 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3038 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3039 (x86-linux.o: ../nat/x86-linux.c): Remove.
3040 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3041 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3042
3043 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3044
3045 * Makefile.in (%.o: ../common/%.c): New rule.
3046 (signals.o: ../common/signals.c): Remove.
3047 (print-utils.o: ../common/print-utils.c): Remove.
3048 (rsp-low.o: ../common/rsp-low.c): Remove.
3049 (common-utils.o: ../common/common-utils.c): Remove.
3050 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3051 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3052 (vec.o: ../common/vec.c): Remove.
3053 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3054 (xml-utils.o: ../common/xml-utils.c): Remove.
3055 (ptid.o: ../common/ptid.c): Remove.
3056 (buffer.o: ../common/buffer.c): Remove.
3057 (format.o: ../common/format.c): Remove.
3058 (filestuff.o: ../common/filestuff.c): Remove.
3059 (agent.o: ../common/agent.c): Remove.
3060 (errors.o: ../common/errors.c): Remove.
3061 (environ.o: ../common/environ.c): Remove.
3062 (common-debug.o: ../common/common-debug.c): Remove.
3063 (cleanups.o: ../common/cleanups.c): Remove.
3064 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3065 (fileio.o: ../common/fileio.c): Remove.
3066 (common-regcache.o: ../common/common-regcache.c): Remove.
3067 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3068 (new-op.o: ../common/new-op.c): Remove.
3069 (btrace-common.o: ../common/btrace-common.c): Remove.
3070
3071 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3072
3073 * Makefile.in (%.o: ../target/%.c): New rule.
3074 (waitstatus.o: ../target/waitstatus.c): Remove.
3075
3076 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3077
3078 * Makefile.in
3079 (%.c: ../regformats/%.dat,
3080 (%.c: ../regformats/arm/%.dat,
3081 (%.c: ../regformats/i386/%.dat,
3082 (%.c: ../regformats/rs6000/%.dat): New rules.
3083 (aarch64.c): Remove.
3084 (reg-arm.c): Remove.
3085 (arm-with-iwmmxt.c): Remove.
3086 (arm-with-vfpv2.c): Remove.
3087 (arm-with-vfpv3.c): Remove.
3088 (arm-with-neon.c): Remove.
3089 (reg-bfin.c): Remove.
3090 (reg-cris.c): Remove.
3091 (reg-crisv32.c): Remove.
3092 (i386.c): Remove.
3093 (i386-linux.c): Remove.
3094 (i386-avx.c): Remove.
3095 (i386-avx-linux.c): Remove.
3096 (i386-avx-avx512.c): Remove.
3097 (i386-avx-avx512-linux.c): Remove.
3098 (i386-mpx.c): Remove.
3099 (i386-mpx-linux.c): Remove.
3100 (i386-avx-mpx-avx512-pku.c): Remove.
3101 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3102 (i386-avx-mpx.c): Remove.
3103 (i386-avx-mpx-linux.c): Remove.
3104 (i386-mmx.c): Remove.
3105 (i386-mmx-linux.c): Remove.
3106 (reg-ia64.c): Remove.
3107 (reg-m32r.c): Remove.
3108 (reg-m68k.c): Remove.
3109 (reg-cf.c): Remove.
3110 (mips-linux.c): Remove.
3111 (mips-dsp-linux.c): Remove.
3112 (mips64-linux.c): Remove.
3113 (mips64-dsp-linux.c): Remove.
3114 (nios2-linux.c): Remove.
3115 (powerpc-32.c): Remove.
3116 (powerpc-32l.c): Remove.
3117 (powerpc-altivec32l.c): Remove.
3118 (powerpc-cell32l.c): Remove.
3119 (powerpc-vsx32l.c): Remove.
3120 (powerpc-isa205-32l.c): Remove.
3121 (powerpc-isa205-altivec32l.c): Remove.
3122 (powerpc-isa205-vsx32l.c): Remove.
3123 (powerpc-e500l.c): Remove.
3124 (powerpc-64l.c): Remove.
3125 (powerpc-altivec64l.c): Remove.
3126 (powerpc-cell64l.c): Remove.
3127 (powerpc-vsx64l.c): Remove.
3128 (powerpc-isa205-64l.c): Remove.
3129 (powerpc-isa205-altivec64l.c): Remove.
3130 (powerpc-isa205-vsx64l.c): Remove.
3131 (s390-linux32.c): Remove.
3132 (s390-linux32v1.c): Remove.
3133 (s390-linux32v2.c): Remove.
3134 (s390-linux64.c): Remove.
3135 (s390-linux64v1.c): Remove.
3136 (s390-linux64v2.c): Remove.
3137 (s390-te-linux64.c): Remove.
3138 (s390-vx-linux64.c): Remove.
3139 (s390-tevx-linux64.c): Remove.
3140 (s390x-linux64.c): Remove.
3141 (s390x-linux64v1.c): Remove.
3142 (s390x-linux64v2.c): Remove.
3143 (s390x-te-linux64.c): Remove.
3144 (s390x-vx-linux64.c): Remove.
3145 (s390x-tevx-linux64.c): Remove.
3146 (tic6x-c64xp-linux.c): Remove.
3147 (tic6x-c64x-linux.c): Remove.
3148 (tic6x-c62x-linux.c): Remove.
3149 (reg-sh.c): Remove.
3150 (reg-sparc64.c): Remove.
3151 (reg-spu.c): Remove.
3152 (amd64.c): Remove.
3153 (amd64-linux.c): Remove.
3154 (amd64-avx.c): Remove.
3155 (amd64-avx-linux.c): Remove.
3156 (amd64-avx-avx512.c): Remove.
3157 (amd64-avx-avx512-linux.c): Remove.
3158 (amd64-mpx.c): Remove.
3159 (amd64-mpx-linux.c): Remove.
3160 (amd64-avx-mpx-avx512-pku.c): Remove.
3161 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3162 (amd64-avx-mpx.c): Remove.
3163 (amd64-avx-mpx-linux.c): Remove.
3164 (x32.c): Remove.
3165 (x32-linux.c): Remove.
3166 (x32-avx.c): Remove.
3167 (x32-avx-linux.c): Remove.
3168 (x32-avx-avx512.c): Remove.
3169 (x32-avx-avx512-linux.c): Remove.
3170 (reg-xtensa.c): Remove.
3171 (reg-tilegx.c): Remove.
3172 (reg-tilegx32.c): Remove.
3173
3174 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3175
3176 * Makefile.in (SFILES): Add "common/environ.c".
3177 (OBJS): Add "common/environ.h".
3178
3179 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3180
3181 * configure.ac: Check if the fs_base and gs_base members of
3182 `struct user_regs_struct' exist.
3183 * config.in: Regenerated.
3184 * configure: Likewise.
3185
3186 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3187
3188 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3189 target_read_memory.
3190 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3191 (get_next_pcs_syscall_next_pc): Likewise.
3192
3193 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3194
3195 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3196 * nto-x86-low.c: Likewise.
3197
3198 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3199
3200 * Makefile.in: Include disable-implicit-rules.mk.
3201
3202 2016-11-23 Pedro Alves <palves@redhat.com>
3203
3204 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3205 (debug_vprintf): Use std::chrono::steady_clock instead of
3206 gettimeofday. Use '.' instead of ':'.
3207 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3208 (get_timestamp): Use std::chrono::steady_clock instead of
3209 gettimeofday.
3210
3211 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3212
3213 * Makefile.in: Fix whitespace formatting.
3214
3215 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3216
3217 * Makefile.in (SFILES, OBS): Flatten list and order
3218 alphabetically.
3219
3220 2016-11-23 Pedro Alves <palves@redhat.com>
3221
3222 * event-loop.c (handle_file_event): Use warning.
3223 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3224 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3225 Use warning.
3226
3227 2016-11-23 Pedro Alves <palves@redhat.com>
3228
3229 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3230 output.
3231 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3232 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3233 debug_printf and debug_flush for debug output.
3234 * server.c (handle_general_set): Likewise.
3235 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3236 output.
3237
3238 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3239
3240 * Makefile.in (.c.o): Replace rule with ...
3241 (%.o: %.c): ... this one.
3242
3243 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3244
3245 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3246 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3247 make.
3248 * configure.ac: Remove checks for the make program.
3249 * configure: Re-generate.
3250
3251 2016-10-28 Pedro Alves <palves@redhat.com>
3252
3253 * Makefile.in (CXX_DIALECT): Get from configure.
3254 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3255 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3256 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3257 * config.in: Regenerate.
3258 * configure: Regenerate.
3259
3260 2016-10-27 Yao Qi <yao.qi@linaro.org>
3261
3262 * linux-low.c (linux_supports_range_stepping): Return true if
3263 can_software_single_step return true.
3264
3265 2016-10-27 Yao Qi <yao.qi@linaro.org>
3266
3267 * inferiors.c (find_inferior_in_random): New function.
3268 * inferiors.h (find_inferior_in_random): Declare.
3269 * linux-low.c (linux_wait_for_event_filtered): Call
3270 find_inferior_in_random instead of find_inferior.
3271
3272 2016-10-27 Yao Qi <yao.qi@linaro.org>
3273
3274 * linux-low.c (linux_wait_1): If single-step breakpoints are
3275 inserted, remove them.
3276
3277 2016-10-26 Pedro Alves <palves@redhat.com>
3278
3279 * linux-low.c (handle_extended_wait): Link parent/child fork
3280 threads.
3281 (linux_wait_1): Unlink them.
3282 (linux_set_resume_request): Ignore resume requests for
3283 already-resumed and unhandled fork child threads.
3284 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3285 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3286 New functions.
3287 (handle_v_requests) <vCont>: Don't call require_running.
3288 * server.h (in_queued_stop_replies): New declaration.
3289
3290 2016-10-24 Yao Qi <yao.qi@linaro.org>
3291
3292 PR server/20733
3293 * linux-aarch64-low.c (append_insns): Cast the return value to
3294 'uint32_t *'.
3295
3296 2016-10-10 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3299
3300 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3301
3302 * target.c (target_supports_multi_process): New function, moved
3303 from...
3304 * target.h (target_supports_multi_process): ... here. Remove
3305 macro.
3306
3307 2016-10-05 Tom Tromey <tom@tromey.com>
3308
3309 PR remote/20655:
3310 * tracepoint.c (handle_tracepoint_bkpts): Check
3311 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3312
3313 2016-10-05 Yao Qi <yao.qi@linaro.org>
3314
3315 * configure.srv: Update the path of arm-*.xml files.
3316
3317 2016-10-05 Terry Guo <terry.guo@arm.com>
3318 Yao Qi <yao.qi@linaro.org>
3319
3320 * Makefile.in: Adjust the path of rules.
3321 * configure.srv: Update the path of xml files.
3322 * regformats/arm-with-iwmmxt.dat: Regenerated.
3323 * regformats/arm-with-neon.dat: Likewise.
3324 * regformats/arm-with-vfpv2.dat: Likewise.
3325 * regformats/arm-with-vfpv3.dat Likewise.
3326
3327 2016-09-30 Yao Qi <yao.qi@linaro.org>
3328
3329 PR gdbserver/20627
3330 * target.c (target_stop_and_wait): Don't call
3331 target_continue_no_signal, use resume_stop instead.
3332
3333 2016-09-26 Yao Qi <yao.qi@linaro.org>
3334
3335 * linux-low.c (linux_wait_1): Call debug_exit.
3336
3337 2016-09-23 Pedro Alves <palves@redhat.com>
3338
3339 * Makefile.in (SFILES): Add common/new-op.c.
3340 (OBS): Add common/new-op.o.
3341 (new-op.o): New rule.
3342
3343 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3344
3345 * .gitinore: Ignore more files.
3346
3347 2016-09-21 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3350 23.
3351
3352 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3353
3354 * server.c (start_inferior): Call target_mourn_inferior instead of
3355 mourn_inferior; pass ptid_t argument to it.
3356 (resume): Likewise.
3357 (handle_target_event): Likewise.
3358 * target.c (target_mourn_inferior): New function.
3359 * target.h (mourn_inferior): Delete macro.
3360
3361 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3362
3363 * linux-low.c (lwp_is_stepping): New function.
3364
3365 2016-09-06 Carl Love <cel@us.ibm.com>
3366
3367 * server.c (start_inferior): Fixed comment, requested comment change
3368 didn't get updated correctly. Removed reference to ptrace () call as
3369 it is only true on Linux systems.
3370
3371 2016-09-06 Carl Love <cel@us.ibm.com>
3372
3373 * server.c (start_inferior): Do not call
3374 function target_post_create_inferior () if the
3375 inferior process has already exited.
3376
3377 2016-09-05 Pedro Alves <palves@redhat.com>
3378
3379 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3380 (COMPILE.pre, CC_LD): Use CXX directly.
3381 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3382 * acinclude.m4: Don't include build-with-cxx.m4.
3383 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3384 * configure: Regenerate.
3385
3386 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3387
3388 PR gdb/19495
3389 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3390 call writing data to own_buf.
3391
3392 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3393
3394 * target.c (mywait): Call target_wait instead of
3395 the_target->wait.
3396 (target_wait): New function.
3397
3398 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3399
3400 * server.c (start_inferior): New variable 'ptid'. Replace calls
3401 to the_target->resume by target_continue{,_no_signal}, depending
3402 on the case.
3403 * target.c (target_stop_and_wait): Call target_continue_no_signal
3404 instead of the_target->resume.
3405 (target_continue): New function.
3406
3407 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3408
3409 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3410
3411 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3412
3413 PR server/20491
3414 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3415 ps_prochandle.
3416 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3417 * linux-arm-low.c (ps_get_thread_area): Likewise.
3418 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3419 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3420 * linux-mips-low.c (ps_get_thread_area): Likewise.
3421 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3422 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3423 * linux-x86-low.c (ps_get_thread_area): Likewise.
3424 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3425
3426 2016-08-19 Pedro Alves <palves@redhat.com>
3427
3428 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3429
3430 2016-08-19 Pedro Alves <palves@redhat.com>
3431
3432 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3433 comment. Use memcpy instead of casting through unsigned long.
3434
3435 2016-08-19 Pedro Alves <palves@redhat.com>
3436
3437 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3438 allocating around 0x80000000.
3439
3440 2016-08-19 Pedro Alves <palves@redhat.com>
3441
3442 PR gdb/20415
3443 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3444 (x32-avx512-linux-ipa.o): New rules.
3445 * configure.ac (x86_64-*-linux*): New x32 check.
3446 * configure.srv (ipa_x32_linux_regobj): New.
3447 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3448 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3449 descriptions.
3450 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3451 descriptions.
3452 * configure: Regenerate.
3453
3454 2016-08-09 Pedro Alves <palves@redhat.com>
3455
3456 PR gdb/18653
3457 * Makefile.in (OBS): Add signals-state-save-restore.o.
3458 (signals-state-save-restore.o): New rule.
3459 * config.in: Regenerate.
3460 * configure: Regenerate.
3461 * linux-low.c: Include "signals-state-save-restore.h".
3462 (linux_create_inferior): Call
3463 restore_original_signals_state.
3464 * server.c: Include "dispositions-save-restore.h".
3465 (captured_main): Call save_original_signals_state.
3466
3467 2016-08-05 Pedro Alves <palves@redhat.com>
3468
3469 * configure: Regenerate.
3470
3471 2016-08-04 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-low.c (regsets_fetch_inferior_registers): Check
3474 errno is ESRCH or not.
3475
3476 2016-08-02 Yao Qi <yao.qi@linaro.org>
3477
3478 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3479 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3480 (thread_db_load_search): Update.
3481 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3482 td_ta_set_event and td_ta_event_getmsg.
3483
3484 2016-07-26 Pedro Alves <palves@redhat.com>
3485
3486 PR server/20414
3487 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3488 of unsigned long for 64-bit registers and use uint32_t instead of
3489 unsigned int for 32-bit registers.
3490
3491 2016-07-26 Pedro Alves <palves@redhat.com>
3492
3493 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3494 to 'ptrace'.
3495
3496 2016-07-21 Tom Tromey <tom@tromey.com>
3497
3498 * configure: Rebuild.
3499
3500 2016-07-21 Yao Qi <yao.qi@linaro.org>
3501
3502 * mem-break.c (find_gdb_breakpoint): Cast bp to
3503 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3504
3505 2016-07-21 Yao Qi <yao.qi@linaro.org>
3506
3507 * server.c (handle_v_requests): Support s and S actions
3508 if target_supports_software_single_step return true.
3509
3510 2016-07-21 Yao Qi <yao.qi@linaro.org>
3511
3512 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3513 is resume_step, call maybe_hw_step.
3514 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3515 and unstop them.
3516 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3517 breakpoints or not.
3518 (proceed_one_lwp): If resume request is resume_step, install
3519 reinsert breakpoints and call maybe_hw_step.
3520
3521 2016-07-21 Yao Qi <yao.qi@linaro.org>
3522
3523 * linux-low.c (proceed_one_lwp): Declare.
3524 (linux_resume_one_thread): Remove local variable 'step'.
3525 Lift code enqueue signal. Call proceed_one_lwp instead of
3526 linux_resume_one_lwp.
3527
3528 2016-07-21 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-low.c (linux_resume_one_thread): Call
3531 enqueue_pending_signal.
3532
3533 2016-07-21 Yao Qi <yao.qi@linaro.org>
3534
3535 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3536 * inferiors.c (do_restore_current_thread_cleanup): New function.
3537 (make_cleanup_restore_current_thread): Likewise.
3538 * linux-low.c (install_software_single_step_breakpoints): Call
3539 make_cleanup_restore_current_thread. Switch current_thread to
3540 thread.
3541
3542 2016-07-21 Yao Qi <yao.qi@linaro.org>
3543
3544 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3545 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3546 (clone_one_breakpoint): Likewise.
3547 (delete_reinsert_breakpoints): Change parameter to thread.
3548 Callers updated.
3549 (has_reinsert_breakpoints): Likewise.
3550 (uninsert_reinsert_breakpoints): Likewise.
3551 (reinsert_reinsert_breakpoints): Likewise.
3552 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3553 (delete_reinsert_breakpoints): Likewise.
3554 (reinsert_reinsert_breakpoints): Likewise.
3555 (uninsert_reinsert_breakpoints): Likewise.
3556 (has_reinsert_breakpoints): Likewise.
3557
3558 2016-07-21 Yao Qi <yao.qi@linaro.org>
3559
3560 * inferiors.c (get_thread_process): Make parameter const.
3561 * inferiors.h (get_thread_process): Update declaration.
3562 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3563 Add new parameters child_thread and parent_thread. Callers
3564 updated.
3565 * mem-break.h (clone_all_breakpoints): Update declaration.
3566
3567 2016-07-21 Yao Qi <yao.qi@linaro.org>
3568
3569 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3570 <command_list, handler>: Remove.
3571 (struct gdb_breakpoint): New.
3572 (struct other_breakpoint): New.
3573 (struct reinsert_breakpoint): New.
3574 (is_gdb_breakpoint): New function.
3575 (any_persistent_commands): Update command_list if
3576 is_gdb_breakpoint returns true.
3577 (set_breakpoint): Create breakpoints according to their types.
3578 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3579 (set_gdb_breakpoint_1): Likewise.
3580 (set_gdb_breakpoint): Likewise.
3581 (clear_breakpoint_conditions): Change parameter type to
3582 'struct gdb_breakpoint *'.
3583 (clear_breakpoint_commands): Likewise.
3584 (clear_breakpoint_conditions_and_commands): Likewise.
3585 (add_condition_to_breakpoint): Likewise.
3586 (add_breakpoint_condition): Likewise.
3587 (add_commands_to_breakpoint): Likewise.
3588 (check_breakpoints): Check other_breakpoint.
3589 (clone_one_breakpoint): Clone breakpopint according to its type.
3590 * mem-break.h (struct gdb_breakpoint): Declare.
3591 (set_gdb_breakpoint): Update declaration.
3592 (clear_breakpoint_conditions_and_commands): Likewise.
3593 (add_breakpoint_condition): Likewise.
3594 (add_breakpoint_commands): Likewise.
3595 * server.c (process_point_options): Change parameter type to
3596 'struct gdb_breakpoint *'.
3597
3598 2016-07-21 Yao Qi <yao.qi@linaro.org>
3599
3600 * mem-break.c (set_breakpoint_at): Rename it to ...
3601 (set_breakpoint_type_at): ... it.
3602 (set_breakpoint_at): Call set_breakpoint_type_at.
3603 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3604 * mem-break.h (set_breakpoint_at): Update comments.
3605
3606 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3607
3608 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3609 to buf parameter.
3610 (nios2_store_gregset): Likewise.
3611
3612 2016-07-01 Pedro Alves <palves@redhat.com>
3613 Antoine Tremblay <antoine.tremblay@ericsson.com>
3614
3615 * linux-low.c: Change interface to take the target lwp_info
3616 pointer directly and return void. Handle detaching from a zombie
3617 thread.
3618 (linux_detach_lwp_callback): New function.
3619 (linux_detach): Detach from the leader thread after detaching from
3620 the clone threads.
3621
3622 2016-06-28 Yao Qi <yao.qi@linaro.org>
3623
3624 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3625 for variable new_offset.
3626 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3627 (aarch64_ftrace_insn_reloc_cb): Likewise.
3628 (aarch64_ftrace_insn_reloc_tb): Likewise.
3629 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3630 PRIx64 instead of PRIx32.
3631
3632 2016-06-28 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3635 (the_low_target): Install arm_get_syscall_trapinfo.
3636
3637 2016-06-28 Yao Qi <yao.qi@linaro.org>
3638
3639 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3640 function.
3641 (the_low_target): Install aarch64_get_syscall_trapinfo.
3642
3643 2016-06-28 Yao Qi <yao.qi@linaro.org>
3644
3645 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3646 Callers updated.
3647 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3648 Remove parameter sysno.
3649 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3650 sysret.
3651
3652 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3653
3654 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3655 (s390_emit_ne_goto): Likewise.
3656 (s390_emit_lt_goto): Likewise.
3657 (s390_emit_le_goto): Likewise.
3658 (s390_emit_gt_goto): Likewise.
3659 (s390_emit_ge_goto): Likewise.
3660 (s390x_emit_eq_goto): Likewise.
3661 (s390x_emit_ne_goto): Likewise.
3662 (s390x_emit_lt_goto): Likewise.
3663 (s390x_emit_le_goto): Likewise.
3664 (s390x_emit_gt_goto): Likewise.
3665 (s390x_emit_ge_goto): Likewise.
3666 (s390_emit_ops_impl): Mark variable static.
3667 (s390x_emit_ops): Likewise.
3668
3669 2016-06-17 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-low.c (handle_extended_wait): Call
3672 uninsert_reinsert_breakpoints for the parent process. Remove
3673 reinsert breakpoints from the child process. Reinsert them to
3674 the parent process when vfork is done.
3675 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3676 (reinsert_reinsert_breakpoints): New function.
3677 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3678 (reinsert_reinsert_breakpoints): Declare.
3679
3680 2016-06-17 Yao Qi <yao.qi@linaro.org>
3681
3682 * linux-low.c (handle_extended_wait): If the parent is doing
3683 step-over, remove the reinsert breakpoints from the forked child.
3684
3685 2016-06-17 Yao Qi <yao.qi@linaro.org>
3686
3687 * linux-low.c (unsuspend_all_lwps): Declare.
3688 (linux_low_filter_event): If thread exited, call finish_step_over.
3689 If step-over is finished, unsuspend other threads.
3690
3691 2016-06-17 Yao Qi <yao.qi@linaro.org>
3692
3693 * linux-low.c (linux_resume_one_lwp_throw): Assert
3694 has_reinsert_breakpoints returns false.
3695 * mem-break.c (delete_disabled_breakpoints): Assert
3696 bp type isn't reinsert_breakpoint.
3697
3698 2016-06-17 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-low.c (maybe_hw_step): New function.
3701 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3702 (finish_step_over): Switch current_thread to lwp temporarily,
3703 and assert has_reinsert_breakpoints returns true.
3704 (proceed_one_lwp): Call maybe_hw_step.
3705 * mem-break.c (has_reinsert_breakpoints): New function.
3706 * mem-break.h (has_reinsert_breakpoints): Declare.
3707
3708 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3709
3710 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3711
3712 2016-05-17 Yao Qi <yao.qi@linaro.org>
3713
3714 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3715 instead of find_inferior.
3716
3717 2016-05-05 Yao Qi <yao.qi@linaro.org>
3718
3719 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3720 Initialize res to zero.
3721
3722 2016-05-05 Yao Qi <yao.qi@linaro.org>
3723
3724 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3725 to uint32_t.
3726
3727 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3728
3729 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3730 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3731 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3732
3733 2016-04-28 Par Olsson <par.olsson@windriver.com>
3734 Simon Marchi <simon.marchi@ericsson.com>
3735
3736 * tracepoint.c (write_inferior_int8): New function.
3737 (cmd_qtenable_disable): Write enable flag using
3738 write_inferior_int8.
3739
3740 2016-04-25 Yao Qi <yao.qi@linaro.org>
3741
3742 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3743 (need_step_over_p): Return zero if the LWP has pending signals
3744 can be delivered on software single step target.
3745
3746 2016-04-25 Yao Qi <yao.qi@linaro.org>
3747
3748 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3749 return instead of error.
3750
3751 2016-04-22 Yao Qi <yao.qi@linaro.org>
3752
3753 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3754 to 23.
3755
3756 2016-04-22 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3759 signal when stepping over breakpoint with software single
3760 step.
3761
3762 2016-04-21 Pedro Alves <palves@redhat.com>
3763
3764 * linux-s390-low.c (s390_collect_ptrace_register)
3765 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3766 add casts.
3767 (s390_check_regset): Use void * instead of gdb_byte *.
3768
3769 2016-04-20 Pedro Alves <palves@redhat.com>
3770
3771 * configure: Renegerate.
3772
3773 2016-04-20 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3776 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3777 number 16.
3778 (arm_store_gregset): Likewise.
3779
3780 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3781
3782 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3783 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3784 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3785 (amd64-avx-mpx-linux.c): New rules.
3786 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3787 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3788 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3789 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3790 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3791 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3792 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3793 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3794 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3795 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3796 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3797 * linux-x86-low.c (x86_linux_read_description): Add case for
3798 X86_XSTATE_AVX_MPX_MASK.
3799 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3800 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3801 init_registers_i386_avx_mpx_linux.
3802 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3803 (initialize_low_tracepoint): Call
3804 init_registers_i386_avx_mpx_linux.
3805 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3806 (initialize_low_tracepoint): Call
3807 init_registers_amd64_avx_mpx_linux.
3808 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3809 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3810 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3811 declarations.
3812
3813 2016-04-18 Pedro Alves <palves@redhat.com>
3814
3815 * configure: Regenerate.
3816
3817 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3818
3819 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3820 (aarch64_emit_sub): Likewise.
3821
3822 2016-04-12 Pedro Alves <palves@redhat.com>
3823
3824 * utils.c (prepare_to_throw_exception): Delete.
3825
3826 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3827
3828 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3829
3830 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3831
3832 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3833
3834 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3835
3836 * linux-aarch64-ipa.c: Add <elf.h> include.
3837 * linux-ppc-ipa.c: Add <elf.h> include.
3838 * linux-s390-ipa.c: Add <elf.h> include.
3839
3840 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3841
3842 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3843 (get_raw_reg_ptr): Likewise.
3844 (get_trace_state_variable_value_ptr): Likewise.
3845 (set_trace_state_variable_value_ptr): Likewise.
3846 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3847 char *.
3848
3849 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3850 Marcin Kościelnicki <koriakin@0x04.net>
3851
3852 PR/17221
3853 * linux-ppc-low.c (emit_insns): New function.
3854 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3855 (ppc_emit_prologue): New function.
3856 (ppc_emit_epilogue): New function.
3857 (ppc_emit_add): New function.
3858 (ppc_emit_sub): New function.
3859 (ppc_emit_mul): New function.
3860 (ppc_emit_lsh): New function.
3861 (ppc_emit_rsh_signed): New function.
3862 (ppc_emit_rsh_unsigned): New function.
3863 (ppc_emit_ext): New function.
3864 (ppc_emit_zero_ext): New function.
3865 (ppc_emit_log_not): New function.
3866 (ppc_emit_bit_and): New function.
3867 (ppc_emit_bit_or): New function.
3868 (ppc_emit_bit_xor): New function.
3869 (ppc_emit_bit_not): New function.
3870 (ppc_emit_equal): New function.
3871 (ppc_emit_less_signed): New function.
3872 (ppc_emit_less_unsigned): New function.
3873 (ppc_emit_ref): New function.
3874 (ppc_emit_const): New function.
3875 (ppc_emit_reg): New function.
3876 (ppc_emit_pop): New function.
3877 (ppc_emit_stack_flush): New function.
3878 (ppc_emit_swap): New function.
3879 (ppc_emit_stack_adjust): New function.
3880 (ppc_emit_call): New function.
3881 (ppc_emit_int_call_1): New function.
3882 (ppc_emit_void_call_2): New function.
3883 (ppc_emit_if_goto): New function.
3884 (ppc_emit_goto): New function.
3885 (ppc_emit_eq_goto): New function.
3886 (ppc_emit_ne_goto): New function.
3887 (ppc_emit_lt_goto): New function.
3888 (ppc_emit_le_goto): New function.
3889 (ppc_emit_gt_goto): New function.
3890 (ppc_emit_ge_goto): New function.
3891 (ppc_write_goto_address): New function.
3892 (ppc_emit_ops_impl): New static variable.
3893 (ppc64v1_emit_prologue): New function.
3894 (ppc64v2_emit_prologue): New function.
3895 (ppc64_emit_epilogue): New function.
3896 (ppc64_emit_add): New function.
3897 (ppc64_emit_sub): New function.
3898 (ppc64_emit_mul): New function.
3899 (ppc64_emit_lsh): New function.
3900 (ppc64_emit_rsh_signed): New function.
3901 (ppc64_emit_rsh_unsigned): New function.
3902 (ppc64_emit_ext): New function.
3903 (ppc64_emit_zero_ext): New function.
3904 (ppc64_emit_log_not): New function.
3905 (ppc64_emit_bit_and): New function.
3906 (ppc64_emit_bit_or): New function.
3907 (ppc64_emit_bit_xor): New function.
3908 (ppc64_emit_bit_not): New function.
3909 (ppc64_emit_equal): New function.
3910 (ppc64_emit_less_signed): New function.
3911 (ppc64_emit_less_unsigned): New function.
3912 (ppc64_emit_ref): New function.
3913 (ppc64_emit_const): New function.
3914 (ppc64v1_emit_reg): New function.
3915 (ppc64v2_emit_reg): New function.
3916 (ppc64_emit_pop): New function.
3917 (ppc64_emit_stack_flush): New function.
3918 (ppc64_emit_swap): New function.
3919 (ppc64v1_emit_call): New function.
3920 (ppc64v2_emit_call): New function.
3921 (ppc64v1_emit_int_call_1): New function.
3922 (ppc64v2_emit_int_call_1): New function.
3923 (ppc64v1_emit_void_call_2): New function.
3924 (ppc64v2_emit_void_call_2): New function.
3925 (ppc64_emit_if_goto): New function.
3926 (ppc64_emit_eq_goto): New function.
3927 (ppc64_emit_ne_goto): New function.
3928 (ppc64_emit_lt_goto): New function.
3929 (ppc64_emit_le_goto): New function.
3930 (ppc64_emit_gt_goto): New function.
3931 (ppc64_emit_ge_goto): New function.
3932 (ppc64v1_emit_ops_impl): New static variable.
3933 (ppc64v2_emit_ops_impl): New static variable.
3934 (ppc_emit_ops): New function.
3935 (linux_low_target): Wire in ppc_emit_ops.
3936
3937 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3938 Marcin Kościelnicki <koriakin@0x04.net>
3939
3940 PR/17221
3941 * Makefile.in: Add powerpc-*-ipa.o
3942 * configure.srv: Add ipa_obj for powerpc*-linux.
3943 * linux-ppc-ipa.c: New file.
3944 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3945 includes.
3946 (PPC_FIELD): New macro.
3947 (PPC_SEXT): New macro.
3948 (PPC_OP6): New macro.
3949 (PPC_BO): New macro.
3950 (PPC_LI): New macro.
3951 (PPC_BD): New macro.
3952 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3953 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3954 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3955 (ppc_get_thread_area): New function.
3956 (is_elfv2_inferior): New function.
3957 (gen_ds_form): New function.
3958 (GEN_STD): New macro.
3959 (GEN_STDU): New macro.
3960 (GEN_LD): New macro.
3961 (GEN_LDU): New macro.
3962 (gen_d_form): New function.
3963 (GEN_ADDI): New macro.
3964 (GEN_ADDIS): New macro.
3965 (GEN_LI): New macro.
3966 (GEN_LIS): New macro.
3967 (GEN_ORI): New macro.
3968 (GEN_ORIS): New macro.
3969 (GEN_LWZ): New macro.
3970 (GEN_STW): New macro.
3971 (GEN_STWU): New macro.
3972 (gen_xfx_form): New function.
3973 (GEN_MFSPR): New macro.
3974 (GEN_MTSPR): New macro.
3975 (GEN_MFCR): New macro.
3976 (GEN_MTCR): New macro.
3977 (GEN_SYNC): New macro.
3978 (GEN_LWSYNC): New macro.
3979 (gen_x_form): New function.
3980 (GEN_OR): New macro.
3981 (GEN_MR): New macro.
3982 (GEN_LWARX): New macro.
3983 (GEN_STWCX): New macro.
3984 (GEN_CMPW): New macro.
3985 (gen_md_form): New function.
3986 (GEN_RLDICL): New macro.
3987 (GEN_RLDICR): New macro.
3988 (gen_i_form): New function.
3989 (GEN_B): New macro.
3990 (GEN_BL): New macro.
3991 (gen_b_form): New function.
3992 (GEN_BNE): New macro.
3993 (GEN_LOAD): New macro.
3994 (GEN_STORE): New macro.
3995 (gen_limm): New function.
3996 (gen_atomic_xchg): New function.
3997 (gen_call): New function.
3998 (ppc_relocate_instruction): New function.
3999 (ppc_install_fast_tracepoint_jump_pad): New function.
4000 (ppc_get_min_fast_tracepoint_insn_len): New function.
4001 (ppc_get_ipa_tdesc_idx): New function.
4002 (the_low_target): Wire in the new functions.
4003 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4004 tdescs.
4005 * linux-ppc-tdesc.h: New file.
4006
4007 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4008
4009 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4010 (alloc_jump_pad_buffer): New function.
4011 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4012 (alloc_jump_pad_buffer): New function.
4013 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4014 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4015 (alloc_jump_pad_buffer): New function.
4016 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4017 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4018 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4019 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4020
4021 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4022
4023 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4024 * linux-amd64-ipa.c: Likewise.
4025 * linux-i386-ipa.c: Likewise.
4026 * linux-s390-ipa.c: Likewise.
4027 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4028 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4029 set_trace_state_variable_value_ptr.
4030 (struct ipa_sym_addresses): Likewise.
4031 (symbol_list): Likewise.
4032 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4033 accessing gdb_collect directly.
4034 (gdb_collect_ptr_type): New typedef.
4035 (get_raw_reg_ptr_type): New typedef.
4036 (get_trace_state_variable_value_ptr_type): New typedef.
4037 (set_trace_state_variable_value_ptr_type): New typedef.
4038 (gdb_collect_ptr): New global.
4039 (get_raw_reg_ptr): New global.
4040 (get_trace_state_variable_value_ptr): New global.
4041 (set_trace_state_variable_value_ptr): New global.
4042 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4043 accessing get_raw_reg directly.
4044 (get_get_tsv_func_addr): Likewise for
4045 get_trace_state_variable_value_ptr.
4046 (get_set_tsv_func_addr): Likewise for
4047 set_trace_state_variable_value_ptr.
4048 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4049
4050 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4051
4052 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4053
4054 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4055
4056 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4057 packets.
4058 (relocate_instruction): Remove own_buf.
4059 * server.c (own_buf): Make global.
4060 (handle_v_requests): Make global.
4061 * server.h (own_buf): New declaration.
4062 (handle_v_requests): New prototype.
4063
4064 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4065
4066 PR 18377
4067 * linux-s390-low.c (add_insns): New function.
4068 (s390_emit_prologue): New function.
4069 (s390_emit_epilogue): New function.
4070 (s390_emit_add): New function.
4071 (s390_emit_sub): New function.
4072 (s390_emit_mul): New function.
4073 (s390_emit_lsh): New function.
4074 (s390_emit_rsh_signed): New function.
4075 (s390_emit_rsh_unsigned): New function.
4076 (s390_emit_ext): New function.
4077 (s390_emit_log_not): New function.
4078 (s390_emit_bit_and): New function.
4079 (s390_emit_bit_or): New function.
4080 (s390_emit_bit_xor): New function.
4081 (s390_emit_bit_not): New function.
4082 (s390_emit_equal): New function.
4083 (s390_emit_less_signed): New function.
4084 (s390_emit_less_unsigned): New function.
4085 (s390_emit_ref): New function.
4086 (s390_emit_if_goto): New function.
4087 (s390_emit_goto): New function.
4088 (s390_write_goto_address): New function.
4089 (s390_emit_litpool): New function.
4090 (s390_emit_const): New function.
4091 (s390_emit_call): New function.
4092 (s390_emit_reg): New function.
4093 (s390_emit_pop): New function.
4094 (s390_emit_stack_flush): New function.
4095 (s390_emit_zero_ext): New function.
4096 (s390_emit_swap): New function.
4097 (s390_emit_stack_adjust): New function.
4098 (s390_emit_set_r2): New function.
4099 (s390_emit_int_call_1): New function.
4100 (s390_emit_void_call_2): New function.
4101 (s390_emit_eq_goto): New function.
4102 (s390_emit_ne_goto): New function.
4103 (s390_emit_lt_goto): New function.
4104 (s390_emit_le_goto): New function.
4105 (s390_emit_gt_goto): New function.
4106 (s390_emit_ge_goto): New function.
4107 (s390x_emit_prologue): New function.
4108 (s390x_emit_epilogue): New function.
4109 (s390x_emit_add): New function.
4110 (s390x_emit_sub): New function.
4111 (s390x_emit_mul): New function.
4112 (s390x_emit_lsh): New function.
4113 (s390x_emit_rsh_signed): New function.
4114 (s390x_emit_rsh_unsigned): New function.
4115 (s390x_emit_ext): New function.
4116 (s390x_emit_log_not): New function.
4117 (s390x_emit_bit_and): New function.
4118 (s390x_emit_bit_or): New function.
4119 (s390x_emit_bit_xor): New function.
4120 (s390x_emit_bit_not): New function.
4121 (s390x_emit_equal): New function.
4122 (s390x_emit_less_signed): New function.
4123 (s390x_emit_less_unsigned): New function.
4124 (s390x_emit_ref): New function.
4125 (s390x_emit_if_goto): New function.
4126 (s390x_emit_const): New function.
4127 (s390x_emit_call): New function.
4128 (s390x_emit_reg): New function.
4129 (s390x_emit_pop): New function.
4130 (s390x_emit_stack_flush): New function.
4131 (s390x_emit_zero_ext): New function.
4132 (s390x_emit_swap): New function.
4133 (s390x_emit_stack_adjust): New function.
4134 (s390x_emit_int_call_1): New function.
4135 (s390x_emit_void_call_2): New function.
4136 (s390x_emit_eq_goto): New function.
4137 (s390x_emit_ne_goto): New function.
4138 (s390x_emit_lt_goto): New function.
4139 (s390x_emit_le_goto): New function.
4140 (s390x_emit_gt_goto): New function.
4141 (s390x_emit_ge_goto): New function.
4142 (s390_emit_ops): New function.
4143 (struct linux_target_ops): Fill in emit_ops hook.
4144
4145 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4146
4147 PR 18377
4148 * Makefile.in: Add s390 IPA files.
4149 * configure.srv: Build IPA for s390.
4150 * linux-s390-ipa.c: New file.
4151 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4152 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4153 (tdesc_s390_linux32): Likewise.
4154 (init_registers_s390_linux32v1): Likewise.
4155 (tdesc_s390_linux32v1): Likewise.
4156 (init_registers_s390_linux32v2): Likewise.
4157 (tdesc_s390_linux32v2): Likewise.
4158 (init_registers_s390_linux64): Likewise.
4159 (tdesc_s390_linux64): Likewise.
4160 (init_registers_s390_linux64v1): Likewise.
4161 (tdesc_s390_linux64v1): Likewise.
4162 (init_registers_s390_linux64v2): Likewise.
4163 (tdesc_s390_linux64v2): Likewise.
4164 (init_registers_s390_te_linux64): Likewise.
4165 (tdesc_s390_te_linux64): Likewise.
4166 (init_registers_s390_vx_linux64): Likewise.
4167 (tdesc_s390_vx_linux64): Likewise.
4168 (init_registers_s390_tevx_linux64): Likewise.
4169 (tdesc_s390_tevx_linux64): Likewise.
4170 (init_registers_s390x_linux64): Likewise.
4171 (tdesc_s390x_linux64): Likewise.
4172 (init_registers_s390x_linux64v1): Likewise.
4173 (tdesc_s390x_linux64v1): Likewise.
4174 (init_registers_s390x_linux64v2): Likewise.
4175 (tdesc_s390x_linux64v2): Likewise.
4176 (init_registers_s390x_te_linux64): Likewise.
4177 (tdesc_s390x_te_linux64): Likewise.
4178 (init_registers_s390x_vx_linux64): Likewise.
4179 (tdesc_s390x_vx_linux64): Likewise.
4180 (init_registers_s390x_tevx_linux64): Likewise.
4181 (tdesc_s390x_tevx_linux64): Likewise.
4182 (have_hwcap_s390_vx): New static variable.
4183 (s390_arch_setup): Fill have_hwcap_s390_vx.
4184 (s390_get_thread_area): New function.
4185 (s390_ft_entry_gpr_esa): New const.
4186 (s390_ft_entry_gpr_zarch): New const.
4187 (s390_ft_entry_misc): New const.
4188 (s390_ft_entry_fr): New const.
4189 (s390_ft_entry_vr): New const.
4190 (s390_ft_main_31): New const.
4191 (s390_ft_main_64): New const.
4192 (s390_ft_exit_fr): New const.
4193 (s390_ft_exit_vr): New const.
4194 (s390_ft_exit_misc): New const.
4195 (s390_ft_exit_gpr_esa): New const.
4196 (s390_ft_exit_gpr_zarch): New const.
4197 (append_insns): New function.
4198 (s390_relocate_instruction): New function.
4199 (s390_install_fast_tracepoint_jump_pad): New function.
4200 (s390_get_min_fast_tracepoint_insn_len): New function.
4201 (s390_get_ipa_tdesc_idx): New function.
4202 (struct linux_target_ops): Wire in the above functions.
4203 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4204 * linux-s390-tdesc.h: New file.
4205
4206 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4207
4208 * linux-s390-low.c (s390_supports_tracepoints): New function.
4209 (struct linux_target_ops): Fill supports_tracepoints hook.
4210
4211 2016-03-18 Yao Qi <yao.qi@linaro.org>
4212
4213 * linux-low.c (lwp_signal_can_be_delivered): New function.
4214 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4215
4216 2016-03-18 Yao Qi <yao.qi@linaro.org>
4217
4218 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4219 0 if signal is enqueued. Remove 'signal' from one debugging
4220 message. Move one debugging message to some lines below.
4221 Remove code setting 'signal' to 0.
4222
4223 2016-03-18 Yao Qi <yao.qi@linaro.org>
4224
4225 * linux-low.c (linux_low_filter_event): Remove redundant
4226 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4227
4228 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4229
4230 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4231 (struct linux_target_ops): Wire in the above.
4232
4233 2016-03-03 Yao Qi <yao.qi@linaro.org>
4234
4235 * linux-low.c: Update comments to start_step_over.
4236
4237 2016-03-03 Yao Qi <yao.qi@linaro.org>
4238
4239 PR server/19736
4240 * linux-low.c (handle_extended_wait): Set child suspended
4241 if event_lwp->bp_reinsert isn't zero.
4242
4243 2016-03-02 Yao Qi <yao.qi@linaro.org>
4244
4245 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4246 enqueue_pending_signal.
4247
4248 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4249
4250 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4251 is actually loaded.
4252
4253 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4254
4255 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4256 (s390_regmap_3264) [!__s390x__]: New global.
4257 (s390_collect_ptrace_register): Skip map entries containing -1.
4258 (s390_supply_ptrace_register): Ditto.
4259 (s390_fill_gprs_high): New function.
4260 (s390_store_gprs_high): New function.
4261 (s390_regsets): Add NT_S390_HIGH_GPRS.
4262 (s390_get_hwcap): Enable on 31-bit.
4263 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4264 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4265 Detect NT_S390_HIGH_GPRS.
4266 (s390_usrregs_info_3264): Enable on 31-bit.
4267 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4268 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4269
4270 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4271
4272 PR gdb/13808
4273 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4274 * configure.srv: Ditto.
4275 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4276 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4277 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4278 (init_registers_amd64_linux): Remove prototype.
4279 (tdesc_amd64_linux): Remove declaration.
4280 (get_ipa_tdesc): New function.
4281 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4282 initialize remaining tdescs.
4283 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4284 (init_registers_i386_linux): Remove prototype.
4285 (tdesc_i386_linux): Remove declaration.
4286 (get_ipa_tdesc): New function.
4287 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4288 initialize remaining tdescs.
4289 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4290 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4291 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4292 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4293 (x86_get_ipa_tdesc_idx): New function.
4294 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4295 * linux-x86-tdesc.h: New file.
4296 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4297 (target_get_ipa_tdesc_idx): New macro.
4298 * tracepoint.c (ipa_tdesc_idx): New macro.
4299 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4300 (symbol_list): Add ipa_tdesc_idx.
4301 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4302 (ipa_tdesc): Remove.
4303 (ipa_tdesc_idx): New variable.
4304 (get_context_regcache): Use get_ipa_tdesc.
4305 (gdb_collect): Ditto.
4306 (gdb_probe): Ditto.
4307 * tracepoint.h (get_ipa_tdesc): New prototype.
4308 (ipa_tdesc): Remove.
4309
4310 2016-02-24 Pedro Alves <palves@redhat.com>
4311
4312 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4313 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4314 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4315 Factor out common code between the USE_SIGTRAP_SIGINFO and
4316 !USE_SIGTRAP_SIGINFO blocks.
4317 (linux_low_filter_event): Call save_stop_reason instead of
4318 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4319 Update comments.
4320 (linux_wait_1): Update comments.
4321
4322 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4323
4324 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4325 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4326 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4327 ppc_insert_point, ppc_remove_point.
4328
4329 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4330
4331 * linux-s390-low.c (s390_supports_z_point_type): New function.
4332 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4333
4334 2016-02-16 Yao Qi <yao.qi@linaro.org>
4335
4336 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4337 PC. Get pc from regcache_read_pc.
4338
4339 2016-02-12 Yao Qi <yao.qi@linaro.org>
4340
4341 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4342 or linux_get_pc_32bit.
4343 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4344
4345 2016-02-12 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4348 arm_linux_get_next_pcs_fixup.
4349
4350 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4351
4352 * tracepoint.c (x_tracepoint_action_download): Change
4353 write_inferior_data_ptr to write_inferior_data_pointer.
4354 (cmd_qtstart): Likewise.
4355 (write_inferior_data_ptr): Remove.
4356 (download_agent_expr): Change write_inferior_data_ptr to
4357 write_inferior_data_pointer.
4358 (download_tracepoint_1): Likewise.
4359 (download_tracepoint): Likewise.
4360 (download_trace_state_variables): Likewise.
4361
4362 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4363 Marcin Kościelnicki <koriakin@0x04.net>
4364
4365 * tracepoint.c (struct tracepoint_action_ops): Remove.
4366 (struct tracepoint_action): Remove ops.
4367 (m_tracepoint_action_download, r_tracepoint_action_download)
4368 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4369 size and offset accordingly.
4370 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4371 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4372 (tracepoint_action_send, tracepoint_action_download): New functions.
4373 Helpers for trace action handlers.
4374 (add_tracepoint_action): Remove setup actions ops.
4375 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4376
4377 2016-02-10 Yao Qi <yao.qi@linaro.org>
4378
4379 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4380
4381 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4382
4383 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4384 to AC_OUTPUT.
4385 * configure: Regenerate.
4386
4387 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4388
4389 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4390 void * to gdb_byte *.
4391 * linux-low.c (siginfo_fixup): Likewise.
4392 (linux_xfer_siginfo): Likewise.
4393 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4394 Likewise.
4395 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4396
4397 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4398
4399 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4400 to srv_tgtobj.
4401 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4402 to srv_tgtobj.
4403 * linux-x86-low.c [__x86_64__]: Include
4404 "nat/amd64-linux-siginfo.h".
4405 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4406 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4407 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4408 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4409 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4410 (cpt_si_fd, si_timerid, si_overrun): Move from
4411 nat/amd64-linux-siginfo.c.
4412 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4413
4414 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4415
4416 * server.c (skip_to_semicolon): Remove.
4417 (process_point_options): Use strchrnul instead of
4418 skip_to_semicolon.
4419
4420 2016-01-26 Yao Qi <yao.qi@linaro.org>
4421
4422 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4423 * linux-low.c (install_software_single_step_breakpoints): Don't
4424 call regcache_read_pc.
4425 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4426 argument pc.
4427
4428 2016-01-26 Yao Qi <yao.qi@linaro.org>
4429
4430 * linux-low.c (install_software_single_step_breakpoints): Call
4431 regcache_read_pc instead of get_pc.
4432
4433 2016-01-26 Yao Qi <yao.qi@linaro.org>
4434
4435 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4436 (unblock_async_io): Rename to ...
4437 (block_unblock_async_io): ... it. New function.
4438 (enable_async_io): Don't install SIGIO handler. Unblock it
4439 instead.
4440 (disable_async_io): Don't ignore SIGIO. Block it instead.
4441 (initialize_async_io): Install SIGIO handler. Don't call
4442 unblock_async_io.
4443
4444 2016-01-26 Yao Qi <yao.qi@linaro.org>
4445
4446 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4447 first character is '\003', call *the_target->request_interrupt.
4448
4449 2016-01-25 Yao Qi <yao.qi@linaro.org>
4450
4451 * remote-utils.c (new_thread_notify): Remove.
4452 (dead_thread_notify): Likewise.
4453 * remote-utils.h (new_thread_notify): Remove declaration.
4454 (dead_thread_notify): Likewise.
4455
4456 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4457
4458 * gdb.trace/pending.exp: Fix expected message on continue.
4459
4460 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4461
4462 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4463 it works properly on big-endian machines where sizeof (CORE_ADDR)
4464 != sizeof (void *).
4465
4466 2016-01-21 Pedro Alves <palves@redhat.com>
4467
4468 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4469 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4470 * configure: Regenerate.
4471
4472 2016-01-21 Yao Qi <yao.qi@linaro.org>
4473
4474 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4475 is_thumb and set it according to CPSR saved on the stack.
4476 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4477 arm_sigreturn_next_pc.
4478
4479 2016-01-18 Yao Qi <yao.qi@linaro.org>
4480
4481 * linux-low.c (linux_set_pc_64bit): New function.
4482 (linux_get_pc_64bit): New function.
4483 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4484 Declare.
4485 * linux-sparc-low.c (debug_threads): Remove declaration.
4486 (sparc_get_pc): Remove.
4487 (the_low_target): Use linux_get_pc_64bit instead of
4488 sparc_get_pc.
4489 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4490 (the_low_target): Use linux_get_pc_64bit and
4491 linux_set_pc_64bit.
4492
4493 2016-01-18 Yao Qi <yao.qi@linaro.org>
4494
4495 * linux-arm-low.c (debug_threads): Remove declaration.
4496 (arm_get_pc, arm_set_pc): Remove.
4497 (the_low_target): Use linux_get_pc_32bit and
4498 linux_set_pc_32bit.
4499 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4500 (the_low_target): Use linux_get_pc_32bit and
4501 linux_set_pc_32bit.
4502 * linux-cris-low.c (debug_threads): Remove declaration.
4503 (cris_get_pc, cris_set_pc,): Remove.
4504 (the_low_target): Use linux_get_pc_32bit and
4505 linux_set_pc_32bit.
4506 * linux-crisv32-low.c (debug_threads): Remove declaration.
4507 (cris_get_pc, cris_set_pc): Remove.
4508 (the_low_target): Use linux_get_pc_32bit and
4509 linux_set_pc_32bit.
4510 * linux-low.c: Include inttypes.h.
4511 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4512 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4513 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4514 (the_low_target): Use linux_get_pc_32bit and
4515 linux_set_pc_32bit.
4516 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4517 (the_low_target): Use linux_get_pc_32bit and
4518 linux_set_pc_32bit.
4519 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4520 (the_low_target): Use linux_get_pc_32bit and
4521 linux_set_pc_32bit.
4522 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4523 (the_low_target): Use linux_get_pc_32bit and
4524 linux_set_pc_32bit.
4525 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4526 (the_low_target): Use linux_get_pc_32bit and
4527 linux_set_pc_32bit.
4528
4529 2016-01-18 Gary Benson <gbenson@redhat.com>
4530
4531 * configure.ac (AC_FUNC_FORK): New check.
4532 * config.in: Regenerate.
4533 * configure: Likewise.
4534
4535 2016-01-14 Yao Qi <yao.qi@linaro.org>
4536
4537 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4538 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4539 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4540 arm_get_next_pcs_ctor.
4541
4542 2016-01-12 Josh Stone <jistone@redhat.com>
4543 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4544
4545 * inferiors.h: Include "gdb_vecs.h".
4546 (struct process_info): Add syscalls_to_catch.
4547 * inferiors.c (remove_process): Free syscalls_to_catch.
4548 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4549 syscall_return stops.
4550 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4551 * server.c (handle_general_set): Handle QCatchSyscalls.
4552 (handle_query): Report support for QCatchSyscalls.
4553 * target.h (struct target_ops): Add supports_catch_syscall.
4554 (target_supports_catch_syscall): New macro.
4555 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4556 (struct lwp_info): Add syscall_state.
4557 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4558 Maintain syscall_state and syscalls_to_catch across exec.
4559 (get_syscall_trapinfo): New function, proxy to the_low_target.
4560 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4561 (linux_low_filter_event): Toggle syscall_state entry/return for
4562 syscall traps, and set it ignored for all others.
4563 (gdb_catching_syscalls_p): New function.
4564 (gdb_catch_this_syscall_p): New function.
4565 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4566 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4567 (linux_supports_catch_syscall): New function.
4568 (linux_target_ops): Install it.
4569 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4570 (the_low_target): Install it.
4571
4572 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4573
4574 * acinclude.m4: Include new ../warning.m4 file.
4575 * configure: Regenerated.
4576 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4577
4578 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4579
4580 * ax.c (is_goto_target): Mark static.
4581 * linux-low.c (register_addr): Likewise.
4582 (linux_fetch_registers, linux_store_registers): Likewise.
4583 * mem-break.c (any_persistent_commands): Fix old prototype.
4584 (add_commands_to_breakpoint): Mark static.
4585 * regcache.c (find_register_by_name): Delete unused func.
4586 * remote-utils.c (hex_or_minus_one): Mark static.
4587 * server.c (monitor_show_help): Mark static.
4588 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4589 handle_v_requests): Likewise.
4590
4591 2016-01-12 Pedro Alves <palves@redhat.com>
4592
4593 Remove use of the registered trademark symbol throughout.
4594
4595 2016-01-08 Yao Qi <yao.qi@linaro.org>
4596
4597 * remote-utils.c (getpkt): If c is '\003', call target hook
4598 request_interrupt.
4599
4600 2016-01-06 Yao Qi <yao.qi@linaro.org>
4601
4602 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4603 linux-aarch32-low.c.
4604 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4605 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4606 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4607 (thumb2_breakpoint): Declare.
4608 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4609 linux-aarch32-low.h.
4610 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4611 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4612 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4613
4614 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4615
4616 * gdbreplay.c (gdbreplay_version): Change copyright year in
4617 version message.
4618 * server.c (gdbserver_version): Likewise.
4619
4620 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4621
4622 * server.c (crc32_table): Delete.
4623 (crc32): Use libiberty's xcrc32 function.
4624
4625 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4626
4627 * lynx-low.c (lynx_delete_thread_callback): New function.
4628 (lynx_mourn): Properly delete our process and all of its
4629 threads. Remove call to clear_inferiors.
4630
4631 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4632
4633 * target.c (thread_search_callback): Add check that
4634 the thread_stopped target callback is not NULL before
4635 calling it.
4636
4637 2015-12-21 Yao Qi <yao.qi@linaro.org>
4638
4639 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4640 arm breakpoint.
4641
4642 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4643
4644 * server.c (handle_query): Call target_supports_software_single_step.
4645
4646 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4647
4648 * linux-low.c (single_step): New function.
4649 (linux_resume_one_lwp_throw): Call single_step.
4650 (start_step_over): Likewise.
4651
4652 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4653
4654 * Makefile.in (SFILES): Append arch/arm-linux.c,
4655 arch/arm-get-next-pcs.c.
4656 (arm-linux.o): New rule.
4657 (arm-get-next-pcs.o): New rule.
4658 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4659 arm-linux.o.
4660 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4661 to linux-aarch32-low.c.
4662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4663 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4664 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4665 (thumb2_breakpoint_len): Likewise.
4666 (arm_is_thumb_mode): Make non-static.
4667 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4668 from linux-aarch32-low.c.
4669 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4670 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4671 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4672 (thumb2_breakpoint_len): Likewise.
4673 (arm_is_thumb_mode): New declaration.
4674 * linux-arm-low.c: Include arch/arm-linux.h
4675 aarch/arm-get-next-pcs.h, sys/syscall.h.
4676 (get_next_pcs_ops): New struct.
4677 (get_next_pcs_addr_bits_remove): New function.
4678 (get_next_pcs_is_thumb): New function.
4679 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4680 (arm_sigreturn_next_pc): Likewise.
4681 (get_next_pcs_syscall_next_pc): Likewise.
4682 (arm_gdbserver_get_next_pcs): Likewise.
4683 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4684 Initialize.
4685 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4686 * server.h: Include gdb_vecs.h.
4687
4688 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4689
4690 * Makefile.in (SFILES): Append common/common-regcache.c.
4691 (OBS): Append common-regcache.o.
4692 (common-regcache.o): New rule.
4693 * regcache.c (init_register_cache): Initialize cache to
4694 REG_UNAVAILABLE.
4695 (regcache_raw_read_unsigned): New function.
4696 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4697 register_status enum.
4698
4699 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4700
4701 * linux-aarch64-low.c (the_low_targets): Rename
4702 breakpoint_reinsert_addr to get_next_pcs.
4703 * linux-arm-low.c (the_low_targets): Likewise.
4704 * linux-bfin-low.c (the_low_targets): Likewise.
4705 * linux-cris-low.c (the_low_targets): Likewise.
4706 * linux-crisv32-low.c (the_low_targets): Likewise.
4707 * linux-low.c (can_software_single_step): Likewise.
4708 (install_software_single_step_breakpoints): New function.
4709 (start_step_over): Use install_software_single_step_breakpoints.
4710 * linux-low.h: New CORE_ADDR vector.
4711 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4712 get_next_pcs.
4713 * linux-mips-low.c (the_low_targets): Likewise.
4714 * linux-nios2-low.c (the_low_targets): Likewise.
4715 * linux-sparc-low.c (the_low_targets): Likewise.
4716
4717 2015-12-17 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.c (linux_kill_one_lwp): Remove references to
4720 LinuxThreads.
4721 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4722 to 'kill'.
4723 (linux_init_signals): Delete.
4724 (initialize_low): Adjust.
4725 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4726
4727 2015-12-16 Pedro Alves <palves@redhat.com>
4728
4729 * configure.ac (compiler warning flags): When testing a
4730 -Wno-foo option, check whether -Wfoo works instead.
4731 * configure: Regenerate.
4732
4733 2015-12-11 Don Breazeal <donb@codesourcery.com>
4734
4735 * server.c (process_serial_event): Don't exit from gdbserver
4736 in remote mode if there are still active inferiors.
4737
4738 2015-12-11 Yao Qi <yao.qi@linaro.org>
4739
4740 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4741 arm_breakpoint_at if the process is 32-bit.
4742
4743 2015-12-11 Yao Qi <yao.qi@linaro.org>
4744
4745 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4746 arm breakpoint.
4747
4748 2015-12-07 Yao Qi <yao.qi@linaro.org>
4749
4750 * configure.srv: Append arm.o to srv_tgtobj for
4751 aarch64*-*-linux* target.
4752 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4753 from linux-arm-low.c.
4754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4755 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4756 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4757 (thumb2_breakpoint_len): Likewise.
4758 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4759 (arm_breakpoint_kinds): Likewise.
4760 (arm_breakpoint_kind_from_pc): Likewise.
4761 (arm_sw_breakpoint_from_kind): Likewise.
4762 (arm_breakpoint_kind_from_current_state): Likewise.
4763 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4764 (arm_sw_breakpoint_from_kind): Declare.
4765 (arm_breakpoint_kind_from_current_state): Declare.
4766 (arm_breakpoint_at): Declare.
4767 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4768 arm_sw_breakpoint_from_kind if process is 32-bit.
4769 (aarch64_breakpoint_kind_from_pc): New function.
4770 (aarch64_breakpoint_kind_from_current_state): New function.
4771 (the_low_target): Initialize fields breakpoint_kind_from_pc
4772 and breakpoint_kind_from_current_state.
4773 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4774 linux-aarch32-low.c.
4775 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4776 (arm_breakpoint, arm_breakpoint_len): Likewise.
4777 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4778 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4779 (arm_is_thumb_mode): Likewise.
4780 (arm_breakpoint_at): Likewise.
4781 (arm_breakpoint_kind_from_pc): Likewise.
4782 (arm_sw_breakpoint_from_kind): Likewise.
4783 (arm_breakpoint_kind_from_current_state): Likewise.
4784
4785 Revert:
4786 2015-08-04 Yao Qi <yao.qi@linaro.org>
4787
4788 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4789 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4790 * server.c (extended_protocol): Remove "static".
4791 * server.h (extended_protocol): Declare it.
4792
4793 2015-12-04 Josh Stone <jistone@redhat.com>
4794
4795 * target.h (struct target_ops) <arch_setup>: Rename to ...
4796 (struct target_ops) <post_create_inferior>: ... this.
4797 (target_arch_setup): Rename to ...
4798 (target_post_create_inferior): ... this, calling post_create_inferior.
4799 * server.c (start_inferior): Update target_arch_setup calls to
4800 target_post_create_inferior.
4801 * linux-low.c (linux_low_ptrace_options): Forward declare.
4802 (linux_arch_setup): Update its comment for general use.
4803 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4804 (struct linux_target_ops): Use linux_post_create_inferior.
4805 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4806 to post_create_inferior.
4807 * nto-low.c (struct nto_target_ops): Likewise.
4808 * spu-low.c (struct spu_target_ops): Likewise.
4809 * win32-low.c (struct win32_target_ops): Likewise.
4810
4811 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812
4813 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4814
4815 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4816
4817 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4818 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4819 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4820 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4821 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4822 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4823 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4824 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4825 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4826 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4827 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4828 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4829
4830 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4831
4832 * linux-low.c (linux_look_up_symbols): Don't call
4833 linux_supports_traceclone.
4834 * linux-low.h (thread_db_init): Remove use_events argument.
4835 * thread-db.c (thread_db_use_event): Remove global variable.
4836 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4837 (struct thread_db) <td_create_bp>: Remove field.
4838 (thread_db_create_event): Remove function.
4839 (thread_db_enable_reporting): Likewise.
4840 (find_one_thread): Don't check for thread_db_use_events.
4841 (attach_thread): Likewise.
4842 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4843 (try_thread_db_load_1): Don't check for thread_db_use_events.
4844 (thread_db_init): Remove use_events argument and thread events
4845 handling.
4846 (remove_thread_event_breakpoints): Remove function.
4847 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4848
4849 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4850
4851 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4852 New function.
4853 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4854 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4855 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4856 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4857 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4858 Initialize.
4859 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4860 New function.
4861 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4862 * linux-low.c (can_hardware_single_step): Use
4863 supports_hardware_single_step.
4864 (can_software_single_step): New function.
4865 (start_step_over): Call can_software_single_step.
4866 (linux_supports_hardware_single_step): New function.
4867 (struct target_ops) <supports_software_single_step>: Initialize.
4868 * linux-low.h (struct linux_target_ops)
4869 <supports_hardware_single_step>: Initialize.
4870 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4872 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4873 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4874 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4875 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4876 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4877 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4878 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4879 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4880 Initialize.
4881 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4882 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4883 Initialize.
4884 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4886 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4887 New function.
4888 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4889 * target.h (struct target_ops): <supports_software_single_step>:
4890 New field.
4891 (target_supports_software_single_step): New macro.
4892
4893 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4894
4895 * linux-low.c (linux_wait_1): Fix pc advance condition.
4896 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4897 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4898
4899 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4900
4901 * linux-arm-low.c (arm_is_thumb_mode): New function.
4902 (arm_breakpoint_at): Use arm_is_thumb_mode.
4903 (arm_breakpoint_kind_from_current_state): New function.
4904 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4905 Initialize.
4906 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4907 (linux_breakpoint_kind_from_current_state): New function.
4908 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4909 * linux-low.h (struct linux_target_ops)
4910 <breakpoint_kind_from_current_state>: New field.
4911 * target.h (struct target_ops): Likewise.
4912 (target_breakpoint_kind_from_current_state): New macro.
4913
4914 2015-11-30 Pedro Alves <palves@redhat.com>
4915
4916 * linux-low.c (linux_resume): Wake up the event loop before
4917 returning.
4918
4919 2015-11-30 Pedro Alves <palves@redhat.com>
4920
4921 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4922 check.
4923 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4924 to -1.
4925 * target.c (struct thread_search): New structure.
4926 (thread_search_callback): New function.
4927 (prev_general_thread): New global.
4928 (prepare_to_access_memory, done_accessing_memory): New functions.
4929 * target.h (prepare_to_access_memory, done_accessing_memory):
4930 Replace macros with function declarations.
4931
4932 2015-11-30 Pedro Alves <palves@redhat.com>
4933
4934 PR 14618
4935 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4936 report TARGET_WAITKIND_NO_RESUMED.
4937 * remote-utils.c (prepare_resume_reply): Handle
4938 TARGET_WAITKIND_NO_RESUMED.
4939 * server.c (report_no_resumed): New global.
4940 (handle_query) <qSupported>: Handle "no-resumed+". Report
4941 "no-resumed+" support.
4942 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4943 return error if the client doesn't support no-resumed events.
4944 (push_stop_notification): New function.
4945 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4946 events if the client supports them.
4947
4948 2015-11-30 Pedro Alves <palves@redhat.com>
4949
4950 * linux-low.c (thread_still_has_status_pending_p): Don't check
4951 vCont;t here.
4952 (lwp_resumed): New function.
4953 (status_pending_p_callback): Return early if the LWP is not
4954 supposed to be resumed.
4955
4956 2015-11-30 Pedro Alves <palves@redhat.com>
4957
4958 * linux-low.c (handle_extended_wait): Assert that the LWP's
4959 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4960 thread create events, leave the new child's status pending.
4961 (linux_low_filter_event): If GDB wants to hear about thread exit
4962 events, leave the LWP marked dead and don't delete it.
4963 (linux_wait_for_event_filtered): Don't check for thread exit.
4964 (filter_exit_event): New function.
4965 (linux_wait_1): Use it, when returning an exit event.
4966 (linux_resume_one_lwp_throw): Assert that the LWP's
4967 waitstatus is TARGET_WAITKIND_IGNORE.
4968 * remote-utils.c (prepare_resume_reply): Handle
4969 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4970 * server.c (report_thread_events): New global.
4971 (handle_general_set): Handle QThreadEvents.
4972 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4973 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4974 TARGET_WAITKIND_THREAD_EXITED.
4975 * server.h (report_thread_events): Declare.
4976
4977 2015-11-30 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4980 the thread's last_resume_kind was resume_stop.
4981
4982 2015-11-30 Pedro Alves <palves@redhat.com>
4983
4984 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4985 before returning.
4986
4987 2015-11-30 Pedro Alves <palves@redhat.com>
4988
4989 * server.c (handle_v_requests): Handle vCtrlC.
4990
4991 2015-11-30 Pedro Alves <palves@redhat.com>
4992
4993 * gdbthread.h (find_any_thread_of_pid): Declare.
4994 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4995 functions.
4996 * server.c (handle_query): If current_thread is NULL, look for
4997 another thread of the selected process.
4998
4999 2015-11-26 Daniel Colascione <dancol@dancol.org>
5000 Simon Marchi <simon.marchi@ericsson.com>
5001
5002 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5003 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5004 name in reply.
5005 * target.h (struct target_ops) <thread_name>: New field.
5006 (target_thread_name): New macro.
5007
5008 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5009
5010 * regcache.h (regcache_invalidate_pid): Add declaration.
5011 * regcache.c (regcache_invalidate_pid): New function, extracted
5012 from regcache_invalidate.
5013 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5014 Add trivial documentation comment.
5015 * lynx-low.c: Use regcache_invalidate_pid instead of
5016 regcache_invalidate.
5017
5018 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5019
5020 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5021 and Elf64_auxv_t if the target is Android.
5022
5023 2015-11-22 Doug Evans <xdje42@gmail.com>
5024
5025 * target.h: #include <sys/types.h>.
5026
5027 2015-11-19 Pedro Alves <palves@redhat.com>
5028
5029 * linux-low.c (linux_process_qsupported): Change prototype.
5030 Adjust.
5031 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5032 Change prototype.
5033 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5034 and adjust to loop over all features.
5035 * server.c (handle_query) <qSupported>: Adjust to call
5036 target_process_qsupported once, passing it a vector of unprocessed
5037 features.
5038 * target.h (struct target_ops) <process_qsupported>: Change
5039 prototype.
5040 (target_process_qsupported): Adjust.
5041
5042 2015-11-19 Pedro Alves <palves@redhat.com>
5043
5044 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5045 mode.
5046 * configure: Regenerate.
5047
5048 2015-11-19 Pedro Alves <palves@redhat.com>
5049
5050 * configure: Regenerate.
5051
5052 2015-11-19 Yao Qi <yao.qi@linaro.org>
5053
5054 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5055 type to uint32_t.
5056
5057 2015-11-19 Yao Qi <yao.qi@linaro.org>
5058
5059 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5060 (struct aarch64_operand): Move enum out.
5061
5062 2015-11-19 Yao Qi <yao.qi@linaro.org>
5063
5064 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5065 struct user_fpsimd_state *.
5066 (aarch64_store_fpregset): Likewise.
5067
5068 2015-11-19 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5071 struct user_pt_regs *.
5072 (aarch64_store_gregset): Likewise.
5073
5074 2015-11-18 Pedro Alves <palves@redhat.com>
5075
5076 * Makefile.in (all_object_files): Add $IPA_OBJS.
5077
5078 2015-11-17 Pedro Alves <palves@redhat.com>
5079
5080 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5081 GDB_SIGNAL_0 and gdb_signal_to_string.
5082
5083 2015-11-17 Pedro Alves <palves@redhat.com>
5084
5085 * win32-low.c (handle_output_debug_string): Remove parameter.
5086 (win32_kill): Remove our_status local and adjust call to
5087 handle_output_debug_string.
5088 (get_child_debug_event): Adjust call to
5089 handle_output_debug_string.
5090
5091 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5092
5093 * linux-mips-low.c (mips_fill_gregset): Add cast.
5094 (mips_store_gregset): Likewise.
5095 (mips_fill_fpregset): Likewise.
5096 (mips_store_fpregset): Likewise.
5097
5098 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5099
5100 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5101 priv.
5102
5103 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5104
5105 * linux-mips-low.c (mips_linux_new_thread): Change type of
5106 watch_type to enum target_hw_bp_type.
5107
5108 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5109
5110 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5111 Change return type to arm_hwbp_type.
5112
5113 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5114
5115 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5116 (arm_store_gregset): Likewise.
5117 * linux-arm-low.c (arm_get_hwcap): Likewise.
5118 (arm_read_description): Likewise.
5119
5120 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5121
5122 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5123
5124 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5125
5126 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5127 (ppc_fill_vsxregset): Likewise.
5128 (ppc_store_vsxregset): Likewise.
5129 (ppc_fill_vrregset): Likewise.
5130 (ppc_store_vrregset): Likewise.
5131 (ppc_fill_evrregset): Likewise.
5132 (ppc_store_evrregset): Likewise.
5133
5134 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5135
5136 * linux-ppc-low.c (ppc_usrregs_info): Remove
5137 forward-declaration.
5138 (ppc_arch_setup): Move lower in file.
5139
5140 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5141
5142 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5143 (ps_pdwrite): Likewise.
5144
5145 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5146
5147 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5148 to after assert checks.
5149
5150 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5151
5152 * proc-service.c (ps_pdread): Add/adjust casts.
5153 (ps_pdwrite): Add/adjust casts.
5154
5155 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5156
5157 * server.c (handle_search_memory_1): Cast return value of
5158 memmem.
5159
5160 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5161
5162 * server.c (write_qxfer_response): Change type of data to
5163 gdb_byte *.
5164
5165 2015-10-29 Pedro Alves <palves@redhat.com>
5166
5167 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5168
5169 2015-10-29 Pedro Alves <palves@redhat.com>
5170
5171 * tracepoint.c (clear_installed_tracepoints): Add casts.
5172
5173 2015-10-29 Pedro Alves <palves@redhat.com>
5174
5175 * server.c (handle_v_cont, process_serial_event): Add enum
5176 gdb_signal casts to signal parsing code.
5177
5178 2015-10-29 Pedro Alves <palves@redhat.com>
5179
5180 * linux-low.h (NULL_REGSET): Define.
5181 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5182 * linux-arm-low.c (arm_regsets): Likewise.
5183 * linux-crisv32-low.c (cris_regsets): Likewise.
5184 * linux-m68k-low.c (m68k_regsets): Likewise.
5185 * linux-mips-low.c (mips_regsets): Likewise.
5186 * linux-nios2-low.c (nios2_regsets): Likewise.
5187 * linux-ppc-low.c (ppc_regsets): Likewise.
5188 * linux-s390-low.c (s390_regsets): Likewise.
5189 * linux-sh-low.c (sh_regsets): Likewise.
5190 * linux-sparc-low.c (sparc_regsets): Likewise.
5191 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5192 * linux-tile-low.c (tile_regsets): Likewise.
5193 * linux-x86-low.c (x86_regsets): Likewise.
5194 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5195
5196 2015-10-29 Pedro Alves <palves@redhat.com>
5197
5198 * linux-low.h (NULL_REGSET): Define.
5199 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5200 * linux-arm-low.c (arm_regsets): Likewise.
5201 * linux-crisv32-low.c (cris_regsets): Likewise.
5202 * linux-m68k-low.c (m68k_regsets): Likewise.
5203 * linux-mips-low.c (mips_regsets): Likewise.
5204 * linux-nios2-low.c (nios2_regsets): Likewise.
5205 * linux-ppc-low.c (ppc_regsets): Likewise.
5206 * linux-s390-low.c (s390_regsets): Likewise.
5207 * linux-sh-low.c (sh_regsets): Likewise.
5208 * linux-sparc-low.c (sparc_regsets): Likewise.
5209 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5210 * linux-tile-low.c (tile_regsets): Likewise.
5211 * linux-x86-low.c (x86_regsets): Likewise.
5212 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5213
5214 2015-10-26 Doug Evans <dje@google.com>
5215
5216 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5217
5218 2015-10-26 Doug Evans <dje@google.com>
5219
5220 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5221
5222 2015-10-26 Doug Evans <dje@google.com>
5223
5224 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5225 for debug_printf.
5226 (attach_thread, find_new_threads_callback): Ditto.
5227
5228 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5229
5230 * mem-break.h (set_breakpoint_data): Remove.
5231
5232 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5233
5234 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5235 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5236 (initialize_low): Remove set_breakpoint_data call.
5237 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5238 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5239 (initialize_low): Remove set_breakpoint_data call.
5240 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5241 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5242 (initialize_low): Remove set_breakpoint_data call.
5243
5244 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5245
5246 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5247 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5248 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5249 * target.h (target_breakpoint_kind_from_pc): New macro.
5250
5251 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5252
5253 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5254 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5255 the default breakpoint kind.
5256
5257 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5258
5259 * linux-arm-low.c (arm_supports_z_point_type): Add software
5260 breakpoint support.
5261
5262 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5263
5264 * linux-arm-low.c: Refactor breakpoint definitions.
5265 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5266 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5267
5268 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5269
5270 * Makefile.in: Add arm.c/o.
5271 * configure.srv: Likewise.
5272 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5273 (arm_breakpoint_kind_from_pc): New function.
5274 (arm_sw_breakpoint_from_kind): Return proper kind.
5275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5276
5277 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5278
5279 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5280 removal.
5281 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5282 (struct raw_breakpoint) <size>: Remove.
5283 (struct raw_breakpoint) <kind>: Add.
5284 (bp_size): New function.
5285 (bp_opcode): Likewise.
5286 (find_raw_breakpoint_at): Adjust for kind.
5287 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5288 (remove_memory_breakpoint): Adjust for kind call bp_size.
5289 (set_raw_breakpoint_at): Adjust for kind.
5290 (set_breakpoint): Likewise.
5291 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5292 (delete_raw_breakpoint): Adjust for kind.
5293 (delete_breakpoint): Likewise.
5294 (find_gdb_breakpoint): Likewise.
5295 (set_gdb_breakpoint_1): Likewise.
5296 (set_gdb_breakpoint): Likewise.
5297 (delete_gdb_breakpoint_1): Likewise.
5298 (delete_gdb_breakpoint): Likewise.
5299 (uninsert_raw_breakpoint): Likewise.
5300 (reinsert_raw_breakpoint): Likewise.
5301 (set_breakpoint_data): Remove.
5302 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5303 (check_mem_read): Adjust for kind call bp_size.
5304 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5305 (clone_one_breakpoint): Adjust for kind.
5306 * mem-break.h (set_gdb_breakpoint): Likewise.
5307 (delete_gdb_breakpoint): Likewise.
5308 * server.c (process_serial_event): Likewise.
5309
5310 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5311
5312 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5313 (struct linux_target_ops) <breakpoint>: Remove.
5314 (struct linux_target_ops) <breakpoint_len>: Remove.
5315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5317 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5318 (arm_sw_breakpoint_from_kind): New function.
5319 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5320 (struct linux_target_ops) <breakpoint>: Remove.
5321 (struct linux_target_ops) <breakpoint_len>: Remove.
5322 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5323 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5324 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5325 (struct linux_target_ops) <breakpoint>: Remove.
5326 (struct linux_target_ops) <breakpoint_len>: Remove.
5327 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5328 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5329 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5330 (struct linux_target_ops) <breakpoint>: Remove.
5331 (struct linux_target_ops) <breakpoint_len>: Remove.
5332 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5334 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5335 and sw_breakpoint_from_kind to increment the pc.
5336 (linux_breakpoint_kind_from_pc): New function.
5337 (linux_sw_breakpoint_from_kind): New function.
5338 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5339 (initialize_low): Call breakpoint_kind_from_pc and
5340 sw_breakpoint_from_kind to replace breakpoint_data/len.
5341 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5342 New field.
5343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5344 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5345 (struct linux_target_ops) <breakpoint>: Remove.
5346 (struct linux_target_ops) <breakpoint_len>: Remove.
5347 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5348 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5349 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5350 (struct linux_target_ops) <breakpoint>: Remove.
5351 (struct linux_target_ops) <breakpoint_len>: Remove.
5352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5354 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5355 (struct linux_target_ops) <breakpoint>: Remove.
5356 (struct linux_target_ops) <breakpoint_len>: Remove.
5357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5359 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5360 (struct linux_target_ops) <breakpoint>: Remove.
5361 (struct linux_target_ops) <breakpoint_len>: Remove.
5362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5363 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5364 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5365 (struct linux_target_ops) <breakpoint>: Remove.
5366 (struct linux_target_ops) <breakpoint_len>: Remove.
5367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5369 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5370 (struct linux_target_ops) <breakpoint>: Remove.
5371 (struct linux_target_ops) <breakpoint_len>: Remove.
5372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5374 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5375 (struct linux_target_ops) <breakpoint>: Remove.
5376 (struct linux_target_ops) <breakpoint_len>: Remove.
5377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5379 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5380 (struct linux_target_ops) <breakpoint>: Remove.
5381 (struct linux_target_ops) <breakpoint_len>: Remove.
5382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5384 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5385 (struct linux_target_ops) <breakpoint>: Remove.
5386 (struct linux_target_ops) <breakpoint_len>: Remove.
5387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5389 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5390 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5391 (struct linux_target_ops) <breakpoint>: Remove.
5392 (struct linux_target_ops) <breakpoint_len>: Remove.
5393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5395 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5396 (struct linux_target_ops) <breakpoint>: Remove.
5397 (struct linux_target_ops) <breakpoint_len>: Remove.
5398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5400
5401 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5402
5403 * linux-cris-low.c (cris_get_pc): Remove void arg.
5404
5405 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5406
5407 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5408 variable name.
5409
5410 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5411
5412 * inferiors.c (thread_pid_matches_callback): New function.
5413 (find_thread_process): New function.
5414 (remove_thread): Reset current_thread.
5415 (remove_process): Assert threads have been removed first.
5416
5417 2015-10-15 Yao Qi <yao.qi@linaro.org>
5418
5419 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5420 if it is 3.
5421 (aarch64_remove_point): Likewise.
5422 * regcache.c (regcache_register_size): New function.
5423
5424 2015-10-12 Yao Qi <yao.qi@linaro.org>
5425
5426 * linux-aarch64-low.c: Update all callers as emit_load_store
5427 is renamed to aarch64_emit_load_store.
5428
5429 2015-10-12 Yao Qi <yao.qi@linaro.org>
5430
5431 * linux-aarch64-low.c: Update all callers of function renaming
5432 from emit_insn to aarch64_emit_insn.
5433
5434 2015-10-12 Yao Qi <yao.qi@linaro.org>
5435
5436 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5437 arch/aarch64-insn.h.
5438 (struct aarch64_memory_operand): Likewise.
5439 (ENCODE): Likewise.
5440 (emit_insn): Move to arch/aarch64-insn.c.
5441 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5442 (emit_load_store): Move to arch/aarch64-insn.c.
5443 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5444 (can_encode_int32): Remove.
5445
5446 2015-10-12 Yao Qi <yao.qi@linaro.org>
5447
5448 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5449 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5450 (aarch64_relocate_instruction): Likewise.
5451 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5452 (struct aarch64_insn_visitor): Likewise.
5453
5454 2015-10-12 Yao Qi <yao.qi@linaro.org>
5455
5456 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5457 (struct aarch64_insn_visitor): New.
5458 (struct aarch64_insn_relocation_data): New.
5459 (aarch64_ftrace_insn_reloc_b): New function.
5460 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5461 (aarch64_ftrace_insn_reloc_cb): Likewise.
5462 (aarch64_ftrace_insn_reloc_tb): Likewise.
5463 (aarch64_ftrace_insn_reloc_adr): Likewise.
5464 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5465 (aarch64_ftrace_insn_reloc_others): Likewise.
5466 (visitor): New.
5467 (aarch64_relocate_instruction): Use visitor.
5468
5469 2015-10-12 Yao Qi <yao.qi@linaro.org>
5470
5471 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5472 int. Add argument buf.
5473 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5474 aarch64_relocate_instruction.
5475
5476 2015-10-12 Yao Qi <yao.qi@linaro.org>
5477
5478 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5479 argument insn. Remove local variable insn. Don't call
5480 target_read_uint32.
5481 (aarch64_install_fast_tracepoint_jump_pad): Call
5482 target_read_uint32.
5483
5484 2015-09-30 Yao Qi <yao.qi@linaro.org>
5485
5486 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5487 (emit_load_store_pair): Likewise.
5488
5489 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5490
5491 * dll.c (match_dll): Add cast(s).
5492 (unloaded_dll): Likewise.
5493 * linux-low.c (second_thread_of_pid_p): Likewise.
5494 (delete_lwp_callback): Likewise.
5495 (count_events_callback): Likewise.
5496 (select_event_lwp_callback): Likewise.
5497 (linux_set_resume_request): Likewise.
5498 * server.c (accumulate_file_name_length): Likewise.
5499 (emit_dll_description): Likewise.
5500 (handle_qxfer_threads_worker): Likewise.
5501 (visit_actioned_threads): Likewise.
5502 * thread-db.c (any_thread_of): Likewise.
5503 * tracepoint.c (same_process_p): Likewise.
5504 (match_blocktype): Likewise.
5505 (build_traceframe_info_xml): Likewise.
5506
5507 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5510 assignment.
5511 (gdb_unparse_agent_expr): Likewise.
5512 * hostio.c (require_data): Likewise.
5513 (handle_pread): Likewise.
5514 * linux-low.c (disable_regset): Likewise.
5515 (fetch_register): Likewise.
5516 (store_register): Likewise.
5517 (get_dynamic): Likewise.
5518 (linux_qxfer_libraries_svr4): Likewise.
5519 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5520 (set_fast_tracepoint_jump): Likewise.
5521 (uninsert_fast_tracepoint_jumps_at): Likewise.
5522 (reinsert_fast_tracepoint_jumps_at): Likewise.
5523 (validate_inserted_breakpoint): Likewise.
5524 (clone_agent_expr): Likewise.
5525 * regcache.c (init_register_cache): Likewise.
5526 * remote-utils.c (putpkt_binary_1): Likewise.
5527 (decode_M_packet): Likewise.
5528 (decode_X_packet): Likewise.
5529 (look_up_one_symbol): Likewise.
5530 (relocate_instruction): Likewise.
5531 (monitor_output): Likewise.
5532 * server.c (handle_search_memory): Likewise.
5533 (handle_qxfer_exec_file): Likewise.
5534 (handle_qxfer_libraries): Likewise.
5535 (handle_qxfer): Likewise.
5536 (handle_query): Likewise.
5537 (handle_v_cont): Likewise.
5538 (handle_v_run): Likewise.
5539 (captured_main): Likewise.
5540 * target.c (write_inferior_memory): Likewise.
5541 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5542 * tracepoint.c (init_trace_buffer): Likewise.
5543 (add_tracepoint_action): Likewise.
5544 (add_traceframe): Likewise.
5545 (add_traceframe_block): Likewise.
5546 (cmd_qtdpsrc): Likewise.
5547 (cmd_qtdv): Likewise.
5548 (cmd_qtstatus): Likewise.
5549 (response_source): Likewise.
5550 (response_tsv): Likewise.
5551 (cmd_qtnotes): Likewise.
5552 (gdb_collect): Likewise.
5553 (initialize_tracepoint): Likewise.
5554
5555 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5556
5557 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5558 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5559 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5560 <NOP>: New.
5561 (enum aarch64_condition_codes): New enum.
5562 (w0): New static global.
5563 (fp): Likewise.
5564 (lr): Likewise.
5565 (struct aarch64_memory_operand) <type>: New
5566 MEMORY_OPERAND_POSTINDEX type.
5567 (postindex_memory_operand): New helper function.
5568 (emit_ret): New function.
5569 (emit_load_store_pair): New function, factored out of emit_stp
5570 with support for MEMORY_OPERAND_POSTINDEX.
5571 (emit_stp): Rewrite using emit_load_store_pair.
5572 (emit_ldp): New function.
5573 (emit_load_store): Likewise.
5574 (emit_ldr): Mention post-index instruction in comment.
5575 (emit_ldrh): New function.
5576 (emit_ldrb): New function.
5577 (emit_ldrsw): Mention post-index instruction in comment.
5578 (emit_str): Likewise.
5579 (emit_subs): New function.
5580 (emit_cmp): Likewise.
5581 (emit_and): Likewise.
5582 (emit_orr): Likewise.
5583 (emit_orn): Likewise.
5584 (emit_eor): Likewise.
5585 (emit_mvn): Likewise.
5586 (emit_lslv): Likewise.
5587 (emit_lsrv): Likewise.
5588 (emit_asrv): Likewise.
5589 (emit_mul): Likewise.
5590 (emit_sbfm): Likewise.
5591 (emit_sbfx): Likewise.
5592 (emit_ubfm): Likewise.
5593 (emit_ubfx): Likewise.
5594 (emit_csinc): Likewise.
5595 (emit_cset): Likewise.
5596 (emit_nop): Likewise.
5597 (emit_ops_insns): New helper function.
5598 (emit_pop): Likewise.
5599 (emit_push): Likewise.
5600 (aarch64_emit_prologue): New function.
5601 (aarch64_emit_epilogue): Likewise.
5602 (aarch64_emit_add): Likewise.
5603 (aarch64_emit_sub): Likewise.
5604 (aarch64_emit_mul): Likewise.
5605 (aarch64_emit_lsh): Likewise.
5606 (aarch64_emit_rsh_signed): Likewise.
5607 (aarch64_emit_rsh_unsigned): Likewise.
5608 (aarch64_emit_ext): Likewise.
5609 (aarch64_emit_log_not): Likewise.
5610 (aarch64_emit_bit_and): Likewise.
5611 (aarch64_emit_bit_or): Likewise.
5612 (aarch64_emit_bit_xor): Likewise.
5613 (aarch64_emit_bit_not): Likewise.
5614 (aarch64_emit_equal): Likewise.
5615 (aarch64_emit_less_signed): Likewise.
5616 (aarch64_emit_less_unsigned): Likewise.
5617 (aarch64_emit_ref): Likewise.
5618 (aarch64_emit_if_goto): Likewise.
5619 (aarch64_emit_goto): Likewise.
5620 (aarch64_write_goto_address): Likewise.
5621 (aarch64_emit_const): Likewise.
5622 (aarch64_emit_call): Likewise.
5623 (aarch64_emit_reg): Likewise.
5624 (aarch64_emit_pop): Likewise.
5625 (aarch64_emit_stack_flush): Likewise.
5626 (aarch64_emit_zero_ext): Likewise.
5627 (aarch64_emit_swap): Likewise.
5628 (aarch64_emit_stack_adjust): Likewise.
5629 (aarch64_emit_int_call_1): Likewise.
5630 (aarch64_emit_void_call_2): Likewise.
5631 (aarch64_emit_eq_goto): Likewise.
5632 (aarch64_emit_ne_goto): Likewise.
5633 (aarch64_emit_lt_goto): Likewise.
5634 (aarch64_emit_le_goto): Likewise.
5635 (aarch64_emit_gt_goto): Likewise.
5636 (aarch64_emit_ge_got): Likewise.
5637 (aarch64_emit_ops_impl): New static global variable.
5638 (aarch64_emit_ops): New target function, return
5639 &aarch64_emit_ops_impl.
5640 (struct linux_target_ops): Install it.
5641
5642 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5643
5644 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5645 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5646 aarch64-ipa.o.
5647 * linux-aarch64-ipa.c: New file.
5648 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5649 and endian.h.
5650 (aarch64_get_thread_area): New target method.
5651 (extract_signed_bitfield): New helper function.
5652 (aarch64_decode_ldr_literal): New function.
5653 (enum aarch64_opcodes): New enum.
5654 (struct aarch64_register): New struct.
5655 (struct aarch64_operand): New struct.
5656 (x0): New static global.
5657 (x1): Likewise.
5658 (x2): Likewise.
5659 (x3): Likewise.
5660 (x4): Likewise.
5661 (w2): Likewise.
5662 (ip0): Likewise.
5663 (sp): Likewise.
5664 (xzr): Likewise.
5665 (aarch64_register): New helper function.
5666 (register_operand): Likewise.
5667 (immediate_operand): Likewise.
5668 (struct aarch64_memory_operand): New struct.
5669 (offset_memory_operand): New helper function.
5670 (preindex_memory_operand): Likewise.
5671 (enum aarch64_system_control_registers): New enum.
5672 (ENCODE): New macro.
5673 (emit_insn): New helper function.
5674 (emit_b): New function.
5675 (emit_bcond): Likewise.
5676 (emit_cb): Likewise.
5677 (emit_tb): Likewise.
5678 (emit_blr): Likewise.
5679 (emit_stp): Likewise.
5680 (emit_ldp_q_offset): Likewise.
5681 (emit_stp_q_offset): Likewise.
5682 (emit_load_store): Likewise.
5683 (emit_ldr): Likewise.
5684 (emit_ldrsw): Likewise.
5685 (emit_str): Likewise.
5686 (emit_ldaxr): Likewise.
5687 (emit_stxr): Likewise.
5688 (emit_stlr): Likewise.
5689 (emit_data_processing_reg): Likewise.
5690 (emit_data_processing): Likewise.
5691 (emit_add): Likewise.
5692 (emit_sub): Likewise.
5693 (emit_mov): Likewise.
5694 (emit_movk): Likewise.
5695 (emit_mov_addr): Likewise.
5696 (emit_mrs): Likewise.
5697 (emit_msr): Likewise.
5698 (emit_sevl): Likewise.
5699 (emit_wfe): Likewise.
5700 (append_insns): Likewise.
5701 (can_encode_int32_in): New helper function.
5702 (aarch64_relocate_instruction): New function.
5703 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5704 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5705 (struct linux_target_ops): Install aarch64_get_thread_area,
5706 aarch64_install_fast_tracepoint_jump_pad and
5707 aarch64_get_min_fast_tracepoint_insn_len.
5708
5709 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5710
5711 * Makefile.in (aarch64-insn.o): New rule.
5712 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5713
5714 2015-09-21 Yao Qi <yao.qi@linaro.org>
5715
5716 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5717
5718 2015-09-21 Yao Qi <yao.qi@linaro.org>
5719
5720 * tracepoint.c (max_jump_pad_size): Remove.
5721
5722 2015-09-18 Yao Qi <yao.qi@linaro.org>
5723
5724 * linux-aarch64-low.c: Don't include sys/uio.h.
5725 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5726
5727 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5728
5729 * tracepoint.c (eval_result_type): Change prototype.
5730 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5731
5732 2015-09-15 Pedro Alves <palves@redhat.com>
5733
5734 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5735 Check whether to report exec events instead of checking whether
5736 multiprocess is enabled.
5737
5738 2015-09-15 Pedro Alves <palves@redhat.com>
5739
5740 PR remote/18965
5741 * remote-utils.c (prepare_resume_reply): Merge
5742 TARGET_WAITKIND_VFORK_DONE switch case with the
5743 TARGET_WAITKIND_FORKED case.
5744
5745 2015-09-15 Yao Qi <yao.qi@linaro.org>
5746
5747 * server.c (handle_query): Check string comparison using
5748 "else if" instead of "if".
5749
5750 2015-09-15 Yao Qi <yao.qi@linaro.org>
5751
5752 * server.c (vCont_supported): New global variable.
5753 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5754 matches. Append ";vContSupported+" to own_buf.
5755 (handle_v_requests): Append ";s;S" to own_buf if target supports
5756 hardware single step or vCont_supported is false.
5757 (capture_main): Set vCont_supported to zero.
5758
5759 2015-09-15 Yao Qi <yao.qi@linaro.org>
5760
5761 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5762 it to ...
5763 (linux_supports_hardware_single_step): ... New function.
5764 (linux_target_ops): Update.
5765 * lynx-low.c (lynx_target_ops): Set field
5766 supports_hardware_single_step to target_can_do_hardware_single_step.
5767 * nto-low.c (nto_target_ops): Likewise.
5768 * spu-low.c (spu_target_ops): Likewise.
5769 * win32-low.c (win32_target_ops): Likewise.
5770 * target.c (target_can_do_hardware_single_step): New function.
5771 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5772 Remove. <supports_hardware_single_step>: New field.
5773 (target_supports_conditional_breakpoints): Remove.
5774 (target_supports_hardware_single_step): New macro.
5775 (target_can_do_hardware_single_step): Declare.
5776 * server.c (handle_query): Use target_supports_hardware_single_step
5777 instead of target_supports_conditional_breakpoints.
5778
5779 2015-09-15 Yao Qi <yao.qi@linaro.org>
5780
5781 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5782 function.
5783 (struct linux_target_ops the_low_target): Install
5784 aarch64_linux_siginfo_fixup.
5785
5786 2015-09-11 Don Breazeal <donb@codesourcery.com>
5787 Luis Machado <lgustavo@codesourcery.com>
5788
5789 * linux-low.c (linux_mourn): Static declaration.
5790 (linux_arch_setup): Move in front of
5791 handle_extended_wait.
5792 (linux_arch_setup_thread): New function.
5793 (handle_extended_wait): Handle exec events. Call
5794 linux_arch_setup_thread. Make event_lwp argument a
5795 pointer-to-a-pointer.
5796 (check_zombie_leaders): Do not check stopped threads.
5797 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5798 (linux_low_filter_event): Add lwp and thread for exec'ing
5799 non-leader thread if leader thread has been deleted.
5800 Refactor code into linux_arch_setup_thread and call it.
5801 Pass child lwp pointer by reference to handle_extended_wait.
5802 (linux_wait_for_event_filtered): Update comment.
5803 (linux_wait_1): Prevent clobbering exec event status.
5804 (linux_supports_exec_events): New function.
5805 (linux_target_ops) <supports_exec_events>: Initialize new member.
5806 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5807 new member.
5808 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5809 * server.c (report_exec_events): New global variable.
5810 (handle_query): Handle qSupported query for exec-events feature.
5811 (captured_main): Initialize report_exec_events.
5812 * server.h (report_exec_events): Declare new global variable.
5813 * target.h (struct target_ops) <supports_exec_events>: New
5814 member.
5815 (target_supports_exec_events): New macro.
5816 * win32-low.c (win32_target_ops) <supports_exec_events>:
5817 Initialize new member.
5818
5819 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5820
5821 * linux-low.c (linux_low_enable_btrace): Remove.
5822 (linux_target_ops): Replace linux_low_enable_btrace with
5823 linux_enable_btrace.
5824
5825 2015-09-03 Yao Qi <yao.qi@linaro.org>
5826
5827 * linux-aarch64-low.c (aarch64_insert_point): Call
5828 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5829 returns true.
5830
5831 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5832
5833 * linux-low.c (check_stopped_by_breakpoint): Use
5834 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5835
5836 2015-08-27 Pedro Alves <palves@redhat.com>
5837
5838 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5839
5840 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5841
5842 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5843 the XNEW-family equivalent.
5844 (compile_bytecodes): Likewise.
5845 * dll.c (loaded_dll): Likewise.
5846 * event-loop.c (append_callback_event): Likewise.
5847 (create_file_handler): Likewise.
5848 (create_file_event): Likewise.
5849 * hostio.c (handle_open): Likewise.
5850 * inferiors.c (add_thread): Likewise.
5851 (add_process): Likewise.
5852 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5853 * linux-arm-low.c (arm_new_process): Likewise.
5854 (arm_new_thread): Likewise.
5855 * linux-low.c (add_to_pid_list): Likewise.
5856 (linux_add_process): Likewise.
5857 (handle_extended_wait): Likewise.
5858 (add_lwp): Likewise.
5859 (enqueue_one_deferred_signal): Likewise.
5860 (enqueue_pending_signal): Likewise.
5861 (linux_resume_one_lwp_throw): Likewise.
5862 (linux_resume_one_thread): Likewise.
5863 (linux_read_memory): Likewise.
5864 (linux_write_memory): Likewise.
5865 * linux-mips-low.c (mips_linux_new_process): Likewise.
5866 (mips_linux_new_thread): Likewise.
5867 (mips_add_watchpoint): Likewise.
5868 * linux-x86-low.c (initialize_low_arch): Likewise.
5869 * lynx-low.c (lynx_add_process): Likewise.
5870 * mem-break.c (set_raw_breakpoint_at): Likewise.
5871 (set_breakpoint): Likewise.
5872 (add_condition_to_breakpoint): Likewise.
5873 (add_commands_to_breakpoint): Likewise.
5874 (clone_agent_expr): Likewise.
5875 (clone_one_breakpoint): Likewise.
5876 * regcache.c (new_register_cache): Likewise.
5877 * remote-utils.c (look_up_one_symbol): Likewise.
5878 * server.c (queue_stop_reply): Likewise.
5879 (start_inferior): Likewise.
5880 (queue_stop_reply_callback): Likewise.
5881 (handle_target_event): Likewise.
5882 * spu-low.c (fetch_ppc_memory): Likewise.
5883 (store_ppc_memory): Likewise.
5884 * target.c (set_target_ops): Likewise.
5885 * thread-db.c (thread_db_load_search): Likewise.
5886 (try_thread_db_load_1): Likewise.
5887 * tracepoint.c (add_tracepoint): Likewise.
5888 (add_tracepoint_action): Likewise.
5889 (create_trace_state_variable): Likewise.
5890 (cmd_qtdpsrc): Likewise.
5891 (cmd_qtro): Likewise.
5892 (add_while_stepping_state): Likewise.
5893 * win32-low.c (child_add_thread): Likewise.
5894 (get_image_name): Likewise.
5895
5896 2015-08-25 Yao Qi <yao.qi@linaro.org>
5897
5898 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5899
5900 2015-08-25 Yao Qi <yao.qi@linaro.org>
5901
5902 * Makefile.in (aarch64-linux.o): New rule.
5903 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5904 srv_tgtobj.
5905 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5906 (aarch64_init_debug_reg_state): Make it extern.
5907 (aarch64_linux_prepare_to_resume): Remove.
5908
5909 2015-08-25 Yao Qi <yao.qi@linaro.org>
5910
5911 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5912 lwp_arch_private_info and ptid_of_lwp.
5913
5914 2015-08-25 Yao Qi <yao.qi@linaro.org>
5915
5916 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5917 Find proc_info by find_process_pid. All callers updated.
5918
5919 2015-08-25 Yao Qi <yao.qi@linaro.org>
5920
5921 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5922 Remove.
5923 (debug_reg_change_callback): Remove.
5924 (aarch64_notify_debug_reg_change): Remove.
5925
5926 2015-08-25 Yao Qi <yao.qi@linaro.org>
5927
5928 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5929 Call current_lwp_ptid.
5930
5931 2015-08-25 Yao Qi <yao.qi@linaro.org>
5932
5933 * linux-aarch64-low.c (debug_reg_change_callback): Use
5934 debug_printf.
5935
5936 2015-08-25 Yao Qi <yao.qi@linaro.org>
5937
5938 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5939
5940 2015-08-25 Yao Qi <yao.qi@linaro.org>
5941
5942 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5943
5944 2015-08-25 Yao Qi <yao.qi@linaro.org>
5945
5946 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5947 the code.
5948
5949 2015-08-25 Yao Qi <yao.qi@linaro.org>
5950
5951 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5952 Remove.
5953 (debug_reg_change_callback): Remove argument entry and add argument
5954 lwp. Remove local variable thread. Don't print thread id in the
5955 debugging output. Don't check whether pid of thread equals to pid.
5956 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5957 iterate_over_lwps instead find_inferior.
5958
5959 2015-08-24 Pedro Alves <palves@redhat.com>
5960
5961 * inferiors.c (get_first_process): New function.
5962 * inferiors.h (get_first_process): New declaration.
5963 * remote-utils.c (read_ptid): Default to the first process in the
5964 list, instead of to the current thread's process.
5965
5966 2015-08-24 Pedro Alves <palves@redhat.com>
5967
5968 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5969 * event-loop.c: Likewise.
5970 * remote-utils.c: Likewise.
5971 * tracepoint.c: Likewise.
5972
5973 2015-08-24 Pedro Alves <palves@redhat.com>
5974
5975 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5976 ptid_get_lwp.
5977
5978 2015-08-21 Pedro Alves <palves@redhat.com>
5979
5980 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5981 instead of literal 1.
5982
5983 2015-08-21 Pedro Alves <palves@redhat.com>
5984
5985 * tdesc.c (default_description): Explicitly zero-initialize.
5986
5987 2015-08-21 Pedro Alves <palves@redhat.com>
5988
5989 PR gdb/18749
5990 * inferiors.c (remove_thread): Discard any pending stop reply for
5991 this thread.
5992 * server.c (remove_all_on_match_pid): Rename to ...
5993 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5994 instead of a pid.
5995 (discard_queued_stop_replies): Change parameter to a ptid. Now
5996 extern.
5997 (handle_v_kill, kill_inferior_callback, captured_main)
5998 (process_serial_event): Adjust.
5999 * server.h (discard_queued_stop_replies): Declare.
6000
6001 2015-08-21 Pedro Alves <palves@redhat.com>
6002
6003 * linux-low.c (wait_for_sigstop): Always switch to no thread
6004 selected if the previously current thread dies.
6005 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6006 process instead of the current thread's.
6007 * remote-utils.c (input_interrupt): Don't check if there's no
6008 current thread.
6009 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6010 current thread to the general thread fails, error out.
6011 (handle_qxfer_auxv, handle_qxfer_libraries)
6012 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6013 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6014 (handle_query): Check if there's a thread selected instead of
6015 checking whether there's any thread in the thread list.
6016 (handle_qxfer_threads, handle_qxfer_btrace)
6017 (handle_qxfer_btrace_conf): Don't error out early if there's no
6018 thread in the thread list.
6019 (handle_v_cont, myresume): Don't set the current thread to the
6020 continue thread.
6021 (process_serial_event) <Hg handling>: Also set thread_id if the
6022 previous general thread is still alive.
6023 (process_serial_event) <g/G handling>: If setting the current
6024 thread to the general thread fails, error out.
6025 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6026 thread's lwp instead of the current thread's.
6027 * target.c (set_desired_thread): If the desired thread was not
6028 found, leave the current thread pointing to NULL. Return an int
6029 (boolean) indicating success.
6030 * target.h (set_desired_thread): Change return type to int.
6031
6032 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6033
6034 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6035 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6036 #includes.
6037 (ps_get_thread_area): New function.
6038
6039 2015-08-19 Gary Benson <gbenson@redhat.com>
6040
6041 * hostio.c (handle_pread): Do not attempt to read more data
6042 than hostio_reply_with_data can fit in a packet.
6043
6044 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6045
6046 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6047
6048 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6049
6050 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6051
6052 2015-08-06 Pedro Alves <palves@redhat.com>
6053
6054 * tracepoint.c (expr_eval_result): Now an int.
6055
6056 2015-08-06 Pedro Alves <palves@redhat.com>
6057
6058 * gdbthread.h (struct regcache): Forward declare.
6059 (struct thread_info) <regcache_data>: Now a struct regcache
6060 pointer.
6061 * inferiors.c (inferior_regcache_data)
6062 (set_inferior_regcache_data): Now work with struct regcache
6063 pointers.
6064 * inferiors.h (struct regcache): Forward declare.
6065 (inferior_regcache_data, set_inferior_regcache_data): Now work
6066 with struct regcache pointers.
6067 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6068 (free_register_cache_thread): Remove struct regcache pointer
6069 casts.
6070
6071 2015-08-06 Pedro Alves <palves@redhat.com>
6072
6073 * server.c (captured_main): On error, print the exception message
6074 to stderr, and if run_once is set, throw a quit.
6075
6076 2015-08-06 Pedro Alves <palves@redhat.com>
6077
6078 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6079 the current thread.
6080
6081 2015-08-06 Pedro Alves <palves@redhat.com>
6082
6083 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6084 reading beyond the passed in buffer length.
6085
6086 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6087
6088 * tracepoint.c (symbol_list) <required>: Remove.
6089
6090 2015-08-06 Pedro Alves <palves@redhat.com>
6091
6092 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6093 count if stopping and suspending threads.
6094 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6095 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6096 (linux_detach): Complete an ongoing step-over.
6097 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6098 throughout.
6099 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6100 (linux_wait_1): If passing a signal to the inferior after
6101 finishing a step-over, unsuspend and re-resume all lwps. If we
6102 see a single-step event but the thread should be continuing, don't
6103 pass the trap to gdb.
6104 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6105 internal_error instead of gdb_assert.
6106 (enqueue_pending_signal): New function.
6107 (check_ptrace_stopped_lwp_gone): Add debug output.
6108 (start_step_over): Use internal_error instead of gdb_assert.
6109 (complete_ongoing_step_over): New function.
6110 (linux_resume_one_thread): Don't resume a suspended thread.
6111 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6112 it stepping.
6113
6114 2015-08-06 Pedro Alves <palves@redhat.com>
6115
6116 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6117 (linux_thread_alive): Use lwp_is_marked_dead.
6118 (extended_event_reported): Delete.
6119 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6120 instead of extended_event_reported.
6121 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6122 as well.
6123 (lwp_is_marked_dead): New function.
6124 (lwp_running): Use lwp_is_marked_dead.
6125 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6126 comment.
6127
6128 2015-08-06 Pedro Alves <palves@redhat.com>
6129
6130 * linux-low.c (linux_wait_1): Move fork event output out of the
6131 !report_to_gdb check. Pass event_child->waitstatus to
6132 target_waitstatus_to_string instead of ourstatus.
6133
6134 2015-08-04 Yao Qi <yao.qi@linaro.org>
6135
6136 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6137 if current_thread is 32 bit.
6138
6139 2015-08-04 Yao Qi <yao.qi@linaro.org>
6140
6141 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6142 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6143 * server.c (extended_protocol): Remove "static".
6144 * server.h (extended_protocol): Declare it.
6145
6146 2015-08-04 Yao Qi <yao.qi@linaro.org>
6147
6148 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6149 both aarch64 and aarch32.
6150 (aarch64_set_pc): Likewise.
6151
6152 2015-08-04 Yao Qi <yao.qi@linaro.org>
6153
6154 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6155 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6156 arm-with-neon.xml to srv_xmlfiles.
6157 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6158 (is_64bit_tdesc): New function.
6159 (aarch64_linux_read_description): New function.
6160 (aarch64_arch_setup): Call aarch64_linux_read_description.
6161 (regs_info): Rename to regs_info_aarch64.
6162 (aarch64_regs_info): Return right regs_info.
6163 (initialize_low_arch): Call initialize_low_arch_aarch32.
6164
6165 2015-08-04 Yao Qi <yao.qi@linaro.org>
6166
6167 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6168 * linux-aarch32-low.c: New file.
6169 * linux-aarch32-low.h: New file.
6170 * linux-arm-low.c (arm_fill_gregset): Move it to
6171 linux-aarch32-low.c.
6172 (arm_store_gregset): Likewise.
6173 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6174 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6175 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6176 (regs_info): Rename to regs_info_arm.
6177 (arm_regs_info): Return regs_info_aarch32 if
6178 have_ptrace_getregset is 1 and target description is
6179 arm_with_neon or arm_with_vfpv3.
6180 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6181 Call initialize_low_arch_aarch32 instead.
6182
6183 2015-08-04 Yao Qi <yao.qi@linaro.org>
6184
6185 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6186 * linux-low.c: ... here.
6187 * linux-low.h (have_ptrace_getregset): Declare it.
6188
6189 2015-08-04 Pedro Alves <palves@redhat.com>
6190
6191 * thread-db.c (struct thread_db): Use new typedefs.
6192 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6193 CHK calls.
6194 (disable_thread_event_reporting): Cast result of dlsym to
6195 destination function pointer type.
6196 (thread_db_mourn): Use td_ta_delete_ftype.
6197
6198 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6199
6200 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6201 arch variant.
6202 (CDX_BREAKPOINT): Define for R2.
6203 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6204 (the_low_target): Add comments.
6205
6206 2015-07-30 Yao Qi <yao.qi@linaro.org>
6207
6208 * linux-arm-low.c (arm_hwcap): Remove it.
6209 (arm_read_description): New local variable arm_hwcap. Don't
6210 set arm_hwcap to zero.
6211
6212 2015-07-30 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6215 Use regcache->tdesc instead.
6216 (arm_store_wmmxregset): Likewise.
6217 (arm_fill_vfpregset): Likewise.
6218 (arm_store_vfpregset): Likewise.
6219
6220 2015-07-30 Yao Qi <yao.qi@linaro.org>
6221
6222 * linux-arm-low.c: Include arch/arm.h.
6223 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6224 (arm_store_gregset): Likewise.
6225
6226 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6227
6228 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6229 ptrace's 4th parameter.
6230
6231 2015-07-27 Yao Qi <yao.qi@linaro.org>
6232
6233 * configure.srv (case aarch64*-*-linux*): Don't set
6234 srv_linux_usrregs.
6235
6236 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6237
6238 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6239 sys/ptrace.h.
6240 * linux-arm-low.c: Likewise.
6241 * linux-cris-low.c: Likewise.
6242 * linux-crisv32-low.c: Likewise.
6243 * linux-low.c: Likewise.
6244 * linux-m68k-low.c: Likewise.
6245 * linux-mips-low.c: Likewise.
6246 * linux-nios2-low.c: Likewise.
6247 * linux-s390-low.c: Likewise.
6248 * linux-sparc-low.c: Likewise.
6249 * linux-tic6x-low.c: Likewise.
6250 * linux-tile-low.c: Likewise.
6251 * linux-x86-low.c: Likewise.
6252
6253 2015-07-24 Pedro Alves <palves@redhat.com>
6254
6255 * config.in: Regenerate.
6256 * configure: Regenerate.
6257
6258 2015-07-24 Pedro Alves <palves@redhat.com>
6259
6260 * acinclude.m4: Include ../ptrace.m4.
6261 * configure.ac: Call GDB_AC_PTRACE.
6262 * config.in, configure: Regenerate.
6263
6264 2015-07-24 Yao Qi <yao.qi@linaro.org>
6265
6266 * linux-low.c (linux_create_inferior): Remove setting to
6267 proc->priv->new_inferior.
6268 (linux_attach): Likewise.
6269 (linux_low_filter_event): Likewise.
6270 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6271
6272 2015-07-24 Yao Qi <yao.qi@linaro.org>
6273
6274 * linux-low.c (linux_arch_setup): New function.
6275 (linux_low_filter_event): If proc->tdesc is NULL and
6276 proc->attached is true, call the_low_target.arch_setup.
6277 Otherwise, keep status pending, and return.
6278 (linux_resume_one_lwp_throw): Don't call get_pc if
6279 thread->while_stepping isn't NULL. Don't call
6280 get_thread_regcache if proc->tdesc is NULL.
6281 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6282 (linux_target_ops): Install arch_setup.
6283 * server.c (start_inferior): Call the_target->arch_setup.
6284 * target.h (struct target_ops) <arch_setup>: New field.
6285 (target_arch_setup): New marco.
6286 * lynx-low.c (lynx_target_ops): Update.
6287 * nto-low.c (nto_target_ops): Update.
6288 * spu-low.c (spu_target_ops): Update.
6289 * win32-low.c (win32_target_ops): Update.
6290
6291 2015-07-24 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-low.c (linux_add_process): Don't set
6294 proc->priv->new_inferior.
6295 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6296 (linux_attach): Likewise.
6297
6298 2015-07-24 Yao Qi <yao.qi@linaro.org>
6299
6300 * server.c (start_inferior): Code refactor.
6301
6302 2015-07-24 Yao Qi <yao.qi@linaro.org>
6303
6304 * server.c (process_serial_event): Set general_thread.
6305
6306 2015-07-21 Yao Qi <yao.qi@linaro.org>
6307
6308 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6309 aarch64_linux_get_debug_reg_capacity.
6310
6311 2015-07-17 Yao Qi <yao.qi@linaro.org>
6312
6313 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6314 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6315 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6316 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6317 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6318 (AARCH64_HWP_ALIGNMENT): Likewise.
6319 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6320 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6321 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6322 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6323 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6324 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6325 (struct aarch64_debug_reg_state): Likewise.
6326 (struct arch_lwp_info): Likewise.
6327 (aarch64_align_watchpoint): Likewise.
6328 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6329 (aarch64_watchpoint_length): Likewise.
6330 (aarch64_point_encode_ctrl_reg): Likewise
6331 (aarch64_point_is_aligned): Likewise.
6332 (aarch64_align_watchpoint): Likewise.
6333 (aarch64_linux_set_debug_regs):
6334 (aarch64_dr_state_insert_one_point): Likewise.
6335 (aarch64_dr_state_remove_one_point): Likewise.
6336 (aarch64_handle_breakpoint): Likewise.
6337 (aarch64_handle_aligned_watchpoint): Likewise.
6338 (aarch64_handle_unaligned_watchpoint): Likewise.
6339 (aarch64_handle_watchpoint): Likewise.
6340
6341 2015-07-17 Yao Qi <yao.qi@linaro.org>
6342
6343 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6344 and don't aarch64_get_debug_reg_state. All callers update.
6345 (aarch64_handle_aligned_watchpoint): Likewise.
6346 (aarch64_handle_unaligned_watchpoint): Likewise.
6347 (aarch64_handle_watchpoint): Likewise.
6348 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6349 (aarch64_remove_point): Likewise.
6350
6351 2015-07-17 Yao Qi <yao.qi@linaro.org>
6352
6353 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6354 debug_printf.
6355 (aarch64_handle_unaligned_watchpoint): Likewise.
6356
6357 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6358
6359 Revert the previous 3 commits:
6360 Move gdb_regex* to common/
6361 Move linux_find_memory_regions_full & co.
6362 gdbserver build-id attribute generator
6363
6364 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6365 Jan Kratochvil <jan.kratochvil@redhat.com>
6366
6367 gdbserver build-id attribute generator.
6368 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6369 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6370 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6371 (find_phdr): New.
6372 (get_dynamic): Use find_pdhr to traverse program headers.
6373 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6374 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6375 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6376 (get_hex_build_id): New.
6377 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6378 to reply XML document.
6379
6380 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6381 Jan Kratochvil <jan.kratochvil@redhat.com>
6382
6383 * target.c: Include target/target-utils.h and fcntl.h.
6384 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6385 (target_fileio_read_stralloc): New functions.
6386
6387 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6388
6389 * Makefile.in (OBS): Add gdb_regex.o.
6390 (gdb_regex.o): New.
6391 * config.in: Rebuilt.
6392 * configure: Rebuilt.
6393
6394 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6395 Jan Kratochvil <jan.kratochvil@redhat.com>
6396
6397 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6398 * Makefile.in (OBS): Add target-utils.o.
6399 (linux-maps.o, target-utils.o): New.
6400 * configure.srv (srv_linux_obj): Add linux-maps.o.
6401
6402 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6403
6404 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6405 function, return 1.
6406 (the_low_target): Install it.
6407
6408 2015-07-14 Pedro Alves <palves@redhat.com>
6409
6410 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6411 Instead, ignore ECHILD, and throw an error for other errnos.
6412
6413 2015-07-10 Pedro Alves <palves@redhat.com>
6414
6415 * event-loop.c (struct callback_event) <data>: Change type to
6416 gdb_client_data instance instead of gdb_client_data pointer.
6417 (append_callback_event): Adjust.
6418
6419 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6420
6421 * linux-aarch64-low.c: Add comments for each linux_target_ops
6422 method. Remove comments already covered in target_ops and
6423 linux_target_ops definitions.
6424 (the_low_target): Add comments for each unimplemented method.
6425
6426 2015-07-09 Yao Qi <yao.qi@linaro.org>
6427
6428 * linux-aarch64-low.c (aarch64_regmap): Remove.
6429 (aarch64_usrregs_info): Remove.
6430 (regs_info): Set field usrregs to NULL.
6431
6432 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6433
6434 * linux-low.c: Include "rsp-low.h"
6435 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6436 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6437 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6438 (handle_btrace_enable_pt): New.
6439 (handle_btrace_general_set): Support "pt".
6440 (handle_btrace_conf_general_set): Support "pt:size".
6441
6442 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6443
6444 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6445 Z_PACKET_SW_BP.
6446
6447 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6448
6449 * linux-aarch64-low.c: Remove comment about endianness.
6450 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6451 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6452 memcmp.
6453
6454 2015-06-24 Gary Benson <gbenson@redhat.com>
6455
6456 * linux-i386-ipa.c (stdint.h): Do not include.
6457 * lynx-i386-low.c (stdint.h): Likewise.
6458 * lynx-ppc-low.c (stdint.h): Likewise.
6459 * mem-break.c (stdint.h): Likewise.
6460 * thread-db.c (stdint.h): Likewise.
6461 * tracepoint.c (stdint.h): Likewise.
6462 * win32-low.c (stdint.h): Likewise.
6463
6464 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6465
6466 * server.c (write_qxfer_response): Update call to
6467 remote_escape_output.
6468
6469 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6470 Jan Kratochvil <jan.kratochvil@redhat.com>
6471
6472 Merge multiple hex conversions.
6473 * gdbreplay.c (tohex): Rename to 'fromhex'.
6474 (logchar): Use fromhex.
6475
6476 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6477
6478 * server.c (handle_qxfer_libraries): Set `version' attribute for
6479 <library-list>.
6480
6481 2015-06-10 Gary Benson <gbenson@redhat.com>
6482
6483 * target.h (struct target_ops) <multifs_open>: New field.
6484 <multifs_unlink>: Likewise.
6485 <multifs_readlink>: Likewise.
6486 * linux-low.c (nat/linux-namespaces.h): New include.
6487 (linux_target_ops): Initialize the_target->multifs_open,
6488 the_target->multifs_unlink and the_target->multifs_readlink.
6489 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6490 * hostio.c (hostio_fs_pid): New static variable.
6491 (hostio_handle_new_gdb_connection): New function.
6492 (handle_setfs): Likewise.
6493 (handle_open): Use the_target->multifs_open as appropriate.
6494 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6495 (handle_readlink): Use the_target->multifs_readlink as
6496 appropriate.
6497 (handle_vFile): Handle vFile:setfs packets.
6498 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6499 after target_handle_new_gdb_connection.
6500
6501 2015-06-10 Gary Benson <gbenson@redhat.com>
6502
6503 * configure.ac (AC_CHECK_FUNCS): Add setns.
6504 * config.in: Regenerate.
6505 * configure: Likewise.
6506 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6507 (linux-namespaces.o): New rule.
6508 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6509
6510 2015-06-09 Gary Benson <gbenson@redhat.com>
6511
6512 * hostio.c (handle_open): Process mode argument with
6513 fileio_to_host_mode.
6514
6515 2015-06-01 Yao Qi <yao.qi@linaro.org>
6516
6517 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6518 * linux-x86-low.c: Likewise.
6519
6520 2015-05-28 Don Breazeal <donb@codesourcery.com>
6521
6522 * linux-low.c (handle_extended_wait): Initialize
6523 thread_info.last_resume_kind for new fork children.
6524
6525 2015-05-15 Pedro Alves <palves@redhat.com>
6526
6527 * target.h (target_handle_new_gdb_connection): Rewrite using if
6528 wrapped in do/while.
6529
6530 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6531
6532 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6533 * configure, config.in: Regenerate.
6534 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6535 Declare typedef.
6536
6537 2015-05-12 Don Breazeal <donb@codesourcery.com>
6538
6539 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6540 PTRACE_EVENT_VFORK_DONE.
6541 (linux_low_ptrace_options, extended_event_reported): Add vfork
6542 events.
6543 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6544 and "vforkdone" for RSP 'T' Stop Reply Packet.
6545 * server.h (report_vfork_events): Declare
6546 global variable.
6547
6548 2015-05-12 Don Breazeal <donb@codesourcery.com>
6549
6550 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6551 (the_low_target) <new_fork>: Initialize new member.
6552 * linux-arm-low.c (arm_new_fork): New function.
6553 (the_low_target) <new_fork>: Initialize new member.
6554 * linux-low.c (handle_extended_wait): Call new target function
6555 new_fork.
6556 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6557 * linux-mips-low.c (mips_add_watchpoint): New function
6558 extracted from mips_insert_point.
6559 (the_low_target) <new_fork>: Initialize new member.
6560 (mips_linux_new_fork): New function.
6561 (mips_insert_point): Call mips_add_watchpoint.
6562 * linux-x86-low.c (x86_linux_new_fork): New function.
6563 (the_low_target) <new_fork>: Initialize new member.
6564
6565 2015-05-12 Don Breazeal <donb@codesourcery.com>
6566
6567 * linux-low.c (handle_extended_wait): Implement return value,
6568 rename argument 'event_child' to 'event_lwp', handle
6569 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6570 (linux_low_ptrace_options): New function.
6571 (linux_low_filter_event): Call linux_low_ptrace_options,
6572 use different argument fo linux_enable_event_reporting,
6573 use return value from handle_extended_wait.
6574 (extended_event_reported): New function.
6575 (linux_wait_1): Call extended_event_reported and set
6576 status to report fork events.
6577 (linux_write_memory): Add pid to debug message.
6578 (reset_lwp_ptrace_options_callback): New function.
6579 (linux_handle_new_gdb_connection): New function.
6580 (linux_target_ops): Initialize new structure member.
6581 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6582 * lynx-low.c: Initialize new structure member.
6583 * remote-utils.c (prepare_resume_reply): Implement stop reason
6584 "fork" for "T" stop message.
6585 * server.c (handle_query): Call handle_new_gdb_connection.
6586 * server.h (report_fork_events): Declare global flag.
6587 * target.h (struct target_ops) <handle_new_gdb_connection>:
6588 New member.
6589 (target_handle_new_gdb_connection): New macro.
6590 * win32-low.c: Initialize new structure member.
6591
6592 2015-05-12 Don Breazeal <donb@codesourcery.com>
6593
6594 * mem-break.c (APPEND_TO_LIST): Define macro.
6595 (clone_agent_expr): New function.
6596 (clone_one_breakpoint): New function.
6597 (clone_all_breakpoints): New function.
6598 * mem-break.h: Declare new functions.
6599
6600 2015-05-12 Don Breazeal <donb@codesourcery.com>
6601
6602 * linux-low.c (linux_supports_fork_events): New function.
6603 (linux_supports_vfork_events): New function.
6604 (linux_target_ops): Initialize new structure members.
6605 (initialize_low): Call linux_check_ptrace_features.
6606 * lynx-low.c (lynx_target_ops): Initialize new structure
6607 members.
6608 * server.c (report_fork_events, report_vfork_events):
6609 New global flags.
6610 (handle_query): Add new features to qSupported packet and
6611 response.
6612 (captured_main): Initialize new global variables.
6613 * target.h (struct target_ops) <supports_fork_events>:
6614 New member.
6615 <supports_vfork_events>: New member.
6616 (target_supports_fork_events): New macro.
6617 (target_supports_vfork_events): New macro.
6618 * win32-low.c (win32_target_ops): Initialize new structure
6619 members.
6620
6621 2015-05-12 Gary Benson <gbenson@redhat.com>
6622
6623 * server.c (handle_qxfer_exec_file): Use current process
6624 if annex is empty.
6625
6626 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6627
6628 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6629 Remove HAVE_PTRACE_GETREGS conditionals.
6630 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6631 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6632
6633 2015-05-08 Yao Qi <yao.qi@linaro.org>
6634
6635 * linux-low.c (linux_supports_conditional_breakpoints): New
6636 function.
6637 (linux_target_ops): Install new target method.
6638 * lynx-low.c (lynx_target_ops): Install NULL hook for
6639 supports_conditional_breakpoints.
6640 * nto-low.c (nto_target_ops): Likewise.
6641 * spu-low.c (spu_target_ops): Likewise.
6642 * win32-low.c (win32_target_ops): Likewise.
6643 * server.c (handle_query): Check
6644 target_supports_conditional_breakpoints.
6645 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6646 New field.
6647 (target_supports_conditional_breakpoints): New macro.
6648
6649 2015-05-06 Pedro Alves <palves@redhat.com>
6650
6651 PR server/18081
6652 * server.c (start_inferior): If the process exits, mourn it.
6653
6654 2015-04-21 Gary Benson <gbenson@redhat.com>
6655
6656 * hostio.c (fileio_open_flags_to_host): Factored out to
6657 fileio_to_host_openflags in common/fileio.c. Single use
6658 updated.
6659
6660 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6661
6662 * linux-xtensa-low.c (xtensa_fill_gregset)
6663 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6664 XCHAL_HAVE_LOOP.
6665
6666 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6667
6668 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6669 (regs_info): Replace usrregs pointer with NULL.
6670
6671 2015-04-17 Gary Benson <gbenson@redhat.com>
6672
6673 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6674 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6675 * server.c (handle_qxfer_exec_file): New function.
6676 (qxfer_packets): Add exec-file entry.
6677 (handle_query): Report qXfer:exec-file:read as supported packet.
6678
6679 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6680
6681 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6682
6683 2015-04-09 Gary Benson <gbenson@redhat.com>
6684
6685 * hostio-errno.c (errno_to_fileio_error): Remove function.
6686 Update caller to use remote_fileio_to_fio_error.
6687
6688 2015-04-09 Yao Qi <yao.qi@linaro.org>
6689
6690 * linux-low.c (linux_insert_point): Call
6691 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6692 (linux_remove_point): Call remove_memory_breakpoint if type is
6693 raw_bkpt_type_sw.
6694 * linux-x86-low.c (x86_insert_point): Don't call
6695 insert_memory_breakpoint.
6696 (x86_remove_point): Don't call remove_memory_breakpoint.
6697
6698 2015-04-01 Pedro Alves <palves@redhat.com>
6699 Cleber Rosa <crosa@redhat.com>
6700
6701 * server.c (gdbserver_usage): Reorganize and extend the usage
6702 message.
6703
6704 2015-03-24 Pedro Alves <palves@redhat.com>
6705
6706 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6707 output. Also dump TRAP_TRACE.
6708 (linux_low_filter_event): In debug output, distinguish a
6709 resume_stop SIGSTOP from a delayed SIGSTOP.
6710
6711 2015-03-24 Gary Benson <gbenson@redhat.com>
6712
6713 * linux-x86-low.c (x86_linux_new_thread): Moved to
6714 nat/x86-linux.c.
6715 (x86_linux_prepare_to_resume): Likewise.
6716
6717 2015-03-24 Gary Benson <gbenson@redhat.com>
6718
6719 * Makefile.in (x86-linux-dregs.o): New rule.
6720 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6721 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6722 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6723 (x86_linux_dr_get): Likewise.
6724 (x86_linux_dr_set): Likewise.
6725 (update_debug_registers_callback): Likewise.
6726 (x86_linux_dr_set_addr): Likewise.
6727 (x86_linux_dr_get_addr): Likewise.
6728 (x86_linux_dr_set_control): Likewise.
6729 (x86_linux_dr_get_control): Likewise.
6730 (x86_linux_dr_get_status): Likewise.
6731 (x86_linux_update_debug_registers): Likewise.
6732
6733 2015-03-24 Gary Benson <gbenson@redhat.com>
6734
6735 * linux-x86-low.c (x86_linux_update_debug_registers):
6736 New function, factored out from...
6737 (x86_linux_prepare_to_resume): ...this.
6738
6739 2015-03-24 Gary Benson <gbenson@redhat.com>
6740
6741 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6742 (x86_linux_dr_set): Likewise.
6743 (update_debug_registers_callback): Likewise.
6744 (x86_linux_dr_set_addr): Likewise.
6745 (x86_linux_dr_get_addr): Likewise.
6746 (x86_linux_dr_set_control): Likewise.
6747 (x86_linux_dr_get_control): Likewise.
6748 (x86_linux_dr_get_status): Likewise.
6749 (x86_linux_prepare_to_resume): Likewise.
6750
6751 2015-03-24 Gary Benson <gbenson@redhat.com>
6752
6753 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6754 Use perror_with_name. Pass string through gettext.
6755 (x86_linux_dr_set): Likewise.
6756
6757 2015-03-24 Gary Benson <gbenson@redhat.com>
6758
6759 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6760 (x86_linux_dr_set_addr): ...this.
6761 (x86_dr_low_get_addr): Rename to...
6762 (x86_linux_dr_get_addr): ...this.
6763 (x86_dr_low_set_control): Rename to...
6764 (x86_linux_dr_set_control): ...this.
6765 (x86_dr_low_get_control): Rename to...
6766 (x86_linux_dr_get_control): ...this.
6767 (x86_dr_low_get_status): Rename to...
6768 (x86_linux_dr_get_status): ...this.
6769 (x86_dr_low): Update with new function names.
6770
6771 2015-03-24 Gary Benson <gbenson@redhat.com>
6772
6773 * Makefile.in (x86-linux.o): New rule.
6774 * configure.srv: Add x86-linux.o to relevant targets.
6775 * linux-low.c (lwp_set_arch_private_info): New function.
6776 (lwp_arch_private_info): Likewise.
6777 * linux-x86-low.c: Include nat/x86-linux.h.
6778 (arch_lwp_info): Removed structure.
6779 (update_debug_registers_callback):
6780 Use lwp_set_debug_registers_changed.
6781 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6782 and lwp_set_debug_registers_changed.
6783 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6784
6785 2015-03-24 Gary Benson <gbenson@redhat.com>
6786
6787 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6788 * linux-arm-low.c (arm_new_thread): Likewise.
6789 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6790 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6791 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6792 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6793
6794 2015-03-24 Gary Benson <gbenson@redhat.com>
6795
6796 * linux-low.c (ptid_of_lwp): New function.
6797 (lwp_is_stopped): Likewise.
6798 (lwp_stop_reason): Likewise.
6799 * linux-x86-low.c (update_debug_registers_callback):
6800 Use lwp_is_stopped.
6801 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6802 lwp_stop_reason.
6803
6804 2015-03-24 Gary Benson <gbenson@redhat.com>
6805
6806 * linux-low.h (linux_stop_lwp): Remove declaration.
6807
6808 2015-03-24 Gary Benson <gbenson@redhat.com>
6809
6810 * linux-low.h: Include nat/linux-nat.h.
6811 * linux-low.c (iterate_over_lwps_args): New structure.
6812 (iterate_over_lwps_filter): New function.
6813 (iterate_over_lwps): Likewise.
6814 * linux-x86-low.c (update_debug_registers_callback):
6815 Update signature to what iterate_over_lwps expects.
6816 Remove PID check that iterate_over_lwps now performs.
6817 (x86_dr_low_set_addr): Use iterate_over_lwps.
6818 (x86_dr_low_set_control): Likewise.
6819
6820 2015-03-24 Gary Benson <gbenson@redhat.com>
6821
6822 * linux-x86-low.c (x86_debug_reg_state): New function.
6823 (x86_linux_prepare_to_resume): Use the above.
6824
6825 2015-03-24 Gary Benson <gbenson@redhat.com>
6826
6827 * linux-low.c (current_lwp_ptid): New function.
6828 * linux-x86-low.c: Include nat/linux-nat.h.
6829 (x86_dr_low_get_addr): Use current_lwp_ptid.
6830 (x86_dr_low_get_control): Likewise.
6831 (x86_dr_low_get_status): Likewise.
6832
6833 2015-03-20 Pedro Alves <palves@redhat.com>
6834
6835 * tracepoint.c (cmd_qtstatus): Make "str" const.
6836
6837 2015-03-20 Pedro Alves <palves@redhat.com>
6838
6839 * server.c (handle_general_set): Make "req_str" const.
6840
6841 2015-03-19 Pedro Alves <palves@redhat.com>
6842
6843 * linux-low.c (linux_resume_one_lwp): Rename to ...
6844 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6845 instead call perror_with_name.
6846 (check_ptrace_stopped_lwp_gone): New function.
6847 (linux_resume_one_lwp): Reimplement as wrapper around
6848 linux_resume_one_lwp_throw that swallows errors if the LWP is
6849 gone.
6850
6851 2015-03-19 Pedro Alves <palves@redhat.com>
6852
6853 * linux-low.c (count_events_callback, select_event_lwp_callback):
6854 No longer check whether the thread has resume_stop as last resume
6855 kind.
6856
6857 2015-03-19 Pedro Alves <palves@redhat.com>
6858
6859 * linux-low.c (count_events_callback, select_event_lwp_callback):
6860 Use the lwp's status_pending_p field, not the thread's.
6861
6862 2015-03-19 Pedro Alves <palves@redhat.com>
6863
6864 * linux-low.c (select_event_lwp_callback): Update comments to
6865 no longer mention SIGTRAP.
6866
6867 2015-03-18 Gary Benson <gbenson@redhat.com>
6868
6869 * server.c (handle_query): Do not report vFile:fstat as supported.
6870
6871 2015-03-11 Gary Benson <gbenson@redhat.com>
6872
6873 * hostio.c (sys/types.h): New include.
6874 (sys/stat.h): Likewise.
6875 (common-remote-fileio.h): Likewise.
6876 (handle_fstat): New function.
6877 (handle_vFile): Handle vFile:fstat packets.
6878
6879 2015-03-11 Gary Benson <gbenson@redhat.com>
6880
6881 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6882 struct stat.st_blocks and struct stat.st_blksize.
6883 * configure: Regenerate.
6884 * config.in: Likewise.
6885 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6886 (OBS): Add common-remote-fileio.o.
6887 (common-remote-fileio.o): New rule.
6888
6889 2015-03-09 Pedro Alves <palves@redhat.com>
6890
6891 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6892 'struct sockaddr' pointer in 'accept' call.
6893
6894 2015-03-09 Pedro Alves <palves@redhat.com>
6895
6896 Revert:
6897 2015-03-07 Pedro Alves <palves@redhat.com>
6898 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6899 or <winsock2.h> here. Instead include "gdb_socket.h".
6900 (remote_open): Use union gdb_sockaddr_u.
6901 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6902 or <winsock2.h> here. Instead include "gdb_socket.h".
6903 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6904 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6905 or <sys/un.h>.
6906 (init_named_socket, gdb_agent_helper_thread): Use union
6907 gdb_sockaddr_u.
6908
6909 2015-03-07 Pedro Alves <palves@redhat.com>
6910
6911 * configure.ac (build_warnings): Move
6912 -Wdeclaration-after-statement to the C-specific set.
6913 * configure: Regenerate.
6914
6915 2015-03-07 Pedro Alves <palves@redhat.com>
6916
6917 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6918 or <winsock2.h> here. Instead include "gdb_socket.h".
6919 (remote_open): Use union gdb_sockaddr_u.
6920 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6921 or <winsock2.h> here. Instead include "gdb_socket.h".
6922 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6923 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6924 or <sys/un.h>.
6925 (init_named_socket, gdb_agent_helper_thread): Use union
6926 gdb_sockaddr_u.
6927
6928 2015-03-07 Pedro Alves <palves@redhat.com>
6929
6930 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6931 instead.
6932
6933 2015-03-06 Yao Qi <yao.qi@linaro.org>
6934
6935 * linux-aarch64-low.c (aarch64_insert_point): Use
6936 show_debug_regs as a boolean.
6937 (aarch64_remove_point): Likewise.
6938
6939 2015-03-05 Pedro Alves <palves@redhat.com>
6940
6941 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6942 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6943 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6944 * nto-low.c (nto_target_ops): Likewise.
6945 * spu-low.c (spu_target_ops): Likewise.
6946 * win32-low.c (win32_target_ops): Likewise.
6947
6948 2015-03-04 Pedro Alves <palves@redhat.com>
6949
6950 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6951 Decide whether a breakpoint triggered based on the SIGTRAP's
6952 siginfo.si_code.
6953 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6954 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6955 (linux_low_filter_event): Check for breakpoints before checking
6956 watchpoints.
6957 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6958 siginfo.si_code.
6959 (linux_stopped_by_sw_breakpoint)
6960 (linux_supports_stopped_by_sw_breakpoint)
6961 (linux_stopped_by_hw_breakpoint)
6962 (linux_supports_stopped_by_hw_breakpoint): New functions.
6963 (linux_target_ops): Install new target methods.
6964
6965 2015-03-04 Pedro Alves <palves@redhat.com>
6966
6967 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6968 * server.c (swbreak_feature, hwbreak_feature): New globals.
6969 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6970 (captured_main): Clear swbreak_feature and hwbreak_feature.
6971 * server.h (swbreak_feature, hwbreak_feature): Declare.
6972 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6973 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6974 supports_stopped_by_hw_breakpoint>: New fields.
6975 (target_supports_stopped_by_sw_breakpoint)
6976 (target_stopped_by_sw_breakpoint)
6977 (target_supports_stopped_by_hw_breakpoint)
6978 (target_stopped_by_hw_breakpoint): Declare.
6979
6980 2015-03-04 Pedro Alves <palves@redhat.com>
6981
6982 enum lwp_stop_reason -> enum target_stop_reason
6983 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6984 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6985 (linux_wait_1, stuck_in_jump_pad_callback)
6986 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6987 (linux_stopped_by_watchpoint):
6988 * linux-low.h (enum lwp_stop_reason): Delete.
6989 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6990 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6991
6992 2015-03-04 Yao Qi <yao.qi@linaro.org>
6993
6994 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6995
6996 2015-03-03 Gary Benson <gbenson@redhat.com>
6997
6998 * hostio.c (handle_vFile): Fix prefix lengths.
6999
7000 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7001
7002 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7003 ptr_bits.
7004
7005 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7006
7007 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7008 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7009 (clean): Add "rm -f" for above C files.
7010 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7011 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7012 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7013 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7014 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7015 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7016 (init_registers_s390x_vx_linux64)
7017 (init_registers_s390x_tevx_linux64)
7018 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7019 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7020 declarations.
7021 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7022 (s390_store_vxrs_high): New functions.
7023 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7024 NT_S390_VXRS_HIGH.
7025 (s390_arch_setup): Add logic for selecting one of the new target
7026 descriptions. Activate the new vector regsets if applicable.
7027 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7028 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7029 and init_registers_s390x_tevx_linux64.
7030
7031 2015-03-01 Pedro Alves <palves@redhat.com>
7032
7033 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7034 parameter.
7035
7036 2015-02-27 Pedro Alves <palves@redhat.com>
7037
7038 * linux-x86-low.c (u_debugreg_offset): New function.
7039 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7040
7041 2015-02-27 Pedro Alves <palves@redhat.com>
7042
7043 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7044 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7045 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7046 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7047 (ps_lsetfpregs, ps_getpid)
7048 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7049 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7050 (ps_lsetxregs, ps_plog): Declare.
7051
7052 2015-02-27 Pedro Alves <palves@redhat.com>
7053
7054 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7055 IP_AGENT_EXPORT_FUNC.
7056 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7057 IP_AGENT_EXPORT_FUNC.
7058 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7059 (IP_AGENT_EXPORT): Delete.
7060 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7061 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7062 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7063 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7064 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7065 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7066 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7067 (traceframe_read_count, traceframe_write_count)
7068 (traceframes_created, trace_state_variables, get_raw_reg)
7069 (get_trace_state_variable_value, set_trace_state_variable_value)
7070 (ust_loaded, helper_thread_id, cmd_buf): Use
7071 IPA_SYM_EXPORTED_NAME.
7072 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7073 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7074 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7075 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7076 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7077 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7078 EXTERN_C_PUSH/EXTERN_C_POP.
7079 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7080 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7081 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7082 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7083 (traceframe_write_count, traceframe_read_count)
7084 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7085 (about_to_request_buffer_space, get_trace_state_variable_value)
7086 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7087 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7088 EXTERN_C_PUSH/EXTERN_C_POP.
7089 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7090 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7091 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7092 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7093 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7094 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7095 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7096 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7097 Define.
7098 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7099 (IP_AGENT_EXPORT_VAR_DECL): Define.
7100 (tracing): Declare.
7101 (gdb_agent_get_raw_reg): Declare.
7102
7103 2015-02-27 Tom Tromey <tromey@redhat.com>
7104 Pedro Alves <palves@redhat.com>
7105
7106 Rename symbols whose names are reserved C++ keywords throughout.
7107
7108 2015-02-27 Pedro Alves <palves@redhat.com>
7109
7110 * Makefile.in (COMPILER): New, get it from autoconf.
7111 (CXX): Get from autoconf instead.
7112 (COMPILE.pre): Use COMPILER.
7113 (CC-LD): Rename to ...
7114 (CC_LD): ... this. Use COMPILER.
7115 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7116 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7117 * acinclude.m4: Include build-with-cxx.m4.
7118 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7119 Disable -Werror by default if building in C++ mode.
7120 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7121 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7122 the C++ compiler. Save/restore CXXFLAGS too.
7123 * configure: Regenerate.
7124
7125 2015-02-27 Pedro Alves <palves@redhat.com>
7126
7127 * acinclude.m4: Include libiberty.m4.
7128 * configure.ac: Call libiberty_INIT.
7129 * config.in, configure: Regenerate.
7130
7131 2015-02-26 Pedro Alves <palves@redhat.com>
7132
7133 * linux-low.c (linux_wait_1): When incrementing the PC past a
7134 program breakpoint always use the_low_target.breakpoint_len as
7135 increment, rather than the maximum between that and
7136 the_low_target.decr_pc_after_break.
7137
7138 2015-02-23 Pedro Alves <palves@redhat.com>
7139
7140 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7141 thread was doing a step-over; always adjust the PC if
7142 we stepped over a permanent breakpoint.
7143 (linux_wait_1): If we stepped over breakpoint that was on top of a
7144 permanent breakpoint, manually advance the PC past it.
7145
7146 2015-02-23 Pedro Alves <palves@redhat.com>
7147
7148 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7149 modes.
7150 (x86_fill_gregset, x86_store_gregset): Use it when handling
7151 $orig_eax.
7152
7153 2015-02-20 Pedro Alves <palves@redhat.com>
7154
7155 * thread-db.c: Include "nat/linux-procfs.h".
7156 (thread_db_init): Skip listing new threads if the kernel supports
7157 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7158
7159 2015-02-20 Pedro Alves <palves@redhat.com>
7160
7161 * linux-low.c (status_pending_p_callback): Use ptid_match.
7162
7163 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7164
7165 PR breakpoints/16812
7166 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7167 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7168 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7169
7170 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7171
7172 PR breakpoints/15956
7173 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7174
7175 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7176
7177 * linux-low.c (linux_low_btrace_conf): Print size.
7178 * server.c (handle_btrace_conf_general_set): New.
7179 (hanle_general_set): Call handle_btrace_conf_general_set.
7180 (handle_query): Report Qbtrace-conf:bts:size as supported.
7181
7182 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7183
7184 * linux-low.c (linux_low_enable_btrace): Update parameters.
7185 (linux_low_btrace_conf): New.
7186 (linux_target_ops)<to_btrace_conf>: Initialize.
7187 * server.c (current_btrace_conf): New.
7188 (handle_btrace_enable): Rename to ...
7189 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7190 to target_enable_btrace. Update comment. Update users.
7191 (handle_qxfer_btrace_conf): New.
7192 (qxfer_packets): Add btrace-conf entry.
7193 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7194 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7195 (target_ops)<read_btrace_conf>: New.
7196 (target_enable_btrace): Update parameters.
7197 (target_read_btrace_conf): New.
7198
7199 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7200
7201 * server.c (handle_btrace_general_set): Remove call to
7202 target_supports_btrace.
7203 (supported_btrace_packets): New.
7204 (handle_query): Call supported_btrace_packets.
7205 * target.h: include btrace-common.h.
7206 (btrace_target_info): Removed.
7207 (supports_btrace, target_supports_btrace): Update parameters.
7208
7209 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7210
7211 * Makefile.in (SFILES): Add common/btrace-common.c.
7212 (OBS): Add common/btrace-common.o.
7213 (btrace-common.o): Add build rules.
7214 * linux-low: Include btrace-common.h.
7215 (linux_low_read_btrace): Use struct btrace_data. Call
7216 btrace_data_init and btrace_data_fini.
7217
7218 2015-02-06 Pedro Alves <palves@redhat.com>
7219
7220 * thread-db.c (find_new_threads_callback): Add debug output.
7221
7222 2015-02-04 Pedro Alves <palves@redhat.com>
7223
7224 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7225 (resume_stopped_resumed_lwps): New function.
7226 (linux_wait_for_event_filtered): Use it.
7227
7228 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7229
7230 * Makefile.in (SFILES): Add linux-personality.c.
7231 (linux-personality.o): New rule.
7232 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7233 list of objects to be built.
7234 * linux-low.c: Include nat/linux-personality.h.
7235 (linux_create_inferior): Remove code to disable address space
7236 randomization (moved to ../nat/linux-personality.c). Create
7237 cleanup to disable address space randomization.
7238
7239 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7240
7241 * Makefile.in (posix-strerror.o): New rule.
7242 (mingw-strerror.o): Likewise.
7243 * configure: Regenerated.
7244 * configure.ac: Source file ../common/common.host. Initialize new
7245 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7246
7247 2015-01-14 Yao Qi <yao@codesourcery.com>
7248
7249 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7250 (ppc-linux.o): New rule.
7251 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7252 * configure.ac: AC_CHECK_FUNCS(getauxval).
7253 * config.in: Re-generated.
7254 * configure: Re-generated.
7255 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7256 ppc64_64bit_inferior_p
7257
7258 2015-01-14 Yao Qi <yao@codesourcery.com>
7259
7260 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7261 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7262 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7263 (PT_ORIG_R3, PT_TRAP): Likewise.
7264 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7265 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7266 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7267
7268 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7269
7270 * i387-fp.c (i387_cache_to_xsave): In look over
7271 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7272 zmmh_low_space field by use of zmmh_high_space.
7273
7274 2015-01-09 Pedro Alves <palves@redhat.com>
7275
7276 * linux-low.c (step_over_bkpt): Move higher up in the file.
7277 (handle_extended_wait): Don't store the stop_pc here.
7278 (get_stop_pc): Adjust comments and rename to ...
7279 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7280 stopped for a software breakpoint or hardware breakpoint.
7281 (thread_still_has_status_pending_p): New function.
7282 (status_pending_p_callback): Use
7283 thread_still_has_status_pending_p. If the event is no longer
7284 interesting, resume the LWP.
7285 (handle_tracepoints): Add assert.
7286 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7287 (wstatus_maybe_breakpoint): New function.
7288 (cancel_breakpoint): Delete function.
7289 (check_stopped_by_watchpoint): New function, factored out from
7290 linux_low_filter_event.
7291 (lp_status_maybe_breakpoint): Delete function.
7292 (linux_low_filter_event): Remove filter_ptid argument.
7293 Leave thread group exits pending here. Store the LWP's stop PC.
7294 Always leave events pending.
7295 (linux_wait_for_event_filtered): Pull all events out of the
7296 kernel, and leave them all pending.
7297 (count_events_callback, select_event_lwp_callback): Consider all
7298 events.
7299 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7300 (select_event_lwp): Only give preference to the stepping LWP in
7301 all-stop mode. Adjust comments.
7302 (ignore_event): New function.
7303 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7304 references to cancel_breakpoints. Adjust to renames. Also give
7305 equal priority to all LWPs that have had events in non-stop mode.
7306 If reporting a software breakpoint event, unadjust the LWP's PC.
7307 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7308 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7309 Adjust.
7310 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7311 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7312 (linux_stopped_by_watchpoint): Adjust.
7313 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7314 * linux-low.h (enum lwp_stop_reason): New.
7315 (struct lwp_info) <stop_pc>: Adjust comment.
7316 <stopped_by_watchpoint>: Delete field.
7317 <stop_reason>: New field.
7318 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7319 * mem-break.c (software_breakpoint_inserted_here)
7320 (hardware_breakpoint_inserted_here): New function.
7321 * mem-break.h (software_breakpoint_inserted_here)
7322 (hardware_breakpoint_inserted_here): Declare.
7323 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7324 (cancel_breakpoints): Delete.
7325 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7326 (upload_fast_traceframes): Remove references to
7327 cancel_breakpoints.
7328
7329 2015-01-09 Pedro Alves <palves@redhat.com>
7330
7331 * thread-db.c (find_new_threads_callback): Ignore thread if the
7332 kernel thread ID is -1.
7333
7334 2015-01-09 Pedro Alves <palves@redhat.com>
7335
7336 * linux-low.c (linux_attach_fail_reason_string): Move to
7337 nat/linux-ptrace.c, and rename.
7338 (linux_attach_lwp): Update comment.
7339 (attach_proc_task_lwp_callback): New function.
7340 (linux_attach): Adjust to rename and use
7341 linux_proc_attach_tgid_threads.
7342 (linux_attach_fail_reason_string): Delete declaration.
7343
7344 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7345
7346 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7347 * server.c (gdbserver_version): Likewise.
7348
7349 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7350
7351 * remote-utils.c: Include ctype.h.
7352 (input_interrupt): Explicitly handle the case when the char
7353 received is the NUL byte. Improve the printing of non-ASCII
7354 characters.
7355
7356 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7357
7358 * linux-low.c (linux_low_filter_event): Update call to
7359 linux_enable_event_reporting following the addition of
7360 a new parameter to that function.
7361
7362 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7363
7364 PR server/17457
7365 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7366 (AARCH64_FPCR_REGNO): Likewise.
7367 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7368 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7369 (aarch64_store_fpregset): Likewise.
7370
7371 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7372
7373 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7374 Remove FIXME comment about assumption about N.
7375
7376 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7377
7378 * configure.ac: If large-file support is disabled in GDBserver,
7379 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7380 * configure: Regenerate.
7381
7382 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7383
7384 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7385 warning upon ENODATA from ptrace.
7386 * linux-s390-low.c (s390_store_tdb): New.
7387 (s390_regsets): Add regset for NT_S390_TDB.
7388
7389 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7390
7391 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7392 without a fill_function.
7393 * linux-s390-low.c (s390_fill_last_break): Remove.
7394 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7395 (s390_arch_setup): Use regset's size instead of fill_function for
7396 loop end condition.
7397
7398 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7399
7400 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7401 the regset's store function when ptrace returned an error.
7402 * regcache.c (get_thread_regcache): Invalidate register cache
7403 before fetching inferior's registers.
7404
7405 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7406
7407 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7408 while-loop as for-loop.
7409 (regsets_store_inferior_registers): Likewise.
7410
7411 2014-11-28 Yao Qi <yao@codesourcery.com>
7412
7413 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7414 * config.in, configure: Re-generate.
7415 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7416 is defined.
7417
7418 2014-11-21 Yao Qi <yao@codesourcery.com>
7419
7420 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7421 (AC_CHECK_HEADERS): Remove malloc.h.
7422 * configure: Re-generated.
7423 * config.in: Re-generated.
7424 * server.h: Don't include alloca.h and malloc.h.
7425 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7426 Don't include malloc.h.
7427
7428 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7429
7430 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7431 corresponding ERRNO check in same block.
7432
7433 2014-11-12 Pedro Alves <palves@redhat.com>
7434
7435 * server.c (cont_thread): Update comment.
7436 (start_inferior, attach_inferior): No longer clear cont_thread.
7437 (handle_v_cont): No longer set cont_thread.
7438 (captured_main): Clear cont_thread each time a GDB connects.
7439
7440 2014-11-12 Pedro Alves <palves@redhat.com>
7441
7442 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7443 thread, and don't resume all threads if the Hc thread has exited.
7444
7445 2014-11-12 Pedro Alves <palves@redhat.com>
7446
7447 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7448 the process group instead of to a specific LWP.
7449
7450 2014-10-15 Pedro Alves <palves@redhat.com>
7451
7452 PR server/17487
7453 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7454 parameter.
7455 (arm_set_thread_context): Delete.
7456 (the_low_target): Adjust.
7457 * win32-i386-low.c (debug_registers_changed)
7458 (debug_registers_used): Delete.
7459 (update_debug_registers_callback): New function.
7460 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7461 needing to update their debug registers.
7462 (win32_get_current_dr): New function.
7463 (x86_dr_low_get_addr, x86_dr_low_get_control)
7464 (x86_dr_low_get_status): Fetch the debug register from the thread
7465 record's context.
7466 (i386_initial_stuff): Adjust.
7467 (i386_get_thread_context): Remove current_event parameter. Don't
7468 clear debug_registers_changed nor copy DR values to
7469 debug_reg_state.
7470 (i386_set_thread_context): Delete.
7471 (i386_prepare_to_resume): New function.
7472 (i386_thread_added): Mark the thread as needing to update irs
7473 debug registers.
7474 (the_low_target): Remove i386_set_thread_context and install
7475 i386_prepare_to_resume.
7476 * win32-low.c (win32_get_thread_context): Adjust.
7477 (win32_set_thread_context): Use SetThreadContext
7478 directly.
7479 (win32_prepare_to_resume): New function.
7480 (win32_require_context): New function, factored out from ...
7481 (thread_rec): ... this.
7482 (continue_one_thread): Call win32_prepare_to_resume on each thread
7483 we're about to continue.
7484 (win32_resume): Call win32_prepare_to_resume on the event thread.
7485 * win32-low.h (struct win32_thread_info)
7486 <debug_registers_changed>: New field.
7487 (struct win32_target_ops): Change prototype of set_thread_context,
7488 delete set_thread_context and add prepare_to_resume.
7489 (win32_require_context): New declaration.
7490
7491 2014-10-08 Gary Benson <gbenson@redhat.com>
7492
7493 * server.h: Do not include common-exceptions.h.
7494
7495 2014-10-08 Gary Benson <gbenson@redhat.com>
7496
7497 * server.h: Do not include cleanups.h.
7498
7499 2014-09-30 James Hogan <james.hogan@imgtec.com>
7500
7501 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7502 mips64-dsp-linux.c.
7503
7504 2014-09-23 Yao Qi <yao@codesourcery.com>
7505
7506 * linux-low.c (lp_status_maybe_breakpoint): New function.
7507 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7508 (count_events_callback): Likewise.
7509 (select_event_lwp_callback): Likewise.
7510 (cancel_breakpoints_callback): Likewise.
7511
7512 2014-09-19 Don Breazeal <donb@codesourcery.com>
7513
7514 * linux-low.c (handle_extended_wait): Call
7515 linux_ptrace_get_extended_event.
7516 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7517 linux_is_extended_waitstatus.
7518
7519 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7520
7521 * Makefile.in (CPPFLAGS): Define.
7522 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7523 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7524
7525 2014-09-16 Gary Benson <gbenson@redhat.com>
7526
7527 * inferiors.h (current_inferior): Renamed as...
7528 (current_thread): New variable. All uses updated.
7529 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7530 (maybe_move_out_of_jump_pad): Likewise.
7531 (cancel_breakpoint): Likewise.
7532 (linux_low_filter_event): Likewise.
7533 (wait_for_sigstop): Likewise.
7534 (linux_resume_one_lwp): Likewise.
7535 (need_step_over_p): Likewise.
7536 (start_step_over): Likewise.
7537 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7538 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7539 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7540 and save_inferior as saved_thread.
7541 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7542 saved_thread.
7543 (regcache_invalidate_thread): Likewise.
7544 * remote-utils.c (prepare_resume_reply): Likewise.
7545 * thread-db.c (thread_db_get_tls_address): Likewise.
7546 (disable_thread_event_reporting): Likewise.
7547 (remove_thread_event_breakpoints): Likewise.
7548 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7549 as saved_thread.
7550 * target.h (set_desired_inferior): Renamed as...
7551 (set_desired_thread): New declaration. All uses updated.
7552 * server.c (myresume): Updated comment to reference thread instead
7553 of inferior.
7554 (handle_serial_event): Likewise.
7555 (handle_target_event): Likewise.
7556
7557 2014-09-12 Tom Tromey <tromey@redhat.com>
7558 Gary Benson <gbenson@redhat.com>
7559
7560 * regcache.h: Include common-regcache.h.
7561 (regcache_read_pc): Don't declare.
7562 * regcache.c (get_thread_regcache_for_ptid): New function.
7563
7564 2014-09-11 Tom Tromey <tromey@redhat.com>
7565 Gary Benson <gbenson@redhat.com>
7566
7567 * symbol.c: New file.
7568 * Makefile.in (SFILES): Add symbol.c.
7569 (OBS): Add symbol.o.
7570
7571 2014-09-11 Gary Benson <gbenson@redhat.com>
7572
7573 * target.c (target_stop_ptid, target_continue_ptid): New
7574 functions.
7575
7576 2014-09-11 Tom Tromey <tromey@redhat.com>
7577 Gary Benson <gbenson@redhat.com>
7578
7579 * target.h: Include target/target.h.
7580 * target.c (target_read_memory, target_read_uint32)
7581 (target_write_memory): New functions.
7582
7583 2014-09-11 Gary Benson <gbenson@redhat.com>
7584
7585 * server.h (debug_hw_points): Don't declare.
7586 * server.c (debug_hw_points): Don't define. Replace all uses
7587 with show_debug_regs.
7588 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7589 all uses with show_debug_regs.
7590
7591 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7592
7593 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7594 endianness into account.
7595 (ppc_supply_ptrace_register): Likewise.
7596
7597 2014-09-03 James Hogan <james.hogan@imgtec.com>
7598
7599 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7600 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7601
7602 2014-09-03 Gary Benson <gbenson@redhat.com>
7603
7604 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7605 ALL_DEBUG_ADDRESS_REGISTERS.
7606
7607 2014-09-02 Gary Benson <gbenson@redhat.com>
7608
7609 * i386-low.h: Renamed as...
7610 * x86-low.h: New file. All type, function and variable name
7611 prefixes changed from "i386_" to "x86_". All references updated.
7612 * i386-low.c: Renamed as...
7613 * x86-low.c: New file. All type, function and variable name
7614 prefixes changed from "i386_" to "x86_". All references updated.
7615
7616 2014-09-02 Gary Benson <gbenson@redhat.com>
7617
7618 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7619 (x86_linux_new_thread): Likewise.
7620
7621 2014-08-29 Gary Benson <gbenson@redhat.com>
7622
7623 * server.h (setjmp.h): Do not include.
7624 (toplevel): Do not declare.
7625 (common-exceptions.h): Include.
7626 (cleanups.h): Likewise.
7627 * server.c (toplevel): Do not define.
7628 (exit_code): New static global.
7629 (detach_or_kill_for_exit_cleanup): New function.
7630 (main): New function. Original main renamed to...
7631 (captured_main): New function.
7632 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7633
7634 2014-08-29 Gary Benson <gbenson@redhat.com>
7635
7636 * Makefile.in (SFILES): Add common/common-exceptions.c.
7637 (OBS): Add common-exceptions.o.
7638 (common-exceptions.o): New rule.
7639 * utils.c (prepare_to_throw_exception): New function.
7640
7641 2014-08-29 Gary Benson <gbenson@redhat.com>
7642
7643 * config.in: Regenerate.
7644 * configure: Likewise.
7645
7646 2014-08-29 Gary Benson <gbenson@redhat.com>
7647
7648 * Makefile.in (SFILES): Add common/cleanups.c.
7649 (OBS): cleanups.o.
7650 (cleanups.o): New rule.
7651
7652 2014-08-29 Gary Benson <gbenson@redhat.com>
7653
7654 * utils.c (internal_vwarning): New function.
7655
7656 2014-08-28 Gary Benson <gbenson@redhat.com>
7657
7658 * utils.h (fatal): Remove declaration.
7659 * utils.c (fatal): Remove function.
7660
7661 2014-08-28 Gary Benson <gbenson@redhat.com>
7662
7663 * tracepoint.c (gdb_agent_init): Replace fatal with
7664 perror_with_name.
7665 (initialize_tracepoint): Likewise.
7666
7667 2014-08-28 Gary Benson <gbenson@redhat.com>
7668
7669 * remote-utils.c (remote_prepare): Replace fatal with error.
7670
7671 2014-08-28 Gary Benson <gbenson@redhat.com>
7672
7673 * linux-low.c (linux_async): Replace fatal with warning.
7674 Tidy up and return.
7675 (linux_start_non_stop): Return -1 if linux_async failed.
7676
7677 2014-08-28 Gary Benson <gbenson@redhat.com>
7678
7679 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7680 gdb_assert.
7681 (i386_dr_low_get_addr): Remove vague comment.
7682 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7683 gdb_assert.
7684
7685 2014-08-28 Gary Benson <gbenson@redhat.com>
7686
7687 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7688 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7689 internal_error.
7690 (linux_resume_one_lwp): Likewise.
7691 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7692 gdb_assert.
7693 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7694 with internal_error.
7695 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7696 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7697 (find_register_by_name): Replace fatal with internal_error.
7698 (find_regno): Likewise.
7699 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7700 * thread-db.c (thread_db_create_event): Likewise.
7701 (thread_db_load_search): Likewise.
7702 (try_thread_db_load_1): Likewise.
7703 * tracepoint.c (get_jump_space_head): Replace fatal with
7704 internal_error.
7705 (claim_trampoline_space): Likewise.
7706 (have_fast_tracepoint_trampoline_buffer): Likewise.
7707 (cmd_qtstart): Likewise.
7708 (stop_tracing): Likewise.
7709 (fast_tracepoint_collecting): Likewise.
7710 (target_malloc): Likewise.
7711 (download_tracepoint): Likewise.
7712 (download_trace_state_variables): Replace check with gdb_assert.
7713 (upload_fast_traceframes): Replace fatal with internal_error.
7714
7715 2014-08-19 Tom Tromey <tromey@redhat.com>
7716 Gary Benson <gbenson@redhat.com>
7717
7718 * Makefile.in (SFILES): Add common/common-debug.c.
7719 (OBS): Add common-debug.o.
7720 (common-debug.o): New rule.
7721 * debug.h (debug_printf): Don't declare.
7722 * debug.c (debug_printf): Renamed and rewritten as...
7723 (debug_vprintf): New function.
7724
7725 2014-08-19 Gary Benson <gbenson@redhat.com>
7726
7727 * utils.h: Do not include print-utils.h.
7728
7729 2014-08-19 Tom Tromey <tromey@redhat.com>
7730 Gary Benson <gbenson@redhat.com>
7731
7732 * server.h: Add static assertion.
7733 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7734
7735 2014-08-19 Tom Tromey <tromey@redhat.com>
7736 Gary Benson <gbenson@redhat.com>
7737
7738 * Makefile.in (SFILES): Add common/errors.c.
7739 (OBS): Add errors.o.
7740 (IPA_OBS): Add errors-ipa.o.
7741 (errors.o): New rule.
7742 (errors-ipa.o): Likewise.
7743 * utils.h (perror_with_name, error, warning): Don't declare.
7744 * utils.c (warning): Renamed and rewritten as...
7745 (vwarning): New function.
7746 (error): Renamed and rewritten as...
7747 (verror): New function.
7748 (internal_error): Renamed and rewritten as...
7749 (internal_verror): New function.
7750
7751 2014-08-07 Gary Benson <gbenson@redhat.com>
7752
7753 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7754 * configure: Regenerate.
7755 * config.in: Likewise.
7756 * server.h: Do not include errno.h.
7757 * event-loop.c: Likewise.
7758 * hostio-errno.c: Likewise.
7759 * linux-low.c: Likewise.
7760 * remote-utils.c: Likewise.
7761 * spu-low.c: Likewise.
7762 * utils.c: Likewise.
7763 * gdbreplay.c: Unconditionally include errno.h.
7764
7765 2014-08-07 Gary Benson <gbenson@redhat.com>
7766
7767 * server.h: Do not include string.h.
7768 * event-loop.c: Likewise.
7769 * linux-low.c: Likewise.
7770 * regcache.c: Likewise.
7771 * remote-utils.c: Likewise.
7772 * spu-low.c: Likewise.
7773 * utils.c: Likewise.
7774
7775 2014-08-07 Gary Benson <gbenson@redhat.com>
7776
7777 * server.h: Do not include gdb_assert.h.
7778
7779 2014-08-07 Gary Benson <gbenson@redhat.com>
7780
7781 * server.h: Do not include common-utils.h.
7782
7783 2014-08-07 Gary Benson <gbenson@redhat.com>
7784
7785 * server.h: Do not include ptid.h.
7786 * notif.h: Likewise.
7787
7788 2014-08-07 Gary Benson <gbenson@redhat.com>
7789
7790 * server.h: Do not include gdb_locale.h.
7791
7792 2014-08-07 Gary Benson <gbenson@redhat.com>
7793
7794 * server.h: Do not include gdb/signals.h.
7795 * win32-low.c: Likewise.
7796
7797 2014-08-07 Gary Benson <gbenson@redhat.com>
7798
7799 * server.h: Do not include pathmax.h.
7800
7801 2014-08-07 Gary Benson <gbenson@redhat.com>
7802
7803 * server.h: Do not include libiberty.h.
7804 * linux-bfin-low.c: Likewise.
7805
7806 2014-08-07 Gary Benson <gbenson@redhat.com>
7807
7808 * server.h: Do not include ansidecl.h.
7809
7810 2014-08-07 Gary Benson <gbenson@redhat.com>
7811
7812 * linux-x86-low.c: Do not include stddef.h.
7813 * lynx-ppc-low.c: Likewise.
7814 * tracepoint.c: Likewise.
7815
7816 2014-08-07 Gary Benson <gbenson@redhat.com>
7817
7818 * server.h: Do not include stdarg.h.
7819 * nto-low.c: Likewise.
7820
7821 2014-08-07 Gary Benson <gbenson@redhat.com>
7822
7823 * server.h: Do not include stdlib.h.
7824 * inferiors.c: Likewise.
7825 * linux-low.c: Likewise.
7826 * regcache.c: Likewise.
7827 * spu-low.c: Likewise.
7828 * tracepoint.c: Likewise.
7829 * utils.c: Likewise.
7830
7831 2014-08-07 Gary Benson <gbenson@redhat.com>
7832
7833 * server.h: Do not include stdio.h.
7834 * linux-low.c: Likewise.
7835 * remote-utils.c: Likewise.
7836 * spu-low.c: Likewise.
7837 * utils.c: Likewise.
7838 * wincecompat.c: Likewise.
7839
7840 2014-08-06 Gary Benson <gbenson@redhat.com>
7841
7842 * regcache.c (init_register_cache): Move conditionals inside if.
7843
7844 2014-08-06 Gary Benson <gbenson@redhat.com>
7845
7846 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7847
7848 2014-07-31 Gary Benson <gbenson@redhat.com>
7849
7850 * ax.h: Do not include server.h.
7851 * gdbthread.h: Likewise.
7852 * lynx-low.h: Likewise.
7853 * notif.h: Likewise.
7854
7855 2014-07-30 Gary Benson <gbenson@redhat.com>
7856
7857 * server.h: Include common-defs.h.
7858 Do not include config.h or build-gnulib-gdbserver/config.h.
7859
7860 2014-07-30 Gary Benson <gbenson@redhat.com>
7861
7862 * hostio-errno.c: Move server.h to top of includes list.
7863 * inferiors.c: Likewise.
7864 * linux-x86-low.c: Likewise.
7865 * notif.c: Include server.h.
7866
7867 2014-07-24 Tom Tromey <tromey@redhat.com>
7868 Gary Benson <gbenson@redhat.com>
7869
7870 * server.h (CORE_ADDR): Now unsigned.
7871
7872 2014-07-16 Pedro Alves <palves@redhat.com>
7873
7874 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7875
7876 2014-07-15 Pedro Alves <palves@redhat.com>
7877
7878 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7879 copy.
7880
7881 2014-07-11 Pedro Alves <palves@redhat.com>
7882
7883 * linux-low.c (kill_wait_lwp): New function, based on
7884 kill_one_lwp_callback, but use my_waitpid directly.
7885 (kill_one_lwp_callback, linux_kill): Use it.
7886
7887 2014-06-23 Pedro Alves <palves@redhat.com>
7888
7889 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7890 before setting DR0..DR3.
7891
7892 2014-06-20 Gary Benson <gbenson@redhat.com>
7893
7894 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7895 * configure: Regenerated.
7896 * config.in: Likewise.
7897
7898 2014-06-20 Gary Benson <gbenson@redhat.com>
7899
7900 * Makefile.in (SFILES): Update locations for files moved
7901 from common to nat.
7902 (object file files): Reordered.
7903
7904 2014-06-20 Gary Benson <gbenson@redhat.com>
7905
7906 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7907 (i386_dr_low_set_addr): Likewise.
7908 (i386_dr_low_get_addr): Likewise.
7909 (i386_dr_low_can_set_control): Likewise.
7910 (i386_dr_low_set_control): Likewise.
7911 (i386_dr_low_get_control): Likewise.
7912 (i386_dr_low_get_status): Likewise.
7913 (i386_get_debug_register_length): Likewise.
7914 * linux-x86-low.c (i386_dr_low_set_addr):
7915 Changed signature. Made static.
7916 (i386_dr_low_get_addr): Likewise.
7917 (i386_dr_low_set_control): Likewise.
7918 (i386_dr_low_get_control): Likewise.
7919 (i386_dr_low_get_status): Likewise.
7920 (i386_dr_low): New global variable.
7921 * win32-i386-low.c (i386_dr_low_set_addr):
7922 Changed signature. Made static.
7923 (i386_dr_low_get_addr): Likewise.
7924 (i386_dr_low_set_control): Likewise.
7925 (i386_dr_low_get_control): Likewise.
7926 (i386_dr_low_get_status): Likewise.
7927 (i386_dr_low): New global variable.
7928
7929 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7930
7931 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7932 * Makefile.in (AR, AR_FLAGS): Define.
7933 * configure: Regenerate.
7934
7935 2014-06-19 Gary Benson <gbenson@redhat.com>
7936
7937 * Makefile.in (i386-dregs.o): New rule.
7938 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7939 * i386-low.c (target.h): Remove include.
7940 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7941 (DR_CONTROL_SHIFT): Likewise.
7942 (DR_CONTROL_SIZE): Likewise.
7943 (DR_RW_EXECUTE): Likewise.
7944 (DR_RW_WRITE): Likewise.
7945 (DR_RW_READ): Likewise.
7946 (DR_RW_IORW): Likewise.
7947 (DR_LEN_1): Likewise.
7948 (DR_LEN_2): Likewise.
7949 (DR_LEN_4): Likewise.
7950 (DR_LEN_8): Likewise.
7951 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7952 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7953 (DR_ENABLE_SIZE): Likewise.
7954 (DR_LOCAL_SLOWDOWN): Likewise.
7955 (DR_GLOBAL_SLOWDOWN): Likewise.
7956 (DR_CONTROL_RESERVED): Likewise.
7957 (I386_DR_CONTROL_MASK): Likewise.
7958 (I386_DR_VACANT): Likewise.
7959 (I386_DR_LOCAL_ENABLE): Likewise.
7960 (I386_DR_GLOBAL_ENABLE): Likewise.
7961 (I386_DR_DISABLE): Likewise.
7962 (I386_DR_SET_RW_LEN): Likewise.
7963 (I386_DR_GET_RW_LEN): Likewise.
7964 (I386_DR_WATCH_HIT): Likewise.
7965 (i386_wp_op_t): Likewise.
7966 (i386_show_dr): Likewise.
7967 (i386_length_and_rw_bits): Likewise.
7968 (i386_insert_aligned_watchpoint): Likewise.
7969 (i386_remove_aligned_watchpoint): Likewise.
7970 (i386_handle_nonaligned_watchpoint): Likewise.
7971 i386_update_inferior_debug_regs(): Likewise.
7972 (i386_dr_insert_watchpoint): Likewise.
7973 (i386_dr_remove_watchpoint): Likewise.
7974 (i386_dr_region_ok_for_watchpoint): Likewise.
7975 (i386_dr_stopped_data_address): Likewise.
7976 (i386_dr_stopped_by_watchpoint): Likewise.
7977
7978 2014-06-19 Gary Benson <gbenson@redhat.com>
7979
7980 * i386-low.c (i386_dr_show): Renamed to
7981 i386_show_dr and made static. All uses updated.
7982 (i386_dr_length_and_rw_bits): Renamed to
7983 i386_length_and_rw_bits and made static.
7984 All uses updated.
7985 (i386_dr_insert_aligned_watchpoint): Renamed to
7986 i386_insert_aligned_watchpoint and made static.
7987 All uses updated.
7988 (i386_dr_remove_aligned_watchpoint): Renamed to
7989 i386_remove_aligned_watchpoint and made static.
7990 All uses updated.
7991 (i386_dr_update_inferior_debug_regs): Renamed to
7992 i386_update_inferior_debug_regs and made static.
7993 All uses updated.
7994
7995 2014-06-18 Gary Benson <gbenson@redhat.com>
7996
7997 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7998 (i386_dr_low_can_set_control): Likewise.
7999 (i386_get_debug_register_length): Likewise.
8000 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8001 (i386_dr_low_can_set_control): Likewise.
8002 (i386_get_debug_register_length): Likewise.
8003
8004 2014-06-17 Gary Benson <gbenson@redhat.com>
8005
8006 * i386-low.h (i386-dregs.h): New include.
8007 (DR_FIRSTADDR): Now in i386-dregs.h.
8008 (DR_LASTADDR): Likewise.
8009 (DR_NADDR): Likewise.
8010 (DR_STATUS): Likewise.
8011 (DR_CONTROL): Likewise.
8012 (i386_debug_reg_state): Likewise.
8013 (i386_dr_insert_watchpoint): Likewise.
8014 (i386_dr_remove_watchpoint): Likewise.
8015 (i386_dr_region_ok_for_watchpoint): Likewise.
8016 (i386_dr_stopped_data_address): Likewise.
8017 (i386_dr_stopped_by_watchpoint): Likewise.
8018 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8019
8020 2014-06-18 Gary Benson <gbenson@redhat.com>
8021
8022 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8023 i386_dr_insert_watchpoint.
8024 (i386_low_remove_watchpoint): Renamed to
8025 i386_dr_remove_watchpoint.
8026 (i386_low_region_ok_for_watchpoint): Renamed to
8027 i386_dr_region_ok_for_watchpoint.
8028 (i386_low_stopped_data_address): Renamed to
8029 i386_dr_stopped_data_address.
8030 (i386_low_stopped_by_watchpoint): Renamed to
8031 i386_dr_stopped_by_watchpoint.
8032 * i386-low.c (i386_show_dr): Renamed to
8033 i386_dr_show and made nonstatic. All uses updated.
8034 (i386_length_and_rw_bits): Renamed to
8035 i386_dr_length_and_rw_bits and made nonstatic.
8036 All uses updated.
8037 (i386_insert_aligned_watchpoint): Renamed to
8038 i386_dr_insert_aligned_watchpoint and made nonstatic.
8039 All uses updated.
8040 (i386_remove_aligned_watchpoint): Renamed to
8041 i386_dr_remove_aligned_watchpoint and made nonstatic.
8042 All uses updated.
8043 (i386_update_inferior_debug_regs): Renamed to
8044 i386_dr_update_inferior_debug_regs and made nonstatic.
8045 All uses updated.
8046 (i386_low_insert_watchpoint): Renamed to
8047 i386_dr_insert_watchpoint. All uses updated.
8048 (i386_low_remove_watchpoint): Renamed to
8049 i386_dr_remove_watchpoint. All uses updated.
8050 (i386_low_region_ok_for_watchpoint): Renamed to
8051 i386_dr_region_ok_for_watchpoint. All uses updated.
8052 (i386_low_stopped_data_address): Renamed to
8053 i386_dr_stopped_data_address. All uses updated.
8054 (i386_low_stopped_by_watchpoint): Renamed to
8055 i386_dr_stopped_by_watchpoint. All uses updated.
8056
8057 2014-06-18 Gary Benson <gbenson@redhat.com>
8058
8059 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8060 (i386_dr_low_can_set_control): Likewise.
8061 (i386_insert_aligned_watchpoint): New check.
8062
8063 2014-06-18 Gary Benson <gbenson@redhat.com>
8064
8065 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8066 Renamed to state.
8067
8068 2014-06-18 Gary Benson <gbenson@redhat.com>
8069
8070 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8071 instead of fatal and error.
8072 (i386_handle_nonaligned_watchpoint): Likewise.
8073
8074 2014-06-18 Gary Benson <gbenson@redhat.com>
8075
8076 * i386-low.c (i386_get_debug_register_length): New macro.
8077 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8078 (i386_show_dr): Use debug_printf instead of fprintf. Use
8079 phex to format values.
8080
8081 2014-06-18 Gary Benson <gbenson@redhat.com>
8082
8083 * i386-low.h: Comment changes.
8084 * i386-low.c: Likewise.
8085
8086 2014-06-18 Gary Benson <gbenson@redhat.com>
8087
8088 * i386-low.c: Whitespace changes.
8089
8090 2014-06-12 Tom Tromey <tromey@redhat.com>
8091
8092 * utils.c (freeargv): Remove.
8093
8094 2014-06-12 Tom Tromey <tromey@redhat.com>
8095
8096 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8097 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8098 (parse_debug_format_options): Likewise.
8099 (gdbserver_usage): Likewise.
8100 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8101 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8102 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8103 against libiberty.
8104 ($(LIBGNU)): Depend on libiberty.
8105 (all-lib): Recurse into all subdirs.
8106 (install-only): Invoke "install" target in subdirs.
8107 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8108 targets.
8109 * configure: Rebuild.
8110 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8111 for vasprintf, vsnprintf, or gettimeofday.
8112 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8113 srv_tgtobj.
8114
8115 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8116
8117 * development.sh: Delete.
8118 * Makefile.in (config.status): Adjust dependency on development.sh.
8119 * configure.ac: Adjust development.sh source call.
8120 * configure: Regenerate.
8121
8122 2014-06-02 Pedro Alves <palves@redhat.com>
8123
8124 * ax.c (gdb_free_agent_expr): New function.
8125 * ax.h (gdb_free_agent_expr): New declaration.
8126 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8127 list.
8128 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8129 static.
8130 (clear_breakpoint_conditions_and_commands): New function.
8131 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8132 (clear_breakpoint_conditions_and_commands): New declaration.
8133
8134 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8135
8136 * linux-aarch64-low.c (asm/ptrace.h): Include.
8137
8138 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8139
8140 Fix TLS access for -static -pthread.
8141 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8142 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8143 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8144
8145 2014-05-20 Pedro Alves <palves@redhat.com>
8146
8147 * linux-aarch64-low.c (aarch64_insert_point)
8148 (aarch64_remove_point): No longer check whether the type is
8149 supported here. Adjust to new interface.
8150 (the_low_target): Install aarch64_supports_z_point_type as
8151 supports_z_point_type method.
8152 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8153 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8154 instead of a Z packet char. Adjust.
8155 (arm_supports_z_point_type): New function.
8156 (arm_insert_point, arm_remove_point): Adjust to new interface.
8157 (the_low_target): Install arm_supports_z_point_type.
8158 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8159 (cris_insert_point, cris_remove_point): Adjust to new interface.
8160 Don't check whether the type is supported here.
8161 (the_low_target): Install cris_supports_z_point_type.
8162 * linux-low.c (linux_supports_z_point_type): New function.
8163 (linux_insert_point, linux_remove_point): Adjust to new interface.
8164 * linux-low.h (struct linux_target_ops) <insert_point,
8165 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8166 raw_breakpoint pointer parameter.
8167 <supports_z_point_type>: New method.
8168 * linux-mips-low.c (mips_supports_z_point_type): New function.
8169 (mips_insert_point, mips_remove_point): Adjust to new interface.
8170 Use mips_supports_z_point_type.
8171 (the_low_target): Install mips_supports_z_point_type.
8172 * linux-ppc-low.c (the_low_target): Install NULL as
8173 supports_z_point_type method.
8174 * linux-s390-low.c (the_low_target): Install NULL as
8175 supports_z_point_type method.
8176 * linux-sparc-low.c (the_low_target): Install NULL as
8177 supports_z_point_type method.
8178 * linux-x86-low.c (x86_supports_z_point_type): New function.
8179 (x86_insert_point): Adjust to new insert_point interface. Use
8180 insert_memory_breakpoint. Adjust to new
8181 i386_low_insert_watchpoint interface.
8182 (x86_remove_point): Adjust to remove_point interface. Use
8183 remove_memory_breakpoint. Adjust to new
8184 i386_low_remove_watchpoint interface.
8185 (the_low_target): Install x86_supports_z_point_type.
8186 * lynx-low.c (lynx_target_ops): Install NULL as
8187 supports_z_point_type callback.
8188 * nto-low.c (nto_supports_z_point_type): New.
8189 (nto_insert_point, nto_remove_point): Adjust to new interface.
8190 (nto_target_ops): Install nto_supports_z_point_type.
8191 * mem-break.c: Adjust intro comment.
8192 (struct raw_breakpoint) <raw_type, size>: New fields.
8193 <inserted>: Update comment.
8194 <shlib_disabled>: Delete field.
8195 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8196 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8197 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8198 (raw_bkpt_type_to_target_hw_bp_type): New function.
8199 (find_enabled_raw_code_breakpoint_at): New function.
8200 (find_raw_breakpoint_at): New type and size parameters. Use them.
8201 (insert_memory_breakpoint): New function, based off
8202 set_raw_breakpoint_at.
8203 (remove_memory_breakpoint): New function.
8204 (set_raw_breakpoint_at): Reimplement.
8205 (set_breakpoint): New, based on set_breakpoint_at.
8206 (set_breakpoint_at): Reimplement.
8207 (delete_raw_breakpoint): Go through the_target->remove_point
8208 instead of assuming memory breakpoints.
8209 (find_gdb_breakpoint_at): Delete.
8210 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8211 (find_gdb_breakpoint): New function.
8212 (set_gdb_breakpoint_at): Delete.
8213 (z_type_supported): New function.
8214 (set_gdb_breakpoint_1): New function, loosely based off
8215 set_gdb_breakpoint_at.
8216 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8217 (delete_gdb_breakpoint_at): Delete.
8218 (delete_gdb_breakpoint_1): New function, loosely based off
8219 delete_gdb_breakpoint_at.
8220 (delete_gdb_breakpoint): New function.
8221 (clear_gdb_breakpoint_conditions): Rename to ...
8222 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8223 breakpoint.
8224 (add_condition_to_breakpoint): Make static.
8225 (add_breakpoint_condition): Take a struct breakpoint pointer
8226 instead of an address. Adjust.
8227 (gdb_condition_true_at_breakpoint): Rename to ...
8228 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8229 z_type parameter.
8230 (gdb_condition_true_at_breakpoint): Reimplement.
8231 (add_breakpoint_commands): Take a struct breakpoint pointer
8232 instead of an address. Adjust.
8233 (gdb_no_commands_at_breakpoint): Rename to ...
8234 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8235 parameter. Return true if no breakpoint was found. Change debug
8236 output.
8237 (gdb_no_commands_at_breakpoint): Reimplement.
8238 (run_breakpoint_commands): Rename to ...
8239 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8240 and change return type to boolean.
8241 (run_breakpoint_commands): New function.
8242 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8243 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8244 breakpoint. Go through the_target->remove_point instead of
8245 assuming memory breakpoint.
8246 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8247 software and hardware breakpoints.
8248 (reinsert_raw_breakpoint): Go through the_target->insert_point
8249 instead of assuming memory breakpoint.
8250 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8251 software and hardware breakpoints.
8252 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8253 Check both software and hardware breakpoints.
8254 (validate_inserted_breakpoint): Assert the breakpoint is a
8255 software breakpoint. Set the inserted flag to -1 instead of
8256 setting shlib_disabled.
8257 (delete_disabled_breakpoints): Adjust.
8258 (validate_breakpoints): Only validate software breakpoints.
8259 Adjust to inserted flag change.
8260 (check_mem_read, check_mem_write): Skip breakpoint types other
8261 than software breakpoints. Adjust to inserted flag change.
8262 * mem-break.h (enum raw_bkpt_type): New enum.
8263 (raw_breakpoint, struct process_info): Forward declare.
8264 (Z_packet_to_target_hw_bp_type): Delete declaration.
8265 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8266 (set_gdb_breakpoint, delete_gdb_breakpoint)
8267 (clear_breakpoint_conditions): New declarations.
8268 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8269 (breakpoint_inserted_here): Update comment.
8270 (add_breakpoint_condition, add_breakpoint_commands): Replace
8271 address parameter with a breakpoint pointer parameter.
8272 (gdb_breakpoint_here): Update comment.
8273 (delete_gdb_breakpoint_at): Delete.
8274 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8275 * server.c (process_point_options): Take a struct breakpoint
8276 pointer instead of an address. Adjust.
8277 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8278 delete_gdb_breakpoint.
8279 * spu-low.c (spu_target_ops): Install NULL as
8280 supports_z_point_type method.
8281 * target.h: Include mem-break.h.
8282 (struct target_ops) <prepare_to_access_memory>: Update comment.
8283 <supports_z_point_type>: New field.
8284 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8285 instead of a char. Also take a raw breakpoint pointer.
8286 * win32-arm-low.c (the_low_target): Install NULL as
8287 supports_z_point_type.
8288 * win32-i386-low.c (i386_supports_z_point_type): New function.
8289 (i386_insert_point, i386_remove_point): Adjust to new interface.
8290 (the_low_target): Install i386_supports_z_point_type.
8291 * win32-low.c (win32_supports_z_point_type): New function.
8292 (win32_insert_point, win32_remove_point): Adjust to new interface.
8293 (win32_target_ops): Install win32_supports_z_point_type.
8294 * win32-low.h (struct win32_target_ops):
8295 <supports_z_point_type>: New method.
8296 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8297 instead of a char. Also take a raw breakpoint pointer.
8298
8299 2014-05-20 Pedro Alves <palves@redhat.com>
8300
8301 * mem-break.h: Include break-common.h.
8302 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8303 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8304 (Z_packet_to_target_hw_bp_type): New declaration.
8305 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8306 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8307 (Z_PACKET_ACCESS_WP): Delete macros.
8308 (Z_packet_to_hw_type): Delete function.
8309 * i386-low.h: Don't include break-common.h here.
8310 (Z_packet_to_hw_type): Delete declaration.
8311 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8312 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8313 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8314 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8315 * linux-aarch64-low.c: Don't include break-common.h here.
8316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8318 (Z_packet_to_target_hw_bp_type): Delete function.
8319 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8320 function.
8321 (mips_insert_point, mips_remove_point): Use
8322 Z_packet_to_target_hw_bp_type.
8323
8324 2014-05-20 Pedro Alves <palves@redhat.com>
8325
8326 * linux-aarch64-low.c: Include break-common.h.
8327 (enum target_point_type): Delete.
8328 (Z_packet_to_point_type): Rename to ...
8329 (Z_packet_to_target_hw_bp_type): ... this, and return a
8330 target_hw_bp_type instead.
8331 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8332 instead of an enum target_point_type.
8333 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8334 breakpoint type.
8335 (aarch64_dr_state_insert_one_point)
8336 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8337 (aarch64_handle_aligned_watchpoint)
8338 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8339 Take an enum target_hw_bp_type instead of an enum
8340 target_point_type.
8341 (aarch64_supports_z_point_type): New function.
8342 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8343 use Z_packet_to_target_hw_bp_type.
8344
8345 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8346
8347 * configure.ac: Only use -Werror by default when DEVELOPMENT
8348 is true.
8349 * configure: Regenerate.
8350
8351 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8352
8353 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8354 * linux-x86-low.c (X86_64_USER_REGS): New.
8355 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8356
8357 2014-04-28 Yao Qi <yao@codesourcery.com>
8358
8359 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8360 name.
8361
8362 2014-04-25 Pedro Alves <palves@redhat.com>
8363
8364 PR server/16255
8365 * linux-low.c (linux_attach_fail_reason_string): New function.
8366 (linux_attach_lwp): Delete.
8367 (linux_attach_lwp_1): Rename to ...
8368 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8369 argument. Remove "initial" parameter. Return int instead of
8370 void. Don't error or warn here.
8371 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8372 failure to attach to the tgid. Call warning when failing to
8373 attach to an lwp.
8374 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8375 argument. Remove "initial" parameter. Return int instead of
8376 void. Don't error or warn here.
8377 (linux_attach_fail_reason_string): New declaration.
8378 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8379 interface change. Use linux_attach_fail_reason_string.
8380
8381 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8382 Walfred Tedeschi <walfred.tedeschi@intel.com>
8383
8384 * Makefile.in: Added rules to handle new files
8385 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8386 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8387 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8388 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8389 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8390 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8391 x32-avx512-linux.o.
8392 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8393 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8394 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8395 i386/x32-avx512.xml.
8396 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8397 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8398 i386/x32-avx512-linux.xml.
8399 * i387-fp.c (num_avx512_k_registers): New constant for number
8400 of K registers.
8401 (num_avx512_zmmh_low_registers): New constant for number of
8402 lower ZMM registers (0-15).
8403 (num_avx512_zmmh_high_registers): New constant for number of
8404 higher ZMM registers (16-31).
8405 (num_avx512_ymmh_registers): New contant for number of higher
8406 YMM registers (ymm16-31 added by avx521 on x86_64).
8407 (num_avx512_xmm_registers): New constant for number of higher
8408 XMM registers (xmm16-31 added by AVX512 on x86_64).
8409 (struct i387_xsave): Add space for AVX512 registers.
8410 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8411 Add code to handle AVX512 registers.
8412 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8413 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8414 prototypei from generated file.
8415 (tdesc_amd64_avx512_linux): Likewise.
8416 (init_registers_x32_avx512_linux): Likewise.
8417 (tdesc_x32_avx512_linux): Likewise.
8418 (init_registers_i386_avx512_linux): Likewise.
8419 (tdesc_i386_avx512_linux): Likewise.
8420 (x86_64_regmap): Add AVX512 registers.
8421 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8422 mask.
8423 (initialize_low_arch): Add code to initialize AVX512 registers.
8424
8425 2014-04-23 Pedro Alves <palves@redhat.com>
8426
8427 * mem-break.c (find_gdb_breakpoint_at): Make static.
8428 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8429
8430 2014-04-23 Pedro Alves <palves@redhat.com>
8431
8432 * i386-low.c: Don't include break-common.h here.
8433 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8434 prototype to take target_hw_bp_type as argument instead of a Z
8435 packet char.
8436 * i386-low.h: Include break-common.h here.
8437 (Z_packet_to_hw_type): Declare.
8438 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8439 prototypes.
8440 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8441 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8442 (x86_remove_point): Convert the packet number to a
8443 target_hw_bp_type before calling i386_low_remove_watchpoint.
8444 * win32-i386-low.c (i386_insert_point): Convert the packet number
8445 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8446 (i386_remove_point): Convert the packet number to a
8447 target_hw_bp_type before calling i386_low_remove_watchpoint.
8448
8449 2014-04-23 Pedro Alves <palves@redhat.com>
8450
8451 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8452
8453 2014-04-10 Pedro Alves <palves@redhat.com>
8454
8455 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8456 Check if the condition or command is NULL before checking if the
8457 breakpoint is known. On success, return true.
8458 * mem-break.h (add_breakpoint_condition): Document return.
8459 (add_breakpoint_commands): Add describing comment.
8460 * server.c (skip_to_semicolon): New function.
8461 (process_point_options): Use it.
8462
8463 2014-04-09 Pedro Alves <palves@redhat.com>
8464
8465 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8466 to lwpid_of.
8467
8468 2014-02-27 Pedro Alves <palves@redhat.com>
8469
8470 PR 12702
8471 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8472 macros.
8473 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8474 output.
8475 (last_thread_of_process_p): Take a PID argument instead of a
8476 thread pointer.
8477 (linux_wait_for_lwp): Delete.
8478 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8479 functions.
8480 (linux_low_filter_event): New function, party factored out from
8481 linux_wait_for_event.
8482 (linux_wait_for_event): Rename to ...
8483 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8484 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8485 sigsuspend. Check for zombie leaders.
8486 (linux_wait_for_event): Reimplement as wrapper around
8487 linux_wait_for_event_filtered.
8488 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8489 a normal or signal exit is seen, it's the whole process exiting.
8490 (wait_for_sigstop): No longer a for_each_inferior callback.
8491 Rewrite on top of linux_wait_for_event_filtered.
8492 (stop_all_lwps): Call wait_for_sigstop directly.
8493 * server.c (resume, handle_target_event): Handle
8494 TARGET_WAITKIND_NO_RESUMED.
8495
8496 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8497
8498 * win32-low.c (psapi_get_dll_name,
8499 * win32_CreateToolhelp32Snapshot): Delete.
8500 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8501 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8502 Delete.
8503 (handle_load_dll): Add function description.
8504 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8505
8506 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8507
8508 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8509 Add comment.
8510 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8511 base address when calling win32_add_one_solib.
8512 (handle_load_dll): Delete local variable load_addr.
8513 Remove 0x1000 offset applied to DLL base address when calling
8514 win32_add_one_solib.
8515 (handle_unload_dll): Add comment.
8516
8517 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8518
8519 * win32-low.c (win32_add_all_dlls): Renames
8520 win32_ensure_ntdll_loaded. Rewrite function documentation.
8521 Adjust implementation to always load all DLLs.
8522 Add 0x1000 offset to DLL base address when calling
8523 win32_add_one_solib.
8524 (child_initialization_done): New static global.
8525 (do_initial_child_stuff): Set child_initialization_done to
8526 zero during child initialization, and 1 after. Replace call
8527 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8528 Add comment.
8529 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8530 (handle_unload_dll): Add function documentation.
8531 (get_child_debug_event): Ignore load and unload DLL events
8532 during child initialization.
8533
8534 2014-02-20 Doug Evans <dje@google.com>
8535
8536 Remove global all_lwps.
8537 * inferiors.h (ptid_of): Move here from linux-low.h.
8538 (pid_of, lwpid_of): Ditto.
8539 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8540 parameter is a struct thread_info * now.
8541 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8542 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8543 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8544 directly.
8545 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8546 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8547 * linux-arm-low.c (update_registers_callback): Update, "entry"
8548 parameter is a struct thread_info * now.
8549 Fetch lwpid from current_inferior directly.
8550 (arm_insert_point): Pass &all_threads to find_inferior instead of
8551 &all_lwps.
8552 (arm_remove_point): Ditto.
8553 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8554 (arm_prepare_to_resume): Fetch pid from thread.
8555 (arm_read_description): Fetch lwpid from current_inferior directly.
8556 * linux-low.c (all_lwps): Delete.
8557 (delete_lwp): Delete call to remove_inferior.
8558 (handle_extended_wait): Fetch lwpid from thread.
8559 (add_lwp): Don't set lwp->entry.id. Remove call to
8560 add_inferior_to_list.
8561 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8562 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8563 (kill_one_lwp_callback): Ditto.
8564 (linux_kill): Don't dereference NULL pointer.
8565 Fetch ptid,lwpid from thread.
8566 (get_detach_signal): Fetch ptid from thread.
8567 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8568 Simplify call to regcache_invalidate_thread.
8569 (delete_lwp_callback): Update, "entry" parameter is a
8570 struct thread_info * now. Fetch pid from thread.
8571 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8572 (status_pending_p_callback): Update, "entry" parameter is a
8573 struct thread_info * now. Fetch ptid from thread.
8574 (find_lwp_pid): Update, "entry" parameter is a
8575 struct thread_info * now.
8576 (linux_wait_for_lwp): Fetch pid from thread.
8577 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8578 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8579 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8580 (dequeue_one_deferred_signal): Ditto.
8581 (cancel_breakpoint): Fetch ptid from current_inferior.
8582 (linux_wait_for_event): Pass &all_threads to find_inferior,
8583 not &all_lwps. Fetch ptid, lwpid from thread.
8584 (count_events_callback): Update, "entry" parameter is a
8585 struct thread_info * now.
8586 (select_singlestep_lwp_callback): Ditto.
8587 (select_event_lwp_callback): Ditto.
8588 (cancel_breakpoints_callback): Ditto.
8589 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8590 not &all_lwps.
8591 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8592 (unsuspend_one_lwp): Update, "entry" parameter is a
8593 struct thread_info * now.
8594 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8595 not &all_lwps.
8596 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8597 Fetch lwpid from thread, not lwp.
8598 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8599 Pass &all_threads to find_inferior, not &all_lwps.
8600 (send_sigstop): Fetch lwpid from thread, not lwp.
8601 (send_sigstop_callback): Update, "entry" parameter is a
8602 struct thread_info * now.
8603 (suspend_and_send_sigstop_callback): Ditto.
8604 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8605 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8606 struct thread_info * now.
8607 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8608 from thread, lwp.
8609 (lwp_running): Update, "entry" parameter is a
8610 struct thread_info * now.
8611 (stop_all_lwps): Fetch ptid from thread.
8612 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8613 (linux_resume_one_lwp): Fetch lwpid from thread.
8614 (linux_set_resume_request): Update, "entry" parameter is a
8615 struct thread_info * now. Fetch pid, lwpid from thread.
8616 (resume_status_pending_p): Update, "entry" parameter is a
8617 struct thread_info * now.
8618 (need_step_over_p): Ditto. Fetch lwpid from thread.
8619 (start_step_over): Fetch lwpid from thread.
8620 (linux_resume_one_thread): Update, "entry" parameter is a
8621 struct thread_info * now. Fetch lwpid from thread.
8622 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8623 (proceed_one_lwp): Update, "entry" parameter is a
8624 struct thread_info * now. Fetch lwpid from thread.
8625 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8626 struct thread_info * now.
8627 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8628 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8629 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8630 directly.
8631 (regsets_store_inferior_registers): Ditto.
8632 (fetch_register, store_register): Ditto.
8633 (linux_read_memory, linux_write_memory): Ditto.
8634 (linux_request_interrupt): Ditto.
8635 (linux_read_auxv): Ditto.
8636 (linux_xfer_siginfo): Ditto.
8637 (linux_qxfer_spu): Ditto.
8638 (linux_qxfer_libraries_svr4): Ditto.
8639 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8640 moved to inferiors.h.
8641 (get_lwp): Delete.
8642 (get_thread_lwp): Update.
8643 (struct lwp_info): Delete member "entry". Simplify comment for
8644 member "thread".
8645 (all_lwps): Delete.
8646 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8647 current_inferior directly.
8648 (update_watch_registers_callback): Update, "entry" parameter is a
8649 struct thread_info * now. Fetch pid from thread.
8650 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8651 (mips_insert_point): Fetch lwpid from current_inferior.
8652 Pass &all_threads to find_inferior, not &all_lwps.
8653 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8654 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8655 directly.
8656 (mips_stopped_data_address): Ditto.
8657 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8658 directly.
8659 * linux-tile-low.c (tile_arch_setup): Ditto.
8660 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8661 (update_debug_registers_callback): Update, "entry" parameter is a
8662 struct thread_info * now. Fetch pid from thread.
8663 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8664 Pass &all_threads to find_inferior, not &all_lwps.
8665 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8666 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8667 Pass &all_threads to find_inferior, not &all_lwps.
8668 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8669 (i386_dr_low_get_status): Ditto.
8670 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8671 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8672 (x86_linux_read_description): Ditto.
8673 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8674
8675 2014-02-20 Doug Evans <dje@google.com>
8676
8677 * inferiors.c (get_first_inferior): Fix buglet.
8678
8679 2014-02-19 Doug Evans <dje@google.com>
8680
8681 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8682 * inferiors.c (add_thread): Change result type to struct thread_info *.
8683 All callers updated.
8684 (add_lwp): Call add_thread here instead of in callers.
8685 All callers updated.
8686 * linux-low.h (get_lwp_thread): Rewrite.
8687 (struct lwp_info): New member "thread".
8688
8689 2014-02-19 Doug Evans <dje@google.com>
8690
8691 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8692 All callers updated.
8693
8694 2014-02-19 Doug Evans <dje@google.com>
8695
8696 * inferiors.c (add_thread): Fix whitespace.
8697
8698 2014-02-19 Doug Evans <dje@google.com>
8699
8700 * dll.c (clear_dlls): Replace accessing list implemention details
8701 with API function.
8702 * gdbthread.h (get_first_thread): Declare.
8703 * inferiors.c (for_each_inferior_with_data): New function.
8704 (get_first_thread): New function.
8705 (find_thread_ptid): Simplify.
8706 (get_first_inferior): New function.
8707 (clear_list): Delete.
8708 (one_inferior_p): New function.
8709 (clear_inferior_list): New function.
8710 (clear_inferiors): Update.
8711 * inferiors.h (for_each_inferior_with_data): Declare.
8712 (clear_inferior_list): Declare.
8713 (one_inferior_p): Declare.
8714 (get_first_inferior): Declare.
8715 * linux-low.c (linux_wait_for_event): Replace accessing list
8716 implemention details with API function.
8717 * server.c (target_running): Ditto.
8718 (accumulate_file_name_length): New function.
8719 (emit_dll_description): New function.
8720 (handle_qxfer_libraries): Replace accessing list implemention
8721 details with API function.
8722 (handle_qxfer_threads_worker): New function.
8723 (handle_qxfer_threads_proper): Replace accessing list implemention
8724 details with API function.
8725 (handle_query): Ditto.
8726 (visit_actioned_threads_callback_ftype): New typedef.
8727 (visit_actioned_threads_data): New struct.
8728 (visit_actioned_threads): Rewrite to be find_inferior callback.
8729 (resume): Call find_inferior.
8730 (handle_status): Replace accessing list implemention
8731 details with API function.
8732 (process_serial_event): Replace accessing list implemention details
8733 with API function.
8734 * target.c (set_desired_inferior): Replace accessing list implemention
8735 details with API function.
8736 * tracepoint.c (same_process_p): New function.
8737 (gdb_agent_about_to_close): Replace accessing list implemention
8738 details with API function.
8739 * win32-low.c (child_delete_thread): Replace accessing list
8740 implemention details with API function.
8741 (match_dll_by_basename): New function.
8742 (dll_is_loaded_by_basename): New function.
8743 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8744 details call to dll_is_loaded_by_basename.
8745
8746 2014-02-19 Doug Evans <dje@google.com>
8747
8748 * dll.h (struct dll_info): Add comment.
8749 * gdbthread.h (struct thread_info): Add comment.
8750 (current_ptid): Simplify.
8751 * inferiors.c (add_process): Update.
8752 (remove_process): Update.
8753 * inferiors.h (struct process_info): Rename member "head" to "entry".
8754 * linux-low.c (delete_lwp): Update.
8755 (add_lwp): Update.
8756 (last_thread_of_process_p): Update.
8757 (kill_one_lwp_callback, linux_kill): Update.
8758 (status_pending_p_callback): Update.
8759 (wait_for_sigstop): Update. Simplify read of ptid.
8760 (start_step_over): Update.
8761 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8762 (get_lwp_thread): Update.
8763 (struct lwp_info): Rename member "head" to "entry".
8764 * regcache.h (inferior_list_entry): Delete.
8765 * server.c (kill_inferior_callback): Update.
8766 (detach_or_kill_inferior_callback): Update.
8767 (print_started_pid): Update.
8768 (print_attached_pid): Update.
8769 (process_serial_event): Simplify read of ptid.
8770 * thread-db.c (thread_db_create_event): Update.
8771 (thread_db_get_tls_address): Update.
8772 * win32-low.c (current_inferior_ptid): Simplify.
8773
8774 2014-02-19 Tom Tromey <tromey@redhat.com>
8775
8776 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8777 argument.
8778 (target_supports_btrace): Update.
8779
8780 2014-02-14 Yao Qi <yao@codesourcery.com>
8781
8782 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8783 (rsp-low-ipa.o): New target.
8784
8785 2014-02-12 Tom Tromey <tromey@redhat.com>
8786
8787 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8788 convert_ascii_to_int.
8789 * regcache.c (registers_to_string): Likewise.
8790 * remote-utils.c (decode_M_packet): Likewise.
8791 * server.c (process_serial_event): Likewise.
8792
8793 2014-02-12 Tom Tromey <tromey@redhat.com>
8794
8795 * server.c (handle_query, handle_v_run): Use hex2bin, not
8796 unhexify.
8797 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8798
8799 2014-02-12 Tom Tromey <tromey@redhat.com>
8800
8801 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8802 convert_int_to_ascii.
8803 * regcache.c (registers_to_string, collect_register_as_string):
8804 Likewise.
8805 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8806 Likewise.
8807 * server.c (process_serial_event): Likewise.
8808 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8809 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8810
8811 2014-02-12 Tom Tromey <tromey@redhat.com>
8812
8813 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8814 bin2hex, not hexify.
8815 * tracepoint.c (cmd_qtstatus): Likewise.
8816
8817 2014-02-12 Tom Tromey <tromey@redhat.com>
8818
8819 * remote-utils.c (monitor_output): Pass explicit length to
8820 hexify.
8821
8822 2014-02-12 Tom Tromey <tromey@redhat.com>
8823
8824 * tracepoint.c: Include rsp-low.h.
8825 * server.c: Include rsp-low.h.
8826 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8827 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8828 declare.
8829 * remote-utils.c: Include rsp-low.h.
8830 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8831 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8832 (convert_int_to_ascii, convert_ascii_to_int): Move to
8833 common/rsp-low.c.
8834 * regcache.c: Include rsp-low.h.
8835 * ax.c: Include rsp-low.h.
8836 * Makefile.in (SFILES): Add common/rsp-low.c.
8837 (OBS): Add rsp-low.o.
8838 (rsp-low.o): New target.
8839
8840 2014-02-12 Tom Tromey <tromey@redhat.com>
8841
8842 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8843 Include print-utils.h.
8844 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8845 (plongest, thirty_two, phex_nz): Remove.
8846 * Makefile.in (SFILES): Add common/print-utils.c.
8847 (OBS): Add print-utils.o.
8848 (print-utils-ipa.o): New target.
8849 (print-utils.o): New target.
8850 (IPA_OBJS): Add print-utils-ipa.o.
8851
8852 2014-02-06 Tom Tromey <tromey@redhat.com>
8853
8854 * Makefile.in (SFILES): Fix indentation.
8855
8856 2014-02-05 Doug Evans <dje@google.com>
8857
8858 * linux-low.c (linux_wait_for_event): Improve comment.
8859 (linux_wait_1): Keep current_inferior in sync with event_child.
8860
8861 2014-01-22 Doug Evans <dje@google.com>
8862
8863 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8864
8865 2014-01-22 Doug Evans <dje@google.com>
8866
8867 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8868 * configure: Regenerate.
8869 * config.in: Regenerate.
8870 * Makefile.in (SFILES): Add debug.c.
8871 (OBS): Add debug.o.
8872 * debug.c: New file.
8873 * debug.h: New file.
8874 * linux-aarch64-low.c (*): Update all debugging printfs to use
8875 debug_printf instead of fprintf.
8876 * linux-arm-low.c (*): Ditto.
8877 * linux-cris-low.c (*): Ditto.
8878 * linux-crisv32-low.c (*): Ditto.
8879 * linux-m32r-low.c (*): Ditto.
8880 * linux-sparc-low.c (*): Ditto.
8881 * linux-x86.c (*): Ditto.
8882 * linux-low.c (*): Ditto.
8883 (linux_wait_1): Add calls to debug_enter, debug_exit.
8884 (linux_wait): Remove redundant debugging printf.
8885 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8886 (linux_resume, unstop_all_lwps): Ditto.
8887 * mem-break.c (*): Update all debugging printfs to use
8888 debug_printf instead of fprintf.
8889 * remote-utils.c (*): Ditto.
8890 * thread-db.c (*): Ditto.
8891 * server.c #include <ctype.h>, "gdb_vecs.h".
8892 (debug_threads): Moved to debug.c.
8893 (*): Update all debugging printfs to use debug_printf instead of
8894 fprintf.
8895 (start_inferior): Replace call to fflush with call to debug_flush.
8896 (monitor_show_help): Mention set debug-format.
8897 (parse_debug_format_options): New function.
8898 (handle_monitor_command): Handle "monitor set debug-format".
8899 (gdbserver_usage): Mention --debug-format.
8900 (main): Parse --debug-format.
8901 * server.h (debug_threads): Declaration moved to debug.h.
8902 #include "debug.h".
8903 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8904 trace_debug_1 that uses debug_printf.
8905 (tracepoint_look_up_symbols): Update all debugging printfs to use
8906 debug_printf instead of fprintf.
8907
8908 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8909
8910 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8911 sys/ptrace.h.
8912
8913 2014-01-17 Pedro Alves <palves@redhat.com>
8914
8915 PR build/16445
8916 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8917 defined after including gdb_proc_service.h.
8918
8919 2014-01-16 Doug Evans <dje@google.com>
8920
8921 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8922 (match_dll): Use it.
8923
8924 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8925
8926 * target.h (target_ops) <read_btrace>: Change parameters and
8927 return type to allow error reporting.
8928 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8929 trace reading errors on.
8930 * linux-low.c (linux_low_read_btrace): Pass trace reading
8931 errors on.
8932 (linux_low_disable_btrace): New.
8933
8934 2014-01-15 Doug Evans <dje@google.com>
8935
8936 * inferiors.c (thread_id_to_gdb_id): Delete.
8937 * inferiors.h (thread_id_to_gdb_id): Delete.
8938
8939 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8940
8941 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8942 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8943 versions.
8944
8945 2014-01-08 Pedro Alves <palves@redhat.com>
8946
8947 * server.c (handle_status): Don't discard previous queued stop
8948 replies or thread's pending status here.
8949 (main) <disconnection>: Do it here instead.
8950
8951 2014-01-08 Pedro Alves <palves@redhat.com>
8952
8953 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8954 * server.c (visit_actioned_threads, handle_pending_status): New
8955 function.
8956 (handle_v_cont): Factor out parts to ...
8957 (resume): ... this new function. If in all-stop, and a thread
8958 being resumed has a pending status, report it without actually
8959 resuming.
8960 (myresume): Adjust to use the new 'resume' function.
8961 (clear_pending_status_callback, set_pending_status_callback)
8962 (find_status_pending_thread_callback): New functions.
8963 (handle_status): Handle the case of multiple threads having
8964 interesting statuses to report. Report threads' real last signal
8965 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8966 with an interesting thread to report the status for, instead of
8967 always reporting the status of the first thread.
8968
8969 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8970
8971 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8972 * gdbreplay.c (gdbreplay_version): Likewise.
8973
8974 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8975
8976 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8977 iov.iov_len with the real length in use.
8978
8979 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8980
8981 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8982 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8983 for all targets that use win32-low.c.
8984 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8985 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8986
8987 2013-12-13 Pedro Alves <palves@redhat.com>
8988
8989 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8990 if equal to TARGET_WAITKIND_LOADED.
8991 * win32-low.c (cached_status): New static global.
8992 (win32_wait): Add declaration.
8993 (do_initial_child_stuff): Flush all initial pending debug events
8994 up to the initial breakpoint.
8995 (win32_wait): If CACHED_STATUS was set, return that instead
8996 of doing a real wait. Remove the code resuming the execution
8997 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8998 during the initial phase. Also remove the code changing
8999 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9000 TARGET_WAITKIND_STOPPED.
9001
9002 2013-12-11 Yao Qi <yao@codesourcery.com>
9003
9004 * notif.c (handle_notif_ack): Return 0 if no notification
9005 matches.
9006
9007 2013-11-20 Doug Evans <dje@google.com>
9008
9009 * linux-low.c (linux_set_resume_request): Fix comment.
9010
9011 2013-11-20 Doug Evans <dje@google.com>
9012
9013 * linux-low.c (resume_status_pending_p): Tweak comment.
9014
9015 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9016
9017 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9018 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9019 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9020 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9021 (srv_amd64_regobj): Add amd64-mpx.o.
9022 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9023 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9024 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9025 * i387-fp.c (num_pl_bnd_register) Added constant.
9026 (num_pl_bnd_cfg_registers) Added constant.
9027 (struct i387_xsave) Added reserved area and MPX fields.
9028 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9029 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9030 function.
9031 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9032 (init_registers_amd64_mpx_linux): Declare new function.
9033 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9034 (x86_64_regmap): Add MPX registers.
9035 (x86_linux_read_description): Add MPX case.
9036 (initialize_low_arch): Initialize MPX targets.
9037
9038 2013-11-18 Tom Tromey <tromey@redhat.com>
9039
9040 * configure: Rebuild.
9041 * configure.ac: Don't check for stdlib.h.
9042 * gdbreplay.c: Unconditionally include stdlib.h.
9043
9044 2013-11-18 Tom Tromey <tromey@redhat.com>
9045
9046 * config.in: Rebuild.
9047 * configure: Rebuild.
9048 * configure.ac: Don't use AC_HEADER_DIRENT.
9049
9050 2013-11-18 Tom Tromey <tromey@redhat.com>
9051
9052 * server.h: Don't check HAVE_STRING_H.
9053 * gdbreplay.c: Don't check HAVE_STRING_H.
9054 * configure: Rebuild.
9055
9056 2013-11-18 Tom Tromey <tromey@redhat.com>
9057
9058 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9059 LIBGNU.
9060
9061 2013-11-08 Tom Tromey <tromey@redhat.com>
9062
9063 * configure, config.in: Rebuild.
9064 * configure.ac: Remove unused configury.
9065
9066 2013-11-08 Tom Tromey <tromey@redhat.com>
9067
9068 * acinclude.m4: Include common.m4, codeset.m4.
9069 * configure, config.in: Rebuild.
9070 * configure.ac: Use GDB_AC_COMMON.
9071
9072 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9073
9074 * linux-s390-low.c (HWCAP_S390_TE): New define.
9075 (s390_arch_setup): Consider the TE field in the HWCAP for
9076 determining 'have_regset_tdb'.
9077
9078 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9079
9080 PR gdb/16014
9081 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9082 call to sizeof.
9083
9084 2013-10-02 Pedro Alves <palves@redhat.com>
9085
9086 * server.c (process_serial_event): Don't output "GDBserver
9087 exiting" if GDB is connected through stdio.
9088 * target.c (mywait): Likewise, be silent if GDB is connected
9089 through stdio.
9090
9091 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9092
9093 * lynx-low.c (lynx_add_threads_after_attach): New function.
9094 (lynx_attach): Remove call to add_thread. Add call to
9095 lynx_add_threads_after_attach instead.
9096
9097 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9098
9099 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9100 * config.in, configure: Regenerated.
9101
9102 2013-09-18 Yao Qi <yao@codesourcery.com>
9103
9104 PR server/15959
9105 * server.c (start_inferior): Clear 'resume_info'.
9106
9107 2013-09-16 Jiong Wang <jiwang@tilera.com>
9108
9109 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9110 for each register.
9111
9112 2013-09-16 Jiong Wang <jiwang@tilera.com>
9113
9114 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9115 linux-tile-low.o to srv_tgtobj.
9116
9117 2013-09-16 Will Newton <will.newton@linaro.org>
9118
9119 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9120 out regs.
9121
9122 2013-09-06 Pedro Alves <palves@redhat.com>
9123
9124 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9125 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9126 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9127 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9128 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9129 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9130
9131 2013-09-06 Pedro Alves <palves@redhat.com>
9132
9133 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9134 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9135
9136 2013-09-06 Pedro Alves <palves@redhat.com>
9137
9138 * linux-amd64-ipa.c: Include tracepoint.h.
9139 * linux-i386-ipa.c: Include tracepoint.h.
9140
9141 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9142
9143 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9144 (ps_get_thread_area): New function.
9145
9146 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9147
9148 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9149 (initialize_low_arch): Call init_registers_crisv32 rather than
9150 init_register_crisv32.
9151
9152 2013-09-05 Pedro Alves <palves@redhat.com>
9153
9154 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9155 to ...
9156 * hostio.h: ... this new file.
9157 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9158 win32-low.c: Include hostio.h.
9159
9160 2013-09-05 Pedro Alves <palves@redhat.com>
9161
9162 * server.h (gdb_client_data, handler_func, callback_handler_func)
9163 (delete_file_handler, add_file_handler, append_callback_event)
9164 (delete_callback_event, start_event_loop, initialize_event_loop):
9165 Move to event-loop.h and include it.
9166 * event-loop.h: New file.
9167
9168 2013-09-05 Pedro Alves <palves@redhat.com>
9169
9170 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9171 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9172 (loaded_dll, unloaded_dll): Move to ...
9173 * dll.h: ... this new file.
9174 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9175
9176 2013-09-05 Pedro Alves <palves@redhat.com>
9177
9178 * server.h (current_process, get_thread_process, all_processes)
9179 (add_inferior_to_list, for_each_inferior, current_inferior)
9180 (remove_inferior, add_process, remove_process, find_process_pid)
9181 (have_started_inferiors_p, have_attached_inferiors_p)
9182 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9183 (clear_inferiors, find_inferior, find_inferior_id)
9184 (inferior_target_data, set_inferior_target_data)
9185 (inferior_regcache_data, set_inferior_regcache_data): Move to
9186 inferiors.h, and include it.
9187 * inferiors.h: New file.
9188
9189 2013-09-05 Pedro Alves <palves@redhat.com>
9190
9191 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9192 Move ...
9193 * ax.h: ... here.
9194
9195 2013-09-05 Pedro Alves <palves@redhat.com>
9196
9197 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9198 tracepoint.h.
9199 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9200 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9201 (handle_tracepoint_general_set, handle_tracepoint_query)
9202 (tracepoint_finished_step, tracepoint_was_hit)
9203 (release_while_stepping_state_list, current_traceframe)
9204 (in_readonly_region, traceframe_read_mem)
9205 (fetch_traceframe_registers, traceframe_read_sdata)
9206 (traceframe_read_info, struct fast_tpoint_collect_status)
9207 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9208 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9209 (supply_fast_tracepoint_registers)
9210 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9211 (ipa_tdesc, claim_trampoline_space)
9212 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9213 (agent_mem_read, agent_get_trace_state_variable_value)
9214 (agent_set_trace_state_variable_value, agent_tsv_read)
9215 (agent_mem_read_string, get_raw_reg_func_addr)
9216 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9217 * tracepoint.h: ... this new file.
9218
9219 2013-09-05 Pedro Alves <palves@redhat.com>
9220
9221 * server.h (perror_with_name, error, fatal, warning, paddress)
9222 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9223 include it.
9224 * utils.h: New file.
9225
9226 2013-09-05 Pedro Alves <palves@redhat.com>
9227
9228 * server.h (remote_debug, noack_mode, transport_is_reliable)
9229 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9230 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9231 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9232 (write_enn, initialize_async_io, enable_async_io)
9233 (disable_async_io, check_remote_input_interrupt_request)
9234 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9235 (dead_thread_notify, prepare_resume_reply)
9236 (decode_address_to_semicolon, decode_address, decode_m_packet)
9237 (decode_M_packet, decode_X_packet, decode_xfer_write)
9238 (decode_search_memory_packet, unhexify, hexify)
9239 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9240 (look_up_one_symbol, relocate_instruction)
9241 (monitor_output): Move to remote-utils.h, and include it.
9242 * remote-utils.h: New file.
9243
9244 2013-09-05 Pedro Alves <palves@redhat.com>
9245
9246 * server.h (_): Delete.
9247
9248 2013-09-02 Pedro Alves <palves@redhat.com>
9249
9250 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9251 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9252 allocated.
9253 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9254
9255 2013-09-02 Pierre Muller <muller@sourceware.org>
9256
9257 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9258 or WriteProcessMemory complete successfully and handle
9259 ERROR_PARTIAL_COPY error.
9260
9261 2013-09-02 Pedro Alves <palves@redhat.com>
9262
9263 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9264 error instead of EIO.
9265
9266 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9267
9268 PR server/15604
9269 * linux-low.c: Include filestuff.h.
9270 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9271 * lynx-low.c: Include filestuff.h.
9272 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9273 * server.c: Include filestuff.h.
9274 (main): Call notice_open_fds.
9275 * spu-low.c: Include filestuff.h.
9276 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9277
9278 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9279
9280 * Makefile.in: Explain why ../target and ../nat are not
9281 listed as include file search paths.
9282 (linux-waitpid.o): New object file rule.
9283 * configure.srv (srv_native_linux_obj): New variable.
9284 Replace all occurrences of linux native object files with
9285 $srv_native_linux_obj.
9286 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9287 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9288 (linux_enable_event_reporting): Remove declaration.
9289 (my_waitpid): Moved to common/linux-waitpid.c.
9290 (linux_wait_for_event): Pass ptid when calling
9291 linux_enable_event_reporting.
9292 (linux_supports_tracefork_flag): Remove.
9293 (linux_enable_event_reporting): Likewise.
9294 (linux_tracefork_grandchild): Remove.
9295 (STACK_SIZE): Moved to common/linux-ptrace.c.
9296 (linux_tracefork_child): Remove.
9297 (linux_test_for_tracefork): Remove.
9298 (linux_look_up_symbols): Call linux_supports_traceclone.
9299 (initialize_low): Remove call to linux_test_for_tracefork.
9300 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9301 common/linux-ptrace.h.
9302 (PTRACE_TYPE_ARG4): Likewise.
9303 Include linux-ptrace.h.
9304
9305 2013-08-21 Pedro Alves <palves@redhat.com>
9306
9307 * config.in: Renegerate.
9308
9309 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9310
9311 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9312 (SFILES): Remove $(srcdir)/common/target-common.c and
9313 add $(srcdir)/target/waitstatus.c.
9314 (OBS): Remove target-common.o and add waitstatus.o.
9315 (server_h): Remove $(srcdir)/../common/target-common.h and
9316 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9317 and $(srcdir)/../target/waitstatus.h.
9318 (target-common.o): Remove.
9319 (waitstatus.o): New target object file.
9320 * target.h: Do not include target-common.h and
9321 include target/resume.h, target/wait.h and
9322 target/waitstatus.h.
9323
9324 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9325
9326 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9327 to PTRACE_TYPE_ARG3.
9328 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9329 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9330 PTRACE_TYPE_ARG4.
9331 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9332 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9333
9334 2013-07-27 Jie Zhang <jie@codesourcery.com>
9335 Daniel Jacobowitz <dan@codesourcery.com>
9336 Yao Qi <yao@codesourcery.com>
9337
9338 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9339 (mips-linux-watch.o): New rule.
9340 (mips_linux_watch_h): New variable.
9341 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9342 srv_tgtobj.
9343 * linux-mips-low.c: Include mips-linux-watch.h.
9344 (struct arch_process_info, struct arch_lwp_info): New.
9345 (update_watch_registers_callback): New function.
9346 (mips_linux_new_process, mips_linux_new_thread) New functions.
9347 (mips_linux_prepare_to_resume, mips_insert_point): New
9348 functions.
9349 (mips_remove_point, mips_stopped_by_watchpoint): New
9350 functions.
9351 (rsp_bp_type_to_target_hw_bp_type): New function.
9352 (mips_stopped_data_address): New function.
9353 (the_low_target): Add watchpoint support functions.
9354
9355 2013-07-27 Yao Qi <yao@codesourcery.com>
9356
9357 * i386-low.c: Include break-common.h.
9358 (enum target_hw_bp_type): Remove.
9359
9360 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9361
9362 * Makefile.in (SFILES): /common/target-common.c.
9363 (OBS): Add target-common.o.
9364 (server_h): Add $(srcdir)/../common/target-common.h.
9365 (target-common.o): New target.
9366 * server.c (queue_stop_reply_callback): Free
9367 status string after use.
9368 * target.c (target_waitstatus_to_string): Remove.
9369 * target.h: Include target-common.h.
9370 (resume_kind): Likewise.
9371 (target_waitkind): Likewise.
9372 (target_waitstatus): Likewise.
9373 (TARGET_WNOHANG): Likewise.
9374
9375 2013-07-04 Yao Qi <yao@codesourcery.com>
9376
9377 * Makefile.in (host_alias): Use @host_noncanonical@.
9378 (target_alias): Use @target_noncanonical@.
9379 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9380 ACX_NONCANONICAL_HOST.
9381 * configure: Regenerated.
9382
9383 Revert:
9384 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9385
9386 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9387 * configure: Rebuild.
9388 * Makefile.in (version_host, version_target): Get from configure.
9389 (version.c): Use $(version_host) and $(version_target).
9390
9391 2013-07-03 Pedro Alves <palves@redhat.com>
9392
9393 * Makefile.in (config.status): Depend on development.sh.
9394 * acinclude.m4: Include libmcheck.m4.
9395 * configure: Regenerate.
9396
9397 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9398
9399 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9400 attribute inside the parentheses.
9401 (winapi_DebugSetProcessKillOnExit): Ditto.
9402 (winapi_DebugBreakProcess): Ditto.
9403 (winapi_GenerateConsoleCtrlEvent): Ditto.
9404
9405 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9406
9407 * notif.h (notif_event): Add a dummy member to avoid compiler
9408 errors.
9409
9410 2013-07-01 Pedro Alves <palves@redhat.com>
9411
9412 * hostio.c (HOSTIO_PATH_MAX): Define.
9413 (require_filename, handle_open, handle_unlink, handle_readlink):
9414 Use it.
9415
9416 2013-07-01 Pedro Alves <palves@redhat.com>
9417
9418 * server.h: Include "pathmax.h".
9419 * linux-low.c: Don't include sys/param.h.
9420 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9421 MAXPATHLEN.
9422 * win32-low.c: Don't include sys/param.h.
9423 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9424
9425 2013-07-01 Pedro Alves <palves@redhat.com>
9426
9427 * event-loop.c: Don't check HAVE_UNISTD_H before including
9428 <unistd.h>.
9429 * gdbreplay.c: Likewise.
9430 * remote-utils.c: Likewise.
9431 * server.c: Likewise.
9432 * configure.ac: Don't check for unistd.h.
9433 * configure: Regenerate.
9434
9435 2013-06-28 Tom Tromey <tromey@redhat.com>
9436
9437 * Makefile.in (version.c): Use version.in, not
9438 common/version.in.
9439
9440 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9441
9442 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9443 * configure: Rebuild.
9444 * Makefile.in (version_host, version_target): Get from configure.
9445 (version.c): Use $(version_host) and $(version_target).
9446
9447 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9448
9449 Fix trace-status to output user name without trailing colon.
9450 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9451
9452 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9453
9454 Fix trace-status to output proper start-time and stop-time.
9455 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9456 output start time and stop time in hex as gdb expects.
9457
9458 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9459
9460 * tracepoint.c (build_traceframe_info_xml): Output trace state
9461 variables present in the trace buffer.
9462
9463 2013-06-24 Tom Tromey <tromey@redhat.com>
9464
9465 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9466 create-version.sh.
9467 (version.o): Remove.
9468 * gdbreplay.c: Include version.h.
9469 (version, host_name): Don't declare.
9470 * server.h: Include version.h.
9471 (version, host_name): Don't declare.
9472
9473 2013-06-12 Pedro Alves <palves@redhat.com>
9474
9475 * linux-x86-low.c (linux_is_elf64): Delete global.
9476 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9477 with local linux_pid_exe_is_elf_64_file use.
9478
9479 2013-06-11 Pedro Alves <palves@redhat.com>
9480
9481 * linux-low.c (regset_disabled, disable_regset): New functions.
9482 (regsets_fetch_inferior_registers)
9483 (regsets_store_inferior_registers): Use them.
9484 (initialize_regsets_info); Don't allocate the disabled_regsets
9485 array here.
9486 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9487 comment.
9488
9489 2013-06-11 Pedro Alves <palves@redhat.com>
9490
9491 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9492 xmalloc.
9493
9494 2013-06-11 Pedro Alves <palves@redhat.com>
9495
9496 * linux-x86-low.c (initialize_low_arch): Call
9497 init_registers_x32_avx_linux.
9498
9499 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9500
9501 Fix compatibility with Android Bionic.
9502 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9503 it is not empty.
9504
9505 2013-06-07 Pedro Alves <palves@redhat.com>
9506
9507 PR server/14823
9508 * Makefile.in (OBS): Add tdesc.o.
9509 (IPA_OBJS): Add tdesc-ipa.o.
9510 (tdesc-ipa.o): New rule.
9511 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9512 interface.
9513 * linux-low.c (new_inferior): Delete.
9514 (disabled_regsets, num_regsets): Delete.
9515 (linux_add_process): Adjust to set the new per-process
9516 new_inferior flag.
9517 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9518 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9519 was a stop. When calling arch_setup, switch the current inferior
9520 to the thread that got an event.
9521 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9522 (regsets_fetch_inferior_registers)
9523 (regsets_store_inferior_registers): New regsets_info parameter.
9524 Adjust to use it.
9525 (linux_register_in_regsets): New regs_info parameter. Adjust to
9526 use it.
9527 (register_addr, fetch_register, store_register): New usrregs_info
9528 parameter. Adjust to use it.
9529 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9530 parameter regs_info. Adjust to use it.
9531 (linux_fetch_registers): Get the current inferior's regs_info, and
9532 adjust to use it.
9533 (linux_store_registers): Ditto.
9534 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9535 (initialize_low): Don't initialize the target_regsets here. Call
9536 initialize_low_arch.
9537 * linux-low.h (target_regsets): Delete declaration.
9538 (struct regsets_info): New.
9539 (struct usrregs_info): New.
9540 (struct regs_info): New.
9541 (struct process_info_private) <new_inferior>: New field.
9542 (struct linux_target_ops): Delete the num_regs, regmap, and
9543 regset_bitmap fields. New field regs_info.
9544 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9545 * i387-fp.c (num_xmm_registers): Delete.
9546 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9547 calls to new interface.
9548 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9549 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9550 Infer the number of xmm registers from the regcache's target
9551 description.
9552 * i387-fp.h (num_xmm_registers): Delete.
9553 * inferiors.c (add_thread): Don't install the thread's regcache
9554 here.
9555 * proc-service.c (gregset_info): Fetch the current inferior's
9556 regs_info. Adjust to use it.
9557 * regcache.c: Include tdesc.h.
9558 (register_bytes, reg_defs, num_registers)
9559 (gdbserver_expedite_regs): Delete.
9560 (get_thread_regcache): If the thread doesn't have a regcache yet,
9561 create one, instead of aborting gdbserver.
9562 (regcache_invalidate_one): Rename to ...
9563 (regcache_invalidate_thread): ... this.
9564 (regcache_invalidate_one): New.
9565 (regcache_invalidate): Only invalidate registers of the current
9566 process.
9567 (init_register_cache): Add target_desc parameter, and use it.
9568 (new_register_cache): Ditto. Assert the target description has a
9569 non zero registers_size.
9570 (regcache_cpy): Add assertions. Adjust.
9571 (realloc_register_cache, set_register_cache): Delete.
9572 (registers_to_string, registers_from_string): Adjust.
9573 (find_register_by_name, find_regno, find_register_by_number)
9574 (register_cache_size): Add target_desc parameter, and use it.
9575 (free_register_cache_thread, free_register_cache_thread_one)
9576 (regcache_release, register_cache_size): New.
9577 (register_size): Add target_desc parameter, and use it.
9578 (register_data, supply_register, supply_register_zeroed)
9579 (supply_regblock, supply_register_by_name, collect_register)
9580 (collect_register_as_string, collect_register_by_name): Adjust.
9581 * regcache.h (struct target_desc): Forward declare.
9582 (struct regcache) <tdesc>: New field.
9583 (init_register_cache, new_register_cache): Add target_desc
9584 parameter.
9585 (regcache_invalidate_thread): Declare.
9586 (regcache_invalidate_one): Delete declaration.
9587 (regcache_release): Declare.
9588 (find_register_by_number, register_cache_size, register_size)
9589 (find_regno): Add target_desc parameter.
9590 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9591 declarations.
9592 * remote-utils.c: Include tdesc.h.
9593 (outreg, prepare_resume_reply): Adjust.
9594 * server.c: Include tdesc.h.
9595 (gdbserver_xmltarget): Delete declaration.
9596 (get_features_xml, process_serial_event): Adjust.
9597 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9598 declare.
9599 (struct process_info) <tdesc>: New field.
9600 (ipa_tdesc): Declare.
9601 * tdesc.c: New file.
9602 * tdesc.h: New file.
9603 * tracepoint.c: Include tdesc.h.
9604 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9605 (get_context_regcache): Adjust to pass ipa_tdesc down.
9606 (do_action_at_tracepoint): Adjust to get the register cache size
9607 from the context regcache's description.
9608 (traceframe_walk_blocks): Adjust to get the register cache size
9609 from the current trace frame's description.
9610 (traceframe_get_pc): Adjust to get current trace frame's
9611 description and pass it down.
9612 (gdb_collect): Adjust to get the register cache size from the
9613 IPA's description.
9614 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9615 (gdbserver_xmltarget): Delete.
9616 (initialize_low_tracepoint): Set the ipa's target description.
9617 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9618 (initialize_low_tracepoint): Set the ipa's target description.
9619 * linux-x86-low.c: Include tdesc.h.
9620 [__x86_64__] (is_64bit_tdesc): New.
9621 (ps_get_thread_area, x86_get_thread_area): Use it.
9622 (i386_cannot_store_register): Rename to ...
9623 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9624 (i386_cannot_fetch_register): Rename to ...
9625 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9626 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9627 to new interface.
9628 (target_regsets): Rename to ...
9629 (x86_regsets): ... this.
9630 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9631 interface.
9632 (x86_siginfo_fixup): Use is_64bit_tdesc.
9633 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9634 (tdesc_x32_avx_linux, tdesc_x32_linux)
9635 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9636 Declare.
9637 (x86_linux_update_xmltarget): Delete.
9638 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9639 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9640 (AMD64_LINUX_USER64_CS): New.
9641 (x86_linux_read_description): New, based on
9642 x86_linux_update_xmltarget.
9643 (same_process_callback): New.
9644 (x86_arch_setup_process_callback): New.
9645 (x86_linux_update_xmltarget): New.
9646 (x86_regsets_info): New.
9647 (amd64_linux_regs_info): New.
9648 (i386_linux_usrregs_info): New.
9649 (i386_linux_regs_info): New.
9650 (x86_linux_regs_info): New.
9651 (x86_arch_setup): Reimplement.
9652 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9653 (x86_emit_ops): Ditto.
9654 (the_low_target): Adjust. Install x86_linux_regs_info,
9655 x86_cannot_fetch_register, and x86_cannot_store_register.
9656 (initialize_low_arch): New.
9657 * linux-ia64-low.c (tdesc_ia64): Declare.
9658 (ia64_fetch_register): Adjust.
9659 (ia64_usrregs_info, regs_info): New globals.
9660 (ia64_regs_info): New function.
9661 (the_low_target): Adjust.
9662 (initialize_low_arch): New function.
9663 * linux-sparc-low.c (tdesc_sparc64): Declare.
9664 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9665 Adjust.
9666 (sparc_arch_setup): New function.
9667 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9668 (the_low_target): Adjust.
9669 (initialize_low_arch): New function.
9670 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9671 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9672 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9673 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9674 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9675 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9676 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9677 (tdesc_powerpc_isa205_vsx64l): Declare.
9678 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9679 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9680 (ppc_set_pc, ppc_get_hwcap): Adjust.
9681 (ppc_usrregs_info): Forward declare.
9682 (!__powerpc64__) ppc_regmap_adjusted: New global.
9683 (ppc_arch_setup): Adjust to the current process'es target
9684 description.
9685 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9686 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9687 (ppc_store_evrregset): Adjust.
9688 (target_regsets): Rename to ...
9689 (ppc_regsets): ... this, and make static.
9690 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9691 (ppc_regs_info): New function.
9692 (the_low_target): Adjust.
9693 (initialize_low_arch): New function.
9694 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9695 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9696 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9697 (tdesc_s390x_linux64v2): Declare.
9698 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9699 (s390_fill_gregset, s390_store_last_break): Adjust.
9700 (target_regsets): Rename to ...
9701 (s390_regsets): ... this, and make static.
9702 (s390_get_pc, s390_set_pc): Adjust.
9703 (s390_get_hwcap): New target_desc parameter, and use it.
9704 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9705 (s390_arch_setup): Adjust to set the current process'es target
9706 description. Don't adjust the regmap.
9707 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9708 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9709 (regs_info_3264): New globals.
9710 (s390_regs_info): New function.
9711 (the_low_target): Adjust.
9712 (initialize_low_arch): New function.
9713 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9714 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9715 [__mips64] (init_registers_mips_linux)
9716 (init_registers_mips_dsp_linux): Delete defines.
9717 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9718 (have_dsp): New global.
9719 (mips_read_description): New, based on mips_arch_setup.
9720 (mips_arch_setup): Reimplement.
9721 (get_usrregs_info): New function.
9722 (mips_cannot_fetch_register, mips_cannot_store_register)
9723 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9724 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9725 (target_regsets): Rename to ...
9726 (mips_regsets): ... this, and make static.
9727 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9728 (dsp_regs_info, regs_info): New globals.
9729 (mips_regs_info): New function.
9730 (the_low_target): Adjust.
9731 (initialize_low_arch): New function.
9732 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9733 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9734 Declare.
9735 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9736 (arm_read_description): New, with bits factored from
9737 arm_arch_setup.
9738 (arm_arch_setup): Reimplement.
9739 (target_regsets): Rename to ...
9740 (arm_regsets): ... this, and make static.
9741 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9742 (arm_regs_info): New function.
9743 (the_low_target): Adjust.
9744 (initialize_low_arch): New function.
9745 * linux-m68k-low.c (tdesc_m68k): Declare.
9746 (target_regsets): Rename to ...
9747 (m68k_regsets): ... this, and make static.
9748 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9749 (m68k_regs_info): New function.
9750 (m68k_arch_setup): New function.
9751 (the_low_target): Adjust.
9752 (initialize_low_arch): New function.
9753 * linux-sh-low.c (tdesc_sharch): Declare.
9754 (target_regsets): Rename to ...
9755 (sh_regsets): ... this, and make static.
9756 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9757 (sh_regs_info, sh_arch_setup): New functions.
9758 (the_low_target): Adjust.
9759 (initialize_low_arch): New function.
9760 * linux-bfin-low.c (tdesc_bfin): Declare.
9761 (bfin_arch_setup): New function.
9762 (bfin_usrregs_info, regs_info): New globals.
9763 (bfin_regs_info): New function.
9764 (the_low_target): Adjust.
9765 (initialize_low_arch): New function.
9766 * linux-cris-low.c (tdesc_cris): Declare.
9767 (cris_arch_setup): New function.
9768 (cris_usrregs_info, regs_info): New globals.
9769 (cris_regs_info): New function.
9770 (the_low_target): Adjust.
9771 (initialize_low_arch): New function.
9772 * linux-cris-low.c (tdesc_crisv32): Declare.
9773 (cris_arch_setup): New function.
9774 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9775 (cris_regs_info): New function.
9776 (the_low_target): Adjust.
9777 (initialize_low_arch): New function.
9778 * linux-m32r-low.c (tdesc_m32r): Declare.
9779 (m32r_arch_setup): New function.
9780 (m32r_usrregs_info, regs_info): New globals.
9781 (m32r_regs_info): Adjust.
9782 (initialize_low_arch): New function.
9783 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9784 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9785 (tic6x_usrregs_info): Forward declare.
9786 (tic6x_read_description): New function, based on ...
9787 (tic6x_arch_setup): ... this. Reimplement.
9788 (target_regsets): Rename to ...
9789 (tic6x_regsets): ... this, and make static.
9790 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9791 (tic6x_regs_info): New function.
9792 (the_low_target): Adjust.
9793 (initialize_low_arch): New function.
9794 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9795 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9796 (target_regsets): Rename to ...
9797 (xtensa_regsets): ... this, and make static.
9798 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9799 globals.
9800 (xtensa_arch_setup, xtensa_regs_info): New functions.
9801 (the_low_target): Adjust.
9802 (initialize_low_arch): New function.
9803 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9804 (nios2_arch_setup): Set the current process'es tdesc.
9805 (target_regsets): Rename to ...
9806 (nios2_regsets): ... this.
9807 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9808 (nios2_regs_info): New function.
9809 (the_low_target): Adjust.
9810 (initialize_low_arch): New function.
9811 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9812 (aarch64_arch_setup): Set the current process'es tdesc.
9813 (target_regsets): Rename to ...
9814 (aarch64_regsets): ... this.
9815 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9816 (aarch64_regs_info): New function.
9817 (the_low_target): Adjust.
9818 (initialize_low_arch): New function.
9819 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9820 globals.
9821 (target_regsets): Rename to ...
9822 (tile_regsets): ... this.
9823 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9824 (tile_regs_info): New function.
9825 (tile_arch_setup): Set the current process'es tdesc.
9826 (the_low_target): Adjust.
9827 (initialize_low_arch): New function.
9828 * spu-low.c (tdesc_spu): Declare.
9829 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9830 * win32-arm-low.c (tdesc_arm): Declare.
9831 (arm_arch_setup): New function.
9832 (the_low_target): Install arm_arch_setup instead of
9833 init_registers_arm.
9834 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9835 (init_windows_x86): Rename to ...
9836 (i386_arch_setup): ... this. Set `win32_tdesc'.
9837 (the_low_target): Adjust.
9838 * win32-low.c (win32_tdesc): New global.
9839 (child_add_thread): Don't create the thread cache here.
9840 (do_initial_child_stuff): Set the new process'es tdesc.
9841 * win32-low.h (struct target_desc): Forward declare.
9842 (win32_tdesc): Declare.
9843 * lynx-i386-low.c (tdesc_i386): Declare global.
9844 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9845 * lynx-low.c (lynx_tdesc): New global.
9846 (lynx_add_process): Set the new process'es tdesc.
9847 * lynx-low.h (struct target_desc): Forward declare.
9848 (lynx_tdesc): Declare global.
9849 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9850 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9851 * nto-low.c (nto_tdesc): New global.
9852 (do_attach): Set the new process'es tdesc.
9853 * nto-low.h (struct target_desc): Forward declare.
9854 (nto_tdesc): Declare.
9855 * nto-x86-low.c (tdesc_i386): Declare.
9856 (nto_x86_arch_setup): Set `nto_tdesc'.
9857
9858 2013-06-04 Gary Benson <gbenson@redhat.com>
9859
9860 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9861 to qSupported response when appropriate.
9862 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9863 with nonzero-length annex.
9864 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9865 arguments supplied in annex.
9866
9867 2013-05-31 Doug Evans <dje@google.com>
9868
9869 PR server/15594
9870 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9871 64 bits in 64-cross-32 environment.
9872
9873 2013-05-28 Pedro Alves <palves@redhat.com>
9874
9875 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9876 (aarch64-without-fpu.c): Delete rule.
9877 * configure.srv (aarch64*-*-linux*): Remove references to
9878 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9879 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9880 declaration.
9881
9882 2013-05-24 Pedro Alves <palves@redhat.com>
9883
9884 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9885 instead of strchr/decode_address. Error if the range isn't split
9886 with a ','. Don't assume there's be a ':' in the action.
9887
9888 2013-05-23 Yao Qi <yao@codesourcery.com>
9889 Pedro Alves <palves@redhat.com>
9890
9891 * linux-low.c (lwp_in_step_range): New function.
9892 (linux_wait_1): If the thread was range stepping and stopped
9893 outside the stepping range, report the stop to GDB. Otherwise,
9894 continue stepping. Add range stepping debug output.
9895 (linux_set_resume_request): Copy the step range from the resume
9896 request to the lwp.
9897 (linux_supports_range_stepping): New.
9898 (linux_target_ops) <supports_range_stepping>: Set to
9899 linux_supports_range_stepping.
9900 * linux-low.h (struct linux_target_ops)
9901 <supports_range_stepping>: New field.
9902 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9903 * linux-x86-low.c (x86_supports_range_stepping): New.
9904 (the_low_target) <supports_range_stepping>: Set to
9905 x86_supports_range_stepping.
9906 * server.c (handle_v_cont): Handle 'r' action.
9907 (handle_v_requests): Append ";r" if the target supports range
9908 stepping.
9909 * target.h (struct thread_resume) <step_range_start,
9910 step_range_end>: New fields.
9911 (struct target_ops) <supports_range_stepping>:
9912 New field.
9913 (target_supports_range_stepping): New macro.
9914
9915 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9916
9917 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9918 confusion in comment.
9919
9920 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9921
9922 * lynx-low.c (struct process_info_private): New type.
9923 (lynx_add_process): New function.
9924 (lynx_create_inferior, lynx_attach): Replace calls to
9925 add_process by calls to lynx_add_process.
9926 (lynx_resume): If PTID is null, then try using
9927 current_process()->private->last_wait_event_ptid.
9928 Add comments.
9929 (lynx_clear_inferiors): Delete. The contents of that function
9930 has been inlined in lynx_mourn;
9931 (lynx_wait_1): Save the ptid in the process's private data.
9932 (lynx_mourn): Free the process' private data. Replace call
9933 to lynx_clear_inferiors by call to clear_inferiors.
9934
9935 2013-05-17 Yao Qi <yao@codesourcery.com>
9936
9937 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9938 the right place.
9939
9940 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9941
9942 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9943 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9944 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9945 PT_TEXT_END_ADDR guards. Update comments.
9946 (linux_target_op) <read_offsets>: Conditionally define to
9947 linux_read_offsets if the target is UCLIBC and if it defines
9948 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9949
9950 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9951 Andrew Jenner <andrew@codesourcery.com>
9952
9953 * Makefile.in (SFILES): Add linux-nios2-low.c.
9954 (clean): Add action to delete nios2-linux.c.
9955 (nios2-linux.c): New rule.
9956 * configure.srv: Add nios2*-*-linux*.
9957 * linux-nios2-low.c: New.
9958
9959 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9960
9961 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9962
9963 2013-04-25 Hui Zhu <hui@codesourcery.com>
9964
9965 PR gdb/15186
9966 * ax.c (ax_printf): Add fflush.
9967
9968 2013-04-22 Tom Tromey <tromey@redhat.com>
9969
9970 * Makefile.in (SFILES): Add filestuff.c.
9971 (OBS): Add filestuff.o.
9972 (filestuff.o): New target.
9973 * config.in, configure: Rebuild.
9974 * configure.ac: Check for fdwalk, pipe2.
9975
9976 2013-04-17 Pedro Alves <palves@redhat.com>
9977
9978 * configure.ac (USE_THREAD_DB): Delete variable.
9979 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9980 Don't AC_SUBST USE_THREAD_DB.
9981 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9982 * config.in, configure: Regenerate.
9983
9984 2013-04-16 Pedro Alves <palves@redhat.com>
9985
9986 * linux-low.h (struct lwp_info) <thread_known>: Move under
9987 the USE_THREAD_DB #ifdef.
9988
9989 2013-04-16 Pedro Alves <palves@redhat.com>
9990
9991 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9992 (linux-low.o): Delete rule.
9993 * linux-low.h: Always include "gdb_thread_db.h" instead of
9994 conditionally including thread_db.h.
9995 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9996 HAVE_THREAD_DB_H.
9997
9998 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9999
10000 * Makefile.in (install-only): Fix make install regression.
10001
10002 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10003
10004 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10005 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10006 installation.
10007 * gdbserver.1: Remove.
10008
10009 2013-03-22 Pedro Alves <palves@redhat.com>
10010
10011 * linux-low.c (handle_extended_wait): Don't call
10012 linux_enable_event_reporting.
10013
10014 2013-03-15 Tony Theodore <tonyt@logyst.com>
10015
10016 PR build/9098:
10017 * Makefile.in (SHELL): Use @SHELL@.
10018
10019 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10020
10021 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10022 compiler warning.
10023
10024 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10025
10026 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10027 Remove extraneous NULL element.
10028
10029 2013-03-13 Yao Qi <yao@codesourcery.com>
10030
10031 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10032 'V' block in trace frame.
10033
10034 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10035
10036 * target.h (struct target_ops): Add btrace ops.
10037 (target_supports_btrace): New macro.
10038 (target_enable_btrace): New macro.
10039 (target_disable_btrace): New macro.
10040 (target_read_btrace): New macro.
10041 * gdbthread.h (struct thread_info): Add btrace field.
10042 * server.c: Include btrace-common.h.
10043 (handle_btrace_general_set): New function.
10044 (handle_btrace_enable): New function.
10045 (handle_btrace_disable): New function.
10046 (handle_general_set): Call handle_btrace_general_set.
10047 (handle_qxfer_btrace): New function.
10048 (struct qxfer qxfer_packets[]): Add btrace entry.
10049 * inferiors.c (remove_thread): Disable btrace.
10050 * linux-low: Include linux-btrace.h.
10051 (linux_low_enable_btrace): New function.
10052 (linux_low_read_btrace): New function.
10053 (linux_target_ops): Add btrace ops.
10054 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10055 Add srv_linux_btrace=yes.
10056 (x86_64-*-linux*): Add linux-btrace.o.
10057 Add srv_linux_btrace=yes.
10058 * configure.ac: Define HAVE_LINUX_BTRACE.
10059 * config.in: Regenerated.
10060 * configure: Regenerated.
10061
10062 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10063
10064 * server.c (handle_qxfer): Preserve error message if -3 is
10065 returned.
10066 (qxfer): Document the -3 return value.
10067
10068 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10069
10070 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10071 (linux_btrace_h): New variable.
10072 (linux-btrace.o): New rule.
10073
10074 2013-03-08 Stan Shebs <stan@codesourcery.com>
10075 Hafiz Abid Qadeer <abidh@codesourcery.com>
10076
10077 * tracepoint.c (trace_buffer_size): New global.
10078 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10079 (init_trace_buffer): Change to one-argument function. Allocate
10080 trace buffer memory.
10081 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10082 handle QTBuffer:size packet.
10083 (cmd_bigqtbuffer_size): New function.
10084 (initialize_tracepoint): Call init_trace_buffer with
10085 DEFAULT_TRACE_BUFFER_SIZE.
10086 * server.c (handle_query): Add QTBuffer:size in the
10087 supported packets.
10088
10089 2013-03-07 Yao Qi <yao@codesourcery.com>
10090
10091 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10092 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10093 of -1.
10094 (cmd_qtsp): Adjust condition. Do post increment.
10095 Set cur_action and cur_step_action back to 0.
10096
10097 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10098
10099 PR server/15236
10100 * linux-low.c (linux_write_memory): Return early success if LEN is
10101 zero.
10102
10103 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10104
10105 * configure.srv: Add x86_64-*-cygwin* as target.
10106
10107 2013-02-28 Tom Tromey <tromey@redhat.com>
10108
10109 * configure.ac: Invoke AC_SYS_LARGEFILE.
10110 * configure, config.in: Rebuild.
10111
10112 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10113
10114 * win32-low.c: Throughout, fix format strings and casts of
10115 printf-like functions to avoid type related warnings on all
10116 platforms.
10117 (get_child_debug_event): Print dwDebugEventCode as hex since
10118 that's how it's usually documented.
10119
10120 2013-02-28 Yao Qi <yao@codesourcery.com>
10121
10122 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10123 pulongest.
10124
10125 2013-02-27 Jiong Wang <jiwang@tilera.com>
10126
10127 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10128 (reg-tilegx32.c): New rule.
10129 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10130 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10131 different register info initializer according to elf class.
10132 (init_registers_tilgx32): New function. The tilegx32 register info
10133 initializer.
10134 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10135 (tile_store_gregset): Likewise.
10136
10137 2013-02-27 Yao Qi <yao@codesourcery.com>
10138
10139 * server.c (process_point_options): Print debug message when
10140 debug_threads is true.
10141
10142 2013-02-26 Yao Qi <yao@codesourcery.com>
10143
10144 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10145
10146 2013-02-19 Pedro Alves <palves@redhat.com>
10147 Kai Tietz <ktietz@redhat.com>
10148
10149 PR gdb/15161
10150
10151 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10152 instead of strtoul to extract address from packet.
10153 (process_serial_event) <'z'>: Likewise.
10154
10155 2013-02-18 Yao Qi <yao@codesourcery.com>
10156
10157 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10158
10159 2013-02-14 Pedro Alves <palves@redhat.com>
10160
10161 Plug memory leak.
10162
10163 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10164 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10165
10166 2013-02-14 Pedro Alves <palves@redhat.com>
10167
10168 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10169
10170 2013-02-14 Pedro Alves <palves@redhat.com>
10171
10172 * tracepoint.c (save_string): Delete.
10173 (add_tracepoint_action): Use savestring instead of save_string.
10174
10175 2013-02-12 Pedro Alves <palves@redhat.com>
10176
10177 * linux-xtensa-low.c: Ditto.
10178 * xtensa-xtregs.c: Ditto.
10179
10180 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10181
10182 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10183 thread_db.
10184
10185 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10186
10187 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10188 aarch64_num_wp_regs and aarch64_num_bp_regs to
10189 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10190
10191 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10192
10193 * linux-aarch64-low.c (ps_get_thread_area): Replace
10194 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10195
10196 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10197 Marcus Shawcroft <marcus.shawcroft@arm.com>
10198 Nigel Stephens <nigel.stephens@arm.com>
10199 Yufeng Zhang <yufeng.zhang@arm.com>
10200
10201 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10202 (aarch64.c, aarch64-without-fpu.c): New targets.
10203 * configure.srv (aarch64*-*-linux*): New.
10204 * linux-aarch64-low.c: New file.
10205
10206 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10207
10208 * linux-low.c (handle_extended_wait, linux_create_inferior)
10209 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10210 (dequeue_one_deferred_signal, linux_resume_one_thread)
10211 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10212 (linux_tracefork_grandchild, linux_test_for_tracefork)
10213 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10214 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10215 where the argument is 0.
10216
10217 2013-01-25 Yao Qi <yao@codesourcery.com>
10218
10219 * event-loop.c: Include "queue.h".
10220 (gdb_event_p): New typedef.
10221 (struct gdb_event) <next_event>: Remove.
10222 (event_queue): Change to QUEUE(gdb_event_p).
10223 (async_queue_event): Remove.
10224 (gdb_event_xfree): New.
10225 (initialize_event_loop): New.
10226 (process_event): Use API from QUEUE.
10227 (wait_for_event): Likewise.
10228 * server.c (main): Call initialize_event_loop.
10229 * server.h (initialize_event_loop): Declare.
10230
10231 2013-01-18 Yao Qi <yao@codesourcery.com>
10232
10233 * ax.h (struct eval_agent_expr_context): New.
10234 (gdb_eval_agent_expr): Update declaration.
10235 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10236 TFRAME. Add new argument CTX.
10237 * server.h (struct eval_agent_expr_context): Declare.
10238 (agent_mem_read, agent_tsv_read): Update declaration.
10239 (agent_mem_read_string): Likewise.
10240 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10241 (add_traceframe_block): Add new argument TPOINT.
10242 Increase TPOINT->traceframe_usage.
10243 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10244 eval_tracepoint_agent_expr.
10245 (condition_true_at_tracepoint): Likewise.
10246 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10247 (agent_mem_read_string, agent_tsv_read): Likewise.
10248
10249 2013-01-16 Yao Qi <yao@codesourcery.com>
10250
10251 * linux-low.c (linux_resume_one_lwp): Don't check
10252 'lwp->bp_reinsert != 0'.
10253
10254 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10255 Pedro Alves <palves@redhat.com>
10256
10257 * lynx-low.c (ptrace_request_to_str): Define a temporary
10258 macro and use it to simplify this function's implementation.
10259
10260 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10261
10262 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10263 sets errno.
10264
10265 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10266
10267 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10268
10269 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10270
10271 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10272
10273 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10274
10275 * lynx-low.c (lynx_resume): Use the resume_info parameter
10276 to determine the ptid for the lynx_ptrace call, unless
10277 it is equal to minus_one_ptid, in which case we use the
10278 ptid of the current_inferior.
10279 (lynx_wait_1): After having received a thread create/exit
10280 event, resume the inferior's execution using the signaling
10281 thread's ptid, rather than the old ptid.
10282
10283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10284
10285 * lynx-low.c (lynx_resume): Delete variable ret.
10286
10287 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10288
10289 * gdbreplay.c (gdbreplay_version): Update copyright year.
10290 * server.c (gdbserver_version): Likewise.
10291
10292 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10293
10294 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10295 new thread.
10296
10297 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10298
10299 * lynx-low.c (ptrace_request_to_str): Add handling for
10300 PTRACE_GETTRACESIG.
10301
10302 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10303
10304 * lynx-low.c (lynx_attach): Delete variable new_process.
10305
10306 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10307
10308 * lynx-low.c (lynx_create_inferior): Delete variable
10309 new_process.
10310
10311 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10312
10313 * lynx-low.c (ptrace_request_to_str): Do not handle
10314 PTRACE_GETTHREADLIST if this macro does not exist.
10315
10316 2012-12-15 Yao Qi <yao@codesourcery.com>
10317
10318 * Makefile.in (OBS): Add notif.o.
10319 * notif.c, notif.h: New.
10320 * server.c: Include "notif.h".
10321 (struct vstop_notif) <next>: Remove.
10322 <base>: New field.
10323 (queue_stop_reply): Update.
10324 (push_event, send_next_stop_reply): Remove.
10325 (discard_queued_stop_replies): Update.
10326 (notif_stop): New variable.
10327 (handle_v_stopped): Remove.
10328 (handle_v_requests): Don't call handle_v_stopped. Call
10329 handle_ack_notif instead.
10330 (queue_stop_reply_callback): Call notif_event_enque instead
10331 of queue_stop_reply.
10332 (handle_status): Don't call send_next_stop_reply, call
10333 notif_write_event instead.
10334 (kill_inferior_callback): Likewise.
10335 (detach_or_kill_inferior_callback): Likewise.
10336 (main): Call initialize_notif.
10337 (process_serial_event): Call QUEUE_is_empty.
10338 (handle_target_event): Call notif_push instead of push event.
10339 * server.h (push_event): Remove declaration.
10340
10341 2012-12-10 Tom Tromey <tromey@redhat.com>
10342
10343 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10344 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10345 macros.
10346 (.c.o): Rewrite.
10347 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10348 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10349 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10350 (amd64-linux-ipa.o, ax.o): Rewrite.
10351 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10352 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10353 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10354 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10355 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10356 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10357 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10358 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10359 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10360 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10361 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10362 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10363 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10364 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10365 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10366 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10367 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10368 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10369 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10370 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10371 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10372 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10373 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10374 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10375 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10376 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10377 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10378 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10379 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10380 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10381 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10382 (reg-tilegx.o): Remove.
10383 (all_object_files): New macro.
10384 Include .deps files.
10385 * aclocal.m4, configure: Rebuild.
10386 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10387 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10388 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10389
10390 2012-12-05 Tom Tromey <tromey@redhat.com>
10391
10392 PR gdb/14917:
10393 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10394
10395 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10396
10397 * configure.ac: Check for linux/perf_event.h.
10398 * config.in: Regenerated.
10399 * configure: Regenerated.
10400
10401 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10402
10403 * hostio.c (handle_readlink): Decrease buffer size
10404 parameter passed to readlink by one byte.
10405
10406 2012-11-26 Yao Qi <yao@codesourcery.com>
10407
10408 * configure.ac (build_warnings): Append '-Wempty-body'.
10409 * configure: Regenerated.
10410 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10411 body.
10412
10413 2012-11-15 Pierre Muller <muller@sourceware.org>
10414
10415 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10416 * config.in: Regenerate.
10417 * configure: Regenerate.
10418 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10419 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10420 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10421 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10422 header.
10423 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10424 instead of <sys/wait.h> header.
10425 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10426
10427 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10428
10429 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10430 (various make rules): Remove -DGDBSERVER
10431
10432 2012-11-09 Yao Qi <yao@codesourcery.com>
10433
10434 * spu-low.c (current_ptid): Move it to ..
10435 * gdbthread.h: ... here. New.
10436 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10437 * server.c (myresume, process_serial_event): Likewise.
10438 * thread-db.c (thread_db_find_new_threads): Likewise.
10439 * tracepoint.c (run_inferior_command): Likewise.
10440
10441 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10442
10443 * server.c (handle_search_memory_1): Include access length in
10444 warning message.
10445
10446 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10447
10448 * linux-crisv32-low.c: Fix compile errors.
10449
10450 2012-09-04 Yao Qi <yao@codesourcery.com>
10451
10452 * tracepoint.c (cmd_qtsv): Adjust debug message.
10453 Don't check CUR_TPOINT.
10454
10455 2012-08-28 Yao Qi <yao@codesourcery.com>
10456
10457 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10458 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10459 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10460 Remove declarations of xmalloc, xreallloc, xstrdup and
10461 freeargv.
10462 * Makefile.in (libiberty_h): New.
10463 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10464 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10465
10466 2012-08-23 Yao Qi <yao@codesourcery.com>
10467
10468 * server.h: Remove declaration of 'xsnprintf'.
10469
10470 2012-08-22 Keith Seitz <keiths@redhat.com>
10471
10472 * server.h: Include build-gnulib-gbserver/config.h.
10473 * gdbreplay.c: Likewise.
10474
10475 2012-08-08 Doug Evans <dje@google.com>
10476
10477 * Makefile.in (SFILES): Add gdb_vecs.c.
10478 (OBS): Add gdb_vecs.o.
10479 (gdb_vecs_h, host_defs_h): New variables.
10480 (thread-db.o): Add $(gdb_vecs_h) dependency.
10481 (gdb_vecs.o): New rule.
10482 * thread-db.c: #include "gdb_vecs.h".
10483 (thread_db_load_search): Use a vector to iterate over path elements.
10484 Handle text appearing after "$pdir".
10485
10486 * configure.ac: Add check for strstr.
10487 * config.in: Regenerate.
10488 * configure: Regenerate.
10489
10490 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10491
10492 * hostio.c (handle_pread): If pread fails, fall back to attempting
10493 lseek/read.
10494 (handle_pwrite): Likewise for pwrite.
10495
10496 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10497
10498 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10499 between unsupported TYPE and unimplementable ADDR/LEN combination.
10500 (arm_insert_point): Act on new return value.
10501
10502 2012-07-31 Pedro Alves <palves@redhat.com>
10503
10504 * server.c (process_point_options): Only skip tokens if we find
10505 one that is unrecognized. Don't treat 'X' specially while
10506 skipping unrecognized tokens.
10507
10508 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10509
10510 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10511 to 4-byte-align HW breakpoint addresses for Thumb.
10512
10513 2012-07-27 Yao Qi <yao@codesourcery.com>
10514
10515 PR remote/14161.
10516
10517 * server.h: Declare gdb_agent_about_to_close.
10518 * target.c (kill_inferior): Include "agent.h".
10519 New. Send command 'kill'.
10520 * target.h (kill_inferior): Removed macro.
10521 * tracepoint.c (gdb_agent_about_to_close): New.
10522 (gdb_agent_helper_thread): Handle command 'close'.
10523 Wait endlessly until the inferior stops.
10524 Install gdb_agent_remove_socket to atexit hook.
10525 (agent_socket_name): New static variable.
10526 (gdb_agent_socket_init): Replace local variable 'name' with
10527 'agent_socket_name'.
10528 (gdb_agent_remove_socket): New.
10529
10530 2012-07-27 Yao Qi <yao@codesourcery.com>
10531
10532 * server.c (process_point_options): Stop at 'X' when parsing.
10533
10534 2012-07-19 Michael Eager <eager@eagercon.com>
10535
10536 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10537 to hw_execute.
10538 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10539 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10540 hardware breakpoint.
10541
10542 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10543
10544 * gdbserver/linux-low.c (initialize_low): Call
10545 linux_ptrace_init_warnings.
10546
10547 2012-07-02 Doug Evans <dje@google.com>
10548
10549 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10550 pointer to int.
10551
10552 2012-07-02 Stan Shebs <stan@codesourcery.com>
10553
10554 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10555 (ax.o): Add it to build rule.
10556 (ax-ipa.o): Ditto.
10557 (OBS): Add format.o.
10558 (IPA_OBS): Add format.o.
10559 * server.c (handle_query): Claim support for breakpoint commands.
10560 (process_point_options): Add command case.
10561 (process_serial_event): Leave running if there are printfs in
10562 effect.
10563 * mem-break.h (any_persistent_commands): Declare.
10564 (add_breakpoint_commands): Declare.
10565 (gdb_no_commands_at_breakpoint): Declare.
10566 (run_breakpoint_commands): Declare.
10567 * mem-break.c (struct point_command_list): New struct.
10568 (struct breakpoint): New field command_list.
10569 (any_persistent_commands): New function.
10570 (add_commands_to_breakpoint): New function.
10571 (add_breakpoint_commands): New function.
10572 (gdb_no_commands_at_breakpoint): New function.
10573 (run_breakpoint_commands): New function.
10574 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10575 locally.
10576 * ax.c: Include format.h.
10577 (ax_printf): New function.
10578 (gdb_eval_agent_expr): Add printf opcode.
10579
10580 2012-06-13 Yao Qi <yao@codesourcery.com>
10581
10582 * server.c (start_inferior): Remove duplicated writes to fields
10583 'last_resume_kind' and 'last_status' of 'current_inferior'.
10584
10585 2012-06-12 Yao Qi <yao@codesourcery.com>
10586 Pedro Alves <palves@redhat.com>
10587
10588 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10589 comment.
10590 * server.c (handle_v_cont): Extend comment.
10591
10592 2012-06-11 Yao Qi <yao@codesourcery.com>
10593
10594 * linux-low.c (linux_attach): Add 'static'.
10595
10596 2012-06-06 Yao Qi <yao@codesourcery.com>
10597
10598 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10599
10600 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10601
10602 Fix gcc -flto compilation warning.
10603 * server.c (main): Make variable multi_mode and attach volatile.
10604
10605 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10606
10607 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10608 if the platform doesn't know about it.
10609
10610 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10611
10612 * Makefile.in (SFILES): Add linux-tile-low.c.
10613 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10614 * configure.srv: Handle tilegx-*-linux*.
10615 * linux-tile-low.c: New file.
10616
10617 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10618
10619 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10620
10621 2012-05-24 Pedro Alves <palves@redhat.com>
10622
10623 PR gdb/7205
10624
10625 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10626
10627 2012-05-24 Pedro Alves <palves@redhat.com>
10628
10629 PR gdb/7205
10630
10631 Replace target_signal with gdb_signal throughout.
10632
10633 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10634
10635 * linux-low.c (linux_store_registers): Avoid the copying sequence
10636 when no data has been retrieved by ptrace.
10637
10638 2012-05-22 Will Deacon <will.deacon@arm.com>
10639
10640 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10641 Include asm/ptrace.h.
10642 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10643 already defined.
10644
10645 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10646
10647 * linux-low.c (linux_store_registers): Don't re-retrieve data
10648 with ptrace that has already been obtained from /proc. Always
10649 copy any data retrieved with ptrace to the buffer supplied.
10650
10651 2012-05-11 Yao Qi <yao@codesourcery.com>
10652 Pedro Alves <palves@redhat.com>
10653
10654 * linux-low.c (enum stopping_threads_kind): New.
10655 (stopping_threads): Change type to `enum stopping_threads_kind'.
10656 (handle_extended_wait): If stopping and suspending threads, leave
10657 the new_lwp suspended too.
10658 (linux_wait_for_event): Adjust.
10659 (stop_all_lwps): Set `stopping_threads' to
10660 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10661 whether we're suspending threads or just stopping them. Assert no
10662 recursion happens.
10663
10664 2012-04-29 Yao Qi <yao@codesourcery.com>
10665
10666 * server.h: Move some code to ...
10667 * gdbthread.h: ... here. New.
10668 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10669 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10670 (nto-low.o, win32-low.o): Likewise.
10671 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10672 * regcache.c, remote-utils.c, server.c: Likewise.
10673 * target.c, tracepoint.c, win32-low.c: Likewise.
10674
10675 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10676
10677 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10678 (PTRACE_ARG4_TYPE): Likewise.
10679 (PTRACE_XFER_TYPE): Likewise.
10680 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10681 ptrace to PTRACE_ARG3_TYPE.
10682 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10683 (PTRACE_ARG4_TYPE): Likewise.
10684 (PTRACE_XFER_TYPE): Likewise.
10685 (linux_detach_one_lwp): Cast fourth argument of
10686 ptrace to long then PTRACE_ARG4_TYPE.
10687 (regsets_fetch_inferior_registers): Cast third argument of
10688 ptrace to long then PTRACE_ARG3_TYPE.
10689 (regsets_store_inferior_registers): Likewise.
10690
10691 2012-04-20 Pedro Alves <palves@redhat.com>
10692
10693 * configure: Regenerate.
10694
10695 2012-04-19 Pedro Alves <palves@redhat.com>
10696
10697 * Makefile.in (GNULIB_BUILDDIR): New.
10698 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10699 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10700 (all, install-only, uninstall, clean-info, all-lib, clean): No
10701 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10702 (maintainer-clean realclean distclean): Use subdir_do.
10703 (subdir_do): New.
10704 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10705 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10706 * acinclude.m4: Include acx_configure_dir.m4.
10707 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10708 calls. Call AC_PROG_RANLIB. Configure gnulib using
10709 ACX_CONFIGURE_DIR.
10710 (GNULIB): New.
10711 (GNULIB_STDINT_H): Adjust.
10712 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10713 * gdbreplay.c: Include build-gnulib/config.h.
10714 * server.h: Likewise.
10715 * aclocal.m4: Regenerate.
10716 * config.in: Regenerate.
10717 * configure: Regenerate.
10718
10719 2012-04-19 Pedro Alves <palves@redhat.com>
10720
10721 * Makefile.in (LIBGNU, INCGNU): Adjust.
10722 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10723 (all, install-only, uninstall, clean-info, all-lib, clean)
10724 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10725 * configure.ac: Adjust AC_OUTPUT output.
10726 * aclocal.m4: Regenerate.
10727 * configure: Regenerate.
10728
10729 2012-04-19 Pedro Alves <palves@redhat.com>
10730
10731 * Makefile.in (generated_files): New.
10732 (server_h): Remove the explicit dependency on config.h, and depend
10733 on $generated_files.
10734
10735 2012-04-19 Pedro Alves <palves@redhat.com>
10736
10737 * Makefile.in (INCGNU): Add -Ignulib.
10738
10739 2012-04-19 Pedro Alves <palves@redhat.com>
10740
10741 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10742 (INCGNU): ... this, and spell out -I here.
10743 (GNULIB_LIB): Rename to ...
10744 (LIBGNU): ... this.
10745 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10746
10747 2012-04-19 Pedro Alves <palves@redhat.com>
10748
10749 * config.in: Regenerate.
10750
10751 2012-04-19 Pedro Alves <palves@redhat.com>
10752
10753 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10754 * server.h (memmem): Remove declaration.
10755 * config.in: Regenerate.
10756 * configure: Regenerate.
10757
10758 2012-04-19 Yao Qi <yao@codesourcery.com>
10759
10760 * Makefile.in (SFILES): Add common/vec.c.
10761 (OBS): Add vec.o.
10762 (vec.o): New rule.
10763
10764 2012-04-19 Yao Qi <yao@codesourcery.com>
10765
10766 * remote-utils.c (prepare_resume_reply): Replace with macro
10767 target_core_of_thread.
10768 * server.c (handle_qxfer_threads_proper): Likewise.
10769 * target.h (traget_core_of_thread): New macro.
10770
10771 2012-04-18 Pedro Alves <palves@redhat.com>
10772
10773 * aclocal.m4: Regenerate.
10774 * configure: Regenerate.
10775
10776 2012-04-16 Yao Qi <yao@codesourcery.com>
10777
10778 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10779 duplicated on address.
10780
10781 2012-04-16 Yao Qi <yao@codesourcery.com>
10782
10783 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10784 (struct tracepoint_action_ops) <send>: New field.
10785 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10786 (agent_expr_send, x_tracepoint_action_send): New.
10787 (l_tracepoint_action_send): New.
10788 (cmd_qtdp): Download and install tracepoint
10789 according to `use_agent'.
10790 (run_inferior_command): Add one more parameter `len'.
10791 Update callers.
10792 (tracepoint_send_agent): New.
10793 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10794
10795 2012-04-16 Yao Qi <yao@codesourcery.com>
10796
10797 * tracepoint.c (download_tracepoints): Moved to ...
10798 (cmd_qtstart): ... here.
10799
10800 2012-04-14 Yao Qi <yao@codesourcery.com>
10801
10802 * tracepoint.c: Include inttypes.h.
10803 (struct collect_memory_action): Use sized types.
10804 (struct tracepoint): Likewise.
10805 (cmd_qtdp, stop_tracing): Update print specifiers.
10806 (cmd_qtp, response_tracepoint): Likewise.
10807 (collect_data_at_tracepoint): Likewise.
10808 (collect_data_at_step): Likewise.
10809
10810 2012-04-14 Yao Qi <yao@codesourcery.com>
10811
10812 Import gnulib module inttypes.
10813 * aclocal.m4, config.in, configure: Regenerated.
10814
10815 2012-04-14 Yao Qi <yao@codesourcery.com>
10816
10817 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10818 Makefile and config.status at last.
10819
10820 2012-04-13 Yao Qi <yao@codesourcery.com>
10821
10822 * tracepoint.c: Include stdint.h unconditionally.
10823
10824 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10825
10826 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10827 on BFD_HAVE_SYS_PROCFS_TYPE.
10828 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10829 * configure: Regenerate.
10830 * config.in: Likewise.
10831
10832 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10833
10834 * Makefile.in (clean): Also remove x32.c x32-linux.c
10835 x32-avx.c x32-avx-linux.c.
10836 (x32.o): New target.
10837 (x32.c): Likewise.
10838 (x32-linux.o): Likewise.
10839 (x32-linux.c): Likewise.
10840 (x32-avx.o): Likewise.
10841 (x32-avx.c): Likewise.
10842 (x32-avx-linux.o): Likewise.
10843 (x32-avx-linux.c): Likewise.
10844
10845 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10846 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10847 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10848 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10849 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10850 i386/x32-avx-linux.xml.
10851
10852 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10853 (init_registers_x32_avx_linux): Likwise.
10854 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10855 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10856
10857 2012-04-13 Pedro Alves <palves@redhat.com>
10858
10859 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10860 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10861 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10862 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10863 the sub-make.
10864
10865 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10866
10867 * linux-x86-low.c (compat_x32_clock_t): New.
10868 (compat_x32_siginfo_t): Likewise.
10869 (compat_x32_siginfo_from_siginfo): Likewise.
10870 (siginfo_from_compat_x32_siginfo): Likewise.
10871 (linux_is_elf64): Likewise.
10872 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10873 and siginfo_from_compat_x32_siginfo for x32.
10874 (x86_arch_setup): Set linux_is_elf64.
10875
10876 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10877
10878 PR gdb/13969
10879 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10880 e_machine field.
10881 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10882 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10883 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10884 compatible with process.
10885
10886 2012-04-12 Yao Qi <yao@codesourcery.com>
10887
10888 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10889 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10890 (install-only, install-info, clean): Handle sub dir gnulib.
10891 (all-lib, am--refresh): New targets.
10892 (memmem.o): Remove target.
10893 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10894 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10895 (AC_REPLACE_FUNCS): Remove memmem.
10896 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10897 (AC_OUTPUT): Generate Makefile in gnulib/.
10898 * aclocal.m4, config.in, configure: Regenerated.
10899
10900 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10901
10902 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10903
10904 2012-04-05 Pedro Alves <palves@redhat.com>
10905
10906 -Werror=strict-aliasing
10907
10908 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10909 pointer.
10910
10911 2012-04-04 Pedro Alves <palves@redhat.com>
10912
10913 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10914 (sparc_store_gregset_from_stack, sparc_store_gregset)
10915 (sparc_breakpoint_at): Fix formatting.
10916
10917 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10918
10919 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10920 are available.
10921 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10922 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10923 * config.in: Regenerate.
10924 * configure: Likewise.
10925
10926 2012-03-29 Pedro Alves <palves@redhat.com>
10927
10928 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10929 Correct ptrace arguments.
10930
10931 2012-03-28 Pedro Alves <palves@redhat.com>
10932
10933 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10934 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10935 (IA64_FR1_REGNUM): New defines.
10936 (ia64_fetch_register): New.
10937 (the_low_target): Install it.
10938 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10939 field.
10940 * linux-low.c (linux_fetch_registers): Try the
10941 the_low_target.fetch_register hook first.
10942
10943 * linux-arm-low.c (the_low_target): Adjust.
10944 * linux-bfin-low.c (the_low_target): Adjust.
10945 * linux-cris-low.c (the_low_target): Adjust.
10946 * linux-crisv32-low.c (the_low_target): Adjust.
10947 * linux-m32r-low.c (the_low_target): Adjust.
10948 * linux-m68k-low.c (the_low_target): Adjust.
10949 * linux-mips-low.c (the_low_target): Adjust.
10950 * linux-ppc-low.c (the_low_target): Adjust.
10951 * linux-s390-low.c (the_low_target): Adjust.
10952 * linux-sh-low.c (the_low_target): Adjust.
10953 * linux-sparc-low.c (the_low_target): Adjust.
10954 * linux-tic6x-low.c (the_low_target): Adjust.
10955 * linux-x86-low.c (the_low_target): Adjust.
10956 * linux-xtensa-low.c (the_low_target): Adjust.
10957
10958 2012-03-26 Pedro Alves <palves@redhat.com>
10959
10960 * server.c (handle_qxfer_libraries): Don't bail early if
10961 the_target->qxfer_libraries_svr4 is not NULL.
10962
10963 2012-03-26 Pedro Alves <palves@redhat.com>
10964
10965 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10966
10967 2012-03-23 Pedro Alves <palves@redhat.com>
10968
10969 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10970 "library-list-svr4" element's start tag when the the DSO list is
10971 empty.
10972
10973 2012-03-23 Pedro Alves <palves@redhat.com>
10974
10975 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10976 a variable whose type size is the same as the inferior's pointer
10977 size.
10978
10979 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10980
10981 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10982 struct siginfo.
10983 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10984 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10985 * linux-low.h: Include <signal.h>.
10986 (struct siginfo): Remove forward declaration.
10987 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10988 struct siginfo.
10989
10990 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10991
10992 * .gitignore: Ignore more files.
10993
10994 2012-03-19 Pedro Alves <palves@redhat.com>
10995 Jan Kratochvil <jan.kratochvil@redhat.com>
10996
10997 * server.c (cont_thread, general_thread): Add describing comments.
10998 (start_inferior): Clear `cont_thread'.
10999 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11000 of a process.
11001
11002 2012-03-15 Yao Qi <yao@codesourcery.com>
11003
11004 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11005 handling to ...
11006 (cmd_qtdp): ... here.
11007
11008 2012-03-15 Yao Qi <yao@codesourcery.com>
11009
11010 * tracepoint.c (struct tracepoint_action_ops): New.
11011 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11012 (m_tracepoint_action_download): New.
11013 (r_tracepoint_action_download): New.
11014 (x_tracepoint_action_download): New.
11015 (l_tracepoint_action_download): New.
11016 (add_tracepoint_action): Install `action->ops' according type.
11017 (download_tracepoint_1): Move code `download' function pointer
11018 of various tracepoint_action_ops.
11019
11020 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11021
11022 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11023 linux_ptrace_attach_warnings.
11024
11025 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11026
11027 * Makefile.in (linux-ptrace.o): New.
11028 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11029 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11030 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11031 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11032 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11033 of these targets.
11034 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11035
11036 2012-03-08 Yao Qi <yao@codesourcery.com>
11037 Pedro Alves <palves@redhat.com>
11038
11039 Fix PR server/13392.
11040 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11041 offset of JMP insn.
11042 * tracepoint.c (remove_tracepoint): New.
11043 (cmd_qtdp): Call remove_tracepoint when failed to install.
11044
11045 2012-03-07 Pedro Alves <palves@redhat.com>
11046
11047 * linux-low.c (get_detach_signal): New.
11048 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11049 Pass on pending signals to PTRACE_DETACH. Check the result of the
11050 ptrace call.
11051 * server.c (program_signals, program_signals_p): New.
11052 (handle_general_set): Handle QProgramSignals.
11053 * server.h (program_signals, program_signals_p): Declare.
11054
11055 2012-03-05 Pedro Alves <palves@redhat.com>
11056 Jan Kratochvil <jan.kratochvil@redhat.com>
11057
11058 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11059 New comment why.
11060
11061 2012-03-03 Yao Qi <yao@codesourcery.com>
11062
11063 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11064 agent_look_up_symbols.
11065
11066 2012-03-03 Yao Qi <yao@codesourcery.com>
11067
11068 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11069 (linux-x86-low.o): Likewise.
11070 * server.h: Remove in_process_agent_loaded.
11071 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11072 common/agent.c.
11073 Update callers.
11074
11075 2012-03-03 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (gdb_agent_capability): New global.
11078 (in_process_agent_loaded_ust): Renamed to
11079 `in_process_agent_supports_ust'.
11080 Update callers.
11081 (in_process_agent_supports_ust): Call agent_capability_check.
11082 (clear_installed_tracepoints): Assert that agent supports
11083 agent.
11084
11085 2012-03-03 Yao Qi <yao@codesourcery.com>
11086
11087 * linux-low.c (linux_supports_agent): New.
11088 (linux_target_ops): Initialize field `supports_agent' with
11089 linux_supports_agent.
11090 * target.h (struct target_ops) <supports_agent>: New.
11091 (target_supports_agent): New macro.
11092 * server.c (handle_general_set): Handle packet 'QAgent'.
11093 (handle_query): Send `QAgent+'.
11094 * Makefile.in (server.o): Depends on agent.h.
11095
11096 2012-03-03 Yao Qi <yao@codesourcery.com>
11097
11098 * Makefile.in (OBS): Add agent.o.
11099 Add new rule for agent.o.
11100 Track dependence of tracepoint.c on agent.h.
11101 * tracepoint.c (run_inferior_command_1):
11102 (run_inferior_command): Call agent_run_command.
11103 (gdb_ust_connect_sync_socket): Deleted. Move it to
11104 common/agent.c.
11105 (resume_thread, stop_thread): Likewise.
11106 (gdb_ust_socket_init): Renamed to ...
11107 (gdb_agent_socket_init): ... New.
11108 (gdb_ust_thread): Renamed to ...
11109 (gdb_agent_helper_thread): ... New.
11110 (gdb_ust_init): Move some code to ...
11111 (gdb_agent_init): ... here. New.
11112 [HAVE_UST]: Call gdb_ust_init.
11113 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11114 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11115 * config.in, configure: Regenerated.
11116
11117 2012-03-02 Pedro Alves <palves@redhat.com>
11118
11119 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11120 * linux-low.c (struct simple_pid_list): New.
11121 (stopped_pids): New a struct simple_pid_list pointer.
11122 (add_to_pid_list, pull_pid_from_list): New.
11123 (handle_extended_wait): Don't assume the first signal new children
11124 report is SIGSTOP. Adjust call to pull_pid_from_list.
11125 (linux_wait_for_lwp): Adjust.
11126
11127 2012-03-02 Yao Qi <yao@codesourcery.com>
11128
11129 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11130 debug log.
11131
11132 2012-03-02 Yao Qi <yao@codesourcery.com>
11133
11134 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11135 `stop_pc' and `tpoint'. Update caller.
11136
11137 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11138
11139 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11140 * linux-low.c (use_linux_regsets): New macro.
11141 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11142 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11143 (linux_register_in_regsets): New function.
11144 (usr_fetch_inferior_registers): Skip registers covered by
11145 regsets.
11146 (usr_store_inferior_registers): Likewise.
11147 (usr_fetch_inferior_registers): New macro.
11148 (usr_store_inferior_registers): Likewise.
11149 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11150 (linux_store_registers): Likewise.
11151 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11152 prototype.
11153 (init_registers_mips64_dsp_linux): Likewise.
11154 (init_registers_mips_linux): New macro.
11155 (init_registers_mips_dsp_linux): Likewise.
11156 (mips_dsp_num_regs): Likewise.
11157 (DSP_BASE, DSP_CONTROL): New fallback macros.
11158 (mips_base_regs): New macro.
11159 (mips_regmap): Use it. Fix the size.
11160 (mips_dsp_regmap): New variable.
11161 (mips_dsp_regset_bitmap): Likewise.
11162 (mips_arch_setup): New function.
11163 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11164 than mips_regmap.
11165 (mips_cannot_store_register): Likewise.
11166 (the_low_target): Update .arch_setup, .num_regs and .regmap
11167 initializers. Add .regset_bitmap initializer.
11168 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11169 initializer.
11170 * linux-bfin-low.c (the_low_target): Likewise.
11171 * linux-cris-low.c (the_low_target): Likewise.
11172 * linux-crisv32-low.c (the_low_target): Likewise.
11173 * linux-ia64-low.c (the_low_target): Likewise.
11174 * linux-m32r-low.c (the_low_target): Likewise.
11175 * linux-m68k-low.c (the_low_target): Likewise.
11176 * linux-ppc-low.c (the_low_target): Likewise.
11177 * linux-s390-low.c (the_low_target): Likewise.
11178 * linux-sh-low.c (the_low_target): Likewise.
11179 * linux-sparc-low.c (the_low_target): Likewise.
11180 * linux-tic6x-low.c (the_low_target): Likewise.
11181 * linux-x86-low.c (the_low_target): Likewise.
11182 * linux-xtensa-low.c (the_low_target): Likewise.
11183 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11184 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11185 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11186 srv_xmlfiles.
11187 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11188 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11189
11190 2012-02-29 Yao Qi <yao@codesourcery.com>
11191 Pedro Alves <palves@redhat.com>
11192
11193 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11194 `step_over_finished' is true.
11195
11196 2012-02-27 Pedro Alves <palves@redhat.com>
11197
11198 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11199 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11200
11201 2012-02-27 Pedro Alves <palves@redhat.com>
11202
11203 PR server/9684
11204 * linux-low.c (pid_is_stopped): New.
11205 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11206
11207 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11208
11209 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11210 of conditions.
11211
11212 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11213
11214 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11215
11216 2012-02-24 Luis Machado <lgustavo@codesourcery>
11217
11218 * server.c (handle_query): Advertise support for target-side
11219 breakpoint condition evaluation.
11220 (process_point_options): New function.
11221 (process_serial_event): When inserting a breakpoint, check for
11222 a target-side condition that should be evaluated.
11223
11224 * mem-break.c: Include regcache.h and ax.h.
11225 (point_cond_list_t): New data structure.
11226 (breakpoint) <cond_list>: New field.
11227 (find_gdb_breakpoint_at): Make non-static.
11228 (delete_gdb_breakpoint_at): Clear any target-side
11229 conditions.
11230 (clear_gdb_breakpoint_conditions): New function.
11231 (add_condition_to_breakpoint): Likewise.
11232 (add_breakpoint_condition): Likewise.
11233 (gdb_condition_true_at_breakpoint): Likewise.
11234 (gdb_breakpoint_here): Return result directly instead
11235 of going through a local variable.
11236
11237 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11238 (clear_gdb_breakpoint_conditions): Likewise.
11239 (add_breakpoint_condition): Likewise.
11240 (gdb_condition_true_at_breakpoint): Likewise.
11241
11242 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11243 (need_step_over_p): Take target-side breakpoint condition into
11244 consideration.
11245
11246 2012-02-24 Luis Machado <lgustavo@codesourcery>
11247
11248 * server.h: Include tracepoint.h.
11249 (agent_mem_read, agent_get_trace_state_variable_value,
11250 agent_set_trace_state_variable_value,
11251 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11252 get_set_tsv_func_addr): New prototypes.
11253
11254 * ax.h: New include file.
11255 * ax.c: New source file.
11256
11257 * tracepoint.c: Include ax.h.
11258 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11259 agent_expr, eval_result_type): Move to ax.h.
11260 (parse_agent_expr): Rename to ...
11261 (gdb_parse_agent_expr): ... this, make it non-static and move
11262 to ax.h.
11263 (unparse_agent_expr) Rename to ...
11264 (gdb_unparse_agent_expr): ... this, make it non-static and move
11265 to ax.h.
11266 (eval_agent_expr): Rename to ...
11267 (eval_tracepoint_agent_expr): ... this.
11268 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11269 forward declarations.
11270 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11271 (agent_get_trace_state_variable_value): New function.
11272 (agent_set_trace_state_variable_value): New function.
11273 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11274 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11275 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11276 (condition_true_at_tracepoint): Likewise.
11277 (parse_agent_expr): Rename to ...
11278 (gdb_parse_agent_expr): ... this and move to ax.c.
11279 (unparse_agent_expr): Rename to ...
11280 (gdb_unparse_agent_expr): ... this and move to ax.c.
11281 (gdb_agent_op_name): Move to ax.c.
11282 (eval_agent_expr): Rename to ...
11283 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11284 and move to ax.c.
11285 (eval_tracepoint_agent_expr): New function.
11286 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11287 non-static.
11288 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11289 ax.c.
11290 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11291 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11292 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11293 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11294 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11295 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11296 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11297 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11298 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11299 (compile_bytecodes): Remove forward declaration.
11300 (is_goto_target): Move to ax.c.
11301 (compile_bytecodes): Move to ax.c and call
11302 agent_get_trace_state_variable_value (...) and
11303 agent_set_trace_state_variable_value (...).
11304
11305 * Makefile.in: Update ax.c and IPA dependencies.
11306
11307 2012-02-24 Pedro Alves <palves@redhat.com>
11308
11309 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11310 (cmd_bigqtbuffer_circular): ... this. Only handle
11311 'QTBuffer:circular:'.
11312 (handle_tracepoint_general_set): Adjust.
11313
11314 2012-02-16 Yao Qi <yao@codesourcery.com>
11315
11316 * inferiors.c: Move code to ...
11317 * dll.c: .... here. New.
11318 * server.h: Declare clear_dlls.
11319 * Makefile.in (SFILES): Add dll.c.
11320 (OBS): Add dll.o
11321 (dll.o): New rule.
11322
11323 2012-02-11 Yao Qi <yao@codesourcery.com>
11324
11325 * server.c: (handle_monitor_command): Add a new parameter
11326 `own_buf'.
11327 (handle_query): Update caller.
11328
11329 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11330
11331 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11332 * configure, config.in: Regenerate.
11333 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11334 is not defined.
11335
11336 2012-02-02 Pedro Alves <palves@redhat.com>
11337
11338 Try SIGKILL first, then PTRACE_KILL.
11339 * linux-low.c (linux_kill_one_lwp): New.
11340 (linux_kill_one_lwp): Rename to ...
11341 (kill_one_lwp_callback): ... this. Use the new
11342 linux_kill_one_lwp.
11343
11344 2012-02-02 Pedro Alves <palves@redhat.com>
11345
11346 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11347 inferior.
11348
11349 2012-01-27 Pedro Alves <palves@redhat.com>
11350
11351 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11352 (elf_64_file_p): Make static.
11353 (linux_pid_exe_is_elf_64_file): New.
11354 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11355 Delete declarations.
11356 (linux_pid_exe_is_elf_64_file): Declare.
11357 * linux-x86-low.c (x86_arch_setup): Use
11358 linux_pid_exe_is_elf_64_file.
11359
11360 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11361
11362 * linux-low.c (linux_wait_for_event_1): Rename to ...
11363 (linux_wait_for_event): ... here and merge it with former
11364 linux_wait_for_event - new variable wait_ptid, use it.
11365 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11366
11367 2012-01-23 Pedro Alves <palves@redhat.com>
11368
11369 * server.c (main): Avoid yet another case of infinite loop while
11370 detaching/killing after a longjmp.
11371
11372 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11373
11374 Code cleanup.
11375 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11376
11377 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11378
11379 * hostio.c (handle_readlink): New function.
11380 (handle_vFile): Call it to handle "vFile:readlink" packets.
11381
11382 2012-01-20 Pedro Alves <palves@redhat.com>
11383 Ulrich Weigand <ulrich.weigand@linaro.org>
11384
11385 * server.c (handle_v_requests): Only support vAttach and vRun to
11386 start multiple processes when in extended protocol mode.
11387
11388 2012-01-17 Pedro Alves <palves@redhat.com>
11389
11390 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11391 memalign plus mprotect to allocate the scratch buffer.
11392
11393 2012-01-13 Pedro Alves <palves@redhat.com>
11394
11395 * server.c (attach_inferior): Clear `cont_thread'.
11396
11397 2012-01-13 Pedro Alves <palves@redhat.com>
11398
11399 * server.c (main): Avoid infinite loop while detaching/killing
11400 after a longjmp.
11401
11402 2012-01-09 Doug Evans <dje@google.com>
11403
11404 * server.c (start_inferior): Set last_ptid in --wrapper case.
11405
11406 2012-01-06 Yao Qi <yao@codesourcery.com>
11407
11408 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11409 defined.
11410 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11411
11412 2012-01-04 Yao Qi <yao@codesourcery.com>
11413
11414 * tracepoint.c (cmd_qtdp): Print debug message
11415 for static tracepoint.
11416
11417 2012-01-04 Yao Qi <yao@codesourcery.com>
11418
11419 * tracepoint.c (trace_vdebug): Differentiate debug message
11420 between gdbserver and IPA.
11421
11422 2012-01-03 Yao Qi <yao@codesourcery.com>
11423
11424 * tracepoint.c (tracepoint_was_hit): Don't collect for
11425 static tracepoint.
11426
11427 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11428
11429 * terminal.h: Reformat copyright header.
11430
11431 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11432
11433 * server.c (gdbserver_version): Update copyright year.
11434 * gdbreplay.c (gdbreplay_version): Likewise.
11435
11436 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11437
11438 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11439
11440 Revert:
11441 2011-12-18 Hui Zhu <teawater@gmail.com>
11442 * linux-low.c (linux_create_inferior): Save return value to ret.
11443
11444 2011-12-18 Hui Zhu <teawater@gmail.com>
11445
11446 * linux-low.c (linux_create_inferior): Save return value to ret.
11447
11448 2011-12-16 Doug Evans <dje@google.com>
11449
11450 * linux-low.c (linux_create_inferior): If stdio connection,
11451 redirect stdin from /dev/null, stdout to stderr.
11452 * remote-utils.c (remote_is_stdio): New static global.
11453 (remote_connection_is_stdio): New function.
11454 (remote_prepare): Handle stdio connection.
11455 (remote_open): Ditto.
11456 (remote_close): Don't close stdin for stdio connections.
11457 (read_prim,write_prim): New functions. Replace all calls to
11458 read/write to these.
11459 * server.c (main): Watch for "-" argument. Move call to
11460 remote_prepare before start_inferior.
11461 * server.h (STDIO_CONNECTION_NAME): New macro.
11462 (remote_connection_is_stdio): Declare.
11463
11464 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11465 in debugging output.
11466
11467 2011-12-15 Yao Qi <yao@codesourcery.com>
11468
11469 * tracepoint.c: Include sys/syscall.h.
11470 (gdb_ust_thread): Remove preprocessor conditional.
11471
11472 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11473
11474 * linux-low.c (linux_detach_one_lwp): Call
11475 the_low_target.prepare_to_resume before detaching.
11476
11477 2011-12-14 Yao Qi <yao@codesourcery.com>
11478
11479 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11480 of write.
11481
11482 2011-12-14 Yao Qi <yao@codesourcery.com>
11483
11484 * i386-low.c (i386_low_stopped_data_address): Initialize local
11485 variable `control'.
11486
11487 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11488
11489 PR remote/13492
11490
11491 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11492 DR_CONTROL unless necessary. Extend comments.
11493 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11494 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11495
11496 2011-12-13 Yao Qi <yao@codesourcery.com>
11497
11498 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11499 macros.
11500 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11501
11502 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11503
11504 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11505 Print new debug message for such case.
11506
11507 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11508
11509 Fix overlapping memcpy.
11510 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11511 the read_inferior_memory transfer.
11512 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11513 write_inferior_memory transfer.
11514 (set_fast_tracepoint_jump): New variable buf. Use it for the
11515 read_inferior_memory and write_inferior_memory transfers.
11516 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11517 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11518 Use it for the write_inferior_memory transfer.
11519 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11520 buffers.
11521
11522 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11523
11524 * linux-low.c (fetch_register, store_register): Make code
11525 consistent, fix formatting.
11526
11527 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11528
11529 * linux-low.c (usr_store_inferior_registers): Factor out code
11530 to handle individual registers into...
11531 (store_register): ... this new function.
11532
11533 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11534
11535 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11536 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11537 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11538 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11539 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11540 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11541 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11542 (srv_xmlfiles): Add new XML files.
11543
11544 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11545 and <sys/uio.h>.
11546 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11547 (init_registers_s390_linux32v1): Add prototype.
11548 (init_registers_s390_linux32v2): Likewise.
11549 (init_registers_s390_linux64v1): Likewise.
11550 (init_registers_s390_linux64v2): Likewise.
11551 (init_registers_s390x_linux64v1): Likewise.
11552 (init_registers_s390x_linux64v2): Likewise.
11553 (s390_num_regs): Increment to 52.
11554 (s390_regmap): Add orig_r2 register.
11555 (s390_num_regs_3264): Increment to 68.
11556 (s390_regmap_3264): Add orig_r2 register.
11557 (s390_collect_ptrace_register): Handle orig_r2 register.
11558 (s390_supply_ptrace_register): Likewise.
11559 (s390_fill_last_break): New function.
11560 (s390_store_last_break): Likewise.
11561 (s390_fill_system_call): New function.
11562 (s390_store_system_call): Likewise.
11563 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11564 register sets.
11565 (s390_check_regset): New function.
11566 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11567 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11568 Update target_regsets for available register sets.
11569
11570 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11571 Jan Kratochvil <jan.kratochvil@redhat.com>
11572
11573 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11574 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11575 New.
11576 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11577 * linux-low.h (struct process_info_private): New member r_debug.
11578 * server.c (handle_qxfer_libraries): Call
11579 the_target->qxfer_libraries_svr4.
11580 (handle_qxfer_libraries_svr4): New function.
11581 (qxfer_packets): New entry "libraries-svr4".
11582 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11583 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11584 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11585 PACKET_qXfer_libraries_svr4.
11586
11587 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11588
11589 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11590 PSW address/mask between 8-byte and 16-byte formats.
11591 (s390_supply_ptrace_register): Likewise.
11592 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11593 basic addressing mode bit.
11594
11595 2011-11-24 Stan Shebs <stan@codesourcery.com>
11596
11597 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11598
11599 2011-11-17 Stan Shebs <stan@codesourcery.com>
11600
11601 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11602 (tracing_start_time): New global.
11603 (tracing_stop_time): New global.
11604 (tracing_user_name): New global.
11605 (tracing_notes): New global.
11606 (tracing_stop_note): New global.
11607 (cmd_qtstart): Set traceframe_usage, start_time.
11608 (stop_tracing): Set stop_time.
11609 (cmd_qtstatus): Report additional status.
11610 (cmd_qtp): New function.
11611 (handle_tracepoint_query): Call it.
11612 (cmd_qtnotes): New function.
11613 (handle_tracepoint_general_set): Call it.
11614 (get_timestamp): Rename from tsv_get_timestamp.
11615
11616 2011-11-14 Stan Shebs <stan@codesourcery.com>
11617 Kwok Cheung Yeung <kcy@codesourcery.com>
11618
11619 * linux-x86-low.c (small_jump_insn): New.
11620 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11621 trampoline and error message, build a trampoline and issue a small
11622 jump instruction to it.
11623 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11624 trampoline and error message.
11625 (x86_get_min_fast_tracepoint_insn_len): New.
11626 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11627 * linux-low.h (struct linux_target_ops): Add arguments to
11628 install_fast_tracepoint_jump_pad operation, add new operation.
11629 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11630 arguments.
11631 (linux_get_min_fast_tracepoint_insn_len): New function.
11632 (linux_target_op): Add new operation.
11633 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11634 (gdb_trampoline_buffer_end): Ditto.
11635 (gdb_trampoline_buffer_error): Ditto.
11636 (struct ipa_sym_addresses): Add fields for new IPA variables.
11637 (symbol_list): Add entries for new IPA variables.
11638 (struct tracepoint): Add fields to hold the address range of the
11639 trampoline used by the tracepoint.
11640 (trampoline_buffer_head): New static variable.
11641 (trampoline_buffer_tail): Ditto.
11642 (claim_trampoline_space): New function.
11643 (have_fast_tracepoint_trampoline_buffer): New function.
11644 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11645 structure.
11646 (install_fast_tracepoint): Ditto, also add error buffer argument.
11647 (cmd_qtminftpilen): New function.
11648 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11649 (fast_tracepoint_from_trampoline_address): New function.
11650 (fast_tracepoint_collecting): Handle trampoline as part of jump
11651 pad space.
11652 (set_trampoline_buffer_space): New function.
11653 (initialize_tracepoint): Initialize new IPA variables.
11654 * target.h (struct target_ops): Add arguments to
11655 install_fast_tracepoint_jump_pad operation, add new
11656 get_min_fast_tracepoint_insn_len operation.
11657 (target_get_min_fast_tracepoint_insn_len): New.
11658 (install_fast_tracepoint_jump_pad): Add arguments.
11659 * server.h (IPA_BUFSIZ): Define.
11660 * linux-i386-ipa.c: Include extra header files.
11661 (initialize_fast_tracepoint_trampoline_buffer): New function.
11662 (initialize_low_tracepoint): Call it.
11663 * server.h (set_trampoline_buffer_space): Declare.
11664 (claim_trampoline_space): Ditto.
11665 (have_fast_tracepoint_trampoline_buffer): Ditto.
11666
11667 2011-11-14 Yao Qi <yao@codesourcery.com>
11668
11669 * server.c (handle_query): Handle InstallInTrace for qSupported.
11670 * tracepoint.c (add_tracepoint): Sort list.
11671 (install_tracepoint, download_tracepoint): New.
11672 (cmd_qtdp): Call them to install and download tracepoints.
11673 (sort_tracepoints): Removed.
11674 (cmd_qtstart): Update.
11675
11676 2011-11-14 Yao Qi <yao@codesourcery.com>
11677
11678 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11679 * mem-break.h: Declare.
11680 * tracepoint.c (cmd_qtstart): Move some code to ...
11681 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11682 New.
11683 (download_tracepoints): Move some code to ...
11684 (download_tracepoint_1): ... here. New.
11685
11686 2011-11-08 Yao Qi <yao@codesourcery.com>
11687
11688 * remote-utils.c (relocate_instruction): A comment fix.
11689
11690 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11691
11692 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11693 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11694 dr_status_mirror and dr_control_mirror from debug_reg_state.
11695 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11696 (i386_initial_stuff): Remove use of deleted globals.
11697 (i386_get_thread_context, i386_set_thread_context,
11698 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11699 from debug_reg_state.
11700
11701 2011-11-05 Yao Qi <yao@codesourcery.com>
11702
11703 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11704 address as TPOINT's.
11705
11706 2011-11-02 Stan Shebs <stan@codesourcery.com>
11707
11708 * tracepoint.c (agent_mem_read_string): New function.
11709 (eval_agent_expr): Call it for tracenz.
11710 * server.c (handle_query): Report support for tracenz.
11711
11712 2011-11-02 Yao Qi <yao@codesourcery.com>
11713
11714 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11715
11716 2011-11-02 Yao Qi <yao@codesourcery.com>
11717
11718 * target.h: Fix a typo in comment.
11719
11720 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11721
11722 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11723 clobber the breakpoints' shadows with fast tracepoint jumps.
11724 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11725 * target.c (write_inferior_memory): Also pass MYADDR down to
11726 check_mem_write.
11727
11728 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11729
11730 * configure.ac: Check support for personality routine.
11731 * configure: Regenerate.
11732 * config.in: Likewise.
11733 * linux-low.c: Include <sys/personality.h>.
11734 Define ADDR_NO_RANDOMIZE if necessary.
11735 (linux_create_inferior): Disable address space randomization when
11736 forking inferior, if requested.
11737 (linux_supports_disable_randomization): New function.
11738 (linux_target_ops): Install it.
11739 * server.h (disable_randomization): Declare.
11740 * server.c (disable_randomization): New global variable.
11741 (handle_general_set): Handle QDisableRandomization.
11742 (handle_query): Likewise for qSupported.
11743 (main): Support --disable-randomization and --no-disable-randomization
11744 command line arguments.
11745 * target.h (struct target_ops): Add supports_disable_randomization.
11746 (target_supports_disable_randomization): New macro.
11747
11748 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11749
11750 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11751 ifdef check.
11752 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11753 [!PT_GETDSBT] (target_loadmap): New definition.
11754 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11755 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11756 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11757 and PT_GETDSBT to LINUX_LOADMAP.
11758 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11759 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11760
11761 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11762
11763 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11764 (arm_linux_hwbp_cap): New static variable.
11765 (arm_linux_get_hwbp_cap): Replace by ...
11766 (arm_linux_init_hwbp_cap): ... this new function.
11767 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11768 (arm_linux_get_hw_watchpoint_count): Likewise.
11769 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11770 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11771 (arm_prepare_to_resume): Use perror_with_name instead of error.
11772
11773 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11774
11775 * linux-arm-low.c: Include <signal.h>.
11776 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11777 (struct arm_linux_hwbp_cap): New data type.
11778 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11779 (struct arm_linux_hw_breakpoint): New data type.
11780 (MAX_BPTS, MAX_WPTS): Define.
11781 (struct arch_process_info, struct arch_lwp_info): New data types.
11782 (arm_linux_get_hwbp_cap): New function.
11783 (arm_linux_get_hw_breakpoint_count): Likewise.
11784 (arm_linux_get_hw_watchpoint_count): Likewise.
11785 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11786 (arm_hwbp_control_initialize): Likewise.
11787 (arm_hwbp_control_is_enabled): Likewise.
11788 (arm_hwbp_control_is_initialized): Likewise.
11789 (arm_hwbp_control_disable): Likewise.
11790 (arm_linux_hw_breakpoint_equal): Likewise.
11791 (arm_linux_hw_point_initialize): Likewise.
11792 (struct update_registers_data): New data structure.
11793 (update_registers_callback: New function.
11794 (arm_insert_point): Likewise.
11795 (arm_remove_point): Likewise.
11796 (arm_stopped_by_watchpoint): Likewise.
11797 (arm_stopped_data_address): Likewise.
11798 (arm_new_process): Likewise.
11799 (arm_new_thread): Likewise.
11800 (arm_prepare_to_resume): Likewise.
11801 (the_low_target): Register arm_insert_point, arm_remove_point,
11802 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11803 arm_new_thread, and arm_prepare_to_resume.
11804
11805 2011-09-15 Stan Shebs <stan@codesourcery.com>
11806
11807 * server.h (struct emit_ops): Add compare-goto fields.
11808 * tracepoint.c (gdb_agent_op_sizes): New table.
11809 (emit_eq_goto): New function.
11810 (emit_ne_goto): New function.
11811 (emit_lt_goto): New function.
11812 (emit_le_goto): New function.
11813 (emit_gt_goto): New function.
11814 (emit_ge_goto): New function.
11815 (is_goto_target): New function.
11816 (compile_bytecodes): Recognize special cases of compare-goto
11817 combinations and call specialized emitters for them.
11818 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11819 (amd64_emit_ne_goto): New function.
11820 (amd64_emit_lt_goto): New function.
11821 (amd64_emit_le_goto): New function.
11822 (amd64_emit_gt_goto): New function.
11823 (amd64_emit_ge_goto): New function.
11824 (amd64_emit_ops): Add the new functions.
11825 (i386_emit_eq_goto): New function.
11826 (i386_emit_ne_goto): New function.
11827 (i386_emit_lt_goto): New function.
11828 (i386_emit_le_goto): New function.
11829 (i386_emit_gt_goto): New function.
11830 (i386_emit_ge_goto): New function.
11831 (i386_emit_ops): Add the new functions.
11832
11833 2011-09-08 Stan Shebs <stan@codesourcery.com>
11834
11835 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11836 (i386_emit_epilogue): Restore %ebx.
11837
11838 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11839
11840 * server.c (step_thread): Remove definition.
11841 (process_serial_event): Don't handle Hs.
11842 * server.h (step_thread): Remove declaration.
11843 * target.c (set_desired_inferior): Remove use of step_thread.
11844
11845 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11846
11847 * linux-low.c: Include linux-procfs.h.
11848 (linux_attach_lwp_1): Update comments.
11849 (linux_attach): Scan for existing threads when attaching to a
11850 process that is the tgid.
11851 * Makefile.in: Update dependencies.
11852
11853 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11854
11855 * configure.srv: Add linux-procfs.o dependencies.
11856
11857 2011-08-14 Yao Qi <yao@codesourcery.com>
11858
11859 * target.h (struct target_ops): Fix indent.
11860 * win32-low.c (win32_target_ops): Fix comment.
11861
11862 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11863 Yao Qi <yao@codesourcery.com>
11864
11865 * Makefile.in (clean): Remove tic6x-*.c files.
11866 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11867 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11868 (tic6x-c64xp-linux.c): Likewise.
11869 * configure.srv: Add support for tic6x-*-uclinux.
11870 * linux-tic6x-low.c: New.
11871 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11872
11873 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11874 Yao Qi <yao@codesourcery.com>
11875
11876 * target.h (struct target_ops): Add read_loadmap.
11877 * linux-low.c (struct target_loadseg): New type.
11878 (struct target_loadmap): New type.
11879 (linux_read_loadmap): New function.
11880 (linux_target_ops): Add linux_read_loadmap.
11881 * server.c (handle_query): Support qXfer:fdpic:read packet.
11882 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11883 to NULL.
11884
11885 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11886
11887 * win32-low.c: Include <stdint.h>.
11888
11889 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11890
11891 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11892 to the inferior here.
11893 (i386_remove_aligned_watchpoint): Ditto.
11894 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11895 fit part of the watchpoint in the debug registers.
11896 (i386_update_inferior_debug_regs): New.
11897 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11898 registers, and only update the inferior on success.
11899 (i386_low_remove_watchpoint): Ditto.
11900
11901 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11902
11903 * linux-low.c (compare_ints, unique, list_threads, show_process,
11904 linux_core_of_thread): Delete.
11905 (linux_target_ops): Change linux_core_of_thread to
11906 linux_common_core_of_thread.
11907 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11908 * utils.c (malloc_failure): Change type of argument.
11909 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11910 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11911 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11912 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11913 (IPA_OBJS): Add common-utils-ipa.o.
11914 (ptid_h, linux_osdata_h): New macros.
11915 (server_h): Add common/common-utils.h, common/xml-utils.h,
11916 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11917 common/ptid.h.
11918 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11919 ptid.o, buffer.o): New rules.
11920 (linux-low.o): Add common/linux-osdata.h as a dependency.
11921 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11922 * configure.ac: Add AC_HEADER_DIRENT check.
11923 * config.in: Regenerate.
11924 * configure: Regenerate.
11925 * remote-utils.c (xml_escape_text): Delete.
11926 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11927 buffer_xml_printf): Move to common/buffer.c.
11928 * server.c (main): Remove call to initialize_inferiors.
11929 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11930 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11931 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11932 internal_error, gdb_assert, gdb_assert_fail): Delete.
11933 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11934 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11935 common/buffer.h.
11936 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11937 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11938 initialize_inferiors): Delete.
11939
11940 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11941
11942 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11943 symbol error.
11944
11945 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11946
11947 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11948 assertion.
11949 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11950
11951 2011-05-26 Yao Qi <yao@codesourcery.com>
11952
11953 * Makefile.in (thread-db.o): Track dependence to
11954 common/gdb_thread_db.h.
11955 * thread-db.c: include gdb_thread_db.h from right place.
11956
11957 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11958
11959 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11960 __FILE__ and __LINE__ to internal_error.
11961
11962 2011-05-13 Doug Evans <dje@google.com>
11963
11964 * thread-db.c (try_thread_db_load_from_sdir): New function.
11965 (try_thread_db_load_from_dir): New function.
11966 (thread_db_load_search): Handle $sdir, ignore $pdir.
11967 Remove trying of system directories if search of
11968 libthread-db-search-path fails, that is now done via $sdir.
11969
11970 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11971
11972 * server.c (handle_query): Add EnableDisableTracepoints to the list
11973 of supported features.
11974 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11975 tracepoints.
11976 (cmd_qtenable_disable): New.
11977 (cmd_qtstart): Install tracepoints even if disabled.
11978 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11979 receiving a QTEnable or QTDisable packet.
11980 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11981 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11982 tracepoints.
11983 (gdb_probe): Skip data collection if static tracepoint is disabled.
11984
11985 2011-05-10 Doug Evans <dje@google.com>
11986
11987 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11988
11989 2011-05-04 Doug Evans <dje@google.com>
11990
11991 * linux-low.c (linux_join): Skip process lookup.
11992 * spu-low.c (spu_join): Ditto.
11993 * server.c (join_inferiors_callback): Delete.
11994 (process_serial_event): For 'D' packet (detach) call join_inferior
11995 directly.
11996
11997 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11998
11999 * README: Don't mention xscale*-*-linux*.
12000 * configure.srv (xscale*-*-linux*): Don't handle target.
12001
12002 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12003
12004 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12005 casting pointers.
12006 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12007 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12008 (i386_emit_void_call_2): Likewise.
12009
12010 2011-04-26 Yao Qi <yao@codesourcery.com>
12011
12012 * linux-low.c: Move common macros to linux-ptrace.h.
12013 Include linux-ptrace.h.
12014 * Makefile.in (linux_ptrace_h): New.
12015 (linux-low.o): Depends on linux-ptrace.h.
12016
12017 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12018
12019 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12020 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12021 (remote_prepare): New function with most of the TCP code from ...
12022 (remote_open): ... here. Detect PORT here unconditionally. Move also
12023 setting transport_is_reliable.
12024 * server.c (run_once): New variable.
12025 (gdbserver_usage): Document it.
12026 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12027 the first run if RUN_ONCE.
12028 * server.h (run_once, remote_prepare): New declarations.
12029
12030 2011-04-19 Tom Tromey <tromey@redhat.com>
12031
12032 * win32-low.c (handle_load_dll): Remove duplicate "the".
12033
12034 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12035
12036 Remove support for old Cygwin 1.5 versions.
12037 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12038 function to avoid warning.
12039 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12040 warning.
12041
12042 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12043
12044 * gdbserver/server.h (Macro _): Define it if not available.
12045
12046 2011-03-14 Michael Snyder <msnyder@vmware.com>
12047
12048 * hostio.c (handle_close): Remove unnecessary null test.
12049
12050 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12051
12052 * Makefile.in (maintainer-clean realclean distclean): Remove
12053 "make ... subdir_do" command.
12054
12055 2011-03-10 Michael Snyder <msnyder@vmware.com>
12056
12057 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12058
12059 * server.c (handle_v_run): Free alloced buffer on early return.
12060
12061 2011-03-09 Yao Qi <yao@codesourcery.com>
12062
12063 Revert:
12064 2011-03-04 Yao Qi <yao@codesourcery.com>
12065
12066 * Makefile.in: Remove GNU make feature --directory.
12067
12068 2011-03-05 Yao Qi <yao@codesourcery.com>
12069
12070 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12071 (subdir_do): New make target. Copied from gdb/Makefile.
12072 (maintainer-clean, realclean, distclean, clean): Call corresponding
12073 make targets in common/Makefile.
12074
12075 2011-02-11 Yao Qi <yao@codesourcery.com>
12076
12077 * configure.ac: Call AC_PROG_RANLIB.
12078 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12079 * configure: Regenerate.
12080
12081 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12082
12083 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12084
12085 2011-03-06 Yao Qi <yao@codesourcery.com>
12086
12087 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12088
12089 2011-03-05 Yao Qi <yao@codesourcery.com>
12090
12091 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12092 (subdir_do): New make target. Copied from gdb/Makefile.
12093 (maintainer-clean, realclean, distclean, clean): Call corresponding
12094 make targets in common/Makefile.
12095
12096 2011-03-04 Yao Qi <yao@codesourcery.com>
12097
12098 * Makefile.in: Remove GNU make feature --directory.
12099
12100 2011-03-04 Michael Snyder <msnyder@vmware.com>
12101
12102 * server.c (queue_stop_reply): Call xmalloc not malloc.
12103
12104 2011-03-02 Michael Snyder <msnyder@vmware.com>
12105
12106 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12107
12108 2011-02-28 Michael Snyder <msnyder@vmware.com>
12109
12110 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12111 (cmd_qtframe): Ditto.
12112 (cmd_qtbuffer): Ditto.
12113 (cmd_bigqtbuffer): Ditto.
12114
12115 * utils.c (decimal2str): Initialize 'width' to nine, then
12116 don't mess with it.
12117
12118 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12119
12120 * hostio.c (require_data): Free *data, not data.
12121
12122 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12123
12124 * hostio.c (require_data): Use free, not xfree.
12125
12126 2011-02-27 Michael Snyder <msnyder@vmware.com>
12127
12128 * server.c (handle_query): Discard unused value.
12129
12130 * hostio.c (require_data): Free malloc memory before returning
12131 error.
12132
12133 2011-02-26 Michael Snyder <msnyder@vmware.com>
12134
12135 * linux-low.c (list_threads): Call closedir for dirent.
12136
12137 2011-02-27 Michael Snyder <msnyder@vmware.com>
12138
12139 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12140 a case statement falls through.
12141
12142 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12143
12144 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12145 in comparison.
12146
12147 2011-02-26 Michael Snyder <msnyder@vmware.com>
12148
12149 * utils.c (decimal2str): Eliminate dead code and dead param.
12150 (pulongest): Drop dead param from call to decimal2str.
12151 (plongest): Ditto.
12152
12153 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12154
12155 Revert the following patch (not approved yet):
12156 2011-02-21 Hui Zhu <teawater@gmail.com>
12157 * tracepoint.c (tp_printf): New function.
12158 (eval_agent_expr): Handle gdb_agent_op_printf.
12159
12160 2011-02-21 Hui Zhu <teawater@gmail.com>
12161
12162 * tracepoint.c (tp_printf): New function.
12163 (eval_agent_expr): Handle gdb_agent_op_printf.
12164
12165 2011-02-18 Tom Tromey <tromey@redhat.com>
12166
12167 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12168 (tracepoint.o): Likewise.
12169 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12170 (gdb_agent_op_names): Likewise.
12171
12172 2011-02-18 Tom Tromey <tromey@redhat.com>
12173
12174 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12175 gdb_agent_op_rot>: New constants.
12176 (gdb_agent_op_names): Add pick and roll.
12177 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12178 cases.
12179
12180 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12181
12182 * aclocal.m4: Regenerated with aclocal-1.11.1.
12183
12184 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12185
12186 * server.c (handle_qxfer_traceframe_info): New.
12187 (qxfer_packets): Register "traceframe-info".
12188 (handle_query): Report support for qXfer:traceframe-info:read+.
12189 * tracepoint.c (match_blocktype): New.
12190 (traceframe_find_block_type): Rename to ...
12191 (traceframe_walk_blocks): ... this. Add callback filter argument,
12192 and use it.
12193 (traceframe_find_block_type): New, reimplemented on top of
12194 traceframe_walk_blocks.
12195 (build_traceframe_info_xml): New.
12196 (traceframe_read_info): New.
12197 * server.h (traceframe_read_info): Declare.
12198
12199 2011-02-11 Yao Qi <yao@codesourcery.com>
12200
12201 * configure.ac: Call AC_PROG_RANLIB.
12202 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12203 * configure: Regenerate.
12204
12205 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12206
12207 * server.c (gdb_read_memory): Change return semantics to allow
12208 partial transfers.
12209 (handle_search_memory_1): Adjust.
12210 (process_serial_event) <'m' packet>: Handle partial transfers.
12211 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12212
12213 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12214
12215 * regcache.c (init_register_cache): Initialize
12216 regcache->register_status.
12217 (free_register_cache): Release regcache->register_status.
12218 (regcache_cpy): Copy register_status.
12219 (registers_to_string): Print 'x's for unavailable registers.
12220 (supply_register): Mark the register's status valid or
12221 unavailable, depending on whether a buffer was passed in or not.
12222 (supply_register_zeroed): New.
12223 (supply_regblock): Mark the registers' status valid or
12224 unavailable, depending on whether a buffer was passed in or not.
12225 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12226 (struct regcache): New `register_status' field.
12227 (supply_register_zeroed): Declare.
12228 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12229 supply_register_zeroed, rather than passing a NULL buffer to
12230 supply_register.
12231 * tracepoint.c (fetch_traceframe_registers): Update comment.
12232
12233 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12234
12235 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12236 buffer explicit.
12237
12238 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12239
12240 * server.h (decode_xfer_write): Change prototype.
12241 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12242 and don't extract the annex here.
12243 * server.c (decode_xfer_read): Remove `annex' parameter,
12244 and don't extract the annex here.
12245 (decode_xfer): New.
12246 (struct qxfer): New.
12247 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12248 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12249 (handle_qxfer_statictrace): New functions, abstracted out from
12250 handle_query, and made to use the struct qxfer interface.
12251 (handle_threads_qxfer_proper): Rename to ...
12252 (handle_qxfer_threads_proper): ... this.
12253 (handle_threads_qxfer): Rename to ...
12254 (handle_qxfer_threads): ... this. Adjust.
12255 (qxfer_packets): New array.
12256 (handle_qxfer): New function.
12257 (handle_query): Use handle_qxfer.
12258
12259 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12260
12261 * gdbreplay.c: Shorten lines of >= 80 columns.
12262 * linux-low.c: Ditto.
12263 * linux-ppc-low.c: Ditto.
12264 * linux-s390-low.c: Ditto.
12265 * linux-sparc-low.c: Ditto.
12266 * linux-x86-low.c: Ditto.
12267 * linux-xtensa-low.c: Ditto.
12268 * mem-break.c: Ditto.
12269 * nto-low.c: Ditto.
12270 * regcache.h: Ditto.
12271 * remote-utils.c: Ditto.
12272 * server.c: Ditto.
12273 * server.h: Ditto.
12274 * thread-db.c: Ditto.
12275 * tracepoint.c: Ditto.
12276 * utils.c: Ditto.
12277 * win32-low.h: Ditto.
12278
12279 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12280
12281 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12282 update.
12283
12284 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12285
12286 * server.c (gdbserver_version): Update copyright year in version
12287 output.
12288 * gdbreplay.c (gdbreplay_version): Ditto.
12289
12290 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12291
12292 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12293 * linux-bfin-low.c: New file.
12294 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12295 PT_DATA_ADDR for BFIN targets.
12296 * Makefile.in (SFILES): Add linux-bfin-low.c.
12297 (clean): Remove reg-bfin.c.
12298 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12299 * README: Mention supported Blackfin targets.
12300
12301 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12302
12303 * .gitignore: New file.
12304
12305 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12306
12307 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12308
12309 2010-10-22 Jie Zhang <jie@codesourcery.com>
12310
12311 * Makefile.in: Add FLAGS_TO_PASS variable.
12312 (install): Remove dependency of install-only and recursively
12313 invoke make for install-only.
12314
12315 2010-10-04 Doug Evans <dje@google.com>
12316
12317 * Makefile.in (uninstall): Use $(DESTDIR).
12318
12319 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12320
12321 PR gdb/11842
12322
12323 * linux-x86-low.c (compat_siginfo_from_siginfo)
12324 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12325 si_code is < 0. Check for si_code == SI_TIMER before checking for
12326 si_code < 0.
12327
12328 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12329
12330 * lynx-i386-low.c: New file.
12331 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12332
12333 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12334
12335 * lynx-low.c (ptrace_request_to_str): Remove handling for
12336 request values that have been removed in LynxOS 5.x.
12337
12338 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12339
12340 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12341 <ptrace.h>
12342
12343 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12344
12345 * configure.ac: Add --enable-inprocess-agent option.
12346 * configure: Rebuilt.
12347
12348 2010-09-06 Yao Qi <yao@codesourcery.com>
12349
12350 * linux-low.c (linux_kill): Remove unused variable.
12351 (linux_stabilize_threads): Likewise.
12352 * server.c (start_inferior): Likewise.
12353 (queue_stop_reply_callback): Likewise.
12354 * tracepoint.c (do_action_at_tracepoint): Likewise.
12355
12356 2010-09-06 Yao Qi <yao@codesourcery.com>
12357
12358 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12359 on return.
12360
12361 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12362
12363 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12364
12365 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12366
12367 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12368 "$(IPA_DEPFILES)".
12369
12370 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12371
12372 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12373 gdbserver/lynx-ppc-low.c: New files.
12374 * Makefile.in (lynx_low_h): New variable.
12375 (lynx-low.o, lynx-ppc-low.o): New rules.
12376 * configure.ac: On LynxOS, link with -lnetinet.
12377 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12378 * configure: regenerate.
12379
12380 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12381
12382 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12383 * configure.ac: Add check for vasprintf and vsnprintf.
12384 * configure, config.in: Regenerate.
12385 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12386
12387 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12388
12389 * gdbreplay.c: Move include of alloca.h up, next to include of
12390 malloc.h.
12391 * server.h: Add include of malloc.h.
12392 * mem-break.c: Remove include of malloc.h.
12393 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12394
12395 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12396
12397 * Makefile.in (memmem.o): Build with -Wno-error.
12398
12399 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12400
12401 * utils.c (xsnprintf): Make non-static.
12402 * server.h: Add xsnprintf declaration.
12403 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12404 replace calls to snprintf by calls to xsnprintf throughout.
12405
12406 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12407
12408 * configure.ac: Add configure check for alloca.
12409 * configure, config.in: Regenerate.
12410 * server.h: Include alloca.h if it exists.
12411 * gdbreplay.c: Include alloca.h if it exists.
12412
12413 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12414
12415 * linux-low.c (__SIGRTMIN): Define if not already defined.
12416 (linux_create_inferior): Check for __ANDROID__ rather than
12417 __SIGRTMIN.
12418 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12419 are already deferred.
12420 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12421 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12422 stopped and already has a pending signal to report.
12423 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12424 a pending signal to report or is moving out of a jump pad.
12425 (linux_init_signals): Check for __ANDROID__ rather than
12426 __SIGRTMIN.
12427
12428 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12429
12430 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12431 debug_threads check. Avoid a linear search when not doing debug
12432 output.
12433
12434 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12435
12436 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12437 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12438 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12439 (process_event): Change local fd's type to gdb_fildes_t.
12440 (create_file_handler): Adjust prototype.
12441 (delete_file_handler): Adjust prototype.
12442 (handle_file_event): Adjust prototype. Use pfildes.
12443 (create_file_event): Adjsut prototype.
12444 * remote-utils.c (remote_desc, listen_desc): Change type to
12445 gdb_fildes_t.
12446 * server.h: New gdb_fildes_t typedef.
12447 [USE_WIN32API]: Include winsock2.h.
12448 (delete_file_handler, add_file_handler): Adjust prototypes.
12449 (pfildes): Declare.
12450 * utils.c (pfildes): New.
12451
12452 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12453
12454 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12455 * configure: Regenerate.
12456
12457 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12458
12459 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12460 (linux_done_accessing_memory): ... this.
12461 (linux_target_ops): Adjust.
12462 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12463 * nto-low.c (nto_target_ops): Adjust comment.
12464 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12465 * spu-low.c (spu_target_ops): Adjust comment.
12466 * target.h (target_ops): Rename unprepare_to_access_memory field
12467 to done_accessing_memory.
12468 (unprepare_to_access_memory): Rename to ...
12469 (done_accessing_memory): ... this.
12470
12471 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-low.c (linux_prepare_to_access_memory): New.
12474 (linux_unprepare_to_access_memory): New.
12475 (linux_target_ops): Install them.
12476 * server.c (read_memory): Rename to ...
12477 (gdb_read_memory): ... this. Use
12478 prepare_to_access_memory/prepare_to_access_memory.
12479 (write_memory): Rename to ...
12480 (gdb_write_memory): ... this. Use
12481 prepare_to_access_memory/prepare_to_access_memory.
12482 (handle_search_memory_1): Adjust.
12483 (process_serial_event): Adjust.
12484 * target.h (struct target_ops): New fields
12485 prepare_to_access_memory and unprepare_to_access_memory.
12486 (prepare_to_access_memory, unprepare_to_access_memory): New.
12487 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12488 prepare_to_access_memory/prepare_to_access_memory.
12489 * nto-low.c (nto_target_ops): Adjust.
12490 * spu-low.c (spu_target_ops): Adjust.
12491 * win32-low.c (win32_target_ops): Adjust.
12492
12493 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12494
12495 * Makefile.in (WARN_CFLAGS): Get it from configure.
12496 (WERROR_CFLAGS): New.
12497 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12498 * configure.ac: Introduce --enable-werror, which adds -Werror to
12499 the compiler command line. Enabled by default. Disable with
12500 --disable-werror. Add -Wdeclaration-after-statement
12501 Wpointer-arith and -Wformat-nonliteral to warning flags.
12502 * configure: Regenerate.
12503
12504 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12505
12506 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12507
12508 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12509
12510 * gdbreplay.c (remote_error): New.
12511 (gdbchar): New.
12512 (expect): Use gdbchar. Check for error reading from GDB.
12513 Clarify sync error output.
12514 (play): Check for errors writing to GDB.
12515 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12516 * remote-utils.c (getpkt): Check for errors writing to the remote
12517 descriptor.
12518
12519 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12520
12521 * linux-low.c (linux_wait_1): Move non-debugging code out of
12522 `debug_threads' control.
12523
12524 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12525
12526 * linux-low.c (linux_wait_1): Don't set last_status here.
12527 * server.c (push_event, queue_stop_reply_callback): Assert we're
12528 not pushing a TARGET_WAITKIND_IGNORE event.
12529 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12530 (myresume, handle_target_event): Set the thread's last_resume_kind
12531 and last_status from the target returned status.
12532
12533 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12534
12535 PR threads/10729
12536
12537 * linux-x86-low.c (update_debug_registers_callback): New.
12538 (i386_dr_low_set_addr): Use it.
12539 (i386_dr_low_get_addr): New.
12540 (i386_dr_low_set_control): Use update_debug_registers_callback.
12541 (i386_dr_low_get_control): New.
12542 (i386_dr_low_get_status): Adjust.
12543 * linux-low.c (linux_stop_lwp): New.
12544 * linux-low.h (linux_stop_lwp): Declare.
12545
12546 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12547 argument instead of a i386_debug_reg_state.
12548 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12549 a i386_debug_reg_state.
12550 (i386_insert_aligned_watchpoint): Adjust.
12551 (i386_remove_aligned_watchpoint): Adjust.
12552 (i386_low_stopped_data_address): Read the debug registers from the
12553 inferior instead of from the mirrors.
12554 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12555 (i386_dr_low_get_addr): Declare.
12556 (i386_dr_low_get_control): Declare.
12557 (i386_dr_low_get_status): Change prototype.
12558
12559 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12560 (i386_dr_low_get_addr): New.
12561 (i386_dr_low_get_control): New.
12562 (i386_dr_low_get_status): Adjust prototype. Return
12563 dr_status_mirror.
12564 (i386_initial_stuff): Clear dr_status_mirror and
12565 dr_control_mirror.
12566 (i386_get_thread_context): Adjust.
12567 (i386_set_thread_context): Adjust.
12568 (i386_thread_added): Adjust.
12569
12570 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12571
12572 * linux-low.h (linux_thread_area): Delete declaration.
12573
12574 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12575
12576 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12577 after its termination.
12578
12579 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12580
12581 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12582 (gdb_wants_all_stopped): Delete.
12583 (linux_wait_1): Don't call them.
12584 * server.c (handle_v_cont): Tag all threads as want-stopped.
12585 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12586 stopped as "client-wants-stopped".
12587
12588 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12589
12590 * Makefile.in (signals_h): New.
12591 (server_h): Depend on it.
12592 (server.o): Don't depend on $(signals_def).
12593 (signals.o): Depend on $(signals_def).
12594
12595 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12596
12597 * Makefile.in (signals_def): New.
12598 (server_h): Append include/gdb/signals.h and signals_def.
12599 (server.o): Append signals_def.
12600
12601 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12602
12603 * server.c (handle_target_event): Use target_signal_to_host for
12604 resume_info.sig initialization.
12605 * target.h (struct thread_resume) <sig>: New comment.
12606
12607 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12608
12609 * server.c (handle_query): strcpy() the returned string from paddress()
12610 instead of sprintf().
12611 * utils.c (paddress): Return phex_nz().
12612
12613 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12614
12615 * server.c (handle_v_cont): Call mourn_inferior if process
12616 just exited.
12617 (myresume): Likewise.
12618
12619 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12620
12621 Static tracepoints, and integration with UST.
12622
12623 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12624 * mem-break.c (uninsert_all_breakpoints)
12625 (reinsert_all_breakpoints): New.
12626 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12627 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12628 (gdb_agent_ust_loaded, helper_thread_id)
12629 (gdb_agent_helper_thread_id): New macros.
12630 (struct ipa_sym_addresses): Add addr_ust_loaded,
12631 addr_helper_thread_id, addr_cmd_buf.
12632 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12633 (in_process_agent_loaded_ust): New.
12634 (write_e_ust_not_loaded): New.
12635 (maybe_write_ipa_ust_not_loaded): New.
12636 (struct collect_static_trace_data_action): New.
12637 (enum tracepoint_type) <static_tracepoint>: New.
12638 (struct tracepoint) <handle>: Mention static tracepoints.
12639 (struct static_tracepoint_ctx): New.
12640 (CMD_BUF_SIZE): New.
12641 (add_tracepoint_action): Handle static tracepoint actions.
12642 (unprobe_marker_at): New.
12643 (clear_installed_tracepoints): Handle static tracepoints.
12644 (cmd_qtdp): Handle static tracepoints.
12645 (probe_marker_at): New.
12646 (cmd_qtstart): Handle static tracepoints.
12647 (response_tracepoint): Handle static tracepoints.
12648 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12649 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12650 (get_context_regcache): Handle static tracepoints.
12651 (do_action_at_tracepoint): Handle static tracepoint actions.
12652 (traceframe_find_block_type): Handle static trace data blocks.
12653 (traceframe_read_sdata): New.
12654 (download_tracepoints): Download static tracepoint actions.
12655 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12656 (GDB_PROBE_NAME): New.
12657 (ust_ops): New.
12658 (GET_UST_SYM): New.
12659 (USTF): New.
12660 (dlsym_ust): New.
12661 (ust_marker_to_static_tracepoint): New.
12662 (gdb_probe): New.
12663 (collect_ust_data_at_tracepoint): New.
12664 (gdb_ust_probe): New.
12665 (UNIX_PATH_MAX, SOCK_DIR): New.
12666 (gdb_ust_connect_sync_socket): New.
12667 (resume_thread, stop_thread): New.
12668 (run_inferior_command): New.
12669 (init_named_socket): New.
12670 (gdb_ust_socket_init): New.
12671 (cstr_to_hexstr): New.
12672 (next_st): New.
12673 (first_marker, next_marker): New.
12674 (response_ust_marker): New.
12675 (cmd_qtfstm, cmd_qtsstm): New.
12676 (unprobe_marker_at, probe_marker_at): New.
12677 (cmd_qtstmat, gdb_ust_thread): New.
12678 (gdb_ust_init): New.
12679 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12680 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12681 (ST_REGENTRY): New.
12682 (x86_64_st_collect_regmap): New.
12683 (X86_64_NUM_ST_COLLECT_GREGS): New.
12684 (AMD64_RIP_REGNUM): New.
12685 (supply_static_tracepoint_registers): New.
12686 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12687 (ST_REGENTRY): New.
12688 (i386_st_collect_regmap): New.
12689 (i386_NUM_ST_COLLECT_GREGS): New.
12690 (supply_static_tracepoint_registers): New.
12691 * server.c (handle_query): Handle qXfer:statictrace:read.
12692 <qSupported>: Report support for StaticTracepoints, and
12693 qXfer:statictrace:read features.
12694 * server.h (traceframe_read_sdata)
12695 (supply_static_tracepoint_registers): Declare.
12696 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12697 (unpack_varlen_hex): Include in IPA build.
12698 * Makefile.in (ustlibs, ustinc): New.
12699 (IPA_OBJS): Add remote-utils-ipa.o.
12700 ($(IPA_LIB)): Link -ldl and -lpthread.
12701 (UST_CFLAGS): New.
12702 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12703 * config.in, configure: Regenerate.
12704
12705 2010-06-20 Ian Lance Taylor <iant@google.com>
12706 Pedro Alves <pedro@codesourcery.com>
12707
12708 * linux-x86-low.c (always_true): Delete.
12709 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12710 trying to fool the compiler with always_true.
12711
12712 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12713
12714 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12715 conditions in gdbserver.
12716
12717 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12718
12719 * spu-low.c (spu_read_memory): Wrap around local store limit.
12720 (spu_write_memory): Likewise.
12721
12722 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12723
12724 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12725 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12726 LONGEST uses.
12727 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12728 uses.
12729 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12730 uses with LONGEST uses.
12731
12732 2010-06-14 Stan Shebs <stan@codesourcery.com>
12733 Pedro Alves <pedro@codesourcery.com>
12734
12735 Bytecode compiler.
12736
12737 * linux-x86-low.c: Include limits.h.
12738 (add_insns): New.
12739 (always_true): New.
12740 (EMIT_ASM): New.
12741 (EMIT_ASM32): New.
12742 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12743 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12744 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12745 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12746 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12747 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12748 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12749 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12750 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12751 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12752 (amd64_emit_void_call_2): New.
12753 (amd64_emit_ops): New.
12754 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12755 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12756 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12757 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12758 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12759 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12760 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12761 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12762 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12763 (i386_emit_stack_adjust, i386_emit_int_call_1)
12764 (i386_emit_void_call_2): New.
12765 (i386_emit_ops): New.
12766 (x86_emit_ops): New.
12767 (the_low_target): Install x86_emit_ops.
12768 * server.h (struct emit_ops): New.
12769 (get_raw_reg_func_addr): Declare.
12770 (current_insn_ptr, emit_error): Declare.
12771 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12772 (set_trace_state_variable_value): New defines.
12773 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12774 addr_get_trace_state_variable_value and
12775 addr_set_trace_state_variable_value.
12776 (symbol_list): New fields for get_raw_reg,
12777 get_trace_state_variable_value and set_trace_state_variable_value.
12778 (condfn): New typedef.
12779 (struct tracepoint): New field `compiled_cond'.
12780 (do_action_at_tracepoint): Clear compiled_cond.
12781 (get_trace_state_variable_value, set_trace_state_variable_value):
12782 Export in the IPA.
12783 (condition_true_at_tracepoint): If there's a compiled condition,
12784 run that.
12785 (current_insn_ptr, emit_error): New globals.
12786 (struct bytecode_address): New.
12787 (get_raw_reg_func_addr): New.
12788 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12789 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12790 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12791 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12792 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12793 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12794 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12795 (compile_tracepoint_condition, compile_bytecodes): New.
12796 * target.h (emit_ops): Forward declare.
12797 (struct target_ops): New field emit_ops.
12798 (target_emit_ops): New.
12799 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12800 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12801 * linux-low.c (linux_emit_ops): New.
12802 (linux_target_ops): Install it.
12803 * linux-low.h (struct linux_target_ops): New field emit_ops.
12804
12805 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12806
12807 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12808 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12809
12810 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12811 Stan Shebs <stan@codesourcery.com>
12812
12813 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12814 (all): Depend on $(extra_libraries).
12815 (install-only): Install the IPA.
12816 (IPA_OBJS, IPA_LIB): New.
12817 (clean): Remove the IPA lib.
12818 (IPAGENT_CFLAGS): New.
12819 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12820 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12821 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12822 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12823 * configure.ac: Check for atomic builtins support in the compiler.
12824 (IPA_DEPFILES, extra_libraries): Define.
12825 * configure.srv (ipa_obj): Add description.
12826 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12827 (i[34567]86-*-linux*): Set ipa_obj.
12828 (x86_64-*-linux*): Set ipa_obj.
12829 * linux-low.c (stabilizing_threads): New.
12830 (supports_fast_tracepoints): New.
12831 (linux_detach): Stabilize threads before detaching.
12832 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12833 the lwp is either not stabilizing, or is moving out of a jump pad.
12834 (linux_fast_tracepoint_collecting): New.
12835 (maybe_move_out_of_jump_pad): New.
12836 (enqueue_one_deferred_signal): New.
12837 (dequeue_one_deferred_signal): New.
12838 (linux_wait_for_event_1): If moving out of a jump pad, defer
12839 pending signals to later.
12840 (linux_stabilize_threads): New.
12841 (linux_wait_1): Check if threads need moving out of jump pads, and
12842 do it if so.
12843 (stuck_in_jump_pad_callback): New.
12844 (move_out_of_jump_pad_callback): New.
12845 (lwp_running): New.
12846 (linux_resume_one_lwp): Handle moving out of jump pads.
12847 (linux_set_resume_request): Dequeue deferred signals.
12848 (need_step_over_p): Also step over fast tracepoint jumps.
12849 (start_step_over): Also uninsert fast tracepoint jumps.
12850 (finish_step_over): Also reinsert fast tracepoint jumps.
12851 (linux_install_fast_tracepoint_jump): New.
12852 (linux_target_ops): Install linux_stabilize_threads and
12853 linux_install_fast_tracepoint_jump_pad.
12854 * linux-low.h (linux_target_ops) <get_thread_area,
12855 install_fast_tracepoint_jump_pad>: New fields.
12856 (struct lwp_info) <collecting_fast_tracepoint,
12857 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12858 (linux_get_thread_area): Declare.
12859 * linux-x86-low.c (jump_insn): New.
12860 (x86_get_thread_area): New.
12861 (append_insns): New.
12862 (push_opcode): New.
12863 (amd64_install_fast_tracepoint_jump_pad): New.
12864 (i386_install_fast_tracepoint_jump_pad): New.
12865 (x86_install_fast_tracepoint_jump_pad): New.
12866 (the_low_target): Install x86_get_thread_area and
12867 x86_install_fast_tracepoint_jump_pad.
12868 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12869 (struct fast_tracepoint_jump): New.
12870 (fast_tracepoint_jump_insn): New.
12871 (fast_tracepoint_jump_shadow): New.
12872 (find_fast_tracepoint_jump_at): New.
12873 (fast_tracepoint_jump_here): New.
12874 (delete_fast_tracepoint_jump): New.
12875 (set_fast_tracepoint_jump): New.
12876 (uninsert_fast_tracepoint_jumps_at): New.
12877 (reinsert_fast_tracepoint_jumps_at): New.
12878 (set_breakpoint_at): Use write_inferior_memory.
12879 (uninsert_raw_breakpoint): Use write_inferior_memory.
12880 (check_mem_read): Mask out fast tracepoint jumps.
12881 (check_mem_write): Mask out fast tracepoint jumps.
12882 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12883 (set_fast_tracepoint_jump): Declare.
12884 (delete_fast_tracepoint_jump)
12885 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12886 (reinsert_fast_tracepoint_jumps_at): Declare.
12887 * regcache.c: Don't compile many functions when building the
12888 in-process agent library.
12889 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12890 the register buffer in the heap.
12891 (free_register_cache): If the register buffer isn't owned by the
12892 regcache, don't free it.
12893 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12894 pre-existing register caches.
12895 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12896 type.
12897 (convert_ascii_to_int): : Constify `from' parameter type.
12898 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12899 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12900 the needed buffer in-place.
12901 (relocate_instruction): New.
12902 * server.c (handle_query) <qSymbols>: If the target supports
12903 tracepoints, give it a chance of looking up symbols. Report
12904 support for fast tracepoints.
12905 (handle_status): Stabilize threads.
12906 (process_serial_event): Adjust.
12907 * server.h (struct fast_tracepoint_jump): Forward declare.
12908 (struct process_info) <fast_tracepoint_jumps>: New field.
12909 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12910 (decode_X_packet, decode_M_packet): Adjust.
12911 (relocate_instruction): Declare.
12912 (in_process_agent_loaded): Declare.
12913 (tracepoint_look_up_symbols): Declare.
12914 (struct fast_tpoint_collect_status): Declare.
12915 (fast_tracepoint_collecting): Declare.
12916 (force_unlock_trace_buffer): Declare.
12917 (handle_tracepoint_bkpts): Declare.
12918 (initialize_low_tracepoint)
12919 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12920 * target.h (struct target_ops) <stabilize_threads,
12921 install_fast_tracepoint_jump_pad>: New fields.
12922 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12923 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12924 [HAVE_STDINT_H]: Include stdint.h.
12925 (trace_debug_1): Rename to ...
12926 (trace_vdebug): ... this.
12927 (trace_debug): Rename to ...
12928 (trace_debug_1): ... this. Add `level' parameter.
12929 (trace_debug): New.
12930 (ATTR_USED, ATTR_NOINLINE): New.
12931 (IP_AGENT_EXPORT): New.
12932 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12933 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12934 (about_to_request_buffer_space, trace_buffer_is_full)
12935 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12936 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12937 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12938 (traceframe_write_count, traceframes_created)
12939 (trace_state_variables)
12940 New renaming defines.
12941 (struct ipa_sym_addresses): New.
12942 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12943 (symbol_list): New.
12944 (ipa_sym_addrs): New.
12945 (all_tracepoint_symbols_looked_up): New.
12946 (in_process_agent_loaded): New.
12947 (write_e_ipa_not_loaded): New.
12948 (maybe_write_ipa_not_loaded): New.
12949 (tracepoint_look_up_symbols): New.
12950 (debug_threads) [IN_PROCESS_AGENT]: New.
12951 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12952 (UNKNOWN_SIDE_EFFECTS): New.
12953 (stop_tracing): New.
12954 (flush_trace_buffer): New.
12955 (stop_tracing_bkpt): New.
12956 (flush_trace_buffer_bkpt): New.
12957 (read_inferior_integer): New.
12958 (read_inferior_uinteger): New.
12959 (read_inferior_data_pointer): New.
12960 (write_inferior_data_pointer): New.
12961 (write_inferior_integer): New.
12962 (write_inferior_uinteger): New.
12963 (struct collect_static_trace_data_action): Delete.
12964 (enum tracepoint_type): New.
12965 (struct tracepoint) <type>: New field `type'.
12966 <actions_str, step_actions, step_actions_str>: Only include in
12967 GDBserver.
12968 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12969 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12970 (tracepoints): Use IP_AGENT_EXPORT.
12971 (last_tracepoint): Don't include in the IPA.
12972 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12973 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12974 (alloced_trace_state_variables): New.
12975 (trace_state_variables): Use IP_AGENT_EXPORT.
12976 (traceframe_t): Delete unused variable.
12977 (circular_trace_buffer): Don't include in the IPA.
12978 (trace_buffer_start): Delete.
12979 (struct trace_buffer_control): New.
12980 (trace_buffer_free): Delete.
12981 (struct ipa_trace_buffer_control): New.
12982 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12983 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12984 New.
12985 (trace_buffer_ctrl): New.
12986 (TRACE_BUFFER_CTRL_CURR): New.
12987 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12988 Reimplement as macros.
12989 (trace_buffer_wrap): Delete.
12990 (traceframe_write_count, traceframe_read_count)
12991 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12992 (struct tracepoint_hit_ctx) <type>: New field.
12993 (struct fast_tracepoint_ctx): New.
12994 (memory_barrier): New.
12995 (cmpxchg): New.
12996 (record_tracepoint_error): Update atomically in the IPA.
12997 (clear_inferior_trace_buffer): New.
12998 (about_to_request_buffer_space): New.
12999 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13000 updating the same buffer.
13001 (add_tracepoint): Default the tracepoint's type to trap
13002 tracepoint, and orig_size to -1.
13003 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13004 internal variables.
13005 (create_trace_state_variable): New parameter `gdb'. Handle it.
13006 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13007 (cmd_qtdp): Handle fast tracepoints.
13008 (cmd_qtdv): Adjust.
13009 (max_jump_pad_size): New.
13010 (gdb_jump_pad_head): New.
13011 (get_jump_space_head): New.
13012 (claim_jump_space): New.
13013 (sort_tracepoints): New.
13014 (MAX_JUMP_SIZE): New.
13015 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13016 IPA.
13017 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13018 support. Upload fast traceframes, and delete internal IPA
13019 breakpoints.
13020 (stop_tracing_handler): New.
13021 (flush_trace_buffer_handler): New.
13022 (cmd_qtstop): Upload fast tracepoints.
13023 (response_tracepoint): Handle fast tracepoints.
13024 (tracepoint_finished_step): Upload fast traceframes. Set the
13025 tracepoint hit context's tracepoint type.
13026 (handle_tracepoint_bkpts): New.
13027 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13028 type. Add comment about fast tracepoints.
13029 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13030 non-existing action_str field.
13031 (get_context_regcache): Handle fast tracepoints.
13032 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13033 to the regcache.
13034 (fast_tracepoint_from_jump_pad_address): New.
13035 (fast_tracepoint_from_ipa_tpoint_address): New.
13036 (collecting_t): New.
13037 (force_unlock_trace_buffer): New.
13038 (fast_tracepoint_collecting): New.
13039 (collecting): New.
13040 (gdb_collect): New.
13041 (write_inferior_data_ptr): New.
13042 (target_tp_heap): New.
13043 (target_malloc): New.
13044 (download_agent_expr): New.
13045 (UALIGN): New.
13046 (download_tracepoints): New.
13047 (download_trace_state_variables): New.
13048 (upload_fast_traceframes): New.
13049 (IPA_FIRST_TRACEFRAME): New.
13050 (IPA_NEXT_TRACEFRAME_1): New.
13051 (IPA_NEXT_TRACEFRAME): New.
13052 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13053 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13054 (gdb_jump_pad_buffer_end): New.
13055 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13056 (initialize_tracepoint): Adjust.
13057 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13058 buffer. Initialize the low module.
13059 * utils.c (PREFIX, TOOLNAME): New.
13060 (malloc_failure): Use PREFIX.
13061 (error): In the IPA, an error causes an exit.
13062 (fatal, warning): Use PREFIX.
13063 (internal_error): Use TOOLNAME.
13064 (NUMCELLS): Increase to 10.
13065 * configure, config.in: Regenerate.
13066
13067 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13068
13069 * server.c (handle_query) <qSupported>: Do two passes over the
13070 qSupported string to avoid nesting strtok.
13071
13072 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13073
13074 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13075 (CDEPS): New.
13076 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13077 -Wl,--dynamic-list.
13078 * configure: Regenerate.
13079 * proc-service.list: New.
13080
13081 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13082
13083 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13084 New comment.
13085
13086 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13087
13088 * gdbreplay.c (remote_open): Check error return from socket() call by
13089 its equality to -1 not by it being negative.
13090 * remote-utils.c (remote_open): Likewise.
13091
13092 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13093
13094 * config.h: Regenerate.
13095
13096 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13097
13098 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13099 doesn't provide PTRACE_GET_THREAD_AREA.
13100
13101 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13102
13103 * linux-m68k-low.c: Include <asm/ptrace.h>
13104 (ps_get_thread_area): Implement.
13105
13106 2010-05-03 Doug Evans <dje@google.com>
13107
13108 * event-loop.c (struct callback_event): New struct.
13109 (callback_list): New global.
13110 (append_callback_event, delete_callback_event): New functions.
13111 (process_callback): New function.
13112 (start_event_loop): Call it.
13113 * remote-utils.c (NOT_SCHEDULED): Define.
13114 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13115 moved out of readchar.
13116 (readchar): Rewrite. Call reschedule before returning.
13117 (reset_readchar): New function.
13118 (remote_close): Call it.
13119 (process_remaining, reschedule): New functions.
13120 * server.h (callback_handler_func): New typedef.
13121 (append_callback_event, delete_callback_event): Declare.
13122
13123 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13124
13125 * proc-service.c (ps_pglobal_lookup): Use
13126 thread_db_look_up_one_symbol.
13127 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13128 parameter. Use it instead of all_symbols_looked_up.
13129 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13130 field.
13131 (all_symbols_looked_up): Don't declare.
13132 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13133 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13134 field.
13135 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13136 Set all_symbols_looked_up here.
13137 (thread_db_look_up_one_symbol): New.
13138 (thread_db_get_tls_address): Adjust.
13139 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13140 thread_db object on the heap, and tentatively set it in the
13141 process structure.
13142 (thread_db_init): Don't set all_symbols_looked_up here.
13143 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13144
13145 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13146
13147 * linux-low.c (linux_kill, linux_detach): Adjust.
13148 (status_pending_p_callback): Remove redundant statement. Check
13149 for !TARGET_WAITIKIND_IGNORE, instead of
13150 TARGET_WAITKIND_STOPPED.
13151 (handle_tracepoints): Make sure LWP is locked. Adjust.
13152 (linux_wait_for_event_1): Adjust.
13153 (linux_cancel_breakpoints): New.
13154 (unsuspend_one_lwp): New.
13155 (unsuspend_all_lwps): New.
13156 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13157 (send_sigstop_callback): Change return type to int, add new
13158 `except' parameter and handle it.
13159 (suspend_and_send_sigstop_callback): New.
13160 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13161 pass them down. If SUSPEND, also increment the lwp's suspend
13162 count.
13163 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13164 (need_step_over_p): Don't consider suspended LWPs.
13165 (start_step_over): Adjust.
13166 (proceed_one_lwp): Change return type to int, add new `except'
13167 parameter and handle it.
13168 (unsuspend_and_proceed_one_lwp): New.
13169 (proceed_all_lwps): Use find_inferior instead of
13170 for_each_inferior.
13171 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13172 also decrement the suspend count of LWPs. Pass `except' down,
13173 instead of hacking its suspend count.
13174 (linux_pause_all): Add `freeze' parameter. Adjust.
13175 (linux_unpause_all): New.
13176 (linux_target_ops): Install linux_unpause_all.
13177 * server.c (handle_status): Adjust.
13178 * target.h (struct target_ops): New fields `unpause_all' and
13179 `cancel_breakpoints'. Add new parameter to `pause_all'.
13180 (pause_all): Add new `freeze' parameter.
13181 (unpause_all): New.
13182 (cancel_breakpoints): New.
13183 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13184 cancel breakpoints.
13185 (cmd_qtstart): Pause threads.
13186 (stop_tracing): Pause threads, and cancel breakpoints.
13187 * win32-low.c (win32_target_ops): Adjust.
13188
13189 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13190
13191 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13192 the inferior right away from here...
13193 (linux_wait_1): ... to here, and adjust to check the thread's
13194 last_resume_kind instead of the lwp's step or stop_expected flags.
13195
13196 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13197
13198 * README: Use consistent `GDB' and `GDBserver' spellings.
13199
13200 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13201
13202 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13203 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13204 (linux_detach_one_lwp): Assume the lwp is stopped.
13205 (any_thread_of): Delete.
13206 (linux_detach): Stop all lwps here. Don't blindly delete all
13207 breakpoints.
13208 (delete_lwp_callback): New.
13209 (linux_mourn): Delete all lwps of the process that is gone.
13210 (linux_wait_1): Don't delete the last lwp of the process here.
13211 * mem-break.h (mark_breakpoints_out): Declare.
13212 * mem-break.c (mark_breakpoints_out): New.
13213 (free_all_breakpoints): Use it.
13214 * server.c (handle_target_event): If the process is gone, mark
13215 breakpoints out.
13216 * thread-db.c (struct thread_db) <create_bp>: New field.
13217 (thread_db_enable_reporting): Fix prototype. Store a thread event
13218 breakpoint reference in the thread_db struct.
13219 (thread_db_load_search): Clear the thread_db object.
13220 (try_thread_db_load_1): Ditto.
13221 (switch_to_process): New.
13222 (disable_thread_event_reporting): Use it.
13223 (remove_thread_event_breakpoints): New.
13224 (thread_db_detach, thread_db_mourn): Use it.
13225
13226 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13227
13228 * linux-low.c (linux_enable_event_reporting): New.
13229 (linux_wait_for_event_1, handle_extended_wait): Use it.
13230
13231 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13232
13233 * linux-low.c (linux_kill_one_lwp, linux_kill)
13234 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13235 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13236 SIGSTOP even if the LWP is stopped.
13237 (send_sigstop_callback): New.
13238 (stop_all_lwps): Use send_sigstop_callback instead.
13239 (linux_resume_one_thread): Adjust.
13240 (proceed_one_lwp): Still proceed an LWP that the client has
13241 requested to stop, if we haven't reported it as stopped yet. Make
13242 sure that LWPs the client want stopped, have a pending SIGSTOP.
13243
13244 2010-04-26 Doug Evans <dje@google.com>
13245
13246 * server.c (handle_general_set): Make static.
13247
13248 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13249 Print received char after testing for error/eof instead of before.
13250 (input_interrupt): Tweak comment.
13251
13252 2010-04-23 Doug Evans <dje@google.com>
13253
13254 * server.c (start_inferior): Print inferior argv if --debug.
13255
13256 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13257
13258 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13259 * nto-x86-low.c: Include server.h
13260
13261 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13262
13263 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13264 be consistent with other sources of this directory.
13265 (init_registers_amd64): Correct name of source file of this function
13266 in the comment.
13267
13268 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13269
13270 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13271 64-bit executables.
13272
13273 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13274
13275 * win32-i386-low.c: Add 64-bit support.
13276 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13277 (init_registers_amd64): Declare.
13278 (mappings): Add 64-bit version of array.
13279 (init_windows_x86): New function.
13280 (the_low_target): Change init_arch field to init_windows_x86.
13281
13282 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13283
13284 * win32-low.c: Adapt to support also 64-bit architecture.
13285 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13286 (get_image_name): Use SIZE_T type for local variable `done'.
13287 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13288 (toolhelp_get_dll_name): Idem.
13289 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13290 Use uintptr_t typecast to avoid warning.
13291 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13292 (handle_exception): Use phex_nz to avoid warning.
13293 (win32_wait): Remove unused local variable `process'.
13294
13295 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13296
13297 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13298 `amd64-avx.o'.
13299
13300 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13301
13302 * configure.ac: Use `ws2_32' library for srv_mingw.
13303 * configure: Regenerate.
13304 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13305 * remote-utils.c: Likewise.
13306
13307 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13308
13309 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13310 if __x86_64__ is defined.
13311
13312 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13313
13314 * configure: Regenerate.
13315
13316 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13317
13318 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13319 * target.h (target_ops): New get_tib_address field.
13320 * win32-low.h (win32_thread_info): Add thread_local_base field.
13321 * win32-low.c (child_add_thread): Add tlb argument.
13322 Set thread_local_base field to TLB.
13323 (get_child_debug_event): Adapt to child_add_thread change.
13324 (win32_get_tib_address): New function.
13325 (win32_target_ops): Set get_tib_address field to
13326 win32_get_tib_address.
13327 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13328
13329 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13330
13331 * linux-low.c (linux_mourn): Also remove the process.
13332 * server.c (handle_target_event): Don't remove the process here.
13333 * nto-low.c (nto_mourn): New.
13334 (nto_target_ops): Install it.
13335 * spu-low.c (spu_mourn): New.
13336 (spu_target_ops): Install it.
13337 * win32-low.c (win32_mourn): New.
13338 (win32_target_ops): Install it.
13339
13340 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13341
13342 * server.h (buffer_xml_printf): Remove redundant `;'.
13343
13344 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13345
13346 * regcache.c (set_register_cache): Invalidate regcaches before
13347 changing the register cache layout.
13348 (regcache_invalidate_one): Allow a NULL regcache.
13349 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13350 regcaches before changing the register cache layout or the target
13351 regsets.
13352
13353 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13354
13355 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13356 variable warning on Linux/x86-64.
13357
13358 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13359
13360 GDBserver disconnected tracing support.
13361
13362 * linux-low.c (linux_remove_process): Delete.
13363 (add_lwp): Don't set last_resume_kind here.
13364 (linux_kill): Use `mourn'.
13365 (linux_detach): Use `thread_db_detach', and `mourn'.
13366 (linux_mourn): New.
13367 (linux_attach_lwp_1): Adjust comment.
13368 (linux_attach): last_resume_kind moved the thread_info; adjust.
13369 (status_pending_p_callback): Adjust.
13370 (linux_wait_for_event_1): Adjust.
13371 (count_events_callback, select_singlestep_lwp_callback)
13372 (select_event_lwp_callback, cancel_breakpoints_callback)
13373 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13374 (proceed_one_lwp): Adjust.
13375 (linux_async): Add debug output.
13376 (linux_thread_stopped): New.
13377 (linux_pause_all): New.
13378 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13379 linux_pause_all.
13380 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13381 (thread_db_free): Delete declaration.
13382 (thread_db_detach, thread_db_mourn): Declare.
13383 * thread-db.c (thread_db_init): Use thread_db_mourn.
13384 (thread_db_free): Delete, split in two.
13385 (disable_thread_event_reporting): New.
13386 (thread_db_detach): New.
13387 (thread_db_mourn): New.
13388
13389 * server.h (struct thread_info) <last_resume_kind>: New field.
13390 <attached>: Add comment.
13391 <gdb_detached>: New field.
13392 (handler_func): Change return type to int.
13393 (handle_serial_event, handle_target_event): Ditto.
13394 (gdb_connected): Declare.
13395 (tracing): Delete.
13396 (disconnected_tracing): Declare.
13397 (stop_tracing): Declare.
13398
13399 * server.c (handle_query) <qSupported>: Report support for
13400 disconnected tracing.
13401 (queue_stop_reply_callback): Account for running threads.
13402 (gdb_wants_thread_stopped): New.
13403 (gdb_wants_all_threads_stopped): New.
13404 (gdb_reattached_process): New.
13405 (handle_status): Clear the `gdb_detached' flag of all processes.
13406 In all-stop, stop all threads.
13407 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13408 (process_serial_event): If the remote connection breaks, or if an
13409 exit was forced with "monitor exit", force an event loop exit.
13410 Handle disconnected tracing on detach.
13411 (handle_serial_event): Adjust.
13412 (handle_target_event): If GDB isn't connected, forward events back
13413 to the inferior, unless the last process exited, in which case,
13414 exit gdbserver. Adjust interface.
13415
13416 * remote-utils.c (remote_open): Don't block in accept. Instead
13417 register an event loop source on the listen socket file
13418 descriptor. Refactor bits into ...
13419 (listen_desc): ... this new global.
13420 (gdb_connected): ... this new function.
13421 (enable_async_notification): ... this new function.
13422 (handle_accept_event): ... this new function.
13423 (remote_close): Clear remote_desc.
13424
13425 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13426
13427 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13428 New fields.
13429 (mourn_inferior): Define.
13430 (target_process_qsupported): Avoid the dangling else problem.
13431 (thread_stopped): Define.
13432 (pause_all): Define.
13433 (target_waitstatus_to_string): Declare.
13434 * target.c (target_waitstatus_to_string): New.
13435
13436 * tracepoint.c (tracing): Make extern.
13437 (disconnected_tracing): New.
13438 (stop_tracing): Make extern. Handle tracing stops due to GDB
13439 disconnecting.
13440 (cmd_qtdisconnected): New.
13441 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13442 (handle_tracepoint_general_set): Handle QTDisconnected.
13443
13444 * event-loop.c (event_handler_func): Change return type to int.
13445 (process_event): Bail out if the event handler wants the event
13446 loop to stop.
13447 (handle_file_event): Ditto.
13448 (start_event_loop): Bail out if the event handler wants the event
13449 loop to stop.
13450
13451 * nto-low.c (nto_target_ops): Adjust.
13452 * spu-low.c (spu_wait): Don't remove the process here.
13453 (spu_target_ops): Adjust.
13454 * win32-low.c (win32_wait): Don't remove the process here.
13455 (win32_target_ops): Adjust.
13456
13457 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13458
13459 * regcache.c (realloc_register_cache): Invalidate inferior's
13460 regcache before recreating it.
13461
13462 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13463
13464 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13465
13466 2010-04-09 Stan Shebs <stan@codesourcery.com>
13467 Pedro Alves <pedro@codesourcery.com>
13468
13469 * server.h (LONGEST): New.
13470 (struct thread_info) <while_stepping>: New field.
13471 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13472 Declare.
13473 (initialize_tracepoint, handle_tracepoint_general_set)
13474 (handle_tracepoint_query, tracepoint_finished_step)
13475 (tracepoint_was_hit, release_while_stepping_state_list):
13476 (current_traceframe): Declare.
13477 * server.c (handle_general_set): Handle tracepoint packets.
13478 (read_memory): New.
13479 (write_memory): New.
13480 (handle_search_memory_1): Use read_memory.
13481 (handle_query): Report support for conditional tracepoints, trace
13482 state variables, and tracepoint sources. Handle tracepoint
13483 queries.
13484 (main): Initialize the tracepoints module.
13485 (process_serial_event): Handle traceframe reads/writes.
13486
13487 * linux-low.c (handle_tracepoints): New.
13488 (linux_wait_1): Call it.
13489 (linux_resume_one_lwp): Handle while-stepping.
13490 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13491 (linux_target_ops): Install them.
13492 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13493 New field.
13494 * linux-x86-low.c (x86_supports_tracepoints): New.
13495 (the_low_target). Install it.
13496
13497 * mem-break.h (delete_breakpoint): Declare.
13498 * mem-break.c (delete_breakpoint): Make external.
13499
13500 * target.h (struct target_ops): Add `supports_tracepoints',
13501 `read_pc', and `write_pc' fields.
13502 (target_supports_tracepoints): Define.
13503 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13504 (phex_nz): New.
13505
13506 * regcache.h (struct regcache) <registers_owned>: New field.
13507 (init_register_cache, regcache_cpy): Declare.
13508 (regcache_read_pc, regcache_write_pc): Declare.
13509 (register_cache_size): Declare.
13510 (supply_regblock): Declare.
13511 * regcache.c (init_register_cache): New.
13512 (new_register_cache): Use it.
13513 (regcache_cpy): New.
13514 (register_cache_size): New.
13515 (supply_regblock): New.
13516 (regcache_read_pc, regcache_write_pc): New.
13517
13518 * tracepoint.c: New.
13519
13520 * Makefile.in (OBS): Add tracepoint.o.
13521 (tracepoint.o): New rule.
13522
13523 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13524
13525 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13526 (i386-mmx.o): New.
13527 (i386-mmx.c): Likewise.
13528 (i386-mmx-linux.o): Likewise.
13529 (i386-mmx-linux.c): Likewise.
13530
13531 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13532 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13533 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13534 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13535
13536 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13537 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13538 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13539
13540 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13541
13542 * Makefile.in (clean): Updated.
13543 (i386-avx.o): New.
13544 (i386-avx.c): Likewise.
13545 (i386-avx-linux.o): Likewise.
13546 (i386-avx-linux.c): Likewise.
13547 (amd64-avx.o): Likewise.
13548 (amd64-avx.c): Likewise.
13549 (amd64-avx-linux.o): Likewise.
13550 (amd64-avx-linux.c): Likewise.
13551
13552 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13553 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13554 (srv_amd64_regobj): Add amd64-avx.o.
13555 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13556 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13557 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13558 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13559 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13560 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13561 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13562
13563 * i387-fp.c: Include "i386-xstate.h".
13564 (i387_xsave): New.
13565 (i387_cache_to_xsave): Likewise.
13566 (i387_xsave_to_cache): Likewise.
13567 (x86_xcr0): Likewise.
13568
13569 * i387-fp.h (i387_cache_to_xsave): Likewise.
13570 (i387_xsave_to_cache): Likewise.
13571 (x86_xcr0): Likewise.
13572
13573 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13574 * linux-crisv32-low.c (target_regsets): Likewise.
13575 * linux-m68k-low.c (target_regsets): Likewise.
13576 * linux-mips-low.c (target_regsets): Likewise.
13577 * linux-ppc-low.c (target_regsets): Likewise.
13578 * linux-s390-low.c (target_regsets): Likewise.
13579 * linux-sh-low.c (target_regsets): Likewise.
13580 * linux-sparc-low.c (target_regsets): Likewise.
13581 * linux-xtensa-low.c (target_regsets): Likewise.
13582
13583 * linux-low.c: Include <sys/uio.h>.
13584 (regsets_fetch_inferior_registers): Support nt_type.
13585 (regsets_store_inferior_registers): Likewise.
13586 (linux_process_qsupported): New.
13587 (linux_target_ops): Add linux_process_qsupported.
13588
13589 * linux-low.h (regset_info): Add nt_type.
13590 (linux_target_ops): Add process_qsupported.
13591
13592 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13593 and <sys/uio.h>.
13594 (init_registers_i386_avx_linux): New.
13595 (init_registers_amd64_avx_linux): Likewise.
13596 (xmltarget_i386_linux_no_xml): Likewise.
13597 (xmltarget_amd64_linux_no_xml): Likewise.
13598 (PTRACE_GETREGSET): Likewise.
13599 (PTRACE_SETREGSET): Likewise.
13600 (x86_fill_xstateregset): Likewise.
13601 (x86_store_xstateregset): Likewise.
13602 (use_xml): Likewise.
13603 (x86_linux_update_xmltarget): Likewise.
13604 (x86_linux_process_qsupported): Likewise.
13605 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13606 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13607 init_registers_i386_linux here. Call
13608 x86_linux_update_xmltarget.
13609 (the_low_target): Add x86_linux_process_qsupported.
13610
13611 * server.c (handle_query): Call target_process_qsupported.
13612
13613 * target.h (target_ops): Add process_qsupported.
13614 (target_process_qsupported): New.
13615
13616 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13617
13618 * inferiors.c (add_thread): Set last_status kind to
13619 TARGET_WAITKIND_IGNORE.
13620 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13621 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13622 (linux_wait_1): Move `thread' local definition to block that uses
13623 it. Don't NULL initialize `event_child'.
13624 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13625 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13626 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13627
13628 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13629
13630 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13631 an extended waitstatus, or by a watchpoint.
13632 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13633 thread was stepping or has been stopped by a watchpoint.
13634
13635 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13636
13637 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13638 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13639 of another, then delete the previous, and validate all
13640 breakpoints.
13641 (validate_inserted_breakpoint): New.
13642 (delete_disabled_breakpoints): New.
13643 (validate_breakpoints): New.
13644 (check_mem_read): Validate breakpoints before trusting their
13645 shadow. Delete disabled breakpoints.
13646 (check_mem_write): Validate breakpoints before trusting they
13647 should be inserted. Delete disabled breakpoints.
13648 * mem-break.h (validate_breakpoints):
13649 * server.c (handle_query): Validate breakpoints when we see a
13650 qSymbol query.
13651
13652 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13653
13654 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13655 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13656 if we could tell there's a GDB breakpoint at stop_pc.
13657 (need_step_over_p): Don't do a step over if we find a GDB
13658 breakpoint at the resume PC.
13659
13660 * mem-break.c (struct raw_breakpoint): New.
13661 (enum bkpt_type): New type `gdb_breakpoint'.
13662 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13663 fields. New field `raw'.
13664 (find_raw_breakpoint_at): New.
13665 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13666 breakpoint instead.
13667 (set_breakpoint_at): Adjust.
13668 (delete_raw_breakpoint): New.
13669 (release_breakpoint): New.
13670 (delete_breakpoint): Rename to...
13671 (delete_breakpoint_1): ... this. Add proc parameter. Use
13672 release_breakpoint. Return ENOENT.
13673 (delete_breakpoint): Reimplement.
13674 (find_breakpoint_at): Delete.
13675 (find_gdb_breakpoint_at): New.
13676 (delete_breakpoint_at): Delete.
13677 (set_gdb_breakpoint_at): New.
13678 (delete_gdb_breakpoint_at): New.
13679 (gdb_breakpoint_here): New.
13680 (set_reinsert_breakpoint): Use release_breakpoint.
13681 (uninsert_breakpoint): Rename to ...
13682 (uninsert_raw_breakpoint): ... this.
13683 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13684 (reinsert_raw_breakpoint): Change parameter type to
13685 raw_breakpoint.
13686 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13687 instead.
13688 (check_breakpoints): Adjust. Use release_breakpoint.
13689 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13690 (breakpoint_inserted_here): Ditto.
13691 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13692 Don't trust the breakpoint's shadow if it is not inserted.
13693 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13694 (delete_all_breakpoints): Adjust.
13695 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13696 use delete_breakpoint_1.
13697
13698 * mem-break.h (breakpoints_supported): Delete declaration.
13699 (set_gdb_breakpoint_at): Declare.
13700 (gdb_breakpoint_here): Declare.
13701 (delete_breakpoint_at): Delete.
13702 (delete_gdb_breakpoint_at): Declare.
13703
13704 * server.h (struct raw_breakpoint): Forward declare.
13705 (struct process_info): New field `raw_breakpoints'.
13706
13707 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13708 breakpoints.
13709
13710 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13711
13712 * linux-low.c (status_pending_p_callback): Fix comment.
13713 (linux_wait_for_event_1): Move most of the internal breakpoint
13714 handling from here...
13715 (linux_wait_1): ... to here.
13716 (count_events_callback): New.
13717 (select_singlestep_lwp_callback): New.
13718 (select_event_lwp_callback): New.
13719 (cancel_breakpoints_callback): New.
13720 (select_event_lwp): New.
13721 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13722 priority to all LWPs that have had events that should be reported
13723 to the client. Cancel breakpoints when about to reporting the
13724 event to the client, not while stopping lwps. No longer cancel
13725 finished single-steps here.
13726 (cancel_finished_single_step): Delete.
13727 (cancel_finished_single_steps): Delete.
13728
13729 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13730
13731 * mem-break.c (enum bkpt_type): New.
13732 (struct breakpoint): New field `type'.
13733 (set_breakpoint_at): Change return type to struct breakpoint
13734 pointer. Set type to `other_breakpoint' by default.
13735 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13736 in the breakpoint list.
13737 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13738 (reinsert_breakpoint): Rename to ...
13739 (reinsert_raw_breakpoint): ... this.
13740 (reinsert_breakpoints_at): Adjust.
13741 * mem-break.h (struct breakpoint): Declare.
13742 (set_breakpoint_at): Change return type to struct breakpoint
13743 pointer.
13744
13745 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13746
13747 * server.c (handle_query): Assign, not compare.
13748
13749 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13750
13751 Teach linux gdbserver to step-over-breakpoints.
13752
13753 * linux-low.c (can_hardware_single_step): New.
13754 (supports_breakpoints): New.
13755 (handle_extended_wait): If stopping threads, read the stop pc of
13756 the new cloned LWP.
13757 (get_pc): New.
13758 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13759 low target doesn't support retrieving the PC.
13760 (add_lwp): Set last_resume_kind to resume_continue.
13761 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13762 (linux_attach): Don't clear stop_expected. Set the lwp's
13763 last_resume_kind to resume_stop.
13764 (linux_detach_one_lwp): Don't check for removed breakpoints.
13765 (check_removed_breakpoint): Delete.
13766 (status_pending_p): Rename to ...
13767 (status_pending_p_callback): ... this. Don't check for removed
13768 breakpoints. Don't consider threads that are stopped from GDB's
13769 perspective.
13770 (linux_wait_for_lwp): Always read the stop_pc here.
13771 (cancel_breakpoint): New.
13772 (step_over_bkpt): New global.
13773 (linux_wait_for_event_1): Implement stepping over breakpoints.
13774 (gdb_wants_lwp_stopped): New.
13775 (gdb_wants_all_stopped): New.
13776 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13777 single-step traps here. Store the thread's last reported target
13778 wait status.
13779 (send_sigstop): Don't clear stop_expected. Always set it,
13780 instead.
13781 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13782 (cancel_finished_single_step): New.
13783 (cancel_finished_single_steps): New.
13784 (wait_for_sigstop): Don't cancel finished single-step traps here.
13785 (linux_resume_one_lwp): Don't check for removed breakpoints.
13786 Don't set `step' on non-hardware step archs.
13787 (linux_set_resume_request): Ignore resume_stop requests if already
13788 stopping or stopped. Set the lwp's last_resume_kind.
13789 (resume_status_pending_p): Don't check for removed breakpoints.
13790 (need_step_over_p): New.
13791 (start_step_over): New.
13792 (finish_step_over): New.
13793 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13794 requests. Clear the thread's last reported target waitstatus.
13795 Don't use the `suspended' flag. Don't consider pending breakpoints.
13796 (linux_resume): Start a step-over if necessary.
13797 (proceed_one_lwp): New.
13798 (proceed_all_lwps): New.
13799 (unstop_all_lwps): New.
13800 * linux-low.h (struct lwp_info): Rewrite comment for the
13801 `suspended' flag. Add the `stop_pc' field. Delete the
13802 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13803 Add `'last_resume_kind' and `need_step_over' fields.
13804 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13805 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13806 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13807 (set_raw_breakpoint_at): New.
13808 (set_breakpoint_at): Rewrite to use it.
13809 (reinsert_breakpoint_handler): Delete.
13810 (set_reinsert_breakpoint): New.
13811 (reinsert_breakpoint_by_bp): Delete.
13812 (delete_reinsert_breakpoints): New.
13813 (uninsert_breakpoint): Rewrite.
13814 (uninsert_breakpoints_at): New.
13815 (reinsert_breakpoint): Rewrite.
13816 (reinsert_breakpoints_at): New.
13817 (check_breakpoints): Rewrite.
13818 (breakpoint_here): New.
13819 (breakpoint_inserted_here): New.
13820 (check_mem_read): Adjust.
13821 * mem-break.h (breakpoints_supported, breakpoint_here)
13822 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13823 (reinsert_breakpoint_by_bp): Delete declaration.
13824 (delete_reinsert_breakpoints): Declare.
13825 (reinsert_breakpoint): Delete declaration.
13826 (reinsert_breakpoints_at): Declare.
13827 (uninsert_breakpoint): Delete declaration.
13828 (uninsert_breakpoints_at): Declare.
13829 (check_breakpoints): Adjust prototype.
13830 * server.h: Adjust include order.
13831 (struct thread_info): Declare here. Add a `last_status' field.
13832
13833 2010-03-23 Michael Snyder <msnyder@vmware.com>
13834
13835 * server.c (crc32): New function.
13836 (handle_query): Add handling for 'qCRC:' request.
13837
13838 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13839
13840 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13841 lwp had been stopped by a watchpoint.
13842
13843 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13844
13845 * server.h (internal_error): Declare.
13846 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13847 * utils.c (internal_error): New function.
13848
13849 2010-03-15 Andreas Schwab <schwab@redhat.com>
13850
13851 * configure.srv: Fix typo setting srv_regobj.
13852
13853 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13854
13855 * linux-low.c (fetch_register): Avoid passing a non string literal
13856 format to `error'.
13857 (usr_store_inferior_registers): Ditto.
13858
13859 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13860
13861 * linux-low.c (linux_write_memory): Bail out early if peeking
13862 memory failed.
13863
13864 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13865
13866 * linux-low.h (struct lwp_info): New fields
13867 `stopped_by_watchpoint' and `stopped_data_address'.
13868 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13869 here, and cache them in the lwp object.
13870 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13871 directly.
13872 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13873 field.
13874 (linux_stopped_by_watchpoint): Rewrite.
13875 (linux_stopped_data_address): Rewrite.
13876
13877 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13878
13879 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13880 switching the current inferior, not before.
13881
13882 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13883
13884 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13885 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13886 i386-linux.c and amd64-linux.c.
13887 (reg-i386.o): Removed.
13888 (reg-i386.c): Likewise.
13889 (reg-i386-linux.o): Likewise.
13890 (reg-i386-linux.c): Likewise.
13891 (reg-x86-64.o): Likewise.
13892 (reg-x86-64.c): Likewise.
13893 (reg-x86-64-linux.o): Likewise.
13894 (reg-x86-64-linux.c): Likewise.
13895 (i386.o): New.
13896 (i386.c): Likewise.
13897 (i386-linux.o): Likewise.
13898 (i386-linux.c): Likewise.
13899 (amd64.o): Likewise.
13900 (amd64.c): Likewise.
13901 (amd64-linux.o): Likewise.
13902 (amd64-linux.c): Likewise.
13903
13904 * configure.srv (srv_i386_regobj): New.
13905 (srv_i386_linux_regobj): Likewise.
13906 (srv_amd64_regobj): Likewise.
13907 (srv_amd64_linux_regobj): Likewise.
13908 (srv_i386_32bit_xmlfiles): Likewise.
13909 (srv_i386_64bit_xmlfiles): Likewise.
13910 (srv_i386_xmlfiles): Likewise.
13911 (srv_amd64_xmlfiles): Likewise.
13912 (srv_i386_linux_xmlfiles): Likewise.
13913 (srv_amd64_linux_xmlfiles): Likewise.
13914 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13915 srv_xmlfiles to $srv_i386_xmlfiles.
13916 (i[34567]86-*-mingw32ce*): Likewise.
13917 (i[34567]86-*-mingw*): Likewise.
13918 (i[34567]86-*-nto*): Likewise.
13919 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13920 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13921 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13922 (x86_64-*-linux*): Likewise.
13923
13924 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13925 (init_registers_amd64_linux): New.
13926 (x86_arch_setup): Replace init_registers_x86_64_linux with
13927 init_registers_amd64_linux.
13928
13929 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13930
13931 * configure.ac: Check for libdl. If it is not available link against
13932 static libthread_db.
13933 * configure: Regenerate.
13934
13935 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13936
13937 PR9605
13938
13939 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13940 handing a read watchpoint.
13941 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13942
13943 2010-02-12 Doug Evans <dje@google.com>
13944
13945 * linux-low.c (linux_supports_tracefork_flag): Document.
13946 (linux_look_up_symbols): Add comment.
13947
13948 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13949
13950 * regcache.c (supply_register): Clear regcache if buf is NULL.
13951
13952 2010-02-02 Nicolas Roche <roche@sourceware.org>
13953 Joel Brobecker <brobecker@adacore.com>
13954
13955 * inferiors.c (find_inferior): Add function documentation.
13956 (unloaded_dll): Handle the case where the unloaded dll has not
13957 been previously registered in the dll list.
13958
13959 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13962 (thumb2_breakpoint): New.
13963 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13964
13965 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13968 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13969 breakpoints.
13970
13971 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13972
13973 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13974
13975 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13976
13977 * linux-s390-low.c (s390_collect_ptrace_register)
13978 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13979
13980 2010-01-21 Doug Evans <dje@google.com>
13981
13982 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13983 (PTRACE_ARG4_TYPE): New macro.
13984 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13985 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13986 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13987 (usr_store_inferior_registers): Ditto.
13988 (linux_read_memory, linux_write_memory): Ditto.
13989 (linux_test_for_tracefork): Ditto.
13990
13991 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13992 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13993
13994 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13995
13996 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13997 target.
13998
13999 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14000
14001 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14002 prototype to take a regcache. Adjust.
14003
14004 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14005
14006 * regcache.h (struct thread_info): Forward declare.
14007 (struct regcache): New.
14008 (new_register_cache): Adjust prototype.
14009 (get_thread_regcache): Declare.
14010 (free_register_cache): Adjust prototype.
14011 (registers_to_string, registers_from_string): Ditto.
14012 (supply_register, supply_register_by_name, collect_register)
14013 (collect_register_as_string, collect_register_by_name): Ditto.
14014 * regcache.c (struct inferior_regcache_data): Delete.
14015 (get_regcache): Rename to ...
14016 (get_thread_regcache): ... this. Adjust. Switch inferior before
14017 fetching registers.
14018 (regcache_invalidate_one): Adjust.
14019 (regcache_invalidate): Fix prototype.
14020 (new_register_cache): Return the new register cache.
14021 (free_register_cache): Change prototype.
14022 (realloc_register_cache): Adjust.
14023 (registers_to_string): Change prototype to take a regcache. Adjust.
14024 (registers_from_string): Ditto.
14025 (register_data): Ditto.
14026 (supply_register): Ditto.
14027 (supply_register_by_name): Ditto.
14028 (collect_register): Ditto.
14029 (collect_register_as_string): Ditto.
14030 (collect_register_by_name): Ditto.
14031 * server.c (process_serial_event): Adjust.
14032 * linux-low.h (regset_fill_func, regset_store_func): Change
14033 prototype.
14034 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14035 Change prototype.
14036 * linux-low.c (get_stop_pc): Adjust.
14037 (check_removed_breakpoint): Adjust.
14038 (linux_wait_for_event): Adjust.
14039 (linux_resume_one_lwp): Adjust.
14040 (fetch_register): Add regcache parameter. Adjust.
14041 (usr_store_inferior_registers): Ditto.
14042 (regsets_fetch_inferior_registers): Ditto.
14043 (regsets_store_inferior_registers): Ditto.
14044 (linux_fetch_registers, linux_store_registers): Ditto.
14045 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14046 regcache. Adjust.
14047 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14048 Ditto.
14049 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14050 prototype to take a regcache.
14051 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14052 * remote-utils.c (convert_ascii_to_int, outreg)
14053 (prepare_resume_reply): Change prototype to take a regcache.
14054 Adjust.
14055 * target.h (struct target_ops) <fetch_registers, store_registers>:
14056 Change prototype to take a regcache.
14057 (fetch_inferior_registers, store_inferior_registers): Change
14058 prototype to take a regcache. Adjust.
14059 * proc-service.c (ps_lgetregs): Adjust.
14060 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14061 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14062 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14063 take a regcache. Adjust.
14064 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14065 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14066 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14067 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14068 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14069 (cris_cannot_fetch_register):
14070 (cris_breakpoint_at): Change prototype to take a regcache.
14071 Adjust.
14072 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14073 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14074 to take a regcache. Adjust.
14075 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14076 Adjust.
14077 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14078 take a regcache. Adjust.
14079 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14080 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14081 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14082 * linux-mips-low.c (mips_get_pc):
14083 (mips_set_pc): Change prototype to take a regcache. Adjust.
14084 (mips_reinsert_addr): Adjust.
14085 (mips_collect_register): Change prototype to take a regcache.
14086 Adjust.
14087 (mips_supply_register):
14088 (mips_collect_register_32bit, mips_supply_register_32bit)
14089 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14090 (mips_store_fpregset): Ditto.
14091 * linux-ppc-low.c (ppc_supply_ptrace_register)
14092 (ppc_supply_ptrace_register): Ditto.
14093 (parse_spufs_run): Adjust.
14094 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14095 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14096 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14097 take a regcache. Adjust.
14098 * linux-s390-low.c (s390_collect_ptrace_register)
14099 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14100 (s390_set_pc): Change prototype to take a regcache. Adjust.
14101 (s390_arch_setup): Adjust.
14102 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14103 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14104 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14105 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14106 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14107 regcache. Adjust.
14108 (sparc_breakpoint_at): Adjust.
14109 * linux-xtensa-low.c (xtensa_fill_gregset):
14110 (xtensa_store_gregset):
14111 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14112 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14113 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14114 prototype to take a regcache. Adjust.
14115 * win32-arm-low.c (arm_fetch_inferior_register)
14116 (arm_store_inferior_register): Change prototype to take a
14117 regcache. Adjust.
14118 * win32-i386-low.c (i386_fetch_inferior_register)
14119 (i386_store_inferior_register): Change prototype to take a
14120 regcache. Adjust.
14121 * win32-low.c (child_fetch_inferior_registers)
14122 (child_store_inferior_registers): Change prototype to take a
14123 regcache. Adjust.
14124 (win32_wait): Adjust.
14125 (win32_fetch_inferior_registers): Change prototype to take a
14126 regcache. Adjust.
14127 (win32_store_inferior_registers): Adjust.
14128 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14129 store_inferior_register>: Change prototype to take a regcache.
14130
14131 2010-01-20 Doug Evans <dje@google.com>
14132
14133 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14134 #ifdef.
14135 (linux_wait_for_event1, linux_init_signals): Ditto.
14136 (W_STOPCODE): Provide definition if missing.
14137
14138 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14139
14140 * linux-low.c (linux_core_of_thread): New.
14141 (compare_ints, show_process, list_threads): New.
14142 (linux_qxfer_osdata): Report threads and cores.
14143 (linux_target_op): Register linux_core_of_thread.
14144 * remote-utils.c (prepare_resume_reply): Report the core.
14145 (buffer_xml_printf): Support %d specifier.
14146 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14147 New.
14148 (handle_query): Handle qXfer:threads. Announce availability
14149 thereof.
14150 * target.h (struct target_ops): New field core_of_thread.
14151
14152 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14153
14154 * Makefile.in (clean): Remove new generated files.
14155 (reg-s390.o, reg-s390.c): Remove rules.
14156 (reg-s390x.o, reg-s390x.c): Likewise.
14157 (s390-linux32.o, s390-linux32.c): Add rules.
14158 (s390-linux64.o, s390-linux64.c): Likewise.
14159 (s390x-linux64.o, s390x-linux64.c): Likewise.
14160 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14161 * linux-s390-low.c: Include <elf.h>.
14162 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14163 (init_registers_s390): Remove prototype.
14164 (init_registers_s390x): Likewise.
14165 (init_registers_s390_linux32): Add prototype.
14166 (init_registers_s390_linux64): Likewise.
14167 (init_registers_s390x_linux64): Likewise.
14168 (s390_num_regs_3264): New define.
14169 (s390_regmap_3264): New global variable.
14170 (s390_cannot_fetch_register): Remove obsolete check.
14171 (s390_cannot_store_register): Likewise.
14172 (s390_collect_ptrace_register): Handle upper/lower register halves.
14173 (s390_supply_ptrace_register): Likewise.
14174 (s390_fill_gregset): Update to register number changes.
14175 (s390_get_hwcap): New routine.
14176 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14177 Install appropriate regmap and register set.
14178
14179 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14180
14181 * server.c (gdbserver_version): Update copyright year to 2010.
14182 * gdbreplay.c (gdbreplay_version): Likewise.
14183
14184 2009-12-28 Doug Evans <dje@google.com>
14185
14186 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14187 elf/external.h. Include <elf.h> instead but only if necessary.
14188
14189 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14190
14191 * linux-low.c (linux_remove_process): Remove `detaching'
14192 parameter. Don't release/detach from thread_db here.
14193 (linux_kill): Release/detach from thread_db here, ...
14194 (linux_detach): ... and here, before actually detaching.
14195 (linux_wait_1): ... and here, when a process exits.
14196 * thread-db.c (any_thread_of): New.
14197 (thread_db_free): Switch the current inferior to a thread of the
14198 passed in process.
14199
14200 2009-12-21 Doug Evans <dje@google.com>
14201
14202 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14203
14204 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14205 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14206 warning ifndef __NR_tkill. Move setting of errno there too.
14207 Delete unnecessary resetting of errno after syscall.
14208 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14209
14210 * configure.ac: Check for dladdr.
14211 * config.in: Regenerate.
14212 * configure: Regenerate.
14213 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14214 (try_thread_db_load): Update.
14215
14216 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14217
14218 2009-12-18 Doug Evans <dje@google.com>
14219
14220 * event-loop.c: Include unistd.h if it exists.
14221
14222 * linux-low.c (my_waitpid): Move definition away from being in
14223 between linux_tracefork_child/linux_test_for_tracefork.
14224
14225 * gdb_proc_service.h (psaddr_t): Fix type.
14226 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14227 signature to match glibc.
14228
14229 2009-12-16 Doug Evans <dje@google.com>
14230
14231 * linux-low.c (linux_read_memory): Fix argument to read.
14232
14233 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14234
14235 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14236 events, don't leave current_inferior pointing at null.
14237
14238 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14239
14240 * win32-low.c (LOG): Delete.
14241 (OUTMSG): Output to stderr.
14242 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14243 on compile time LOG macro.
14244 (win32_wait): Fix debug output.
14245
14246 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14247
14248 * win32-low.c (win32_add_one_solib): If the dll name is
14249 "ntdll.dll", prepend the system directory to the dll path.
14250
14251 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14254
14255 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14256 Vladimir Prus <vladimir@codesourcery.com>
14257
14258 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14259 * configure.ac: Check for __mcoldfire__ and set
14260 gdb_cv_m68k_is_coldfire.
14261 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14262 reg-cf.o and reg-m68k.o.
14263 * configure: Regenerated.
14264
14265 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14266
14267 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14268 Pass it to thread_db_free.
14269 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14270 proper `detaching' argument to linux_remove_process.
14271 * linux-low.h (thread_db_free): Add `detaching' parameter.
14272 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14273 to thread_db_free.
14274 (thread_db_free): Add `detaching' parameter. Only
14275 call td_ta_clear_event if detaching from process.
14276
14277 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14278
14279 * thread-db.c (thread_db_free): Fix typo.
14280
14281 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14282
14283 PR gdb/10838
14284 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14285
14286 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14287
14288 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14289 with an i686 compiler.
14290 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14291 needed.
14292 * configure: Rebuilt.
14293
14294 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14295
14296 PR gdb/10783
14297
14298 * server.c (handle_search_memory_1): Correct read_addr initialization
14299 in loop for searching subsequent chunks.
14300
14301 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14302
14303 * configure.ac: New --with-libthread-db option.
14304 * thread-db.c: Allow direct dependence on libthread_db.
14305 (thread_db_free): Adjust.
14306 * config.in: Regenerate.
14307 * configure: Likewise.
14308
14309 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14310
14311 PR gdb/10757
14312 * thread-db.c (attach_thread): New function.
14313 (maybe_attach_thread): Return success/failure.
14314 (find_new_threads_callback): Adjust.
14315 (thread_db_find_new_threads): Loop until no new threads.
14316
14317 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14318
14319 * proc-service.c (ps_lgetregs): Formatting.
14320
14321 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14322
14323 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14324 * configure.ac: Adjust.
14325 * linux-low.h (struct process_info_private): Move members to struct
14326 thread_db.
14327 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14328 * linux-low.c (linux_remove_process): Adjust.
14329 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14330 * server.c (handle_query): Move code ...
14331 (handle_monitor_command): ... here. New function.
14332 * target.h (struct target_ops): New member.
14333 * thread-db.c (struct thread_db): New.
14334 (libthread_db_search_path): New variable.
14335 (thread_db_create_event, thread_db_enable_reporting)
14336 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14337 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14338 (try_thread_db_load_1, dladdr_to_soname): New functions.
14339 (try_thread_db_load, thread_db_load_search): New functions.
14340 (thread_db_init): Search for libthread_db.
14341 (thread_db_free): New function.
14342 (thread_db_handle_monitor_command): Likewise.
14343 * config.in: Regenerate.
14344 * configure: Regenerate.
14345
14346 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14347
14348 * spu-low.c (spu_kill): Wait for inferior to terminate.
14349 Call clear_inferiors.
14350 (spu_detach): Call clear_inferiors.
14351
14352 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14353
14354 * aclocal.m4: Regenerate.
14355 * config.in: Likewise.
14356 * configure: Likewise.
14357
14358 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14359
14360 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14361 (parse_spufs_run): New function.
14362 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14363 (ppc_breakpoint_at): Handle SPU breakpoints.
14364
14365 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14366
14367 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14368 (SPUFS_MAGIC): Define.
14369 (spu_enumerate_spu_ids): New function.
14370 (linux_qxfer_spu): New function.
14371 (linux_target_ops): Install linux_qxfer_spu.
14372
14373 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14374
14375 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14376 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14377 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14378 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14379 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14380 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14381 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14382 (init_registers_powerpc_cell32l): Add prototype.
14383 (init_registers_powerpc_cell64l): Likewise.
14384 (ppc_arch_setup): Detect Cell/B.E. architecture.
14385
14386 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14387
14388 * Makefile.in (datarootdir): New variable.
14389
14390 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14391
14392 * linux-low.c (linux_write_memory): Update debugging output.
14393 * Makefile.in (clean): Add new descriptions.
14394 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14395 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14396 * configure.srv: Add new files for arm*-*-linux*.
14397 * linux-arm-low.c: Add new declarations.
14398 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14399 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14400 (HWCAP_VFPv3D16): New.
14401 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14402 instead of __IWMMXT__.
14403 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14404 (arm_arch_setup): New.
14405 (target_regsets): Remove #ifdef. Add VFP regset.
14406 (the_low_target): Use arm_arch_setup.
14407
14408 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14411 the main thread again.
14412
14413 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14414
14415 Adding Neutrino gdbserver.
14416 * configure: Regenerated.
14417 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14418 * configure.srv (i[34567]86-*-nto*): New target.
14419 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14420 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14421 (nto_comctrl) [__QNX__]: New function.
14422 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14423
14424 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14425
14426 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14427 srv_tgtobj.
14428
14429 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14430 Pedro Alves <pedro@codesourcery.com>
14431
14432 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14433 don't support CONTEXT_EXTENDED_REGISTERS.
14434 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14435 (the_low_target): Install them.
14436 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14437 failing with ERROR_PIPE_NOT_CONNECTED.
14438
14439 2009-06-30 Doug Evans <dje@google.com>
14440 Pierre Muller <muller@ics.u-strasbg.fr>
14441
14442 Add h/w watchpoint support to x86-linux, win32-i386.
14443 * Makefile.in (SFILES): Add i386-low.c
14444 (i386_low_h): Define.
14445 (i386-low.o): Add dependencies.
14446 (linux-x86-low.o): Add i386-low.h dependency.
14447 (win32-i386-low.o): Ditto.
14448 * i386-low.c: New file.
14449 * i386-low.h: New file.
14450 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14451 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14452 * linux-low.c (linux_add_process): Initialize arch_private.
14453 (linux_remove_process): Free arch_private.
14454 (add_lwp): Initialize arch_private.
14455 (delete_lwp): Free arch_private.
14456 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14457 provided.
14458 * linux-low.h (process_info_private): New member arch_private.
14459 (lwp_info): New member arch_private.
14460 (linux_target_ops): New members new_process, new_thread,
14461 prepare_to_resume.
14462 (ptid_of): New macro.
14463 * linux-x86-low.c: Include stddef.h, i386-low.h.
14464 (arch_process_info): New struct.
14465 (arch_lwp_info): New struct.
14466 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14467 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14468 (i386_dr_low_get_status): New function.
14469 (x86_insert_point, x86_remove_point): New functions.
14470 (x86_stopped_by_watchpoint): New function.
14471 (x86_stopped_data_address): New function.
14472 (x86_linux_new_process, x86_linux_new_thread): New functions.
14473 (x86_linux_prepare_to_resume): New function.
14474 (the_low_target): Add entries for insert_point, remove_point,
14475 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14476 prepare_to_resume.
14477 * server.c (debug_hw_points): New global.
14478 (monitor_show_help): Document set debug-hw-points.
14479 (handle_query): Process "set debug-hw-points".
14480 * server.h (debug_hw_points): Declare.
14481 (paddress): Declare.
14482 * utils.c (NUMCELLS, CELLSIZE): New macros.
14483 (get_sell, xsnprintf, paddress): New functions.
14484 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14485 remove_point, stopped_by_watchpoint, stopped_data_address.
14486 * win32-i386-low.c: Include i386-low.h.
14487 (debug_reg_state): Replaces dr.
14488 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14489 (i386_dr_low_get_status): New function.
14490 (i386_insert_point, i386_remove_point): New functions.
14491 (i386_stopped_by_watchpoint): New function.
14492 (i386_stopped_data_address): New function.
14493 (i386_initial_stuff): Update.
14494 (get_thread_context,set_thread_context,i386_thread_added): Update.
14495 (the_low_target): Add entries for insert_point,
14496 remove_point, stopped_by_watchpoint, stopped_data_address.
14497 * win32-low.c (win32_insert_watchpoint): New function.
14498 (win32_remove_watchpoint): New function.
14499 (win32_stopped_by_watchpoint): New function.
14500 (win32_stopped_data_address): New function.
14501 (win32_target_ops): Add entries for insert_watchpoint,
14502 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14503 * win32-low.h (win32_target_ops): New members insert_point,
14504 remove_point, stopped_by_watchpoint, stopped_data_address.
14505
14506 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14507
14508 * server.c (process_serial_event): Re-return unsupported, not
14509 error, if the type isn't recognized. Re-allow supporting only
14510 insert or remove packets. Also call require_running for
14511 breakpoints. Add missing break statement to default case. Tidy.
14512 * target.h (struct target_ops): Rename insert_watchpoint to
14513 insert_point, and remove_watchpoint to remove_point.
14514
14515 * linux-low.h (struct linux_target_ops): Likewise.
14516 * linux-low.c (linux_insert_watchpoint): Rename to ...
14517 (linux_insert_point): ... this. Adjust.
14518 (linux_remove_watchpoint): Rename to ...
14519 (linux_remove_point): ... this. Adjust.
14520 (linux_target_ops): Adjust.
14521 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14522 (cris_insert_point): ... this.
14523 (cris_remove_watchpoint): Rename to ...
14524 (cris_remove_point): ... this.
14525 (the_low_target): Adjust.
14526
14527 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14528
14529 * server.c (handle_v_kill): Pass signal_pid to
14530 kill_inferior if multi_process is zero.
14531
14532 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14533
14534 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14535 * target.h (target_ops): Comment for *_watchpoint to make it clear
14536 the functions can get types '0' and '1'.
14537
14538 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14539
14540 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14541 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14542 * regcache.c (get_regcache): Likewise.
14543 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14544 * win32-low.c (child_fetch_inferior_registers): Remove check for
14545 regno 0.
14546
14547 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14548 Pedro Alves <pedro@codesourcery.com>
14549
14550 * target.h (struct target_ops) <supports_multi_process>: New
14551 callback.
14552 (target_supports_multi_process): New.
14553 * server.c (handle_query): Even if GDB reports support, only
14554 enable multi-process if the target also supports it. Report
14555 multi-process support only if the target backend supports it.
14556 * linux-low.c (linux_supports_multi_process): New function.
14557 (linux_target_ops): Install it as target_supports_multi_process
14558 callback.
14559
14560 2009-05-24 Doug Evans <dje@google.com>
14561
14562 Global renaming of find_thread_pid to find_thread_ptid.
14563 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14564 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14565 All callers updated.
14566
14567 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14568 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14569 directly.
14570
14571 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14572 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14573 (linux_resume_one_lwp): Ditto.
14574
14575 2009-05-23 Doug Evans <dje@google.com>
14576
14577 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14578 from struct inferior_list_entry * to struct lwp_info *.
14579 All callers updated.
14580
14581 2009-05-13 Doug Evans <dje@google.com>
14582
14583 * linux-x86-low.c: Don't include assert.h.
14584 (x86_siginfo_fixup): Use fatal, not assert.
14585 (x86_arch_setup): Fix comment.
14586
14587 2009-05-12 Doug Evans <dje@google.com>
14588
14589 Biarch support for i386/amd64 gdbserver.
14590 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14591 Add linux-x86-low.c.
14592 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14593 (linux-x86-low.o): Add.
14594 * linux-x86-64-low.c: Delete.
14595 * linux-i386-low.c: Delete.
14596 * linux-x86-low.c: New file.
14597 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14598 linux-x86-low.o.
14599 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14600 linux-x86-low.o.
14601 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14602 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14603 (linux_child_pid_to_exec_file): New function.
14604 (elf_64_header_p, elf_64_file_p): New functions.
14605 (siginfo_fixup): New function.
14606 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14607 give target a chance to convert layout.
14608 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14609 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14610
14611 2009-05-07 Doug Evans <dje@google.com>
14612
14613 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14614 (regsets_store_inferior_registers): Ditto.
14615
14616 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14617
14618 PR server/10048
14619
14620 * linux-low.c (must_set_ptrace_flags): Delete.
14621 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14622 of the global.
14623 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14624 `lwp->must_set_ptrace_flags' instead.
14625 (linux_wait_for_event_1): Set ptrace options here.
14626 (linux_wait_1): ... not here.
14627
14628 2009-04-30 Doug Evans <dje@google.com>
14629
14630 * inferiors.c (started_inferior_callback): New function.
14631 (attached_inferior_callback): New function.
14632 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14633 * server.c (print_started_pid, print_attached_pid): New functions.
14634 (detach_or_kill_for_exit): New function.
14635 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14636 * server.h (have_started_inferiors_p): Declare.
14637 (have_attached_inferiors_p): Declare.
14638
14639 * inferiors.c (remove_process): Fix memory leak, free process.
14640 * linux-low.c (linux_remove_process): New function.
14641 (linux_kill): Call it instead of remove_process.
14642 (linux_detach, linux_wait_1): Ditto.
14643
14644 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14645
14646 * configure.srv: Add x86 Windows CE target.
14647
14648 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14649
14650 * inferiors.c (get_thread_process): Make global.
14651 * server.h (get_thread_process): Add prototype.
14652 * thread-db.c (find_one_thread): Use get_thread_process
14653 instead of current_process.
14654 (thread_db_get_tls_address): Do not crash if called when
14655 thread layer is not yet initialized.
14656
14657 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14658
14659 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14660 * spu-low.c (current_tid): Rename to ...
14661 (current_ptid): ... this.
14662 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14663 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14664 ptid_get_lwp (current_ptid) instead of current_tid.
14665 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14666 instead of current_tid. Use find_process_pid to verify pid
14667 argument is valid. Pass proper argument to remove_process.
14668 (spu_thread_alive): Compare current_ptid instead of current_tid.
14669 (spu_resume): Likewise.
14670
14671 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14672
14673 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14674 variable.
14675
14676 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14677
14678 Implement the multiprocess extensions, and add linux multiprocess
14679 support.
14680
14681 * server.h (ULONGEST): Declare.
14682 (struct ptid, ptid_t): New.
14683 (minus_one_ptid, null_ptid): Declare.
14684 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14685 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14686 (struct inferior_list_entry): Change `id' type from unsigned from
14687 to ptid_t.
14688 (struct sym_cache, struct breakpoint, struct
14689 process_info_private): Forward declare.
14690 (struct process_info): Declare.
14691 (current_process): Declare.
14692 (all_processes): Declare.
14693 (initialize_inferiors): Declare.
14694 (add_thread): Adjust to use ptid_t.
14695 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14696 (add_process, remove_process, find_thread_pid): Declare.
14697 (find_inferior_id): Adjust to use ptid_t.
14698 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14699 (multi_process): Declare.
14700 (push_event): Adjust to use ptid_t.
14701 (read_ptid, write_ptid): Declare.
14702 (prepare_resume_reply): Adjust to use ptid_t.
14703 (clear_symbol_cache): Declare.
14704 * inferiors.c (all_processes): New.
14705 (null_ptid, minus_one_ptid): New.
14706 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14707 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14708 (add_thread): Change unsigned long to ptid. Remove gdb_id
14709 parameter. Adjust.
14710 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14711 (gdb_id_to_thread): Rename to ...
14712 (find_thread_pid): ... this. Change unsigned long to ptid.
14713 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14714 (loaded_dll, pull_pid_from_list): Adjust.
14715 (add_process, remove_process, find_process_pid)
14716 (get_thread_process, current_process, initialize_inferiors): New.
14717 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14718 (struct target_waitstatus) <related_pid>: Ditto.
14719 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14720 return type to int.
14721 (struct target_ops) <join>: Add `pid' argument.
14722 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14723 (struct target_ops) <wait>: Add `ptid' field. Change return type
14724 to ptid.
14725 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14726 (mywait): Add `ptid' argument. Change return type to ptid_t.
14727 (target_pid_to_str): Declare.
14728 * target.c (set_desired_inferior): Adjust to use ptids.
14729 (mywait): Add new `ptid' argument. Adjust.
14730 (target_pid_to_str): New.
14731 * mem-break.h (free_all_breakpoints): Declare.
14732 * mem-break.c (breakpoints): Delelete.
14733 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14734 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14735 to use per-process breakpoint list.
14736 (free_all_breakpoints): New.
14737 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14738 (symbol_cache, all_symbols_looked_up): Delete.
14739 (hexchars): New.
14740 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14741 read_ptid): New.
14742 (prepare_resume_reply): Change ptid argument's type from unsigned
14743 long to ptid_t. Adjust. Implement W;process and X;process.
14744 (free_sym_cache, clear_symbol_cache): New.
14745 (look_up_one_symbol): Adjust to per-process symbol cache. *
14746 * server.c (cont_thread, general_thread, step_thread): Change type
14747 to ptid_t.
14748 (attached): Delete.
14749 (multi_process): New.
14750 (last_ptid): Change type to ptid_t.
14751 (struct vstop_notif) <ptid>: Change type to ptid_t.
14752 (queue_stop_reply, push_event): Change `ptid' argument's type to
14753 ptid_t.
14754 (discard_queued_stop_replies): Add `pid' argument.
14755 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14756 changes. Don't reference the `attached' global.
14757 (attach_inferior): Adjust to mywait interface changes.
14758 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14759 features. Handle and report "multiprocess+". Handle
14760 "qAttached:PID".
14761 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14762 changes.
14763 (handle_v_kill): New.
14764 (handle_v_stopped): Adjust to use target_pid_to_str.
14765 (handle_v_requests): Allow multiple attaches and runs when
14766 multiprocess extensions are in effect. Handle "vKill".
14767 (myresume): Adjust to use ptids.
14768 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14769 (handle_status): Adjust to discard_queued_stop_replies interface
14770 change.
14771 (first_thread_of, kill_inferior_callback)
14772 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14773 (main): Call initialize_inferiors. Adjust to use ptids, killing
14774 and detaching from all inferiors. Handle multiprocess packet
14775 variants.
14776 * linux-low.h: Include gdb_proc_service.h.
14777 (struct process_info_private): New.
14778 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14779 <lwpid_of>: Use ptid_get_lwp.
14780 (get_lwp_thread): Adjust.
14781 (struct lwp_info): Add `dead' member.
14782 (find_lwp_pid): Declare.
14783 * linux-low.c (thread_db_active): Delete.
14784 (new_inferior): Adjust comment.
14785 (inferior_pid): Delete.
14786 (linux_add_process): New.
14787 (handle_extended_wait): Adjust.
14788 (add_lwp): Change unsigned long to ptid.
14789 (linux_create_inferior): Add process to processes table. Adjust
14790 to use ptids. Don't set new_inferior here.
14791 (linux_attach_lwp): Rename to ...
14792 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14793 it. Adjust to use ptids.
14794 (linux_attach_lwp): New.
14795 (linux_attach): Add process to processes table. Don't set
14796 new_inferior here.
14797 (struct counter): New.
14798 (second_thread_of_pid_p, last_thread_of_process_p): New.
14799 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14800 multiple processes.
14801 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14802 processes. Remove process from process table.
14803 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14804 to multiple processes.
14805 (any_thread_of): New.
14806 (linux_detach): Add `pid' argument, and handle it. Remove process
14807 from processes table.
14808 (linux_join): Add `pid' argument. Handle it.
14809 (linux_thread_alive): Change unsighed long argument to ptid_t.
14810 Consider dead lwps as not being alive.
14811 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14812 threads we're not interested in.
14813 (same_lwp, find_lwp_pid): New.
14814 (linux_wait_for_lwp): Change `pid' argument's type from int to
14815 ptid_t. Adjust.
14816 (linux_wait_for_event): Rename to ...
14817 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14818 from int to ptid_t. Adjust.
14819 (linux_wait_for_event): New.
14820 (linux_wait_1): Add `ptid' argument. Change return type to
14821 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14822 that exit from the process table.
14823 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14824 Adjust.
14825 (mark_lwp_dead): New.
14826 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14827 stopping all threads, mark its main lwp as dead.
14828 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14829 ptids.
14830 (fetch_register, usr_store_inferior_registers)
14831 (regsets_fetch_inferior_registers)
14832 (regsets_store_inferior_registers, linux_read_memory)
14833 (linux_write_memory): Inline `inferior_pid'.
14834 (linux_look_up_symbols): Adjust to use per-process
14835 `thread_db_active'.
14836 (linux_request_interrupt): Adjust to use ptids.
14837 (linux_read_auxv): Inline `inferior_pid'.
14838 (initialize_low): Don't reference thread_db_active.
14839 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14840 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14841 (ps_getpid): Return the pid of the current inferior.
14842 * thread-db.c (proc_handle, thread_agent): Delete.
14843 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14844 per-process data.
14845 (find_one_thread): Change argument type to ptid_t. Adjust to
14846 per-process data.
14847 (maybe_attach_thread): Adjust to per-process data and ptids.
14848 (thread_db_find_new_threads): Ditto.
14849 (thread_db_init): Ditto.
14850 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14851 processes table. Adjust to use ptids.
14852 (spu_kill, spu_detach): Adjust interface. Remove process from
14853 processes table.
14854 (spu_join, spu_thread_alive): Adjust interface.
14855 (spu_wait): Adjust interface. Remove process from processes
14856 table. Adjust to use ptids.
14857 * win32-low.c (current_inferior_tid): Delete.
14858 (current_inferior_ptid): New.
14859 (debug_event_ptid): New.
14860 (thread_rec): Take a ptid. Adjust.
14861 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14862 (child_delete_thread): Ditto.
14863 (do_initial_child_stuff): Add `attached' argument. Add process to
14864 processes table.
14865 (child_fetch_inferior_registers, child_store_inferior_registers):
14866 Adjust.
14867 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14868 (win32_attach): Pass 1 to do_initial_child_stuff.
14869 (win32_kill): Adjust interface. Remove process from processes
14870 table.
14871 (win32_detach): Ditto.
14872 (win32_join): Adjust interface.
14873 (win32_thread_alive): Take a ptid.
14874 (win32_resume): Adjust to use ptids.
14875 (get_child_debug_event): Ditto.
14876 (win32_wait): Adjust interface. Remove exiting process from
14877 processes table.
14878
14879 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14880
14881 Non-stop mode support.
14882
14883 * server.h (non_stop): Declare.
14884 (gdb_client_data, handler_func): Declare.
14885 (delete_file_handler, add_file_handler, start_event_loop):
14886 Declare.
14887 (handle_serial_event, handle_target_event, push_event)
14888 (putpkt_notif): Declare.
14889 * target.h (enum resume_kind): New.
14890 (struct thread_resume): Replace `step' field by `kind' field.
14891 (TARGET_WNOHANG): Define.
14892 (struct target_ops) <wait>: Add `options' argument.
14893 <supports_non_stop, async, start_non_stop>: New fields.
14894 (target_supports_non_stop, target_async): New.
14895 (start_non_stop): Declare.
14896 (mywait): Add `options' argument.
14897 * target.c (mywait): Add `options' argument. Print child exit
14898 notifications here.
14899 (start_non_stop): New.
14900 * server.c (non_stop, own_buf, mem_buf): New globals.
14901 (struct vstop_notif): New.
14902 (notif_queue): New global.
14903 (queue_stop_reply, push_event, discard_queued_stop_replies)
14904 (send_next_stop_reply): New.
14905 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14906 interface changes.
14907 (attach_inferior): In non-stop mode, don't wait for the target
14908 here.
14909 (handle_general_set): Handle QNonStop.
14910 (handle_query): When handling qC, return the current general
14911 thread, instead of the first thread of the list.
14912 (handle_query): If the backend supports non-stop mode, include
14913 QNonStop+ in the qSupported query response.
14914 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14915 and non-stop mode.
14916 (handle_v_attach, handle_v_run): Handle non-stop mode.
14917 (handle_v_stopped): New.
14918 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14919 (myresume): Adjust to use resume_kind. Handle non-stop.
14920 (queue_stop_reply_callback): New.
14921 (handle_status): Handle non-stop mode.
14922 (main): Clear non_stop flag on reconnection. Use the event-loop.
14923 Refactor serial protocol handling from here ...
14924 (process_serial_event): ... to this new function. When GDB
14925 selects any thread, select one here. In non-stop mode, wait until
14926 GDB acks all pending events before exiting.
14927 (handle_serial_event, handle_target_event): New.
14928 * remote-utils.c (remote_open): Install remote_desc in the event
14929 loop.
14930 (remote_close): Remove remote_desc from the event loop.
14931 (putpkt_binary): Rename to...
14932 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14933 (putpkt_binary): New as wrapper around putpkt_binary_1.
14934 (putpkt_notif): New.
14935 (prepare_resume_reply): In non-stop mode, don't change the
14936 general_thread.
14937 * event-loop.c: New.
14938 * Makefile.in (OBJ): Add event-loop.o.
14939 (event-loop.o): New rule.
14940
14941 * linux-low.h (pid_of): Moved here.
14942 (lwpid_of): New.
14943 (get_lwp_thread): Use lwpid_of.
14944 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14945 * linux-low.c (pid_of): Delete.
14946 (inferior_pid): Use lwpid_of.
14947 (linux_event_pipe): New.
14948 (target_is_async_p): New.
14949 (delete_lwp): New.
14950 (handle_extended_wait): Use lwpid_of.
14951 (add_lwp): Don't set lwpid field.
14952 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14953 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14954 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14955 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14956 first. Adjust to linux_wait_for_event interface changes. Use
14957 lwpid_of.
14958 (linux_detach): Don't delete the main lwp here.
14959 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14960 (status_pending_p): Don't consider explicitly suspended lwps.
14961 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14962 pointer. Add OPTIONS argument. Change return type to int. Use
14963 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14964 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14965 pointer. Add status pointer argument. Return a pid instead of a
14966 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14967 changes. In non-stop mode, don't switch to a random thread.
14968 (linux_wait): Rename to...
14969 (linux_wait_1): ... this. Add target_options argument, and handle
14970 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14971 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14972 clean exit and signal exit code. Don't stop all threads in
14973 non-stop mode. In all-stop mode, only stop all threads when
14974 reporting a stop to GDB. Handle explicit thread stop requests.
14975 (async_file_flush, async_file_mark): New.
14976 (linux_wait): New.
14977 (send_sigstop): Use lwpid_of.
14978 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14979 interface changes. In non-stop mode, don't switch to a random
14980 thread.
14981 (linux_resume_one_lwp): Use lwpid_of.
14982 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14983 (linux_resume_one_thread): ... this. Handle resume_stop. In
14984 non-stop mode, don't look for pending flag in all threads.
14985 (resume_status_pending_p): Don't consider explicitly suspended
14986 threads.
14987 (my_waitpid): Reimplement. Emulate __WALL.
14988 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14989 Use lwpid_of.
14990 (sigchld_handler, linux_supports_non_stop, linux_async)
14991 (linux_start_non_stop): New.
14992 (linux_target_ops): Register linux_supports_non_stop, linux_async
14993 and linux_start_non_stop.
14994 (initialize_low): Install SIGCHLD handler.
14995 * thread-db.c (thread_db_create_event, find_one_thread)
14996 (thread_db_get_tls_address): Use lwpid_of.
14997 * win32-low.c (win32_detach): Adjust to use resume_kind.
14998 (win32_wait): Add `options' argument.
14999 * spu-low.c (spu_resume): Adjust to use resume_kind.
15000 (spu_wait): Add `options' argument.
15001
15002 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15003
15004 Decouple target code from remote protocol.
15005
15006 * target.h (enum target_waitkind): New.
15007 (struct target_waitstatus): New.
15008 (struct target_ops) <wait>: Return an unsigned long. Take a
15009 target_waitstatus pointer instead of a char pointer.
15010 (mywait): Likewise.
15011 * target.c (mywait): Change prototype to return an unsigned long.
15012 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15013 * server.h (thread_from_wait, old_thread_from_wait): Delete
15014 declarations.
15015 (prepare_resume_reply): Change prototype to take a
15016 target_waitstatus.
15017 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15018 (last_status, last_ptid): New.
15019 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15020 pid instead of a signal.
15021 (attach_inferior): Remove "status" and "signal" parameters.
15022 Adjust.
15023 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15024 not as an address.
15025 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15026 (handle_v_requests, myresume): Remove "status" and "signal"
15027 parameters. Adjust.
15028 (handle_status): New.
15029 (main): Delete local `status'. Adjust.
15030 * remote-utils.c: Include target.h.
15031 (prepare_resume_reply): Change prototype to take a
15032 target_waitstatus. Adjust.
15033
15034 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15035 interface.
15036 * spu-low.c (spu_wait): Adjust.
15037 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15038 Delete.
15039 (win32_wait): Adjust.
15040
15041 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15042
15043 * target.h (struct thread_resume): Delete leave_stopped member.
15044 (struct target_ops): Add a `n' argument to the `resume' callback.
15045 * server.c (start_inferior): Adjust.
15046 (handle_v_cont, myresume): Adjust.
15047 * linux-low.c (check_removed_breakpoint): Adjust to resume
15048 interface change, and to removed leave_stopped field.
15049 (resume_ptr): Delete.
15050 (struct thread_resume_array): New.
15051 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15052 resume interface change.
15053 (linux_continue_one_thread, linux_queue_one_thread)
15054 (resume_status_pending_p): Check if the resume field is NULL
15055 instead of checking the leave_stopped member.
15056 (linux_resume): Adjust to the target resume interface change.
15057 * spu-low.c (spu_resume): Adjust to the target resume interface
15058 change.
15059 * win32-low.c (win32_detach, win32_resume): Ditto.
15060
15061 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15062
15063 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15064 flag.
15065 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15066 pending.
15067 (linux_continue_one_thread): Only preserve the stepping flag if
15068 there's a pending breakpoint.
15069
15070 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15071
15072 * server.c (main): After the inferior having exited, call
15073 remote_close before exiting gdbserver.
15074
15075 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15076
15077 Fix size of FPSCR in Power 7 processors.
15078 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15079 (PPC_FEATURE_HAS_DFP): New #define.
15080 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15081 size of the FPSCR.
15082
15083 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15084
15085 * server.c (handle_query) Whitespace and formatting.
15086
15087 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15088
15089 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15090 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15091 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15092 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15093 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15094 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15095 Makefile.in, configure.ac: Fix whitespace throughout.
15096 * configure: Regenerate.
15097
15098 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15099
15100 * inferiors.c (find_inferior): Make it safe for the callback
15101 function to delete the currently iterated inferior.
15102
15103 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15104
15105 * Makefile.in (linuw_low_h): Move higher.
15106 (thread-db.o): Depend on $(linux_low_h).
15107
15108 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15109
15110 Rename "process" to "lwp" throughout.
15111
15112 * linux-low.c (all_processes): Rename to...
15113 (all_lwps): ... this.
15114 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15115 (add_process): Rename to ...
15116 (add_lwp): ... this. Adjust.
15117 (linux_create_inferior): Adjust.
15118 (linux_attach_lwp): Adjust.
15119 (linux_attach): Adjust.
15120 (linux_kill_one_process): Rename to ...
15121 (linux_kill_one_lwp): ... this. Adjust.
15122 (linux_kill): Adjust.
15123 (linux_detach_one_process): Rename to ...
15124 (linux_detach_one_lwp): ... this. Adjust.
15125 (linux_detach): Adjust.
15126 (check_removed_breakpoint): Adjust.
15127 (status_pending_p): Adjust.
15128 (linux_wait_for_process): Rename to ...
15129 (linux_wait_for_lwp): ... this. Adjust.
15130 (linux_wait_for_event): Adjust.
15131 (send_sigstop): Adjust.
15132 (wait_for_sigstop): Adjust.
15133 (stop_all_processes): Rename to ...
15134 (stop_all_lwps): ... this.
15135 (linux_resume_one_process): Rename to ...
15136 (linux_resume_one_lwp): ... this. Adjust.
15137 (linux_set_resume_request, linux_continue_one_thread)
15138 (linux_queue_one_thread, resume_status_pending_p)
15139 (usr_store_inferior_registers, regsets_store_inferior_registers)
15140 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15141 Adjust.
15142 * linux-low.h (get_process): Rename to ...
15143 (get_lwp): ... this. Adjust.
15144 (get_thread_process): Rename to ...
15145 (get_thread_lwp): ... this. Adjust.
15146 (get_process_thread): Rename to ...
15147 (get_lwp_thread): ... this. Adjust.
15148 (struct process_info): Rename to ...
15149 (struct lwp_info): ... this.
15150 (all_processes): Rename to ...
15151 (all_lwps): ... this.
15152 * proc-service.c (ps_lgetregs): Adjust.
15153 * thread-db.c (thread_db_create_event, find_one_thread)
15154 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15155
15156 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15157
15158 * server.c (handle_query): Handle "qAttached".
15159
15160 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15161
15162 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15163 GPLv3, update license URL.
15164
15165 2009-03-01 Doug Evans <dje@google.com>
15166
15167 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15168 (server_h): Add gdb_signals.h.
15169 (signals.o): Update.
15170 * server.h (target_signal_from_host,target_signal_to_host_p)
15171 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15172
15173 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15174
15175 * remote-utils.c (getpkt): Also generate remote-debug
15176 information if noack_mode is set.
15177
15178 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15179
15180 * server.c (handle_query): Report qXfer:siginfo:read and
15181 qXfer:siginfo:write as supported and handle them.
15182 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15183 * linux-low.c (linux_xfer_siginfo): New.
15184 (linux_target_ops): Set it.
15185
15186 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15187
15188 * server.c (gdbserver_usage): Mention --remote-debug.
15189 (main): Accept '--remote-debug' switch.
15190
15191 2009-01-18 Doug Evans <dje@google.com>
15192
15193 * regcache.c (new_register_cache): No need to check result of xcalloc.
15194 * server.c (handle_search_memory): Back out calls to xmalloc,
15195 result is checked and error is returned to user upon failure.
15196 (handle_query): Ditto. Add more checks for result of malloc.
15197 (handle_v_cont): Check result of malloc, report error back to
15198 user upon failure.
15199 (handle_v_run): Ditto. Call freeargv.
15200 * server.h (freeargv): Declare.
15201 * utils.c (freeargv): New fn.
15202
15203 2009-01-15 Doug Evans <dje@google.com>
15204
15205 * gdbreplay.c (perror_with_name): Make arg const char *.
15206 * server.h (target_signal_to_name): Make return type const char *.
15207 * thread-db.c (thread_db_err_str): Make return type const char *.
15208 * utils.c (perror_with_name): Make arg const char *.
15209
15210 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15211
15212 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15213 when handling a EXIT_PROCESS_DEBUG_EVENT.
15214
15215 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15216
15217 * gdbreplay.c (gdbreplay_version): Update copyright year.
15218 * server.c (gdbserver_version): Likewise.
15219
15220 2009-01-05 Doug Evans <dje@google.com>
15221
15222 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15223 (handle_extended_wait): Improve comment.
15224
15225 2008-12-13 Doug Evans <dje@google.com>
15226
15227 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15228 * server.h (ATTR_MALLOC): New macro.
15229 (xmalloc,xcalloc,xstrdup): Declare.
15230 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15231 * inferiors.c: Ditto.
15232 * linux-low.c: Ditto.
15233 * mem-break.c: Ditto.
15234 * regcache.c: Ditto.
15235 * remote-utils.c: Ditto.
15236 * server.c: Ditto.
15237 * target.c: Ditto.
15238 * win32-low.c: Ditto.
15239
15240 2008-12-12 Doug Evans <dje@google.com>
15241
15242 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15243 in debugging printf.
15244
15245 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15246
15247 2008-12-09 Doug Evans <dje@google.com>
15248
15249 * linux-low.h (struct process_info): Delete member tid, unused.
15250 * thread-db.c (find_one_thread): Update.
15251 (maybe_attach_thread): Update.
15252
15253 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15254
15255 * target.h (struct target_ops): Add qxfer_osdata member.
15256 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15257 and dirent.h.
15258 (linux_qxfer_osdata): New functions.
15259 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15260 callback.
15261 * server.c (handle_query): Handle "qXfer:osdata:read:".
15262 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15263 (buffer_xml_printf): New functions.
15264 * server.h (struct buffer): New.
15265 (buffer_grow_str, buffer_grow_str0): New macros.
15266 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15267 (buffer_xml_printf): Declare.
15268
15269 2008-11-24 Doug Evans <dje@google.com>
15270
15271 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15272
15273 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15274
15275 * server.c (handle_v_run): Always use the supplied argument list.
15276
15277 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15278
15279 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15280 (xtensa_regmap_table): Add entry for scompare1.
15281
15282 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15283
15284 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15285 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15286 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15287 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15288 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15289 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15290 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15291 XML target descriptions.
15292 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15293 when inferior is running on an ISA 2.05 or later processor. Add
15294 special case to return offset for full 64-bit slot of FPSCR when
15295 in 32-bits.
15296
15297 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15298
15299 * Makefile.in (SFILES, clean): Added sparc64 files.
15300 (reg-sparc64.o, reg-sparc64.c): New.
15301 * configure.srv (sparc*-*-linux*): New configuration.
15302 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15303 syscall arguments for SPARC.
15304 (regsets_store_inferior_registers): Likewise.
15305 * linux-sparc-low.c: New file.
15306
15307 2008-10-21 Doug Evans <dje@google.com>
15308
15309 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15310 (READLINE_DIR,READLINE_DEP): Delete.
15311 (INTERNAL_CFLAGS): Update.
15312 (LINTFLAGS): Update.
15313
15314 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15315
15316 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15317 whole argv from the last run, not just argv[0].
15318
15319 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15320
15321 * regcache.c (new_register_cache): Return NULL if the register
15322 cache size isn't known yet.
15323 (free_register_cache): Avoid dereferencing a NULL regcache.
15324
15325 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * configure.srv: Merge MIPS and MIPS64.
15328
15329 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15330
15331 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15332
15333 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15334
15335 * Makefile.in: Add required vsx dependencies.
15336
15337 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15338 Declare init_registers_powerpc_vsx32l.
15339 Declare init_registers_powerpc_vsx64l.
15340 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15341 (ppc_arch_setup): Check for VSX in hwcap.
15342 (ppc_fill_vsxregset): New function.
15343 (ppc_store_vsxregset): New function.
15344 Add new VSX entry in regset_info target_regsets.
15345
15346 * configure.srv: Add new VSX dependencies.
15347
15348 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15349
15350 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15351 (remote_open): Set or clear transport_is_reliable.
15352 (putpkt_binary): Don't expect acks in noack mode.
15353 (getpkt): Don't send ack/nac in noack mode.
15354 * server.c (handle_general_set): Handle QStartNoAckMode.
15355 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15356 qSupported.
15357 (main): Reset noack_mode on every connection.
15358 * server.h (noack_mode): Declare.
15359
15360 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15361
15362 * Makefile.in (GDBREPLAY_OBS): New variable.
15363 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15364
15365 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15366 Daniel Jacobowitz <dan@codesourcery.com>
15367
15368 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15369 (usr_store_inferior_registers): Likewise.
15370 (regsets_store_inferior_registers): Likewise.
15371
15372 2008-07-31 Rolf Jansen <rj@surtec.com>
15373 Pedro Alves <pedro@codesourcery.com>
15374
15375 * configure.ac: Check for memmem declaration.
15376 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15377 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15378 (disable_packet_qfThreadInfo): Unconditionally compile.
15379 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15380 * configure, config.in: Regenerate.
15381
15382 2008-07-28 Doug Kwan <dougkwan@google.com>
15383
15384 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15385 (linux_write_memory): Remove declaration of errno.
15386
15387 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15388
15389 * linux-low.c (handle_extended_wait): Do not use "status"
15390 variable uninitialized.
15391
15392 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15393
15394 * server.c (handle_v_attach): Inhibit reporting dll changes.
15395
15396 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15397
15398 * remote-utils.c (prepare_resume_reply): If requested, don't
15399 output "thread:TID" in the T stop reply.
15400
15401 * server.c (disable_packet_vCont, disable_packet_Tthread)
15402 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15403 (handle_query): If requested, disable support for qC, qfThreadInfo
15404 and qsThreadInfo.
15405 (handle_v_requests): If requested, disable support for vCont.
15406 (gdbserver_show_disableable): New.
15407 (main): Handle --disable-packet and --disable-packet=LIST.
15408
15409 * server.h (disable_packet_vCont, disable_packet_Tthread)
15410 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15411
15412 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15413
15414 * server.c (gdbserver_usage): Mention --version.
15415
15416 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * Makefile.in (gdbreplay.o): New rule.
15419
15420 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15421
15422 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15423 message, not gdbserver.
15424
15425 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15426 Nathan Sidwell <nathan@codesourcery.com>
15427 Joseph Myers <joseph@codesourcery.com>
15428
15429 * acinclude.m4: Include ../../config/acx.m4.
15430 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15431 * configure, config.in: Regenerate.
15432 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15433 * server.c (gdbserver_version): Print PKGVERSION.
15434 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15435 (main): Adjust gdbserver_usage calls.
15436 * gdbreplay.c (version, host_name): Add declarations.
15437 (gdbreplay_version, gdbreplay_usage): New.
15438 (main): Accept --version and --help options.
15439
15440 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15441
15442 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15443 (arm_breakpoint_at): Handle Thumb.
15444 (the_low_target): Add comment.
15445
15446 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15447
15448 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15449
15450 2008-05-09 Doug Evans <dje@google.com>
15451
15452 * server.h (decode_search_memory_packet): Declare.
15453 * remote-utils.c (decode_search_memory_packet): New fn.
15454 * server.c (handle_search_memory_1): New fn.
15455 (handle_search_memory): New fn.
15456 (handle_query): Process qSearch:memory packets.
15457
15458 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15459
15460 * regcache.c (registers_length): Remove.
15461 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15462 full register packet.
15463 * regcache.h (registers_length): Remove prototype.
15464 * server.h (PBUFSIZ): Define to 16384.
15465
15466 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15467
15468 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15469 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15470 powerpc-64l.o, and powerpc-altivec64l.o.
15471 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15472 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15473 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15474 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15475 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15476 to srv_xmlfiles.
15477
15478 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15479 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15480 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15481 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15482 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15483 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15484 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15485 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15486 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15487 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15488 (clean): Update.
15489
15490 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15491 (init_registers_powerpc_32l): ... this new prototype.
15492 (init_registers_powerpc_32): Remove, replace by ...
15493 (init_registers_powerpc_altivec32l): ... this new prototype.
15494 (init_registers_powerpc_e500): Remove, replace by ...
15495 (init_registers_powerpc_e500l): ... this new prototype.
15496 (init_registers_ppc64): Remove, replace by ...
15497 (init_registers_powerpc_64l): ... this new prototype.
15498 (init_registers_powerpc_64): Remove, replace by ...
15499 (init_registers_powerpc_altivec64l): ... this new prototype.
15500 (ppc_num_regs): Set to 73.
15501 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15502 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15503 (ppc_cannot_store_register): Handle orig_r3 and trap.
15504 (ppc_arch_setup): Update init_registers_... calls.
15505 (ppc_fill_gregset): Handle orig_r3 and trap.
15506
15507 * inferiors.c (clear_inferiors): Reset current_inferior.
15508
15509 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15510
15511 * acinclude.m4: Add override.m4.
15512 * configure: Regenerate.
15513
15514 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15515
15516 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15517 initial call to init_register_ppc64.
15518
15519 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15520
15521 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15522 single powerpc*-*-linux* case.
15523 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15524
15525 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15526
15527 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15528 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15529 from reg_xmlfiles.
15530 * linux-ppc-low.c: Include <elf.h>.
15531 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15532 (ppc_hwcap): New global variable.
15533 (ppc_regmap): Remove __SPE__ #ifdef sections.
15534 (ppc_regmap_e500): New global variable.
15535 (ppc_cannot_store_register): Update __SPE__ special case.
15536 (ppc_get_hwcap): New function.
15537 (ppc_arch_setup): Use it to determine whether inferior supports
15538 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15539 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15540 Do not access registers if target does not support AltiVec.
15541 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15542 Do not access registers if target does not support SPE.
15543 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15544
15545 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * linux-low.c (disabled_regsets, num_regsets): New.
15548 (use_regsets_p): Delete.
15549 (linux_wait_for_process): Clear disabled_regsets.
15550 (regsets_fetch_inferior_registers): Check and set it.
15551 (regsets_store_inferior_registers): Likewise.
15552 (linux_fetch_registers, linux_store_registers): Do not use
15553 use_regsets_p.
15554 (initialize_low): Allocate disabled_regsets.
15555
15556 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15557
15558 * Makefile.in (LIBOBJS): New.
15559 (OBS): Use LIBOBJS.
15560 (memmem.o): New rule.
15561 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15562 * configure: Regenerated.
15563
15564 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15565
15566 * server.c (handle_query): Never return "unsupported" for
15567 qXfer:features:read queries.
15568
15569 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15570
15571 * server.c (get_features_xml): Fix inverted condition.
15572 (handle_query): Always support qXfer:feature:read.
15573
15574 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * server.c (wrapper_argv): New.
15577 (start_inferior): Handle wrapper_argv. If set, expect an extra
15578 trap.
15579 (gdbserver_usage): Document --wrapper.
15580 (main): Parse --wrapper.
15581
15582 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15583
15584 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15585 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15586 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15587 (ppc_set_pc): Likewise.
15588 (ppc_arch_setup): New function.
15589 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15590 of collect_register.
15591 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15592
15593 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15594
15595 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15596 instead of linux-ppc64-low.o.
15597 * linux-ppc64-low.c: Remove file.
15598 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15599 (linux-ppc64-low.o): Remove rule.
15600
15601 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15602 (init_registers_powerpc_64): Likewise.
15603 (ppc_regmap): Conditionally define depending on __powerpc64__.
15604 (ppc_cannot_store_register): Do not special-case "fpscr" when
15605 compiled on __powerpc64__.
15606 (ppc_collect_ptrace_register): New function.
15607 (ppc_supply_ptrace_register): New function.
15608 (ppc_breakpoint): Change type to "unsigned int".
15609 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15610 (the_low_target): Conditionally provide initializers for the
15611 arch_setup member depending on __powerpc64__. Install
15612 collect_ptrace_register and supply_ptrace_register members.
15613
15614 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15615
15616 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15617 * server.c (gdbserver_xmltarget): Define.
15618 (get_features_xml): Use it to replace "target.xml" and arch_string.
15619
15620 * configure.srv: Remove srv_xmltarget. Add XML files that were
15621 mentioned there to srv_xmlfiles instead. Remove conditional tests
15622 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15623 srv_xmlfiles and srv_regobj to include all possible choices.
15624 * configure.ac (srv_xmltarget): Remove.
15625 (srv_xmlfiles): Do not add "target.xml".
15626 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15627 checks for supplementary target information.
15628 * configure: Regenerate.
15629 * Makefile.in (XML_TARGET): Remove.
15630 (target.xml): Remove rule.
15631 (clean): Do not clean up target.xml.
15632 (.PRECIOUS): Do not mention target.xml.
15633
15634 * target.h (struct target_ops): Remove arch_string member.
15635 * linux-low.c (linux_arch_string): Remove.
15636 (linux_target_ops): Remove arch_string initializer.
15637 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15638 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15639 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15640 * spu-low.c (spu_arch_string): Remove.
15641 (spu_target_ops): Remove arch_string initializer.
15642 * win32-low.c (win32_arch_string): Remove.
15643 (win32_target_ops): Remove arch_string initializer.
15644 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15645 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15646 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15647
15648 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15649
15650 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15651 by collect_ptrace_register and supply_ptrace_register hooks.
15652 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15653 instead of checking for the_low_target.left_pad_xfer.
15654 (usr_store_inferior_registers): Use collect_ptrace_register callback
15655 instead of checking for the_low_target.left_pad_xfer.
15656
15657 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15658 (s390_supply_ptrace_register): Likewise.
15659 (s390_fill_gregset): Call s390_collect_ptrace_register.
15660 (the_low_target): Update.
15661
15662 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15663 (ppc_supply_ptrace_register): Likewise.
15664 (the_low_target): Update.
15665
15666 * linux-i386-low.c (the_low_target): Update.
15667 * linux-x86-64-low.c (the_low_target): Update.
15668
15669 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15670
15671 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15672 reg-s390.o and reg-s390x.o.
15673
15674 * linux-low.c (new_inferior): New global variable.
15675 (linux_create_inferior, linux_attach): Set it.
15676 (linux_wait_for_process): Call the_low_target.arch_setup after the
15677 target has stopped for the first time.
15678 (initialize_low): Do not call the_low_target.arch_setup.
15679
15680 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15681 (s390_set_pc): Likewise.
15682 (s390_arch_setup): New function.
15683 (the_low_target): Use s390_arch_setup as arch_setup routine.
15684
15685 * regcache.c (realloc_register_cache): New function.
15686 (set_register_cache): Call it for each existing regcache.
15687
15688 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15689
15690 * server.h (init_registers): Remove prototype.
15691
15692 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15693 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15694 instead of init_registers ().
15695 * linux-arm-low.c (init_registers_arm): Add prototype.
15696 (init_registers_arm_with_iwmmxt): Likewise.
15697 (the_low_target): Add initializer for arch_setup field.
15698 * linux-cris-low.c (init_registers_cris): Add prototype.
15699 (the_low_target): Add initializer for arch_setup field.
15700 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15701 (the_low_target): Add initializer for arch_setup field.
15702 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15703 (the_low_target): Add initializer for arch_setup field.
15704 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15705 (the_low_target): Add initializer for arch_setup field.
15706 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15707 (the_low_target): Add initializer for arch_setup field.
15708 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15709 (the_low_target): Add initializer for arch_setup field.
15710 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15711 (init_registers_mips64_linux): Likewise.
15712 (the_low_target): Add initializer for arch_setup field.
15713 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15714 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15715 (the_low_target): Add initializer for arch_setup field.
15716 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15717 (init_registers_powerpc_64): Likewise.
15718 (the_low_target): Add initializer for arch_setup field.
15719 * linux-s390-low.c (init_registers_s390): Add prototype.
15720 (init_registers_s390x): Likewise.
15721 (the_low_target): Add initializer for arch_setup field.
15722 * linux-sh-low.c (init_registers_sh): Add prototype.
15723 (the_low_target): Add initializer for arch_setup field.
15724 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15725 (the_low_target): Add initializer for arch_setup field.
15726 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15727 (the_low_target): Add initializer for arch_setup field.
15728
15729 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15730 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15731 instead of init_registers ().
15732 * win32-arm-low.c (init_registers_arm): Add prototype.
15733 (the_low_target): Add initializer for arch_setup field.
15734 * win32-i386-low.c (init_registers_i386): Add prototype.
15735 (the_low_target): Add initializer for arch_setup field.
15736
15737 * spu-low.c (init_registers_spu): Add prototype.
15738 (initialize_low): Call initialie_registers_spu () instead of
15739 initialize_registers ().
15740
15741 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15742
15743 * server.c (handle_v_requests): When handling the vRun and vAttach
15744 packets, if already debugging a process, don't kill it. Return an
15745 error instead.
15746
15747 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15748
15749 * server.c (handle_query): Correct length check.
15750
15751 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15752
15753 * win32-low.c (do_initial_child_stuff): Add process handle
15754 parameter. Set current_process_handle and current_process_id from the
15755 parameters. Clear globals.
15756 (win32_create_inferior): Don't set current_process_handle and
15757 current_process_id here. Instead pass them on the call to
15758 do_initial_child_stuff.
15759 (win32_attach): Likewise.
15760 (win32_clear_inferiors): New.
15761 (win32_kill): Don't close the current process handle or the
15762 current thread handle here. Instead call win32_clear_inferiors.
15763 (win32_detach): Don't open a new handle to the process. Call
15764 win32_clear_inferiors.
15765 (win32_join): Don't rely on current_process_handle; open a new
15766 handle using the process id.
15767 (win32_wait): Call win32_clear_inferiors when the inferior process
15768 has exited.
15769
15770 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15771
15772 * server.c (monitor_show_help): Add "exit".
15773
15774 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15775
15776 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15777 (clean): Add reg-xtensa.c.
15778 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15779 * configure.srv (xtensa*-*-linux*) New target.
15780 * linux-xtensa-low.c: New.
15781 * xtensa-xtregs.c: New.
15782
15783 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15784
15785 * hostio.c: Don't include errno.h.
15786 (errno_to_fileio_errno): Move to hostio-errno.
15787 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15788 error number outputting to the target->hostio_last_error callback.
15789 (hostio_packet_error): Use FILEIO_EINVAL directly.
15790 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15791 calls to hostio_error.
15792 * hostio-errno.c: New.
15793 * server.h (hostio_last_error_from_errno): Declare.
15794 * target.h (target_ops): Add hostio_last_error member.
15795 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15796 as hostio_last_error handler.
15797 * spu-low.c (spu_target_ops): Likewise.
15798 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15799 (wince_hostio_last_error): New functions.
15800 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15801 as hostio_last_error handler.
15802 (win32_target_ops) [!_WIN32_WCE]: Register
15803 hostio_last_error_from_errno as hostio_last_error handler.
15804 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15805 (hostio-errno.o): New rule.
15806 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15807 * configure.srv (srv_hostio_err_objs): New variable. Default to
15808 hostio-errno.o.
15809 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15810 * configure: Regenerate.
15811
15812 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15813
15814 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15815 (linux_kill, linux_detach): Clean up the process list.
15816 * remote-utils.c (remote_open): Improve port number parsing.
15817 (putpkt_binary, input_interrupt): Only send interrupts if the target
15818 is running.
15819 * server.c (extended_protocol): Make static.
15820 (attached): Define earlier.
15821 (exit_requested, response_needed, program_argv): New variables.
15822 (target_running): New.
15823 (start_inferior): Clear attached here.
15824 (attach_inferior): Set attached here.
15825 (require_running): Define.
15826 (handle_query): Use require_running and target_running. Implement
15827 "monitor exit".
15828 (handle_v_attach, handle_v_run): New.
15829 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15830 (gdbserver_usage): Update.
15831 (main): Redo argument parsing. Handle --debug and --multi. Handle
15832 --attach along with other options or after the port. Save
15833 program_argv. Support no initial program. Resynchronize
15834 communication with GDB after an error. Handle "monitor exit".
15835 Use require_running and target_running. Always allow the extended
15836 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15837 restart in extended mode.
15838 * README: Refer to the GDB manual. Update --attach usage.
15839
15840 2007-12-20 Andreas Schwab <schwab@suse.de>
15841
15842 * linux-low.c (STACK_SIZE): Define.
15843 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15844 (linux_test_for_tracefork): Likewise.
15845
15846 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15847
15848 * linux-low.c (linux_wait_for_event): Update messages. Do not
15849 reinsert auto-delete breakpoints.
15850 * mem-break.c (struct breakpoint): Change return type of handler to
15851 int.
15852 (set_breakpoint_at): Update handler type.
15853 (reinsert_breakpoint_handler): Return 1 instead of calling
15854 delete_breakpoint.
15855 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15856 setting a new one.
15857 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15858 * mem-break.h (set_breakpoint_at): Update handler type.
15859 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15860 * win32-low.c (auto_delete_breakpoint): New.
15861 (get_child_debug_event): Use it.
15862
15863 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15864
15865 * configure.ac: Check for pread and pwrite.
15866 * hostio.c (handle_pread): Fall back to lseek and read.
15867 (handle_pwrite): Fall back to lseek and write.
15868 * config.in, configure: Regenerated.
15869
15870 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * server.c (myresume): Add own_buf argument.
15873 (main): Update calls.
15874
15875 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15878 * remote-utils.c (remote_open): Do not call disable_async_io.
15879 (block_async_io): Delete.
15880 (unblock_async_io): Make static.
15881 (initialize_async_io): New.
15882 * server.c (handle_v_cont): Handle async I/O here.
15883 (myresume): Likewise. Move other common resume tasks here...
15884 (main): ... from here. Call initialize_async_io. Disable async
15885 I/O before the main loop.
15886 * server.h (initialize_async_io): Declare.
15887 (block_async_io, unblock_async_io): Delete prototypes.
15888 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15889
15890 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15891
15892 * remote-utils.c (readchar): Allow binary data in received messages.
15893
15894 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15895
15896 * win32-low.c (attaching): New global.
15897 (win32_create_inferior): Clear the `attaching' global.
15898 (win32_attach): Set the `attaching' global.
15899 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15900 attaching. Only set a breakpoint at the entry point if not
15901 attaching.
15902
15903 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15904
15905 * server.c (main): Don't report dll events on the initial
15906 connection on attaches.
15907
15908 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15909
15910 * server.c (main): Relax numerical bases supported for the pid of
15911 the --attach command line argument.
15912
15913 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15914
15915 * win32-low.c (win32_attach): Call OpenProcess before
15916 DebugActiveProcess, not after. Add last error output to error
15917 call.
15918
15919 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15920
15921 * win32-low.c (win32_get_thread_context)
15922 (win32_set_thread_context): New functions.
15923 (thread_rec): Use win32_get_thread_context.
15924 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15925 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15926 field.
15927
15928 2007-12-03 Leo Zayas
15929 Pedro Alves <pedro_alves@portugalmail.pt>
15930
15931 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15932 global variables.
15933 (child_add_thread): Minor cleanup.
15934 (child_continue): Resume artificially suspended threads before
15935 calling ContinueDebugEvent.
15936 (suspend_one_thread): New.
15937 (fake_breakpoint_event): New.
15938 (get_child_debug_event): Change return type to int. Check here if
15939 gdb sent an interrupt request. If a soft interrupt was requested,
15940 fake a breakpoint event. Return 0 if there is no event to handle,
15941 and 1 otherwise.
15942 (win32_wait): Don't check here if gdb sent an interrupt request.
15943 Ensure there is a valid event to handle.
15944 (win32_request_interrupt): Add soft interruption method as last
15945 resort.
15946
15947 2007-12-03 Leo Zayas
15948 Pedro Alves <pedro_alves@portugalmail.pt>
15949
15950 * win32-low.h (win32_thread_info): Add descriptions to the
15951 structure members. Replace `suspend_count' counter by a
15952 `suspended' flag.
15953 * win32-low.c (thread_rec): Update condition of when to get the
15954 context from the inferior. Rely on ContextFlags being set if it
15955 has already been retrieved. Only suspend the inferior thread if
15956 we haven't already. Warn if that fails.
15957 (continue_one_thread): s/suspend_count/suspended/. Only call
15958 ResumeThread once. Warn if that fails.
15959
15960 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15961
15962 * win32-low.c (win32_wait): Don't read from the inferior when it
15963 has already exited.
15964
15965 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15966
15967 * Makefile.in (win32_low_h): New variable.
15968 (win32-low.o): Add dependency on $(win32_low_h).
15969 (win32-arm-low.o, win32-i386-low.o): New rules.
15970
15971 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15972
15973 * hostio.c: Correct copyright year.
15974
15975 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15976
15977 * Makefile.in (OBS): Add hostio.o.
15978 (hostio.o): New rule.
15979 * server.h (handle_vFile): Declare.
15980 * hostio.c: New file.
15981 * server.c (handle_v_requests): Take packet_len and new_packet_len
15982 for binary packets. Call handle_vFile.
15983 (main): Update call to handle_v_requests.
15984
15985 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15986
15987 * linux-low.c: Include <sched.h>.
15988
15989 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15990
15991 * linux-low.c (linux_tracefork_grandchild): New.
15992 (linux_tracefork_child): Use clone.
15993 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15994
15995 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15996
15997 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15998
15999 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16002
16003 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16004
16005 * inferiors.c (change_inferior_id): Delete.
16006 (add_pid_to_list, pull_pid_from_list): New.
16007 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16008 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16009 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16010 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16011 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16012 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16013 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16014 (using_threads): Always set to 1.
16015 (handle_extended_wait): New.
16016 (add_process): Do not set TID.
16017 (linux_create_inferior): Set must_set_ptrace_flags.
16018 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16019 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16020 (linux_thread_alive): Rename TID argument to LWPID.
16021 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16022 (linux_wait_for_event): Do not use TID or check using_threads. Update
16023 call to dead_thread_notify. Call handle_extended_wait.
16024 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16025 (send_sigstop): Delete sigstop_sent.
16026 (wait_for_sigstop): Avoid TID.
16027 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16028 (linux_test_for_tracefork): New.
16029 (linux_lookup_signals): Use thread_db_active and
16030 linux_supports_tracefork_flag.
16031 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16032 * linux-low.h (get_process_thread): Avoid TID.
16033 (struct process_ifo): Move thread_known and tid to the end. Remove
16034 sigstop_sent.
16035 (linux_attach_lwp, thread_db_init): Update prototypes.
16036 * server.h (change_inferior_id): Delete prototype.
16037 (add_pid_to_list, pull_pid_from_list): New prototypes.
16038 * thread-db.c (thread_db_use_events): New.
16039 (find_first_thread): Rename to...
16040 (find_one_thread): ...this. Update callers and messages. Do not
16041 call fatal. Check thread_db_use_events. Do not call
16042 change_inferior_id or new_thread_notify.
16043 (maybe_attach_thread): Update. Do not call new_thread_notify.
16044 (thread_db_init): Set thread_db_use_events. Check use_events.
16045 * utils.c (fatal, warning): Correct message prefix.
16046
16047 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16048
16049 * Makefile.in (clean): Remove new files.
16050 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16051 (powerpc-64.o, powerpc-64.c): New rules.
16052 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16053 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16054 with SPE.
16055 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16056 SPE targets.
16057 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16058 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16059 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16060 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16061 (target_regsets): Add AltiVec and SPE register sets.
16062 * configure.ac: Check for AltiVec and SPE.
16063 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16064 (ppc_fill_vrregset, ppc_store_vrregset): New.
16065 (target_regsets): Add AltiVec register set.
16066 * configure: Regenerated.
16067
16068 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * linux-low.c (O_LARGEFILE): Define.
16071 (linux_read_memory): Use /proc/PID/mem.
16072 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16073 * configure, config.in: Regenerated.
16074
16075 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16076
16077 * linux-low.c (linux_wait_for_event): Do not pass signals while
16078 single-stepping.
16079
16080 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16081
16082 * win32-low.c (create_process): New.
16083 (win32_create_inferior): Use create_process instead of
16084 CreateProcess. If create_process failed retry appending an ".exe"
16085 suffix. Store the GetLastError result immediatelly after
16086 create_process calls and use it on the call to error.
16087
16088 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16089
16090 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16091
16092 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16093
16094 * configure.ac: Switch license to GPLv3.
16095
16096 2007-08-01 Michael Snyder <msnyder@access-company.com>
16097
16098 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16099
16100 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16101
16102 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16103 typedef.
16104 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16105 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16106 CloseToolhelp32Snapshot.
16107 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16108 CloseToolhelp32Snapshot.
16109
16110 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16111
16112 * server.c (main): Check for inferior exit before main loop.
16113
16114 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16115
16116 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16117 instead of on tmp_desc.
16118
16119 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16120 Daniel Jacobowitz <dan@codesourcery.com>
16121
16122 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16123 (add_thread): Minor cleanups.
16124 (clear_inferiors): Move lower in the file. Clear the DLL
16125 list.
16126 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16127 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16128 (xml_escape_text): New.
16129 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16130 for qSupported.
16131 (handle_v_cont): Report errors.
16132 (gdbserver_version): Update.
16133 (main): Correct size of own_buf. Do not report initial DLL events.
16134 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16135 (unloaded_dll, xml_escape_text): New.
16136 * win32-low.c (enum target_waitkind): Update comments.
16137 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16138 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16139 (win32_EnumProcessModules, win32_GetModuleInformation)
16140 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16141 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16142 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16143 (win32_Module32First, win32_Module32Next, load_toolhelp)
16144 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16145 (get_child_debug_event): Handle DLL events.
16146 (win32_wait): Likewise.
16147
16148 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16149
16150 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16151 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16152
16153 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16154
16155 * win32-low.c (handle_output_debug_string): Ignore event if not
16156 waiting.
16157
16158 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16159
16160 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16161
16162 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16163
16164 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16165
16166 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * inferiors.c (change_inferior_id): Add comment.
16169 * linux-low.c (check_removed_breakpoint): Add an early
16170 prototype. Improve debug output.
16171 (linux_attach): Doc update.
16172 (linux_detach_one_process, linux_detach): Clean up before releasing
16173 each process.
16174 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16175 * linux-low.h (struct process_info): Doc improvement.
16176 * mem-break.c (delete_all_breakpoints): New.
16177 * mem-break.h (delete_all_breakpoints): New prototype.
16178 * thread-db.c (find_first_thread): New.
16179 (thread_db_create_event): Call it instead of
16180 thread_db_find_new_threads. Clean up unused variables.
16181 (maybe_attach_thread): Remove first thread handling.
16182 (thread_db_find_new_threads): Use find_first_thread.
16183 (thread_db_get_tls_address): Likewise.
16184
16185 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16186
16187 * thread-db.c (thread_db_find_new_threads): Add prototype.
16188 (thread_db_create_event): Check for the main thread before adding
16189 a new thread.
16190 (maybe_attach_thread): Only enable event reporting if TID == 0.
16191 (thread_db_get_tls_address): Check for new threads.
16192
16193 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16194
16195 * linux-low.c (linux_create_inferior): Try execv before execvp.
16196 * spu-low.c (spu_create_inferior): Likewise.
16197
16198 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16199
16200 * linux-low.c (linux_create_inferior): Change execv to execvp.
16201 * spu-low.c (spu_create_inferior): Likewies.
16202
16203 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16204
16205 * Makefile.in (clean): Clean new files instead of deleted ones.
16206 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16207 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16208 rules.
16209 * configure.srv: Specify XML files and new regformats for MIPS and
16210 MIPS64 GNU/Linux.
16211 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16212 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16213 an entry for the restart register.
16214 (mips_cannot_fetch_register, mips_cannot_store_register)
16215 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16216 register names to match the XML descriptions.
16217 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16218 restart register instead of $0.
16219
16220 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16221 Markus Deuling <deuling@de.ibm.com>
16222
16223 * remote-utils.c (decode_xfer_write): New function.
16224 * server.h (decode_xfer_write): Add prototype.
16225 * server.c (handle_query): Add PACKET_LEN argument. Support
16226 qXfer:spu:read and qXfer:spu:write packets.
16227 (main): Pass packet_len to handle_query.
16228 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16229 * target.h (target_ops): Add qxfer_spu.
16230
16231 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16232
16233 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16234 accessing non-seekable spufs files.
16235
16236 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16237
16238 * server.c (handle_query): Add reply for qC packet.
16239
16240 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16241 Leo Zayas <lerele@champenstudios@com>
16242
16243 * server.h (check_remote_input_interrupt_request): New function.
16244 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16245 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16246 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16247 (check_remote_input_interrupt_request): New function.
16248 * server.h (check_remote_input_interrupt_request): Declare.
16249 * win32-low.c (winapi_DebugBreakProcess,
16250 winapi_GenerateConsoleCtrlEvent): New typedefs.
16251 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16252 to 250 ms.
16253 (win32_wait): Check for remote interrupt request
16254 with check_remote_input_interrupt_request.
16255 (win32_request_interrupt): New function.
16256 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16257
16258 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16259
16260 * win32-low.c (debug_registers_changed,
16261 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16262 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16263 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16264 (thread_rec): Get context using the low target.
16265 (child_add_thread): Call thread_added on the low target,
16266 which does the same thing.
16267 (regptr): Delete.
16268 (do_initial_child_stuff): Remove debug registers references.
16269 Set context using the low target. Resume threads after
16270 setting the contexts.
16271 (child_continue): Remove dead variable. Remove debug
16272 registers references.
16273 (child_fetch_inferior_registers): Go through the low target.
16274 (do_child_store_inferior_registers): Remove.
16275 (child_store_inferior_registers): Go through the low target.
16276 (win32_resume): Remove debug registers references.
16277 Set context using the low target.
16278 (handle_exception): Change return type to void. Don't record
16279 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16280 first chance exception.
16281 (get_child_debug_event): Change return type to void. Remove
16282 goto loop. Always return after waiting for debug event.
16283 (win32_wait): Convert to switch statement. Handle spurious
16284 events.
16285
16286 * win32-i386-low.c (debug_registers_changed,
16287 debug_registers_used): New.
16288 (initial_stuff): Rename to ...
16289 (i386_initial_stuff): ... this. Clear debug registers
16290 state variables.
16291 (store_debug_registers): Delete.
16292 (i386_get_thread_context): New.
16293 (load_debug_registers): Delete.
16294 (i386_set_thread_context): New.
16295 (i386_thread_added): New.
16296 (single_step): Rename to ...
16297 (i386_single_step): ... this.
16298 (do_fetch_inferior_registers): Rename to ...
16299 (i386_fetch_inferior_register): ... this.
16300 (i386_store_inferior_register): New.
16301 (the_low_target): Adapt to new interface.
16302
16303 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16304 (arm_get_thread_context): New.
16305 (arm_set_thread_context): New.
16306 (regptr): New.
16307 (do_fetch_inferior_registers): Rename to ...
16308 (arm_fetch_inferior_register): ... this.
16309 (arm_store_inferior_register): New.
16310 (arm_wince_breakpoint): Reimplement as unsigned long.
16311 (arm_wince_breakpoint_len): Define.
16312 (the_low_target): Adapt to new interface.
16313
16314 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16315 load_debug_registers. Add get_thread_context, set_thread_context,
16316 thread_added and store_inferior_register. Rename
16317 fetch_inferior_registers to fetch_inferior_register.
16318 (regptr): Remove declaration.
16319
16320 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16321
16322 * linux-low.c (linux_detach): Change return type to int. Return 0.
16323 * spu-low.c (spu_detach): Likewise.
16324
16325 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16326
16327 * target.h (target_ops): Change return type of detach to int.
16328 Add join.
16329 (join_inferior): New.
16330 * server.c (main): Don't skip detach support on mingw32.
16331 If the inferior doesn't support detaching return error.
16332 Call join_inferior instead of using waitpid.
16333 * linux-low.c (linux_join): New.
16334 (linux_target_op): Add linux_join.
16335 * spu-low.c (spu_join): New.
16336 (spu_target_ops): Add spu_join.
16337 * win32-low.c (win32_detach): Adapt to new interface.
16338 Reopen current_process_handle before detaching. Issue a child
16339 resume before detaching.
16340 (win32_join): New.
16341 (win32_target_op): Add win32_join.
16342
16343 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16344
16345 * win32-low.c (win32-attach): Fix return value.
16346 * target.h (target_ops): Describe ATTACH return values.
16347
16348 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16349
16350 * win32-low.c (GETPROCADDRESS): Define.
16351 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16352 (winapi_DebugSetProcessKillOnExit): Likewise.
16353 (win32_create_inferior): Force usage of ansi CreateProcessA.
16354 (win32_attach): Use GETPROCADDRESS.
16355 (win32_detach): Likewise.
16356
16357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16358
16359 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16360
16361 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16362
16363 * win32-low.c: Commit leftover changes from 2007-03-29.
16364
16365 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16366
16367 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16368 fields short instead of int. Add explicit padding.
16369 (i387_cache_to_fsave): Remove unnecessary casts.
16370 (i387_fsave_to_cache): Doc fix.
16371 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16372
16373 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16374
16375 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16376 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16377
16378 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16379
16380 * configure.srv (arm*-*-mingw32ce*): Move near the other
16381 arm targets.
16382
16383 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16384
16385 * configure.ac: Add errno checking.
16386 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16387 sys/file.h and malloc.h.
16388 (AC_CHECK_DECLS): Add perror.
16389 (srv_mingwce): Handle.
16390 * configure.srv (i[34567]86-*-cygwin*): Add
16391 win32-i386-low.o to srv_tgtobj.
16392 (i[34567]86-*-mingw*): Likewise.
16393 (arm*-*-mingw32ce*): Add case.
16394 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16395 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16396 [__MINGW32CE__] (strerror): New function.
16397 [__MINGW32CE__] (errno): Define to GetLastError.
16398 [__MINGW32CE__] (COUNTOF): New macro.
16399 (remote_open): Remove extra close call.
16400 * mem-break.c (delete_breakpoint_at): New function.
16401 * mem-break.h (delete_breakpoint_at): Declare.
16402 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16403 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16404 [USE_WIN32API] (read, write): Add char* casts.
16405 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16406 * server.h: Include wincecompat.h on Windows CE.
16407 [HAVE_ERRNO_H]: Check.
16408 (perror): Declare if not declared.
16409 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16410 (perror_with_name): Remove errno declaration.
16411 * wincecompat.h: New.
16412 * wincecompat.c: New.
16413 * win32-low.h: New.
16414 * win32-arm-low.c: New.
16415 * win32-i386-low.c: New.
16416 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16417 (OUTMSG2): Make it safe.
16418 (_T): New macro.
16419 (COUNTOF): New macro.
16420 (NUM_REGS): Get it from the low target.
16421 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16422 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16423 (thread_rec): Let low target handle debug registers.
16424 (child_add_thread): Likewise.
16425 (child_init_thread_list): Likewise.
16426 (continue_one_thread): Likewise.
16427 (regptr): New.
16428 (do_child_fetch_inferior_registers): Move to ...
16429 * win32-i386-low.c: ... here, and rename to ...
16430 (do_fetch_inferior_registers): ... this.
16431 * win32-low.c (child_fetch_inferior_registers):
16432 Go through the low target.
16433 (do_child_store_inferior_registers): Use regptr.
16434 (strwinerror): New function.
16435 (win32_create_inferior): Handle Windows CE.
16436 Use strwinerror instead of strerror on Windows error
16437 codes. Add program to the error output.
16438 Don't close the main thread handle on Windows CE.
16439 (win32_attach): Use coredll.dll on Windows CE.
16440 (win32_kill): Close current process and current
16441 thread handles.
16442 (win32_detach): Use coredll.dll on Windows CE.
16443 (win32_resume): Let low target handle debug registers, and
16444 step request.
16445 (handle_exception): Add/Remove initial breakpoint. Avoid
16446 non-existant WSTOPSIG on Windows CE.
16447 (win32_read_inferior_memory): Cast to remove warning.
16448 (win32_arch_string): Go through the low target.
16449 (initialize_low): Call set_breakpoint_data with the low
16450 target's breakpoint.
16451 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16452 FOP_REGNUM, mappings): Move to ...
16453 * win32-i386-low.c: ... here.
16454 * win32-low.c (win32_thread_info): Move to ...
16455 * win32-low.h: ... here.
16456 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16457 win32-arm-low.c and wincecompat.c.
16458 (all:): Add $EXEEXT.
16459 (install-only:): Likewise.
16460 (gdbserver:): Likewise.
16461 (gdbreplay:): Likewise.
16462 * config.in: Regenerate.
16463 * configure: Regenerate.
16464
16465 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16466
16467 * win32-low.c: Rename typedef thread_info to
16468 win32_thread_info throughout.
16469
16470 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16471
16472 * win32-i386-low.c: Rename to ...
16473 * win32-low.c: ... this.
16474 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16475 * Makefile.in: Likewise.
16476
16477 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16478
16479 * remote-utils.c (monitor_output): Constify msg parameter.
16480 * server.h (monitor_output): Likewise.
16481 * win32-i386-low.c (handle_output_debug_string): New.
16482 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16483 handle_output_debug_string.
16484 (get_child_debug_event): Likewise.
16485
16486 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16487
16488 * server.c (main): Correct strtoul check.
16489
16490 2007-03-27 Jon Ringle <jon@ringle.org>
16491
16492 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16493
16494 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16495
16496 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16497
16498 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16499
16500 * terminal.h: Check HAVE_SGTTY_H.
16501
16502 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16503
16504 * remote-utils.c (remote_open): Print out the assigned port number.
16505
16506 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16507
16508 * remote-utils.c (monitor_output): New function.
16509 * server.c (debug_threads): Define here.
16510 (monitor_show_help): New function.
16511 (handle_query): Handle qRcmd.
16512 (main): Do not handle 'd' packet.
16513 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16514 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16515 of debug_threads.
16516
16517 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16518
16519 * Makefile.in (EXEEXT): New.
16520 (clean): Use $(EXEEXT).
16521
16522 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16523
16524 * target.h (target_ops): Rename send_signal to request_interrupt,
16525 and remove enum target_signal parameter.
16526 * linux-low.c (linux_request_interrupt): Rename from
16527 linux_send_signal, and always send SIGINT.
16528 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16529 and always send SIGINT.
16530 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16531 of send_signal.
16532 (input_interrupt): Likewise.
16533
16534 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16535
16536 * server.c (get_features_xml): Check if target implemented
16537 arch_string.
16538 * win32-i386-low.c (win32_arch_string): New.
16539 (win32_target_ops): Add win32_arch_string as arch_string member.
16540
16541 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16542
16543 * spu-low.c (spu_arch_string): New.
16544 (spu_target_ops): Add spu_arch_string.
16545
16546 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16547
16548 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16549 * configure.ac: Do not check for terminal.h.
16550 * configure, config.in: Regenerated.
16551
16552 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16553
16554 * Makefile.in (OBS): Add $(XML_BUILTIN).
16555 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16556 (clean): Update.
16557 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16558 (arm-with-iwmmxt.c): New.
16559 * config.in, configure: Regenerate.
16560 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16561 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16562 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16563 (arm*-*-linux*): Add iWMMXt and regset support.
16564 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16565 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16566 (arm_store_wmmxregset, target_regsets): New.
16567 * server.c (get_features_xml): Take annex argument. Check builtin
16568 XML documents.
16569 (handle_query): Handle multiple annexes.
16570
16571 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16572
16573 * remote-utils.c [USE_WIN32API] (read, write): Define.
16574 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16575 write.
16576
16577 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16578
16579 * linux-i386-low.c (the_low_target): Set arch_string.
16580 * linux-x86-64-low.c (the_low_target): Likewise.
16581 * linux-low.c (linux_arch_string): New.
16582 (linux_target_ops): Add it.
16583 * linux-low.h (struct linux_target_ops): Add arch_string.
16584 * server.c (write_qxfer_response): Use const void * for DATA.
16585 (get_features_xml): New.
16586 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16587 * target.h (struct target_ops): Add arch_string method.
16588
16589 2007-01-03 Denis Pilat <denis.pilat@st.com>
16590 Daniel Jacobowitz <dan@codesourcery.com>
16591
16592 * linux-low.c (linux_kill): Handle being called with no threads.
16593 * win32-i386-low.c (win32_kill): Likewise.
16594 (get_child_debug_event): Clear current_process_handle.
16595
16596 2006-12-30 Denis PILAT <denis.pilat@st.com>
16597 Daniel Jacobowitz <dan@codesourcery.com>
16598
16599 * remote-utils.c (remote_open): Check the type of specified
16600 serial port devices before opening them.
16601 * server.c (main): Kill the inferior if an error occurs during
16602 the first remote_open.
16603
16604 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16605
16606 * README: Update supported targets.
16607
16608 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16609
16610 * Makefile.in (clean): Remove reg-mips64.c.
16611 (reg-mips64.c, reg-mips64.o): New rules.
16612 * configure.srv: Handle mips64. Include regset support for mips.
16613 * linux-mips-low.c (union mips_register): New.
16614 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16615 (mips_breakpoint, mips_breakpoint_at): Use int.
16616 (mips_collect_register, mips_supply_register)
16617 (mips_collect_register_32bit, mips_supply_register_32bit)
16618 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16619 (mips_store_fpregset, target_regsets): New.
16620 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16621
16622 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16623
16624 * configure.srv: Add target "spu*-*-*".
16625 * Makefile.in (clean): Remove reg-spu.c.
16626 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16627 * spu-low.c: New file.
16628
16629 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16630
16631 * configure.ac: Correct td_thr_tls_get_addr test.
16632 * configure: Regenerated.
16633
16634 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16635
16636 * linux-low.c (linux_wait_for_event): Reformat. Use the
16637 pass_signals array.
16638 * remote-utils.c (decode_address_to_semicolon): New.
16639 * server.c (pass_signals, handle_general_set): New.
16640 (handle_query): Mention QPassSignals for qSupported.
16641 (main): Call handle_general_set.
16642 * server.h (pass_signals, decode_address_to_semicolon): New.
16643
16644 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16645
16646 * server.c (handle_query): Correct error handling for read_auxv.
16647
16648 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16649
16650 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16651 and srv_linux_thread_db to yes.
16652 * linux-s390-low.c (s390_fill_gregset): New function.
16653 (target_regsets): Define data structure.
16654
16655 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16656
16657 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16658 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16659 * config.in, configure: Regenerated.
16660 * inferiors.c (gdb_id_to_thread): New function.
16661 (gdb_id_to_thread_id): Use it.
16662 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16663 * linux-low.h (struct process_info): Add th member.
16664 (thread_db_get_tls_address): New prototype.
16665 * remote-utils.c (decode_address): Make non-static.
16666 * server.c (handle_query): Handle qGetTLSAddr.
16667 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16668 * target.h (struct target_ops): Add get_tls_address.
16669 * thread-db.c (maybe_attach_thread): Save the thread handle.
16670 (thread_db_get_tls_address): New.
16671
16672 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16673
16674 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16675 (linux_resume_one_process): Take a siginfo_t *. Update all
16676 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16677 (struct pending_signals): Add a siginfo_t.
16678 (linux_wait_for_process): Always set last_status.
16679 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16680 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16681 * linux-low.h (struct process_info): Add last_status.
16682
16683 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * remote-utils.c (try_rle): New function.
16686 (putpkt_binary): Use it.
16687
16688 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16689
16690 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16691 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16692 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16693 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16694 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16695 point registers.
16696
16697 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16698
16699 * server.c (terminal_fd): New variable.
16700 (old_foreground_pgrp): Likewise.
16701 (restore_old_foreground_pgrp): New function.
16702 (start_inferior): Record the terminal file descriptor in terminal_fd
16703 and its original foreground group in old_foreground_pgrp. Register
16704 restore_old_foreground_pgrp with atexit().
16705
16706 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16707
16708 * server.c (handle_query): Correct qPart to qXfer.
16709
16710 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16711
16712 * configure.ac: Check for more headers which are missing on
16713 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16714 * configure.srv: Add Cygwin and mingw32.
16715 * remote-utils.c: Don't include headers unconditionally which
16716 are missing on mingw32. Include <winsock.h> for mingw32.
16717 (remote_open): Adjust for mingw32 support. Flush
16718 standard error after writing to it.
16719 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16720 (unblock_async_io, enable_async_io, disable_async_io)
16721 (readchar, getpkt): Update for Winsock support.
16722 (prepare_resume_reply): Expect a protocol signal number.
16723 * server.c: Disable <sys/wait.h> on mingw32.
16724 (start_inferior): Adjust for mingw32 support. Flush
16725 standard error after writing to it.
16726 (attach_inferior): Likewise. Use protocol signal
16727 numbers.
16728 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16729 and names.
16730 * win32-i386-low.c: New file.
16731 * Makefile.in (XM_CLIBS): Set.
16732 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16733 (win32-i386-low.o): New dependency rule.
16734 * linux-low.c (linux_wait): Use target signal numbers.
16735 * target.h (struct target_ops): Doc fix.
16736 * server.h (target_signal_to_name): New prototype.
16737 * gdbreplay.c: Don't include headers unconditionally which
16738 are missing on mingw32. Include <winsock.h> for mingw32.
16739 (remote_close, remote_open): Adjust for Winsock support.
16740 * configure, config.in: Regenerated.
16741
16742 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16743
16744 * server.c (decode_xfer_read, write_qxfer_response): New.
16745 (handle_query): Take a packet length argument. Handle
16746 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16747 the qSupported response.
16748 (main): Update call to handle_query.
16749
16750 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16751
16752 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16753 (putpkt_binary): Renamed from putpkt and adjusted for binary
16754 data.
16755 (putpkt): New wrapper for putpkt_binary.
16756 (readchar): Don't mask off the high bit.
16757 (decode_X_packet): New function.
16758 * server.c (main): Call putpkt_binary if a handler sets the packet
16759 length. Save the length of the incoming packet. Handle 'X'.
16760 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16761
16762 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16763
16764 * server.c (handle_query): Handle qSupported.
16765
16766 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16767
16768 * remote-utils.c (all_symbols_looked_up): New variable.
16769 (look_up_one_symbol): Check it.
16770 * server.h (look_up_one_symbol): New declaration.
16771 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16772
16773 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16774
16775 * Makefile.in (linux-arm-low.o): Update dependencies.
16776 * linux-arm-low.c: Include "gdb_proc_service.h".
16777 (PTRACE_GET_THREAD_AREA): Define.
16778 (ps_get_thread_area): New function.
16779
16780 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16781
16782 * configure.srv (m68k*-*-uclinux*): New target.
16783 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16784 (linux_resume_one_process): Remove extraneous cast.
16785 (linux_read_offsets): New.
16786 (linux_target_op): Add linux_read_offsets on mmuless systems.
16787 * server.c (handle_query): Add qOffsets logic.
16788 * target.h (struct target_ops): Add read_offsets.
16789
16790 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16791
16792 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16793 (PTRACE_GET_THREAD_AREA): Define.
16794 (ps_get_thread_area): New function.
16795 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16796 (linux-x86-64-low.o): Update.
16797
16798 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16799
16800 * configure.ac: Remove checks for prfpregset_t.
16801 * gdb_proc_service.h: New file.
16802 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16803 new "gdb_proc_service.h".
16804 * proc-service.c: Likewise.
16805 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16806 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16807 * Makefile.in (gdb_proc_service_h): Updated.
16808 * configure, config.in: Regenerated.
16809
16810 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16811
16812 * remote-utils.c (prepare_resume_reply): Move declaration
16813 of gdb_id_from_wait to the top of the block.
16814
16815 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16816
16817 * linux-low.c (regsets_store_inferior_registers): Read the regset
16818 from the target before filling it.
16819
16820 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16821
16822 * server.c (attach_inferior): Return SIGTRAP for a successful
16823 attach.
16824
16825 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16826
16827 * Makefile.in (OBS): Add version.o.
16828 (STAGESTUFF): Delete.
16829 (version.o): Add dependencies.
16830 (version.c): Replace rule.
16831 (clean): Remove version.c.
16832 * server.c (gdbserver_version): New.
16833 (gdbserver_usage): Use printf.
16834 (main): Handle --version and --help.
16835 * server.h (version, host_name): Add declarations.
16836
16837 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16838
16839 * linux-arm-low.c:
16840 * linux-arm-low.c:
16841 * inferiors.c:
16842 * i387-fp.h:
16843 * i387-fp.c:
16844 * gdbreplay.c:
16845 * regcache.c:
16846 * proc-service.c:
16847 * mem-break.h:
16848 * mem-break.c:
16849 * linux-x86-64-low.c:
16850 * linux-sh-low.c:
16851 * linux-s390-low.c:
16852 * linux-ppc64-low.c:
16853 * linux-ppc-low.c:
16854 * linux-mips-low.c:
16855 * linux-m68k-low.c:
16856 * linux-m32r-low.c:
16857 * linux-low.h:
16858 * linux-low.c:
16859 * linux-ia64-low.c:
16860 * linux-i386-low.c:
16861 * linux-crisv32-low.c:
16862 * thread-db.c:
16863 * terminal.h:
16864 * target.h:
16865 * target.c:
16866 * server.h:
16867 * server.c:
16868 * remote-utils.c:
16869 * regcache.h:
16870 * utils.c:
16871 * Makefile.in:
16872 * configure.ac:
16873 * gdbserver.1: Add (C) after Copyright. Update the FSF
16874 address.
16875
16876 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16877
16878 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16879 (arm_breakpoint_at): Recognize both breakpoints.
16880 (the_low_target): Use the correct breakpoint instruction.
16881
16882 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16883
16884 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16885 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16886 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16887 (the_low_target): Update.
16888
16889 2005-10-25 Andreas Schwab <schwab@suse.de>
16890
16891 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16892
16893 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16894 (ia64_num_regs): Reduce to 462.
16895
16896 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * acinclude.m4: Correct quoting.
16899 * aclocal.m4: Regenerated.
16900
16901 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16902 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16903 (thread_db_init): Call thread_db_err_str.
16904 * configure.ac: Check for TD_VERSION.
16905 * config.in, configure: Regenerated.
16906
16907 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16908
16909 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16910
16911 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16912
16913 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16914 is not available. Define HAVE_PTRACE_GETREGS if it is.
16915 * config.in, configure: Regenerated.
16916 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16917 * linux-i386-low.c, linux-m68k-low.c: Update to use
16918 HAVE_PTRACE_GETREGS.
16919 * linux-low.c (regsets_fetch_inferior_registers)
16920 (regsets_store_inferior_registers): Only return 0 if we processed
16921 GENERAL_REGS.
16922 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16923 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16924
16925 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16926
16927 * inferiors.c (struct thread_info): Add gdb_id.
16928 (add_thread): Add gdb_id argument.
16929 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16930 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16931 calls to add_thread.
16932 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16933 * server.c (handle_query): Use thread_to_gdb_id.
16934 (handle_v_cont, main): Use gdb_id_to_thread_id.
16935 * server.h (add_thread): Update prototype.
16936 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16937 prototypes.
16938
16939 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16940
16941 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16942 left-padded registers.
16943 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16944 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16945
16946 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16947
16948 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16949 * configure: Regenerate.
16950 * config.in: Regenerate.
16951 * server.h (NEED_DECLARATION_STRERROR):
16952 Replace with !HAVE_DECL_STRERROR.
16953
16954 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16955
16956 * linux-low.c (linux_wait, linux_send_signal): Don't test
16957 an unsigned long variable for > 0 if it could be MAX_ULONG.
16958 * server.c (myresume): Likewise.
16959 * target.c (set_desired_inferior): Likewise.
16960
16961 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16962
16963 * configure.ac: Simplify and improve check for socklen_t.
16964 * configure, config.in: Regenerate.
16965
16966 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16967
16968 * acconfig.h: Remove.
16969 * configure.ac: Add a test for socklen_t. Use three-argument
16970 AC_DEFINE throughout.
16971 * config.in: Regenerated using autoheader 2.59.
16972 * configure: Regenerated.
16973
16974 * gdbreplay.c (socklen_t): Provide a default.
16975 (remote_open): Use socklen_t.
16976 * remote-utils.c (socklen_t): Provide a default.
16977 (remote_open): Use socklen_t.
16978 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16979 unsigned char.
16980
16981 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16982 char for buffers.
16983 * linux-low.c (linux_read_memory, linux_write_memory)
16984 (linux_read_auxv): Likewise.
16985 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16986 (check_mem_write): Likewise.
16987 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16988 Likewise.
16989 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16990 (registers_from_string, register_data): Likewise.
16991 * server.c (handle_query, main): Likewise.
16992 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16993 (decode_M_packet): Likewise.
16994 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16995 * target.h (struct target_ops): Update read_memory, write_memory,
16996 and read_auxv.
16997 (read_inferior_memory, write_inferior_memory): Update.
16998 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16999 to unsigned char *.
17000 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17001 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17002 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17003 linux-s390-low.c, linux-sh-low.c: Update for changes in
17004 read_inferior_memory and the_low_target->breakpoint.
17005
17006 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17007
17008 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17009 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17010 * configure.srv: Add powerpc64-*-linux*.
17011 * linux-ppc64-low.c: New file.
17012
17013 2005-05-23 Orjan Friberg <orjanf@axis.com>
17014
17015 * linux-cris-low.c: New file with support for CRIS.
17016 * linux-crisv32-low.c: Ditto for CRISv32.
17017 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17018 (clean): Add reg-cris.c and reg-crisv32.c.
17019 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17020 reg-crisv32.o, and reg-crisv32.c to make rules.
17021 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17022 recognized targets.
17023
17024 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17025
17026 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17027 of sizeof (PTRACE_XFER_TYPE).
17028 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17029
17030 2005-05-12 Orjan Friberg <orjanf@axis.com>
17031
17032 * target.h (struct target_ops): Add insert_watchpoint,
17033 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17034 pointers for hardware watchpoint support.
17035 * linux-low.h (struct linux_target_ops): Ditto.
17036 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17037 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17038 to linux_target_ops.
17039 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17040 reply packet.
17041 * server.c (main): Recognize 'Z' and 'z' packets.
17042
17043 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17044
17045 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17046 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17047 (the_low_target): Add new members.
17048
17049 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17050
17051 * proc-service.c (ps_lgetregs): Search all_processes instead of
17052 all_threads.
17053
17054 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17055
17056 * server.c (start_inferior): Change return type to int.
17057 (attach_inferior): Change sigptr to int *.
17058 (handle_v_cont, handle_v_requests): Change signal to int *.
17059 (main): Change signal to int.
17060
17061 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17062
17063 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17064 * configure.srv: Add m32r*-*-linux*.
17065 * linux-m32r-low.c: New file.
17066
17067 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17068
17069 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17070
17071 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17072
17073 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17074 Take unsigned long arguments for PIDs.
17075 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17076 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17077 (wait_for_sigstop, linux_resume_one_process)
17078 (regsets_fetch_inferior_registers, linux_send_signal)
17079 (linux_read_auxv): Likewise. Update the types of variables holding
17080 PIDs. Update format string specifiers.
17081 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17082 * remote-utils.c (prepare_resume_reply): Likewise.
17083 * server.c (cont_thread, general_thread, step_thread)
17084 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17085 unsigned long.
17086 (handle_query): Update format specifiers.
17087 (handle_v_cont, main): Use strtoul for thread IDs.
17088 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17089 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17090 (general_thread, step_thread, thread_from_wait)
17091 (old_thread_from_wait): Update.
17092 * target.h (struct thread_resume): Use unsigned long for THREAD.
17093 (struct target_ops): Use unsigned long for arguments to attach and
17094 thread_alive.
17095
17096 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17097
17098 * acinclude.m4: Include bfd/bfd.m4 directly.
17099 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17100 <agriffis@toolchain.org>.
17101 * aclocal.m4, configure: Regenerated.
17102
17103 2005-01-07 Andrew Cagney <cagney@gnu.org>
17104
17105 * configure.ac: Rename configure.in, require autoconf 2.59.
17106 * configure: Re-generate.
17107
17108 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17109
17110 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17111 LIBS when finished.
17112 * aclocal.m4: Regenerated.
17113 * configure: Regenerated.
17114
17115 2004-11-21 Andreas Schwab <schwab@suse.de>
17116
17117 * linux-m68k-low.c (m68k_num_gregs): Define.
17118 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17119 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17120 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17121 (m68k_breakpoint_at): New. Add to the_low_target.
17122
17123 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17124 srv_linux_thread_db to yes.
17125
17126 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17127
17128 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17129 (ARCH_SET_FS): Likewise.
17130 (ARCH_GET_FS): Likewise.
17131 (ARCH_GET_GS): Likewise.
17132
17133 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17134
17135 * linux-i386-low.c (ps_get_thread_area): New.
17136 * linux-x86-64-low.c (ps_get_thread_area): New.
17137 * linux-low.c: Include <sys/syscall.h>.
17138 (linux_kill_one_process): Don't kill the first thread here.
17139 (linux_kill): Kill the first thread here.
17140 (kill_lwp): New function.
17141 (send_sigstop, linux_send_signal): Use it.
17142 * proc-service.c: Clean up #ifdefs.
17143 (fpregset_info): Delete.
17144 (ps_lgetregs): Update and enable implementation.
17145 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17146 implementations.
17147 * remote-utils.c (struct sym_cache, symbol_cache): New.
17148 (input_interrupt): Print a clearer message.
17149 (async_io_enabled): New variable.
17150 (enable_async_io, disable_async_io): Use it. Update comments.
17151 (look_up_one_symbol): Use the symbol cache.
17152 * thread-db.c (thread_db_look_up_symbols): New function.
17153 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17154
17155 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17156
17157 * configure.in: Test for -rdynamic.
17158 * configure: Regenerated.
17159 * Makefile (INTERNAL_LDFLAGS): New.
17160 (gdbserver, gdbreplay): Use it.
17161
17162 2004-09-02 Andrew Cagney <cagney@gnu.org>
17163
17164 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17165
17166 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17167
17168 * linux-low.c (linux_wait): Clear all_processes list also.
17169
17170 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17171
17172 * linux-low.c: Include <errno.h>. Remove extern declaration of
17173 errno.
17174
17175 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17176
17177 * gdbreplay.c, server.h, utils.c: Update copyright years.
17178
17179 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17180
17181 * server.c (main): Print child status or termination signal from
17182 variable 'signal', not 'sig'.
17183
17184 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17185
17186 * linux-low.c (linux_read_memory): Change return type to
17187 int. Check for and return error from ptrace().
17188 * target.c (read_inferior_memory): Change return type to int. Pass
17189 back return status from the_target->read_memory().
17190 * target.h (struct target_ops): Adapt *read_memory() prototype.
17191 Update comment.
17192 (read_inferior_memory): Adapt prototype.
17193 * server.c (main): Return an error packet if
17194 read_inferior_memory() returns an error.
17195
17196 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17197
17198 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17199 Unify with other clean targets.
17200
17201 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17202
17203 * server.c (handle_v_cont): Call set_desired_inferior.
17204
17205 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17206
17207 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17208
17209 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17210
17211 * linux-low.c (linux_wait): Unblock async I/O.
17212 (linux_resume): Block and enable async I/O.
17213 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17214 * server.h (block_async_io, unblock_async_io): Add prototypes.
17215
17216 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17217
17218 * remote-utils.c (remote_open): Print a status notice after
17219 opening a TCP port.
17220 * server.c (attach_inferior): Print a status notice after
17221 attaching.
17222
17223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17224
17225 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17226
17227 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17228
17229 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17230 error packet.
17231 * server.c, target.h: Update copyright years.
17232
17233 2004-02-25 Roland McGrath <roland@redhat.com>
17234
17235 * target.h (struct target_ops): New member `read_auxv'.
17236 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17237 * linux-low.c (linux_read_auxv): New function.
17238 (linux_target_ops): Initialize `read_auxv' member to that.
17239
17240 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17241
17242 Committed by Jim Blandy <jimb@redhat.com>.
17243
17244 * linux-s390-low.c (s390_num_regs): Update.
17245 (s390_regmap): Remove control registers. Use __s390x__ predefine
17246 instead of GPR_SIZE to distiguish s390 and s390x targets.
17247
17248 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17249
17250 * linux-low.c: Update copyright year.
17251 (check_removed_breakpoint): Clear pending_is_breakpoint.
17252 (linux_set_resume_request, linux_queue_one_thread)
17253 (resume_status_pending_p): New functions.
17254 (linux_continue_one_thread): Use process->resume.
17255 (linux_resume): Only resume threads if there are no pending events.
17256 * linux-low.h (struct process_info): Add resume request
17257 pointer.
17258
17259 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17260
17261 * regcache.c (new_register_cache): Clear the allocated register
17262 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17263
17264 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17265
17266 * linux-low.c (linux_resume): Take a struct thread_resume *
17267 argument.
17268 (linux_wait): Update call.
17269 (resume_ptr): New static variable.
17270 (linux_continue_one_thread): Renamed from
17271 linux_continue_one_process. Use resume_ptr.
17272 (linux_resume): Use linux_continue_one_thread.
17273 * server.c (handle_v_cont, handle_v_requests): New functions.
17274 (myresume): New function.
17275 (main): Handle 'v' case.
17276 * target.h (struct thread_resume): New type.
17277 (struct target_ops): Change argument of "resume" to struct
17278 thread_resume *.
17279 (myresume): Delete macro.
17280
17281 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17282
17283 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17284 (uninstall): Support DESTDIR.
17285
17286 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17287
17288 * configure.srv: Add xscale*linux copy of arm*linux entry.
17289
17290 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17291
17292 * linux-arm-low.c (arm_reinsert_addr): New function.
17293 (the_low_target): Add arm_reinsert_addr.
17294
17295 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17296
17297 * mem-break.c: Remove whitespace at end of file.
17298
17299 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17300
17301 * configure.in: Check whether we need to prototype strerror.
17302 * server.h: Optionally prototype strerror.
17303 * gdbreplay.c (perror_with_name): Use strerror.
17304 * linux-low.c (linux_attach_lwp): Use strerror.
17305 * utils.c (perror_with_name): Use strerror.
17306 * config.in, configure: Regenerated.
17307
17308 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17311 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17312
17313 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17314
17315 * Makefile.in (SFILES): Update.
17316 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17317 low-sun3.c: Remove files.
17318
17319 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17320
17321 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17322 (linux_detach_one_process, linux_detach): New functions.
17323 (linux_target_ops): Add linux_detach.
17324 * server.c (main): Handle 'D' packet.
17325 * target.h (struct target_ops): Add "detach" member.
17326 (detach_inferior): Define.
17327
17328 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17329
17330 From Kelley Cook <kelleycook@wideopenwest.com>:
17331 * configure.srv: Accept i[34567]86 variants.
17332
17333 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17334
17335 * linux-low.c (linux_wait_for_event): Correct comment typos.
17336 (linux_resume_one_process): Call check_removed_breakpoint.
17337 (linux_send_signal): New function.
17338 (linux_target_ops): Add linux_send_signal.
17339 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17340 of kill.
17341 * target.h (struct target_ops): Add send_signal.
17342
17343 2003-05-29 Jim Blandy <jimb@redhat.com>
17344
17345 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17346 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17347 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17348 away part of the register's value.
17349
17350 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17351
17352 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17353 (linux_wait_for_event, linux_init_signals): Likewise.
17354
17355 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17356
17357 * configure.in: Check for stdlib.h.
17358 * configure: Regenerated.
17359 * config.in: Regenerated.
17360
17361 2003-01-04 Andreas Schwab <schwab@suse.de>
17362
17363 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17364
17365 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17366
17367 * Makefile.in: Remove obsolete code.
17368
17369 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17370
17371 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17372 defined(PT_FPR0_HI).
17373
17374 2002-11-17 Stuart Hughes <seh@zee2.com>
17375
17376 * linux-arm-low.c (arm_num_regs): Increase.
17377 (arm_regmap): Include status register.
17378
17379 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17380
17381 * linux-low.c (register_addr): Remove incorrect -1 check.
17382
17383 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17384
17385 * linux-low.c (linux_create_inferior): Call setpgid. Return
17386 the new PID.
17387 (unstopped_p, linux_signal_pid): Remove.
17388 (linux_target_ops): Remove linux_signal_pid.
17389 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17390 global instead of target method.
17391 * target.h (struct target_ops): Remove signal_pid. Update comment
17392 for create_inferior.
17393 * server.c (signal_pid): New variable.
17394 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17395 gdbserver. Set the child to be the foreground process group.
17396 (attach_inferior): Set signal_pid.
17397
17398 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17399
17400 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17401
17402 2002-08-20 Jim Blandy <jimb@redhat.com>
17403
17404 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17405 default for this.
17406
17407 2002-08-01 Andrew Cagney <cagney@redhat.com>
17408
17409 * Makefile.in: Make chill references obsolete.
17410
17411 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17412
17413 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17414 * configure: Regenerate.
17415 * config.in: Regenerate.
17416
17417 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17418
17419 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17420 (perror_with_name, remote_close, remote_open, expect, play): Static.
17421
17422 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17423
17424 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17425 byte offsets instead of an array of indexes.
17426 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17427
17428 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17429
17430 * regcache.c: Add comment.
17431
17432 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17433
17434 * thread-db.c: New file.
17435 * proc-service.c: New file.
17436 * acinclude.m4: New file.
17437 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17438 proc-service.o, and thread-db.o.
17439 (linux-low.o): Add USE_THREAD_DB.
17440 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17441 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17442 * aclocal.m4: Regenerated.
17443 * config.in: Regenerated.
17444 * configure: Regenerated.
17445 * configure.in: Check for proc_service.h, sys/procfs.h,
17446 thread_db.h, and linux/elf.h headrs.
17447 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17448 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17449 Check for -lthread_db and thread support.
17450 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17451 PowerPC, and SuperH.
17452 * i387-fp.c: Constify arguments.
17453 * i387-fp.h: Likewise.
17454 * inferiors.c: (struct thread_info): Renamed from
17455 `struct inferior_info'. Remove PID member. Use generic inferior
17456 list header. All uses updated.
17457 (inferiors, signal_pid): Removed.
17458 (all_threads): New variable.
17459 (get_thread): Define.
17460 (add_inferior_to_list): New function.
17461 (for_each_inferior): New function.
17462 (change_inferior_id): New function.
17463 (add_inferior): Removed.
17464 (remove_inferior): New function.
17465 (add_thread): New function.
17466 (free_one_thread): New function.
17467 (remove_thread): New function.
17468 (clear_inferiors): Use for_each_inferior and free_one_thread.
17469 (find_inferior): New function.
17470 (find_inferior_id): New function.
17471 (inferior_target_data): Update argument type.
17472 (set_inferior_target_data): Likewise.
17473 (inferior_regcache_data): Likewise.
17474 (set_inferior_regcache_data): Likewise.
17475 * linux-low.c (linux_bp_reinsert): Remove.
17476 (all_processes, stopping_threads, using_thrads)
17477 (struct pending_signals, debug_threads, pid_of): New.
17478 (inferior_pid): Replace with macro.
17479 (struct inferior_linux_data): Remove.
17480 (get_stop_pc, add_process): New functions.
17481 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17482 Use add_process and add_thread.
17483 (linux_attach_lwp): New function, based on old linux_attach. Use
17484 add_process and add_thread. Set stop_expected for new threads.
17485 (linux_attach): New function.
17486 (linux_kill_one_process): New function.
17487 (linux_kill): Kill all LWPs.
17488 (linux_thread_alive): Use find_inferior_id.
17489 (check_removed_breakpoints, status_pending_p): New functions.
17490 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17491 Update. Use WNOHANG. Wait for cloned processes also. Update process
17492 struct for the found process.
17493 (linux_wait_for_event): New function.
17494 (linux_wait): Use it. Support LWPs.
17495 (send_sigstop, wait_for_sigstop, stop_all_processes)
17496 (linux_resume_one_process, linux_continue_one_process): New functions.
17497 (linux_resume): Support LWPs.
17498 (REGISTER_RAW_SIZE): Remove.
17499 (fetch_register): Use register_size instead. Call supply_register.
17500 (usr_store_inferior_registers): Likewise. Call collect_register.
17501 Fix recursive case.
17502 (regsets_fetch_inferior_registers): Improve error message.
17503 (regsets_store_inferior_registers): Add debugging.
17504 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17505 (unstopped_p, linux_signal_pid): New functions.
17506 (linux_target_ops): Add linux_signal_pid.
17507 (linux_init_signals): New function.
17508 (initialize_low): Call it. Initialize using_threads.
17509 * regcache.c (inferior_regcache_data): Add valid
17510 flag.
17511 (get_regcache): Fetch registers lazily. Add fetch argument
17512 and update all callers.
17513 (regcache_invalidate_one, regcache_invalidate): New
17514 functions.
17515 (new_register_cache): Renamed from create_register_cache.
17516 Return the new regcache.
17517 (free_register_cache): Change argument to a void *.
17518 (registers_to_string, registers_from_string): Call get_regcache
17519 with fetch flag set.
17520 (register_data): Make static. Pass fetch flag to get_regcache.
17521 (supply_register): Call get_regcache with fetch flag clear.
17522 (collect_register): Call get_regcache with fetch flag set.
17523 (collect_register_as_string): New function.
17524 * regcache.h: Update.
17525 * remote-utils.c (putpkt): Flush after debug output and use
17526 stderr.
17527 Handle input interrupts while waiting for an ACK.
17528 (input_interrupt): Use signal_pid method.
17529 (getpkt): Flush after debug output and use stderr.
17530 (outreg): Use collect_register_as_string.
17531 (new_thread_notify, dead_thread_notify): New functions.
17532 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17533 and general_thread.
17534 (look_up_one_symbol): Flush after debug output.
17535 * server.c (step_thread, server_waiting): New variables.
17536 (start_inferior): Don't use signal_pid. Update call to mywait.
17537 (attach_inferior): Update call to mywait.
17538 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17539 (main): Don't fetch/store registers explicitly. Use
17540 set_desired_inferior. Support proposed ``Hs'' packet. Update
17541 calls to mywait.
17542 * server.h: Update.
17543 (struct inferior_list, struct_inferior_list_entry): New.
17544 * target.c (set_desired_inferior): New.
17545 (write_inferior_memory): Constify.
17546 (mywait): New function.
17547 * target.h: Update.
17548 (struct target_ops): New signal_pid method.
17549 (mywait): Removed macro, added prototype.
17550
17551 * linux-low.h (regset_func): Removed.
17552 (regset_fill_func, regset_store_func): New.
17553 (enum regset_type): New.
17554 (struct regset_info): Add type field. Use new operation types.
17555 (struct linux_target_ops): stop_pc renamed to get_pc.
17556 Add decr_pc_after_break and breakpoint_at.
17557 (get_process, get_thread_proess, get_process_thread)
17558 (strut process_info, all_processes, linux_attach_lwp)
17559 (thread_db_init): New.
17560
17561 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17562 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17563 (the_low_target): Add new members.
17564 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17565 (i386_store_fpxregset): Constify.
17566 (target_regsets): Add new kind identifier.
17567 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17568 (i386_set_pc): Add debugging.
17569 (i386_breakpoint_at): New function.
17570 (the_low_target): Add new members.
17571 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17572 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17573 (mips_breakpoint_at): New.
17574 (the_low_target): Add new members.
17575 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17576 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17577 (the_low_target): Add new members.
17578 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17579 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17580 (the_low_target): Add new members.
17581 * linux-x86-64-low.c (target_regsets): Add new kind
17582 identifier.
17583
17584 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17585
17586 From Martin Pool <mbp@samba.org>:
17587 * server.c (gdbserver_usage): New function.
17588 (main): Call it.
17589
17590 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17591
17592 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17593 stop_at -> stop_pc.
17594
17595 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17596
17597 * Makefile.in: Remove obsolete code.
17598
17599 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17600
17601 * linux-low.c (regsets_fetch_inferior_registers),
17602 (regsets_store_inferior_registers): Removed cast to int from
17603 ptrace() calls.
17604 * regcache.h: Added declaration of struct inferior_info.
17605
17606 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17607
17608 * inferiors.c (struct inferior_info): Add regcache_data.
17609 (add_inferior): Call create_register_cache.
17610 (clear_inferiors): Call free_register_cache.
17611 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17612 * regcache.c (struct inferior_regcache_data): New.
17613 (registers): Remove.
17614 (get_regcache): New function.
17615 (create_register_cache, free_register_cache): New functions.
17616 (set_register_cache): Don't initialize the register cache here.
17617 (registers_to_string, registers_from_string, register_data): Call
17618 get_regcache.
17619 * regcache.h: Add prototypes.
17620 * server.h: Likewise.
17621
17622 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17623
17624 * mem-break.c: New file.
17625 * mem-break.h: New file.
17626 * Makefile.in: Add mem-break.o rule; update server.h
17627 dependencies.
17628 * inferiors.c (struct inferior_info): Add target_data
17629 member.
17630 (clear_inferiors): Free target_data member if set.
17631 (inferior_target_data, set_inferior_target_data): New functions.
17632 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17633 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17634 * linux-low.c (linux_bp_reinsert): New variable.
17635 (struct inferior_linux_data): New.
17636 (linux_create_inferior): Use set_inferior_target_data.
17637 (linux_attach): Likewise. Call add_inferior.
17638 (linux_wait_for_one_inferior): New function.
17639 (linux_wait): Call it.
17640 (linux_write_memory): Add const.
17641 (initialize_low): Call set_breakpoint_data.
17642 * linux-low.h (struct linux_target_ops): Add breakpoint
17643 handling members.
17644 * server.c (attach_inferior): Remove extra add_inferior
17645 call.
17646 * server.h: Include mem-break.h. Update inferior.c
17647 prototypes.
17648 * target.c (read_inferior_memory)
17649 (write_inferior_memory): New functions.
17650 * target.h (read_inferior_memory)
17651 (write_inferior_memory): Change macros to prototypes.
17652 (struct target_ops): Update comments. Add const to write_memory
17653 definition.
17654
17655 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17656
17657 * linux-low.c (usr_store_inferior_registers): Support
17658 registers which are allowed to fail to store.
17659 * linux-low.h (linux_target_ops): Likewise.
17660 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17661 (ppc_cannot_store_register): FPSCR may not be storable.
17662
17663 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17664
17665 * server.h: Include <string.h> if HAVE_STRING_H.
17666 * ChangeLog: Correct paths in last ChangeLog entry.
17667
17668 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17669
17670 * linux-low.h: Remove obsolete prototypes.
17671 (struct linux_target_ops): New.
17672 (extern the_low_target): New.
17673 * linux-low.c (num_regs, regmap): Remove declarations.
17674 (register_addr): Use the_low_target explicitly.
17675 (fetch_register): Likewise.
17676 (usr_fetch_inferior_registers): Likewise.
17677 (usr_store_inferior_registers): Likewise.
17678 * linux-arm-low.c (num_regs): Remove.
17679 (arm_num_regs): Define.
17680 (arm_regmap): Renamed from regmap, made static.
17681 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17682 made static.
17683 (arm_cannot_store_register): Renamed from cannot_store_register,
17684 made static.
17685 (the_low_target): New.
17686 * linux-i386-low.c (num_regs): Remove.
17687 (i386_num_regs): Define.
17688 (i386_regmap): Renamed from regmap, made static.
17689 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17690 made static.
17691 (i386_cannot_store_register): Renamed from cannot_store_register,
17692 made static.
17693 (the_low_target): New.
17694 * linux-ia64-low.c (num_regs): Remove.
17695 (ia64_num_regs): Define.
17696 (ia64_regmap): Renamed from regmap, made static.
17697 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17698 made static.
17699 (ia64_cannot_store_register): Renamed from cannot_store_register,
17700 made static.
17701 (the_low_target): New.
17702 * linux-m68k-low.c (num_regs): Remove.
17703 (m68k_num_regs): Define.
17704 (m68k_regmap): Renamed from regmap, made static.
17705 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17706 made static.
17707 (m68k_cannot_store_register): Renamed from cannot_store_register,
17708 made static.
17709 (the_low_target): New.
17710 * linux-mips-low.c (num_regs): Remove.
17711 (mips_num_regs): Define.
17712 (mips_regmap): Renamed from regmap, made static.
17713 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17714 made static.
17715 (mips_cannot_store_register): Renamed from cannot_store_register,
17716 made static.
17717 (the_low_target): New.
17718 * linux-ppc-low.c (num_regs): Remove.
17719 (ppc_num_regs): Define.
17720 (ppc_regmap): Renamed from regmap, made static.
17721 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17722 made static.
17723 (ppc_cannot_store_register): Renamed from cannot_store_register,
17724 made static.
17725 (the_low_target): New.
17726 * linux-s390-low.c (num_regs): Remove.
17727 (s390_num_regs): Define.
17728 (s390_regmap): Renamed from regmap, made static.
17729 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17730 made static.
17731 (s390_cannot_store_register): Renamed from cannot_store_register,
17732 made static.
17733 (the_low_target): New.
17734 * linux-sh-low.c (num_regs): Remove.
17735 (sh_num_regs): Define.
17736 (sh_regmap): Renamed from regmap, made static.
17737 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17738 made static.
17739 (sh_cannot_store_register): Renamed from cannot_store_register,
17740 made static.
17741 (the_low_target): New.
17742 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17743 (the_low_target): New.
17744
17745 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17746
17747 * Makefile.in: Add stamp-h target.
17748 * configure.in: Create stamp-h.
17749 * configure: Regenerated.
17750
17751 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17752
17753 * inferiors.c: New file.
17754 * target.c: New file.
17755 * target.h: New file.
17756 * Makefile.in: Add target.o and inferiors.o. Update
17757 dependencies.
17758 * linux-low.c (inferior_pid): New static variable,
17759 moved from server.c.
17760 (linux_create_inferior): Renamed from create_inferior.
17761 Call add_inferior. Return 0 on success instead of a PID.
17762 (linux_attach): Renamed from myattach.
17763 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17764 (linux_thread_alive): Renamed from mythread_alive.
17765 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17766 child dies.
17767 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17768 (regsets_store_inferior_registers): Correct error message.
17769 Add missing ``return 0''.
17770 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17771 (linux_store_registers): Renamed from store_inferior_registers.
17772 (linux_read_memory): Renamed from read_inferior_memory.
17773 (linux_write_memory): Renamed from write_inferior_memory.
17774 (linux_target_ops): New structure.
17775 (initialize_low): Call set_target_ops ().
17776 * remote-utils.c (unhexify): New function.
17777 (hexify): New function.
17778 (input_interrupt): Send signals to ``signal_pid''.
17779 * server.c (inferior_pid): Remove.
17780 (start_inferior): Update create_inferior call.
17781 (attach_inferior): Call add_inferior.
17782 (handle_query): New function.
17783 (main): Call handle_query for `q' packets.
17784 * server.h: Include "target.h". Remove obsolete prototypes.
17785 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17786
17787 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17788
17789 * Makefile.in: Add WARN_CFLAGS. Update configury
17790 dependencies.
17791 * configure.in: Check for <string.h>
17792 * configure: Regenerate.
17793 * config.in: Regenerate.
17794 * gdbreplay.c: Include needed system headers.
17795 (remote_open): Remove strchr prototype.
17796 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17797 * regcache.c (supply_register): Change buf argument to const void *.
17798 (supply_register_by_name): Likewise.
17799 (collect_register): Change buf argument to void *.
17800 (collect_register_by_name): Likewise.
17801 * regcache.h: Add missing prototypes.
17802 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17803 * server.c (handle_query): New function.
17804 (attached): New static variable, moved out of main.
17805 (main): Quiet longjmp clobber warnings.
17806 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17807 * utils.c (error): Remove NORETURN.
17808 (fatal): Likewise.
This page took 0.407927 seconds and 4 git commands to generate.