36dece61723c10cccc8d6ce6c31eaa28cf8f17d6
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2
3 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
5 * config.in: Regenerate.
6 * configure: Regenerate.
7 * configure.ac: Don't check for strerror.
8 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
9 Call safe_strerror instead of strerror.
10 * server.h (strerror): Remove this now-unnecessary declaration.
11 * tracepoint.c (init_named_socket): Call safe_strerror instead of
12 strerror.
13 (gdb_agent_helper_thread): Likewise.
14 * utils.c (perror_with_name): Likewise.
15
16 2019-11-26 Tom Tromey <tom@tromey.com>
17
18 * configure, config.in: Rebuild.
19
20 2019-11-26 Tom Tromey <tom@tromey.com>
21
22 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
23 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
24 gdb_sigmask.
25 * configure, config.in: Rebuild.
26
27 2019-11-26 Tom Tromey <tom@tromey.com>
28
29 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
30 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
31 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
32 * acinclude.m4: Include ax_pthread.m4.
33 * config.in, configure: Rebuild.
34
35 2019-11-26 Christian Biesinger <cbiesinger@google.com>
36
37 * debug.c (debug_set_output): Call safe_strerror instead of
38 strerror.
39 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
40 (linux_kill_one_lwp): Likewise.
41 (linux_detach_one_lwp): Likewise.
42 (linux_wait_for_event_filtered): Likewise.
43 (store_register): Likewise.
44 * lynx-low.c (lynx_attach): Likewise.
45 * mem-break.c (insert_memory_breakpoint): Likewise.
46 (remove_memory_breakpoint): Likewise.
47 (delete_fast_tracepoint_jump): Likewise.
48 (set_fast_tracepoint_jump): Likewise.
49 (uninsert_fast_tracepoint_jumps_at): Likewise.
50 (reinsert_fast_tracepoint_jumps_at): Likewise.
51 * nto-low.c (nto_xfer_memory): Likewise.
52 (nto_resume): Likewise.
53
54 2019-11-20 Luis Machado <luis.machado@linaro.org>
55
56 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
57 instead of register count.
58 * tdesc.c (tdesc_contains_feature): New function.
59 * tdesc.h (tdesc_contains_feature): New prototype.
60
61 2019-11-15 Christian Biesinger <cbiesinger@google.com>
62
63 * Makefile.in: Add safe-strerror.c.
64 * configure: Regenerate.
65 * configure.ac: Don't source common.host.
66
67 2019-11-15 Christian Biesinger <cbiesinger@google.com>
68
69 * config.in: Regenerate.
70 * configure: Regenerate.
71
72 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
73
74 * ax.c (ax_printf): Handle size_t_arg.
75
76 2019-11-06 Christian Biesinger <cbiesinger@google.com>
77
78 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
79 * mi/mi-main.c (output_cores): Likewise.
80 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
81 (linux_xfer_osdata_modules): Likewise.
82 * remote.c (register_remote_support_xml): Likewise.
83 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
84 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
85
86 2019-11-01 Christian Biesinger <cbiesinger@google.com>
87
88 * configure: Regenerate.
89 * configure.ac: Remove check for strerror_r.
90
91 2019-10-31 Christian Biesinger <cbiesinger@google.com>
92
93 * config.in: Regenerate.
94 * configure: Regenerate.
95 * configure.ac: Also check for strerror_r.
96
97 2019-10-31 Christian Biesinger <cbiesinger@google.com>
98
99 * ax.h (debug_agent): Remove duplicate declaration.
100
101 2019-10-26 Tom de Vries <tdevries@suse.de>
102
103 * linux-aarch64-low.c: Fix typos in comments.
104 * linux-arm-low.c: Same.
105 * linux-low.c: Same.
106 * linux-ppc-low.c: Same.
107 * proc-service.c: Same.
108 * regcache.h: Same.
109 * server.c: Same.
110 * tracepoint.c: Same.
111 * win32-low.c: Same.
112
113 2019-10-25 Tom Tromey <tromey@adacore.com>
114
115 * utils.c (xstrdup): Remove.
116
117 2019-10-23 Tom Tromey <tom@tromey.com>
118
119 * configure, config.in: Rebuild.
120
121 2019-10-23 Tom Tromey <tom@tromey.com>
122
123 * configure: Rebuild.
124 * acinclude.m4: Use m4_include, not sinclude.
125
126 2019-10-17 Tom Tromey <tromey@adacore.com>
127
128 * configure: Rebuild.
129 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
130 in AC_CONFIG_FILES invocation.
131 * Makefile.in (stamp-h, Makefile): Use new-style config.status
132 invocation.
133
134 2019-10-16 Christian Biesinger <cbiesinger@google.com>
135
136 * server.c: Include xml-builtin.h.
137 (get_xml_features): Don't declare xml_builtins here.
138
139 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
140
141 * Makefile.in: Remove references to vec-ipa.o.
142
143 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
144
145 * Makefile.in: Remove references to vec.c.
146
147 2019-10-02 Christian Biesinger <cbiesinger@google.com>
148
149 * server.c (server_waiting): Change to bool.
150 (extended_protocol): Likewise.
151 (response_needed): Likewise.
152 (exit_requested): Likewise.
153 (run_once): Likewise.
154 (report_no_resumed): Likewise.
155 (non_stop): Likewise.
156 (disable_packet_vCont): Likewise.
157 (disable_packet_Tthread): Likewise.
158 (disable_packet_qC): Likewise.
159 (disable_packet_qfThreadInfo): Likewise.
160 (handle_general_set): Update.
161 (handle_detach): Update.
162 (handle_monitor_command): Update.
163 (handle_query): Update.
164 (captured_main): Update.
165 (process_serial_event): Update.
166 * server.h (server_waiting): Change to bool.
167 (disable_packet_vCont): Likewise.
168 (disable_packet_Tthread): Likewise.
169 (disable_packet_qC): Likewise.
170 (disable_packet_qfThreadInfo): Likewise.
171 (run_once): Likewise.
172 (non_stop): Likewise.
173 * target.c (target_stop_and_wait): Update.
174
175 2019-10-02 Tom Tromey <tromey@adacore.com>
176
177 * Makefile.in (SFILES): Add common-inferior.c.
178 (OBS): Add common-inferior.o.
179 * server.c (startup_with_shell): Don't define.
180
181 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
182
183 * linux-low.c (linux_low_read_btrace): Update for change to
184 std::vector.
185
186 2019-09-20 Christian Biesinger <cbiesinger@google.com>
187
188 * debug.c (debug_threads): Remove comment in favor of the header.
189 * debug.h (using_threads): Add declaration.
190 (debug_threads): Add comment.
191 * linux-aarch64-low.c: Include debug.h and remove declaration of
192 debug_threads.
193 * nto-low.c: Likewise.
194 * remote-utils.c: Likewise.
195 * thread-db.c: Likewise.
196
197 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
198
199 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
200 and powerpc-cell64l-ipa.o.
201 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
202 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
203 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
204 (spu*-*-*): Remove.
205
206 * spu-low.c: Remove file.
207
208 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
209 (parse_spufs_run): Remove.
210 (ppc_get_pc): Remove Cell/B.E. support.
211 (ppc_set_pc): Likewise.
212 (ppc_breakpoint_at): Likewise.
213 (ppc_arch_setup): Likewise.
214 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
215 tdesc_powerpc_cell32l.
216 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
217 or init_registers_powerpc_cell32l.
218 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
219 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
220 or init_registers_powerpc_cell32l.
221 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
222 (init_registers_powerpc_cell32l): Remove prototype.
223 (init_registers_powerpc_cell64l): Likewise.
224
225 * target.h (struct target_ops): Remove qxfer_spu member.
226 * server.c (handle_qxfer_spu): Remove.
227 (qxfer_packets): Remove entry for "spu".
228 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
229 * linux-low.c (SPUFS_MAGIC): Remove.
230 (spu_enumerate_spu_ids): Remove.
231 (linux_qxfer_spu): Remove.
232 (linux_target_ops): Remove qxfer_spu member.
233 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
234 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
235 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
236
237 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
238
239 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
240 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
241 * config.in: Regenerate.
242 * configure: Regenerate.
243
244 2019-08-15 Tom Tromey <tromey@adacore.com>
245
246 * target.c (target_write_memory): Use gdb::byte_vector.
247
248 2019-08-15 Tom Tromey <tromey@adacore.com>
249
250 * tracepoint.c (write_inferior_data_pointer)
251 (write_inferior_integer, write_inferior_int8)
252 (write_inferior_uinteger, m_tracepoint_action_download)
253 (r_tracepoint_action_download, x_tracepoint_action_download)
254 (l_tracepoint_action_download, clear_inferior_trace_buffer)
255 (download_agent_expr, download_tracepoint_1)
256 (download_trace_state_variables, upload_fast_traceframes): Update.
257 * server.c (gdb_write_memory): Update.
258 * remote-utils.c (relocate_instruction): Update.
259 * proc-service.c (ps_pdwrite): Update.
260 * mem-break.c (remove_memory_breakpoint)
261 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
262 (uninsert_fast_tracepoint_jumps_at)
263 (reinsert_fast_tracepoint_jumps_at): Update.
264 * linux-x86-low.c (append_insns)
265 (i386_install_fast_tracepoint_jump_pad)
266 (amd64_write_goto_address, i386_write_goto_address): Update.
267 * linux-s390-low.c (append_insns, s390_write_goto_address):
268 Update.
269 * linux-ppc-low.c (ppc_relocate_instruction)
270 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
271 (ppc_write_goto_address): Update.
272 * linux-aarch64-low.c (append_insns): Update.
273 * target.h (struct target_ops): Update.
274 (write_inferior_memory): Don't declare.
275 * target.c (target_write_memory): Rename from
276 write_inferior_memory. Remove old target_write_memory.
277
278 2019-08-15 Tom Tromey <tromey@adacore.com>
279
280 * target.c (write_inferior_memory): Use std::vector.
281
282 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
283
284 PR build/24886
285 * configure.ac: Drop enable-libmcheck support.
286 * configure, config.in: Rebuild.
287 * acinclude.m4: Don't include it.
288
289 2019-07-19 Alan Hayward <alan.hayward@arm.com>
290
291 * configure.srv: Remove Arm xml files.
292
293 2019-07-19 Alan Hayward <alan.hayward@arm.com>
294
295 * configure.srv: Add new files. Remove xml generated files.
296 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
297 registers.
298 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
299 * linux-aarch32-tdesc.c: New file.
300 * linux-aarch32-tdesc.h: New file.
301 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
302 * linux-arm-low.c (init_registers_arm, tdesc_arm)
303 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
304 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
305 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
306 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
307 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
308 (arm_read_description): Call arm_linux_read_description.
309 (initialize_low_arch): Don't init registers.
310 * linux-arm-tdesc.c: New file.
311 * linux-arm-tdesc.h: New file.
312
313 2019-07-10 Alan Hayward <alan.hayward@arm.com>
314
315 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
316 Move counter inside for.
317 (arm_read_description): Check ptrace earlier.
318 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
319
320 2019-07-09 Tom Tromey <tom@tromey.com>
321
322 * configure: Rebuild.
323 * configure.ac: Change common to gdbsupport.
324 * acinclude.m4: Change common to gdbsupport.
325 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
326 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
327 common to gdbsupport.
328 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
329 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
330 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
331 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
332 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
333 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
334 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
335 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
336 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
337 common to gdbsupport.
338
339 2019-07-04 Alan Hayward <alan.hayward@arm.com>
340
341 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
342 defines.
343 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
344
345 2019-07-04 Alan Hayward <alan.hayward@arm.com>
346
347 * configure.srv: Remove legacy xml.
348 * linux-aarch64-low.c (initialize_low_arch): Remove
349 initialize_low_tdesc call.
350 * linux-aarch64-tdesc-selftest.c: Remove file.
351 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
352 * linux-x86-low.c (initialize_low_arch): Remove
353 initialize_low_tdesc call.
354 * linux-x86-tdesc-selftest.c: Remove file.
355 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
356
357 2019-06-20 Tom de Vries <tdevries@suse.de>
358
359 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
360 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
361
362 2019-06-19 Tom de Vries <tdevries@suse.de>
363
364 * debug.h (debug_write): Change return type to ssize_t.
365 * debug.c (debug_write): Same.
366
367 2019-06-14 Tom Tromey <tom@tromey.com>
368
369 * configure.ac: Use new path to gnulib.
370 * configure: Rebuild.
371 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
372 to gnulib.
373
374 2019-06-11 Tom Tromey <tom@tromey.com>
375
376 * Makefile.in (SFILES): Add alloc.c.
377 (OBS): Add alloc.o.
378 (IPA_OBJS): Add alloc-ipa.o.
379 (alloc-ipa.o): New target.
380 (%.o: ../%.c): New pattern rule.
381
382 2019-06-10 Tom Tromey <tromey@adacore.com>
383
384 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
385 end warning with a newline.
386 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
387 newline.
388 * thread-db.c (attach_thread): Don't end warning with a newline.
389 (thread_db_notice_clone): Likewise.
390 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
391 newline.
392 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
393 end warning with a newline.
394
395 2019-06-04 Pedro Alves <palves@redhat.com>
396
397 * server.c (captured_main): Use make_unique_xstrdup.
398
399 2019-06-02 Tom Tromey <tom@tromey.com>
400
401 * gdbreplay.c (fromhex): Remove.
402 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
403
404 2019-05-29 Tom Tromey <tromey@adacore.com>
405
406 * configure: Rebuild.
407
408 2019-05-06 Kevin Buettner <kevinb@redhat.com>
409
410 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
411 sign extension code on 32-bit builds.
412
413 2019-05-03 Eli Zaretskii <eliz@gnu.org>
414
415 * remote-utils.c:
416 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
417
418 2019-04-19 Tom Tromey <tom@tromey.com>
419
420 * server.c (struct vstop_notif): Derive from notif_event.
421 <base>: Remove.
422 (queue_stop_reply): Update.
423 (remove_all_on_match_ptid): Change type. Rewrite.
424 (discard_queued_stop_replies): Rewrite.
425 (in_queued_stop_replies_ptid): Change type.
426 (in_queued_stop_replies): Rewrite.
427 (notif_stop): Update.
428 (queue_stop_reply_callback): Update.
429 (captured_main): Don't call initialize_notif.
430 (push_stop_notification): Update.
431 * notif.c (notif_write_event, handle_notif_ack)
432 (notif_event_enque, notif_push): Update.
433 (notif_event_xfree, initialize_notif): Remove.
434 * notif.h (struct notif_event): Include <list>, not
435 "common/queue.h".
436 (struct notif_server) <queue>: Now a std::list.
437 (notif_event_p): Remove typedef.
438 (initialize_notif): Don't declare.
439 (struct notif_event): Add virtual destructor.
440
441 2019-04-17 Alan Hayward <alan.hayward@arm.com>
442
443 * ax.c (ax_vdebug): Call debug_printf.
444 * debug.c (debug_write): New function.
445 * debug.h (debug_write): New declaration.
446 * linux-low.c (sigchld_handler): Call debug_write.
447
448 2019-04-17 Alan Hayward <alan.hayward@arm.com>
449
450 * debug.c (debug_set_output): New function.
451 (debug_vprintf): Send output to debug_file.
452 (debug_flush): Likewise.
453 * debug.h (debug_set_output): New declaration.
454 * server.c (handle_monitor_command): Add debug-file option.
455 (captured_main): Likewise.
456
457 2019-04-17 Alan Hayward <alan.hayward@arm.com>
458
459 * debug.c (remote_debug): Add definition.
460 * debug.h (remote_debug): Add declaration.
461 * hostio.c (remote_debug): Remove declaration.
462 * remote-utils.c (struct ui_file): Likewise.
463 (remote_debug): Likewise.
464 * remote-utils.h (remote_debug): Likewise,
465 * server.c (remote_debug): Remove definition.
466
467 2019-04-10 Kevin Buettner <kevinb@redhat.com>
468
469 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
470 when using a 64-bit gdbserver.
471
472 2019-04-09 Tom Tromey <tromey@adacore.com>
473
474 * linux-low.c (select_event_lwp): Use find_thread_in_random.
475
476 2019-04-08 Tom Tromey <tom@tromey.com>
477
478 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
479 throw.
480 (linux_resume_one_lwp): Likewise.
481
482 2019-04-08 Tom Tromey <tom@tromey.com>
483
484 * gdbreplay.c: Update.
485 * linux-low.c: Update.
486 * server.c: Update.
487
488 2019-04-08 Tom Tromey <tom@tromey.com>
489
490 * server.c: Use C++ exception handling.
491 * linux-low.c: Use C++ exception handling.
492 * gdbreplay.c: Use C++ exception handling.
493
494 2019-04-08 Tom Tromey <tom@tromey.com>
495
496 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
497 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
498 (captured_main, main): Update.
499 * gdbreplay.c (main): Update.
500
501 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
502
503 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
504 value in argument pointer, return 1 if the entry is found and 0
505 otherwise. Move comment.
506 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
507 * linux-low.h (linux_get_auxv): Declare.
508 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
509
510 2019-04-05 Tom Tromey <tromey@adacore.com>
511
512 * server.c (gdbserver_usage): Use upper-case for metasyntactic
513 variables.
514
515 2019-03-28 Alan Hayward <alan.hayward@arm.com>
516
517 * linux-low.c (AT_HWCAP2): Add define if not already included.
518
519 2019-03-26 Alan Hayward <alan.hayward@arm.com>
520
521 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
522 (aarch64_arch_setup): Call linux_get_hwcap.
523 * linux-arm-low.c (arm_get_hwcap): Remove function.
524 (arm_read_description): Call linux_get_hwcap.
525 * linux-low.c (linux_get_auxv): New function.
526 (linux_get_hwcap): Likewise.
527 (linux_get_hwcap2): Likewise.
528 * linux-low.h (linux_get_hwcap): New declaration.
529 (linux_get_hwcap2): Likewise.
530 * linux-ppc-low.c (ppc_get_auxv): Remove function.
531 (ppc_arch_setup): Call linux_get_hwcap.
532 * linux-s390-low.c (s390_get_hwcap): Remove function.
533 (s390_arch_setup): Call linux_get_hwcap.
534
535 2019-03-22 Alan Hayward <alan.hayward@arm.com>
536 Jiong Wang <jiong.wang@arm.com>
537
538 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
539 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
540 to fail.
541 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
542
543 2019-03-22 Alan Hayward <alan.hayward@arm.com>
544 Jiong Wang <jiong.wang@arm.com>
545
546 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
547 (aarch64_get_hwcap): New function.
548 (aarch64_arch_setup): Read APIA hwcap.
549
550 2019-03-22 Alan Hayward <alan.hayward@arm.com>
551 Jiong Wang <jiong.wang@arm.com>
552
553 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
554 (initialize_low_tracepoint): Likewise.
555 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
556 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
557 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
558 (aarch64_linux_read_description): Likewise.
559 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
560
561 2019-03-12 John Baldwin <jhb@FreeBSD.org>
562
563 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
564 i386_create_target_description for 'segments' parameter.
565 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
566 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
567 * win32-i386-low.c (i386_arch_setup): Likewise.
568
569 2019-03-12 Tom Tromey <tromey@adacore.com>
570
571 * linux-low.c (iterate_over_lwps): Update.
572
573 2019-03-06 Tom Tromey <tom@tromey.com>
574
575 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
576 (captured_main): Use SCOPE_EXIT.
577
578 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
579
580 * configure.srv: Use '$enable_unittest' instead of '$development'
581 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
582 case.
583
584 2019-02-27 Tom Tromey <tromey@adacore.com>
585
586 * gdbreplay.c (logchar): Handle \r\n.
587
588 2019-02-07 Alan Hayward <alan.hayward@arm.com>
589
590 * linux-low.c (linux_attach): Add process before lwp.
591 * server.c (attach_inferior): Check if already attached.
592
593 2019-02-07 Tom Tromey <tom@tromey.com>
594
595 * x86-tdesc.h: Rename include guard.
596 * x86-low.h: Add include guard.
597 * wincecompat.h: Rename include guard.
598 * win32-low.h: Add include guard.
599 * utils.h: Rename include guard.
600 * tracepoint.h: Rename include guard.
601 * tdesc.h: Rename include guard.
602 * target.h: Rename include guard.
603 * server.h: Rename include guard.
604 * remote-utils.h: Rename include guard.
605 * regcache.h: Rename include guard.
606 * nto-low.h: Rename include guard.
607 * notif.h: Add include guard.
608 * mem-break.h: Rename include guard.
609 * lynx-low.h: Add include guard.
610 * linux-x86-tdesc.h: Add include guard.
611 * linux-s390-tdesc.h: Add include guard.
612 * linux-ppc-tdesc-init.h: Add include guard.
613 * linux-low.h: Add include guard.
614 * linux-aarch64-tdesc.h: Add include guard.
615 * linux-aarch32-low.h: Add include guard.
616 * inferiors.h: Rename include guard.
617 * i387-fp.h: Rename include guard.
618 * hostio.h: Rename include guard.
619 * gdbthread.h: Rename include guard.
620 * gdb_proc_service.h: Rename include guard.
621 * event-loop.h: Rename include guard.
622 * dll.h: Rename include guard.
623 * debug.h: Rename include guard.
624 * ax.h: Rename include guard.
625
626 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
627
628 PR gdb/23985
629 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
630 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
631
632 2019-01-25 Tom Tromey <tom@tromey.com>
633
634 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
635
636 2019-01-25 Tom Tromey <tom@tromey.com>
637
638 * win32-low.c: Fix common/ includes.
639 * win32-i386-low.c: Fix common/ includes.
640 * tracepoint.c: Fix common/ includes.
641 * thread-db.c: Fix common/ includes.
642 * target.h: Fix common/ includes.
643 * symbol.c: Fix common/ includes.
644 * spu-low.c: Fix common/ includes.
645 * server.h: Fix common/ includes.
646 * server.c: Fix common/ includes.
647 * remote-utils.c: Fix common/ includes.
648 * regcache.h: Fix common/ includes.
649 * regcache.c: Fix common/ includes.
650 * nto-x86-low.c: Fix common/ includes.
651 * notif.h: Fix common/ includes.
652 * mem-break.h: Fix common/ includes.
653 * lynx-low.c: Fix common/ includes.
654 * lynx-i386-low.c: Fix common/ includes.
655 * linux-x86-tdesc-selftest.c: Fix common/ includes.
656 * linux-x86-low.c: Fix common/ includes.
657 * linux-low.c: Fix common/ includes.
658 * inferiors.h: Fix common/ includes.
659 * i387-fp.c: Fix common/ includes.
660 * hostio.c: Fix common/ includes.
661 * hostio-errno.c: Fix common/ includes.
662 * gdbthread.h: Fix common/ includes.
663 * gdbreplay.c: Fix common/ includes.
664 * fork-child.c: Fix common/ includes.
665 * event-loop.c: Fix common/ includes.
666 * ax.c:
667 (enum gdb_agent_op): Fix common/ includes.
668
669 2019-01-21 Tom Tromey <tom@tromey.com>
670
671 * tracepoint.c: Fix includes.
672 * remote-utils.c: Fix includes.
673 * linux-x86-low.c: Fix includes.
674
675 2019-01-01 Joel Brobecker <brobecker@adacore.com>
676
677 * gdbreplay.c (gdbreplay_version): Update copyright year in
678 version message.
679 * server.c (gdbserver_version): Likewise.
680
681 2018-12-05 Alan Hayward <alan.hayward@arm.com>
682
683 * linux-low.c (add_lwp): Switch ordering.
684
685 2018-11-29 Tom Tromey <tom@tromey.com>
686
687 * win32-low.c (win32_join): Take pid, not process.
688 * target.h (struct target_ops) <join>: Change argument type.
689 (join_inferior): Change argument name.
690 * spu-low.c (spu_join): Take pid, not process.
691 * server.c (handle_detach): Preserve pid before destroying
692 process.
693 * lynx-low.c (lynx_join): Take pid, not process.
694 * linux-low.c (linux_join): Take pid, not process.
695
696 2018-11-23 Alan Hayward <alan.hayward@arm.com>
697
698 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
699 (aarch64_cannot_fetch_register): Likewise.
700 (struct linux_target_ops): Update references.
701
702 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
703
704 * linux-ppc-low.c: Include nat/linux-ptrace.h.
705
706 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
707
708 * configure.srv (ipa_ppc_linux_regobj): Add
709 powerpc-isa207-htm-vsx32l-ipa.o and
710 powerpc-isa207-htm-vsx64l-ipa.o.
711 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
712 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
713 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
714 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
715 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
716 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
717 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
718 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
719 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
720 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
721 (init_registers_powerpc_isa207_htm_vsx32l)
722 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
723 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
724 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
725 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
726 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
727 (ppc_store_tm_ctarregset): New functions.
728 (ppc_regsets): Add entries for HTM regsets.
729 (ppc_arch_setup): Set htm in features struct when needed. Set
730 sizes for the HTM regsets.
731 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
732 (initialize_low_arch): Call
733 init_registers_powerpc_isa207_htm_vsx32l and
734 init_registers_powerpc_isa207_htm_vsx64l.
735 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
736 PPC_TDESC_ISA207_HTM_VSX.
737 (initialize_low_tracepoint): Call
738 init_registers_powerpc_isa207_htm_vsx32l and
739 init_registers_powerpc_isa207_htm_vsx64l.
740
741 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
742
743 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
744 rs6000/power-linux-pmu.xml to srv_xmlfiles.
745 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
746 (ppc_store_pmuregset): New functions.
747 (ppc_regsets): Add entries for ebb and pmu regsets.
748 (ppc_arch_setup): Set isa207 in features struct if the ebb and
749 pmu regsets are available. Set sizes for these regsets.
750
751 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
752
753 * configure.srv (ipa_ppc_linux_regobj): Add
754 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
755 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
756 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
757 rs6000/powerpc-isa207-vsx32l.xml, and
758 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
759 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
760 <PPC_TDESC_ISA207_VSX>: New enum value.
761 (init_registers_powerpc_isa207_vsx32l): Declare.
762 (init_registers_powerpc_isa207_vsx64l): Declare.
763 * linux-ppc-low.c (ppc_fill_tarregset): New function.
764 (ppc_store_tarregset): New function.
765 (ppc_regsets): Add entry for the TAR regset.
766 (ppc_arch_setup): Set isa207 in features struct when needed. Set
767 size for the TAR regsets.
768 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
769 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
770 and init_registers_powerpc_isa207_vsx64l.
771 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
772 (initialize_low_tracepoint): Call
773 init_registers_powerpc_isa207_vsx32l and
774 init_registers_powerpc_isa207_vsx64l.
775
776 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
777 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
778
779 * configure.srv (ipa_ppc_linux_regobj): Add
780 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
781 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
782 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
783 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
784 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
785 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
786 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
787 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
788 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
789 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
790 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
791 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
792 (ppc_hwcap): Add comment.
793 (ppc_hwcap2): New global.
794 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
795 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
796 (ppc_regsets): Add entries for the DSCR and PPR regsets.
797 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
798 when needed. Set sizes for the the DSCR and PPR regsets.
799 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
800 (initialize_low_arch): Call
801 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
802 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
803 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
804 PPC_TDESC_ISA205_PPR_DSCR_VSX.
805 (initialize_low_tracepoint): Call
806 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
807 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
808
809 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
810
811 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
812
813 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
814 Simon Marchi <simark@simark.ca>
815
816 * acinclude.m4: Include "../selftest.m4".
817 * configure: Regenerate.
818 * configure.ac: Use "GDB_AC_SELFTEST".
819 * configure.srv: Use "$enable_unittests" instead of
820 "$development" when checking whether unit tests have been
821 enabled.
822 * server.c (captured_main): Update message informing that
823 selftests have been disabled.
824
825 2018-10-04 Tom Tromey <tom@tromey.com>
826
827 * configure: Rebuild.
828
829 2018-10-04 Tom Tromey <tom@tromey.com>
830
831 * server.c (handle_status): Rename inner "thread".
832 (process_serial_event): Declare "res" in 'm' case.
833 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
834 (iterate_over_lwps): Rename inner "thread".
835 (linux_qxfer_libraries_svr4): Rename inner "len".
836 * gdbthread.h (find_thread_in_random): Rename inner "thread".
837
838 2018-10-01 Gary Benson <gbenson@redhat.com>
839
840 * gdb_proc_service.h: Moved common code to
841 common/gdb_proc_service.h.
842
843 2018-10-01 Gary Benson <gbenson@redhat.com>
844
845 * gdb_proc_service.h: Synchronize comments and whitespace with
846 GDB's version of this file.
847
848 2018-09-25 Tom Tromey <tom@tromey.com>
849
850 * configure: Rebuild.
851 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
852
853 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
854
855 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
856 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
857 ($(IPA_LIB)): Sort IPA_OBJS.
858
859 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
860
861 * Makefile.in: Remove references to $(ADD_DEPS).
862
863 2018-09-16 Tom Tromey <tom@tromey.com>
864
865 * remote-utils.c (remote_open): Use GNU style for metasyntactic
866 variables.
867 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
868 variables.
869
870 2018-09-05 Tom Tromey <tom@tromey.com>
871
872 * configure: Rebuild.
873
874 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
875
876 PR build/23399
877 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
878
879 2018-08-27 Tom Tromey <tom@tromey.com>
880
881 PR build/23087:
882 * configure: Rebuild.
883
884 2018-08-27 Tom Tromey <tom@tromey.com>
885
886 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
887 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
888 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
889 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
890 (s390x_emit_stack_adjust): Add casts to unsigned char.
891
892 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
893
894 PR gdb/23374
895 PR gdb/23375
896 * server.h (struct client_state) <disable_randomization>:
897 Initialize to 1.
898
899 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
900
901 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
902 variable.
903 (mips_supply_ptrace_register): Likewise.
904
905 2018-07-22 Tom Tromey <tom@tromey.com>
906
907 * configure: Rebuild.
908
909 2018-07-22 Tom Tromey <tom@tromey.com>
910
911 * win32-low.c (win32_create_inferior): Remove unused variables.
912 * gdbreplay.c (remote_open): Remove unused variable.
913 * remote-utils.c (remote_prepare): Remove unused variable.
914 * x86-tdesc.h (X86_TDESC_H): Define.
915 (amd64_expedite_regs): Define conditionally.
916 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
917 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
918 * remote-utils.c (readchar): Remove unused variable.
919
920 2018-07-13 Pedro Alves <palves@redhat.com>
921
922 * linux-low.c (linux_kill): Change parameter to process_info
923 pointer instead of pid. Adjust.
924 * lynx-low.c (lynx_kill): Likewise.
925 * nto-low.c (nto_kill): Likewise.
926 * spu-low.c (spu_kill): Likewise.
927 * win32-low.c (win32_kill): Likewise.
928 * server.c (handle_v_kill, kill_inferior_callback)
929 (detach_or_kill_for_exit): Adjust.
930 * target.c (kill_inferior): Change parameter to process_info
931 pointer instead of pid. Adjust.
932 * target.h (struct target_ops) <kill>: Change parameter to
933 process_info pointer instead of pid. Adjust all implementations
934 and callers.
935 (kill_inferior): Likewise.
936
937 2018-07-13 Pedro Alves <palves@redhat.com>
938
939 * linux-low.c (linux_detach, linux_join): Change parameter to
940 process_info pointer instead of pid. Adjust.
941 * lynx-low.c (lynx_detach, lynx_join): Likewise.
942 * nto-low.c (nto_detach): Likewise.
943 * spu-low.c (spu_detach, spu_join): Likewise.
944 * win32-low.c (win32_detach, win32_join): Likewise.
945 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
946 * target.h (struct target_ops) <detach, join>: Change parameter to
947 process_info pointer instead of pid. Adjust all implementations
948 and callers.
949 (detach_inferior, join_inferior): Rename 'pid' parameter to
950 'proc'.
951
952 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
953 Jan Kratochvil <jan.kratochvil@redhat.com>
954 Paul Fertser <fercerpav@gmail.com>
955 Tsutomu Seki <sekiriki@gmail.com>
956
957 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
958 (OBS): Add 'common/netstuff.o'.
959 (GDBREPLAY_OBS): Likewise.
960 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
961 (remote_open): Implement support for IPv6
962 connections.
963 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
964 and 'wspiapi.h'.
965 (handle_accept_event): Accept connections from IPv6 sources.
966 (remote_prepare): Handle IPv6-style hostnames; implement
967 support for IPv6 connections.
968 (remote_open): Implement support for printing connections from
969 IPv6 sources.
970
971 2018-07-11 Pedro Alves <palves@redhat.com>
972
973 PR gdb/23377
974 * mem-break.c (any_persistent_commands): Add process_info
975 parameter and use it instead of relying on the current process.
976 Change return type to bool.
977 * mem-break.h (any_persistent_commands): Add process_info
978 parameter and change return type to bool.
979 * server.c (handle_detach): Remove require_running_or_return call.
980 Look up the process_info for the process we're about to detach.
981 If not found, return back error to GDB. Adjust
982 any_persistent_commands call to pass down a process pointer.
983
984 2018-07-11 Pedro Alves <palves@redhat.com>
985
986 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
987 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
988 instead of collect_register_by_name.
989 * regcache.c (regcache_raw_get_unsigned_by_name): New.
990 * regcache.h (regcache_raw_get_unsigned_by_name): New.
991
992 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
993 Pedro Alves <palves@redhat.com>
994
995 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
996
997 2018-07-03 Tom Tromey <tom@tromey.com>
998
999 * linux-low.c: Update.
1000 * lynx-low.c: Update.
1001 * mem-break.c: Update.
1002 * nto-low.c: Update.
1003 * remote-utils.c: Update.
1004 * server.c: Update.
1005 * spu-low.c: Update.
1006 * target.c: Update.
1007 * win32-low.c: Update.
1008
1009 2018-07-03 Tom Tromey <tom@tromey.com>
1010
1011 * server.c: Update.
1012
1013 2018-07-03 Tom Tromey <tom@tromey.com>
1014
1015 * linux-low.c: Update.
1016
1017 2018-07-03 Tom Tromey <tom@tromey.com>
1018
1019 * target.c: Update.
1020
1021 2018-07-03 Tom Tromey <tom@tromey.com>
1022
1023 * linux-low.c: Update.
1024 * linux-mips-low.c: Update.
1025 * lynx-low.c: Update.
1026 * nto-low.c: Update.
1027 * remote-utils.c: Update.
1028 * server.c: Update.
1029 * spu-low.c: Update.
1030 * target.c: Update.
1031 * thread-db.c: Update.
1032
1033 2018-07-03 Tom Tromey <tom@tromey.com>
1034
1035 * linux-low.c: Update.
1036 * linux-mips-low.c: Update.
1037 * lynx-low.c: Update.
1038 * mem-break.c: Update.
1039 * nto-low.c: Update.
1040 * remote-utils.c: Update.
1041 * server.c: Update.
1042 * spu-low.c: Update.
1043 * target.c: Update.
1044 * tracepoint.c: Update.
1045
1046 2018-07-03 Tom Tromey <tom@tromey.com>
1047
1048 * linux-low.c: Update.
1049 * linux-ppc-low.c: Update.
1050 * linux-x86-low.c: Update.
1051 * proc-service.c: Update.
1052 * server.c: Update.
1053 * spu-low.c: Update.
1054 * thread-db.c: Update.
1055 * win32-low.c: Update.
1056
1057 2018-07-03 Tom Tromey <tom@tromey.com>
1058
1059 * linux-low.c: Update.
1060 * lynx-low.c: Update.
1061 * nto-low.c: Update.
1062 * remote-utils.c: Update.
1063 * spu-low.c: Update.
1064 * thread-db.c: Update.
1065 * win32-low.c: Update.
1066
1067 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1068
1069 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1070 parameter in call to 'amd64_create_target_description'.
1071
1072 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1073
1074 * x86-tdesc.h: Remove executable permission flag.
1075
1076 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * configure.ac: Remove AC_PREREQ, add missing quoting.
1079 * configure: Re-generate.
1080 * config.in: Re-generate.
1081 * aclocal.m4: Re-generate.
1082
1083 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1084
1085 * tracepoint.h (current_traceframe): Remove declaration.
1086
1087 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1088
1089 * linux-aarch64-low.c (is_sve_tdesc): New function.
1090 (aarch64_sve_regs_copy_to_regcache): Likewise.
1091 (aarch64_sve_regs_copy_from_regcache): Likewise.
1092 (aarch64_regs_info): Add SVE checks.
1093 (initialize_low_arch): Initialize SVE.
1094
1095 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1096
1097 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1098
1099 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1100
1101 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1102 (initialize_low_tracepoint): Likewise
1103 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1104 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1105 param.
1106 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1107 checks.
1108 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1109
1110 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1111
1112 * server.h (PBUFSIZ): Increase size
1113
1114 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1115
1116 * regcache.c (regcache::raw_compare): New function.
1117 * regcache.h (regcache::raw_compare): New declaration.
1118
1119 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1120
1121 * regcache.c (new_register_cache): Use new.
1122 (free_register_cache): Use delete.
1123 (register_data): Use const.
1124 (supply_register): Move body inside regcache.
1125 (regcache::raw_supply): New override function.
1126 (collect_register): Move body inside regcache.
1127 (regcache::raw_collect): New override function.
1128 (regcache::get_register_status): New override function.
1129 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1130
1131 2018-06-09 Tom Tromey <tom@tromey.com>
1132
1133 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1134 declare queue.
1135 (event_queue): Use std::queue.
1136 (gdb_event_xfree): Remove.
1137 (initialize_event_loop, process_event, wait_for_event): Update.
1138
1139 2018-06-08 Stan Cox <scox@redhat.com>
1140
1141 * win32-low.c (win32_create_inferior): last_ptid and last_status
1142 moved to client_state.
1143
1144 2018-06-08 Pedro Alves <palves@redhat.com>
1145
1146 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1147 common/common-exceptions.o, common/common-utils.o,
1148 common/errors.o, common/print-utils.o and utils.o.
1149 * gdbreplay.c: Include "common-defs.h" instead of the two
1150 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1151 string.h or alloca.h.
1152 (perror_with_name): Delete.
1153 (remote_open): Use xstrdup instead of strdup.
1154 (main): Rename to ...
1155 (captured_main): ... this.
1156 (main): New.
1157
1158 2018-06-08 Tom Tromey <tom@tromey.com>
1159
1160 * linux-low.c (linux_low_read_btrace): Update.
1161
1162 2018-06-04 Stan Cox <scox@redhat.com>
1163
1164 * server.h (struct client_state): New.
1165 * server.c (cont_thread, general_thread, multi_process)
1166 (report_fork_events, report_vfork_events, report_exec_events)
1167 (report_thread_events, swbreak_feature, hwbreak_feature)
1168 (vCont_supported, disable_randomization, pass_signals)
1169 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1170 Moved to client_state.
1171 * remote-utils.c (remote_debug, noack_mode)
1172 (transport_is_reliable): Moved to client_state.
1173 * tracepoint.c (current_traceframe): Moved to client_state.
1174
1175 Update all callers.
1176 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1177 linux-low.c, remote-utils.h, target.c: Use client_state.
1178
1179 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1180
1181 * configure.srv: Add new c/h file.
1182
1183 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1184
1185 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1186 null VQ.
1187
1188 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1189
1190 * gdb.arch/mips-fpregset-core.exp: New test.
1191 * gdb.arch/mips-fpregset-core.c: New test source.
1192
1193 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1194
1195 PR server/23198
1196 * hostio.c (require_int): Do not report overflow for integers
1197 between 0xfffffff and 0x7fffffff.
1198
1199 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1200
1201 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1202 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1203 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1204 functions.
1205 (the_low_target): Wire them.
1206
1207 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1208
1209 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1210 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1211 mode. Call collect_register_by_name with vscr using
1212 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1213 (ppc_store_vrregset): Add and set vscr_offset variable as in
1214 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1215 vscr_offset.
1216
1217 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1218
1219 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1220 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1221 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1222
1223 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1224
1225 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1226 (ppc_store_vsxregset): Likewise.
1227 (ppc_fill_vrregset): Likewise.
1228 (ppc_store_vrregset): Likewise.
1229 (ppc_fill_evrregset): Likewise.
1230 (ppc_store_evrregset): Likewise.
1231 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1232 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1233 needed.
1234
1235 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1236
1237 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1238 wordsize of the inferior. Call ppc_linux_target_wordsize.
1239
1240 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1241
1242 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1243 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1244 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1245 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1246 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1247 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1248 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1249 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1250 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1251 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1252 (tdesc_powerpc_e500l): Remove.
1253 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1254 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1255 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1256 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1257 linux-ppc-tdesc.h.
1258 (ppc_arch_setup): Remove target description matching code. Fill a
1259 ppc_linux_features struct and call ppc_linux_match_description
1260 with it.
1261
1262 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1263
1264 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1265 width of the requested register exceeds the width of the
1266 `ptrace' data type.
1267 (mips_cannot_store_register): Likewise.
1268
1269 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1270
1271 * linux-mips-low.c (mips_fetch_register): New function. Update
1272 preceding comment.
1273 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1274 (the_low_target): Wire `mips_fetch_register'.
1275
1276 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1277
1278 * lynx-i386-low.c (LYNXOS_178): New macro.
1279 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1280 the layout on LynxOS-178.
1281 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1282 handle floating point registers that are not supported by
1283 LynxOS-178.
1284
1285 2018-05-10 Tom Tromey <tom@tromey.com>
1286
1287 * configure: Rebuild.
1288
1289 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1290
1291 PR server/23158:
1292 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1293 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1294 Use it to set the expedite_regs field in the given tdesc.
1295 * x86-tdesc.h: New file.
1296 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1297 Adjust following the addition of the new expedite_regs parameter
1298 to init_target_desc.
1299 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1300 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1301 (i386_linux_read_description, amd64_linux_read_description):
1302 Adjust following the addition of the new expedite_regs parameter
1303 to init_target_desc.
1304 * lynx-i386-low.c: #include "x86-tdesc.h".
1305 (lynx_i386_arch_setup): Adjust following the addition of the new
1306 expedite_regs parameter to init_target_desc.
1307 * nto-x86-low.c: #include "x86-tdesc.h".
1308 (nto_x86_arch_setup): Adjust following the addition of the new
1309 expedite_regs parameter to init_target_desc.
1310 * win32-i386-low.c: #include "x86-tdesc.h".
1311 (i386_arch_setup): Adjust following the addition of the new
1312 expedite_regs parameter to init_target_desc.
1313
1314 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1315
1316 PR server/23158:
1317 * win32-low.c (win32_create_inferior): Add call to my_wait
1318 setting last_status global.
1319
1320 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1321
1322 PR server/23158:
1323 * win32-low.c (create_process): Only call gdb_tilde_expand if
1324 inferior_cwd is not NULL.
1325
1326 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1327
1328 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1329 registers to the cache if their values have changed.
1330 (i387_xsave_to_cache): Provide default values for x87 control
1331 registers when these features are available, but disabled.
1332 * regcache.c (supply_register_by_name_zeroed): New function.
1333 * regcache.h (supply_register_by_name_zeroed): Declare new
1334 function.
1335
1336 2018-05-07 Tom Tromey <tom@tromey.com>
1337
1338 * configure: Rebuild.
1339
1340 2018-05-04 Tom Tromey <tom@tromey.com>
1341
1342 * configure: Rebuild.
1343
1344 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1345 Pedro Alves <palves@redhat.com>
1346
1347 * linux-aarch64-low.c (aarch64_stopped_data_address):
1348 Likewise.
1349
1350 2018-04-27 Tom Tromey <tom@tromey.com>
1351
1352 * configure: Rebuild.
1353
1354 2018-04-23 Tom Tromey <tom@tromey.com>
1355
1356 * configure: Rebuild.
1357
1358 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1359
1360 * Makefile.in (depcomp): Add "..".
1361 (all_deps_files): New and use it.
1362
1363 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1364
1365 * configure.srv (aarch64*-*-linux*): Don't include xml.
1366 (i[34567]86-*-cygwin*): Likewise.
1367 (i[34567]86-*-linux*): Likewise.
1368 (i[34567]86-*-lynxos*): Likewise.
1369 (i[34567]86-*-mingw32ce*): Likewise.
1370 (i[34567]86-*-mingw*): Likewise.
1371 (i[34567]86-*-nto*): Likewise.
1372 (tic6x-*-uclinux): Likewise.
1373 (x86_64-*-linux*): Likewise.
1374 (x86_64-*-mingw*): Likewise.
1375 (x86_64-*-cygwin*): Likewise.
1376
1377 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1378
1379 * tdesc.c: Remove xml parameter.
1380
1381 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1382
1383 * server.c (get_features_xml): Remove cast.
1384 * tdesc.c (void target_desc::accept): Fill in function.
1385 (tdesc_get_features_xml): Remove old xml creation.
1386 (print_xml_feature::visit_pre): Add xml vistor.
1387 * tdesc.h (struct target_desc): Make xmltarget mutable.
1388 (tdesc_get_features_xml): Remove declaration.
1389
1390 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1391
1392 * tdesc.c (tdesc_architecture_name): Add new function.
1393 (tdesc_osabi_name): Likewise.
1394 (tdesc_get_features_xml): Use new functions.
1395
1396 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1397
1398 * tdesc.c (tdesc_create_flags): Remove.
1399 (tdesc_add_flag): Likewise.
1400 (tdesc_named_type): Likewise.
1401 (tdesc_create_union): Likewise.
1402 (tdesc_create_struct): Likewise.
1403 (tdesc_create_vector): Likewise.
1404 (tdesc_add_bitfield): Likewise.
1405 (tdesc_add_field): Likewise.
1406 (tdesc_set_struct_size): Likewise.
1407
1408 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1409
1410 * tdesc.c (~target_desc): Remove implictly deleted items.
1411 (init_target_desc): Iterate all features.
1412 (tdesc_get_features_xml): Use vector.
1413 (tdesc_create_feature): Create feature.
1414 * tdesc.h (tdesc_feature) Remove
1415 (target_desc): Add features.
1416
1417 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1418
1419 * Makefile.in: Add common/tdesc.c
1420 * tdesc.c (init_target_desc): init all reg_defs from register
1421 vector.
1422 (tdesc_create_reg): Create tdesc_reg.
1423 * tdesc.h (tdesc_feature): Add register vector.
1424
1425 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1426
1427 * tdesc.h (struct target_desc) <features>: Change type to
1428 std::vector<std::string>.
1429 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1430 changes.
1431 (tdesc_get_features_xml): Likewise.
1432 (tdesc_create_feature): Likewise.
1433
1434 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1435
1436 * regcache.c (find_register_by_number): Return a ref.
1437 (find_regno): Use references.
1438 (register_size): Likewise.
1439 (register_data): Likewise.
1440 * tdesc.c (target_desc::~target_desc): Remove free calls.
1441 (target_desc::operator==): Use std::vector compare.
1442 (init_target_desc): Use reference.
1443 (tdesc_create_reg): Use reg constructors.
1444 * tdesc.h (struct target_desc): Replace pointer with object.
1445
1446 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1447
1448 * regcache.c (find_register_by_number): Make static.
1449 (find_regno): Use find_register_by_number
1450 * regcache.h (struct reg): Remove declaration.
1451
1452 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1453
1454 * tdesc.c (target_desc::~target_desc): Move to here.
1455 (target_desc::operator==): Likewise.
1456 * tdesc.h (target_desc::~target_desc): Move from here.
1457 (target_desc::operator==): Likewise.
1458
1459 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1460
1461 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1462
1463 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1464
1465 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1466 S390_TDESC_GS.
1467 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1468 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1469 and init_registers_s390_gs_linux64.
1470
1471 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1472
1473 * linux-s390-low.c (s390_fill_gs): Remove function.
1474 (s390_fill_gsbc): Remove function.
1475 (s390_regsets): Set fill functions for the guarded storage regsets
1476 to NULL.
1477
1478 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1479
1480 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1481 the word size. Add comment.
1482 (s390_get_wordsize): New function.
1483 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1484 pswm with it. Instead, use s390_get_wordsize to determine the
1485 word size first and derive the correct tdesc from that directly.
1486
1487 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1488
1489 * Makefile.in: Include silent-rules.mk.
1490 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1491 (COMPILE): Add ECHO_CXX.
1492 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1493 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1494 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1495 (version-generated.c): Add ECHO_GEN.
1496 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1497 (IPAGENT_COMPILE): Add ECHO_CXX.
1498 (%-generated.c): Add ECHO_REGDAT.
1499
1500 2018-03-14 Tom Tromey <tom@tromey.com>
1501
1502 PR cli/14977:
1503 * ax.c (ax_printf): Special case for NULL.
1504
1505 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1506
1507 * linux-low.c (linux_qxfer_libraries_svr4): Use
1508 xml_escape_text_append.
1509
1510 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1511
1512 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1513
1514 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1515
1516 * server.c (handle_general_set): Remove unnecessary xstrdup.
1517
1518 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1519
1520 * server.c (parse_debug_format_options): Adjust to
1521 delim_string_to_char_ptr_vec changes.
1522 * thread-db.c (thread_db_load_search): Adjust to
1523 dirnames_to_char_ptr_vec changes.
1524
1525 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1526
1527 * target.h (target_enable_btrace, target_disable_btrace)
1528 (target_read_btrace, target_read_btrace_conf): Turn macro into
1529 inline function. Throw error if target method is not defined.
1530 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1531 check for btrace target method. Be prepared to handle exceptions
1532 from btrace target methods.
1533
1534 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1535
1536 * server.c (captured_main): Change order of error message printed
1537 when the current working directory cannot be found.
1538
1539 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1540
1541 * server.c: Include "filenames.h" and "pathstuff.h".
1542 (program_name): Delete variable.
1543 (program_path): New anonymous class.
1544 (get_exec_wrapper): Use "program_path" instead of
1545 "program_name".
1546 (handle_v_run): Likewise.
1547 (captured_main): Likewise.
1548 (process_serial_event): Likewise.
1549
1550 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1551
1552 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1553 (OBJS): Add "pathstuff.o".
1554 * server.c (current_directory): New global variable.
1555 (captured_main): Initialize "current_directory".
1556
1557 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1558
1559 * tdesc.c: Use common/tdesc.h.
1560 * tdesc.h: Likewise.
1561
1562 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1563 Simon Marchi <simon.marchi@ericsson.com>
1564
1565 * Makefile.in: Switch order of make rules.
1566
1567 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1568
1569 * Makefile.in: Add common directory in build.
1570 * configure.ac: Add common reference.
1571 * configure: Regenerate.
1572
1573 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1574
1575 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1576 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1577 * spu-low.c (spu_target_ops): Likewise.
1578 * win32-low.c (win32_target_ops): Likewise.
1579 * server.c (supported_btrace_packets): Report packets unconditionally.
1580 * target.h (target_ops) <supports_btrace>: Remove.
1581 (target_supports_btrace): Remove.
1582
1583 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1584
1585 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1586 (handle_btrace_disable): Change return type to void. Use exceptions
1587 to report errors.
1588 (handle_btrace_general_set): Catch exception and copy message to
1589 return message.
1590
1591 2018-02-08 Tom Tromey <tom@tromey.com>
1592
1593 * linux-low.c (install_software_single_step_breakpoints): Use
1594 make_scoped_restore.
1595 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1596 (do_restore_current_thread_cleanup): Remove.
1597 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1598 declare.
1599
1600 2018-02-08 Tom Tromey <tom@tromey.com>
1601
1602 * mem-break.c (set_raw_breakpoint_at): Use
1603 gdb::unique_xmalloc_ptr.
1604
1605 2018-01-30 Pedro Alves <palves@redhat.com>
1606
1607 PR gdb/13211
1608 * target.c (target_terminal::terminal_state): Rename to ...
1609 (target_terminal::m_terminal_state): ... this.
1610
1611 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1612
1613 * linux-low.c (handle_extended_wait): Surround call to
1614 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1615
1616 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1617
1618 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1619 linux_ptrace_attach_fail_reason_string now returning an
1620 std::string.
1621 (linux_attach): Likewise.
1622 * thread-db.c (attach_thread): Likewise.
1623
1624 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1625
1626 PR gdb/21559
1627 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1628 checking for fs_base/gs_base fields in struct user_regs_struct.
1629 * configure: Regenerate.
1630
1631 2018-01-16 Yao Qi <yao.qi@linaro.org>
1632
1633 PR gdb/18749
1634 * linux-low.c (fetch_register): Call supply_register instead of
1635 error.
1636
1637 2018-01-08 Yao Qi <yao.qi@linaro.org>
1638 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * Makefile.in (OBS): Remove selftest.o.
1641 * configure.ac: Set srv_selftest_objs if $development is true.
1642 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1643 * configure: Re-generated.
1644 * server.c (captured_main): Wrap variable selftest_filter with
1645 GDB_SELF_TEST.
1646
1647 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1648
1649 * server.c (parse_debug_format_options): Return std::string.
1650 (handle_monitor_command, captured_main): Adjust.
1651
1652 2018-01-05 Pedro Alves <palves@redhat.com>
1653
1654 PR gdb/18653
1655 * server.c (captured_main): Pass quiet=false to
1656 save_original_signals_state.
1657
1658 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1659
1660 * gdbreplay.c (gdbreplay_version): Update copyright year in
1661 version message.
1662 * server.c (gdbserver_version): Likewise.
1663
1664 2017-12-08 Tom Tromey <tom@tromey.com>
1665
1666 * ax.c (ax_printf): Update.
1667
1668 2017-12-07 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1671 aarch64_linux_read_description.
1672 * linux-amd64-ipa.c (idx2mask): New array.
1673 (get_ipa_tdesc): Move idx2mask out.
1674 (initialize_low_tracepoint): Initialize target descriptions.
1675 * linux-i386-ipa.c (idx2mask): New array.
1676 (get_ipa_tdesc): Move idx2mask out.
1677 (initialize_low_tracepoint): Initialize target descriptions.
1678
1679 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1680
1681 * tdesc.c (struct tdesc_type): Change return type.
1682 (tdesc_add_flag): Change parameter type.
1683 (tdesc_add_bitfield): Likewise.
1684 (tdesc_add_field): Likewise.
1685 (tdesc_set_struct_size): Likewise.
1686
1687 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1688
1689 * regcache.c (registers_to_string): Remove unused variable.
1690
1691 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * inferiors.c (for_each_inferior_with_data): Remove.
1694 * inferiors.h (for_each_inferior_with_data): Remove.
1695 * server.c (handle_qxfer_threads_worker): Change parameter type.
1696 (handle_qxfer_threads_proper): Use for_each_thread.
1697
1698 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * inferiors.c (for_each_inferior): Remove.
1701 (clear_inferiors): Use for_each_thread.
1702 * inferiors.h (for_each_inferior): Remove.
1703 * linux-low.c (linux_wait_for_event_filtered): Use
1704 for_each_thread.
1705 (linux_stabilize_threads): Likewise.
1706 * regcache.c (regcache_release): Likewise.
1707 * server.c (gdb_wants_all_threads_stopped): Likewise.
1708 (clear_pending_status_callback): Remove.
1709 (handle_status): Use for_each_thread.
1710 (captured_main): Likewise.
1711 * win32-low.c (child_init_thread_list): Likewise.
1712 (win32_clear_inferiors): Likewise.
1713 (fake_breakpoint_event): Likewise.
1714
1715 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1716
1717 * inferiors.h (find_inferior): Remove.
1718 * inferiors.c (find_inferior): Remove.
1719
1720 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1721
1722 * linux-low.c (resume_status_pending_p): Update comment.
1723 (need_step_over_p): Update comment.
1724
1725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * linux-low.c (proceed_one_lwp): Return void, change parameter
1728 type.
1729 (unsuspend_and_proceed_one_lwp): Likewise.
1730 (proceed_all_lwps): Use for_each_thread.
1731 (unstop_all_lwps): Likewise.
1732
1733 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1734
1735 * linux-low.c (linux_resume_one_thread): Return void, take
1736 parameter directly.
1737 (linux_resume): Use for_each_thread.
1738
1739 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1740
1741 * linux-low.c (send_sigstop_callback): Return void, change
1742 parameter type. Rename to...
1743 (send_sigstop): ... this.
1744 (suspend_and_send_sigstop_callback): Return void, change parameter
1745 type. Rename to...
1746 (suspend_and_send_sigstop): ... this.
1747 (stop_all_lwps): Use for_each_thread.
1748
1749 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * linux-low.c (lwp_running): Return bool, remove unused
1752 argument.
1753 (linux_stabilize_threads): Use find_thread.
1754
1755 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1756
1757 * linux-low.c (select_singlestep_lwp_callback): Remove.
1758 (count_events_callback): Remove.
1759 (select_event_lwp_callback): Remove.
1760 (select_event_lwp): Use find_thread/for_each_thread.
1761
1762 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1763
1764 * linux-low.c (not_stopped_callback): Return bool, take filter
1765 argument directly.
1766 (linux_wait_for_event_filtered): Use find_thread.
1767 (linux_wait_1): Likewise.
1768
1769 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1770
1771 * linux-low.c (same_lwp): Remove.
1772 (find_lwp_pid): Use find_thread.
1773
1774 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1775
1776 * linux-low.c (delete_lwp_callback): Remove.
1777 (linux_mourn): Use for_each_thread.
1778
1779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1780
1781 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1782 args parameter, don't check for pid.
1783 (linux_detach): Use for_each_thread.
1784
1785 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1786
1787 * linux-low.c (struct counter): Remove.
1788 (second_thread_of_pid_p): Remove.
1789 (last_thread_of_process_p): Use find_thread.
1790
1791 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1792
1793 * inferiors.c (find_inferior_in_random): Remove.
1794 * inferiors.h (find_inferior_in_random): Remove.
1795 * linux-low.c (status_pending_p_callback): Return bool, accept
1796 parameter ptid directly.
1797 (linux_wait_for_event_filtered): Use find_thread_in_random.
1798 (linux_wait_1): Likewise.
1799
1800 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * inferiors.c (find_inferior_id): Remove.
1803 (find_thread_ptid): Move implemention from find_inferior_id to
1804 here.
1805 * inferiors.h (find_inferior_id): Remove.
1806 * server.c (handle_status): Use find_thread_ptid.
1807 (process_serial_event): Likewise.
1808 * thread-db.c (find_one_thread): Likewise.
1809 (thread_db_thread_handle): Likewise.
1810 * win32-low.c (thread_rec): Likewise.
1811 (child_delete_thread): Likewise.
1812 (win32_thread_alive): Likewise.
1813 (get_child_debug_event): Likewise.
1814
1815 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1816
1817 * linux-mips-low.c (update_watch_registers_callback): Return
1818 void, remove pid_p parameter, don't check for pid.
1819 (mips_insert_point, mips_remove_point): Use for_each_thread.
1820
1821 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1822
1823 * lynx.low (lynx_delete_thread_callback): Remove.
1824 (lynx_mourn): Use for_each_thread.
1825
1826 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1827
1828 * regcache.c (regcache_invalidate_one): Remove.
1829 (regcache_invalidate_pid): use for_each_thread.
1830
1831 2017-11-26 Tom Tromey <tom@tromey.com>
1832
1833 * linux-low.c (linux_create_inferior): Update.
1834
1835 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1836
1837 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1838
1839 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1840
1841 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1842 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1843 * linux-aarch64-tdesc-selftest.c: New file.
1844 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1845
1846 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1847
1848 * configure.srv: Add new file.
1849 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1850 * linux-aarch64-tdesc-selftest.c: New file.
1851 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1852
1853 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1854
1855 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1856 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1857 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1858
1859 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1860
1861 * configure.srv: Add new files.
1862 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1863 aarch64_linux_read_description.
1864 * linux-aarch64-low.c (aarch64_linux_read_description):
1865 Merge with aarch64_arch_setup.
1866 (aarch64_arch_setup): Call aarch64_linux_read_description.
1867 * linux-aarch64-tdesc.c: New file.
1868 * linux-aarch64-tdesc.h: New file.
1869
1870 2017-11-24 Yao Qi <yao.qi@linaro.org>
1871
1872 * configure.srv: Set $srv_regobj for tic6x-linux.
1873 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1874 (tic6x_read_description): Move some code to tic6x_arch_setup.
1875 (tic6x_tdesc_test): New function.
1876 (initialize_low_arch): Call selftests::register_test.
1877
1878 2017-11-22 Yao Qi <yao.qi@linaro.org>
1879
1880 * remote-utils.c (prepare_resume_reply): Use memcpy.
1881
1882 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1883
1884 * linux-low.c (kill_one_lwp_callback): Return void, take
1885 argument directly, don't filter on pid.
1886 (linux_kill): Use for_each_thread.
1887
1888 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1889
1890 * linux-low.c (need_step_over_p): Return bool, remove dummy
1891 argument.
1892 (linux_resume, proceed_all_lwps): Use find_thread.
1893
1894 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1895
1896 * linux-low.c (resume_status_pending_p): Return bool, remove
1897 flag_p argument.
1898 (linux_resume): Use find_thread.
1899
1900 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1901
1902 * linux-low.c (struct thread_resume_array): Remove.
1903 (linux_set_resume_request): Return void, take arguments
1904 directly.
1905 (linux_resume): Use for_each_thread.
1906
1907 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1908
1909 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1910 return bool, remove data argument.
1911 (linux_stabilize_threads): Use find_thread.
1912
1913 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1914
1915 * linux-low.c (unsuspend_one_lwp): Remove.
1916 (unsuspend_all_lwps): Use for_each_thread, inline code from
1917 unsuspend_one_lwp.
1918
1919 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1920
1921 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1922 * linux-low.c (struct iterate_over_lwps_args): Remove.
1923 (iterate_over_lwps_filter): Remove.
1924 (iterate_over_lwps): Use find_thread.
1925
1926 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1927
1928 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1929 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1930 code from reset_lwp_ptrace_options_callback.
1931
1932 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1933
1934 * linux-arm-low.c (struct update_registers_data): Remove.
1935 (update_registers_callback): Return void, take arguments
1936 directly, don't check thread's pid.
1937 (arm_insert_point, arm_remove_point): Use for_each_thread.
1938
1939 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1940
1941 * win32-low.c (continue_one_thread): Return void, take argument
1942 directly.
1943 (child_continue): Use for_each_thread.
1944
1945 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1946
1947 * win32-i386-low.c (update_debug_registers_callback): Rename
1948 to ...
1949 (update_debug_registers): ... this, return void, remove pid_p arg.
1950 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1951
1952 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1953
1954 * inferiors.h (struct process_info): Add constructor, initialize
1955 fields..
1956 <syscalls_to_catch>: Change type to std::vector<int>.
1957 * inferiors.c (add_process): Allocate process_info with new.
1958 (remove_process): Free process_info with delete.
1959 * linux-low.c (handle_extended_wait): Adjust.
1960 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1961 * server.c (handle_general_set): Adjust.
1962
1963 2017-11-16 Pedro Alves <palves@redhat.com>
1964
1965 * remote-utils.c (remote_close): Block SIGIO signals instead of
1966 uninstalling the SIGIO handler.
1967
1968 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1969
1970 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1971
1972 2017-11-16 Yao Qi <yao.qi@linaro.org>
1973
1974 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1975 (tic6x_store_gregset): Likewise.
1976 (tic6x_usrregs_info): Move it up.
1977
1978 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1979
1980 * Makefile.in: Update arch rules.
1981 * configure.srv: Explicitly mark arch/ files.
1982
1983 2017-11-13 Andreas Schwab <schwab@suse.de>
1984
1985 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1986 function.
1987 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1988
1989 2017-11-06 Pedro Alves <palves@redhat.com>
1990
1991 * config.in, configure: Regenerate.
1992
1993 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1994
1995 * target.c (struct thread_search): Remove.
1996 (thread_search_callback): Remove.
1997 (prepare_to_access_memory): Use for_each_thread instead of
1998 find_inferior. Inline code from thread_search_callback.
1999
2000 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2001
2002 * server.c (struct visit_actioned_threads_data): Remove.
2003 (visit_actioned_threads): Change prototype to take arguments
2004 directly.
2005 (resume): Use find_thread instead of find_inferior.
2006
2007 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2008
2009 * server.c (queue_stop_reply_callback): Change prototype, return
2010 void.
2011 (find_status_pending_thread_callback): Remove.
2012 (handle_status): Replace find_inferior with find_thread and
2013 for_each_thread.
2014
2015 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2016
2017 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2018 with REGNO.
2019 (aarch64_store_gregset): Likewise.
2020 (aarch64_fill_fpregset): Likewise.
2021 (aarch64_store_fpregset): Likewise.
2022
2023 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2024
2025 * gdbthread.h (find_thread, for_each_thread): New functions.
2026 * inferiors.c (thread_of_pid): Remove.
2027 (find_any_thread_of_pid): Use find_thread.
2028 * linux-low.c (num_lwps): Use for_each_thread.
2029
2030 2017-10-17 Yao Qi <yao.qi@linaro.org>
2031
2032 * Makefile.in: Remove one rule.
2033 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2034
2035 2017-10-17 Yao Qi <yao.qi@linaro.org>
2036
2037 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2038 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2039
2040 2017-10-17 Yao Qi <yao.qi@linaro.org>
2041
2042 * configure.srv: Rename arm.o with arch/arm.o.
2043
2044 2017-10-17 Yao Qi <yao.qi@linaro.org>
2045
2046 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2047 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2048 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2049 (arch-i386.o, arch-amd64.o): Remove rules.
2050 (arch/%.o): New rule.
2051 Update POSTCOMPILE and COMPILE.pre.
2052 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2053 * configure: Re-generated.
2054 * configure.srv: Replace arch-i386.o with arch/i386.o.
2055 Replace arch-amd64.o with arch/amd64.o.
2056
2057 2017-10-16 Yao Qi <yao.qi@linaro.org>
2058
2059 * configure: Regenerated.
2060
2061 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2062
2063 * inferiors.h: (struct inferior_list): Remove.
2064 (struct inferior_list_entry); Remove.
2065 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2066 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2067 get_first_inferior): Remove.
2068 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2069 find_inferior_id, find_inferior_in_random): Change signature.
2070 * inferiors.c (all_threads): Change type to
2071 std::list<thread_info *>.
2072 (get_thread): Remove macro.
2073 (find_inferior, find_inferior_id): Change signature, implement
2074 using find_thread.
2075 (find_inferior_in_random): Change signature, implement using
2076 find_thread_in_random.
2077 (for_each_inferior, for_each_inferior_with_data): Change
2078 signature, implement using for_each_thread.
2079 (add_inferior_to_list, remove_inferior): Remove.
2080 (add_thread, get_first_thread, thread_of_pid,
2081 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2082 (get_first_inferior, one_inferior_p, clear_inferior_list):
2083 Remove.
2084 (clear_inferiors, get_thread_process): Update.
2085 * gdbthread.h: Include <list>.
2086 (struct thread_info) <entry>: Remove field.
2087 <id>: New field.
2088 (all_threads): Change type to std::list<thread_info *>.
2089 (get_first_inferior): Add doc.
2090 (find_thread, for_each_thread, find_thread_in_random): New
2091 functions.
2092 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2093 * linux-arm-low.c (update_registers_callback): Update.
2094 * linux-low.c (second_thread_of_pid_p): Update.
2095 (kill_one_lwp_callback, linux_detach_lwp_callback,
2096 delete_lwp_callback, status_pending_p_callback, same_lwp,
2097 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2098 iterate_over_lwps, not_stopped_callback,
2099 resume_stopped_resumed_lwps, count_events_callback,
2100 select_singlestep_lwp_callback, select_event_lwp_callback,
2101 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2102 suspend_and_send_sigstop_callback, wait_for_sigstop,
2103 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2104 lwp_running, linux_set_resume_request, resume_status_pending_p,
2105 need_step_over_p, start_step_over, linux_resume_one_thread,
2106 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2107 reset_lwp_ptrace_options_callback): Update.
2108 * linux-mips-low.c (update_watch_registers_callback): Update.
2109 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2110 Update.
2111 (free_register_cache_thread_one): Remove.
2112 (regcache_release): Update.
2113 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2114 handle_qxfer_threads_worker): Update.
2115 (handle_query): Update, use list iterator.
2116 (visit_actioned_threads, handle_pending_status,
2117 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2118 clear_pending_status_callback, set_pending_status_callback,
2119 find_status_pending_thread_callback, handle_status,
2120 process_serial_event): Update.
2121 * target.c (thread_search_callback): Update.
2122 * thread-db.c (thread_db_get_tls_address): Update.
2123 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2124 Update.
2125 * win32-i386-low.c (update_debug_registers_callback): Update.
2126 * win32-low.c (delete_thread_info, child_delete_thread,
2127 continue_one_thread, suspend_one_thread,
2128 get_child_debug_event): Adjust.
2129
2130 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2131
2132 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2133 * inferiors.h: Include <list>.
2134 (struct process_info) <entry>: Remove field.
2135 <pid>: New field.
2136 (pid_of): Change macro to function.
2137 (ptid_of, lwpid_of): Remove macro.
2138 (all_processes): Change type to std::list<process_info *>.
2139 (ALL_PROCESSES): Remove macro.
2140 (for_each_process, find_process): New function.
2141 * inferiors.c (all_processes): Change type to
2142 std::list<process_info *>.
2143 (find_thread_process): Adjust.
2144 (add_process): Likewise.
2145 (remove_process): Likewise.
2146 (find_process_pid): Likewise.
2147 (get_first_process): Likewise.
2148 (started_inferior_callback): Remove.
2149 (have_started_inferiors_p): Adjust.
2150 (attached_inferior_callback): Remove.
2151 (have_attached_inferiors_p): Adjust.
2152 * linux-low.c (check_zombie_leaders): Likewise.
2153 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2154 (x86_linux_update_xmltarget): Adjust.
2155 * server.c (handle_query): Likewise.
2156 (gdb_reattached_process): Remove.
2157 (handle_status): Adjust.
2158 (kill_inferior_callback): Likewise.
2159 (detach_or_kill_inferior): Remove.
2160 (print_started_pid): Likewise.
2161 (print_attached_pid): Likewise.
2162 (detach_or_kill_for_exit): Update.
2163 (process_serial_event): Likewise.
2164 * linux-arm-low.c (arm_new_fork): Likewise.
2165
2166 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2167
2168 * dll.h: Include <list>.
2169 (struct dll_info): Add constructor.
2170 <entry>: Remove field.
2171 (all_dlls): Change type to std::list<dll_info>.
2172 * dll.c: Include <algorithm>.
2173 (get_dll): Remove macro.
2174 (all_dlls): Change type to std::list<dll_info *>.
2175 (free_one_dll): Remove.
2176 (match_dll): Likewise.
2177 (loaded_dll): Adjust.
2178 (unloaded_dll): Adjust to all_dlls type change, use
2179 std::find_if. Inline code from match_dll.
2180 (clear_dlls): Adjust to all_dlls type change.
2181 * server.c (emit_dll_description): Remove.
2182 (handle_qxfer_libraries): Adjust to all_dlls type change,
2183 integrate emit_dll_description's functionality.
2184
2185 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * linux-low.h (struct linux_target_ops) <delete_process>: New
2188 field.
2189 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2190 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2191 (struct linux_target_ops): Add delete_process callback.
2192 * linux-arm-low.c (arm_delete_process): New.
2193 (struct linux_target_ops): Add delete_process callback.
2194 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2195 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2196 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2197 * linux-mips-low.c (mips_linux_delete_process): New.
2198 (struct linux_target_ops): Add delete_process callback.
2199 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2200 * linux-s390-low.c (struct linux_target_ops): Likewise.
2201 * linux-sh-low.c (struct linux_target_ops): Likewise.
2202 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2203 * linux-tile-low.c (struct linux_target_ops): Likewise.
2204 * linux-x86-low.c (x86_linux_delete_process): New.
2205 (struct linux_target_ops): Add delete_process callback.
2206 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2207
2208 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2209
2210 * linux-aarch64-low.c (the_low_target): Add thread delete
2211 callback.
2212 * linux-arm-low.c (arm_delete_thread): New function.
2213 (the_low_target): Add thread delete callback.
2214 * linux-bfin-low.c (the_low_target): Likewise.
2215 * linux-crisv32-low.c (the_low_target): Likewise.
2216 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2217 set.
2218 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2219 field.
2220 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2221 * linux-mips-low.c (mips_linux_delete_thread): New function.
2222 (the_low_target): Add thread delete callback.
2223 * linux-ppc-low.c (the_low_target): Likewise.
2224 * linux-s390-low.c (the_low_target): Likewise.
2225 * linux-sh-low.c (the_low_target): Likewise.
2226 * linux-tic6x-low.c (the_low_target): Likewise.
2227 * linux-tile-low.c (the_low_target): Likewise.
2228 * linux-x86-low.c (the_low_target): Likewise.
2229 * linux-xtensa-low.c (the_low_target): Likewise.
2230
2231 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2232
2233 * win32-low.c: Include "common-inferior.h".
2234
2235 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2236
2237 * inferiors.c (set_inferior_cwd): New function.
2238 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2239 (handle_query): Inform that QSetWorkingDir is supported.
2240 * win32-low.c (create_process): Pass the inferior's cwd to
2241 CreateProcess.
2242
2243 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2244
2245 * inferiors.c (current_inferior_cwd): New global variable.
2246 (get_inferior_cwd): New function.
2247 * inferiors.h (struct process_info) <cwd>: New field.
2248
2249 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2250
2251 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2252 (OBS): Add gdb_tilde_expand.o.
2253
2254 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2255
2256 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2257 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2258
2259 2017-09-29 Pedro Alves <palves@redhat.com>
2260
2261 * ax.c (gdb_parse_agent_expr): Constify.
2262 * ax.h (gdb_parse_agent_expr): Constify.
2263 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2264 Constify.
2265 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2266 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2267 * remote-utils.h (read_ptid): Constify.
2268 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2269 (process_point_options, process_serial_event): Constify.
2270 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2271 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2272 (cmd_qtbuffer): Constify.
2273
2274 2017-09-29 Pedro Alves <palves@redhat.com>
2275
2276 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2277 fails.
2278
2279 2017-09-29 Pedro Alves <palves@redhat.com>
2280
2281 * linux-low.c (handle_extended_wait): Pass parent thread instead
2282 of process to thread_db_notice_clone.
2283 * linux-low.h (thread_db_notice_clone): Replace parent process
2284 parameter with parent thread parameter.
2285 * thread-db.c (find_one_thread): Add comment.
2286 (thread_db_notice_clone): Replace parent process parameter with
2287 parent thread parameter. Temporarily switch to the parent thread.
2288
2289 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2290
2291 * gdbthread.h: Include "common-gdbthread.h".
2292 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2293 "if" when validating the ptid.
2294 * remote-utils.c: Include "gdbthread.h".
2295 (prepare_resume_reply): Use "switch_to_thread".
2296 * target.c (done_accessing_memory): Likewise.
2297
2298 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2299
2300 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2301 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2302 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2303 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2304 s390x-gs-linux64-ipa.o to ipa_obj.
2305 * linux-s390-low.c (HWCAP_S390_GS): New define.
2306 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2307 New functions.
2308 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2309 (s390_arch_setup): Check for guarded-storage support and choose
2310 appropriate tdesc.
2311 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2312 init_registers_s390x_gs_linux64.
2313 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2314 enum value.
2315 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2316 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2317
2318 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2319
2320 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2321
2322 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2323
2324 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2325 (thread_db_thread_handle): Declare.
2326 * linux-low.c (linux_target_ops): Initialize thread_handle.
2327 * server.c (handle_qxfer_threads_worker): Add support for
2328 "handle" attribute.
2329 * target.h (struct target_ops): Add new function pointer,
2330 thread_handle.
2331 (target_thread_handle): Define.
2332 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2333 field in lwp.
2334 (thread_db_thread_handle): New function.
2335
2336 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2337
2338 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2339 * linux-low.h (thread_db_notice_clone): Declare.
2340 * thread-db.c (thread_db_notice_clone): New function.
2341
2342 2017-09-21 Pedro Alves <palves@redhat.com>
2343
2344 * server.c (gdb_read_memory, handle_status, process_serial_event)
2345 (handle_serial_event, handle_target_event): Adjust to
2346 set_desired_thread prototype change.
2347 * target.c (set_desired_thread): Remove 'use_general' parameter
2348 and adjust.
2349 * target.h (set_desired_thread): Remove 'use_general' parameter.
2350
2351 2017-09-20 Tom Tromey <tom@tromey.com>
2352
2353 * target.c (target_terminal::terminal_state): Define.
2354 (target_terminal::init): Rename from target_terminal_init.
2355 (target_terminal::inferior): Rename from
2356 target_terminal_inferior.
2357 (target_terminal::ours): Rename from target_terminal_ours.
2358 (target_terminal::ours_for_output, target_terminal::info): New.
2359
2360 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * server.c (accumulate_file_name_length): Remove.
2363 (emit_dll_description): Adjust to std::string change.
2364 (handle_qxfer_libraries): Use std::string to hold document.
2365
2366 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2367
2368 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2369 return type of xml_escape_text.
2370 * server.c (emit_dll_description): Likewise.
2371
2372 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * server.c (captured_main): Accept argument for --selftest.
2375 Update run_tests call.
2376 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2377 when registering selftests.
2378
2379 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2380
2381 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2382 instead of "VEC" for "target_desc.reg_defs".
2383 (regcache_cpy): Likewise.
2384 (registers_to_string): Likewise.
2385 (registers_from_string): Likewise.
2386 (find_regno): Likewise.
2387 (supply_regblock): Likewise.
2388 (regcache_raw_read_unsigned): Likewise.
2389 * tdesc.c (init_target_desc): Likewise.
2390 (tdesc_create_reg): Likewise.
2391 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2392 (struct target_desc) <reg_defs>: Convert to "std::vector".
2393 (target_desc): Do not initialize "reg_defs".
2394 (~target_desc): Update code to use "std::vector" instead of "VEC"
2395 for "target_desc.reg_defs".
2396 (operator==): Likewise.
2397
2398 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2399
2400 * inferiors.h (thread_to_gdb_id): Remove.
2401 * inferiors.c (thread_to_gdb_id): Remove.
2402 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2403 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2404 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2405 Likewise.
2406 * nto-low.c (nto_fetch_registers, nto_store_registers,
2407 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2408
2409 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2410
2411 * inferiors.h (gdb_id_to_thread_id): Remove.
2412 * inferiors.c (gdb_id_to_thread_id): Remove.
2413 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2414 removal. Move pid declaration closer to where it's used.
2415
2416 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2417
2418 * server.c (handle_detach): New function.
2419 (process_serial_event): Move code out, call handle_detach.
2420
2421 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * server.c (require_running): Rename to ...
2424 (require_running_or_return): ... this ...
2425 (require_running_or_break): ... and this.
2426 (handle_query, process_serial_event): Adjust.
2427
2428 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * linux-low.c (linux_set_resume_request): Remove unused
2431 variables.
2432
2433 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * server.c (first_thread_of): Remove.
2436 (process_serial_event): Replace usage of first_thread_of with
2437 find_any_thread_of_pid.
2438 * tracepoint.c (same_process_p): Remove.
2439 (gdb_agent_about_to_close): Replace usage of same_process_p with
2440 find_any_thread_of_pid.
2441 * linux-x86-low.c (same_process_callback): Remove.
2442 (x86_arch_setup_process_callback): Replace usage of
2443 same_process_callback with find_any_thread_of_pid.
2444 * thread-db.c (any_thread_of): Remove.
2445 (switch_to_process): Replace usage of any_thread_of with
2446 find_any_thread_of_pid.
2447 * inferiors.c (thread_pid_matches_callback): Remove.
2448 (find_thread_process): Adjust to use find_any_thread_of_pid.
2449
2450 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2451
2452 * regcache.c (get_thread_regcache): Guard calls to "memset"
2453 with "!VEC_empty".
2454
2455 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2456
2457 * linux-low.c (handle_extended_wait): Use
2458 "allocate_target_description" instead of "XNEW".
2459 * linux-x86-low.c (initialize_low_arch): Likewise.
2460
2461 2017-09-05 Yao Qi <yao.qi@linaro.org>
2462
2463 * configure.srv (srv_i386_regobj): Remove.
2464 (srv_amd64_regobj): Remove.
2465 (srv_regobj): Set it to "" for x86 non-linux targets.
2466 * linux-x86-tdesc.c (i386_linux_read_description):
2467 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2468 (init_registers_i386): Remove the declaration.
2469 (tdesc_i386): Remove the declaration.
2470 (lynx_i386_arch_setup): Call i386_create_target_description.
2471 * nto-x86-low.c: Likewise.
2472 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2473 [!__x86_64__]: include arch/i386.h.
2474 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2475
2476 2017-09-05 Yao Qi <yao.qi@linaro.org>
2477
2478 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2479 i386/amd64-XXX-linux from it.
2480
2481 2017-09-05 Yao Qi <yao.qi@linaro.org>
2482
2483 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2484 false.
2485 (ipa_amd64_linux_regobj): Remove.
2486 (ipa_x32_linux_regobj): Remove.
2487
2488 2017-09-05 Yao Qi <yao.qi@linaro.org>
2489
2490 * Makefile.in (arch-amd64.o): New rule.
2491 * configure.srv: Append arch-amd64.o.
2492 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2493 (get_ipa_tdesc): Call amd64_linux_read_description.
2494 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2495 and init_registers_amd64_XXX.
2496 * linux-x86-low.c (x86_linux_read_description): Call
2497 amd64_linux_read_description.
2498 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2499 (initialize_low_arch): Don't call init_registers_x32_XXX and
2500 init_registers_amd64_XXX.
2501 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2502 and tdesc_amd64_XXX.
2503 [__x86_64__] (amd64_tdesc_test): New function.
2504 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2505 and init_registers_amd64_XXX.
2506 * linux-x86-tdesc.c: Include arch/amd64.h.
2507 (xcr0_to_tdesc_idx): New function.
2508 (i386_linux_read_description): New function.
2509 (amd64_get_ipa_tdesc_idx): New function.
2510 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2511 (amd64_get_ipa_tdesc): Declare.
2512
2513 2017-09-05 Yao Qi <yao.qi@linaro.org>
2514
2515 * configure.srv (srv_i386_linux_xmlfiles): Remove
2516 i386/i386-XXX-linux.xml from it.
2517
2518 2017-09-05 Yao Qi <yao.qi@linaro.org>
2519
2520 * configure.srv: Set srv_i386_linux_regobj empty if $development
2521 is false.
2522 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2523 initialize_low_tdesc.
2524 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2525 with #if initialize_low_tdesc.
2526 * linux-x86-tdesc-selftest.c: New file.
2527 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2528
2529 2017-09-05 Yao Qi <yao.qi@linaro.org>
2530
2531 * Makefile.in (arch-i386.o): New rule.
2532 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2533 (x86_64-*-linux*): Likewise.
2534 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2535 include arch/i386.h.
2536 (i386_linux_read_description): Remove code and call
2537 i386_create_target_description.
2538 * tdesc.c (allocate_target_description): New function.
2539 * tdesc.h (set_tdesc_architecture): Remove declaration.
2540 (set_tdesc_osabi): Likewise.
2541
2542 2017-09-05 Yao Qi <yao.qi@linaro.org>
2543
2544 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2545 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2546 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2547 .xmltarget.
2548 * server.c (get_features_xml): Call tdesc_get_features_xml.
2549 * tdesc.c (set_tdesc_architecture): New function.
2550 (set_tdesc_osabi): New function.
2551 (tdesc_get_features_xml): New function.
2552 (tdesc_create_feature): Add an argument.
2553 * tdesc.h (struct target_desc) <features>: New field.
2554 <arch, osabi>: New field.
2555 (~target_desc): xfree features, arch, and osabi.
2556 (target_desc::oerator==): Don't compare .xmltarget.
2557 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2558 (set_tdesc_osabi): Likewise.
2559 (tdesc_get_features_xml): Likewise.
2560
2561 2017-09-05 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-x86-tdesc.c: Include selftest.h.
2564 (i386_tdesc_test): New function.
2565 (initialize_low_tdesc): Call selftests::register_test.
2566 * tdesc.h: Include regdef.h.
2567 (target_desc): Override operator == and !=.
2568
2569 2017-09-05 Yao Qi <yao.qi@linaro.org>
2570
2571 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2572 (ipa_obj): Likewise.
2573 * linux-i386-ipa.c: Include common/x86-xstate.h
2574 (get_ipa_tdesc): Call i386_linux_read_description.
2575 (initialize_low_tracepoint): Don't call init_registers_XXX
2576 functions, call initialize_low_tdesc instead.
2577 * linux-x86-low.c (x86_linux_read_description): Call
2578 i386_linux_read_description.
2579 (initialize_low_arch): Don't call init_registers_i386_XXX
2580 functions, call initialize_low_tdesc.
2581 * linux-x86-tdesc.c: New file.
2582 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2583 (i386_get_ipa_tdesc_idx): Declare.
2584 (i386_get_ipa_tdesc): Declare.
2585 (initialize_low_tdesc): Declare.
2586
2587 2017-09-05 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2590 instead of 0.
2591
2592 2017-09-05 Yao Qi <yao.qi@linaro.org>
2593
2594 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2595 * regcache.c (get_thread_regcache): Use VEC_length.
2596 (init_register_cache): Likewise.
2597 (regcache_cpy): Likewise.
2598 (registers_to_string): Iterate reg_defs via VEC_iterate.
2599 (find_regno): Likewise.
2600 (find_register_by_number): Use VEC_index.
2601 (register_size): Call find_register_by_number.
2602 (register_data): Call find_register_by_number.
2603 (supply_regblock): Use VEC_length.
2604 (regcache_raw_read_unsigned): Likewise.
2605 * tdesc.c (init_target_desc): Iterate reg_defs via
2606 VEC_iterate.
2607 (default_description): Update initializer.
2608 (copy_target_description): Don't update field num_registers.
2609 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2610 <num_registers>: Remove.
2611
2612 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2613
2614 * Makefile.in (.SECONDARY): Define target.
2615
2616 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * linux-low.c (linux_wait_1): Adjust.
2619 * server.c (queue_stop_reply_callback): Adjust.
2620
2621 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2622
2623 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2624 QEnvironmentUnset and QEnvironmentReset packets.
2625 (handle_query): Inform remote that QEnvironmentHexEncoded,
2626 QEnvironmentUnset and QEnvironmentReset are supported.
2627
2628 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2629
2630 * inferiors.h (inferior_target_data): Rename to ...
2631 (thread_target_data): ... this.
2632 (inferior_regcache_data): Rename to ...
2633 (thread_regcache_data): ... this.
2634 (set_inferior_regcache_data): Rename to ...
2635 (set_thread_regcache_data): ... this.
2636 * inferiors.c (inferior_target_data): Rename to ...
2637 (thread_target_data): ... this.
2638 (inferior_regcache_data): Rename to ...
2639 (thread_regcache_data): ... this.
2640 (set_inferior_regcache_data): Rename to ...
2641 (set_thread_regcache_data): ... this.
2642 (free_one_thread): Update.
2643 * linux-low.h (get_thread_lwp): Update.
2644 * regcache.c (get_thread_regcache): Update.
2645 (regcache_invalidate_thread): Update.
2646 (free_register_cache_thread): Update.
2647 * win32-i386-low.c (update_debug_registers_callback): Update.
2648 (win32_get_current_dr): Update.
2649 * win32-low.c (thread_rec): Update.
2650 (delete_thread_info): Update.
2651 (continue_one_thread): Update.
2652 (suspend_one_thread): Update.
2653
2654 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2655
2656 * inferiors.c (set_inferior_target_data): Remove.
2657 * inferiors.h (set_inferior_target_data): Remove.
2658
2659 2017-08-18 Yao Qi <yao.qi@linaro.org>
2660
2661 * Makefile.in (OBS): Add selftest.o.
2662 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2663 * configure, config.in: Re-generated.
2664 * server.c: Include common/sefltest.h.
2665 (captured_main): Handle option --selftest.
2666
2667 2017-08-09 Yao Qi <yao.qi@linaro.org>
2668
2669 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2670 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2671 i386-avx-mpx.o and i386-mmx.o.
2672 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2673 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2674 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2675 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2676 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2677 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2678 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2679 i386/amd64-avx-mpx.xml.
2680
2681 2017-08-09 Yao Qi <yao.qi@linaro.org>
2682
2683 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2684 and x32-avx-avx512.o.
2685 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2686 i386/x32-avx-avx512.xml.
2687
2688 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2689
2690 * tracepoint.h (enum class fast_tpoint_collect_result): New
2691 enumeration.
2692 (fast_tracepoint_collecting): Change return type to
2693 fast_tpoint_collect_result.
2694 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2695 * linux-low.h: Include tracepoint.h.
2696 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2697 fast_tpoint_collect_result.
2698 * linux-low.c (handle_tracepoints): Adjust.
2699 (linux_fast_tracepoint_collecting): Change return type to
2700 fast_tpoint_collect_result.
2701 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2702 linux_wait_1, stuck_in_jump_pad_callback,
2703 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2704 proceed_one_lwp): Adjust to type change.
2705
2706 2017-07-10 Yao Qi <yao.qi@linaro.org>
2707
2708 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2709
2710 2017-06-29 Yao Qi <yao.qi@linaro.org>
2711
2712 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2713 Remove.
2714 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2715
2716 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2717
2718 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2719
2720 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2721
2722 * linux-low.c (linux_create_inferior): Adjust code to access the
2723 environment information via 'gdb_environ' class.
2724 * lynx-low.c (lynx_create_inferior): Likewise.
2725 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2726 (get_environ): Return a pointer to 'our_environ'.
2727 (captured_main): Initialize 'our_environ'.
2728 * server.h (get_environ): Adjust prototype.
2729 * spu-low.c (spu_create_inferior): Adjust code to access the
2730 environment information via 'gdb_environ' class.
2731
2732 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2733
2734 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2735 usage of "register" keyword.
2736
2737 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2738
2739 * configure: Re-generate.
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 * Makefile.in (COMPILE.pre): Add "-x c++".
2748
2749 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2750
2751 * fork-child.c: Conditionally include <signal.h>.
2752
2753 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2754
2755 * server.c (handle_general_set): Handle new packet
2756 "QStartupWithShell".
2757 (handle_query): Add "QStartupWithShell" to the list of supported
2758 packets.
2759 (gdbserver_usage): Add help text explaining the
2760 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2761 options.
2762 (captured_main): Recognize and act upon the presence of the new
2763 CLI options.
2764
2765 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2766 Pedro Alves <palves@redhat.com>
2767
2768 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2769 * configure: Regenerate.
2770 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2771 "fork-inferior.o".
2772 (i[34567]86-*-lynxos*): Likewise.
2773 (spu*-*-*): Likewise.
2774 * fork-child.c: New file.
2775 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2776 and "environ.h".
2777 (linux_ptrace_fun): New function.
2778 (linux_create_inferior): Adjust function prototype to reflect
2779 change on "target.h". Adjust function code to use
2780 "fork_inferior".
2781 (linux_request_interrupt): Delete "signal_pid".
2782 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2783 (lynx_ptrace_fun): New function.
2784 (lynx_create_inferior): Adjust function prototype to reflect
2785 change on "target.h". Adjust function code to use
2786 "fork_inferior".
2787 * nto-low.c (nto_create_inferior): Adjust function prototype and
2788 code to reflect change on "target.h". Update comments.
2789 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2790 "common-terminal.h" and "environ.h".
2791 (terminal_fd): Moved to fork-child.c.
2792 (old_foreground_pgrp): Likewise.
2793 (restore_old_foreground_pgrp): Likewise.
2794 (last_status): Make it global.
2795 (last_ptid): Likewise.
2796 (our_environ): New variable.
2797 (startup_with_shell): Likewise.
2798 (program_name): Likewise.
2799 (program_argv): Rename to...
2800 (program_args): ...this.
2801 (wrapper_argv): New variable.
2802 (start_inferior): Delete function.
2803 (get_exec_wrapper): New function.
2804 (get_exec_file): Likewise.
2805 (get_environ): Likewise.
2806 (prefork_hook): Likewise.
2807 (post_fork_inferior): Likewise.
2808 (postfork_hook): Likewise.
2809 (postfork_child_hook): Likewise.
2810 (handle_v_run): Update code to deal with arguments coming from the
2811 remote host. Update calls from "start_inferior" to
2812 "create_inferior".
2813 (captured_main): Likewise. Initialize environment variable. Call
2814 "have_job_control".
2815 * server.h (post_fork_inferior): New prototype.
2816 (get_environ): Likewise.
2817 (last_status): Declare.
2818 (last_ptid): Likewise.
2819 (signal_pid): Likewise.
2820 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2821 (spu_ptrace_fun): New function.
2822 (spu_create_inferior): Adjust function prototype to reflect change
2823 on "target.h". Adjust function code to use "fork_inferior".
2824 * target.c (target_terminal_init): New function.
2825 (target_terminal_inferior): Likewise.
2826 (target_terminal_ours): Likewise.
2827 * target.h: Include <vector>.
2828 (struct target_ops) <create_inferior>: Update prototype.
2829 (create_inferior): Update macro.
2830 * utils.c (gdb_flush_out_err): New function.
2831 * win32-low.c (win32_create_inferior): Adjust function prototype
2832 and code to reflect change on "target.h".
2833
2834 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2835
2836 * inferiors.c (switch_to_thread): New function.
2837
2838 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2839
2840 * Makefile.in (SFILE): Add "common/job-control.c".
2841 (OBS): Add "job-control.o".
2842
2843 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2844
2845 * Makefile: Remove "@host_makefile_frag@".
2846
2847 2017-05-05 Pedro Alves <palves@redhat.com>
2848
2849 * configure: Regenerate.
2850
2851 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2852
2853 * configure: Regenerate.
2854
2855 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2856
2857 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2858 software_single_step change of return type to
2859 std::vector<CORE_ADDR>.
2860 * linux-low.c (install_software_single_step_breakpoints):
2861 Likewise.
2862 * linux-low.h (install_software_single_step_breakpoints):
2863 Likewise.
2864
2865 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2866
2867 * remote-utils.c: Include "gdb_termios.h" instead of
2868 "terminal.h".
2869 * terminal.h: Delete file.
2870
2871 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2872
2873 * server.c: Include <vector>.
2874 <program_argv, wrapper_argv>: Convert to std::vector.
2875 (start_inferior): Rewrite function to use C++.
2876 (handle_v_run): Likewise. Update code that calculates the argv
2877 based on the vRun packet; use C++.
2878 (captured_main): Likewise.
2879
2880 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2881
2882 * server.c (handle_v_cont): Initialize thread_resume::thread
2883 with null_ptid.
2884
2885 2017-04-05 Pedro Alves <palves@redhat.com>
2886
2887 * configure: Regenerate.
2888
2889 2017-04-05 Pedro Alves <palves@redhat.com>
2890
2891 * gdbreplay.c (sync_error): Constify.
2892 * linux-x86-low.c (push_opcode): Constify.
2893
2894 2017-04-05 Pedro Alves <palves@redhat.com>
2895
2896 * win32-low.c (get_child_debug_event)
2897 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2898 Report TARGET_WAITKIND_SPURIOUS instead.
2899
2900 2017-04-05 Pedro Alves <palves@redhat.com>
2901
2902 * remote-utils.c (remote_prepare, remote_open): Constify.
2903 * remote-utils.h (remote_prepare, remote_open): Constify.
2904 * server.c (captured_main): Constify 'port' handling.
2905
2906 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2907
2908 * Makefile.in (clean): Clear .deps.
2909
2910 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2911
2912 * .gitignore: Remove generated files, replace with wildcard.
2913 * (clean): Replace removal of generated files with wildcard.
2914 (version.c): Replace with...
2915 (version-generated.c): ...this.
2916 (xml-builtin.c): Replace with...
2917 (xml-builtin-generated.c): ...this.
2918 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2919 (%.c: *regformats*): Replace with...
2920 (%-generated.c: *regformats*): ...this.
2921
2922 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2923
2924 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2925 (xtensa_fill_gregset): Call collect_register_by_name for
2926 threadptr register.
2927 (xtensa_store_gregset): Call supply_register_by_name for
2928 threadptr register.
2929
2930 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2931
2932 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2933 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2934 (xtensa_store_gregset): Call supply_register for all registers in
2935 a0_regnum..a0_regnum + C0_NREGS range.
2936
2937 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2938
2939 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2940 (ax-ipa.o: ax.c): Remove.
2941 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2942 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2943 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2944 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2945 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2946
2947 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2950 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2951 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2952 (errors-ipa.o: ../common/errors.c): Remove.
2953 (format-ipa.o: ../common/format.c): Remove.
2954 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2955
2956 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2957
2958 * Makefile.in (%-ipa.o: %.c): New rule.
2959 (tracepoint-ipa.o: tracepoint.c): Remove.
2960 (utils-ipa.o: utils.c): Remove.
2961 (remote-utils-ipa.o: remote-utils.c): Remove.
2962 (regcache-ipa.o: regcache.c): Remove.
2963 (i386-linux-ipa.o: i386-linux.c): Remove.
2964 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2965 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2966 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2967 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2968 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2969 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2970 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2971 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2972 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2973 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2974 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2975 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2976 (aarch64-ipa.o: aarch64.c): Remove.
2977 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2978 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2979 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2980 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2981 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2982 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2983 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2984 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2985 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2986 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2987 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2988 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2989 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2990 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2991 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2992 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2993 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2994 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2995 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2996 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2997 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2998 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2999 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3000 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3001 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3002 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3003 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3004 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3005 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3006 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3007 (tdesc-ipa.o: tdesc.c): Remove.
3008 (x32-linux-ipa.o: x32-linux.c): Remove.
3009 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3010 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3011
3012 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3013
3014 * Makefile.in (%.o: ../arch/%.c): New rule.
3015 (arm.o: ../arch/arm.c): Remove.
3016 (arm-linux.o: ../arch/arm-linux.c): Remove.
3017 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3018 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3019
3020 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3021
3022 * Makefile.in (%.o: ../nat/%.c): New rule.
3023 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3024 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3025 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3026 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3027 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3028 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3029 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3030 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3031 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3032 (linux-personality.o: ../nat/linux-personality.c): Remove.
3033 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3034 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3035 (x86-linux.o: ../nat/x86-linux.c): Remove.
3036 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3037 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3038
3039 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3040
3041 * Makefile.in (%.o: ../common/%.c): New rule.
3042 (signals.o: ../common/signals.c): Remove.
3043 (print-utils.o: ../common/print-utils.c): Remove.
3044 (rsp-low.o: ../common/rsp-low.c): Remove.
3045 (common-utils.o: ../common/common-utils.c): Remove.
3046 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3047 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3048 (vec.o: ../common/vec.c): Remove.
3049 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3050 (xml-utils.o: ../common/xml-utils.c): Remove.
3051 (ptid.o: ../common/ptid.c): Remove.
3052 (buffer.o: ../common/buffer.c): Remove.
3053 (format.o: ../common/format.c): Remove.
3054 (filestuff.o: ../common/filestuff.c): Remove.
3055 (agent.o: ../common/agent.c): Remove.
3056 (errors.o: ../common/errors.c): Remove.
3057 (environ.o: ../common/environ.c): Remove.
3058 (common-debug.o: ../common/common-debug.c): Remove.
3059 (cleanups.o: ../common/cleanups.c): Remove.
3060 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3061 (fileio.o: ../common/fileio.c): Remove.
3062 (common-regcache.o: ../common/common-regcache.c): Remove.
3063 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3064 (new-op.o: ../common/new-op.c): Remove.
3065 (btrace-common.o: ../common/btrace-common.c): Remove.
3066
3067 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3068
3069 * Makefile.in (%.o: ../target/%.c): New rule.
3070 (waitstatus.o: ../target/waitstatus.c): Remove.
3071
3072 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3073
3074 * Makefile.in
3075 (%.c: ../regformats/%.dat,
3076 (%.c: ../regformats/arm/%.dat,
3077 (%.c: ../regformats/i386/%.dat,
3078 (%.c: ../regformats/rs6000/%.dat): New rules.
3079 (aarch64.c): Remove.
3080 (reg-arm.c): Remove.
3081 (arm-with-iwmmxt.c): Remove.
3082 (arm-with-vfpv2.c): Remove.
3083 (arm-with-vfpv3.c): Remove.
3084 (arm-with-neon.c): Remove.
3085 (reg-bfin.c): Remove.
3086 (reg-cris.c): Remove.
3087 (reg-crisv32.c): Remove.
3088 (i386.c): Remove.
3089 (i386-linux.c): Remove.
3090 (i386-avx.c): Remove.
3091 (i386-avx-linux.c): Remove.
3092 (i386-avx-avx512.c): Remove.
3093 (i386-avx-avx512-linux.c): Remove.
3094 (i386-mpx.c): Remove.
3095 (i386-mpx-linux.c): Remove.
3096 (i386-avx-mpx-avx512-pku.c): Remove.
3097 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3098 (i386-avx-mpx.c): Remove.
3099 (i386-avx-mpx-linux.c): Remove.
3100 (i386-mmx.c): Remove.
3101 (i386-mmx-linux.c): Remove.
3102 (reg-ia64.c): Remove.
3103 (reg-m32r.c): Remove.
3104 (reg-m68k.c): Remove.
3105 (reg-cf.c): Remove.
3106 (mips-linux.c): Remove.
3107 (mips-dsp-linux.c): Remove.
3108 (mips64-linux.c): Remove.
3109 (mips64-dsp-linux.c): Remove.
3110 (nios2-linux.c): Remove.
3111 (powerpc-32.c): Remove.
3112 (powerpc-32l.c): Remove.
3113 (powerpc-altivec32l.c): Remove.
3114 (powerpc-cell32l.c): Remove.
3115 (powerpc-vsx32l.c): Remove.
3116 (powerpc-isa205-32l.c): Remove.
3117 (powerpc-isa205-altivec32l.c): Remove.
3118 (powerpc-isa205-vsx32l.c): Remove.
3119 (powerpc-e500l.c): Remove.
3120 (powerpc-64l.c): Remove.
3121 (powerpc-altivec64l.c): Remove.
3122 (powerpc-cell64l.c): Remove.
3123 (powerpc-vsx64l.c): Remove.
3124 (powerpc-isa205-64l.c): Remove.
3125 (powerpc-isa205-altivec64l.c): Remove.
3126 (powerpc-isa205-vsx64l.c): Remove.
3127 (s390-linux32.c): Remove.
3128 (s390-linux32v1.c): Remove.
3129 (s390-linux32v2.c): Remove.
3130 (s390-linux64.c): Remove.
3131 (s390-linux64v1.c): Remove.
3132 (s390-linux64v2.c): Remove.
3133 (s390-te-linux64.c): Remove.
3134 (s390-vx-linux64.c): Remove.
3135 (s390-tevx-linux64.c): Remove.
3136 (s390x-linux64.c): Remove.
3137 (s390x-linux64v1.c): Remove.
3138 (s390x-linux64v2.c): Remove.
3139 (s390x-te-linux64.c): Remove.
3140 (s390x-vx-linux64.c): Remove.
3141 (s390x-tevx-linux64.c): Remove.
3142 (tic6x-c64xp-linux.c): Remove.
3143 (tic6x-c64x-linux.c): Remove.
3144 (tic6x-c62x-linux.c): Remove.
3145 (reg-sh.c): Remove.
3146 (reg-sparc64.c): Remove.
3147 (reg-spu.c): Remove.
3148 (amd64.c): Remove.
3149 (amd64-linux.c): Remove.
3150 (amd64-avx.c): Remove.
3151 (amd64-avx-linux.c): Remove.
3152 (amd64-avx-avx512.c): Remove.
3153 (amd64-avx-avx512-linux.c): Remove.
3154 (amd64-mpx.c): Remove.
3155 (amd64-mpx-linux.c): Remove.
3156 (amd64-avx-mpx-avx512-pku.c): Remove.
3157 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3158 (amd64-avx-mpx.c): Remove.
3159 (amd64-avx-mpx-linux.c): Remove.
3160 (x32.c): Remove.
3161 (x32-linux.c): Remove.
3162 (x32-avx.c): Remove.
3163 (x32-avx-linux.c): Remove.
3164 (x32-avx-avx512.c): Remove.
3165 (x32-avx-avx512-linux.c): Remove.
3166 (reg-xtensa.c): Remove.
3167 (reg-tilegx.c): Remove.
3168 (reg-tilegx32.c): Remove.
3169
3170 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3171
3172 * Makefile.in (SFILES): Add "common/environ.c".
3173 (OBJS): Add "common/environ.h".
3174
3175 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3176
3177 * configure.ac: Check if the fs_base and gs_base members of
3178 `struct user_regs_struct' exist.
3179 * config.in: Regenerated.
3180 * configure: Likewise.
3181
3182 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3183
3184 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3185 target_read_memory.
3186 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3187 (get_next_pcs_syscall_next_pc): Likewise.
3188
3189 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3190
3191 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3192 * nto-x86-low.c: Likewise.
3193
3194 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3195
3196 * Makefile.in: Include disable-implicit-rules.mk.
3197
3198 2016-11-23 Pedro Alves <palves@redhat.com>
3199
3200 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3201 (debug_vprintf): Use std::chrono::steady_clock instead of
3202 gettimeofday. Use '.' instead of ':'.
3203 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3204 (get_timestamp): Use std::chrono::steady_clock instead of
3205 gettimeofday.
3206
3207 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3208
3209 * Makefile.in: Fix whitespace formatting.
3210
3211 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3212
3213 * Makefile.in (SFILES, OBS): Flatten list and order
3214 alphabetically.
3215
3216 2016-11-23 Pedro Alves <palves@redhat.com>
3217
3218 * event-loop.c (handle_file_event): Use warning.
3219 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3220 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3221 Use warning.
3222
3223 2016-11-23 Pedro Alves <palves@redhat.com>
3224
3225 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3226 output.
3227 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3228 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3229 debug_printf and debug_flush for debug output.
3230 * server.c (handle_general_set): Likewise.
3231 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3232 output.
3233
3234 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3235
3236 * Makefile.in (.c.o): Replace rule with ...
3237 (%.o: %.c): ... this one.
3238
3239 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3242 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3243 make.
3244 * configure.ac: Remove checks for the make program.
3245 * configure: Re-generate.
3246
3247 2016-10-28 Pedro Alves <palves@redhat.com>
3248
3249 * Makefile.in (CXX_DIALECT): Get from configure.
3250 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3251 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3252 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3253 * config.in: Regenerate.
3254 * configure: Regenerate.
3255
3256 2016-10-27 Yao Qi <yao.qi@linaro.org>
3257
3258 * linux-low.c (linux_supports_range_stepping): Return true if
3259 can_software_single_step return true.
3260
3261 2016-10-27 Yao Qi <yao.qi@linaro.org>
3262
3263 * inferiors.c (find_inferior_in_random): New function.
3264 * inferiors.h (find_inferior_in_random): Declare.
3265 * linux-low.c (linux_wait_for_event_filtered): Call
3266 find_inferior_in_random instead of find_inferior.
3267
3268 2016-10-27 Yao Qi <yao.qi@linaro.org>
3269
3270 * linux-low.c (linux_wait_1): If single-step breakpoints are
3271 inserted, remove them.
3272
3273 2016-10-26 Pedro Alves <palves@redhat.com>
3274
3275 * linux-low.c (handle_extended_wait): Link parent/child fork
3276 threads.
3277 (linux_wait_1): Unlink them.
3278 (linux_set_resume_request): Ignore resume requests for
3279 already-resumed and unhandled fork child threads.
3280 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3281 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3282 New functions.
3283 (handle_v_requests) <vCont>: Don't call require_running.
3284 * server.h (in_queued_stop_replies): New declaration.
3285
3286 2016-10-24 Yao Qi <yao.qi@linaro.org>
3287
3288 PR server/20733
3289 * linux-aarch64-low.c (append_insns): Cast the return value to
3290 'uint32_t *'.
3291
3292 2016-10-10 Yao Qi <yao.qi@linaro.org>
3293
3294 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3295
3296 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3297
3298 * target.c (target_supports_multi_process): New function, moved
3299 from...
3300 * target.h (target_supports_multi_process): ... here. Remove
3301 macro.
3302
3303 2016-10-05 Tom Tromey <tom@tromey.com>
3304
3305 PR remote/20655:
3306 * tracepoint.c (handle_tracepoint_bkpts): Check
3307 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3308
3309 2016-10-05 Yao Qi <yao.qi@linaro.org>
3310
3311 * configure.srv: Update the path of arm-*.xml files.
3312
3313 2016-10-05 Terry Guo <terry.guo@arm.com>
3314 Yao Qi <yao.qi@linaro.org>
3315
3316 * Makefile.in: Adjust the path of rules.
3317 * configure.srv: Update the path of xml files.
3318 * regformats/arm-with-iwmmxt.dat: Regenerated.
3319 * regformats/arm-with-neon.dat: Likewise.
3320 * regformats/arm-with-vfpv2.dat: Likewise.
3321 * regformats/arm-with-vfpv3.dat Likewise.
3322
3323 2016-09-30 Yao Qi <yao.qi@linaro.org>
3324
3325 PR gdbserver/20627
3326 * target.c (target_stop_and_wait): Don't call
3327 target_continue_no_signal, use resume_stop instead.
3328
3329 2016-09-26 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-low.c (linux_wait_1): Call debug_exit.
3332
3333 2016-09-23 Pedro Alves <palves@redhat.com>
3334
3335 * Makefile.in (SFILES): Add common/new-op.c.
3336 (OBS): Add common/new-op.o.
3337 (new-op.o): New rule.
3338
3339 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3340
3341 * .gitinore: Ignore more files.
3342
3343 2016-09-21 Yao Qi <yao.qi@linaro.org>
3344
3345 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3346 23.
3347
3348 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3349
3350 * server.c (start_inferior): Call target_mourn_inferior instead of
3351 mourn_inferior; pass ptid_t argument to it.
3352 (resume): Likewise.
3353 (handle_target_event): Likewise.
3354 * target.c (target_mourn_inferior): New function.
3355 * target.h (mourn_inferior): Delete macro.
3356
3357 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3358
3359 * linux-low.c (lwp_is_stepping): New function.
3360
3361 2016-09-06 Carl Love <cel@us.ibm.com>
3362
3363 * server.c (start_inferior): Fixed comment, requested comment change
3364 didn't get updated correctly. Removed reference to ptrace () call as
3365 it is only true on Linux systems.
3366
3367 2016-09-06 Carl Love <cel@us.ibm.com>
3368
3369 * server.c (start_inferior): Do not call
3370 function target_post_create_inferior () if the
3371 inferior process has already exited.
3372
3373 2016-09-05 Pedro Alves <palves@redhat.com>
3374
3375 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3376 (COMPILE.pre, CC_LD): Use CXX directly.
3377 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3378 * acinclude.m4: Don't include build-with-cxx.m4.
3379 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3380 * configure: Regenerate.
3381
3382 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3383
3384 PR gdb/19495
3385 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3386 call writing data to own_buf.
3387
3388 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3389
3390 * target.c (mywait): Call target_wait instead of
3391 the_target->wait.
3392 (target_wait): New function.
3393
3394 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3395
3396 * server.c (start_inferior): New variable 'ptid'. Replace calls
3397 to the_target->resume by target_continue{,_no_signal}, depending
3398 on the case.
3399 * target.c (target_stop_and_wait): Call target_continue_no_signal
3400 instead of the_target->resume.
3401 (target_continue): New function.
3402
3403 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3404
3405 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3406
3407 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3408
3409 PR server/20491
3410 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3411 ps_prochandle.
3412 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3413 * linux-arm-low.c (ps_get_thread_area): Likewise.
3414 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3415 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3416 * linux-mips-low.c (ps_get_thread_area): Likewise.
3417 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3418 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3419 * linux-x86-low.c (ps_get_thread_area): Likewise.
3420 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3421
3422 2016-08-19 Pedro Alves <palves@redhat.com>
3423
3424 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3425
3426 2016-08-19 Pedro Alves <palves@redhat.com>
3427
3428 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3429 comment. Use memcpy instead of casting through unsigned long.
3430
3431 2016-08-19 Pedro Alves <palves@redhat.com>
3432
3433 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3434 allocating around 0x80000000.
3435
3436 2016-08-19 Pedro Alves <palves@redhat.com>
3437
3438 PR gdb/20415
3439 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3440 (x32-avx512-linux-ipa.o): New rules.
3441 * configure.ac (x86_64-*-linux*): New x32 check.
3442 * configure.srv (ipa_x32_linux_regobj): New.
3443 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3444 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3445 descriptions.
3446 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3447 descriptions.
3448 * configure: Regenerate.
3449
3450 2016-08-09 Pedro Alves <palves@redhat.com>
3451
3452 PR gdb/18653
3453 * Makefile.in (OBS): Add signals-state-save-restore.o.
3454 (signals-state-save-restore.o): New rule.
3455 * config.in: Regenerate.
3456 * configure: Regenerate.
3457 * linux-low.c: Include "signals-state-save-restore.h".
3458 (linux_create_inferior): Call
3459 restore_original_signals_state.
3460 * server.c: Include "dispositions-save-restore.h".
3461 (captured_main): Call save_original_signals_state.
3462
3463 2016-08-05 Pedro Alves <palves@redhat.com>
3464
3465 * configure: Regenerate.
3466
3467 2016-08-04 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-low.c (regsets_fetch_inferior_registers): Check
3470 errno is ESRCH or not.
3471
3472 2016-08-02 Yao Qi <yao.qi@linaro.org>
3473
3474 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3475 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3476 (thread_db_load_search): Update.
3477 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3478 td_ta_set_event and td_ta_event_getmsg.
3479
3480 2016-07-26 Pedro Alves <palves@redhat.com>
3481
3482 PR server/20414
3483 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3484 of unsigned long for 64-bit registers and use uint32_t instead of
3485 unsigned int for 32-bit registers.
3486
3487 2016-07-26 Pedro Alves <palves@redhat.com>
3488
3489 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3490 to 'ptrace'.
3491
3492 2016-07-21 Tom Tromey <tom@tromey.com>
3493
3494 * configure: Rebuild.
3495
3496 2016-07-21 Yao Qi <yao.qi@linaro.org>
3497
3498 * mem-break.c (find_gdb_breakpoint): Cast bp to
3499 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3500
3501 2016-07-21 Yao Qi <yao.qi@linaro.org>
3502
3503 * server.c (handle_v_requests): Support s and S actions
3504 if target_supports_software_single_step return true.
3505
3506 2016-07-21 Yao Qi <yao.qi@linaro.org>
3507
3508 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3509 is resume_step, call maybe_hw_step.
3510 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3511 and unstop them.
3512 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3513 breakpoints or not.
3514 (proceed_one_lwp): If resume request is resume_step, install
3515 reinsert breakpoints and call maybe_hw_step.
3516
3517 2016-07-21 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-low.c (proceed_one_lwp): Declare.
3520 (linux_resume_one_thread): Remove local variable 'step'.
3521 Lift code enqueue signal. Call proceed_one_lwp instead of
3522 linux_resume_one_lwp.
3523
3524 2016-07-21 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-low.c (linux_resume_one_thread): Call
3527 enqueue_pending_signal.
3528
3529 2016-07-21 Yao Qi <yao.qi@linaro.org>
3530
3531 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3532 * inferiors.c (do_restore_current_thread_cleanup): New function.
3533 (make_cleanup_restore_current_thread): Likewise.
3534 * linux-low.c (install_software_single_step_breakpoints): Call
3535 make_cleanup_restore_current_thread. Switch current_thread to
3536 thread.
3537
3538 2016-07-21 Yao Qi <yao.qi@linaro.org>
3539
3540 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3541 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3542 (clone_one_breakpoint): Likewise.
3543 (delete_reinsert_breakpoints): Change parameter to thread.
3544 Callers updated.
3545 (has_reinsert_breakpoints): Likewise.
3546 (uninsert_reinsert_breakpoints): Likewise.
3547 (reinsert_reinsert_breakpoints): Likewise.
3548 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3549 (delete_reinsert_breakpoints): Likewise.
3550 (reinsert_reinsert_breakpoints): Likewise.
3551 (uninsert_reinsert_breakpoints): Likewise.
3552 (has_reinsert_breakpoints): Likewise.
3553
3554 2016-07-21 Yao Qi <yao.qi@linaro.org>
3555
3556 * inferiors.c (get_thread_process): Make parameter const.
3557 * inferiors.h (get_thread_process): Update declaration.
3558 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3559 Add new parameters child_thread and parent_thread. Callers
3560 updated.
3561 * mem-break.h (clone_all_breakpoints): Update declaration.
3562
3563 2016-07-21 Yao Qi <yao.qi@linaro.org>
3564
3565 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3566 <command_list, handler>: Remove.
3567 (struct gdb_breakpoint): New.
3568 (struct other_breakpoint): New.
3569 (struct reinsert_breakpoint): New.
3570 (is_gdb_breakpoint): New function.
3571 (any_persistent_commands): Update command_list if
3572 is_gdb_breakpoint returns true.
3573 (set_breakpoint): Create breakpoints according to their types.
3574 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3575 (set_gdb_breakpoint_1): Likewise.
3576 (set_gdb_breakpoint): Likewise.
3577 (clear_breakpoint_conditions): Change parameter type to
3578 'struct gdb_breakpoint *'.
3579 (clear_breakpoint_commands): Likewise.
3580 (clear_breakpoint_conditions_and_commands): Likewise.
3581 (add_condition_to_breakpoint): Likewise.
3582 (add_breakpoint_condition): Likewise.
3583 (add_commands_to_breakpoint): Likewise.
3584 (check_breakpoints): Check other_breakpoint.
3585 (clone_one_breakpoint): Clone breakpopint according to its type.
3586 * mem-break.h (struct gdb_breakpoint): Declare.
3587 (set_gdb_breakpoint): Update declaration.
3588 (clear_breakpoint_conditions_and_commands): Likewise.
3589 (add_breakpoint_condition): Likewise.
3590 (add_breakpoint_commands): Likewise.
3591 * server.c (process_point_options): Change parameter type to
3592 'struct gdb_breakpoint *'.
3593
3594 2016-07-21 Yao Qi <yao.qi@linaro.org>
3595
3596 * mem-break.c (set_breakpoint_at): Rename it to ...
3597 (set_breakpoint_type_at): ... it.
3598 (set_breakpoint_at): Call set_breakpoint_type_at.
3599 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3600 * mem-break.h (set_breakpoint_at): Update comments.
3601
3602 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3603
3604 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3605 to buf parameter.
3606 (nios2_store_gregset): Likewise.
3607
3608 2016-07-01 Pedro Alves <palves@redhat.com>
3609 Antoine Tremblay <antoine.tremblay@ericsson.com>
3610
3611 * linux-low.c: Change interface to take the target lwp_info
3612 pointer directly and return void. Handle detaching from a zombie
3613 thread.
3614 (linux_detach_lwp_callback): New function.
3615 (linux_detach): Detach from the leader thread after detaching from
3616 the clone threads.
3617
3618 2016-06-28 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3621 for variable new_offset.
3622 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3623 (aarch64_ftrace_insn_reloc_cb): Likewise.
3624 (aarch64_ftrace_insn_reloc_tb): Likewise.
3625 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3626 PRIx64 instead of PRIx32.
3627
3628 2016-06-28 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3631 (the_low_target): Install arm_get_syscall_trapinfo.
3632
3633 2016-06-28 Yao Qi <yao.qi@linaro.org>
3634
3635 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3636 function.
3637 (the_low_target): Install aarch64_get_syscall_trapinfo.
3638
3639 2016-06-28 Yao Qi <yao.qi@linaro.org>
3640
3641 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3642 Callers updated.
3643 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3644 Remove parameter sysno.
3645 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3646 sysret.
3647
3648 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3649
3650 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3651 (s390_emit_ne_goto): Likewise.
3652 (s390_emit_lt_goto): Likewise.
3653 (s390_emit_le_goto): Likewise.
3654 (s390_emit_gt_goto): Likewise.
3655 (s390_emit_ge_goto): Likewise.
3656 (s390x_emit_eq_goto): Likewise.
3657 (s390x_emit_ne_goto): Likewise.
3658 (s390x_emit_lt_goto): Likewise.
3659 (s390x_emit_le_goto): Likewise.
3660 (s390x_emit_gt_goto): Likewise.
3661 (s390x_emit_ge_goto): Likewise.
3662 (s390_emit_ops_impl): Mark variable static.
3663 (s390x_emit_ops): Likewise.
3664
3665 2016-06-17 Yao Qi <yao.qi@linaro.org>
3666
3667 * linux-low.c (handle_extended_wait): Call
3668 uninsert_reinsert_breakpoints for the parent process. Remove
3669 reinsert breakpoints from the child process. Reinsert them to
3670 the parent process when vfork is done.
3671 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3672 (reinsert_reinsert_breakpoints): New function.
3673 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3674 (reinsert_reinsert_breakpoints): Declare.
3675
3676 2016-06-17 Yao Qi <yao.qi@linaro.org>
3677
3678 * linux-low.c (handle_extended_wait): If the parent is doing
3679 step-over, remove the reinsert breakpoints from the forked child.
3680
3681 2016-06-17 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-low.c (unsuspend_all_lwps): Declare.
3684 (linux_low_filter_event): If thread exited, call finish_step_over.
3685 If step-over is finished, unsuspend other threads.
3686
3687 2016-06-17 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-low.c (linux_resume_one_lwp_throw): Assert
3690 has_reinsert_breakpoints returns false.
3691 * mem-break.c (delete_disabled_breakpoints): Assert
3692 bp type isn't reinsert_breakpoint.
3693
3694 2016-06-17 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-low.c (maybe_hw_step): New function.
3697 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3698 (finish_step_over): Switch current_thread to lwp temporarily,
3699 and assert has_reinsert_breakpoints returns true.
3700 (proceed_one_lwp): Call maybe_hw_step.
3701 * mem-break.c (has_reinsert_breakpoints): New function.
3702 * mem-break.h (has_reinsert_breakpoints): Declare.
3703
3704 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3705
3706 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3707
3708 2016-05-17 Yao Qi <yao.qi@linaro.org>
3709
3710 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3711 instead of find_inferior.
3712
3713 2016-05-05 Yao Qi <yao.qi@linaro.org>
3714
3715 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3716 Initialize res to zero.
3717
3718 2016-05-05 Yao Qi <yao.qi@linaro.org>
3719
3720 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3721 to uint32_t.
3722
3723 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3724
3725 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3726 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3727 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3728
3729 2016-04-28 Par Olsson <par.olsson@windriver.com>
3730 Simon Marchi <simon.marchi@ericsson.com>
3731
3732 * tracepoint.c (write_inferior_int8): New function.
3733 (cmd_qtenable_disable): Write enable flag using
3734 write_inferior_int8.
3735
3736 2016-04-25 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3739 (need_step_over_p): Return zero if the LWP has pending signals
3740 can be delivered on software single step target.
3741
3742 2016-04-25 Yao Qi <yao.qi@linaro.org>
3743
3744 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3745 return instead of error.
3746
3747 2016-04-22 Yao Qi <yao.qi@linaro.org>
3748
3749 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3750 to 23.
3751
3752 2016-04-22 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3755 signal when stepping over breakpoint with software single
3756 step.
3757
3758 2016-04-21 Pedro Alves <palves@redhat.com>
3759
3760 * linux-s390-low.c (s390_collect_ptrace_register)
3761 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3762 add casts.
3763 (s390_check_regset): Use void * instead of gdb_byte *.
3764
3765 2016-04-20 Pedro Alves <palves@redhat.com>
3766
3767 * configure: Renegerate.
3768
3769 2016-04-20 Yao Qi <yao.qi@linaro.org>
3770
3771 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3772 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3773 number 16.
3774 (arm_store_gregset): Likewise.
3775
3776 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3777
3778 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3779 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3780 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3781 (amd64-avx-mpx-linux.c): New rules.
3782 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3783 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3784 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3785 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3786 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3787 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3788 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3789 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3790 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3791 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3792 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3793 * linux-x86-low.c (x86_linux_read_description): Add case for
3794 X86_XSTATE_AVX_MPX_MASK.
3795 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3796 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3797 init_registers_i386_avx_mpx_linux.
3798 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3799 (initialize_low_tracepoint): Call
3800 init_registers_i386_avx_mpx_linux.
3801 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3802 (initialize_low_tracepoint): Call
3803 init_registers_amd64_avx_mpx_linux.
3804 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3805 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3806 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3807 declarations.
3808
3809 2016-04-18 Pedro Alves <palves@redhat.com>
3810
3811 * configure: Regenerate.
3812
3813 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3814
3815 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3816 (aarch64_emit_sub): Likewise.
3817
3818 2016-04-12 Pedro Alves <palves@redhat.com>
3819
3820 * utils.c (prepare_to_throw_exception): Delete.
3821
3822 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3823
3824 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3825
3826 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3827
3828 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3829
3830 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3831
3832 * linux-aarch64-ipa.c: Add <elf.h> include.
3833 * linux-ppc-ipa.c: Add <elf.h> include.
3834 * linux-s390-ipa.c: Add <elf.h> include.
3835
3836 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3837
3838 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3839 (get_raw_reg_ptr): Likewise.
3840 (get_trace_state_variable_value_ptr): Likewise.
3841 (set_trace_state_variable_value_ptr): Likewise.
3842 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3843 char *.
3844
3845 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3846 Marcin Kościelnicki <koriakin@0x04.net>
3847
3848 PR/17221
3849 * linux-ppc-low.c (emit_insns): New function.
3850 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3851 (ppc_emit_prologue): New function.
3852 (ppc_emit_epilogue): New function.
3853 (ppc_emit_add): New function.
3854 (ppc_emit_sub): New function.
3855 (ppc_emit_mul): New function.
3856 (ppc_emit_lsh): New function.
3857 (ppc_emit_rsh_signed): New function.
3858 (ppc_emit_rsh_unsigned): New function.
3859 (ppc_emit_ext): New function.
3860 (ppc_emit_zero_ext): New function.
3861 (ppc_emit_log_not): New function.
3862 (ppc_emit_bit_and): New function.
3863 (ppc_emit_bit_or): New function.
3864 (ppc_emit_bit_xor): New function.
3865 (ppc_emit_bit_not): New function.
3866 (ppc_emit_equal): New function.
3867 (ppc_emit_less_signed): New function.
3868 (ppc_emit_less_unsigned): New function.
3869 (ppc_emit_ref): New function.
3870 (ppc_emit_const): New function.
3871 (ppc_emit_reg): New function.
3872 (ppc_emit_pop): New function.
3873 (ppc_emit_stack_flush): New function.
3874 (ppc_emit_swap): New function.
3875 (ppc_emit_stack_adjust): New function.
3876 (ppc_emit_call): New function.
3877 (ppc_emit_int_call_1): New function.
3878 (ppc_emit_void_call_2): New function.
3879 (ppc_emit_if_goto): New function.
3880 (ppc_emit_goto): New function.
3881 (ppc_emit_eq_goto): New function.
3882 (ppc_emit_ne_goto): New function.
3883 (ppc_emit_lt_goto): New function.
3884 (ppc_emit_le_goto): New function.
3885 (ppc_emit_gt_goto): New function.
3886 (ppc_emit_ge_goto): New function.
3887 (ppc_write_goto_address): New function.
3888 (ppc_emit_ops_impl): New static variable.
3889 (ppc64v1_emit_prologue): New function.
3890 (ppc64v2_emit_prologue): New function.
3891 (ppc64_emit_epilogue): New function.
3892 (ppc64_emit_add): New function.
3893 (ppc64_emit_sub): New function.
3894 (ppc64_emit_mul): New function.
3895 (ppc64_emit_lsh): New function.
3896 (ppc64_emit_rsh_signed): New function.
3897 (ppc64_emit_rsh_unsigned): New function.
3898 (ppc64_emit_ext): New function.
3899 (ppc64_emit_zero_ext): New function.
3900 (ppc64_emit_log_not): New function.
3901 (ppc64_emit_bit_and): New function.
3902 (ppc64_emit_bit_or): New function.
3903 (ppc64_emit_bit_xor): New function.
3904 (ppc64_emit_bit_not): New function.
3905 (ppc64_emit_equal): New function.
3906 (ppc64_emit_less_signed): New function.
3907 (ppc64_emit_less_unsigned): New function.
3908 (ppc64_emit_ref): New function.
3909 (ppc64_emit_const): New function.
3910 (ppc64v1_emit_reg): New function.
3911 (ppc64v2_emit_reg): New function.
3912 (ppc64_emit_pop): New function.
3913 (ppc64_emit_stack_flush): New function.
3914 (ppc64_emit_swap): New function.
3915 (ppc64v1_emit_call): New function.
3916 (ppc64v2_emit_call): New function.
3917 (ppc64v1_emit_int_call_1): New function.
3918 (ppc64v2_emit_int_call_1): New function.
3919 (ppc64v1_emit_void_call_2): New function.
3920 (ppc64v2_emit_void_call_2): New function.
3921 (ppc64_emit_if_goto): New function.
3922 (ppc64_emit_eq_goto): New function.
3923 (ppc64_emit_ne_goto): New function.
3924 (ppc64_emit_lt_goto): New function.
3925 (ppc64_emit_le_goto): New function.
3926 (ppc64_emit_gt_goto): New function.
3927 (ppc64_emit_ge_goto): New function.
3928 (ppc64v1_emit_ops_impl): New static variable.
3929 (ppc64v2_emit_ops_impl): New static variable.
3930 (ppc_emit_ops): New function.
3931 (linux_low_target): Wire in ppc_emit_ops.
3932
3933 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3934 Marcin Kościelnicki <koriakin@0x04.net>
3935
3936 PR/17221
3937 * Makefile.in: Add powerpc-*-ipa.o
3938 * configure.srv: Add ipa_obj for powerpc*-linux.
3939 * linux-ppc-ipa.c: New file.
3940 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3941 includes.
3942 (PPC_FIELD): New macro.
3943 (PPC_SEXT): New macro.
3944 (PPC_OP6): New macro.
3945 (PPC_BO): New macro.
3946 (PPC_LI): New macro.
3947 (PPC_BD): New macro.
3948 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3949 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3950 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3951 (ppc_get_thread_area): New function.
3952 (is_elfv2_inferior): New function.
3953 (gen_ds_form): New function.
3954 (GEN_STD): New macro.
3955 (GEN_STDU): New macro.
3956 (GEN_LD): New macro.
3957 (GEN_LDU): New macro.
3958 (gen_d_form): New function.
3959 (GEN_ADDI): New macro.
3960 (GEN_ADDIS): New macro.
3961 (GEN_LI): New macro.
3962 (GEN_LIS): New macro.
3963 (GEN_ORI): New macro.
3964 (GEN_ORIS): New macro.
3965 (GEN_LWZ): New macro.
3966 (GEN_STW): New macro.
3967 (GEN_STWU): New macro.
3968 (gen_xfx_form): New function.
3969 (GEN_MFSPR): New macro.
3970 (GEN_MTSPR): New macro.
3971 (GEN_MFCR): New macro.
3972 (GEN_MTCR): New macro.
3973 (GEN_SYNC): New macro.
3974 (GEN_LWSYNC): New macro.
3975 (gen_x_form): New function.
3976 (GEN_OR): New macro.
3977 (GEN_MR): New macro.
3978 (GEN_LWARX): New macro.
3979 (GEN_STWCX): New macro.
3980 (GEN_CMPW): New macro.
3981 (gen_md_form): New function.
3982 (GEN_RLDICL): New macro.
3983 (GEN_RLDICR): New macro.
3984 (gen_i_form): New function.
3985 (GEN_B): New macro.
3986 (GEN_BL): New macro.
3987 (gen_b_form): New function.
3988 (GEN_BNE): New macro.
3989 (GEN_LOAD): New macro.
3990 (GEN_STORE): New macro.
3991 (gen_limm): New function.
3992 (gen_atomic_xchg): New function.
3993 (gen_call): New function.
3994 (ppc_relocate_instruction): New function.
3995 (ppc_install_fast_tracepoint_jump_pad): New function.
3996 (ppc_get_min_fast_tracepoint_insn_len): New function.
3997 (ppc_get_ipa_tdesc_idx): New function.
3998 (the_low_target): Wire in the new functions.
3999 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4000 tdescs.
4001 * linux-ppc-tdesc.h: New file.
4002
4003 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4004
4005 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4006 (alloc_jump_pad_buffer): New function.
4007 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4008 (alloc_jump_pad_buffer): New function.
4009 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4010 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4011 (alloc_jump_pad_buffer): New function.
4012 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4013 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4014 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4015 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4016
4017 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4018
4019 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4020 * linux-amd64-ipa.c: Likewise.
4021 * linux-i386-ipa.c: Likewise.
4022 * linux-s390-ipa.c: Likewise.
4023 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4024 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4025 set_trace_state_variable_value_ptr.
4026 (struct ipa_sym_addresses): Likewise.
4027 (symbol_list): Likewise.
4028 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4029 accessing gdb_collect directly.
4030 (gdb_collect_ptr_type): New typedef.
4031 (get_raw_reg_ptr_type): New typedef.
4032 (get_trace_state_variable_value_ptr_type): New typedef.
4033 (set_trace_state_variable_value_ptr_type): New typedef.
4034 (gdb_collect_ptr): New global.
4035 (get_raw_reg_ptr): New global.
4036 (get_trace_state_variable_value_ptr): New global.
4037 (set_trace_state_variable_value_ptr): New global.
4038 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4039 accessing get_raw_reg directly.
4040 (get_get_tsv_func_addr): Likewise for
4041 get_trace_state_variable_value_ptr.
4042 (get_set_tsv_func_addr): Likewise for
4043 set_trace_state_variable_value_ptr.
4044 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4045
4046 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4047
4048 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4049
4050 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4051
4052 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4053 packets.
4054 (relocate_instruction): Remove own_buf.
4055 * server.c (own_buf): Make global.
4056 (handle_v_requests): Make global.
4057 * server.h (own_buf): New declaration.
4058 (handle_v_requests): New prototype.
4059
4060 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4061
4062 PR 18377
4063 * linux-s390-low.c (add_insns): New function.
4064 (s390_emit_prologue): New function.
4065 (s390_emit_epilogue): New function.
4066 (s390_emit_add): New function.
4067 (s390_emit_sub): New function.
4068 (s390_emit_mul): New function.
4069 (s390_emit_lsh): New function.
4070 (s390_emit_rsh_signed): New function.
4071 (s390_emit_rsh_unsigned): New function.
4072 (s390_emit_ext): New function.
4073 (s390_emit_log_not): New function.
4074 (s390_emit_bit_and): New function.
4075 (s390_emit_bit_or): New function.
4076 (s390_emit_bit_xor): New function.
4077 (s390_emit_bit_not): New function.
4078 (s390_emit_equal): New function.
4079 (s390_emit_less_signed): New function.
4080 (s390_emit_less_unsigned): New function.
4081 (s390_emit_ref): New function.
4082 (s390_emit_if_goto): New function.
4083 (s390_emit_goto): New function.
4084 (s390_write_goto_address): New function.
4085 (s390_emit_litpool): New function.
4086 (s390_emit_const): New function.
4087 (s390_emit_call): New function.
4088 (s390_emit_reg): New function.
4089 (s390_emit_pop): New function.
4090 (s390_emit_stack_flush): New function.
4091 (s390_emit_zero_ext): New function.
4092 (s390_emit_swap): New function.
4093 (s390_emit_stack_adjust): New function.
4094 (s390_emit_set_r2): New function.
4095 (s390_emit_int_call_1): New function.
4096 (s390_emit_void_call_2): New function.
4097 (s390_emit_eq_goto): New function.
4098 (s390_emit_ne_goto): New function.
4099 (s390_emit_lt_goto): New function.
4100 (s390_emit_le_goto): New function.
4101 (s390_emit_gt_goto): New function.
4102 (s390_emit_ge_goto): New function.
4103 (s390x_emit_prologue): New function.
4104 (s390x_emit_epilogue): New function.
4105 (s390x_emit_add): New function.
4106 (s390x_emit_sub): New function.
4107 (s390x_emit_mul): New function.
4108 (s390x_emit_lsh): New function.
4109 (s390x_emit_rsh_signed): New function.
4110 (s390x_emit_rsh_unsigned): New function.
4111 (s390x_emit_ext): New function.
4112 (s390x_emit_log_not): New function.
4113 (s390x_emit_bit_and): New function.
4114 (s390x_emit_bit_or): New function.
4115 (s390x_emit_bit_xor): New function.
4116 (s390x_emit_bit_not): New function.
4117 (s390x_emit_equal): New function.
4118 (s390x_emit_less_signed): New function.
4119 (s390x_emit_less_unsigned): New function.
4120 (s390x_emit_ref): New function.
4121 (s390x_emit_if_goto): New function.
4122 (s390x_emit_const): New function.
4123 (s390x_emit_call): New function.
4124 (s390x_emit_reg): New function.
4125 (s390x_emit_pop): New function.
4126 (s390x_emit_stack_flush): New function.
4127 (s390x_emit_zero_ext): New function.
4128 (s390x_emit_swap): New function.
4129 (s390x_emit_stack_adjust): New function.
4130 (s390x_emit_int_call_1): New function.
4131 (s390x_emit_void_call_2): New function.
4132 (s390x_emit_eq_goto): New function.
4133 (s390x_emit_ne_goto): New function.
4134 (s390x_emit_lt_goto): New function.
4135 (s390x_emit_le_goto): New function.
4136 (s390x_emit_gt_goto): New function.
4137 (s390x_emit_ge_goto): New function.
4138 (s390_emit_ops): New function.
4139 (struct linux_target_ops): Fill in emit_ops hook.
4140
4141 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4142
4143 PR 18377
4144 * Makefile.in: Add s390 IPA files.
4145 * configure.srv: Build IPA for s390.
4146 * linux-s390-ipa.c: New file.
4147 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4148 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4149 (tdesc_s390_linux32): Likewise.
4150 (init_registers_s390_linux32v1): Likewise.
4151 (tdesc_s390_linux32v1): Likewise.
4152 (init_registers_s390_linux32v2): Likewise.
4153 (tdesc_s390_linux32v2): Likewise.
4154 (init_registers_s390_linux64): Likewise.
4155 (tdesc_s390_linux64): Likewise.
4156 (init_registers_s390_linux64v1): Likewise.
4157 (tdesc_s390_linux64v1): Likewise.
4158 (init_registers_s390_linux64v2): Likewise.
4159 (tdesc_s390_linux64v2): Likewise.
4160 (init_registers_s390_te_linux64): Likewise.
4161 (tdesc_s390_te_linux64): Likewise.
4162 (init_registers_s390_vx_linux64): Likewise.
4163 (tdesc_s390_vx_linux64): Likewise.
4164 (init_registers_s390_tevx_linux64): Likewise.
4165 (tdesc_s390_tevx_linux64): Likewise.
4166 (init_registers_s390x_linux64): Likewise.
4167 (tdesc_s390x_linux64): Likewise.
4168 (init_registers_s390x_linux64v1): Likewise.
4169 (tdesc_s390x_linux64v1): Likewise.
4170 (init_registers_s390x_linux64v2): Likewise.
4171 (tdesc_s390x_linux64v2): Likewise.
4172 (init_registers_s390x_te_linux64): Likewise.
4173 (tdesc_s390x_te_linux64): Likewise.
4174 (init_registers_s390x_vx_linux64): Likewise.
4175 (tdesc_s390x_vx_linux64): Likewise.
4176 (init_registers_s390x_tevx_linux64): Likewise.
4177 (tdesc_s390x_tevx_linux64): Likewise.
4178 (have_hwcap_s390_vx): New static variable.
4179 (s390_arch_setup): Fill have_hwcap_s390_vx.
4180 (s390_get_thread_area): New function.
4181 (s390_ft_entry_gpr_esa): New const.
4182 (s390_ft_entry_gpr_zarch): New const.
4183 (s390_ft_entry_misc): New const.
4184 (s390_ft_entry_fr): New const.
4185 (s390_ft_entry_vr): New const.
4186 (s390_ft_main_31): New const.
4187 (s390_ft_main_64): New const.
4188 (s390_ft_exit_fr): New const.
4189 (s390_ft_exit_vr): New const.
4190 (s390_ft_exit_misc): New const.
4191 (s390_ft_exit_gpr_esa): New const.
4192 (s390_ft_exit_gpr_zarch): New const.
4193 (append_insns): New function.
4194 (s390_relocate_instruction): New function.
4195 (s390_install_fast_tracepoint_jump_pad): New function.
4196 (s390_get_min_fast_tracepoint_insn_len): New function.
4197 (s390_get_ipa_tdesc_idx): New function.
4198 (struct linux_target_ops): Wire in the above functions.
4199 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4200 * linux-s390-tdesc.h: New file.
4201
4202 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4203
4204 * linux-s390-low.c (s390_supports_tracepoints): New function.
4205 (struct linux_target_ops): Fill supports_tracepoints hook.
4206
4207 2016-03-18 Yao Qi <yao.qi@linaro.org>
4208
4209 * linux-low.c (lwp_signal_can_be_delivered): New function.
4210 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4211
4212 2016-03-18 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4215 0 if signal is enqueued. Remove 'signal' from one debugging
4216 message. Move one debugging message to some lines below.
4217 Remove code setting 'signal' to 0.
4218
4219 2016-03-18 Yao Qi <yao.qi@linaro.org>
4220
4221 * linux-low.c (linux_low_filter_event): Remove redundant
4222 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4223
4224 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4225
4226 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4227 (struct linux_target_ops): Wire in the above.
4228
4229 2016-03-03 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-low.c: Update comments to start_step_over.
4232
4233 2016-03-03 Yao Qi <yao.qi@linaro.org>
4234
4235 PR server/19736
4236 * linux-low.c (handle_extended_wait): Set child suspended
4237 if event_lwp->bp_reinsert isn't zero.
4238
4239 2016-03-02 Yao Qi <yao.qi@linaro.org>
4240
4241 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4242 enqueue_pending_signal.
4243
4244 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4245
4246 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4247 is actually loaded.
4248
4249 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4250
4251 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4252 (s390_regmap_3264) [!__s390x__]: New global.
4253 (s390_collect_ptrace_register): Skip map entries containing -1.
4254 (s390_supply_ptrace_register): Ditto.
4255 (s390_fill_gprs_high): New function.
4256 (s390_store_gprs_high): New function.
4257 (s390_regsets): Add NT_S390_HIGH_GPRS.
4258 (s390_get_hwcap): Enable on 31-bit.
4259 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4260 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4261 Detect NT_S390_HIGH_GPRS.
4262 (s390_usrregs_info_3264): Enable on 31-bit.
4263 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4264 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4265
4266 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4267
4268 PR gdb/13808
4269 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4270 * configure.srv: Ditto.
4271 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4272 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4273 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4274 (init_registers_amd64_linux): Remove prototype.
4275 (tdesc_amd64_linux): Remove declaration.
4276 (get_ipa_tdesc): New function.
4277 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4278 initialize remaining tdescs.
4279 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4280 (init_registers_i386_linux): Remove prototype.
4281 (tdesc_i386_linux): Remove declaration.
4282 (get_ipa_tdesc): New function.
4283 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4284 initialize remaining tdescs.
4285 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4286 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4287 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4288 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4289 (x86_get_ipa_tdesc_idx): New function.
4290 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4291 * linux-x86-tdesc.h: New file.
4292 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4293 (target_get_ipa_tdesc_idx): New macro.
4294 * tracepoint.c (ipa_tdesc_idx): New macro.
4295 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4296 (symbol_list): Add ipa_tdesc_idx.
4297 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4298 (ipa_tdesc): Remove.
4299 (ipa_tdesc_idx): New variable.
4300 (get_context_regcache): Use get_ipa_tdesc.
4301 (gdb_collect): Ditto.
4302 (gdb_probe): Ditto.
4303 * tracepoint.h (get_ipa_tdesc): New prototype.
4304 (ipa_tdesc): Remove.
4305
4306 2016-02-24 Pedro Alves <palves@redhat.com>
4307
4308 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4309 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4310 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4311 Factor out common code between the USE_SIGTRAP_SIGINFO and
4312 !USE_SIGTRAP_SIGINFO blocks.
4313 (linux_low_filter_event): Call save_stop_reason instead of
4314 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4315 Update comments.
4316 (linux_wait_1): Update comments.
4317
4318 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4319
4320 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4321 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4322 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4323 ppc_insert_point, ppc_remove_point.
4324
4325 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4326
4327 * linux-s390-low.c (s390_supports_z_point_type): New function.
4328 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4329
4330 2016-02-16 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4333 PC. Get pc from regcache_read_pc.
4334
4335 2016-02-12 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4338 or linux_get_pc_32bit.
4339 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4340
4341 2016-02-12 Yao Qi <yao.qi@linaro.org>
4342
4343 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4344 arm_linux_get_next_pcs_fixup.
4345
4346 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4347
4348 * tracepoint.c (x_tracepoint_action_download): Change
4349 write_inferior_data_ptr to write_inferior_data_pointer.
4350 (cmd_qtstart): Likewise.
4351 (write_inferior_data_ptr): Remove.
4352 (download_agent_expr): Change write_inferior_data_ptr to
4353 write_inferior_data_pointer.
4354 (download_tracepoint_1): Likewise.
4355 (download_tracepoint): Likewise.
4356 (download_trace_state_variables): Likewise.
4357
4358 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4359 Marcin Kościelnicki <koriakin@0x04.net>
4360
4361 * tracepoint.c (struct tracepoint_action_ops): Remove.
4362 (struct tracepoint_action): Remove ops.
4363 (m_tracepoint_action_download, r_tracepoint_action_download)
4364 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4365 size and offset accordingly.
4366 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4367 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4368 (tracepoint_action_send, tracepoint_action_download): New functions.
4369 Helpers for trace action handlers.
4370 (add_tracepoint_action): Remove setup actions ops.
4371 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4372
4373 2016-02-10 Yao Qi <yao.qi@linaro.org>
4374
4375 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4376
4377 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4378
4379 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4380 to AC_OUTPUT.
4381 * configure: Regenerate.
4382
4383 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4384
4385 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4386 void * to gdb_byte *.
4387 * linux-low.c (siginfo_fixup): Likewise.
4388 (linux_xfer_siginfo): Likewise.
4389 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4390 Likewise.
4391 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4392
4393 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4394
4395 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4396 to srv_tgtobj.
4397 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4398 to srv_tgtobj.
4399 * linux-x86-low.c [__x86_64__]: Include
4400 "nat/amd64-linux-siginfo.h".
4401 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4402 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4403 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4404 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4405 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4406 (cpt_si_fd, si_timerid, si_overrun): Move from
4407 nat/amd64-linux-siginfo.c.
4408 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4409
4410 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4411
4412 * server.c (skip_to_semicolon): Remove.
4413 (process_point_options): Use strchrnul instead of
4414 skip_to_semicolon.
4415
4416 2016-01-26 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4419 * linux-low.c (install_software_single_step_breakpoints): Don't
4420 call regcache_read_pc.
4421 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4422 argument pc.
4423
4424 2016-01-26 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-low.c (install_software_single_step_breakpoints): Call
4427 regcache_read_pc instead of get_pc.
4428
4429 2016-01-26 Yao Qi <yao.qi@linaro.org>
4430
4431 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4432 (unblock_async_io): Rename to ...
4433 (block_unblock_async_io): ... it. New function.
4434 (enable_async_io): Don't install SIGIO handler. Unblock it
4435 instead.
4436 (disable_async_io): Don't ignore SIGIO. Block it instead.
4437 (initialize_async_io): Install SIGIO handler. Don't call
4438 unblock_async_io.
4439
4440 2016-01-26 Yao Qi <yao.qi@linaro.org>
4441
4442 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4443 first character is '\003', call *the_target->request_interrupt.
4444
4445 2016-01-25 Yao Qi <yao.qi@linaro.org>
4446
4447 * remote-utils.c (new_thread_notify): Remove.
4448 (dead_thread_notify): Likewise.
4449 * remote-utils.h (new_thread_notify): Remove declaration.
4450 (dead_thread_notify): Likewise.
4451
4452 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4453
4454 * gdb.trace/pending.exp: Fix expected message on continue.
4455
4456 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4457
4458 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4459 it works properly on big-endian machines where sizeof (CORE_ADDR)
4460 != sizeof (void *).
4461
4462 2016-01-21 Pedro Alves <palves@redhat.com>
4463
4464 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4465 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4466 * configure: Regenerate.
4467
4468 2016-01-21 Yao Qi <yao.qi@linaro.org>
4469
4470 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4471 is_thumb and set it according to CPSR saved on the stack.
4472 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4473 arm_sigreturn_next_pc.
4474
4475 2016-01-18 Yao Qi <yao.qi@linaro.org>
4476
4477 * linux-low.c (linux_set_pc_64bit): New function.
4478 (linux_get_pc_64bit): New function.
4479 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4480 Declare.
4481 * linux-sparc-low.c (debug_threads): Remove declaration.
4482 (sparc_get_pc): Remove.
4483 (the_low_target): Use linux_get_pc_64bit instead of
4484 sparc_get_pc.
4485 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4486 (the_low_target): Use linux_get_pc_64bit and
4487 linux_set_pc_64bit.
4488
4489 2016-01-18 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-arm-low.c (debug_threads): Remove declaration.
4492 (arm_get_pc, arm_set_pc): Remove.
4493 (the_low_target): Use linux_get_pc_32bit and
4494 linux_set_pc_32bit.
4495 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4496 (the_low_target): Use linux_get_pc_32bit and
4497 linux_set_pc_32bit.
4498 * linux-cris-low.c (debug_threads): Remove declaration.
4499 (cris_get_pc, cris_set_pc,): Remove.
4500 (the_low_target): Use linux_get_pc_32bit and
4501 linux_set_pc_32bit.
4502 * linux-crisv32-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-low.c: Include inttypes.h.
4507 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4508 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4509 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4510 (the_low_target): Use linux_get_pc_32bit and
4511 linux_set_pc_32bit.
4512 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4513 (the_low_target): Use linux_get_pc_32bit and
4514 linux_set_pc_32bit.
4515 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4516 (the_low_target): Use linux_get_pc_32bit and
4517 linux_set_pc_32bit.
4518 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4519 (the_low_target): Use linux_get_pc_32bit and
4520 linux_set_pc_32bit.
4521 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4522 (the_low_target): Use linux_get_pc_32bit and
4523 linux_set_pc_32bit.
4524
4525 2016-01-18 Gary Benson <gbenson@redhat.com>
4526
4527 * configure.ac (AC_FUNC_FORK): New check.
4528 * config.in: Regenerate.
4529 * configure: Likewise.
4530
4531 2016-01-14 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4534 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4535 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4536 arm_get_next_pcs_ctor.
4537
4538 2016-01-12 Josh Stone <jistone@redhat.com>
4539 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4540
4541 * inferiors.h: Include "gdb_vecs.h".
4542 (struct process_info): Add syscalls_to_catch.
4543 * inferiors.c (remove_process): Free syscalls_to_catch.
4544 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4545 syscall_return stops.
4546 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4547 * server.c (handle_general_set): Handle QCatchSyscalls.
4548 (handle_query): Report support for QCatchSyscalls.
4549 * target.h (struct target_ops): Add supports_catch_syscall.
4550 (target_supports_catch_syscall): New macro.
4551 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4552 (struct lwp_info): Add syscall_state.
4553 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4554 Maintain syscall_state and syscalls_to_catch across exec.
4555 (get_syscall_trapinfo): New function, proxy to the_low_target.
4556 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4557 (linux_low_filter_event): Toggle syscall_state entry/return for
4558 syscall traps, and set it ignored for all others.
4559 (gdb_catching_syscalls_p): New function.
4560 (gdb_catch_this_syscall_p): New function.
4561 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4562 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4563 (linux_supports_catch_syscall): New function.
4564 (linux_target_ops): Install it.
4565 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4566 (the_low_target): Install it.
4567
4568 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4569
4570 * acinclude.m4: Include new ../warning.m4 file.
4571 * configure: Regenerated.
4572 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4573
4574 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4575
4576 * ax.c (is_goto_target): Mark static.
4577 * linux-low.c (register_addr): Likewise.
4578 (linux_fetch_registers, linux_store_registers): Likewise.
4579 * mem-break.c (any_persistent_commands): Fix old prototype.
4580 (add_commands_to_breakpoint): Mark static.
4581 * regcache.c (find_register_by_name): Delete unused func.
4582 * remote-utils.c (hex_or_minus_one): Mark static.
4583 * server.c (monitor_show_help): Mark static.
4584 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4585 handle_v_requests): Likewise.
4586
4587 2016-01-12 Pedro Alves <palves@redhat.com>
4588
4589 Remove use of the registered trademark symbol throughout.
4590
4591 2016-01-08 Yao Qi <yao.qi@linaro.org>
4592
4593 * remote-utils.c (getpkt): If c is '\003', call target hook
4594 request_interrupt.
4595
4596 2016-01-06 Yao Qi <yao.qi@linaro.org>
4597
4598 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4599 linux-aarch32-low.c.
4600 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4601 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4602 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4603 (thumb2_breakpoint): Declare.
4604 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4605 linux-aarch32-low.h.
4606 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4607 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4608 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4609
4610 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4611
4612 * gdbreplay.c (gdbreplay_version): Change copyright year in
4613 version message.
4614 * server.c (gdbserver_version): Likewise.
4615
4616 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4617
4618 * server.c (crc32_table): Delete.
4619 (crc32): Use libiberty's xcrc32 function.
4620
4621 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4622
4623 * lynx-low.c (lynx_delete_thread_callback): New function.
4624 (lynx_mourn): Properly delete our process and all of its
4625 threads. Remove call to clear_inferiors.
4626
4627 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4628
4629 * target.c (thread_search_callback): Add check that
4630 the thread_stopped target callback is not NULL before
4631 calling it.
4632
4633 2015-12-21 Yao Qi <yao.qi@linaro.org>
4634
4635 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4636 arm breakpoint.
4637
4638 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4639
4640 * server.c (handle_query): Call target_supports_software_single_step.
4641
4642 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4643
4644 * linux-low.c (single_step): New function.
4645 (linux_resume_one_lwp_throw): Call single_step.
4646 (start_step_over): Likewise.
4647
4648 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4649
4650 * Makefile.in (SFILES): Append arch/arm-linux.c,
4651 arch/arm-get-next-pcs.c.
4652 (arm-linux.o): New rule.
4653 (arm-get-next-pcs.o): New rule.
4654 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4655 arm-linux.o.
4656 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4657 to linux-aarch32-low.c.
4658 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4659 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4660 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4661 (thumb2_breakpoint_len): Likewise.
4662 (arm_is_thumb_mode): Make non-static.
4663 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4664 from linux-aarch32-low.c.
4665 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4666 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4667 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4668 (thumb2_breakpoint_len): Likewise.
4669 (arm_is_thumb_mode): New declaration.
4670 * linux-arm-low.c: Include arch/arm-linux.h
4671 aarch/arm-get-next-pcs.h, sys/syscall.h.
4672 (get_next_pcs_ops): New struct.
4673 (get_next_pcs_addr_bits_remove): New function.
4674 (get_next_pcs_is_thumb): New function.
4675 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4676 (arm_sigreturn_next_pc): Likewise.
4677 (get_next_pcs_syscall_next_pc): Likewise.
4678 (arm_gdbserver_get_next_pcs): Likewise.
4679 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4680 Initialize.
4681 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4682 * server.h: Include gdb_vecs.h.
4683
4684 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4685
4686 * Makefile.in (SFILES): Append common/common-regcache.c.
4687 (OBS): Append common-regcache.o.
4688 (common-regcache.o): New rule.
4689 * regcache.c (init_register_cache): Initialize cache to
4690 REG_UNAVAILABLE.
4691 (regcache_raw_read_unsigned): New function.
4692 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4693 register_status enum.
4694
4695 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4696
4697 * linux-aarch64-low.c (the_low_targets): Rename
4698 breakpoint_reinsert_addr to get_next_pcs.
4699 * linux-arm-low.c (the_low_targets): Likewise.
4700 * linux-bfin-low.c (the_low_targets): Likewise.
4701 * linux-cris-low.c (the_low_targets): Likewise.
4702 * linux-crisv32-low.c (the_low_targets): Likewise.
4703 * linux-low.c (can_software_single_step): Likewise.
4704 (install_software_single_step_breakpoints): New function.
4705 (start_step_over): Use install_software_single_step_breakpoints.
4706 * linux-low.h: New CORE_ADDR vector.
4707 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4708 get_next_pcs.
4709 * linux-mips-low.c (the_low_targets): Likewise.
4710 * linux-nios2-low.c (the_low_targets): Likewise.
4711 * linux-sparc-low.c (the_low_targets): Likewise.
4712
4713 2015-12-17 Pedro Alves <palves@redhat.com>
4714
4715 * linux-low.c (linux_kill_one_lwp): Remove references to
4716 LinuxThreads.
4717 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4718 to 'kill'.
4719 (linux_init_signals): Delete.
4720 (initialize_low): Adjust.
4721 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4722
4723 2015-12-16 Pedro Alves <palves@redhat.com>
4724
4725 * configure.ac (compiler warning flags): When testing a
4726 -Wno-foo option, check whether -Wfoo works instead.
4727 * configure: Regenerate.
4728
4729 2015-12-11 Don Breazeal <donb@codesourcery.com>
4730
4731 * server.c (process_serial_event): Don't exit from gdbserver
4732 in remote mode if there are still active inferiors.
4733
4734 2015-12-11 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4737 arm_breakpoint_at if the process is 32-bit.
4738
4739 2015-12-11 Yao Qi <yao.qi@linaro.org>
4740
4741 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4742 arm breakpoint.
4743
4744 2015-12-07 Yao Qi <yao.qi@linaro.org>
4745
4746 * configure.srv: Append arm.o to srv_tgtobj for
4747 aarch64*-*-linux* target.
4748 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4749 from linux-arm-low.c.
4750 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4751 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4752 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4753 (thumb2_breakpoint_len): Likewise.
4754 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4755 (arm_breakpoint_kinds): Likewise.
4756 (arm_breakpoint_kind_from_pc): Likewise.
4757 (arm_sw_breakpoint_from_kind): Likewise.
4758 (arm_breakpoint_kind_from_current_state): Likewise.
4759 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4760 (arm_sw_breakpoint_from_kind): Declare.
4761 (arm_breakpoint_kind_from_current_state): Declare.
4762 (arm_breakpoint_at): Declare.
4763 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4764 arm_sw_breakpoint_from_kind if process is 32-bit.
4765 (aarch64_breakpoint_kind_from_pc): New function.
4766 (aarch64_breakpoint_kind_from_current_state): New function.
4767 (the_low_target): Initialize fields breakpoint_kind_from_pc
4768 and breakpoint_kind_from_current_state.
4769 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4770 linux-aarch32-low.c.
4771 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4772 (arm_breakpoint, arm_breakpoint_len): Likewise.
4773 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4774 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4775 (arm_is_thumb_mode): Likewise.
4776 (arm_breakpoint_at): Likewise.
4777 (arm_breakpoint_kind_from_pc): Likewise.
4778 (arm_sw_breakpoint_from_kind): Likewise.
4779 (arm_breakpoint_kind_from_current_state): Likewise.
4780
4781 Revert:
4782 2015-08-04 Yao Qi <yao.qi@linaro.org>
4783
4784 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4785 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4786 * server.c (extended_protocol): Remove "static".
4787 * server.h (extended_protocol): Declare it.
4788
4789 2015-12-04 Josh Stone <jistone@redhat.com>
4790
4791 * target.h (struct target_ops) <arch_setup>: Rename to ...
4792 (struct target_ops) <post_create_inferior>: ... this.
4793 (target_arch_setup): Rename to ...
4794 (target_post_create_inferior): ... this, calling post_create_inferior.
4795 * server.c (start_inferior): Update target_arch_setup calls to
4796 target_post_create_inferior.
4797 * linux-low.c (linux_low_ptrace_options): Forward declare.
4798 (linux_arch_setup): Update its comment for general use.
4799 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4800 (struct linux_target_ops): Use linux_post_create_inferior.
4801 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4802 to post_create_inferior.
4803 * nto-low.c (struct nto_target_ops): Likewise.
4804 * spu-low.c (struct spu_target_ops): Likewise.
4805 * win32-low.c (struct win32_target_ops): Likewise.
4806
4807 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4808
4809 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4810
4811 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812
4813 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4814 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4815 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4816 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4817 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4818 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4819 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4820 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4821 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4822 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4823 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4824 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4825
4826 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4827
4828 * linux-low.c (linux_look_up_symbols): Don't call
4829 linux_supports_traceclone.
4830 * linux-low.h (thread_db_init): Remove use_events argument.
4831 * thread-db.c (thread_db_use_event): Remove global variable.
4832 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4833 (struct thread_db) <td_create_bp>: Remove field.
4834 (thread_db_create_event): Remove function.
4835 (thread_db_enable_reporting): Likewise.
4836 (find_one_thread): Don't check for thread_db_use_events.
4837 (attach_thread): Likewise.
4838 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4839 (try_thread_db_load_1): Don't check for thread_db_use_events.
4840 (thread_db_init): Remove use_events argument and thread events
4841 handling.
4842 (remove_thread_event_breakpoints): Remove function.
4843 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4844
4845 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4846
4847 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4848 New function.
4849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4850 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4851 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4852 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4853 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4854 Initialize.
4855 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4856 New function.
4857 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4858 * linux-low.c (can_hardware_single_step): Use
4859 supports_hardware_single_step.
4860 (can_software_single_step): New function.
4861 (start_step_over): Call can_software_single_step.
4862 (linux_supports_hardware_single_step): New function.
4863 (struct target_ops) <supports_software_single_step>: Initialize.
4864 * linux-low.h (struct linux_target_ops)
4865 <supports_hardware_single_step>: Initialize.
4866 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4868 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4869 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4870 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4872 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4873 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4874 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4875 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4876 Initialize.
4877 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4878 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4879 Initialize.
4880 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4881 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4882 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4883 New function.
4884 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4885 * target.h (struct target_ops): <supports_software_single_step>:
4886 New field.
4887 (target_supports_software_single_step): New macro.
4888
4889 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4890
4891 * linux-low.c (linux_wait_1): Fix pc advance condition.
4892 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4893 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4894
4895 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4896
4897 * linux-arm-low.c (arm_is_thumb_mode): New function.
4898 (arm_breakpoint_at): Use arm_is_thumb_mode.
4899 (arm_breakpoint_kind_from_current_state): New function.
4900 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4901 Initialize.
4902 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4903 (linux_breakpoint_kind_from_current_state): New function.
4904 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4905 * linux-low.h (struct linux_target_ops)
4906 <breakpoint_kind_from_current_state>: New field.
4907 * target.h (struct target_ops): Likewise.
4908 (target_breakpoint_kind_from_current_state): New macro.
4909
4910 2015-11-30 Pedro Alves <palves@redhat.com>
4911
4912 * linux-low.c (linux_resume): Wake up the event loop before
4913 returning.
4914
4915 2015-11-30 Pedro Alves <palves@redhat.com>
4916
4917 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4918 check.
4919 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4920 to -1.
4921 * target.c (struct thread_search): New structure.
4922 (thread_search_callback): New function.
4923 (prev_general_thread): New global.
4924 (prepare_to_access_memory, done_accessing_memory): New functions.
4925 * target.h (prepare_to_access_memory, done_accessing_memory):
4926 Replace macros with function declarations.
4927
4928 2015-11-30 Pedro Alves <palves@redhat.com>
4929
4930 PR 14618
4931 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4932 report TARGET_WAITKIND_NO_RESUMED.
4933 * remote-utils.c (prepare_resume_reply): Handle
4934 TARGET_WAITKIND_NO_RESUMED.
4935 * server.c (report_no_resumed): New global.
4936 (handle_query) <qSupported>: Handle "no-resumed+". Report
4937 "no-resumed+" support.
4938 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4939 return error if the client doesn't support no-resumed events.
4940 (push_stop_notification): New function.
4941 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4942 events if the client supports them.
4943
4944 2015-11-30 Pedro Alves <palves@redhat.com>
4945
4946 * linux-low.c (thread_still_has_status_pending_p): Don't check
4947 vCont;t here.
4948 (lwp_resumed): New function.
4949 (status_pending_p_callback): Return early if the LWP is not
4950 supposed to be resumed.
4951
4952 2015-11-30 Pedro Alves <palves@redhat.com>
4953
4954 * linux-low.c (handle_extended_wait): Assert that the LWP's
4955 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4956 thread create events, leave the new child's status pending.
4957 (linux_low_filter_event): If GDB wants to hear about thread exit
4958 events, leave the LWP marked dead and don't delete it.
4959 (linux_wait_for_event_filtered): Don't check for thread exit.
4960 (filter_exit_event): New function.
4961 (linux_wait_1): Use it, when returning an exit event.
4962 (linux_resume_one_lwp_throw): Assert that the LWP's
4963 waitstatus is TARGET_WAITKIND_IGNORE.
4964 * remote-utils.c (prepare_resume_reply): Handle
4965 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4966 * server.c (report_thread_events): New global.
4967 (handle_general_set): Handle QThreadEvents.
4968 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4969 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4970 TARGET_WAITKIND_THREAD_EXITED.
4971 * server.h (report_thread_events): Declare.
4972
4973 2015-11-30 Pedro Alves <palves@redhat.com>
4974
4975 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4976 the thread's last_resume_kind was resume_stop.
4977
4978 2015-11-30 Pedro Alves <palves@redhat.com>
4979
4980 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4981 before returning.
4982
4983 2015-11-30 Pedro Alves <palves@redhat.com>
4984
4985 * server.c (handle_v_requests): Handle vCtrlC.
4986
4987 2015-11-30 Pedro Alves <palves@redhat.com>
4988
4989 * gdbthread.h (find_any_thread_of_pid): Declare.
4990 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4991 functions.
4992 * server.c (handle_query): If current_thread is NULL, look for
4993 another thread of the selected process.
4994
4995 2015-11-26 Daniel Colascione <dancol@dancol.org>
4996 Simon Marchi <simon.marchi@ericsson.com>
4997
4998 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4999 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5000 name in reply.
5001 * target.h (struct target_ops) <thread_name>: New field.
5002 (target_thread_name): New macro.
5003
5004 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5005
5006 * regcache.h (regcache_invalidate_pid): Add declaration.
5007 * regcache.c (regcache_invalidate_pid): New function, extracted
5008 from regcache_invalidate.
5009 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5010 Add trivial documentation comment.
5011 * lynx-low.c: Use regcache_invalidate_pid instead of
5012 regcache_invalidate.
5013
5014 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5015
5016 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5017 and Elf64_auxv_t if the target is Android.
5018
5019 2015-11-22 Doug Evans <xdje42@gmail.com>
5020
5021 * target.h: #include <sys/types.h>.
5022
5023 2015-11-19 Pedro Alves <palves@redhat.com>
5024
5025 * linux-low.c (linux_process_qsupported): Change prototype.
5026 Adjust.
5027 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5028 Change prototype.
5029 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5030 and adjust to loop over all features.
5031 * server.c (handle_query) <qSupported>: Adjust to call
5032 target_process_qsupported once, passing it a vector of unprocessed
5033 features.
5034 * target.h (struct target_ops) <process_qsupported>: Change
5035 prototype.
5036 (target_process_qsupported): Adjust.
5037
5038 2015-11-19 Pedro Alves <palves@redhat.com>
5039
5040 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5041 mode.
5042 * configure: Regenerate.
5043
5044 2015-11-19 Pedro Alves <palves@redhat.com>
5045
5046 * configure: Regenerate.
5047
5048 2015-11-19 Yao Qi <yao.qi@linaro.org>
5049
5050 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5051 type to uint32_t.
5052
5053 2015-11-19 Yao Qi <yao.qi@linaro.org>
5054
5055 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5056 (struct aarch64_operand): Move enum out.
5057
5058 2015-11-19 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5061 struct user_fpsimd_state *.
5062 (aarch64_store_fpregset): Likewise.
5063
5064 2015-11-19 Yao Qi <yao.qi@linaro.org>
5065
5066 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5067 struct user_pt_regs *.
5068 (aarch64_store_gregset): Likewise.
5069
5070 2015-11-18 Pedro Alves <palves@redhat.com>
5071
5072 * Makefile.in (all_object_files): Add $IPA_OBJS.
5073
5074 2015-11-17 Pedro Alves <palves@redhat.com>
5075
5076 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5077 GDB_SIGNAL_0 and gdb_signal_to_string.
5078
5079 2015-11-17 Pedro Alves <palves@redhat.com>
5080
5081 * win32-low.c (handle_output_debug_string): Remove parameter.
5082 (win32_kill): Remove our_status local and adjust call to
5083 handle_output_debug_string.
5084 (get_child_debug_event): Adjust call to
5085 handle_output_debug_string.
5086
5087 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5088
5089 * linux-mips-low.c (mips_fill_gregset): Add cast.
5090 (mips_store_gregset): Likewise.
5091 (mips_fill_fpregset): Likewise.
5092 (mips_store_fpregset): Likewise.
5093
5094 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5095
5096 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5097 priv.
5098
5099 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5100
5101 * linux-mips-low.c (mips_linux_new_thread): Change type of
5102 watch_type to enum target_hw_bp_type.
5103
5104 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5105
5106 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5107 Change return type to arm_hwbp_type.
5108
5109 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5110
5111 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5112 (arm_store_gregset): Likewise.
5113 * linux-arm-low.c (arm_get_hwcap): Likewise.
5114 (arm_read_description): Likewise.
5115
5116 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5117
5118 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5119
5120 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5121
5122 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5123 (ppc_fill_vsxregset): Likewise.
5124 (ppc_store_vsxregset): Likewise.
5125 (ppc_fill_vrregset): Likewise.
5126 (ppc_store_vrregset): Likewise.
5127 (ppc_fill_evrregset): Likewise.
5128 (ppc_store_evrregset): Likewise.
5129
5130 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5131
5132 * linux-ppc-low.c (ppc_usrregs_info): Remove
5133 forward-declaration.
5134 (ppc_arch_setup): Move lower in file.
5135
5136 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5137
5138 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5139 (ps_pdwrite): Likewise.
5140
5141 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5142
5143 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5144 to after assert checks.
5145
5146 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5147
5148 * proc-service.c (ps_pdread): Add/adjust casts.
5149 (ps_pdwrite): Add/adjust casts.
5150
5151 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5152
5153 * server.c (handle_search_memory_1): Cast return value of
5154 memmem.
5155
5156 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5157
5158 * server.c (write_qxfer_response): Change type of data to
5159 gdb_byte *.
5160
5161 2015-10-29 Pedro Alves <palves@redhat.com>
5162
5163 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5164
5165 2015-10-29 Pedro Alves <palves@redhat.com>
5166
5167 * tracepoint.c (clear_installed_tracepoints): Add casts.
5168
5169 2015-10-29 Pedro Alves <palves@redhat.com>
5170
5171 * server.c (handle_v_cont, process_serial_event): Add enum
5172 gdb_signal casts to signal parsing code.
5173
5174 2015-10-29 Pedro Alves <palves@redhat.com>
5175
5176 * linux-low.h (NULL_REGSET): Define.
5177 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5178 * linux-arm-low.c (arm_regsets): Likewise.
5179 * linux-crisv32-low.c (cris_regsets): Likewise.
5180 * linux-m68k-low.c (m68k_regsets): Likewise.
5181 * linux-mips-low.c (mips_regsets): Likewise.
5182 * linux-nios2-low.c (nios2_regsets): Likewise.
5183 * linux-ppc-low.c (ppc_regsets): Likewise.
5184 * linux-s390-low.c (s390_regsets): Likewise.
5185 * linux-sh-low.c (sh_regsets): Likewise.
5186 * linux-sparc-low.c (sparc_regsets): Likewise.
5187 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5188 * linux-tile-low.c (tile_regsets): Likewise.
5189 * linux-x86-low.c (x86_regsets): Likewise.
5190 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5191
5192 2015-10-29 Pedro Alves <palves@redhat.com>
5193
5194 * linux-low.h (NULL_REGSET): Define.
5195 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5196 * linux-arm-low.c (arm_regsets): Likewise.
5197 * linux-crisv32-low.c (cris_regsets): Likewise.
5198 * linux-m68k-low.c (m68k_regsets): Likewise.
5199 * linux-mips-low.c (mips_regsets): Likewise.
5200 * linux-nios2-low.c (nios2_regsets): Likewise.
5201 * linux-ppc-low.c (ppc_regsets): Likewise.
5202 * linux-s390-low.c (s390_regsets): Likewise.
5203 * linux-sh-low.c (sh_regsets): Likewise.
5204 * linux-sparc-low.c (sparc_regsets): Likewise.
5205 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5206 * linux-tile-low.c (tile_regsets): Likewise.
5207 * linux-x86-low.c (x86_regsets): Likewise.
5208 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5209
5210 2015-10-26 Doug Evans <dje@google.com>
5211
5212 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5213
5214 2015-10-26 Doug Evans <dje@google.com>
5215
5216 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5217
5218 2015-10-26 Doug Evans <dje@google.com>
5219
5220 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5221 for debug_printf.
5222 (attach_thread, find_new_threads_callback): Ditto.
5223
5224 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5225
5226 * mem-break.h (set_breakpoint_data): Remove.
5227
5228 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5229
5230 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5231 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5232 (initialize_low): Remove set_breakpoint_data call.
5233 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5234 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5235 (initialize_low): Remove set_breakpoint_data call.
5236 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5237 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5238 (initialize_low): Remove set_breakpoint_data call.
5239
5240 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5241
5242 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5243 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5244 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5245 * target.h (target_breakpoint_kind_from_pc): New macro.
5246
5247 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5248
5249 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5250 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5251 the default breakpoint kind.
5252
5253 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5254
5255 * linux-arm-low.c (arm_supports_z_point_type): Add software
5256 breakpoint support.
5257
5258 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5259
5260 * linux-arm-low.c: Refactor breakpoint definitions.
5261 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5262 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5263
5264 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5265
5266 * Makefile.in: Add arm.c/o.
5267 * configure.srv: Likewise.
5268 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5269 (arm_breakpoint_kind_from_pc): New function.
5270 (arm_sw_breakpoint_from_kind): Return proper kind.
5271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5272
5273 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5274
5275 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5276 removal.
5277 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5278 (struct raw_breakpoint) <size>: Remove.
5279 (struct raw_breakpoint) <kind>: Add.
5280 (bp_size): New function.
5281 (bp_opcode): Likewise.
5282 (find_raw_breakpoint_at): Adjust for kind.
5283 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5284 (remove_memory_breakpoint): Adjust for kind call bp_size.
5285 (set_raw_breakpoint_at): Adjust for kind.
5286 (set_breakpoint): Likewise.
5287 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5288 (delete_raw_breakpoint): Adjust for kind.
5289 (delete_breakpoint): Likewise.
5290 (find_gdb_breakpoint): Likewise.
5291 (set_gdb_breakpoint_1): Likewise.
5292 (set_gdb_breakpoint): Likewise.
5293 (delete_gdb_breakpoint_1): Likewise.
5294 (delete_gdb_breakpoint): Likewise.
5295 (uninsert_raw_breakpoint): Likewise.
5296 (reinsert_raw_breakpoint): Likewise.
5297 (set_breakpoint_data): Remove.
5298 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5299 (check_mem_read): Adjust for kind call bp_size.
5300 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5301 (clone_one_breakpoint): Adjust for kind.
5302 * mem-break.h (set_gdb_breakpoint): Likewise.
5303 (delete_gdb_breakpoint): Likewise.
5304 * server.c (process_serial_event): Likewise.
5305
5306 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5307
5308 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5309 (struct linux_target_ops) <breakpoint>: Remove.
5310 (struct linux_target_ops) <breakpoint_len>: Remove.
5311 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5312 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5313 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5314 (arm_sw_breakpoint_from_kind): New function.
5315 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5316 (struct linux_target_ops) <breakpoint>: Remove.
5317 (struct linux_target_ops) <breakpoint_len>: Remove.
5318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5320 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5321 (struct linux_target_ops) <breakpoint>: Remove.
5322 (struct linux_target_ops) <breakpoint_len>: Remove.
5323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5325 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5326 (struct linux_target_ops) <breakpoint>: Remove.
5327 (struct linux_target_ops) <breakpoint_len>: Remove.
5328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5330 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5331 and sw_breakpoint_from_kind to increment the pc.
5332 (linux_breakpoint_kind_from_pc): New function.
5333 (linux_sw_breakpoint_from_kind): New function.
5334 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5335 (initialize_low): Call breakpoint_kind_from_pc and
5336 sw_breakpoint_from_kind to replace breakpoint_data/len.
5337 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5338 New field.
5339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5340 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5341 (struct linux_target_ops) <breakpoint>: Remove.
5342 (struct linux_target_ops) <breakpoint_len>: Remove.
5343 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5344 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5345 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5346 (struct linux_target_ops) <breakpoint>: Remove.
5347 (struct linux_target_ops) <breakpoint_len>: Remove.
5348 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5349 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5350 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5351 (struct linux_target_ops) <breakpoint>: Remove.
5352 (struct linux_target_ops) <breakpoint_len>: Remove.
5353 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5354 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5355 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5356 (struct linux_target_ops) <breakpoint>: Remove.
5357 (struct linux_target_ops) <breakpoint_len>: Remove.
5358 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5359 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5360 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5361 (struct linux_target_ops) <breakpoint>: Remove.
5362 (struct linux_target_ops) <breakpoint_len>: Remove.
5363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5365 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5366 (struct linux_target_ops) <breakpoint>: Remove.
5367 (struct linux_target_ops) <breakpoint_len>: Remove.
5368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5370 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5371 (struct linux_target_ops) <breakpoint>: Remove.
5372 (struct linux_target_ops) <breakpoint_len>: Remove.
5373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5375 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5376 (struct linux_target_ops) <breakpoint>: Remove.
5377 (struct linux_target_ops) <breakpoint_len>: Remove.
5378 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5379 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5380 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5381 (struct linux_target_ops) <breakpoint>: Remove.
5382 (struct linux_target_ops) <breakpoint_len>: Remove.
5383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5385 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5386 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5387 (struct linux_target_ops) <breakpoint>: Remove.
5388 (struct linux_target_ops) <breakpoint_len>: Remove.
5389 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5390 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5391 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5392 (struct linux_target_ops) <breakpoint>: Remove.
5393 (struct linux_target_ops) <breakpoint_len>: Remove.
5394 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5395 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5396
5397 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5398
5399 * linux-cris-low.c (cris_get_pc): Remove void arg.
5400
5401 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5402
5403 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5404 variable name.
5405
5406 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5407
5408 * inferiors.c (thread_pid_matches_callback): New function.
5409 (find_thread_process): New function.
5410 (remove_thread): Reset current_thread.
5411 (remove_process): Assert threads have been removed first.
5412
5413 2015-10-15 Yao Qi <yao.qi@linaro.org>
5414
5415 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5416 if it is 3.
5417 (aarch64_remove_point): Likewise.
5418 * regcache.c (regcache_register_size): New function.
5419
5420 2015-10-12 Yao Qi <yao.qi@linaro.org>
5421
5422 * linux-aarch64-low.c: Update all callers as emit_load_store
5423 is renamed to aarch64_emit_load_store.
5424
5425 2015-10-12 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-aarch64-low.c: Update all callers of function renaming
5428 from emit_insn to aarch64_emit_insn.
5429
5430 2015-10-12 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5433 arch/aarch64-insn.h.
5434 (struct aarch64_memory_operand): Likewise.
5435 (ENCODE): Likewise.
5436 (emit_insn): Move to arch/aarch64-insn.c.
5437 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5438 (emit_load_store): Move to arch/aarch64-insn.c.
5439 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5440 (can_encode_int32): Remove.
5441
5442 2015-10-12 Yao Qi <yao.qi@linaro.org>
5443
5444 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5445 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5446 (aarch64_relocate_instruction): Likewise.
5447 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5448 (struct aarch64_insn_visitor): Likewise.
5449
5450 2015-10-12 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5453 (struct aarch64_insn_visitor): New.
5454 (struct aarch64_insn_relocation_data): New.
5455 (aarch64_ftrace_insn_reloc_b): New function.
5456 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5457 (aarch64_ftrace_insn_reloc_cb): Likewise.
5458 (aarch64_ftrace_insn_reloc_tb): Likewise.
5459 (aarch64_ftrace_insn_reloc_adr): Likewise.
5460 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5461 (aarch64_ftrace_insn_reloc_others): Likewise.
5462 (visitor): New.
5463 (aarch64_relocate_instruction): Use visitor.
5464
5465 2015-10-12 Yao Qi <yao.qi@linaro.org>
5466
5467 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5468 int. Add argument buf.
5469 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5470 aarch64_relocate_instruction.
5471
5472 2015-10-12 Yao Qi <yao.qi@linaro.org>
5473
5474 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5475 argument insn. Remove local variable insn. Don't call
5476 target_read_uint32.
5477 (aarch64_install_fast_tracepoint_jump_pad): Call
5478 target_read_uint32.
5479
5480 2015-09-30 Yao Qi <yao.qi@linaro.org>
5481
5482 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5483 (emit_load_store_pair): Likewise.
5484
5485 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5486
5487 * dll.c (match_dll): Add cast(s).
5488 (unloaded_dll): Likewise.
5489 * linux-low.c (second_thread_of_pid_p): Likewise.
5490 (delete_lwp_callback): Likewise.
5491 (count_events_callback): Likewise.
5492 (select_event_lwp_callback): Likewise.
5493 (linux_set_resume_request): Likewise.
5494 * server.c (accumulate_file_name_length): Likewise.
5495 (emit_dll_description): Likewise.
5496 (handle_qxfer_threads_worker): Likewise.
5497 (visit_actioned_threads): Likewise.
5498 * thread-db.c (any_thread_of): Likewise.
5499 * tracepoint.c (same_process_p): Likewise.
5500 (match_blocktype): Likewise.
5501 (build_traceframe_info_xml): Likewise.
5502
5503 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5504
5505 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5506 assignment.
5507 (gdb_unparse_agent_expr): Likewise.
5508 * hostio.c (require_data): Likewise.
5509 (handle_pread): Likewise.
5510 * linux-low.c (disable_regset): Likewise.
5511 (fetch_register): Likewise.
5512 (store_register): Likewise.
5513 (get_dynamic): Likewise.
5514 (linux_qxfer_libraries_svr4): Likewise.
5515 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5516 (set_fast_tracepoint_jump): Likewise.
5517 (uninsert_fast_tracepoint_jumps_at): Likewise.
5518 (reinsert_fast_tracepoint_jumps_at): Likewise.
5519 (validate_inserted_breakpoint): Likewise.
5520 (clone_agent_expr): Likewise.
5521 * regcache.c (init_register_cache): Likewise.
5522 * remote-utils.c (putpkt_binary_1): Likewise.
5523 (decode_M_packet): Likewise.
5524 (decode_X_packet): Likewise.
5525 (look_up_one_symbol): Likewise.
5526 (relocate_instruction): Likewise.
5527 (monitor_output): Likewise.
5528 * server.c (handle_search_memory): Likewise.
5529 (handle_qxfer_exec_file): Likewise.
5530 (handle_qxfer_libraries): Likewise.
5531 (handle_qxfer): Likewise.
5532 (handle_query): Likewise.
5533 (handle_v_cont): Likewise.
5534 (handle_v_run): Likewise.
5535 (captured_main): Likewise.
5536 * target.c (write_inferior_memory): Likewise.
5537 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5538 * tracepoint.c (init_trace_buffer): Likewise.
5539 (add_tracepoint_action): Likewise.
5540 (add_traceframe): Likewise.
5541 (add_traceframe_block): Likewise.
5542 (cmd_qtdpsrc): Likewise.
5543 (cmd_qtdv): Likewise.
5544 (cmd_qtstatus): Likewise.
5545 (response_source): Likewise.
5546 (response_tsv): Likewise.
5547 (cmd_qtnotes): Likewise.
5548 (gdb_collect): Likewise.
5549 (initialize_tracepoint): Likewise.
5550
5551 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5552
5553 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5554 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5555 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5556 <NOP>: New.
5557 (enum aarch64_condition_codes): New enum.
5558 (w0): New static global.
5559 (fp): Likewise.
5560 (lr): Likewise.
5561 (struct aarch64_memory_operand) <type>: New
5562 MEMORY_OPERAND_POSTINDEX type.
5563 (postindex_memory_operand): New helper function.
5564 (emit_ret): New function.
5565 (emit_load_store_pair): New function, factored out of emit_stp
5566 with support for MEMORY_OPERAND_POSTINDEX.
5567 (emit_stp): Rewrite using emit_load_store_pair.
5568 (emit_ldp): New function.
5569 (emit_load_store): Likewise.
5570 (emit_ldr): Mention post-index instruction in comment.
5571 (emit_ldrh): New function.
5572 (emit_ldrb): New function.
5573 (emit_ldrsw): Mention post-index instruction in comment.
5574 (emit_str): Likewise.
5575 (emit_subs): New function.
5576 (emit_cmp): Likewise.
5577 (emit_and): Likewise.
5578 (emit_orr): Likewise.
5579 (emit_orn): Likewise.
5580 (emit_eor): Likewise.
5581 (emit_mvn): Likewise.
5582 (emit_lslv): Likewise.
5583 (emit_lsrv): Likewise.
5584 (emit_asrv): Likewise.
5585 (emit_mul): Likewise.
5586 (emit_sbfm): Likewise.
5587 (emit_sbfx): Likewise.
5588 (emit_ubfm): Likewise.
5589 (emit_ubfx): Likewise.
5590 (emit_csinc): Likewise.
5591 (emit_cset): Likewise.
5592 (emit_nop): Likewise.
5593 (emit_ops_insns): New helper function.
5594 (emit_pop): Likewise.
5595 (emit_push): Likewise.
5596 (aarch64_emit_prologue): New function.
5597 (aarch64_emit_epilogue): Likewise.
5598 (aarch64_emit_add): Likewise.
5599 (aarch64_emit_sub): Likewise.
5600 (aarch64_emit_mul): Likewise.
5601 (aarch64_emit_lsh): Likewise.
5602 (aarch64_emit_rsh_signed): Likewise.
5603 (aarch64_emit_rsh_unsigned): Likewise.
5604 (aarch64_emit_ext): Likewise.
5605 (aarch64_emit_log_not): Likewise.
5606 (aarch64_emit_bit_and): Likewise.
5607 (aarch64_emit_bit_or): Likewise.
5608 (aarch64_emit_bit_xor): Likewise.
5609 (aarch64_emit_bit_not): Likewise.
5610 (aarch64_emit_equal): Likewise.
5611 (aarch64_emit_less_signed): Likewise.
5612 (aarch64_emit_less_unsigned): Likewise.
5613 (aarch64_emit_ref): Likewise.
5614 (aarch64_emit_if_goto): Likewise.
5615 (aarch64_emit_goto): Likewise.
5616 (aarch64_write_goto_address): Likewise.
5617 (aarch64_emit_const): Likewise.
5618 (aarch64_emit_call): Likewise.
5619 (aarch64_emit_reg): Likewise.
5620 (aarch64_emit_pop): Likewise.
5621 (aarch64_emit_stack_flush): Likewise.
5622 (aarch64_emit_zero_ext): Likewise.
5623 (aarch64_emit_swap): Likewise.
5624 (aarch64_emit_stack_adjust): Likewise.
5625 (aarch64_emit_int_call_1): Likewise.
5626 (aarch64_emit_void_call_2): Likewise.
5627 (aarch64_emit_eq_goto): Likewise.
5628 (aarch64_emit_ne_goto): Likewise.
5629 (aarch64_emit_lt_goto): Likewise.
5630 (aarch64_emit_le_goto): Likewise.
5631 (aarch64_emit_gt_goto): Likewise.
5632 (aarch64_emit_ge_got): Likewise.
5633 (aarch64_emit_ops_impl): New static global variable.
5634 (aarch64_emit_ops): New target function, return
5635 &aarch64_emit_ops_impl.
5636 (struct linux_target_ops): Install it.
5637
5638 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5639
5640 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5641 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5642 aarch64-ipa.o.
5643 * linux-aarch64-ipa.c: New file.
5644 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5645 and endian.h.
5646 (aarch64_get_thread_area): New target method.
5647 (extract_signed_bitfield): New helper function.
5648 (aarch64_decode_ldr_literal): New function.
5649 (enum aarch64_opcodes): New enum.
5650 (struct aarch64_register): New struct.
5651 (struct aarch64_operand): New struct.
5652 (x0): New static global.
5653 (x1): Likewise.
5654 (x2): Likewise.
5655 (x3): Likewise.
5656 (x4): Likewise.
5657 (w2): Likewise.
5658 (ip0): Likewise.
5659 (sp): Likewise.
5660 (xzr): Likewise.
5661 (aarch64_register): New helper function.
5662 (register_operand): Likewise.
5663 (immediate_operand): Likewise.
5664 (struct aarch64_memory_operand): New struct.
5665 (offset_memory_operand): New helper function.
5666 (preindex_memory_operand): Likewise.
5667 (enum aarch64_system_control_registers): New enum.
5668 (ENCODE): New macro.
5669 (emit_insn): New helper function.
5670 (emit_b): New function.
5671 (emit_bcond): Likewise.
5672 (emit_cb): Likewise.
5673 (emit_tb): Likewise.
5674 (emit_blr): Likewise.
5675 (emit_stp): Likewise.
5676 (emit_ldp_q_offset): Likewise.
5677 (emit_stp_q_offset): Likewise.
5678 (emit_load_store): Likewise.
5679 (emit_ldr): Likewise.
5680 (emit_ldrsw): Likewise.
5681 (emit_str): Likewise.
5682 (emit_ldaxr): Likewise.
5683 (emit_stxr): Likewise.
5684 (emit_stlr): Likewise.
5685 (emit_data_processing_reg): Likewise.
5686 (emit_data_processing): Likewise.
5687 (emit_add): Likewise.
5688 (emit_sub): Likewise.
5689 (emit_mov): Likewise.
5690 (emit_movk): Likewise.
5691 (emit_mov_addr): Likewise.
5692 (emit_mrs): Likewise.
5693 (emit_msr): Likewise.
5694 (emit_sevl): Likewise.
5695 (emit_wfe): Likewise.
5696 (append_insns): Likewise.
5697 (can_encode_int32_in): New helper function.
5698 (aarch64_relocate_instruction): New function.
5699 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5700 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5701 (struct linux_target_ops): Install aarch64_get_thread_area,
5702 aarch64_install_fast_tracepoint_jump_pad and
5703 aarch64_get_min_fast_tracepoint_insn_len.
5704
5705 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5706
5707 * Makefile.in (aarch64-insn.o): New rule.
5708 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5709
5710 2015-09-21 Yao Qi <yao.qi@linaro.org>
5711
5712 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5713
5714 2015-09-21 Yao Qi <yao.qi@linaro.org>
5715
5716 * tracepoint.c (max_jump_pad_size): Remove.
5717
5718 2015-09-18 Yao Qi <yao.qi@linaro.org>
5719
5720 * linux-aarch64-low.c: Don't include sys/uio.h.
5721 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5722
5723 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5724
5725 * tracepoint.c (eval_result_type): Change prototype.
5726 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5727
5728 2015-09-15 Pedro Alves <palves@redhat.com>
5729
5730 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5731 Check whether to report exec events instead of checking whether
5732 multiprocess is enabled.
5733
5734 2015-09-15 Pedro Alves <palves@redhat.com>
5735
5736 PR remote/18965
5737 * remote-utils.c (prepare_resume_reply): Merge
5738 TARGET_WAITKIND_VFORK_DONE switch case with the
5739 TARGET_WAITKIND_FORKED case.
5740
5741 2015-09-15 Yao Qi <yao.qi@linaro.org>
5742
5743 * server.c (handle_query): Check string comparison using
5744 "else if" instead of "if".
5745
5746 2015-09-15 Yao Qi <yao.qi@linaro.org>
5747
5748 * server.c (vCont_supported): New global variable.
5749 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5750 matches. Append ";vContSupported+" to own_buf.
5751 (handle_v_requests): Append ";s;S" to own_buf if target supports
5752 hardware single step or vCont_supported is false.
5753 (capture_main): Set vCont_supported to zero.
5754
5755 2015-09-15 Yao Qi <yao.qi@linaro.org>
5756
5757 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5758 it to ...
5759 (linux_supports_hardware_single_step): ... New function.
5760 (linux_target_ops): Update.
5761 * lynx-low.c (lynx_target_ops): Set field
5762 supports_hardware_single_step to target_can_do_hardware_single_step.
5763 * nto-low.c (nto_target_ops): Likewise.
5764 * spu-low.c (spu_target_ops): Likewise.
5765 * win32-low.c (win32_target_ops): Likewise.
5766 * target.c (target_can_do_hardware_single_step): New function.
5767 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5768 Remove. <supports_hardware_single_step>: New field.
5769 (target_supports_conditional_breakpoints): Remove.
5770 (target_supports_hardware_single_step): New macro.
5771 (target_can_do_hardware_single_step): Declare.
5772 * server.c (handle_query): Use target_supports_hardware_single_step
5773 instead of target_supports_conditional_breakpoints.
5774
5775 2015-09-15 Yao Qi <yao.qi@linaro.org>
5776
5777 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5778 function.
5779 (struct linux_target_ops the_low_target): Install
5780 aarch64_linux_siginfo_fixup.
5781
5782 2015-09-11 Don Breazeal <donb@codesourcery.com>
5783 Luis Machado <lgustavo@codesourcery.com>
5784
5785 * linux-low.c (linux_mourn): Static declaration.
5786 (linux_arch_setup): Move in front of
5787 handle_extended_wait.
5788 (linux_arch_setup_thread): New function.
5789 (handle_extended_wait): Handle exec events. Call
5790 linux_arch_setup_thread. Make event_lwp argument a
5791 pointer-to-a-pointer.
5792 (check_zombie_leaders): Do not check stopped threads.
5793 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5794 (linux_low_filter_event): Add lwp and thread for exec'ing
5795 non-leader thread if leader thread has been deleted.
5796 Refactor code into linux_arch_setup_thread and call it.
5797 Pass child lwp pointer by reference to handle_extended_wait.
5798 (linux_wait_for_event_filtered): Update comment.
5799 (linux_wait_1): Prevent clobbering exec event status.
5800 (linux_supports_exec_events): New function.
5801 (linux_target_ops) <supports_exec_events>: Initialize new member.
5802 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5803 new member.
5804 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5805 * server.c (report_exec_events): New global variable.
5806 (handle_query): Handle qSupported query for exec-events feature.
5807 (captured_main): Initialize report_exec_events.
5808 * server.h (report_exec_events): Declare new global variable.
5809 * target.h (struct target_ops) <supports_exec_events>: New
5810 member.
5811 (target_supports_exec_events): New macro.
5812 * win32-low.c (win32_target_ops) <supports_exec_events>:
5813 Initialize new member.
5814
5815 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5816
5817 * linux-low.c (linux_low_enable_btrace): Remove.
5818 (linux_target_ops): Replace linux_low_enable_btrace with
5819 linux_enable_btrace.
5820
5821 2015-09-03 Yao Qi <yao.qi@linaro.org>
5822
5823 * linux-aarch64-low.c (aarch64_insert_point): Call
5824 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5825 returns true.
5826
5827 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5828
5829 * linux-low.c (check_stopped_by_breakpoint): Use
5830 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5831
5832 2015-08-27 Pedro Alves <palves@redhat.com>
5833
5834 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5835
5836 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5837
5838 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5839 the XNEW-family equivalent.
5840 (compile_bytecodes): Likewise.
5841 * dll.c (loaded_dll): Likewise.
5842 * event-loop.c (append_callback_event): Likewise.
5843 (create_file_handler): Likewise.
5844 (create_file_event): Likewise.
5845 * hostio.c (handle_open): Likewise.
5846 * inferiors.c (add_thread): Likewise.
5847 (add_process): Likewise.
5848 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5849 * linux-arm-low.c (arm_new_process): Likewise.
5850 (arm_new_thread): Likewise.
5851 * linux-low.c (add_to_pid_list): Likewise.
5852 (linux_add_process): Likewise.
5853 (handle_extended_wait): Likewise.
5854 (add_lwp): Likewise.
5855 (enqueue_one_deferred_signal): Likewise.
5856 (enqueue_pending_signal): Likewise.
5857 (linux_resume_one_lwp_throw): Likewise.
5858 (linux_resume_one_thread): Likewise.
5859 (linux_read_memory): Likewise.
5860 (linux_write_memory): Likewise.
5861 * linux-mips-low.c (mips_linux_new_process): Likewise.
5862 (mips_linux_new_thread): Likewise.
5863 (mips_add_watchpoint): Likewise.
5864 * linux-x86-low.c (initialize_low_arch): Likewise.
5865 * lynx-low.c (lynx_add_process): Likewise.
5866 * mem-break.c (set_raw_breakpoint_at): Likewise.
5867 (set_breakpoint): Likewise.
5868 (add_condition_to_breakpoint): Likewise.
5869 (add_commands_to_breakpoint): Likewise.
5870 (clone_agent_expr): Likewise.
5871 (clone_one_breakpoint): Likewise.
5872 * regcache.c (new_register_cache): Likewise.
5873 * remote-utils.c (look_up_one_symbol): Likewise.
5874 * server.c (queue_stop_reply): Likewise.
5875 (start_inferior): Likewise.
5876 (queue_stop_reply_callback): Likewise.
5877 (handle_target_event): Likewise.
5878 * spu-low.c (fetch_ppc_memory): Likewise.
5879 (store_ppc_memory): Likewise.
5880 * target.c (set_target_ops): Likewise.
5881 * thread-db.c (thread_db_load_search): Likewise.
5882 (try_thread_db_load_1): Likewise.
5883 * tracepoint.c (add_tracepoint): Likewise.
5884 (add_tracepoint_action): Likewise.
5885 (create_trace_state_variable): Likewise.
5886 (cmd_qtdpsrc): Likewise.
5887 (cmd_qtro): Likewise.
5888 (add_while_stepping_state): Likewise.
5889 * win32-low.c (child_add_thread): Likewise.
5890 (get_image_name): Likewise.
5891
5892 2015-08-25 Yao Qi <yao.qi@linaro.org>
5893
5894 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5895
5896 2015-08-25 Yao Qi <yao.qi@linaro.org>
5897
5898 * Makefile.in (aarch64-linux.o): New rule.
5899 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5900 srv_tgtobj.
5901 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5902 (aarch64_init_debug_reg_state): Make it extern.
5903 (aarch64_linux_prepare_to_resume): Remove.
5904
5905 2015-08-25 Yao Qi <yao.qi@linaro.org>
5906
5907 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5908 lwp_arch_private_info and ptid_of_lwp.
5909
5910 2015-08-25 Yao Qi <yao.qi@linaro.org>
5911
5912 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5913 Find proc_info by find_process_pid. All callers updated.
5914
5915 2015-08-25 Yao Qi <yao.qi@linaro.org>
5916
5917 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5918 Remove.
5919 (debug_reg_change_callback): Remove.
5920 (aarch64_notify_debug_reg_change): Remove.
5921
5922 2015-08-25 Yao Qi <yao.qi@linaro.org>
5923
5924 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5925 Call current_lwp_ptid.
5926
5927 2015-08-25 Yao Qi <yao.qi@linaro.org>
5928
5929 * linux-aarch64-low.c (debug_reg_change_callback): Use
5930 debug_printf.
5931
5932 2015-08-25 Yao Qi <yao.qi@linaro.org>
5933
5934 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5935
5936 2015-08-25 Yao Qi <yao.qi@linaro.org>
5937
5938 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5939
5940 2015-08-25 Yao Qi <yao.qi@linaro.org>
5941
5942 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5943 the code.
5944
5945 2015-08-25 Yao Qi <yao.qi@linaro.org>
5946
5947 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5948 Remove.
5949 (debug_reg_change_callback): Remove argument entry and add argument
5950 lwp. Remove local variable thread. Don't print thread id in the
5951 debugging output. Don't check whether pid of thread equals to pid.
5952 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5953 iterate_over_lwps instead find_inferior.
5954
5955 2015-08-24 Pedro Alves <palves@redhat.com>
5956
5957 * inferiors.c (get_first_process): New function.
5958 * inferiors.h (get_first_process): New declaration.
5959 * remote-utils.c (read_ptid): Default to the first process in the
5960 list, instead of to the current thread's process.
5961
5962 2015-08-24 Pedro Alves <palves@redhat.com>
5963
5964 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5965 * event-loop.c: Likewise.
5966 * remote-utils.c: Likewise.
5967 * tracepoint.c: Likewise.
5968
5969 2015-08-24 Pedro Alves <palves@redhat.com>
5970
5971 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5972 ptid_get_lwp.
5973
5974 2015-08-21 Pedro Alves <palves@redhat.com>
5975
5976 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5977 instead of literal 1.
5978
5979 2015-08-21 Pedro Alves <palves@redhat.com>
5980
5981 * tdesc.c (default_description): Explicitly zero-initialize.
5982
5983 2015-08-21 Pedro Alves <palves@redhat.com>
5984
5985 PR gdb/18749
5986 * inferiors.c (remove_thread): Discard any pending stop reply for
5987 this thread.
5988 * server.c (remove_all_on_match_pid): Rename to ...
5989 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5990 instead of a pid.
5991 (discard_queued_stop_replies): Change parameter to a ptid. Now
5992 extern.
5993 (handle_v_kill, kill_inferior_callback, captured_main)
5994 (process_serial_event): Adjust.
5995 * server.h (discard_queued_stop_replies): Declare.
5996
5997 2015-08-21 Pedro Alves <palves@redhat.com>
5998
5999 * linux-low.c (wait_for_sigstop): Always switch to no thread
6000 selected if the previously current thread dies.
6001 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6002 process instead of the current thread's.
6003 * remote-utils.c (input_interrupt): Don't check if there's no
6004 current thread.
6005 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6006 current thread to the general thread fails, error out.
6007 (handle_qxfer_auxv, handle_qxfer_libraries)
6008 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6009 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6010 (handle_query): Check if there's a thread selected instead of
6011 checking whether there's any thread in the thread list.
6012 (handle_qxfer_threads, handle_qxfer_btrace)
6013 (handle_qxfer_btrace_conf): Don't error out early if there's no
6014 thread in the thread list.
6015 (handle_v_cont, myresume): Don't set the current thread to the
6016 continue thread.
6017 (process_serial_event) <Hg handling>: Also set thread_id if the
6018 previous general thread is still alive.
6019 (process_serial_event) <g/G handling>: If setting the current
6020 thread to the general thread fails, error out.
6021 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6022 thread's lwp instead of the current thread's.
6023 * target.c (set_desired_thread): If the desired thread was not
6024 found, leave the current thread pointing to NULL. Return an int
6025 (boolean) indicating success.
6026 * target.h (set_desired_thread): Change return type to int.
6027
6028 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6029
6030 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6031 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6032 #includes.
6033 (ps_get_thread_area): New function.
6034
6035 2015-08-19 Gary Benson <gbenson@redhat.com>
6036
6037 * hostio.c (handle_pread): Do not attempt to read more data
6038 than hostio_reply_with_data can fit in a packet.
6039
6040 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6041
6042 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6043
6044 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6045
6046 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6047
6048 2015-08-06 Pedro Alves <palves@redhat.com>
6049
6050 * tracepoint.c (expr_eval_result): Now an int.
6051
6052 2015-08-06 Pedro Alves <palves@redhat.com>
6053
6054 * gdbthread.h (struct regcache): Forward declare.
6055 (struct thread_info) <regcache_data>: Now a struct regcache
6056 pointer.
6057 * inferiors.c (inferior_regcache_data)
6058 (set_inferior_regcache_data): Now work with struct regcache
6059 pointers.
6060 * inferiors.h (struct regcache): Forward declare.
6061 (inferior_regcache_data, set_inferior_regcache_data): Now work
6062 with struct regcache pointers.
6063 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6064 (free_register_cache_thread): Remove struct regcache pointer
6065 casts.
6066
6067 2015-08-06 Pedro Alves <palves@redhat.com>
6068
6069 * server.c (captured_main): On error, print the exception message
6070 to stderr, and if run_once is set, throw a quit.
6071
6072 2015-08-06 Pedro Alves <palves@redhat.com>
6073
6074 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6075 the current thread.
6076
6077 2015-08-06 Pedro Alves <palves@redhat.com>
6078
6079 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6080 reading beyond the passed in buffer length.
6081
6082 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6083
6084 * tracepoint.c (symbol_list) <required>: Remove.
6085
6086 2015-08-06 Pedro Alves <palves@redhat.com>
6087
6088 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6089 count if stopping and suspending threads.
6090 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6091 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6092 (linux_detach): Complete an ongoing step-over.
6093 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6094 throughout.
6095 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6096 (linux_wait_1): If passing a signal to the inferior after
6097 finishing a step-over, unsuspend and re-resume all lwps. If we
6098 see a single-step event but the thread should be continuing, don't
6099 pass the trap to gdb.
6100 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6101 internal_error instead of gdb_assert.
6102 (enqueue_pending_signal): New function.
6103 (check_ptrace_stopped_lwp_gone): Add debug output.
6104 (start_step_over): Use internal_error instead of gdb_assert.
6105 (complete_ongoing_step_over): New function.
6106 (linux_resume_one_thread): Don't resume a suspended thread.
6107 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6108 it stepping.
6109
6110 2015-08-06 Pedro Alves <palves@redhat.com>
6111
6112 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6113 (linux_thread_alive): Use lwp_is_marked_dead.
6114 (extended_event_reported): Delete.
6115 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6116 instead of extended_event_reported.
6117 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6118 as well.
6119 (lwp_is_marked_dead): New function.
6120 (lwp_running): Use lwp_is_marked_dead.
6121 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6122 comment.
6123
6124 2015-08-06 Pedro Alves <palves@redhat.com>
6125
6126 * linux-low.c (linux_wait_1): Move fork event output out of the
6127 !report_to_gdb check. Pass event_child->waitstatus to
6128 target_waitstatus_to_string instead of ourstatus.
6129
6130 2015-08-04 Yao Qi <yao.qi@linaro.org>
6131
6132 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6133 if current_thread is 32 bit.
6134
6135 2015-08-04 Yao Qi <yao.qi@linaro.org>
6136
6137 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6138 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6139 * server.c (extended_protocol): Remove "static".
6140 * server.h (extended_protocol): Declare it.
6141
6142 2015-08-04 Yao Qi <yao.qi@linaro.org>
6143
6144 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6145 both aarch64 and aarch32.
6146 (aarch64_set_pc): Likewise.
6147
6148 2015-08-04 Yao Qi <yao.qi@linaro.org>
6149
6150 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6151 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6152 arm-with-neon.xml to srv_xmlfiles.
6153 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6154 (is_64bit_tdesc): New function.
6155 (aarch64_linux_read_description): New function.
6156 (aarch64_arch_setup): Call aarch64_linux_read_description.
6157 (regs_info): Rename to regs_info_aarch64.
6158 (aarch64_regs_info): Return right regs_info.
6159 (initialize_low_arch): Call initialize_low_arch_aarch32.
6160
6161 2015-08-04 Yao Qi <yao.qi@linaro.org>
6162
6163 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6164 * linux-aarch32-low.c: New file.
6165 * linux-aarch32-low.h: New file.
6166 * linux-arm-low.c (arm_fill_gregset): Move it to
6167 linux-aarch32-low.c.
6168 (arm_store_gregset): Likewise.
6169 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6170 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6171 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6172 (regs_info): Rename to regs_info_arm.
6173 (arm_regs_info): Return regs_info_aarch32 if
6174 have_ptrace_getregset is 1 and target description is
6175 arm_with_neon or arm_with_vfpv3.
6176 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6177 Call initialize_low_arch_aarch32 instead.
6178
6179 2015-08-04 Yao Qi <yao.qi@linaro.org>
6180
6181 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6182 * linux-low.c: ... here.
6183 * linux-low.h (have_ptrace_getregset): Declare it.
6184
6185 2015-08-04 Pedro Alves <palves@redhat.com>
6186
6187 * thread-db.c (struct thread_db): Use new typedefs.
6188 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6189 CHK calls.
6190 (disable_thread_event_reporting): Cast result of dlsym to
6191 destination function pointer type.
6192 (thread_db_mourn): Use td_ta_delete_ftype.
6193
6194 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6195
6196 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6197 arch variant.
6198 (CDX_BREAKPOINT): Define for R2.
6199 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6200 (the_low_target): Add comments.
6201
6202 2015-07-30 Yao Qi <yao.qi@linaro.org>
6203
6204 * linux-arm-low.c (arm_hwcap): Remove it.
6205 (arm_read_description): New local variable arm_hwcap. Don't
6206 set arm_hwcap to zero.
6207
6208 2015-07-30 Yao Qi <yao.qi@linaro.org>
6209
6210 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6211 Use regcache->tdesc instead.
6212 (arm_store_wmmxregset): Likewise.
6213 (arm_fill_vfpregset): Likewise.
6214 (arm_store_vfpregset): Likewise.
6215
6216 2015-07-30 Yao Qi <yao.qi@linaro.org>
6217
6218 * linux-arm-low.c: Include arch/arm.h.
6219 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6220 (arm_store_gregset): Likewise.
6221
6222 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6223
6224 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6225 ptrace's 4th parameter.
6226
6227 2015-07-27 Yao Qi <yao.qi@linaro.org>
6228
6229 * configure.srv (case aarch64*-*-linux*): Don't set
6230 srv_linux_usrregs.
6231
6232 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6233
6234 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6235 sys/ptrace.h.
6236 * linux-arm-low.c: Likewise.
6237 * linux-cris-low.c: Likewise.
6238 * linux-crisv32-low.c: Likewise.
6239 * linux-low.c: Likewise.
6240 * linux-m68k-low.c: Likewise.
6241 * linux-mips-low.c: Likewise.
6242 * linux-nios2-low.c: Likewise.
6243 * linux-s390-low.c: Likewise.
6244 * linux-sparc-low.c: Likewise.
6245 * linux-tic6x-low.c: Likewise.
6246 * linux-tile-low.c: Likewise.
6247 * linux-x86-low.c: Likewise.
6248
6249 2015-07-24 Pedro Alves <palves@redhat.com>
6250
6251 * config.in: Regenerate.
6252 * configure: Regenerate.
6253
6254 2015-07-24 Pedro Alves <palves@redhat.com>
6255
6256 * acinclude.m4: Include ../ptrace.m4.
6257 * configure.ac: Call GDB_AC_PTRACE.
6258 * config.in, configure: Regenerate.
6259
6260 2015-07-24 Yao Qi <yao.qi@linaro.org>
6261
6262 * linux-low.c (linux_create_inferior): Remove setting to
6263 proc->priv->new_inferior.
6264 (linux_attach): Likewise.
6265 (linux_low_filter_event): Likewise.
6266 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6267
6268 2015-07-24 Yao Qi <yao.qi@linaro.org>
6269
6270 * linux-low.c (linux_arch_setup): New function.
6271 (linux_low_filter_event): If proc->tdesc is NULL and
6272 proc->attached is true, call the_low_target.arch_setup.
6273 Otherwise, keep status pending, and return.
6274 (linux_resume_one_lwp_throw): Don't call get_pc if
6275 thread->while_stepping isn't NULL. Don't call
6276 get_thread_regcache if proc->tdesc is NULL.
6277 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6278 (linux_target_ops): Install arch_setup.
6279 * server.c (start_inferior): Call the_target->arch_setup.
6280 * target.h (struct target_ops) <arch_setup>: New field.
6281 (target_arch_setup): New marco.
6282 * lynx-low.c (lynx_target_ops): Update.
6283 * nto-low.c (nto_target_ops): Update.
6284 * spu-low.c (spu_target_ops): Update.
6285 * win32-low.c (win32_target_ops): Update.
6286
6287 2015-07-24 Yao Qi <yao.qi@linaro.org>
6288
6289 * linux-low.c (linux_add_process): Don't set
6290 proc->priv->new_inferior.
6291 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6292 (linux_attach): Likewise.
6293
6294 2015-07-24 Yao Qi <yao.qi@linaro.org>
6295
6296 * server.c (start_inferior): Code refactor.
6297
6298 2015-07-24 Yao Qi <yao.qi@linaro.org>
6299
6300 * server.c (process_serial_event): Set general_thread.
6301
6302 2015-07-21 Yao Qi <yao.qi@linaro.org>
6303
6304 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6305 aarch64_linux_get_debug_reg_capacity.
6306
6307 2015-07-17 Yao Qi <yao.qi@linaro.org>
6308
6309 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6310 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6311 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6312 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6313 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6314 (AARCH64_HWP_ALIGNMENT): Likewise.
6315 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6316 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6317 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6318 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6319 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6320 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6321 (struct aarch64_debug_reg_state): Likewise.
6322 (struct arch_lwp_info): Likewise.
6323 (aarch64_align_watchpoint): Likewise.
6324 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6325 (aarch64_watchpoint_length): Likewise.
6326 (aarch64_point_encode_ctrl_reg): Likewise
6327 (aarch64_point_is_aligned): Likewise.
6328 (aarch64_align_watchpoint): Likewise.
6329 (aarch64_linux_set_debug_regs):
6330 (aarch64_dr_state_insert_one_point): Likewise.
6331 (aarch64_dr_state_remove_one_point): Likewise.
6332 (aarch64_handle_breakpoint): Likewise.
6333 (aarch64_handle_aligned_watchpoint): Likewise.
6334 (aarch64_handle_unaligned_watchpoint): Likewise.
6335 (aarch64_handle_watchpoint): Likewise.
6336
6337 2015-07-17 Yao Qi <yao.qi@linaro.org>
6338
6339 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6340 and don't aarch64_get_debug_reg_state. All callers update.
6341 (aarch64_handle_aligned_watchpoint): Likewise.
6342 (aarch64_handle_unaligned_watchpoint): Likewise.
6343 (aarch64_handle_watchpoint): Likewise.
6344 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6345 (aarch64_remove_point): Likewise.
6346
6347 2015-07-17 Yao Qi <yao.qi@linaro.org>
6348
6349 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6350 debug_printf.
6351 (aarch64_handle_unaligned_watchpoint): Likewise.
6352
6353 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6354
6355 Revert the previous 3 commits:
6356 Move gdb_regex* to common/
6357 Move linux_find_memory_regions_full & co.
6358 gdbserver build-id attribute generator
6359
6360 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6361 Jan Kratochvil <jan.kratochvil@redhat.com>
6362
6363 gdbserver build-id attribute generator.
6364 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6365 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6366 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6367 (find_phdr): New.
6368 (get_dynamic): Use find_pdhr to traverse program headers.
6369 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6370 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6371 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6372 (get_hex_build_id): New.
6373 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6374 to reply XML document.
6375
6376 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6377 Jan Kratochvil <jan.kratochvil@redhat.com>
6378
6379 * target.c: Include target/target-utils.h and fcntl.h.
6380 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6381 (target_fileio_read_stralloc): New functions.
6382
6383 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6384
6385 * Makefile.in (OBS): Add gdb_regex.o.
6386 (gdb_regex.o): New.
6387 * config.in: Rebuilt.
6388 * configure: Rebuilt.
6389
6390 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6391 Jan Kratochvil <jan.kratochvil@redhat.com>
6392
6393 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6394 * Makefile.in (OBS): Add target-utils.o.
6395 (linux-maps.o, target-utils.o): New.
6396 * configure.srv (srv_linux_obj): Add linux-maps.o.
6397
6398 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6399
6400 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6401 function, return 1.
6402 (the_low_target): Install it.
6403
6404 2015-07-14 Pedro Alves <palves@redhat.com>
6405
6406 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6407 Instead, ignore ECHILD, and throw an error for other errnos.
6408
6409 2015-07-10 Pedro Alves <palves@redhat.com>
6410
6411 * event-loop.c (struct callback_event) <data>: Change type to
6412 gdb_client_data instance instead of gdb_client_data pointer.
6413 (append_callback_event): Adjust.
6414
6415 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6416
6417 * linux-aarch64-low.c: Add comments for each linux_target_ops
6418 method. Remove comments already covered in target_ops and
6419 linux_target_ops definitions.
6420 (the_low_target): Add comments for each unimplemented method.
6421
6422 2015-07-09 Yao Qi <yao.qi@linaro.org>
6423
6424 * linux-aarch64-low.c (aarch64_regmap): Remove.
6425 (aarch64_usrregs_info): Remove.
6426 (regs_info): Set field usrregs to NULL.
6427
6428 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6429
6430 * linux-low.c: Include "rsp-low.h"
6431 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6432 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6433 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6434 (handle_btrace_enable_pt): New.
6435 (handle_btrace_general_set): Support "pt".
6436 (handle_btrace_conf_general_set): Support "pt:size".
6437
6438 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6439
6440 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6441 Z_PACKET_SW_BP.
6442
6443 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6444
6445 * linux-aarch64-low.c: Remove comment about endianness.
6446 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6447 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6448 memcmp.
6449
6450 2015-06-24 Gary Benson <gbenson@redhat.com>
6451
6452 * linux-i386-ipa.c (stdint.h): Do not include.
6453 * lynx-i386-low.c (stdint.h): Likewise.
6454 * lynx-ppc-low.c (stdint.h): Likewise.
6455 * mem-break.c (stdint.h): Likewise.
6456 * thread-db.c (stdint.h): Likewise.
6457 * tracepoint.c (stdint.h): Likewise.
6458 * win32-low.c (stdint.h): Likewise.
6459
6460 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6461
6462 * server.c (write_qxfer_response): Update call to
6463 remote_escape_output.
6464
6465 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6466 Jan Kratochvil <jan.kratochvil@redhat.com>
6467
6468 Merge multiple hex conversions.
6469 * gdbreplay.c (tohex): Rename to 'fromhex'.
6470 (logchar): Use fromhex.
6471
6472 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6473
6474 * server.c (handle_qxfer_libraries): Set `version' attribute for
6475 <library-list>.
6476
6477 2015-06-10 Gary Benson <gbenson@redhat.com>
6478
6479 * target.h (struct target_ops) <multifs_open>: New field.
6480 <multifs_unlink>: Likewise.
6481 <multifs_readlink>: Likewise.
6482 * linux-low.c (nat/linux-namespaces.h): New include.
6483 (linux_target_ops): Initialize the_target->multifs_open,
6484 the_target->multifs_unlink and the_target->multifs_readlink.
6485 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6486 * hostio.c (hostio_fs_pid): New static variable.
6487 (hostio_handle_new_gdb_connection): New function.
6488 (handle_setfs): Likewise.
6489 (handle_open): Use the_target->multifs_open as appropriate.
6490 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6491 (handle_readlink): Use the_target->multifs_readlink as
6492 appropriate.
6493 (handle_vFile): Handle vFile:setfs packets.
6494 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6495 after target_handle_new_gdb_connection.
6496
6497 2015-06-10 Gary Benson <gbenson@redhat.com>
6498
6499 * configure.ac (AC_CHECK_FUNCS): Add setns.
6500 * config.in: Regenerate.
6501 * configure: Likewise.
6502 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6503 (linux-namespaces.o): New rule.
6504 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6505
6506 2015-06-09 Gary Benson <gbenson@redhat.com>
6507
6508 * hostio.c (handle_open): Process mode argument with
6509 fileio_to_host_mode.
6510
6511 2015-06-01 Yao Qi <yao.qi@linaro.org>
6512
6513 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6514 * linux-x86-low.c: Likewise.
6515
6516 2015-05-28 Don Breazeal <donb@codesourcery.com>
6517
6518 * linux-low.c (handle_extended_wait): Initialize
6519 thread_info.last_resume_kind for new fork children.
6520
6521 2015-05-15 Pedro Alves <palves@redhat.com>
6522
6523 * target.h (target_handle_new_gdb_connection): Rewrite using if
6524 wrapped in do/while.
6525
6526 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6527
6528 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6529 * configure, config.in: Regenerate.
6530 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6531 Declare typedef.
6532
6533 2015-05-12 Don Breazeal <donb@codesourcery.com>
6534
6535 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6536 PTRACE_EVENT_VFORK_DONE.
6537 (linux_low_ptrace_options, extended_event_reported): Add vfork
6538 events.
6539 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6540 and "vforkdone" for RSP 'T' Stop Reply Packet.
6541 * server.h (report_vfork_events): Declare
6542 global variable.
6543
6544 2015-05-12 Don Breazeal <donb@codesourcery.com>
6545
6546 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6547 (the_low_target) <new_fork>: Initialize new member.
6548 * linux-arm-low.c (arm_new_fork): New function.
6549 (the_low_target) <new_fork>: Initialize new member.
6550 * linux-low.c (handle_extended_wait): Call new target function
6551 new_fork.
6552 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6553 * linux-mips-low.c (mips_add_watchpoint): New function
6554 extracted from mips_insert_point.
6555 (the_low_target) <new_fork>: Initialize new member.
6556 (mips_linux_new_fork): New function.
6557 (mips_insert_point): Call mips_add_watchpoint.
6558 * linux-x86-low.c (x86_linux_new_fork): New function.
6559 (the_low_target) <new_fork>: Initialize new member.
6560
6561 2015-05-12 Don Breazeal <donb@codesourcery.com>
6562
6563 * linux-low.c (handle_extended_wait): Implement return value,
6564 rename argument 'event_child' to 'event_lwp', handle
6565 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6566 (linux_low_ptrace_options): New function.
6567 (linux_low_filter_event): Call linux_low_ptrace_options,
6568 use different argument fo linux_enable_event_reporting,
6569 use return value from handle_extended_wait.
6570 (extended_event_reported): New function.
6571 (linux_wait_1): Call extended_event_reported and set
6572 status to report fork events.
6573 (linux_write_memory): Add pid to debug message.
6574 (reset_lwp_ptrace_options_callback): New function.
6575 (linux_handle_new_gdb_connection): New function.
6576 (linux_target_ops): Initialize new structure member.
6577 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6578 * lynx-low.c: Initialize new structure member.
6579 * remote-utils.c (prepare_resume_reply): Implement stop reason
6580 "fork" for "T" stop message.
6581 * server.c (handle_query): Call handle_new_gdb_connection.
6582 * server.h (report_fork_events): Declare global flag.
6583 * target.h (struct target_ops) <handle_new_gdb_connection>:
6584 New member.
6585 (target_handle_new_gdb_connection): New macro.
6586 * win32-low.c: Initialize new structure member.
6587
6588 2015-05-12 Don Breazeal <donb@codesourcery.com>
6589
6590 * mem-break.c (APPEND_TO_LIST): Define macro.
6591 (clone_agent_expr): New function.
6592 (clone_one_breakpoint): New function.
6593 (clone_all_breakpoints): New function.
6594 * mem-break.h: Declare new functions.
6595
6596 2015-05-12 Don Breazeal <donb@codesourcery.com>
6597
6598 * linux-low.c (linux_supports_fork_events): New function.
6599 (linux_supports_vfork_events): New function.
6600 (linux_target_ops): Initialize new structure members.
6601 (initialize_low): Call linux_check_ptrace_features.
6602 * lynx-low.c (lynx_target_ops): Initialize new structure
6603 members.
6604 * server.c (report_fork_events, report_vfork_events):
6605 New global flags.
6606 (handle_query): Add new features to qSupported packet and
6607 response.
6608 (captured_main): Initialize new global variables.
6609 * target.h (struct target_ops) <supports_fork_events>:
6610 New member.
6611 <supports_vfork_events>: New member.
6612 (target_supports_fork_events): New macro.
6613 (target_supports_vfork_events): New macro.
6614 * win32-low.c (win32_target_ops): Initialize new structure
6615 members.
6616
6617 2015-05-12 Gary Benson <gbenson@redhat.com>
6618
6619 * server.c (handle_qxfer_exec_file): Use current process
6620 if annex is empty.
6621
6622 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6623
6624 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6625 Remove HAVE_PTRACE_GETREGS conditionals.
6626 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6627 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6628
6629 2015-05-08 Yao Qi <yao.qi@linaro.org>
6630
6631 * linux-low.c (linux_supports_conditional_breakpoints): New
6632 function.
6633 (linux_target_ops): Install new target method.
6634 * lynx-low.c (lynx_target_ops): Install NULL hook for
6635 supports_conditional_breakpoints.
6636 * nto-low.c (nto_target_ops): Likewise.
6637 * spu-low.c (spu_target_ops): Likewise.
6638 * win32-low.c (win32_target_ops): Likewise.
6639 * server.c (handle_query): Check
6640 target_supports_conditional_breakpoints.
6641 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6642 New field.
6643 (target_supports_conditional_breakpoints): New macro.
6644
6645 2015-05-06 Pedro Alves <palves@redhat.com>
6646
6647 PR server/18081
6648 * server.c (start_inferior): If the process exits, mourn it.
6649
6650 2015-04-21 Gary Benson <gbenson@redhat.com>
6651
6652 * hostio.c (fileio_open_flags_to_host): Factored out to
6653 fileio_to_host_openflags in common/fileio.c. Single use
6654 updated.
6655
6656 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6657
6658 * linux-xtensa-low.c (xtensa_fill_gregset)
6659 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6660 XCHAL_HAVE_LOOP.
6661
6662 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6663
6664 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6665 (regs_info): Replace usrregs pointer with NULL.
6666
6667 2015-04-17 Gary Benson <gbenson@redhat.com>
6668
6669 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6670 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6671 * server.c (handle_qxfer_exec_file): New function.
6672 (qxfer_packets): Add exec-file entry.
6673 (handle_query): Report qXfer:exec-file:read as supported packet.
6674
6675 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6676
6677 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6678
6679 2015-04-09 Gary Benson <gbenson@redhat.com>
6680
6681 * hostio-errno.c (errno_to_fileio_error): Remove function.
6682 Update caller to use remote_fileio_to_fio_error.
6683
6684 2015-04-09 Yao Qi <yao.qi@linaro.org>
6685
6686 * linux-low.c (linux_insert_point): Call
6687 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6688 (linux_remove_point): Call remove_memory_breakpoint if type is
6689 raw_bkpt_type_sw.
6690 * linux-x86-low.c (x86_insert_point): Don't call
6691 insert_memory_breakpoint.
6692 (x86_remove_point): Don't call remove_memory_breakpoint.
6693
6694 2015-04-01 Pedro Alves <palves@redhat.com>
6695 Cleber Rosa <crosa@redhat.com>
6696
6697 * server.c (gdbserver_usage): Reorganize and extend the usage
6698 message.
6699
6700 2015-03-24 Pedro Alves <palves@redhat.com>
6701
6702 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6703 output. Also dump TRAP_TRACE.
6704 (linux_low_filter_event): In debug output, distinguish a
6705 resume_stop SIGSTOP from a delayed SIGSTOP.
6706
6707 2015-03-24 Gary Benson <gbenson@redhat.com>
6708
6709 * linux-x86-low.c (x86_linux_new_thread): Moved to
6710 nat/x86-linux.c.
6711 (x86_linux_prepare_to_resume): Likewise.
6712
6713 2015-03-24 Gary Benson <gbenson@redhat.com>
6714
6715 * Makefile.in (x86-linux-dregs.o): New rule.
6716 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6717 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6718 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6719 (x86_linux_dr_get): Likewise.
6720 (x86_linux_dr_set): Likewise.
6721 (update_debug_registers_callback): Likewise.
6722 (x86_linux_dr_set_addr): Likewise.
6723 (x86_linux_dr_get_addr): Likewise.
6724 (x86_linux_dr_set_control): Likewise.
6725 (x86_linux_dr_get_control): Likewise.
6726 (x86_linux_dr_get_status): Likewise.
6727 (x86_linux_update_debug_registers): Likewise.
6728
6729 2015-03-24 Gary Benson <gbenson@redhat.com>
6730
6731 * linux-x86-low.c (x86_linux_update_debug_registers):
6732 New function, factored out from...
6733 (x86_linux_prepare_to_resume): ...this.
6734
6735 2015-03-24 Gary Benson <gbenson@redhat.com>
6736
6737 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6738 (x86_linux_dr_set): Likewise.
6739 (update_debug_registers_callback): Likewise.
6740 (x86_linux_dr_set_addr): Likewise.
6741 (x86_linux_dr_get_addr): Likewise.
6742 (x86_linux_dr_set_control): Likewise.
6743 (x86_linux_dr_get_control): Likewise.
6744 (x86_linux_dr_get_status): Likewise.
6745 (x86_linux_prepare_to_resume): Likewise.
6746
6747 2015-03-24 Gary Benson <gbenson@redhat.com>
6748
6749 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6750 Use perror_with_name. Pass string through gettext.
6751 (x86_linux_dr_set): Likewise.
6752
6753 2015-03-24 Gary Benson <gbenson@redhat.com>
6754
6755 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6756 (x86_linux_dr_set_addr): ...this.
6757 (x86_dr_low_get_addr): Rename to...
6758 (x86_linux_dr_get_addr): ...this.
6759 (x86_dr_low_set_control): Rename to...
6760 (x86_linux_dr_set_control): ...this.
6761 (x86_dr_low_get_control): Rename to...
6762 (x86_linux_dr_get_control): ...this.
6763 (x86_dr_low_get_status): Rename to...
6764 (x86_linux_dr_get_status): ...this.
6765 (x86_dr_low): Update with new function names.
6766
6767 2015-03-24 Gary Benson <gbenson@redhat.com>
6768
6769 * Makefile.in (x86-linux.o): New rule.
6770 * configure.srv: Add x86-linux.o to relevant targets.
6771 * linux-low.c (lwp_set_arch_private_info): New function.
6772 (lwp_arch_private_info): Likewise.
6773 * linux-x86-low.c: Include nat/x86-linux.h.
6774 (arch_lwp_info): Removed structure.
6775 (update_debug_registers_callback):
6776 Use lwp_set_debug_registers_changed.
6777 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6778 and lwp_set_debug_registers_changed.
6779 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6780
6781 2015-03-24 Gary Benson <gbenson@redhat.com>
6782
6783 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6784 * linux-arm-low.c (arm_new_thread): Likewise.
6785 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6786 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6787 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6788 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6789
6790 2015-03-24 Gary Benson <gbenson@redhat.com>
6791
6792 * linux-low.c (ptid_of_lwp): New function.
6793 (lwp_is_stopped): Likewise.
6794 (lwp_stop_reason): Likewise.
6795 * linux-x86-low.c (update_debug_registers_callback):
6796 Use lwp_is_stopped.
6797 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6798 lwp_stop_reason.
6799
6800 2015-03-24 Gary Benson <gbenson@redhat.com>
6801
6802 * linux-low.h (linux_stop_lwp): Remove declaration.
6803
6804 2015-03-24 Gary Benson <gbenson@redhat.com>
6805
6806 * linux-low.h: Include nat/linux-nat.h.
6807 * linux-low.c (iterate_over_lwps_args): New structure.
6808 (iterate_over_lwps_filter): New function.
6809 (iterate_over_lwps): Likewise.
6810 * linux-x86-low.c (update_debug_registers_callback):
6811 Update signature to what iterate_over_lwps expects.
6812 Remove PID check that iterate_over_lwps now performs.
6813 (x86_dr_low_set_addr): Use iterate_over_lwps.
6814 (x86_dr_low_set_control): Likewise.
6815
6816 2015-03-24 Gary Benson <gbenson@redhat.com>
6817
6818 * linux-x86-low.c (x86_debug_reg_state): New function.
6819 (x86_linux_prepare_to_resume): Use the above.
6820
6821 2015-03-24 Gary Benson <gbenson@redhat.com>
6822
6823 * linux-low.c (current_lwp_ptid): New function.
6824 * linux-x86-low.c: Include nat/linux-nat.h.
6825 (x86_dr_low_get_addr): Use current_lwp_ptid.
6826 (x86_dr_low_get_control): Likewise.
6827 (x86_dr_low_get_status): Likewise.
6828
6829 2015-03-20 Pedro Alves <palves@redhat.com>
6830
6831 * tracepoint.c (cmd_qtstatus): Make "str" const.
6832
6833 2015-03-20 Pedro Alves <palves@redhat.com>
6834
6835 * server.c (handle_general_set): Make "req_str" const.
6836
6837 2015-03-19 Pedro Alves <palves@redhat.com>
6838
6839 * linux-low.c (linux_resume_one_lwp): Rename to ...
6840 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6841 instead call perror_with_name.
6842 (check_ptrace_stopped_lwp_gone): New function.
6843 (linux_resume_one_lwp): Reimplement as wrapper around
6844 linux_resume_one_lwp_throw that swallows errors if the LWP is
6845 gone.
6846
6847 2015-03-19 Pedro Alves <palves@redhat.com>
6848
6849 * linux-low.c (count_events_callback, select_event_lwp_callback):
6850 No longer check whether the thread has resume_stop as last resume
6851 kind.
6852
6853 2015-03-19 Pedro Alves <palves@redhat.com>
6854
6855 * linux-low.c (count_events_callback, select_event_lwp_callback):
6856 Use the lwp's status_pending_p field, not the thread's.
6857
6858 2015-03-19 Pedro Alves <palves@redhat.com>
6859
6860 * linux-low.c (select_event_lwp_callback): Update comments to
6861 no longer mention SIGTRAP.
6862
6863 2015-03-18 Gary Benson <gbenson@redhat.com>
6864
6865 * server.c (handle_query): Do not report vFile:fstat as supported.
6866
6867 2015-03-11 Gary Benson <gbenson@redhat.com>
6868
6869 * hostio.c (sys/types.h): New include.
6870 (sys/stat.h): Likewise.
6871 (common-remote-fileio.h): Likewise.
6872 (handle_fstat): New function.
6873 (handle_vFile): Handle vFile:fstat packets.
6874
6875 2015-03-11 Gary Benson <gbenson@redhat.com>
6876
6877 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6878 struct stat.st_blocks and struct stat.st_blksize.
6879 * configure: Regenerate.
6880 * config.in: Likewise.
6881 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6882 (OBS): Add common-remote-fileio.o.
6883 (common-remote-fileio.o): New rule.
6884
6885 2015-03-09 Pedro Alves <palves@redhat.com>
6886
6887 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6888 'struct sockaddr' pointer in 'accept' call.
6889
6890 2015-03-09 Pedro Alves <palves@redhat.com>
6891
6892 Revert:
6893 2015-03-07 Pedro Alves <palves@redhat.com>
6894 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6895 or <winsock2.h> here. Instead include "gdb_socket.h".
6896 (remote_open): Use union gdb_sockaddr_u.
6897 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6898 or <winsock2.h> here. Instead include "gdb_socket.h".
6899 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6900 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6901 or <sys/un.h>.
6902 (init_named_socket, gdb_agent_helper_thread): Use union
6903 gdb_sockaddr_u.
6904
6905 2015-03-07 Pedro Alves <palves@redhat.com>
6906
6907 * configure.ac (build_warnings): Move
6908 -Wdeclaration-after-statement to the C-specific set.
6909 * configure: Regenerate.
6910
6911 2015-03-07 Pedro Alves <palves@redhat.com>
6912
6913 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6914 or <winsock2.h> here. Instead include "gdb_socket.h".
6915 (remote_open): Use union gdb_sockaddr_u.
6916 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6917 or <winsock2.h> here. Instead include "gdb_socket.h".
6918 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6919 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6920 or <sys/un.h>.
6921 (init_named_socket, gdb_agent_helper_thread): Use union
6922 gdb_sockaddr_u.
6923
6924 2015-03-07 Pedro Alves <palves@redhat.com>
6925
6926 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6927 instead.
6928
6929 2015-03-06 Yao Qi <yao.qi@linaro.org>
6930
6931 * linux-aarch64-low.c (aarch64_insert_point): Use
6932 show_debug_regs as a boolean.
6933 (aarch64_remove_point): Likewise.
6934
6935 2015-03-05 Pedro Alves <palves@redhat.com>
6936
6937 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6938 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6939 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6940 * nto-low.c (nto_target_ops): Likewise.
6941 * spu-low.c (spu_target_ops): Likewise.
6942 * win32-low.c (win32_target_ops): Likewise.
6943
6944 2015-03-04 Pedro Alves <palves@redhat.com>
6945
6946 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6947 Decide whether a breakpoint triggered based on the SIGTRAP's
6948 siginfo.si_code.
6949 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6950 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6951 (linux_low_filter_event): Check for breakpoints before checking
6952 watchpoints.
6953 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6954 siginfo.si_code.
6955 (linux_stopped_by_sw_breakpoint)
6956 (linux_supports_stopped_by_sw_breakpoint)
6957 (linux_stopped_by_hw_breakpoint)
6958 (linux_supports_stopped_by_hw_breakpoint): New functions.
6959 (linux_target_ops): Install new target methods.
6960
6961 2015-03-04 Pedro Alves <palves@redhat.com>
6962
6963 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6964 * server.c (swbreak_feature, hwbreak_feature): New globals.
6965 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6966 (captured_main): Clear swbreak_feature and hwbreak_feature.
6967 * server.h (swbreak_feature, hwbreak_feature): Declare.
6968 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6969 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6970 supports_stopped_by_hw_breakpoint>: New fields.
6971 (target_supports_stopped_by_sw_breakpoint)
6972 (target_stopped_by_sw_breakpoint)
6973 (target_supports_stopped_by_hw_breakpoint)
6974 (target_stopped_by_hw_breakpoint): Declare.
6975
6976 2015-03-04 Pedro Alves <palves@redhat.com>
6977
6978 enum lwp_stop_reason -> enum target_stop_reason
6979 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6980 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6981 (linux_wait_1, stuck_in_jump_pad_callback)
6982 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6983 (linux_stopped_by_watchpoint):
6984 * linux-low.h (enum lwp_stop_reason): Delete.
6985 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6986 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6987
6988 2015-03-04 Yao Qi <yao.qi@linaro.org>
6989
6990 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6991
6992 2015-03-03 Gary Benson <gbenson@redhat.com>
6993
6994 * hostio.c (handle_vFile): Fix prefix lengths.
6995
6996 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6997
6998 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6999 ptr_bits.
7000
7001 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7002
7003 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7004 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7005 (clean): Add "rm -f" for above C files.
7006 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7007 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7008 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7009 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7010 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7011 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7012 (init_registers_s390x_vx_linux64)
7013 (init_registers_s390x_tevx_linux64)
7014 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7015 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7016 declarations.
7017 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7018 (s390_store_vxrs_high): New functions.
7019 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7020 NT_S390_VXRS_HIGH.
7021 (s390_arch_setup): Add logic for selecting one of the new target
7022 descriptions. Activate the new vector regsets if applicable.
7023 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7024 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7025 and init_registers_s390x_tevx_linux64.
7026
7027 2015-03-01 Pedro Alves <palves@redhat.com>
7028
7029 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7030 parameter.
7031
7032 2015-02-27 Pedro Alves <palves@redhat.com>
7033
7034 * linux-x86-low.c (u_debugreg_offset): New function.
7035 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7036
7037 2015-02-27 Pedro Alves <palves@redhat.com>
7038
7039 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7040 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7041 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7042 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7043 (ps_lsetfpregs, ps_getpid)
7044 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7045 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7046 (ps_lsetxregs, ps_plog): Declare.
7047
7048 2015-02-27 Pedro Alves <palves@redhat.com>
7049
7050 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7051 IP_AGENT_EXPORT_FUNC.
7052 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7053 IP_AGENT_EXPORT_FUNC.
7054 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7055 (IP_AGENT_EXPORT): Delete.
7056 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7057 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7058 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7059 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7060 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7061 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7062 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7063 (traceframe_read_count, traceframe_write_count)
7064 (traceframes_created, trace_state_variables, get_raw_reg)
7065 (get_trace_state_variable_value, set_trace_state_variable_value)
7066 (ust_loaded, helper_thread_id, cmd_buf): Use
7067 IPA_SYM_EXPORTED_NAME.
7068 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7069 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7070 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7071 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7072 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7073 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7074 EXTERN_C_PUSH/EXTERN_C_POP.
7075 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7076 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7077 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7078 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7079 (traceframe_write_count, traceframe_read_count)
7080 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7081 (about_to_request_buffer_space, get_trace_state_variable_value)
7082 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7083 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7084 EXTERN_C_PUSH/EXTERN_C_POP.
7085 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7086 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7087 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7088 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7089 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7090 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7091 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7092 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7093 Define.
7094 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7095 (IP_AGENT_EXPORT_VAR_DECL): Define.
7096 (tracing): Declare.
7097 (gdb_agent_get_raw_reg): Declare.
7098
7099 2015-02-27 Tom Tromey <tromey@redhat.com>
7100 Pedro Alves <palves@redhat.com>
7101
7102 Rename symbols whose names are reserved C++ keywords throughout.
7103
7104 2015-02-27 Pedro Alves <palves@redhat.com>
7105
7106 * Makefile.in (COMPILER): New, get it from autoconf.
7107 (CXX): Get from autoconf instead.
7108 (COMPILE.pre): Use COMPILER.
7109 (CC-LD): Rename to ...
7110 (CC_LD): ... this. Use COMPILER.
7111 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7112 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7113 * acinclude.m4: Include build-with-cxx.m4.
7114 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7115 Disable -Werror by default if building in C++ mode.
7116 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7117 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7118 the C++ compiler. Save/restore CXXFLAGS too.
7119 * configure: Regenerate.
7120
7121 2015-02-27 Pedro Alves <palves@redhat.com>
7122
7123 * acinclude.m4: Include libiberty.m4.
7124 * configure.ac: Call libiberty_INIT.
7125 * config.in, configure: Regenerate.
7126
7127 2015-02-26 Pedro Alves <palves@redhat.com>
7128
7129 * linux-low.c (linux_wait_1): When incrementing the PC past a
7130 program breakpoint always use the_low_target.breakpoint_len as
7131 increment, rather than the maximum between that and
7132 the_low_target.decr_pc_after_break.
7133
7134 2015-02-23 Pedro Alves <palves@redhat.com>
7135
7136 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7137 thread was doing a step-over; always adjust the PC if
7138 we stepped over a permanent breakpoint.
7139 (linux_wait_1): If we stepped over breakpoint that was on top of a
7140 permanent breakpoint, manually advance the PC past it.
7141
7142 2015-02-23 Pedro Alves <palves@redhat.com>
7143
7144 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7145 modes.
7146 (x86_fill_gregset, x86_store_gregset): Use it when handling
7147 $orig_eax.
7148
7149 2015-02-20 Pedro Alves <palves@redhat.com>
7150
7151 * thread-db.c: Include "nat/linux-procfs.h".
7152 (thread_db_init): Skip listing new threads if the kernel supports
7153 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7154
7155 2015-02-20 Pedro Alves <palves@redhat.com>
7156
7157 * linux-low.c (status_pending_p_callback): Use ptid_match.
7158
7159 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7160
7161 PR breakpoints/16812
7162 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7163 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7164 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7165
7166 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7167
7168 PR breakpoints/15956
7169 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7170
7171 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7172
7173 * linux-low.c (linux_low_btrace_conf): Print size.
7174 * server.c (handle_btrace_conf_general_set): New.
7175 (hanle_general_set): Call handle_btrace_conf_general_set.
7176 (handle_query): Report Qbtrace-conf:bts:size as supported.
7177
7178 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7179
7180 * linux-low.c (linux_low_enable_btrace): Update parameters.
7181 (linux_low_btrace_conf): New.
7182 (linux_target_ops)<to_btrace_conf>: Initialize.
7183 * server.c (current_btrace_conf): New.
7184 (handle_btrace_enable): Rename to ...
7185 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7186 to target_enable_btrace. Update comment. Update users.
7187 (handle_qxfer_btrace_conf): New.
7188 (qxfer_packets): Add btrace-conf entry.
7189 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7190 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7191 (target_ops)<read_btrace_conf>: New.
7192 (target_enable_btrace): Update parameters.
7193 (target_read_btrace_conf): New.
7194
7195 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7196
7197 * server.c (handle_btrace_general_set): Remove call to
7198 target_supports_btrace.
7199 (supported_btrace_packets): New.
7200 (handle_query): Call supported_btrace_packets.
7201 * target.h: include btrace-common.h.
7202 (btrace_target_info): Removed.
7203 (supports_btrace, target_supports_btrace): Update parameters.
7204
7205 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7206
7207 * Makefile.in (SFILES): Add common/btrace-common.c.
7208 (OBS): Add common/btrace-common.o.
7209 (btrace-common.o): Add build rules.
7210 * linux-low: Include btrace-common.h.
7211 (linux_low_read_btrace): Use struct btrace_data. Call
7212 btrace_data_init and btrace_data_fini.
7213
7214 2015-02-06 Pedro Alves <palves@redhat.com>
7215
7216 * thread-db.c (find_new_threads_callback): Add debug output.
7217
7218 2015-02-04 Pedro Alves <palves@redhat.com>
7219
7220 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7221 (resume_stopped_resumed_lwps): New function.
7222 (linux_wait_for_event_filtered): Use it.
7223
7224 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7225
7226 * Makefile.in (SFILES): Add linux-personality.c.
7227 (linux-personality.o): New rule.
7228 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7229 list of objects to be built.
7230 * linux-low.c: Include nat/linux-personality.h.
7231 (linux_create_inferior): Remove code to disable address space
7232 randomization (moved to ../nat/linux-personality.c). Create
7233 cleanup to disable address space randomization.
7234
7235 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7236
7237 * Makefile.in (posix-strerror.o): New rule.
7238 (mingw-strerror.o): Likewise.
7239 * configure: Regenerated.
7240 * configure.ac: Source file ../common/common.host. Initialize new
7241 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7242
7243 2015-01-14 Yao Qi <yao@codesourcery.com>
7244
7245 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7246 (ppc-linux.o): New rule.
7247 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7248 * configure.ac: AC_CHECK_FUNCS(getauxval).
7249 * config.in: Re-generated.
7250 * configure: Re-generated.
7251 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7252 ppc64_64bit_inferior_p
7253
7254 2015-01-14 Yao Qi <yao@codesourcery.com>
7255
7256 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7257 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7258 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7259 (PT_ORIG_R3, PT_TRAP): Likewise.
7260 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7261 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7262 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7263
7264 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7265
7266 * i387-fp.c (i387_cache_to_xsave): In look over
7267 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7268 zmmh_low_space field by use of zmmh_high_space.
7269
7270 2015-01-09 Pedro Alves <palves@redhat.com>
7271
7272 * linux-low.c (step_over_bkpt): Move higher up in the file.
7273 (handle_extended_wait): Don't store the stop_pc here.
7274 (get_stop_pc): Adjust comments and rename to ...
7275 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7276 stopped for a software breakpoint or hardware breakpoint.
7277 (thread_still_has_status_pending_p): New function.
7278 (status_pending_p_callback): Use
7279 thread_still_has_status_pending_p. If the event is no longer
7280 interesting, resume the LWP.
7281 (handle_tracepoints): Add assert.
7282 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7283 (wstatus_maybe_breakpoint): New function.
7284 (cancel_breakpoint): Delete function.
7285 (check_stopped_by_watchpoint): New function, factored out from
7286 linux_low_filter_event.
7287 (lp_status_maybe_breakpoint): Delete function.
7288 (linux_low_filter_event): Remove filter_ptid argument.
7289 Leave thread group exits pending here. Store the LWP's stop PC.
7290 Always leave events pending.
7291 (linux_wait_for_event_filtered): Pull all events out of the
7292 kernel, and leave them all pending.
7293 (count_events_callback, select_event_lwp_callback): Consider all
7294 events.
7295 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7296 (select_event_lwp): Only give preference to the stepping LWP in
7297 all-stop mode. Adjust comments.
7298 (ignore_event): New function.
7299 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7300 references to cancel_breakpoints. Adjust to renames. Also give
7301 equal priority to all LWPs that have had events in non-stop mode.
7302 If reporting a software breakpoint event, unadjust the LWP's PC.
7303 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7304 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7305 Adjust.
7306 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7307 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7308 (linux_stopped_by_watchpoint): Adjust.
7309 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7310 * linux-low.h (enum lwp_stop_reason): New.
7311 (struct lwp_info) <stop_pc>: Adjust comment.
7312 <stopped_by_watchpoint>: Delete field.
7313 <stop_reason>: New field.
7314 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7315 * mem-break.c (software_breakpoint_inserted_here)
7316 (hardware_breakpoint_inserted_here): New function.
7317 * mem-break.h (software_breakpoint_inserted_here)
7318 (hardware_breakpoint_inserted_here): Declare.
7319 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7320 (cancel_breakpoints): Delete.
7321 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7322 (upload_fast_traceframes): Remove references to
7323 cancel_breakpoints.
7324
7325 2015-01-09 Pedro Alves <palves@redhat.com>
7326
7327 * thread-db.c (find_new_threads_callback): Ignore thread if the
7328 kernel thread ID is -1.
7329
7330 2015-01-09 Pedro Alves <palves@redhat.com>
7331
7332 * linux-low.c (linux_attach_fail_reason_string): Move to
7333 nat/linux-ptrace.c, and rename.
7334 (linux_attach_lwp): Update comment.
7335 (attach_proc_task_lwp_callback): New function.
7336 (linux_attach): Adjust to rename and use
7337 linux_proc_attach_tgid_threads.
7338 (linux_attach_fail_reason_string): Delete declaration.
7339
7340 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7341
7342 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7343 * server.c (gdbserver_version): Likewise.
7344
7345 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7346
7347 * remote-utils.c: Include ctype.h.
7348 (input_interrupt): Explicitly handle the case when the char
7349 received is the NUL byte. Improve the printing of non-ASCII
7350 characters.
7351
7352 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7353
7354 * linux-low.c (linux_low_filter_event): Update call to
7355 linux_enable_event_reporting following the addition of
7356 a new parameter to that function.
7357
7358 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7359
7360 PR server/17457
7361 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7362 (AARCH64_FPCR_REGNO): Likewise.
7363 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7364 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7365 (aarch64_store_fpregset): Likewise.
7366
7367 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7368
7369 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7370 Remove FIXME comment about assumption about N.
7371
7372 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7373
7374 * configure.ac: If large-file support is disabled in GDBserver,
7375 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7376 * configure: Regenerate.
7377
7378 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7379
7380 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7381 warning upon ENODATA from ptrace.
7382 * linux-s390-low.c (s390_store_tdb): New.
7383 (s390_regsets): Add regset for NT_S390_TDB.
7384
7385 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7386
7387 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7388 without a fill_function.
7389 * linux-s390-low.c (s390_fill_last_break): Remove.
7390 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7391 (s390_arch_setup): Use regset's size instead of fill_function for
7392 loop end condition.
7393
7394 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7395
7396 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7397 the regset's store function when ptrace returned an error.
7398 * regcache.c (get_thread_regcache): Invalidate register cache
7399 before fetching inferior's registers.
7400
7401 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7402
7403 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7404 while-loop as for-loop.
7405 (regsets_store_inferior_registers): Likewise.
7406
7407 2014-11-28 Yao Qi <yao@codesourcery.com>
7408
7409 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7410 * config.in, configure: Re-generate.
7411 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7412 is defined.
7413
7414 2014-11-21 Yao Qi <yao@codesourcery.com>
7415
7416 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7417 (AC_CHECK_HEADERS): Remove malloc.h.
7418 * configure: Re-generated.
7419 * config.in: Re-generated.
7420 * server.h: Don't include alloca.h and malloc.h.
7421 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7422 Don't include malloc.h.
7423
7424 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7425
7426 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7427 corresponding ERRNO check in same block.
7428
7429 2014-11-12 Pedro Alves <palves@redhat.com>
7430
7431 * server.c (cont_thread): Update comment.
7432 (start_inferior, attach_inferior): No longer clear cont_thread.
7433 (handle_v_cont): No longer set cont_thread.
7434 (captured_main): Clear cont_thread each time a GDB connects.
7435
7436 2014-11-12 Pedro Alves <palves@redhat.com>
7437
7438 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7439 thread, and don't resume all threads if the Hc thread has exited.
7440
7441 2014-11-12 Pedro Alves <palves@redhat.com>
7442
7443 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7444 the process group instead of to a specific LWP.
7445
7446 2014-10-15 Pedro Alves <palves@redhat.com>
7447
7448 PR server/17487
7449 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7450 parameter.
7451 (arm_set_thread_context): Delete.
7452 (the_low_target): Adjust.
7453 * win32-i386-low.c (debug_registers_changed)
7454 (debug_registers_used): Delete.
7455 (update_debug_registers_callback): New function.
7456 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7457 needing to update their debug registers.
7458 (win32_get_current_dr): New function.
7459 (x86_dr_low_get_addr, x86_dr_low_get_control)
7460 (x86_dr_low_get_status): Fetch the debug register from the thread
7461 record's context.
7462 (i386_initial_stuff): Adjust.
7463 (i386_get_thread_context): Remove current_event parameter. Don't
7464 clear debug_registers_changed nor copy DR values to
7465 debug_reg_state.
7466 (i386_set_thread_context): Delete.
7467 (i386_prepare_to_resume): New function.
7468 (i386_thread_added): Mark the thread as needing to update irs
7469 debug registers.
7470 (the_low_target): Remove i386_set_thread_context and install
7471 i386_prepare_to_resume.
7472 * win32-low.c (win32_get_thread_context): Adjust.
7473 (win32_set_thread_context): Use SetThreadContext
7474 directly.
7475 (win32_prepare_to_resume): New function.
7476 (win32_require_context): New function, factored out from ...
7477 (thread_rec): ... this.
7478 (continue_one_thread): Call win32_prepare_to_resume on each thread
7479 we're about to continue.
7480 (win32_resume): Call win32_prepare_to_resume on the event thread.
7481 * win32-low.h (struct win32_thread_info)
7482 <debug_registers_changed>: New field.
7483 (struct win32_target_ops): Change prototype of set_thread_context,
7484 delete set_thread_context and add prepare_to_resume.
7485 (win32_require_context): New declaration.
7486
7487 2014-10-08 Gary Benson <gbenson@redhat.com>
7488
7489 * server.h: Do not include common-exceptions.h.
7490
7491 2014-10-08 Gary Benson <gbenson@redhat.com>
7492
7493 * server.h: Do not include cleanups.h.
7494
7495 2014-09-30 James Hogan <james.hogan@imgtec.com>
7496
7497 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7498 mips64-dsp-linux.c.
7499
7500 2014-09-23 Yao Qi <yao@codesourcery.com>
7501
7502 * linux-low.c (lp_status_maybe_breakpoint): New function.
7503 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7504 (count_events_callback): Likewise.
7505 (select_event_lwp_callback): Likewise.
7506 (cancel_breakpoints_callback): Likewise.
7507
7508 2014-09-19 Don Breazeal <donb@codesourcery.com>
7509
7510 * linux-low.c (handle_extended_wait): Call
7511 linux_ptrace_get_extended_event.
7512 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7513 linux_is_extended_waitstatus.
7514
7515 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7516
7517 * Makefile.in (CPPFLAGS): Define.
7518 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7519 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7520
7521 2014-09-16 Gary Benson <gbenson@redhat.com>
7522
7523 * inferiors.h (current_inferior): Renamed as...
7524 (current_thread): New variable. All uses updated.
7525 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7526 (maybe_move_out_of_jump_pad): Likewise.
7527 (cancel_breakpoint): Likewise.
7528 (linux_low_filter_event): Likewise.
7529 (wait_for_sigstop): Likewise.
7530 (linux_resume_one_lwp): Likewise.
7531 (need_step_over_p): Likewise.
7532 (start_step_over): Likewise.
7533 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7534 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7535 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7536 and save_inferior as saved_thread.
7537 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7538 saved_thread.
7539 (regcache_invalidate_thread): Likewise.
7540 * remote-utils.c (prepare_resume_reply): Likewise.
7541 * thread-db.c (thread_db_get_tls_address): Likewise.
7542 (disable_thread_event_reporting): Likewise.
7543 (remove_thread_event_breakpoints): Likewise.
7544 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7545 as saved_thread.
7546 * target.h (set_desired_inferior): Renamed as...
7547 (set_desired_thread): New declaration. All uses updated.
7548 * server.c (myresume): Updated comment to reference thread instead
7549 of inferior.
7550 (handle_serial_event): Likewise.
7551 (handle_target_event): Likewise.
7552
7553 2014-09-12 Tom Tromey <tromey@redhat.com>
7554 Gary Benson <gbenson@redhat.com>
7555
7556 * regcache.h: Include common-regcache.h.
7557 (regcache_read_pc): Don't declare.
7558 * regcache.c (get_thread_regcache_for_ptid): New function.
7559
7560 2014-09-11 Tom Tromey <tromey@redhat.com>
7561 Gary Benson <gbenson@redhat.com>
7562
7563 * symbol.c: New file.
7564 * Makefile.in (SFILES): Add symbol.c.
7565 (OBS): Add symbol.o.
7566
7567 2014-09-11 Gary Benson <gbenson@redhat.com>
7568
7569 * target.c (target_stop_ptid, target_continue_ptid): New
7570 functions.
7571
7572 2014-09-11 Tom Tromey <tromey@redhat.com>
7573 Gary Benson <gbenson@redhat.com>
7574
7575 * target.h: Include target/target.h.
7576 * target.c (target_read_memory, target_read_uint32)
7577 (target_write_memory): New functions.
7578
7579 2014-09-11 Gary Benson <gbenson@redhat.com>
7580
7581 * server.h (debug_hw_points): Don't declare.
7582 * server.c (debug_hw_points): Don't define. Replace all uses
7583 with show_debug_regs.
7584 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7585 all uses with show_debug_regs.
7586
7587 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7588
7589 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7590 endianness into account.
7591 (ppc_supply_ptrace_register): Likewise.
7592
7593 2014-09-03 James Hogan <james.hogan@imgtec.com>
7594
7595 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7596 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7597
7598 2014-09-03 Gary Benson <gbenson@redhat.com>
7599
7600 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7601 ALL_DEBUG_ADDRESS_REGISTERS.
7602
7603 2014-09-02 Gary Benson <gbenson@redhat.com>
7604
7605 * i386-low.h: Renamed as...
7606 * x86-low.h: New file. All type, function and variable name
7607 prefixes changed from "i386_" to "x86_". All references updated.
7608 * i386-low.c: Renamed as...
7609 * x86-low.c: New file. All type, function and variable name
7610 prefixes changed from "i386_" to "x86_". All references updated.
7611
7612 2014-09-02 Gary Benson <gbenson@redhat.com>
7613
7614 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7615 (x86_linux_new_thread): Likewise.
7616
7617 2014-08-29 Gary Benson <gbenson@redhat.com>
7618
7619 * server.h (setjmp.h): Do not include.
7620 (toplevel): Do not declare.
7621 (common-exceptions.h): Include.
7622 (cleanups.h): Likewise.
7623 * server.c (toplevel): Do not define.
7624 (exit_code): New static global.
7625 (detach_or_kill_for_exit_cleanup): New function.
7626 (main): New function. Original main renamed to...
7627 (captured_main): New function.
7628 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7629
7630 2014-08-29 Gary Benson <gbenson@redhat.com>
7631
7632 * Makefile.in (SFILES): Add common/common-exceptions.c.
7633 (OBS): Add common-exceptions.o.
7634 (common-exceptions.o): New rule.
7635 * utils.c (prepare_to_throw_exception): New function.
7636
7637 2014-08-29 Gary Benson <gbenson@redhat.com>
7638
7639 * config.in: Regenerate.
7640 * configure: Likewise.
7641
7642 2014-08-29 Gary Benson <gbenson@redhat.com>
7643
7644 * Makefile.in (SFILES): Add common/cleanups.c.
7645 (OBS): cleanups.o.
7646 (cleanups.o): New rule.
7647
7648 2014-08-29 Gary Benson <gbenson@redhat.com>
7649
7650 * utils.c (internal_vwarning): New function.
7651
7652 2014-08-28 Gary Benson <gbenson@redhat.com>
7653
7654 * utils.h (fatal): Remove declaration.
7655 * utils.c (fatal): Remove function.
7656
7657 2014-08-28 Gary Benson <gbenson@redhat.com>
7658
7659 * tracepoint.c (gdb_agent_init): Replace fatal with
7660 perror_with_name.
7661 (initialize_tracepoint): Likewise.
7662
7663 2014-08-28 Gary Benson <gbenson@redhat.com>
7664
7665 * remote-utils.c (remote_prepare): Replace fatal with error.
7666
7667 2014-08-28 Gary Benson <gbenson@redhat.com>
7668
7669 * linux-low.c (linux_async): Replace fatal with warning.
7670 Tidy up and return.
7671 (linux_start_non_stop): Return -1 if linux_async failed.
7672
7673 2014-08-28 Gary Benson <gbenson@redhat.com>
7674
7675 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7676 gdb_assert.
7677 (i386_dr_low_get_addr): Remove vague comment.
7678 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7679 gdb_assert.
7680
7681 2014-08-28 Gary Benson <gbenson@redhat.com>
7682
7683 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7684 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7685 internal_error.
7686 (linux_resume_one_lwp): Likewise.
7687 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7688 gdb_assert.
7689 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7690 with internal_error.
7691 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7692 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7693 (find_register_by_name): Replace fatal with internal_error.
7694 (find_regno): Likewise.
7695 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7696 * thread-db.c (thread_db_create_event): Likewise.
7697 (thread_db_load_search): Likewise.
7698 (try_thread_db_load_1): Likewise.
7699 * tracepoint.c (get_jump_space_head): Replace fatal with
7700 internal_error.
7701 (claim_trampoline_space): Likewise.
7702 (have_fast_tracepoint_trampoline_buffer): Likewise.
7703 (cmd_qtstart): Likewise.
7704 (stop_tracing): Likewise.
7705 (fast_tracepoint_collecting): Likewise.
7706 (target_malloc): Likewise.
7707 (download_tracepoint): Likewise.
7708 (download_trace_state_variables): Replace check with gdb_assert.
7709 (upload_fast_traceframes): Replace fatal with internal_error.
7710
7711 2014-08-19 Tom Tromey <tromey@redhat.com>
7712 Gary Benson <gbenson@redhat.com>
7713
7714 * Makefile.in (SFILES): Add common/common-debug.c.
7715 (OBS): Add common-debug.o.
7716 (common-debug.o): New rule.
7717 * debug.h (debug_printf): Don't declare.
7718 * debug.c (debug_printf): Renamed and rewritten as...
7719 (debug_vprintf): New function.
7720
7721 2014-08-19 Gary Benson <gbenson@redhat.com>
7722
7723 * utils.h: Do not include print-utils.h.
7724
7725 2014-08-19 Tom Tromey <tromey@redhat.com>
7726 Gary Benson <gbenson@redhat.com>
7727
7728 * server.h: Add static assertion.
7729 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7730
7731 2014-08-19 Tom Tromey <tromey@redhat.com>
7732 Gary Benson <gbenson@redhat.com>
7733
7734 * Makefile.in (SFILES): Add common/errors.c.
7735 (OBS): Add errors.o.
7736 (IPA_OBS): Add errors-ipa.o.
7737 (errors.o): New rule.
7738 (errors-ipa.o): Likewise.
7739 * utils.h (perror_with_name, error, warning): Don't declare.
7740 * utils.c (warning): Renamed and rewritten as...
7741 (vwarning): New function.
7742 (error): Renamed and rewritten as...
7743 (verror): New function.
7744 (internal_error): Renamed and rewritten as...
7745 (internal_verror): New function.
7746
7747 2014-08-07 Gary Benson <gbenson@redhat.com>
7748
7749 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7750 * configure: Regenerate.
7751 * config.in: Likewise.
7752 * server.h: Do not include errno.h.
7753 * event-loop.c: Likewise.
7754 * hostio-errno.c: Likewise.
7755 * linux-low.c: Likewise.
7756 * remote-utils.c: Likewise.
7757 * spu-low.c: Likewise.
7758 * utils.c: Likewise.
7759 * gdbreplay.c: Unconditionally include errno.h.
7760
7761 2014-08-07 Gary Benson <gbenson@redhat.com>
7762
7763 * server.h: Do not include string.h.
7764 * event-loop.c: Likewise.
7765 * linux-low.c: Likewise.
7766 * regcache.c: Likewise.
7767 * remote-utils.c: Likewise.
7768 * spu-low.c: Likewise.
7769 * utils.c: Likewise.
7770
7771 2014-08-07 Gary Benson <gbenson@redhat.com>
7772
7773 * server.h: Do not include gdb_assert.h.
7774
7775 2014-08-07 Gary Benson <gbenson@redhat.com>
7776
7777 * server.h: Do not include common-utils.h.
7778
7779 2014-08-07 Gary Benson <gbenson@redhat.com>
7780
7781 * server.h: Do not include ptid.h.
7782 * notif.h: Likewise.
7783
7784 2014-08-07 Gary Benson <gbenson@redhat.com>
7785
7786 * server.h: Do not include gdb_locale.h.
7787
7788 2014-08-07 Gary Benson <gbenson@redhat.com>
7789
7790 * server.h: Do not include gdb/signals.h.
7791 * win32-low.c: Likewise.
7792
7793 2014-08-07 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h: Do not include pathmax.h.
7796
7797 2014-08-07 Gary Benson <gbenson@redhat.com>
7798
7799 * server.h: Do not include libiberty.h.
7800 * linux-bfin-low.c: Likewise.
7801
7802 2014-08-07 Gary Benson <gbenson@redhat.com>
7803
7804 * server.h: Do not include ansidecl.h.
7805
7806 2014-08-07 Gary Benson <gbenson@redhat.com>
7807
7808 * linux-x86-low.c: Do not include stddef.h.
7809 * lynx-ppc-low.c: Likewise.
7810 * tracepoint.c: Likewise.
7811
7812 2014-08-07 Gary Benson <gbenson@redhat.com>
7813
7814 * server.h: Do not include stdarg.h.
7815 * nto-low.c: Likewise.
7816
7817 2014-08-07 Gary Benson <gbenson@redhat.com>
7818
7819 * server.h: Do not include stdlib.h.
7820 * inferiors.c: Likewise.
7821 * linux-low.c: Likewise.
7822 * regcache.c: Likewise.
7823 * spu-low.c: Likewise.
7824 * tracepoint.c: Likewise.
7825 * utils.c: Likewise.
7826
7827 2014-08-07 Gary Benson <gbenson@redhat.com>
7828
7829 * server.h: Do not include stdio.h.
7830 * linux-low.c: Likewise.
7831 * remote-utils.c: Likewise.
7832 * spu-low.c: Likewise.
7833 * utils.c: Likewise.
7834 * wincecompat.c: Likewise.
7835
7836 2014-08-06 Gary Benson <gbenson@redhat.com>
7837
7838 * regcache.c (init_register_cache): Move conditionals inside if.
7839
7840 2014-08-06 Gary Benson <gbenson@redhat.com>
7841
7842 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7843
7844 2014-07-31 Gary Benson <gbenson@redhat.com>
7845
7846 * ax.h: Do not include server.h.
7847 * gdbthread.h: Likewise.
7848 * lynx-low.h: Likewise.
7849 * notif.h: Likewise.
7850
7851 2014-07-30 Gary Benson <gbenson@redhat.com>
7852
7853 * server.h: Include common-defs.h.
7854 Do not include config.h or build-gnulib-gdbserver/config.h.
7855
7856 2014-07-30 Gary Benson <gbenson@redhat.com>
7857
7858 * hostio-errno.c: Move server.h to top of includes list.
7859 * inferiors.c: Likewise.
7860 * linux-x86-low.c: Likewise.
7861 * notif.c: Include server.h.
7862
7863 2014-07-24 Tom Tromey <tromey@redhat.com>
7864 Gary Benson <gbenson@redhat.com>
7865
7866 * server.h (CORE_ADDR): Now unsigned.
7867
7868 2014-07-16 Pedro Alves <palves@redhat.com>
7869
7870 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7871
7872 2014-07-15 Pedro Alves <palves@redhat.com>
7873
7874 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7875 copy.
7876
7877 2014-07-11 Pedro Alves <palves@redhat.com>
7878
7879 * linux-low.c (kill_wait_lwp): New function, based on
7880 kill_one_lwp_callback, but use my_waitpid directly.
7881 (kill_one_lwp_callback, linux_kill): Use it.
7882
7883 2014-06-23 Pedro Alves <palves@redhat.com>
7884
7885 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7886 before setting DR0..DR3.
7887
7888 2014-06-20 Gary Benson <gbenson@redhat.com>
7889
7890 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7891 * configure: Regenerated.
7892 * config.in: Likewise.
7893
7894 2014-06-20 Gary Benson <gbenson@redhat.com>
7895
7896 * Makefile.in (SFILES): Update locations for files moved
7897 from common to nat.
7898 (object file files): Reordered.
7899
7900 2014-06-20 Gary Benson <gbenson@redhat.com>
7901
7902 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7903 (i386_dr_low_set_addr): Likewise.
7904 (i386_dr_low_get_addr): Likewise.
7905 (i386_dr_low_can_set_control): Likewise.
7906 (i386_dr_low_set_control): Likewise.
7907 (i386_dr_low_get_control): Likewise.
7908 (i386_dr_low_get_status): Likewise.
7909 (i386_get_debug_register_length): Likewise.
7910 * linux-x86-low.c (i386_dr_low_set_addr):
7911 Changed signature. Made static.
7912 (i386_dr_low_get_addr): Likewise.
7913 (i386_dr_low_set_control): Likewise.
7914 (i386_dr_low_get_control): Likewise.
7915 (i386_dr_low_get_status): Likewise.
7916 (i386_dr_low): New global variable.
7917 * win32-i386-low.c (i386_dr_low_set_addr):
7918 Changed signature. Made static.
7919 (i386_dr_low_get_addr): Likewise.
7920 (i386_dr_low_set_control): Likewise.
7921 (i386_dr_low_get_control): Likewise.
7922 (i386_dr_low_get_status): Likewise.
7923 (i386_dr_low): New global variable.
7924
7925 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7926
7927 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7928 * Makefile.in (AR, AR_FLAGS): Define.
7929 * configure: Regenerate.
7930
7931 2014-06-19 Gary Benson <gbenson@redhat.com>
7932
7933 * Makefile.in (i386-dregs.o): New rule.
7934 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7935 * i386-low.c (target.h): Remove include.
7936 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7937 (DR_CONTROL_SHIFT): Likewise.
7938 (DR_CONTROL_SIZE): Likewise.
7939 (DR_RW_EXECUTE): Likewise.
7940 (DR_RW_WRITE): Likewise.
7941 (DR_RW_READ): Likewise.
7942 (DR_RW_IORW): Likewise.
7943 (DR_LEN_1): Likewise.
7944 (DR_LEN_2): Likewise.
7945 (DR_LEN_4): Likewise.
7946 (DR_LEN_8): Likewise.
7947 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7948 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7949 (DR_ENABLE_SIZE): Likewise.
7950 (DR_LOCAL_SLOWDOWN): Likewise.
7951 (DR_GLOBAL_SLOWDOWN): Likewise.
7952 (DR_CONTROL_RESERVED): Likewise.
7953 (I386_DR_CONTROL_MASK): Likewise.
7954 (I386_DR_VACANT): Likewise.
7955 (I386_DR_LOCAL_ENABLE): Likewise.
7956 (I386_DR_GLOBAL_ENABLE): Likewise.
7957 (I386_DR_DISABLE): Likewise.
7958 (I386_DR_SET_RW_LEN): Likewise.
7959 (I386_DR_GET_RW_LEN): Likewise.
7960 (I386_DR_WATCH_HIT): Likewise.
7961 (i386_wp_op_t): Likewise.
7962 (i386_show_dr): Likewise.
7963 (i386_length_and_rw_bits): Likewise.
7964 (i386_insert_aligned_watchpoint): Likewise.
7965 (i386_remove_aligned_watchpoint): Likewise.
7966 (i386_handle_nonaligned_watchpoint): Likewise.
7967 i386_update_inferior_debug_regs(): Likewise.
7968 (i386_dr_insert_watchpoint): Likewise.
7969 (i386_dr_remove_watchpoint): Likewise.
7970 (i386_dr_region_ok_for_watchpoint): Likewise.
7971 (i386_dr_stopped_data_address): Likewise.
7972 (i386_dr_stopped_by_watchpoint): Likewise.
7973
7974 2014-06-19 Gary Benson <gbenson@redhat.com>
7975
7976 * i386-low.c (i386_dr_show): Renamed to
7977 i386_show_dr and made static. All uses updated.
7978 (i386_dr_length_and_rw_bits): Renamed to
7979 i386_length_and_rw_bits and made static.
7980 All uses updated.
7981 (i386_dr_insert_aligned_watchpoint): Renamed to
7982 i386_insert_aligned_watchpoint and made static.
7983 All uses updated.
7984 (i386_dr_remove_aligned_watchpoint): Renamed to
7985 i386_remove_aligned_watchpoint and made static.
7986 All uses updated.
7987 (i386_dr_update_inferior_debug_regs): Renamed to
7988 i386_update_inferior_debug_regs and made static.
7989 All uses updated.
7990
7991 2014-06-18 Gary Benson <gbenson@redhat.com>
7992
7993 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7994 (i386_dr_low_can_set_control): Likewise.
7995 (i386_get_debug_register_length): Likewise.
7996 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7997 (i386_dr_low_can_set_control): Likewise.
7998 (i386_get_debug_register_length): Likewise.
7999
8000 2014-06-17 Gary Benson <gbenson@redhat.com>
8001
8002 * i386-low.h (i386-dregs.h): New include.
8003 (DR_FIRSTADDR): Now in i386-dregs.h.
8004 (DR_LASTADDR): Likewise.
8005 (DR_NADDR): Likewise.
8006 (DR_STATUS): Likewise.
8007 (DR_CONTROL): Likewise.
8008 (i386_debug_reg_state): Likewise.
8009 (i386_dr_insert_watchpoint): Likewise.
8010 (i386_dr_remove_watchpoint): Likewise.
8011 (i386_dr_region_ok_for_watchpoint): Likewise.
8012 (i386_dr_stopped_data_address): Likewise.
8013 (i386_dr_stopped_by_watchpoint): Likewise.
8014 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8015
8016 2014-06-18 Gary Benson <gbenson@redhat.com>
8017
8018 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8019 i386_dr_insert_watchpoint.
8020 (i386_low_remove_watchpoint): Renamed to
8021 i386_dr_remove_watchpoint.
8022 (i386_low_region_ok_for_watchpoint): Renamed to
8023 i386_dr_region_ok_for_watchpoint.
8024 (i386_low_stopped_data_address): Renamed to
8025 i386_dr_stopped_data_address.
8026 (i386_low_stopped_by_watchpoint): Renamed to
8027 i386_dr_stopped_by_watchpoint.
8028 * i386-low.c (i386_show_dr): Renamed to
8029 i386_dr_show and made nonstatic. All uses updated.
8030 (i386_length_and_rw_bits): Renamed to
8031 i386_dr_length_and_rw_bits and made nonstatic.
8032 All uses updated.
8033 (i386_insert_aligned_watchpoint): Renamed to
8034 i386_dr_insert_aligned_watchpoint and made nonstatic.
8035 All uses updated.
8036 (i386_remove_aligned_watchpoint): Renamed to
8037 i386_dr_remove_aligned_watchpoint and made nonstatic.
8038 All uses updated.
8039 (i386_update_inferior_debug_regs): Renamed to
8040 i386_dr_update_inferior_debug_regs and made nonstatic.
8041 All uses updated.
8042 (i386_low_insert_watchpoint): Renamed to
8043 i386_dr_insert_watchpoint. All uses updated.
8044 (i386_low_remove_watchpoint): Renamed to
8045 i386_dr_remove_watchpoint. All uses updated.
8046 (i386_low_region_ok_for_watchpoint): Renamed to
8047 i386_dr_region_ok_for_watchpoint. All uses updated.
8048 (i386_low_stopped_data_address): Renamed to
8049 i386_dr_stopped_data_address. All uses updated.
8050 (i386_low_stopped_by_watchpoint): Renamed to
8051 i386_dr_stopped_by_watchpoint. All uses updated.
8052
8053 2014-06-18 Gary Benson <gbenson@redhat.com>
8054
8055 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8056 (i386_dr_low_can_set_control): Likewise.
8057 (i386_insert_aligned_watchpoint): New check.
8058
8059 2014-06-18 Gary Benson <gbenson@redhat.com>
8060
8061 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8062 Renamed to state.
8063
8064 2014-06-18 Gary Benson <gbenson@redhat.com>
8065
8066 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8067 instead of fatal and error.
8068 (i386_handle_nonaligned_watchpoint): Likewise.
8069
8070 2014-06-18 Gary Benson <gbenson@redhat.com>
8071
8072 * i386-low.c (i386_get_debug_register_length): New macro.
8073 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8074 (i386_show_dr): Use debug_printf instead of fprintf. Use
8075 phex to format values.
8076
8077 2014-06-18 Gary Benson <gbenson@redhat.com>
8078
8079 * i386-low.h: Comment changes.
8080 * i386-low.c: Likewise.
8081
8082 2014-06-18 Gary Benson <gbenson@redhat.com>
8083
8084 * i386-low.c: Whitespace changes.
8085
8086 2014-06-12 Tom Tromey <tromey@redhat.com>
8087
8088 * utils.c (freeargv): Remove.
8089
8090 2014-06-12 Tom Tromey <tromey@redhat.com>
8091
8092 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8093 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8094 (parse_debug_format_options): Likewise.
8095 (gdbserver_usage): Likewise.
8096 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8097 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8098 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8099 against libiberty.
8100 ($(LIBGNU)): Depend on libiberty.
8101 (all-lib): Recurse into all subdirs.
8102 (install-only): Invoke "install" target in subdirs.
8103 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8104 targets.
8105 * configure: Rebuild.
8106 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8107 for vasprintf, vsnprintf, or gettimeofday.
8108 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8109 srv_tgtobj.
8110
8111 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8112
8113 * development.sh: Delete.
8114 * Makefile.in (config.status): Adjust dependency on development.sh.
8115 * configure.ac: Adjust development.sh source call.
8116 * configure: Regenerate.
8117
8118 2014-06-02 Pedro Alves <palves@redhat.com>
8119
8120 * ax.c (gdb_free_agent_expr): New function.
8121 * ax.h (gdb_free_agent_expr): New declaration.
8122 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8123 list.
8124 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8125 static.
8126 (clear_breakpoint_conditions_and_commands): New function.
8127 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8128 (clear_breakpoint_conditions_and_commands): New declaration.
8129
8130 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8131
8132 * linux-aarch64-low.c (asm/ptrace.h): Include.
8133
8134 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8135
8136 Fix TLS access for -static -pthread.
8137 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8138 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8139 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8140
8141 2014-05-20 Pedro Alves <palves@redhat.com>
8142
8143 * linux-aarch64-low.c (aarch64_insert_point)
8144 (aarch64_remove_point): No longer check whether the type is
8145 supported here. Adjust to new interface.
8146 (the_low_target): Install aarch64_supports_z_point_type as
8147 supports_z_point_type method.
8148 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8149 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8150 instead of a Z packet char. Adjust.
8151 (arm_supports_z_point_type): New function.
8152 (arm_insert_point, arm_remove_point): Adjust to new interface.
8153 (the_low_target): Install arm_supports_z_point_type.
8154 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8155 (cris_insert_point, cris_remove_point): Adjust to new interface.
8156 Don't check whether the type is supported here.
8157 (the_low_target): Install cris_supports_z_point_type.
8158 * linux-low.c (linux_supports_z_point_type): New function.
8159 (linux_insert_point, linux_remove_point): Adjust to new interface.
8160 * linux-low.h (struct linux_target_ops) <insert_point,
8161 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8162 raw_breakpoint pointer parameter.
8163 <supports_z_point_type>: New method.
8164 * linux-mips-low.c (mips_supports_z_point_type): New function.
8165 (mips_insert_point, mips_remove_point): Adjust to new interface.
8166 Use mips_supports_z_point_type.
8167 (the_low_target): Install mips_supports_z_point_type.
8168 * linux-ppc-low.c (the_low_target): Install NULL as
8169 supports_z_point_type method.
8170 * linux-s390-low.c (the_low_target): Install NULL as
8171 supports_z_point_type method.
8172 * linux-sparc-low.c (the_low_target): Install NULL as
8173 supports_z_point_type method.
8174 * linux-x86-low.c (x86_supports_z_point_type): New function.
8175 (x86_insert_point): Adjust to new insert_point interface. Use
8176 insert_memory_breakpoint. Adjust to new
8177 i386_low_insert_watchpoint interface.
8178 (x86_remove_point): Adjust to remove_point interface. Use
8179 remove_memory_breakpoint. Adjust to new
8180 i386_low_remove_watchpoint interface.
8181 (the_low_target): Install x86_supports_z_point_type.
8182 * lynx-low.c (lynx_target_ops): Install NULL as
8183 supports_z_point_type callback.
8184 * nto-low.c (nto_supports_z_point_type): New.
8185 (nto_insert_point, nto_remove_point): Adjust to new interface.
8186 (nto_target_ops): Install nto_supports_z_point_type.
8187 * mem-break.c: Adjust intro comment.
8188 (struct raw_breakpoint) <raw_type, size>: New fields.
8189 <inserted>: Update comment.
8190 <shlib_disabled>: Delete field.
8191 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8192 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8193 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8194 (raw_bkpt_type_to_target_hw_bp_type): New function.
8195 (find_enabled_raw_code_breakpoint_at): New function.
8196 (find_raw_breakpoint_at): New type and size parameters. Use them.
8197 (insert_memory_breakpoint): New function, based off
8198 set_raw_breakpoint_at.
8199 (remove_memory_breakpoint): New function.
8200 (set_raw_breakpoint_at): Reimplement.
8201 (set_breakpoint): New, based on set_breakpoint_at.
8202 (set_breakpoint_at): Reimplement.
8203 (delete_raw_breakpoint): Go through the_target->remove_point
8204 instead of assuming memory breakpoints.
8205 (find_gdb_breakpoint_at): Delete.
8206 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8207 (find_gdb_breakpoint): New function.
8208 (set_gdb_breakpoint_at): Delete.
8209 (z_type_supported): New function.
8210 (set_gdb_breakpoint_1): New function, loosely based off
8211 set_gdb_breakpoint_at.
8212 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8213 (delete_gdb_breakpoint_at): Delete.
8214 (delete_gdb_breakpoint_1): New function, loosely based off
8215 delete_gdb_breakpoint_at.
8216 (delete_gdb_breakpoint): New function.
8217 (clear_gdb_breakpoint_conditions): Rename to ...
8218 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8219 breakpoint.
8220 (add_condition_to_breakpoint): Make static.
8221 (add_breakpoint_condition): Take a struct breakpoint pointer
8222 instead of an address. Adjust.
8223 (gdb_condition_true_at_breakpoint): Rename to ...
8224 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8225 z_type parameter.
8226 (gdb_condition_true_at_breakpoint): Reimplement.
8227 (add_breakpoint_commands): Take a struct breakpoint pointer
8228 instead of an address. Adjust.
8229 (gdb_no_commands_at_breakpoint): Rename to ...
8230 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8231 parameter. Return true if no breakpoint was found. Change debug
8232 output.
8233 (gdb_no_commands_at_breakpoint): Reimplement.
8234 (run_breakpoint_commands): Rename to ...
8235 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8236 and change return type to boolean.
8237 (run_breakpoint_commands): New function.
8238 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8239 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8240 breakpoint. Go through the_target->remove_point instead of
8241 assuming memory breakpoint.
8242 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8243 software and hardware breakpoints.
8244 (reinsert_raw_breakpoint): Go through the_target->insert_point
8245 instead of assuming memory breakpoint.
8246 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8247 software and hardware breakpoints.
8248 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8249 Check both software and hardware breakpoints.
8250 (validate_inserted_breakpoint): Assert the breakpoint is a
8251 software breakpoint. Set the inserted flag to -1 instead of
8252 setting shlib_disabled.
8253 (delete_disabled_breakpoints): Adjust.
8254 (validate_breakpoints): Only validate software breakpoints.
8255 Adjust to inserted flag change.
8256 (check_mem_read, check_mem_write): Skip breakpoint types other
8257 than software breakpoints. Adjust to inserted flag change.
8258 * mem-break.h (enum raw_bkpt_type): New enum.
8259 (raw_breakpoint, struct process_info): Forward declare.
8260 (Z_packet_to_target_hw_bp_type): Delete declaration.
8261 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8262 (set_gdb_breakpoint, delete_gdb_breakpoint)
8263 (clear_breakpoint_conditions): New declarations.
8264 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8265 (breakpoint_inserted_here): Update comment.
8266 (add_breakpoint_condition, add_breakpoint_commands): Replace
8267 address parameter with a breakpoint pointer parameter.
8268 (gdb_breakpoint_here): Update comment.
8269 (delete_gdb_breakpoint_at): Delete.
8270 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8271 * server.c (process_point_options): Take a struct breakpoint
8272 pointer instead of an address. Adjust.
8273 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8274 delete_gdb_breakpoint.
8275 * spu-low.c (spu_target_ops): Install NULL as
8276 supports_z_point_type method.
8277 * target.h: Include mem-break.h.
8278 (struct target_ops) <prepare_to_access_memory>: Update comment.
8279 <supports_z_point_type>: New field.
8280 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8281 instead of a char. Also take a raw breakpoint pointer.
8282 * win32-arm-low.c (the_low_target): Install NULL as
8283 supports_z_point_type.
8284 * win32-i386-low.c (i386_supports_z_point_type): New function.
8285 (i386_insert_point, i386_remove_point): Adjust to new interface.
8286 (the_low_target): Install i386_supports_z_point_type.
8287 * win32-low.c (win32_supports_z_point_type): New function.
8288 (win32_insert_point, win32_remove_point): Adjust to new interface.
8289 (win32_target_ops): Install win32_supports_z_point_type.
8290 * win32-low.h (struct win32_target_ops):
8291 <supports_z_point_type>: New method.
8292 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8293 instead of a char. Also take a raw breakpoint pointer.
8294
8295 2014-05-20 Pedro Alves <palves@redhat.com>
8296
8297 * mem-break.h: Include break-common.h.
8298 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8299 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8300 (Z_packet_to_target_hw_bp_type): New declaration.
8301 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8302 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8303 (Z_PACKET_ACCESS_WP): Delete macros.
8304 (Z_packet_to_hw_type): Delete function.
8305 * i386-low.h: Don't include break-common.h here.
8306 (Z_packet_to_hw_type): Delete declaration.
8307 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8308 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8309 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8310 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8311 * linux-aarch64-low.c: Don't include break-common.h here.
8312 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8313 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8314 (Z_packet_to_target_hw_bp_type): Delete function.
8315 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8316 function.
8317 (mips_insert_point, mips_remove_point): Use
8318 Z_packet_to_target_hw_bp_type.
8319
8320 2014-05-20 Pedro Alves <palves@redhat.com>
8321
8322 * linux-aarch64-low.c: Include break-common.h.
8323 (enum target_point_type): Delete.
8324 (Z_packet_to_point_type): Rename to ...
8325 (Z_packet_to_target_hw_bp_type): ... this, and return a
8326 target_hw_bp_type instead.
8327 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8328 instead of an enum target_point_type.
8329 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8330 breakpoint type.
8331 (aarch64_dr_state_insert_one_point)
8332 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8333 (aarch64_handle_aligned_watchpoint)
8334 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8335 Take an enum target_hw_bp_type instead of an enum
8336 target_point_type.
8337 (aarch64_supports_z_point_type): New function.
8338 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8339 use Z_packet_to_target_hw_bp_type.
8340
8341 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8342
8343 * configure.ac: Only use -Werror by default when DEVELOPMENT
8344 is true.
8345 * configure: Regenerate.
8346
8347 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8348
8349 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8350 * linux-x86-low.c (X86_64_USER_REGS): New.
8351 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8352
8353 2014-04-28 Yao Qi <yao@codesourcery.com>
8354
8355 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8356 name.
8357
8358 2014-04-25 Pedro Alves <palves@redhat.com>
8359
8360 PR server/16255
8361 * linux-low.c (linux_attach_fail_reason_string): New function.
8362 (linux_attach_lwp): Delete.
8363 (linux_attach_lwp_1): Rename to ...
8364 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8365 argument. Remove "initial" parameter. Return int instead of
8366 void. Don't error or warn here.
8367 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8368 failure to attach to the tgid. Call warning when failing to
8369 attach to an lwp.
8370 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8371 argument. Remove "initial" parameter. Return int instead of
8372 void. Don't error or warn here.
8373 (linux_attach_fail_reason_string): New declaration.
8374 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8375 interface change. Use linux_attach_fail_reason_string.
8376
8377 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8378 Walfred Tedeschi <walfred.tedeschi@intel.com>
8379
8380 * Makefile.in: Added rules to handle new files
8381 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8382 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8383 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8384 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8385 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8386 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8387 x32-avx512-linux.o.
8388 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8389 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8390 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8391 i386/x32-avx512.xml.
8392 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8393 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8394 i386/x32-avx512-linux.xml.
8395 * i387-fp.c (num_avx512_k_registers): New constant for number
8396 of K registers.
8397 (num_avx512_zmmh_low_registers): New constant for number of
8398 lower ZMM registers (0-15).
8399 (num_avx512_zmmh_high_registers): New constant for number of
8400 higher ZMM registers (16-31).
8401 (num_avx512_ymmh_registers): New contant for number of higher
8402 YMM registers (ymm16-31 added by avx521 on x86_64).
8403 (num_avx512_xmm_registers): New constant for number of higher
8404 XMM registers (xmm16-31 added by AVX512 on x86_64).
8405 (struct i387_xsave): Add space for AVX512 registers.
8406 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8407 Add code to handle AVX512 registers.
8408 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8409 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8410 prototypei from generated file.
8411 (tdesc_amd64_avx512_linux): Likewise.
8412 (init_registers_x32_avx512_linux): Likewise.
8413 (tdesc_x32_avx512_linux): Likewise.
8414 (init_registers_i386_avx512_linux): Likewise.
8415 (tdesc_i386_avx512_linux): Likewise.
8416 (x86_64_regmap): Add AVX512 registers.
8417 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8418 mask.
8419 (initialize_low_arch): Add code to initialize AVX512 registers.
8420
8421 2014-04-23 Pedro Alves <palves@redhat.com>
8422
8423 * mem-break.c (find_gdb_breakpoint_at): Make static.
8424 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8425
8426 2014-04-23 Pedro Alves <palves@redhat.com>
8427
8428 * i386-low.c: Don't include break-common.h here.
8429 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8430 prototype to take target_hw_bp_type as argument instead of a Z
8431 packet char.
8432 * i386-low.h: Include break-common.h here.
8433 (Z_packet_to_hw_type): Declare.
8434 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8435 prototypes.
8436 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8437 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8438 (x86_remove_point): Convert the packet number to a
8439 target_hw_bp_type before calling i386_low_remove_watchpoint.
8440 * win32-i386-low.c (i386_insert_point): Convert the packet number
8441 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8442 (i386_remove_point): Convert the packet number to a
8443 target_hw_bp_type before calling i386_low_remove_watchpoint.
8444
8445 2014-04-23 Pedro Alves <palves@redhat.com>
8446
8447 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8448
8449 2014-04-10 Pedro Alves <palves@redhat.com>
8450
8451 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8452 Check if the condition or command is NULL before checking if the
8453 breakpoint is known. On success, return true.
8454 * mem-break.h (add_breakpoint_condition): Document return.
8455 (add_breakpoint_commands): Add describing comment.
8456 * server.c (skip_to_semicolon): New function.
8457 (process_point_options): Use it.
8458
8459 2014-04-09 Pedro Alves <palves@redhat.com>
8460
8461 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8462 to lwpid_of.
8463
8464 2014-02-27 Pedro Alves <palves@redhat.com>
8465
8466 PR 12702
8467 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8468 macros.
8469 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8470 output.
8471 (last_thread_of_process_p): Take a PID argument instead of a
8472 thread pointer.
8473 (linux_wait_for_lwp): Delete.
8474 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8475 functions.
8476 (linux_low_filter_event): New function, party factored out from
8477 linux_wait_for_event.
8478 (linux_wait_for_event): Rename to ...
8479 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8480 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8481 sigsuspend. Check for zombie leaders.
8482 (linux_wait_for_event): Reimplement as wrapper around
8483 linux_wait_for_event_filtered.
8484 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8485 a normal or signal exit is seen, it's the whole process exiting.
8486 (wait_for_sigstop): No longer a for_each_inferior callback.
8487 Rewrite on top of linux_wait_for_event_filtered.
8488 (stop_all_lwps): Call wait_for_sigstop directly.
8489 * server.c (resume, handle_target_event): Handle
8490 TARGET_WAITKIND_NO_RESUMED.
8491
8492 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8493
8494 * win32-low.c (psapi_get_dll_name,
8495 * win32_CreateToolhelp32Snapshot): Delete.
8496 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8497 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8498 Delete.
8499 (handle_load_dll): Add function description.
8500 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8501
8502 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8503
8504 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8505 Add comment.
8506 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8507 base address when calling win32_add_one_solib.
8508 (handle_load_dll): Delete local variable load_addr.
8509 Remove 0x1000 offset applied to DLL base address when calling
8510 win32_add_one_solib.
8511 (handle_unload_dll): Add comment.
8512
8513 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8514
8515 * win32-low.c (win32_add_all_dlls): Renames
8516 win32_ensure_ntdll_loaded. Rewrite function documentation.
8517 Adjust implementation to always load all DLLs.
8518 Add 0x1000 offset to DLL base address when calling
8519 win32_add_one_solib.
8520 (child_initialization_done): New static global.
8521 (do_initial_child_stuff): Set child_initialization_done to
8522 zero during child initialization, and 1 after. Replace call
8523 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8524 Add comment.
8525 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8526 (handle_unload_dll): Add function documentation.
8527 (get_child_debug_event): Ignore load and unload DLL events
8528 during child initialization.
8529
8530 2014-02-20 Doug Evans <dje@google.com>
8531
8532 Remove global all_lwps.
8533 * inferiors.h (ptid_of): Move here from linux-low.h.
8534 (pid_of, lwpid_of): Ditto.
8535 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8536 parameter is a struct thread_info * now.
8537 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8538 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8539 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8540 directly.
8541 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8542 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8543 * linux-arm-low.c (update_registers_callback): Update, "entry"
8544 parameter is a struct thread_info * now.
8545 Fetch lwpid from current_inferior directly.
8546 (arm_insert_point): Pass &all_threads to find_inferior instead of
8547 &all_lwps.
8548 (arm_remove_point): Ditto.
8549 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8550 (arm_prepare_to_resume): Fetch pid from thread.
8551 (arm_read_description): Fetch lwpid from current_inferior directly.
8552 * linux-low.c (all_lwps): Delete.
8553 (delete_lwp): Delete call to remove_inferior.
8554 (handle_extended_wait): Fetch lwpid from thread.
8555 (add_lwp): Don't set lwp->entry.id. Remove call to
8556 add_inferior_to_list.
8557 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8558 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8559 (kill_one_lwp_callback): Ditto.
8560 (linux_kill): Don't dereference NULL pointer.
8561 Fetch ptid,lwpid from thread.
8562 (get_detach_signal): Fetch ptid from thread.
8563 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8564 Simplify call to regcache_invalidate_thread.
8565 (delete_lwp_callback): Update, "entry" parameter is a
8566 struct thread_info * now. Fetch pid from thread.
8567 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8568 (status_pending_p_callback): Update, "entry" parameter is a
8569 struct thread_info * now. Fetch ptid from thread.
8570 (find_lwp_pid): Update, "entry" parameter is a
8571 struct thread_info * now.
8572 (linux_wait_for_lwp): Fetch pid from thread.
8573 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8574 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8575 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8576 (dequeue_one_deferred_signal): Ditto.
8577 (cancel_breakpoint): Fetch ptid from current_inferior.
8578 (linux_wait_for_event): Pass &all_threads to find_inferior,
8579 not &all_lwps. Fetch ptid, lwpid from thread.
8580 (count_events_callback): Update, "entry" parameter is a
8581 struct thread_info * now.
8582 (select_singlestep_lwp_callback): Ditto.
8583 (select_event_lwp_callback): Ditto.
8584 (cancel_breakpoints_callback): Ditto.
8585 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8586 not &all_lwps.
8587 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8588 (unsuspend_one_lwp): Update, "entry" parameter is a
8589 struct thread_info * now.
8590 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8591 not &all_lwps.
8592 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8593 Fetch lwpid from thread, not lwp.
8594 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8595 Pass &all_threads to find_inferior, not &all_lwps.
8596 (send_sigstop): Fetch lwpid from thread, not lwp.
8597 (send_sigstop_callback): Update, "entry" parameter is a
8598 struct thread_info * now.
8599 (suspend_and_send_sigstop_callback): Ditto.
8600 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8601 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8602 struct thread_info * now.
8603 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8604 from thread, lwp.
8605 (lwp_running): Update, "entry" parameter is a
8606 struct thread_info * now.
8607 (stop_all_lwps): Fetch ptid from thread.
8608 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8609 (linux_resume_one_lwp): Fetch lwpid from thread.
8610 (linux_set_resume_request): Update, "entry" parameter is a
8611 struct thread_info * now. Fetch pid, lwpid from thread.
8612 (resume_status_pending_p): Update, "entry" parameter is a
8613 struct thread_info * now.
8614 (need_step_over_p): Ditto. Fetch lwpid from thread.
8615 (start_step_over): Fetch lwpid from thread.
8616 (linux_resume_one_thread): Update, "entry" parameter is a
8617 struct thread_info * now. Fetch lwpid from thread.
8618 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8619 (proceed_one_lwp): Update, "entry" parameter is a
8620 struct thread_info * now. Fetch lwpid from thread.
8621 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8622 struct thread_info * now.
8623 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8624 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8625 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8626 directly.
8627 (regsets_store_inferior_registers): Ditto.
8628 (fetch_register, store_register): Ditto.
8629 (linux_read_memory, linux_write_memory): Ditto.
8630 (linux_request_interrupt): Ditto.
8631 (linux_read_auxv): Ditto.
8632 (linux_xfer_siginfo): Ditto.
8633 (linux_qxfer_spu): Ditto.
8634 (linux_qxfer_libraries_svr4): Ditto.
8635 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8636 moved to inferiors.h.
8637 (get_lwp): Delete.
8638 (get_thread_lwp): Update.
8639 (struct lwp_info): Delete member "entry". Simplify comment for
8640 member "thread".
8641 (all_lwps): Delete.
8642 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8643 current_inferior directly.
8644 (update_watch_registers_callback): Update, "entry" parameter is a
8645 struct thread_info * now. Fetch pid from thread.
8646 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8647 (mips_insert_point): Fetch lwpid from current_inferior.
8648 Pass &all_threads to find_inferior, not &all_lwps.
8649 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8650 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8651 directly.
8652 (mips_stopped_data_address): Ditto.
8653 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8654 directly.
8655 * linux-tile-low.c (tile_arch_setup): Ditto.
8656 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8657 (update_debug_registers_callback): Update, "entry" parameter is a
8658 struct thread_info * now. Fetch pid from thread.
8659 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8660 Pass &all_threads to find_inferior, not &all_lwps.
8661 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8662 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8663 Pass &all_threads to find_inferior, not &all_lwps.
8664 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8665 (i386_dr_low_get_status): Ditto.
8666 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8667 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8668 (x86_linux_read_description): Ditto.
8669 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8670
8671 2014-02-20 Doug Evans <dje@google.com>
8672
8673 * inferiors.c (get_first_inferior): Fix buglet.
8674
8675 2014-02-19 Doug Evans <dje@google.com>
8676
8677 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8678 * inferiors.c (add_thread): Change result type to struct thread_info *.
8679 All callers updated.
8680 (add_lwp): Call add_thread here instead of in callers.
8681 All callers updated.
8682 * linux-low.h (get_lwp_thread): Rewrite.
8683 (struct lwp_info): New member "thread".
8684
8685 2014-02-19 Doug Evans <dje@google.com>
8686
8687 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8688 All callers updated.
8689
8690 2014-02-19 Doug Evans <dje@google.com>
8691
8692 * inferiors.c (add_thread): Fix whitespace.
8693
8694 2014-02-19 Doug Evans <dje@google.com>
8695
8696 * dll.c (clear_dlls): Replace accessing list implemention details
8697 with API function.
8698 * gdbthread.h (get_first_thread): Declare.
8699 * inferiors.c (for_each_inferior_with_data): New function.
8700 (get_first_thread): New function.
8701 (find_thread_ptid): Simplify.
8702 (get_first_inferior): New function.
8703 (clear_list): Delete.
8704 (one_inferior_p): New function.
8705 (clear_inferior_list): New function.
8706 (clear_inferiors): Update.
8707 * inferiors.h (for_each_inferior_with_data): Declare.
8708 (clear_inferior_list): Declare.
8709 (one_inferior_p): Declare.
8710 (get_first_inferior): Declare.
8711 * linux-low.c (linux_wait_for_event): Replace accessing list
8712 implemention details with API function.
8713 * server.c (target_running): Ditto.
8714 (accumulate_file_name_length): New function.
8715 (emit_dll_description): New function.
8716 (handle_qxfer_libraries): Replace accessing list implemention
8717 details with API function.
8718 (handle_qxfer_threads_worker): New function.
8719 (handle_qxfer_threads_proper): Replace accessing list implemention
8720 details with API function.
8721 (handle_query): Ditto.
8722 (visit_actioned_threads_callback_ftype): New typedef.
8723 (visit_actioned_threads_data): New struct.
8724 (visit_actioned_threads): Rewrite to be find_inferior callback.
8725 (resume): Call find_inferior.
8726 (handle_status): Replace accessing list implemention
8727 details with API function.
8728 (process_serial_event): Replace accessing list implemention details
8729 with API function.
8730 * target.c (set_desired_inferior): Replace accessing list implemention
8731 details with API function.
8732 * tracepoint.c (same_process_p): New function.
8733 (gdb_agent_about_to_close): Replace accessing list implemention
8734 details with API function.
8735 * win32-low.c (child_delete_thread): Replace accessing list
8736 implemention details with API function.
8737 (match_dll_by_basename): New function.
8738 (dll_is_loaded_by_basename): New function.
8739 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8740 details call to dll_is_loaded_by_basename.
8741
8742 2014-02-19 Doug Evans <dje@google.com>
8743
8744 * dll.h (struct dll_info): Add comment.
8745 * gdbthread.h (struct thread_info): Add comment.
8746 (current_ptid): Simplify.
8747 * inferiors.c (add_process): Update.
8748 (remove_process): Update.
8749 * inferiors.h (struct process_info): Rename member "head" to "entry".
8750 * linux-low.c (delete_lwp): Update.
8751 (add_lwp): Update.
8752 (last_thread_of_process_p): Update.
8753 (kill_one_lwp_callback, linux_kill): Update.
8754 (status_pending_p_callback): Update.
8755 (wait_for_sigstop): Update. Simplify read of ptid.
8756 (start_step_over): Update.
8757 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8758 (get_lwp_thread): Update.
8759 (struct lwp_info): Rename member "head" to "entry".
8760 * regcache.h (inferior_list_entry): Delete.
8761 * server.c (kill_inferior_callback): Update.
8762 (detach_or_kill_inferior_callback): Update.
8763 (print_started_pid): Update.
8764 (print_attached_pid): Update.
8765 (process_serial_event): Simplify read of ptid.
8766 * thread-db.c (thread_db_create_event): Update.
8767 (thread_db_get_tls_address): Update.
8768 * win32-low.c (current_inferior_ptid): Simplify.
8769
8770 2014-02-19 Tom Tromey <tromey@redhat.com>
8771
8772 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8773 argument.
8774 (target_supports_btrace): Update.
8775
8776 2014-02-14 Yao Qi <yao@codesourcery.com>
8777
8778 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8779 (rsp-low-ipa.o): New target.
8780
8781 2014-02-12 Tom Tromey <tromey@redhat.com>
8782
8783 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8784 convert_ascii_to_int.
8785 * regcache.c (registers_to_string): Likewise.
8786 * remote-utils.c (decode_M_packet): Likewise.
8787 * server.c (process_serial_event): Likewise.
8788
8789 2014-02-12 Tom Tromey <tromey@redhat.com>
8790
8791 * server.c (handle_query, handle_v_run): Use hex2bin, not
8792 unhexify.
8793 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8794
8795 2014-02-12 Tom Tromey <tromey@redhat.com>
8796
8797 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8798 convert_int_to_ascii.
8799 * regcache.c (registers_to_string, collect_register_as_string):
8800 Likewise.
8801 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8802 Likewise.
8803 * server.c (process_serial_event): Likewise.
8804 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8805 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8806
8807 2014-02-12 Tom Tromey <tromey@redhat.com>
8808
8809 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8810 bin2hex, not hexify.
8811 * tracepoint.c (cmd_qtstatus): Likewise.
8812
8813 2014-02-12 Tom Tromey <tromey@redhat.com>
8814
8815 * remote-utils.c (monitor_output): Pass explicit length to
8816 hexify.
8817
8818 2014-02-12 Tom Tromey <tromey@redhat.com>
8819
8820 * tracepoint.c: Include rsp-low.h.
8821 * server.c: Include rsp-low.h.
8822 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8823 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8824 declare.
8825 * remote-utils.c: Include rsp-low.h.
8826 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8827 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8828 (convert_int_to_ascii, convert_ascii_to_int): Move to
8829 common/rsp-low.c.
8830 * regcache.c: Include rsp-low.h.
8831 * ax.c: Include rsp-low.h.
8832 * Makefile.in (SFILES): Add common/rsp-low.c.
8833 (OBS): Add rsp-low.o.
8834 (rsp-low.o): New target.
8835
8836 2014-02-12 Tom Tromey <tromey@redhat.com>
8837
8838 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8839 Include print-utils.h.
8840 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8841 (plongest, thirty_two, phex_nz): Remove.
8842 * Makefile.in (SFILES): Add common/print-utils.c.
8843 (OBS): Add print-utils.o.
8844 (print-utils-ipa.o): New target.
8845 (print-utils.o): New target.
8846 (IPA_OBJS): Add print-utils-ipa.o.
8847
8848 2014-02-06 Tom Tromey <tromey@redhat.com>
8849
8850 * Makefile.in (SFILES): Fix indentation.
8851
8852 2014-02-05 Doug Evans <dje@google.com>
8853
8854 * linux-low.c (linux_wait_for_event): Improve comment.
8855 (linux_wait_1): Keep current_inferior in sync with event_child.
8856
8857 2014-01-22 Doug Evans <dje@google.com>
8858
8859 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8860
8861 2014-01-22 Doug Evans <dje@google.com>
8862
8863 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8864 * configure: Regenerate.
8865 * config.in: Regenerate.
8866 * Makefile.in (SFILES): Add debug.c.
8867 (OBS): Add debug.o.
8868 * debug.c: New file.
8869 * debug.h: New file.
8870 * linux-aarch64-low.c (*): Update all debugging printfs to use
8871 debug_printf instead of fprintf.
8872 * linux-arm-low.c (*): Ditto.
8873 * linux-cris-low.c (*): Ditto.
8874 * linux-crisv32-low.c (*): Ditto.
8875 * linux-m32r-low.c (*): Ditto.
8876 * linux-sparc-low.c (*): Ditto.
8877 * linux-x86.c (*): Ditto.
8878 * linux-low.c (*): Ditto.
8879 (linux_wait_1): Add calls to debug_enter, debug_exit.
8880 (linux_wait): Remove redundant debugging printf.
8881 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8882 (linux_resume, unstop_all_lwps): Ditto.
8883 * mem-break.c (*): Update all debugging printfs to use
8884 debug_printf instead of fprintf.
8885 * remote-utils.c (*): Ditto.
8886 * thread-db.c (*): Ditto.
8887 * server.c #include <ctype.h>, "gdb_vecs.h".
8888 (debug_threads): Moved to debug.c.
8889 (*): Update all debugging printfs to use debug_printf instead of
8890 fprintf.
8891 (start_inferior): Replace call to fflush with call to debug_flush.
8892 (monitor_show_help): Mention set debug-format.
8893 (parse_debug_format_options): New function.
8894 (handle_monitor_command): Handle "monitor set debug-format".
8895 (gdbserver_usage): Mention --debug-format.
8896 (main): Parse --debug-format.
8897 * server.h (debug_threads): Declaration moved to debug.h.
8898 #include "debug.h".
8899 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8900 trace_debug_1 that uses debug_printf.
8901 (tracepoint_look_up_symbols): Update all debugging printfs to use
8902 debug_printf instead of fprintf.
8903
8904 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8905
8906 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8907 sys/ptrace.h.
8908
8909 2014-01-17 Pedro Alves <palves@redhat.com>
8910
8911 PR build/16445
8912 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8913 defined after including gdb_proc_service.h.
8914
8915 2014-01-16 Doug Evans <dje@google.com>
8916
8917 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8918 (match_dll): Use it.
8919
8920 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8921
8922 * target.h (target_ops) <read_btrace>: Change parameters and
8923 return type to allow error reporting.
8924 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8925 trace reading errors on.
8926 * linux-low.c (linux_low_read_btrace): Pass trace reading
8927 errors on.
8928 (linux_low_disable_btrace): New.
8929
8930 2014-01-15 Doug Evans <dje@google.com>
8931
8932 * inferiors.c (thread_id_to_gdb_id): Delete.
8933 * inferiors.h (thread_id_to_gdb_id): Delete.
8934
8935 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8936
8937 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8938 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8939 versions.
8940
8941 2014-01-08 Pedro Alves <palves@redhat.com>
8942
8943 * server.c (handle_status): Don't discard previous queued stop
8944 replies or thread's pending status here.
8945 (main) <disconnection>: Do it here instead.
8946
8947 2014-01-08 Pedro Alves <palves@redhat.com>
8948
8949 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8950 * server.c (visit_actioned_threads, handle_pending_status): New
8951 function.
8952 (handle_v_cont): Factor out parts to ...
8953 (resume): ... this new function. If in all-stop, and a thread
8954 being resumed has a pending status, report it without actually
8955 resuming.
8956 (myresume): Adjust to use the new 'resume' function.
8957 (clear_pending_status_callback, set_pending_status_callback)
8958 (find_status_pending_thread_callback): New functions.
8959 (handle_status): Handle the case of multiple threads having
8960 interesting statuses to report. Report threads' real last signal
8961 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8962 with an interesting thread to report the status for, instead of
8963 always reporting the status of the first thread.
8964
8965 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8966
8967 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8968 * gdbreplay.c (gdbreplay_version): Likewise.
8969
8970 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8971
8972 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8973 iov.iov_len with the real length in use.
8974
8975 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8976
8977 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8978 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8979 for all targets that use win32-low.c.
8980 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8981 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8982
8983 2013-12-13 Pedro Alves <palves@redhat.com>
8984
8985 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8986 if equal to TARGET_WAITKIND_LOADED.
8987 * win32-low.c (cached_status): New static global.
8988 (win32_wait): Add declaration.
8989 (do_initial_child_stuff): Flush all initial pending debug events
8990 up to the initial breakpoint.
8991 (win32_wait): If CACHED_STATUS was set, return that instead
8992 of doing a real wait. Remove the code resuming the execution
8993 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8994 during the initial phase. Also remove the code changing
8995 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8996 TARGET_WAITKIND_STOPPED.
8997
8998 2013-12-11 Yao Qi <yao@codesourcery.com>
8999
9000 * notif.c (handle_notif_ack): Return 0 if no notification
9001 matches.
9002
9003 2013-11-20 Doug Evans <dje@google.com>
9004
9005 * linux-low.c (linux_set_resume_request): Fix comment.
9006
9007 2013-11-20 Doug Evans <dje@google.com>
9008
9009 * linux-low.c (resume_status_pending_p): Tweak comment.
9010
9011 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9012
9013 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9014 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9015 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9016 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9017 (srv_amd64_regobj): Add amd64-mpx.o.
9018 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9019 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9020 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9021 * i387-fp.c (num_pl_bnd_register) Added constant.
9022 (num_pl_bnd_cfg_registers) Added constant.
9023 (struct i387_xsave) Added reserved area and MPX fields.
9024 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9025 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9026 function.
9027 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9028 (init_registers_amd64_mpx_linux): Declare new function.
9029 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9030 (x86_64_regmap): Add MPX registers.
9031 (x86_linux_read_description): Add MPX case.
9032 (initialize_low_arch): Initialize MPX targets.
9033
9034 2013-11-18 Tom Tromey <tromey@redhat.com>
9035
9036 * configure: Rebuild.
9037 * configure.ac: Don't check for stdlib.h.
9038 * gdbreplay.c: Unconditionally include stdlib.h.
9039
9040 2013-11-18 Tom Tromey <tromey@redhat.com>
9041
9042 * config.in: Rebuild.
9043 * configure: Rebuild.
9044 * configure.ac: Don't use AC_HEADER_DIRENT.
9045
9046 2013-11-18 Tom Tromey <tromey@redhat.com>
9047
9048 * server.h: Don't check HAVE_STRING_H.
9049 * gdbreplay.c: Don't check HAVE_STRING_H.
9050 * configure: Rebuild.
9051
9052 2013-11-18 Tom Tromey <tromey@redhat.com>
9053
9054 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9055 LIBGNU.
9056
9057 2013-11-08 Tom Tromey <tromey@redhat.com>
9058
9059 * configure, config.in: Rebuild.
9060 * configure.ac: Remove unused configury.
9061
9062 2013-11-08 Tom Tromey <tromey@redhat.com>
9063
9064 * acinclude.m4: Include common.m4, codeset.m4.
9065 * configure, config.in: Rebuild.
9066 * configure.ac: Use GDB_AC_COMMON.
9067
9068 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9069
9070 * linux-s390-low.c (HWCAP_S390_TE): New define.
9071 (s390_arch_setup): Consider the TE field in the HWCAP for
9072 determining 'have_regset_tdb'.
9073
9074 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9075
9076 PR gdb/16014
9077 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9078 call to sizeof.
9079
9080 2013-10-02 Pedro Alves <palves@redhat.com>
9081
9082 * server.c (process_serial_event): Don't output "GDBserver
9083 exiting" if GDB is connected through stdio.
9084 * target.c (mywait): Likewise, be silent if GDB is connected
9085 through stdio.
9086
9087 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9088
9089 * lynx-low.c (lynx_add_threads_after_attach): New function.
9090 (lynx_attach): Remove call to add_thread. Add call to
9091 lynx_add_threads_after_attach instead.
9092
9093 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9094
9095 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9096 * config.in, configure: Regenerated.
9097
9098 2013-09-18 Yao Qi <yao@codesourcery.com>
9099
9100 PR server/15959
9101 * server.c (start_inferior): Clear 'resume_info'.
9102
9103 2013-09-16 Jiong Wang <jiwang@tilera.com>
9104
9105 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9106 for each register.
9107
9108 2013-09-16 Jiong Wang <jiwang@tilera.com>
9109
9110 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9111 linux-tile-low.o to srv_tgtobj.
9112
9113 2013-09-16 Will Newton <will.newton@linaro.org>
9114
9115 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9116 out regs.
9117
9118 2013-09-06 Pedro Alves <palves@redhat.com>
9119
9120 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9121 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9122 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9123 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9124 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9125 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9126
9127 2013-09-06 Pedro Alves <palves@redhat.com>
9128
9129 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9130 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9131
9132 2013-09-06 Pedro Alves <palves@redhat.com>
9133
9134 * linux-amd64-ipa.c: Include tracepoint.h.
9135 * linux-i386-ipa.c: Include tracepoint.h.
9136
9137 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9138
9139 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9140 (ps_get_thread_area): New function.
9141
9142 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9143
9144 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9145 (initialize_low_arch): Call init_registers_crisv32 rather than
9146 init_register_crisv32.
9147
9148 2013-09-05 Pedro Alves <palves@redhat.com>
9149
9150 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9151 to ...
9152 * hostio.h: ... this new file.
9153 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9154 win32-low.c: Include hostio.h.
9155
9156 2013-09-05 Pedro Alves <palves@redhat.com>
9157
9158 * server.h (gdb_client_data, handler_func, callback_handler_func)
9159 (delete_file_handler, add_file_handler, append_callback_event)
9160 (delete_callback_event, start_event_loop, initialize_event_loop):
9161 Move to event-loop.h and include it.
9162 * event-loop.h: New file.
9163
9164 2013-09-05 Pedro Alves <palves@redhat.com>
9165
9166 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9167 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9168 (loaded_dll, unloaded_dll): Move to ...
9169 * dll.h: ... this new file.
9170 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9171
9172 2013-09-05 Pedro Alves <palves@redhat.com>
9173
9174 * server.h (current_process, get_thread_process, all_processes)
9175 (add_inferior_to_list, for_each_inferior, current_inferior)
9176 (remove_inferior, add_process, remove_process, find_process_pid)
9177 (have_started_inferiors_p, have_attached_inferiors_p)
9178 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9179 (clear_inferiors, find_inferior, find_inferior_id)
9180 (inferior_target_data, set_inferior_target_data)
9181 (inferior_regcache_data, set_inferior_regcache_data): Move to
9182 inferiors.h, and include it.
9183 * inferiors.h: New file.
9184
9185 2013-09-05 Pedro Alves <palves@redhat.com>
9186
9187 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9188 Move ...
9189 * ax.h: ... here.
9190
9191 2013-09-05 Pedro Alves <palves@redhat.com>
9192
9193 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9194 tracepoint.h.
9195 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9196 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9197 (handle_tracepoint_general_set, handle_tracepoint_query)
9198 (tracepoint_finished_step, tracepoint_was_hit)
9199 (release_while_stepping_state_list, current_traceframe)
9200 (in_readonly_region, traceframe_read_mem)
9201 (fetch_traceframe_registers, traceframe_read_sdata)
9202 (traceframe_read_info, struct fast_tpoint_collect_status)
9203 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9204 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9205 (supply_fast_tracepoint_registers)
9206 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9207 (ipa_tdesc, claim_trampoline_space)
9208 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9209 (agent_mem_read, agent_get_trace_state_variable_value)
9210 (agent_set_trace_state_variable_value, agent_tsv_read)
9211 (agent_mem_read_string, get_raw_reg_func_addr)
9212 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9213 * tracepoint.h: ... this new file.
9214
9215 2013-09-05 Pedro Alves <palves@redhat.com>
9216
9217 * server.h (perror_with_name, error, fatal, warning, paddress)
9218 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9219 include it.
9220 * utils.h: New file.
9221
9222 2013-09-05 Pedro Alves <palves@redhat.com>
9223
9224 * server.h (remote_debug, noack_mode, transport_is_reliable)
9225 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9226 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9227 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9228 (write_enn, initialize_async_io, enable_async_io)
9229 (disable_async_io, check_remote_input_interrupt_request)
9230 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9231 (dead_thread_notify, prepare_resume_reply)
9232 (decode_address_to_semicolon, decode_address, decode_m_packet)
9233 (decode_M_packet, decode_X_packet, decode_xfer_write)
9234 (decode_search_memory_packet, unhexify, hexify)
9235 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9236 (look_up_one_symbol, relocate_instruction)
9237 (monitor_output): Move to remote-utils.h, and include it.
9238 * remote-utils.h: New file.
9239
9240 2013-09-05 Pedro Alves <palves@redhat.com>
9241
9242 * server.h (_): Delete.
9243
9244 2013-09-02 Pedro Alves <palves@redhat.com>
9245
9246 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9247 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9248 allocated.
9249 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9250
9251 2013-09-02 Pierre Muller <muller@sourceware.org>
9252
9253 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9254 or WriteProcessMemory complete successfully and handle
9255 ERROR_PARTIAL_COPY error.
9256
9257 2013-09-02 Pedro Alves <palves@redhat.com>
9258
9259 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9260 error instead of EIO.
9261
9262 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9263
9264 PR server/15604
9265 * linux-low.c: Include filestuff.h.
9266 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9267 * lynx-low.c: Include filestuff.h.
9268 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9269 * server.c: Include filestuff.h.
9270 (main): Call notice_open_fds.
9271 * spu-low.c: Include filestuff.h.
9272 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9273
9274 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9275
9276 * Makefile.in: Explain why ../target and ../nat are not
9277 listed as include file search paths.
9278 (linux-waitpid.o): New object file rule.
9279 * configure.srv (srv_native_linux_obj): New variable.
9280 Replace all occurrences of linux native object files with
9281 $srv_native_linux_obj.
9282 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9283 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9284 (linux_enable_event_reporting): Remove declaration.
9285 (my_waitpid): Moved to common/linux-waitpid.c.
9286 (linux_wait_for_event): Pass ptid when calling
9287 linux_enable_event_reporting.
9288 (linux_supports_tracefork_flag): Remove.
9289 (linux_enable_event_reporting): Likewise.
9290 (linux_tracefork_grandchild): Remove.
9291 (STACK_SIZE): Moved to common/linux-ptrace.c.
9292 (linux_tracefork_child): Remove.
9293 (linux_test_for_tracefork): Remove.
9294 (linux_look_up_symbols): Call linux_supports_traceclone.
9295 (initialize_low): Remove call to linux_test_for_tracefork.
9296 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9297 common/linux-ptrace.h.
9298 (PTRACE_TYPE_ARG4): Likewise.
9299 Include linux-ptrace.h.
9300
9301 2013-08-21 Pedro Alves <palves@redhat.com>
9302
9303 * config.in: Renegerate.
9304
9305 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9306
9307 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9308 (SFILES): Remove $(srcdir)/common/target-common.c and
9309 add $(srcdir)/target/waitstatus.c.
9310 (OBS): Remove target-common.o and add waitstatus.o.
9311 (server_h): Remove $(srcdir)/../common/target-common.h and
9312 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9313 and $(srcdir)/../target/waitstatus.h.
9314 (target-common.o): Remove.
9315 (waitstatus.o): New target object file.
9316 * target.h: Do not include target-common.h and
9317 include target/resume.h, target/wait.h and
9318 target/waitstatus.h.
9319
9320 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9321
9322 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9323 to PTRACE_TYPE_ARG3.
9324 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9325 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9326 PTRACE_TYPE_ARG4.
9327 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9328 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9329
9330 2013-07-27 Jie Zhang <jie@codesourcery.com>
9331 Daniel Jacobowitz <dan@codesourcery.com>
9332 Yao Qi <yao@codesourcery.com>
9333
9334 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9335 (mips-linux-watch.o): New rule.
9336 (mips_linux_watch_h): New variable.
9337 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9338 srv_tgtobj.
9339 * linux-mips-low.c: Include mips-linux-watch.h.
9340 (struct arch_process_info, struct arch_lwp_info): New.
9341 (update_watch_registers_callback): New function.
9342 (mips_linux_new_process, mips_linux_new_thread) New functions.
9343 (mips_linux_prepare_to_resume, mips_insert_point): New
9344 functions.
9345 (mips_remove_point, mips_stopped_by_watchpoint): New
9346 functions.
9347 (rsp_bp_type_to_target_hw_bp_type): New function.
9348 (mips_stopped_data_address): New function.
9349 (the_low_target): Add watchpoint support functions.
9350
9351 2013-07-27 Yao Qi <yao@codesourcery.com>
9352
9353 * i386-low.c: Include break-common.h.
9354 (enum target_hw_bp_type): Remove.
9355
9356 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9357
9358 * Makefile.in (SFILES): /common/target-common.c.
9359 (OBS): Add target-common.o.
9360 (server_h): Add $(srcdir)/../common/target-common.h.
9361 (target-common.o): New target.
9362 * server.c (queue_stop_reply_callback): Free
9363 status string after use.
9364 * target.c (target_waitstatus_to_string): Remove.
9365 * target.h: Include target-common.h.
9366 (resume_kind): Likewise.
9367 (target_waitkind): Likewise.
9368 (target_waitstatus): Likewise.
9369 (TARGET_WNOHANG): Likewise.
9370
9371 2013-07-04 Yao Qi <yao@codesourcery.com>
9372
9373 * Makefile.in (host_alias): Use @host_noncanonical@.
9374 (target_alias): Use @target_noncanonical@.
9375 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9376 ACX_NONCANONICAL_HOST.
9377 * configure: Regenerated.
9378
9379 Revert:
9380 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9381
9382 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9383 * configure: Rebuild.
9384 * Makefile.in (version_host, version_target): Get from configure.
9385 (version.c): Use $(version_host) and $(version_target).
9386
9387 2013-07-03 Pedro Alves <palves@redhat.com>
9388
9389 * Makefile.in (config.status): Depend on development.sh.
9390 * acinclude.m4: Include libmcheck.m4.
9391 * configure: Regenerate.
9392
9393 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9394
9395 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9396 attribute inside the parentheses.
9397 (winapi_DebugSetProcessKillOnExit): Ditto.
9398 (winapi_DebugBreakProcess): Ditto.
9399 (winapi_GenerateConsoleCtrlEvent): Ditto.
9400
9401 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9402
9403 * notif.h (notif_event): Add a dummy member to avoid compiler
9404 errors.
9405
9406 2013-07-01 Pedro Alves <palves@redhat.com>
9407
9408 * hostio.c (HOSTIO_PATH_MAX): Define.
9409 (require_filename, handle_open, handle_unlink, handle_readlink):
9410 Use it.
9411
9412 2013-07-01 Pedro Alves <palves@redhat.com>
9413
9414 * server.h: Include "pathmax.h".
9415 * linux-low.c: Don't include sys/param.h.
9416 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9417 MAXPATHLEN.
9418 * win32-low.c: Don't include sys/param.h.
9419 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9420
9421 2013-07-01 Pedro Alves <palves@redhat.com>
9422
9423 * event-loop.c: Don't check HAVE_UNISTD_H before including
9424 <unistd.h>.
9425 * gdbreplay.c: Likewise.
9426 * remote-utils.c: Likewise.
9427 * server.c: Likewise.
9428 * configure.ac: Don't check for unistd.h.
9429 * configure: Regenerate.
9430
9431 2013-06-28 Tom Tromey <tromey@redhat.com>
9432
9433 * Makefile.in (version.c): Use version.in, not
9434 common/version.in.
9435
9436 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9437
9438 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9439 * configure: Rebuild.
9440 * Makefile.in (version_host, version_target): Get from configure.
9441 (version.c): Use $(version_host) and $(version_target).
9442
9443 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9444
9445 Fix trace-status to output user name without trailing colon.
9446 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9447
9448 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9449
9450 Fix trace-status to output proper start-time and stop-time.
9451 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9452 output start time and stop time in hex as gdb expects.
9453
9454 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9455
9456 * tracepoint.c (build_traceframe_info_xml): Output trace state
9457 variables present in the trace buffer.
9458
9459 2013-06-24 Tom Tromey <tromey@redhat.com>
9460
9461 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9462 create-version.sh.
9463 (version.o): Remove.
9464 * gdbreplay.c: Include version.h.
9465 (version, host_name): Don't declare.
9466 * server.h: Include version.h.
9467 (version, host_name): Don't declare.
9468
9469 2013-06-12 Pedro Alves <palves@redhat.com>
9470
9471 * linux-x86-low.c (linux_is_elf64): Delete global.
9472 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9473 with local linux_pid_exe_is_elf_64_file use.
9474
9475 2013-06-11 Pedro Alves <palves@redhat.com>
9476
9477 * linux-low.c (regset_disabled, disable_regset): New functions.
9478 (regsets_fetch_inferior_registers)
9479 (regsets_store_inferior_registers): Use them.
9480 (initialize_regsets_info); Don't allocate the disabled_regsets
9481 array here.
9482 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9483 comment.
9484
9485 2013-06-11 Pedro Alves <palves@redhat.com>
9486
9487 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9488 xmalloc.
9489
9490 2013-06-11 Pedro Alves <palves@redhat.com>
9491
9492 * linux-x86-low.c (initialize_low_arch): Call
9493 init_registers_x32_avx_linux.
9494
9495 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9496
9497 Fix compatibility with Android Bionic.
9498 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9499 it is not empty.
9500
9501 2013-06-07 Pedro Alves <palves@redhat.com>
9502
9503 PR server/14823
9504 * Makefile.in (OBS): Add tdesc.o.
9505 (IPA_OBJS): Add tdesc-ipa.o.
9506 (tdesc-ipa.o): New rule.
9507 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9508 interface.
9509 * linux-low.c (new_inferior): Delete.
9510 (disabled_regsets, num_regsets): Delete.
9511 (linux_add_process): Adjust to set the new per-process
9512 new_inferior flag.
9513 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9514 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9515 was a stop. When calling arch_setup, switch the current inferior
9516 to the thread that got an event.
9517 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9518 (regsets_fetch_inferior_registers)
9519 (regsets_store_inferior_registers): New regsets_info parameter.
9520 Adjust to use it.
9521 (linux_register_in_regsets): New regs_info parameter. Adjust to
9522 use it.
9523 (register_addr, fetch_register, store_register): New usrregs_info
9524 parameter. Adjust to use it.
9525 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9526 parameter regs_info. Adjust to use it.
9527 (linux_fetch_registers): Get the current inferior's regs_info, and
9528 adjust to use it.
9529 (linux_store_registers): Ditto.
9530 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9531 (initialize_low): Don't initialize the target_regsets here. Call
9532 initialize_low_arch.
9533 * linux-low.h (target_regsets): Delete declaration.
9534 (struct regsets_info): New.
9535 (struct usrregs_info): New.
9536 (struct regs_info): New.
9537 (struct process_info_private) <new_inferior>: New field.
9538 (struct linux_target_ops): Delete the num_regs, regmap, and
9539 regset_bitmap fields. New field regs_info.
9540 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9541 * i387-fp.c (num_xmm_registers): Delete.
9542 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9543 calls to new interface.
9544 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9545 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9546 Infer the number of xmm registers from the regcache's target
9547 description.
9548 * i387-fp.h (num_xmm_registers): Delete.
9549 * inferiors.c (add_thread): Don't install the thread's regcache
9550 here.
9551 * proc-service.c (gregset_info): Fetch the current inferior's
9552 regs_info. Adjust to use it.
9553 * regcache.c: Include tdesc.h.
9554 (register_bytes, reg_defs, num_registers)
9555 (gdbserver_expedite_regs): Delete.
9556 (get_thread_regcache): If the thread doesn't have a regcache yet,
9557 create one, instead of aborting gdbserver.
9558 (regcache_invalidate_one): Rename to ...
9559 (regcache_invalidate_thread): ... this.
9560 (regcache_invalidate_one): New.
9561 (regcache_invalidate): Only invalidate registers of the current
9562 process.
9563 (init_register_cache): Add target_desc parameter, and use it.
9564 (new_register_cache): Ditto. Assert the target description has a
9565 non zero registers_size.
9566 (regcache_cpy): Add assertions. Adjust.
9567 (realloc_register_cache, set_register_cache): Delete.
9568 (registers_to_string, registers_from_string): Adjust.
9569 (find_register_by_name, find_regno, find_register_by_number)
9570 (register_cache_size): Add target_desc parameter, and use it.
9571 (free_register_cache_thread, free_register_cache_thread_one)
9572 (regcache_release, register_cache_size): New.
9573 (register_size): Add target_desc parameter, and use it.
9574 (register_data, supply_register, supply_register_zeroed)
9575 (supply_regblock, supply_register_by_name, collect_register)
9576 (collect_register_as_string, collect_register_by_name): Adjust.
9577 * regcache.h (struct target_desc): Forward declare.
9578 (struct regcache) <tdesc>: New field.
9579 (init_register_cache, new_register_cache): Add target_desc
9580 parameter.
9581 (regcache_invalidate_thread): Declare.
9582 (regcache_invalidate_one): Delete declaration.
9583 (regcache_release): Declare.
9584 (find_register_by_number, register_cache_size, register_size)
9585 (find_regno): Add target_desc parameter.
9586 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9587 declarations.
9588 * remote-utils.c: Include tdesc.h.
9589 (outreg, prepare_resume_reply): Adjust.
9590 * server.c: Include tdesc.h.
9591 (gdbserver_xmltarget): Delete declaration.
9592 (get_features_xml, process_serial_event): Adjust.
9593 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9594 declare.
9595 (struct process_info) <tdesc>: New field.
9596 (ipa_tdesc): Declare.
9597 * tdesc.c: New file.
9598 * tdesc.h: New file.
9599 * tracepoint.c: Include tdesc.h.
9600 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9601 (get_context_regcache): Adjust to pass ipa_tdesc down.
9602 (do_action_at_tracepoint): Adjust to get the register cache size
9603 from the context regcache's description.
9604 (traceframe_walk_blocks): Adjust to get the register cache size
9605 from the current trace frame's description.
9606 (traceframe_get_pc): Adjust to get current trace frame's
9607 description and pass it down.
9608 (gdb_collect): Adjust to get the register cache size from the
9609 IPA's description.
9610 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9611 (gdbserver_xmltarget): Delete.
9612 (initialize_low_tracepoint): Set the ipa's target description.
9613 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9614 (initialize_low_tracepoint): Set the ipa's target description.
9615 * linux-x86-low.c: Include tdesc.h.
9616 [__x86_64__] (is_64bit_tdesc): New.
9617 (ps_get_thread_area, x86_get_thread_area): Use it.
9618 (i386_cannot_store_register): Rename to ...
9619 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9620 (i386_cannot_fetch_register): Rename to ...
9621 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9622 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9623 to new interface.
9624 (target_regsets): Rename to ...
9625 (x86_regsets): ... this.
9626 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9627 interface.
9628 (x86_siginfo_fixup): Use is_64bit_tdesc.
9629 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9630 (tdesc_x32_avx_linux, tdesc_x32_linux)
9631 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9632 Declare.
9633 (x86_linux_update_xmltarget): Delete.
9634 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9635 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9636 (AMD64_LINUX_USER64_CS): New.
9637 (x86_linux_read_description): New, based on
9638 x86_linux_update_xmltarget.
9639 (same_process_callback): New.
9640 (x86_arch_setup_process_callback): New.
9641 (x86_linux_update_xmltarget): New.
9642 (x86_regsets_info): New.
9643 (amd64_linux_regs_info): New.
9644 (i386_linux_usrregs_info): New.
9645 (i386_linux_regs_info): New.
9646 (x86_linux_regs_info): New.
9647 (x86_arch_setup): Reimplement.
9648 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9649 (x86_emit_ops): Ditto.
9650 (the_low_target): Adjust. Install x86_linux_regs_info,
9651 x86_cannot_fetch_register, and x86_cannot_store_register.
9652 (initialize_low_arch): New.
9653 * linux-ia64-low.c (tdesc_ia64): Declare.
9654 (ia64_fetch_register): Adjust.
9655 (ia64_usrregs_info, regs_info): New globals.
9656 (ia64_regs_info): New function.
9657 (the_low_target): Adjust.
9658 (initialize_low_arch): New function.
9659 * linux-sparc-low.c (tdesc_sparc64): Declare.
9660 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9661 Adjust.
9662 (sparc_arch_setup): New function.
9663 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9664 (the_low_target): Adjust.
9665 (initialize_low_arch): New function.
9666 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9667 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9668 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9669 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9670 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9671 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9672 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9673 (tdesc_powerpc_isa205_vsx64l): Declare.
9674 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9675 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9676 (ppc_set_pc, ppc_get_hwcap): Adjust.
9677 (ppc_usrregs_info): Forward declare.
9678 (!__powerpc64__) ppc_regmap_adjusted: New global.
9679 (ppc_arch_setup): Adjust to the current process'es target
9680 description.
9681 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9682 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9683 (ppc_store_evrregset): Adjust.
9684 (target_regsets): Rename to ...
9685 (ppc_regsets): ... this, and make static.
9686 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9687 (ppc_regs_info): New function.
9688 (the_low_target): Adjust.
9689 (initialize_low_arch): New function.
9690 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9691 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9692 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9693 (tdesc_s390x_linux64v2): Declare.
9694 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9695 (s390_fill_gregset, s390_store_last_break): Adjust.
9696 (target_regsets): Rename to ...
9697 (s390_regsets): ... this, and make static.
9698 (s390_get_pc, s390_set_pc): Adjust.
9699 (s390_get_hwcap): New target_desc parameter, and use it.
9700 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9701 (s390_arch_setup): Adjust to set the current process'es target
9702 description. Don't adjust the regmap.
9703 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9704 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9705 (regs_info_3264): New globals.
9706 (s390_regs_info): New function.
9707 (the_low_target): Adjust.
9708 (initialize_low_arch): New function.
9709 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9710 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9711 [__mips64] (init_registers_mips_linux)
9712 (init_registers_mips_dsp_linux): Delete defines.
9713 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9714 (have_dsp): New global.
9715 (mips_read_description): New, based on mips_arch_setup.
9716 (mips_arch_setup): Reimplement.
9717 (get_usrregs_info): New function.
9718 (mips_cannot_fetch_register, mips_cannot_store_register)
9719 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9720 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9721 (target_regsets): Rename to ...
9722 (mips_regsets): ... this, and make static.
9723 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9724 (dsp_regs_info, regs_info): New globals.
9725 (mips_regs_info): New function.
9726 (the_low_target): Adjust.
9727 (initialize_low_arch): New function.
9728 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9729 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9730 Declare.
9731 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9732 (arm_read_description): New, with bits factored from
9733 arm_arch_setup.
9734 (arm_arch_setup): Reimplement.
9735 (target_regsets): Rename to ...
9736 (arm_regsets): ... this, and make static.
9737 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9738 (arm_regs_info): New function.
9739 (the_low_target): Adjust.
9740 (initialize_low_arch): New function.
9741 * linux-m68k-low.c (tdesc_m68k): Declare.
9742 (target_regsets): Rename to ...
9743 (m68k_regsets): ... this, and make static.
9744 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9745 (m68k_regs_info): New function.
9746 (m68k_arch_setup): New function.
9747 (the_low_target): Adjust.
9748 (initialize_low_arch): New function.
9749 * linux-sh-low.c (tdesc_sharch): Declare.
9750 (target_regsets): Rename to ...
9751 (sh_regsets): ... this, and make static.
9752 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9753 (sh_regs_info, sh_arch_setup): New functions.
9754 (the_low_target): Adjust.
9755 (initialize_low_arch): New function.
9756 * linux-bfin-low.c (tdesc_bfin): Declare.
9757 (bfin_arch_setup): New function.
9758 (bfin_usrregs_info, regs_info): New globals.
9759 (bfin_regs_info): New function.
9760 (the_low_target): Adjust.
9761 (initialize_low_arch): New function.
9762 * linux-cris-low.c (tdesc_cris): Declare.
9763 (cris_arch_setup): New function.
9764 (cris_usrregs_info, regs_info): New globals.
9765 (cris_regs_info): New function.
9766 (the_low_target): Adjust.
9767 (initialize_low_arch): New function.
9768 * linux-cris-low.c (tdesc_crisv32): Declare.
9769 (cris_arch_setup): New function.
9770 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9771 (cris_regs_info): New function.
9772 (the_low_target): Adjust.
9773 (initialize_low_arch): New function.
9774 * linux-m32r-low.c (tdesc_m32r): Declare.
9775 (m32r_arch_setup): New function.
9776 (m32r_usrregs_info, regs_info): New globals.
9777 (m32r_regs_info): Adjust.
9778 (initialize_low_arch): New function.
9779 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9780 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9781 (tic6x_usrregs_info): Forward declare.
9782 (tic6x_read_description): New function, based on ...
9783 (tic6x_arch_setup): ... this. Reimplement.
9784 (target_regsets): Rename to ...
9785 (tic6x_regsets): ... this, and make static.
9786 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9787 (tic6x_regs_info): New function.
9788 (the_low_target): Adjust.
9789 (initialize_low_arch): New function.
9790 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9791 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9792 (target_regsets): Rename to ...
9793 (xtensa_regsets): ... this, and make static.
9794 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9795 globals.
9796 (xtensa_arch_setup, xtensa_regs_info): New functions.
9797 (the_low_target): Adjust.
9798 (initialize_low_arch): New function.
9799 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9800 (nios2_arch_setup): Set the current process'es tdesc.
9801 (target_regsets): Rename to ...
9802 (nios2_regsets): ... this.
9803 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9804 (nios2_regs_info): New function.
9805 (the_low_target): Adjust.
9806 (initialize_low_arch): New function.
9807 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9808 (aarch64_arch_setup): Set the current process'es tdesc.
9809 (target_regsets): Rename to ...
9810 (aarch64_regsets): ... this.
9811 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9812 (aarch64_regs_info): New function.
9813 (the_low_target): Adjust.
9814 (initialize_low_arch): New function.
9815 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9816 globals.
9817 (target_regsets): Rename to ...
9818 (tile_regsets): ... this.
9819 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9820 (tile_regs_info): New function.
9821 (tile_arch_setup): Set the current process'es tdesc.
9822 (the_low_target): Adjust.
9823 (initialize_low_arch): New function.
9824 * spu-low.c (tdesc_spu): Declare.
9825 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9826 * win32-arm-low.c (tdesc_arm): Declare.
9827 (arm_arch_setup): New function.
9828 (the_low_target): Install arm_arch_setup instead of
9829 init_registers_arm.
9830 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9831 (init_windows_x86): Rename to ...
9832 (i386_arch_setup): ... this. Set `win32_tdesc'.
9833 (the_low_target): Adjust.
9834 * win32-low.c (win32_tdesc): New global.
9835 (child_add_thread): Don't create the thread cache here.
9836 (do_initial_child_stuff): Set the new process'es tdesc.
9837 * win32-low.h (struct target_desc): Forward declare.
9838 (win32_tdesc): Declare.
9839 * lynx-i386-low.c (tdesc_i386): Declare global.
9840 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9841 * lynx-low.c (lynx_tdesc): New global.
9842 (lynx_add_process): Set the new process'es tdesc.
9843 * lynx-low.h (struct target_desc): Forward declare.
9844 (lynx_tdesc): Declare global.
9845 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9846 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9847 * nto-low.c (nto_tdesc): New global.
9848 (do_attach): Set the new process'es tdesc.
9849 * nto-low.h (struct target_desc): Forward declare.
9850 (nto_tdesc): Declare.
9851 * nto-x86-low.c (tdesc_i386): Declare.
9852 (nto_x86_arch_setup): Set `nto_tdesc'.
9853
9854 2013-06-04 Gary Benson <gbenson@redhat.com>
9855
9856 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9857 to qSupported response when appropriate.
9858 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9859 with nonzero-length annex.
9860 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9861 arguments supplied in annex.
9862
9863 2013-05-31 Doug Evans <dje@google.com>
9864
9865 PR server/15594
9866 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9867 64 bits in 64-cross-32 environment.
9868
9869 2013-05-28 Pedro Alves <palves@redhat.com>
9870
9871 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9872 (aarch64-without-fpu.c): Delete rule.
9873 * configure.srv (aarch64*-*-linux*): Remove references to
9874 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9875 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9876 declaration.
9877
9878 2013-05-24 Pedro Alves <palves@redhat.com>
9879
9880 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9881 instead of strchr/decode_address. Error if the range isn't split
9882 with a ','. Don't assume there's be a ':' in the action.
9883
9884 2013-05-23 Yao Qi <yao@codesourcery.com>
9885 Pedro Alves <palves@redhat.com>
9886
9887 * linux-low.c (lwp_in_step_range): New function.
9888 (linux_wait_1): If the thread was range stepping and stopped
9889 outside the stepping range, report the stop to GDB. Otherwise,
9890 continue stepping. Add range stepping debug output.
9891 (linux_set_resume_request): Copy the step range from the resume
9892 request to the lwp.
9893 (linux_supports_range_stepping): New.
9894 (linux_target_ops) <supports_range_stepping>: Set to
9895 linux_supports_range_stepping.
9896 * linux-low.h (struct linux_target_ops)
9897 <supports_range_stepping>: New field.
9898 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9899 * linux-x86-low.c (x86_supports_range_stepping): New.
9900 (the_low_target) <supports_range_stepping>: Set to
9901 x86_supports_range_stepping.
9902 * server.c (handle_v_cont): Handle 'r' action.
9903 (handle_v_requests): Append ";r" if the target supports range
9904 stepping.
9905 * target.h (struct thread_resume) <step_range_start,
9906 step_range_end>: New fields.
9907 (struct target_ops) <supports_range_stepping>:
9908 New field.
9909 (target_supports_range_stepping): New macro.
9910
9911 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9912
9913 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9914 confusion in comment.
9915
9916 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9917
9918 * lynx-low.c (struct process_info_private): New type.
9919 (lynx_add_process): New function.
9920 (lynx_create_inferior, lynx_attach): Replace calls to
9921 add_process by calls to lynx_add_process.
9922 (lynx_resume): If PTID is null, then try using
9923 current_process()->private->last_wait_event_ptid.
9924 Add comments.
9925 (lynx_clear_inferiors): Delete. The contents of that function
9926 has been inlined in lynx_mourn;
9927 (lynx_wait_1): Save the ptid in the process's private data.
9928 (lynx_mourn): Free the process' private data. Replace call
9929 to lynx_clear_inferiors by call to clear_inferiors.
9930
9931 2013-05-17 Yao Qi <yao@codesourcery.com>
9932
9933 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9934 the right place.
9935
9936 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9937
9938 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9939 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9940 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9941 PT_TEXT_END_ADDR guards. Update comments.
9942 (linux_target_op) <read_offsets>: Conditionally define to
9943 linux_read_offsets if the target is UCLIBC and if it defines
9944 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9945
9946 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9947 Andrew Jenner <andrew@codesourcery.com>
9948
9949 * Makefile.in (SFILES): Add linux-nios2-low.c.
9950 (clean): Add action to delete nios2-linux.c.
9951 (nios2-linux.c): New rule.
9952 * configure.srv: Add nios2*-*-linux*.
9953 * linux-nios2-low.c: New.
9954
9955 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9956
9957 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9958
9959 2013-04-25 Hui Zhu <hui@codesourcery.com>
9960
9961 PR gdb/15186
9962 * ax.c (ax_printf): Add fflush.
9963
9964 2013-04-22 Tom Tromey <tromey@redhat.com>
9965
9966 * Makefile.in (SFILES): Add filestuff.c.
9967 (OBS): Add filestuff.o.
9968 (filestuff.o): New target.
9969 * config.in, configure: Rebuild.
9970 * configure.ac: Check for fdwalk, pipe2.
9971
9972 2013-04-17 Pedro Alves <palves@redhat.com>
9973
9974 * configure.ac (USE_THREAD_DB): Delete variable.
9975 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9976 Don't AC_SUBST USE_THREAD_DB.
9977 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9978 * config.in, configure: Regenerate.
9979
9980 2013-04-16 Pedro Alves <palves@redhat.com>
9981
9982 * linux-low.h (struct lwp_info) <thread_known>: Move under
9983 the USE_THREAD_DB #ifdef.
9984
9985 2013-04-16 Pedro Alves <palves@redhat.com>
9986
9987 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9988 (linux-low.o): Delete rule.
9989 * linux-low.h: Always include "gdb_thread_db.h" instead of
9990 conditionally including thread_db.h.
9991 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9992 HAVE_THREAD_DB_H.
9993
9994 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9995
9996 * Makefile.in (install-only): Fix make install regression.
9997
9998 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9999
10000 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10001 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10002 installation.
10003 * gdbserver.1: Remove.
10004
10005 2013-03-22 Pedro Alves <palves@redhat.com>
10006
10007 * linux-low.c (handle_extended_wait): Don't call
10008 linux_enable_event_reporting.
10009
10010 2013-03-15 Tony Theodore <tonyt@logyst.com>
10011
10012 PR build/9098:
10013 * Makefile.in (SHELL): Use @SHELL@.
10014
10015 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10016
10017 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10018 compiler warning.
10019
10020 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10021
10022 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10023 Remove extraneous NULL element.
10024
10025 2013-03-13 Yao Qi <yao@codesourcery.com>
10026
10027 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10028 'V' block in trace frame.
10029
10030 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10031
10032 * target.h (struct target_ops): Add btrace ops.
10033 (target_supports_btrace): New macro.
10034 (target_enable_btrace): New macro.
10035 (target_disable_btrace): New macro.
10036 (target_read_btrace): New macro.
10037 * gdbthread.h (struct thread_info): Add btrace field.
10038 * server.c: Include btrace-common.h.
10039 (handle_btrace_general_set): New function.
10040 (handle_btrace_enable): New function.
10041 (handle_btrace_disable): New function.
10042 (handle_general_set): Call handle_btrace_general_set.
10043 (handle_qxfer_btrace): New function.
10044 (struct qxfer qxfer_packets[]): Add btrace entry.
10045 * inferiors.c (remove_thread): Disable btrace.
10046 * linux-low: Include linux-btrace.h.
10047 (linux_low_enable_btrace): New function.
10048 (linux_low_read_btrace): New function.
10049 (linux_target_ops): Add btrace ops.
10050 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10051 Add srv_linux_btrace=yes.
10052 (x86_64-*-linux*): Add linux-btrace.o.
10053 Add srv_linux_btrace=yes.
10054 * configure.ac: Define HAVE_LINUX_BTRACE.
10055 * config.in: Regenerated.
10056 * configure: Regenerated.
10057
10058 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10059
10060 * server.c (handle_qxfer): Preserve error message if -3 is
10061 returned.
10062 (qxfer): Document the -3 return value.
10063
10064 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10065
10066 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10067 (linux_btrace_h): New variable.
10068 (linux-btrace.o): New rule.
10069
10070 2013-03-08 Stan Shebs <stan@codesourcery.com>
10071 Hafiz Abid Qadeer <abidh@codesourcery.com>
10072
10073 * tracepoint.c (trace_buffer_size): New global.
10074 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10075 (init_trace_buffer): Change to one-argument function. Allocate
10076 trace buffer memory.
10077 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10078 handle QTBuffer:size packet.
10079 (cmd_bigqtbuffer_size): New function.
10080 (initialize_tracepoint): Call init_trace_buffer with
10081 DEFAULT_TRACE_BUFFER_SIZE.
10082 * server.c (handle_query): Add QTBuffer:size in the
10083 supported packets.
10084
10085 2013-03-07 Yao Qi <yao@codesourcery.com>
10086
10087 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10088 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10089 of -1.
10090 (cmd_qtsp): Adjust condition. Do post increment.
10091 Set cur_action and cur_step_action back to 0.
10092
10093 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10094
10095 PR server/15236
10096 * linux-low.c (linux_write_memory): Return early success if LEN is
10097 zero.
10098
10099 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10100
10101 * configure.srv: Add x86_64-*-cygwin* as target.
10102
10103 2013-02-28 Tom Tromey <tromey@redhat.com>
10104
10105 * configure.ac: Invoke AC_SYS_LARGEFILE.
10106 * configure, config.in: Rebuild.
10107
10108 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10109
10110 * win32-low.c: Throughout, fix format strings and casts of
10111 printf-like functions to avoid type related warnings on all
10112 platforms.
10113 (get_child_debug_event): Print dwDebugEventCode as hex since
10114 that's how it's usually documented.
10115
10116 2013-02-28 Yao Qi <yao@codesourcery.com>
10117
10118 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10119 pulongest.
10120
10121 2013-02-27 Jiong Wang <jiwang@tilera.com>
10122
10123 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10124 (reg-tilegx32.c): New rule.
10125 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10126 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10127 different register info initializer according to elf class.
10128 (init_registers_tilgx32): New function. The tilegx32 register info
10129 initializer.
10130 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10131 (tile_store_gregset): Likewise.
10132
10133 2013-02-27 Yao Qi <yao@codesourcery.com>
10134
10135 * server.c (process_point_options): Print debug message when
10136 debug_threads is true.
10137
10138 2013-02-26 Yao Qi <yao@codesourcery.com>
10139
10140 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10141
10142 2013-02-19 Pedro Alves <palves@redhat.com>
10143 Kai Tietz <ktietz@redhat.com>
10144
10145 PR gdb/15161
10146
10147 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10148 instead of strtoul to extract address from packet.
10149 (process_serial_event) <'z'>: Likewise.
10150
10151 2013-02-18 Yao Qi <yao@codesourcery.com>
10152
10153 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10154
10155 2013-02-14 Pedro Alves <palves@redhat.com>
10156
10157 Plug memory leak.
10158
10159 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10160 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10161
10162 2013-02-14 Pedro Alves <palves@redhat.com>
10163
10164 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10165
10166 2013-02-14 Pedro Alves <palves@redhat.com>
10167
10168 * tracepoint.c (save_string): Delete.
10169 (add_tracepoint_action): Use savestring instead of save_string.
10170
10171 2013-02-12 Pedro Alves <palves@redhat.com>
10172
10173 * linux-xtensa-low.c: Ditto.
10174 * xtensa-xtregs.c: Ditto.
10175
10176 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10177
10178 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10179 thread_db.
10180
10181 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10182
10183 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10184 aarch64_num_wp_regs and aarch64_num_bp_regs to
10185 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10186
10187 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10188
10189 * linux-aarch64-low.c (ps_get_thread_area): Replace
10190 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10191
10192 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10193 Marcus Shawcroft <marcus.shawcroft@arm.com>
10194 Nigel Stephens <nigel.stephens@arm.com>
10195 Yufeng Zhang <yufeng.zhang@arm.com>
10196
10197 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10198 (aarch64.c, aarch64-without-fpu.c): New targets.
10199 * configure.srv (aarch64*-*-linux*): New.
10200 * linux-aarch64-low.c: New file.
10201
10202 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10203
10204 * linux-low.c (handle_extended_wait, linux_create_inferior)
10205 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10206 (dequeue_one_deferred_signal, linux_resume_one_thread)
10207 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10208 (linux_tracefork_grandchild, linux_test_for_tracefork)
10209 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10210 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10211 where the argument is 0.
10212
10213 2013-01-25 Yao Qi <yao@codesourcery.com>
10214
10215 * event-loop.c: Include "queue.h".
10216 (gdb_event_p): New typedef.
10217 (struct gdb_event) <next_event>: Remove.
10218 (event_queue): Change to QUEUE(gdb_event_p).
10219 (async_queue_event): Remove.
10220 (gdb_event_xfree): New.
10221 (initialize_event_loop): New.
10222 (process_event): Use API from QUEUE.
10223 (wait_for_event): Likewise.
10224 * server.c (main): Call initialize_event_loop.
10225 * server.h (initialize_event_loop): Declare.
10226
10227 2013-01-18 Yao Qi <yao@codesourcery.com>
10228
10229 * ax.h (struct eval_agent_expr_context): New.
10230 (gdb_eval_agent_expr): Update declaration.
10231 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10232 TFRAME. Add new argument CTX.
10233 * server.h (struct eval_agent_expr_context): Declare.
10234 (agent_mem_read, agent_tsv_read): Update declaration.
10235 (agent_mem_read_string): Likewise.
10236 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10237 (add_traceframe_block): Add new argument TPOINT.
10238 Increase TPOINT->traceframe_usage.
10239 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10240 eval_tracepoint_agent_expr.
10241 (condition_true_at_tracepoint): Likewise.
10242 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10243 (agent_mem_read_string, agent_tsv_read): Likewise.
10244
10245 2013-01-16 Yao Qi <yao@codesourcery.com>
10246
10247 * linux-low.c (linux_resume_one_lwp): Don't check
10248 'lwp->bp_reinsert != 0'.
10249
10250 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10251 Pedro Alves <palves@redhat.com>
10252
10253 * lynx-low.c (ptrace_request_to_str): Define a temporary
10254 macro and use it to simplify this function's implementation.
10255
10256 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10257
10258 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10259 sets errno.
10260
10261 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10262
10263 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10264
10265 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10266
10267 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10268
10269 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10270
10271 * lynx-low.c (lynx_resume): Use the resume_info parameter
10272 to determine the ptid for the lynx_ptrace call, unless
10273 it is equal to minus_one_ptid, in which case we use the
10274 ptid of the current_inferior.
10275 (lynx_wait_1): After having received a thread create/exit
10276 event, resume the inferior's execution using the signaling
10277 thread's ptid, rather than the old ptid.
10278
10279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10280
10281 * lynx-low.c (lynx_resume): Delete variable ret.
10282
10283 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10284
10285 * gdbreplay.c (gdbreplay_version): Update copyright year.
10286 * server.c (gdbserver_version): Likewise.
10287
10288 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10289
10290 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10291 new thread.
10292
10293 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10294
10295 * lynx-low.c (ptrace_request_to_str): Add handling for
10296 PTRACE_GETTRACESIG.
10297
10298 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10299
10300 * lynx-low.c (lynx_attach): Delete variable new_process.
10301
10302 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10303
10304 * lynx-low.c (lynx_create_inferior): Delete variable
10305 new_process.
10306
10307 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10308
10309 * lynx-low.c (ptrace_request_to_str): Do not handle
10310 PTRACE_GETTHREADLIST if this macro does not exist.
10311
10312 2012-12-15 Yao Qi <yao@codesourcery.com>
10313
10314 * Makefile.in (OBS): Add notif.o.
10315 * notif.c, notif.h: New.
10316 * server.c: Include "notif.h".
10317 (struct vstop_notif) <next>: Remove.
10318 <base>: New field.
10319 (queue_stop_reply): Update.
10320 (push_event, send_next_stop_reply): Remove.
10321 (discard_queued_stop_replies): Update.
10322 (notif_stop): New variable.
10323 (handle_v_stopped): Remove.
10324 (handle_v_requests): Don't call handle_v_stopped. Call
10325 handle_ack_notif instead.
10326 (queue_stop_reply_callback): Call notif_event_enque instead
10327 of queue_stop_reply.
10328 (handle_status): Don't call send_next_stop_reply, call
10329 notif_write_event instead.
10330 (kill_inferior_callback): Likewise.
10331 (detach_or_kill_inferior_callback): Likewise.
10332 (main): Call initialize_notif.
10333 (process_serial_event): Call QUEUE_is_empty.
10334 (handle_target_event): Call notif_push instead of push event.
10335 * server.h (push_event): Remove declaration.
10336
10337 2012-12-10 Tom Tromey <tromey@redhat.com>
10338
10339 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10340 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10341 macros.
10342 (.c.o): Rewrite.
10343 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10344 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10345 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10346 (amd64-linux-ipa.o, ax.o): Rewrite.
10347 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10348 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10349 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10350 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10351 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10352 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10353 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10354 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10355 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10356 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10357 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10358 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10359 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10360 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10361 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10362 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10363 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10364 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10365 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10366 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10367 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10368 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10369 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10370 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10371 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10372 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10373 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10374 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10375 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10376 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10377 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10378 (reg-tilegx.o): Remove.
10379 (all_object_files): New macro.
10380 Include .deps files.
10381 * aclocal.m4, configure: Rebuild.
10382 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10383 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10384 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10385
10386 2012-12-05 Tom Tromey <tromey@redhat.com>
10387
10388 PR gdb/14917:
10389 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10390
10391 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10392
10393 * configure.ac: Check for linux/perf_event.h.
10394 * config.in: Regenerated.
10395 * configure: Regenerated.
10396
10397 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10398
10399 * hostio.c (handle_readlink): Decrease buffer size
10400 parameter passed to readlink by one byte.
10401
10402 2012-11-26 Yao Qi <yao@codesourcery.com>
10403
10404 * configure.ac (build_warnings): Append '-Wempty-body'.
10405 * configure: Regenerated.
10406 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10407 body.
10408
10409 2012-11-15 Pierre Muller <muller@sourceware.org>
10410
10411 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10412 * config.in: Regenerate.
10413 * configure: Regenerate.
10414 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10415 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10416 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10417 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10418 header.
10419 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10420 instead of <sys/wait.h> header.
10421 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10422
10423 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10424
10425 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10426 (various make rules): Remove -DGDBSERVER
10427
10428 2012-11-09 Yao Qi <yao@codesourcery.com>
10429
10430 * spu-low.c (current_ptid): Move it to ..
10431 * gdbthread.h: ... here. New.
10432 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10433 * server.c (myresume, process_serial_event): Likewise.
10434 * thread-db.c (thread_db_find_new_threads): Likewise.
10435 * tracepoint.c (run_inferior_command): Likewise.
10436
10437 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10438
10439 * server.c (handle_search_memory_1): Include access length in
10440 warning message.
10441
10442 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10443
10444 * linux-crisv32-low.c: Fix compile errors.
10445
10446 2012-09-04 Yao Qi <yao@codesourcery.com>
10447
10448 * tracepoint.c (cmd_qtsv): Adjust debug message.
10449 Don't check CUR_TPOINT.
10450
10451 2012-08-28 Yao Qi <yao@codesourcery.com>
10452
10453 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10454 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10455 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10456 Remove declarations of xmalloc, xreallloc, xstrdup and
10457 freeargv.
10458 * Makefile.in (libiberty_h): New.
10459 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10460 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10461
10462 2012-08-23 Yao Qi <yao@codesourcery.com>
10463
10464 * server.h: Remove declaration of 'xsnprintf'.
10465
10466 2012-08-22 Keith Seitz <keiths@redhat.com>
10467
10468 * server.h: Include build-gnulib-gbserver/config.h.
10469 * gdbreplay.c: Likewise.
10470
10471 2012-08-08 Doug Evans <dje@google.com>
10472
10473 * Makefile.in (SFILES): Add gdb_vecs.c.
10474 (OBS): Add gdb_vecs.o.
10475 (gdb_vecs_h, host_defs_h): New variables.
10476 (thread-db.o): Add $(gdb_vecs_h) dependency.
10477 (gdb_vecs.o): New rule.
10478 * thread-db.c: #include "gdb_vecs.h".
10479 (thread_db_load_search): Use a vector to iterate over path elements.
10480 Handle text appearing after "$pdir".
10481
10482 * configure.ac: Add check for strstr.
10483 * config.in: Regenerate.
10484 * configure: Regenerate.
10485
10486 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10487
10488 * hostio.c (handle_pread): If pread fails, fall back to attempting
10489 lseek/read.
10490 (handle_pwrite): Likewise for pwrite.
10491
10492 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10493
10494 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10495 between unsupported TYPE and unimplementable ADDR/LEN combination.
10496 (arm_insert_point): Act on new return value.
10497
10498 2012-07-31 Pedro Alves <palves@redhat.com>
10499
10500 * server.c (process_point_options): Only skip tokens if we find
10501 one that is unrecognized. Don't treat 'X' specially while
10502 skipping unrecognized tokens.
10503
10504 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10505
10506 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10507 to 4-byte-align HW breakpoint addresses for Thumb.
10508
10509 2012-07-27 Yao Qi <yao@codesourcery.com>
10510
10511 PR remote/14161.
10512
10513 * server.h: Declare gdb_agent_about_to_close.
10514 * target.c (kill_inferior): Include "agent.h".
10515 New. Send command 'kill'.
10516 * target.h (kill_inferior): Removed macro.
10517 * tracepoint.c (gdb_agent_about_to_close): New.
10518 (gdb_agent_helper_thread): Handle command 'close'.
10519 Wait endlessly until the inferior stops.
10520 Install gdb_agent_remove_socket to atexit hook.
10521 (agent_socket_name): New static variable.
10522 (gdb_agent_socket_init): Replace local variable 'name' with
10523 'agent_socket_name'.
10524 (gdb_agent_remove_socket): New.
10525
10526 2012-07-27 Yao Qi <yao@codesourcery.com>
10527
10528 * server.c (process_point_options): Stop at 'X' when parsing.
10529
10530 2012-07-19 Michael Eager <eager@eagercon.com>
10531
10532 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10533 to hw_execute.
10534 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10535 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10536 hardware breakpoint.
10537
10538 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10539
10540 * gdbserver/linux-low.c (initialize_low): Call
10541 linux_ptrace_init_warnings.
10542
10543 2012-07-02 Doug Evans <dje@google.com>
10544
10545 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10546 pointer to int.
10547
10548 2012-07-02 Stan Shebs <stan@codesourcery.com>
10549
10550 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10551 (ax.o): Add it to build rule.
10552 (ax-ipa.o): Ditto.
10553 (OBS): Add format.o.
10554 (IPA_OBS): Add format.o.
10555 * server.c (handle_query): Claim support for breakpoint commands.
10556 (process_point_options): Add command case.
10557 (process_serial_event): Leave running if there are printfs in
10558 effect.
10559 * mem-break.h (any_persistent_commands): Declare.
10560 (add_breakpoint_commands): Declare.
10561 (gdb_no_commands_at_breakpoint): Declare.
10562 (run_breakpoint_commands): Declare.
10563 * mem-break.c (struct point_command_list): New struct.
10564 (struct breakpoint): New field command_list.
10565 (any_persistent_commands): New function.
10566 (add_commands_to_breakpoint): New function.
10567 (add_breakpoint_commands): New function.
10568 (gdb_no_commands_at_breakpoint): New function.
10569 (run_breakpoint_commands): New function.
10570 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10571 locally.
10572 * ax.c: Include format.h.
10573 (ax_printf): New function.
10574 (gdb_eval_agent_expr): Add printf opcode.
10575
10576 2012-06-13 Yao Qi <yao@codesourcery.com>
10577
10578 * server.c (start_inferior): Remove duplicated writes to fields
10579 'last_resume_kind' and 'last_status' of 'current_inferior'.
10580
10581 2012-06-12 Yao Qi <yao@codesourcery.com>
10582 Pedro Alves <palves@redhat.com>
10583
10584 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10585 comment.
10586 * server.c (handle_v_cont): Extend comment.
10587
10588 2012-06-11 Yao Qi <yao@codesourcery.com>
10589
10590 * linux-low.c (linux_attach): Add 'static'.
10591
10592 2012-06-06 Yao Qi <yao@codesourcery.com>
10593
10594 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10595
10596 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10597
10598 Fix gcc -flto compilation warning.
10599 * server.c (main): Make variable multi_mode and attach volatile.
10600
10601 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10602
10603 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10604 if the platform doesn't know about it.
10605
10606 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10607
10608 * Makefile.in (SFILES): Add linux-tile-low.c.
10609 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10610 * configure.srv: Handle tilegx-*-linux*.
10611 * linux-tile-low.c: New file.
10612
10613 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10614
10615 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10616
10617 2012-05-24 Pedro Alves <palves@redhat.com>
10618
10619 PR gdb/7205
10620
10621 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10622
10623 2012-05-24 Pedro Alves <palves@redhat.com>
10624
10625 PR gdb/7205
10626
10627 Replace target_signal with gdb_signal throughout.
10628
10629 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10630
10631 * linux-low.c (linux_store_registers): Avoid the copying sequence
10632 when no data has been retrieved by ptrace.
10633
10634 2012-05-22 Will Deacon <will.deacon@arm.com>
10635
10636 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10637 Include asm/ptrace.h.
10638 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10639 already defined.
10640
10641 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10642
10643 * linux-low.c (linux_store_registers): Don't re-retrieve data
10644 with ptrace that has already been obtained from /proc. Always
10645 copy any data retrieved with ptrace to the buffer supplied.
10646
10647 2012-05-11 Yao Qi <yao@codesourcery.com>
10648 Pedro Alves <palves@redhat.com>
10649
10650 * linux-low.c (enum stopping_threads_kind): New.
10651 (stopping_threads): Change type to `enum stopping_threads_kind'.
10652 (handle_extended_wait): If stopping and suspending threads, leave
10653 the new_lwp suspended too.
10654 (linux_wait_for_event): Adjust.
10655 (stop_all_lwps): Set `stopping_threads' to
10656 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10657 whether we're suspending threads or just stopping them. Assert no
10658 recursion happens.
10659
10660 2012-04-29 Yao Qi <yao@codesourcery.com>
10661
10662 * server.h: Move some code to ...
10663 * gdbthread.h: ... here. New.
10664 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10665 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10666 (nto-low.o, win32-low.o): Likewise.
10667 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10668 * regcache.c, remote-utils.c, server.c: Likewise.
10669 * target.c, tracepoint.c, win32-low.c: Likewise.
10670
10671 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10672
10673 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10674 (PTRACE_ARG4_TYPE): Likewise.
10675 (PTRACE_XFER_TYPE): Likewise.
10676 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10677 ptrace to PTRACE_ARG3_TYPE.
10678 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10679 (PTRACE_ARG4_TYPE): Likewise.
10680 (PTRACE_XFER_TYPE): Likewise.
10681 (linux_detach_one_lwp): Cast fourth argument of
10682 ptrace to long then PTRACE_ARG4_TYPE.
10683 (regsets_fetch_inferior_registers): Cast third argument of
10684 ptrace to long then PTRACE_ARG3_TYPE.
10685 (regsets_store_inferior_registers): Likewise.
10686
10687 2012-04-20 Pedro Alves <palves@redhat.com>
10688
10689 * configure: Regenerate.
10690
10691 2012-04-19 Pedro Alves <palves@redhat.com>
10692
10693 * Makefile.in (GNULIB_BUILDDIR): New.
10694 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10695 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10696 (all, install-only, uninstall, clean-info, all-lib, clean): No
10697 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10698 (maintainer-clean realclean distclean): Use subdir_do.
10699 (subdir_do): New.
10700 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10701 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10702 * acinclude.m4: Include acx_configure_dir.m4.
10703 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10704 calls. Call AC_PROG_RANLIB. Configure gnulib using
10705 ACX_CONFIGURE_DIR.
10706 (GNULIB): New.
10707 (GNULIB_STDINT_H): Adjust.
10708 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10709 * gdbreplay.c: Include build-gnulib/config.h.
10710 * server.h: Likewise.
10711 * aclocal.m4: Regenerate.
10712 * config.in: Regenerate.
10713 * configure: Regenerate.
10714
10715 2012-04-19 Pedro Alves <palves@redhat.com>
10716
10717 * Makefile.in (LIBGNU, INCGNU): Adjust.
10718 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10719 (all, install-only, uninstall, clean-info, all-lib, clean)
10720 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10721 * configure.ac: Adjust AC_OUTPUT output.
10722 * aclocal.m4: Regenerate.
10723 * configure: Regenerate.
10724
10725 2012-04-19 Pedro Alves <palves@redhat.com>
10726
10727 * Makefile.in (generated_files): New.
10728 (server_h): Remove the explicit dependency on config.h, and depend
10729 on $generated_files.
10730
10731 2012-04-19 Pedro Alves <palves@redhat.com>
10732
10733 * Makefile.in (INCGNU): Add -Ignulib.
10734
10735 2012-04-19 Pedro Alves <palves@redhat.com>
10736
10737 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10738 (INCGNU): ... this, and spell out -I here.
10739 (GNULIB_LIB): Rename to ...
10740 (LIBGNU): ... this.
10741 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10742
10743 2012-04-19 Pedro Alves <palves@redhat.com>
10744
10745 * config.in: Regenerate.
10746
10747 2012-04-19 Pedro Alves <palves@redhat.com>
10748
10749 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10750 * server.h (memmem): Remove declaration.
10751 * config.in: Regenerate.
10752 * configure: Regenerate.
10753
10754 2012-04-19 Yao Qi <yao@codesourcery.com>
10755
10756 * Makefile.in (SFILES): Add common/vec.c.
10757 (OBS): Add vec.o.
10758 (vec.o): New rule.
10759
10760 2012-04-19 Yao Qi <yao@codesourcery.com>
10761
10762 * remote-utils.c (prepare_resume_reply): Replace with macro
10763 target_core_of_thread.
10764 * server.c (handle_qxfer_threads_proper): Likewise.
10765 * target.h (traget_core_of_thread): New macro.
10766
10767 2012-04-18 Pedro Alves <palves@redhat.com>
10768
10769 * aclocal.m4: Regenerate.
10770 * configure: Regenerate.
10771
10772 2012-04-16 Yao Qi <yao@codesourcery.com>
10773
10774 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10775 duplicated on address.
10776
10777 2012-04-16 Yao Qi <yao@codesourcery.com>
10778
10779 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10780 (struct tracepoint_action_ops) <send>: New field.
10781 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10782 (agent_expr_send, x_tracepoint_action_send): New.
10783 (l_tracepoint_action_send): New.
10784 (cmd_qtdp): Download and install tracepoint
10785 according to `use_agent'.
10786 (run_inferior_command): Add one more parameter `len'.
10787 Update callers.
10788 (tracepoint_send_agent): New.
10789 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10790
10791 2012-04-16 Yao Qi <yao@codesourcery.com>
10792
10793 * tracepoint.c (download_tracepoints): Moved to ...
10794 (cmd_qtstart): ... here.
10795
10796 2012-04-14 Yao Qi <yao@codesourcery.com>
10797
10798 * tracepoint.c: Include inttypes.h.
10799 (struct collect_memory_action): Use sized types.
10800 (struct tracepoint): Likewise.
10801 (cmd_qtdp, stop_tracing): Update print specifiers.
10802 (cmd_qtp, response_tracepoint): Likewise.
10803 (collect_data_at_tracepoint): Likewise.
10804 (collect_data_at_step): Likewise.
10805
10806 2012-04-14 Yao Qi <yao@codesourcery.com>
10807
10808 Import gnulib module inttypes.
10809 * aclocal.m4, config.in, configure: Regenerated.
10810
10811 2012-04-14 Yao Qi <yao@codesourcery.com>
10812
10813 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10814 Makefile and config.status at last.
10815
10816 2012-04-13 Yao Qi <yao@codesourcery.com>
10817
10818 * tracepoint.c: Include stdint.h unconditionally.
10819
10820 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10821
10822 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10823 on BFD_HAVE_SYS_PROCFS_TYPE.
10824 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10825 * configure: Regenerate.
10826 * config.in: Likewise.
10827
10828 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10829
10830 * Makefile.in (clean): Also remove x32.c x32-linux.c
10831 x32-avx.c x32-avx-linux.c.
10832 (x32.o): New target.
10833 (x32.c): Likewise.
10834 (x32-linux.o): Likewise.
10835 (x32-linux.c): Likewise.
10836 (x32-avx.o): Likewise.
10837 (x32-avx.c): Likewise.
10838 (x32-avx-linux.o): Likewise.
10839 (x32-avx-linux.c): Likewise.
10840
10841 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10842 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10843 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10844 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10845 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10846 i386/x32-avx-linux.xml.
10847
10848 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10849 (init_registers_x32_avx_linux): Likwise.
10850 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10851 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10852
10853 2012-04-13 Pedro Alves <palves@redhat.com>
10854
10855 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10856 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10857 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10858 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10859 the sub-make.
10860
10861 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10862
10863 * linux-x86-low.c (compat_x32_clock_t): New.
10864 (compat_x32_siginfo_t): Likewise.
10865 (compat_x32_siginfo_from_siginfo): Likewise.
10866 (siginfo_from_compat_x32_siginfo): Likewise.
10867 (linux_is_elf64): Likewise.
10868 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10869 and siginfo_from_compat_x32_siginfo for x32.
10870 (x86_arch_setup): Set linux_is_elf64.
10871
10872 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10873
10874 PR gdb/13969
10875 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10876 e_machine field.
10877 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10878 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10879 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10880 compatible with process.
10881
10882 2012-04-12 Yao Qi <yao@codesourcery.com>
10883
10884 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10885 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10886 (install-only, install-info, clean): Handle sub dir gnulib.
10887 (all-lib, am--refresh): New targets.
10888 (memmem.o): Remove target.
10889 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10890 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10891 (AC_REPLACE_FUNCS): Remove memmem.
10892 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10893 (AC_OUTPUT): Generate Makefile in gnulib/.
10894 * aclocal.m4, config.in, configure: Regenerated.
10895
10896 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10897
10898 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10899
10900 2012-04-05 Pedro Alves <palves@redhat.com>
10901
10902 -Werror=strict-aliasing
10903
10904 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10905 pointer.
10906
10907 2012-04-04 Pedro Alves <palves@redhat.com>
10908
10909 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10910 (sparc_store_gregset_from_stack, sparc_store_gregset)
10911 (sparc_breakpoint_at): Fix formatting.
10912
10913 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10914
10915 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10916 are available.
10917 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10918 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10919 * config.in: Regenerate.
10920 * configure: Likewise.
10921
10922 2012-03-29 Pedro Alves <palves@redhat.com>
10923
10924 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10925 Correct ptrace arguments.
10926
10927 2012-03-28 Pedro Alves <palves@redhat.com>
10928
10929 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10930 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10931 (IA64_FR1_REGNUM): New defines.
10932 (ia64_fetch_register): New.
10933 (the_low_target): Install it.
10934 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10935 field.
10936 * linux-low.c (linux_fetch_registers): Try the
10937 the_low_target.fetch_register hook first.
10938
10939 * linux-arm-low.c (the_low_target): Adjust.
10940 * linux-bfin-low.c (the_low_target): Adjust.
10941 * linux-cris-low.c (the_low_target): Adjust.
10942 * linux-crisv32-low.c (the_low_target): Adjust.
10943 * linux-m32r-low.c (the_low_target): Adjust.
10944 * linux-m68k-low.c (the_low_target): Adjust.
10945 * linux-mips-low.c (the_low_target): Adjust.
10946 * linux-ppc-low.c (the_low_target): Adjust.
10947 * linux-s390-low.c (the_low_target): Adjust.
10948 * linux-sh-low.c (the_low_target): Adjust.
10949 * linux-sparc-low.c (the_low_target): Adjust.
10950 * linux-tic6x-low.c (the_low_target): Adjust.
10951 * linux-x86-low.c (the_low_target): Adjust.
10952 * linux-xtensa-low.c (the_low_target): Adjust.
10953
10954 2012-03-26 Pedro Alves <palves@redhat.com>
10955
10956 * server.c (handle_qxfer_libraries): Don't bail early if
10957 the_target->qxfer_libraries_svr4 is not NULL.
10958
10959 2012-03-26 Pedro Alves <palves@redhat.com>
10960
10961 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10962
10963 2012-03-23 Pedro Alves <palves@redhat.com>
10964
10965 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10966 "library-list-svr4" element's start tag when the the DSO list is
10967 empty.
10968
10969 2012-03-23 Pedro Alves <palves@redhat.com>
10970
10971 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10972 a variable whose type size is the same as the inferior's pointer
10973 size.
10974
10975 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10976
10977 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10978 struct siginfo.
10979 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10980 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10981 * linux-low.h: Include <signal.h>.
10982 (struct siginfo): Remove forward declaration.
10983 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10984 struct siginfo.
10985
10986 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10987
10988 * .gitignore: Ignore more files.
10989
10990 2012-03-19 Pedro Alves <palves@redhat.com>
10991 Jan Kratochvil <jan.kratochvil@redhat.com>
10992
10993 * server.c (cont_thread, general_thread): Add describing comments.
10994 (start_inferior): Clear `cont_thread'.
10995 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10996 of a process.
10997
10998 2012-03-15 Yao Qi <yao@codesourcery.com>
10999
11000 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11001 handling to ...
11002 (cmd_qtdp): ... here.
11003
11004 2012-03-15 Yao Qi <yao@codesourcery.com>
11005
11006 * tracepoint.c (struct tracepoint_action_ops): New.
11007 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11008 (m_tracepoint_action_download): New.
11009 (r_tracepoint_action_download): New.
11010 (x_tracepoint_action_download): New.
11011 (l_tracepoint_action_download): New.
11012 (add_tracepoint_action): Install `action->ops' according type.
11013 (download_tracepoint_1): Move code `download' function pointer
11014 of various tracepoint_action_ops.
11015
11016 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11017
11018 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11019 linux_ptrace_attach_warnings.
11020
11021 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11022
11023 * Makefile.in (linux-ptrace.o): New.
11024 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11025 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11026 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11027 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11028 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11029 of these targets.
11030 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11031
11032 2012-03-08 Yao Qi <yao@codesourcery.com>
11033 Pedro Alves <palves@redhat.com>
11034
11035 Fix PR server/13392.
11036 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11037 offset of JMP insn.
11038 * tracepoint.c (remove_tracepoint): New.
11039 (cmd_qtdp): Call remove_tracepoint when failed to install.
11040
11041 2012-03-07 Pedro Alves <palves@redhat.com>
11042
11043 * linux-low.c (get_detach_signal): New.
11044 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11045 Pass on pending signals to PTRACE_DETACH. Check the result of the
11046 ptrace call.
11047 * server.c (program_signals, program_signals_p): New.
11048 (handle_general_set): Handle QProgramSignals.
11049 * server.h (program_signals, program_signals_p): Declare.
11050
11051 2012-03-05 Pedro Alves <palves@redhat.com>
11052 Jan Kratochvil <jan.kratochvil@redhat.com>
11053
11054 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11055 New comment why.
11056
11057 2012-03-03 Yao Qi <yao@codesourcery.com>
11058
11059 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11060 agent_look_up_symbols.
11061
11062 2012-03-03 Yao Qi <yao@codesourcery.com>
11063
11064 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11065 (linux-x86-low.o): Likewise.
11066 * server.h: Remove in_process_agent_loaded.
11067 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11068 common/agent.c.
11069 Update callers.
11070
11071 2012-03-03 Yao Qi <yao@codesourcery.com>
11072
11073 * tracepoint.c (gdb_agent_capability): New global.
11074 (in_process_agent_loaded_ust): Renamed to
11075 `in_process_agent_supports_ust'.
11076 Update callers.
11077 (in_process_agent_supports_ust): Call agent_capability_check.
11078 (clear_installed_tracepoints): Assert that agent supports
11079 agent.
11080
11081 2012-03-03 Yao Qi <yao@codesourcery.com>
11082
11083 * linux-low.c (linux_supports_agent): New.
11084 (linux_target_ops): Initialize field `supports_agent' with
11085 linux_supports_agent.
11086 * target.h (struct target_ops) <supports_agent>: New.
11087 (target_supports_agent): New macro.
11088 * server.c (handle_general_set): Handle packet 'QAgent'.
11089 (handle_query): Send `QAgent+'.
11090 * Makefile.in (server.o): Depends on agent.h.
11091
11092 2012-03-03 Yao Qi <yao@codesourcery.com>
11093
11094 * Makefile.in (OBS): Add agent.o.
11095 Add new rule for agent.o.
11096 Track dependence of tracepoint.c on agent.h.
11097 * tracepoint.c (run_inferior_command_1):
11098 (run_inferior_command): Call agent_run_command.
11099 (gdb_ust_connect_sync_socket): Deleted. Move it to
11100 common/agent.c.
11101 (resume_thread, stop_thread): Likewise.
11102 (gdb_ust_socket_init): Renamed to ...
11103 (gdb_agent_socket_init): ... New.
11104 (gdb_ust_thread): Renamed to ...
11105 (gdb_agent_helper_thread): ... New.
11106 (gdb_ust_init): Move some code to ...
11107 (gdb_agent_init): ... here. New.
11108 [HAVE_UST]: Call gdb_ust_init.
11109 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11110 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11111 * config.in, configure: Regenerated.
11112
11113 2012-03-02 Pedro Alves <palves@redhat.com>
11114
11115 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11116 * linux-low.c (struct simple_pid_list): New.
11117 (stopped_pids): New a struct simple_pid_list pointer.
11118 (add_to_pid_list, pull_pid_from_list): New.
11119 (handle_extended_wait): Don't assume the first signal new children
11120 report is SIGSTOP. Adjust call to pull_pid_from_list.
11121 (linux_wait_for_lwp): Adjust.
11122
11123 2012-03-02 Yao Qi <yao@codesourcery.com>
11124
11125 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11126 debug log.
11127
11128 2012-03-02 Yao Qi <yao@codesourcery.com>
11129
11130 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11131 `stop_pc' and `tpoint'. Update caller.
11132
11133 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11134
11135 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11136 * linux-low.c (use_linux_regsets): New macro.
11137 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11138 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11139 (linux_register_in_regsets): New function.
11140 (usr_fetch_inferior_registers): Skip registers covered by
11141 regsets.
11142 (usr_store_inferior_registers): Likewise.
11143 (usr_fetch_inferior_registers): New macro.
11144 (usr_store_inferior_registers): Likewise.
11145 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11146 (linux_store_registers): Likewise.
11147 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11148 prototype.
11149 (init_registers_mips64_dsp_linux): Likewise.
11150 (init_registers_mips_linux): New macro.
11151 (init_registers_mips_dsp_linux): Likewise.
11152 (mips_dsp_num_regs): Likewise.
11153 (DSP_BASE, DSP_CONTROL): New fallback macros.
11154 (mips_base_regs): New macro.
11155 (mips_regmap): Use it. Fix the size.
11156 (mips_dsp_regmap): New variable.
11157 (mips_dsp_regset_bitmap): Likewise.
11158 (mips_arch_setup): New function.
11159 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11160 than mips_regmap.
11161 (mips_cannot_store_register): Likewise.
11162 (the_low_target): Update .arch_setup, .num_regs and .regmap
11163 initializers. Add .regset_bitmap initializer.
11164 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11165 initializer.
11166 * linux-bfin-low.c (the_low_target): Likewise.
11167 * linux-cris-low.c (the_low_target): Likewise.
11168 * linux-crisv32-low.c (the_low_target): Likewise.
11169 * linux-ia64-low.c (the_low_target): Likewise.
11170 * linux-m32r-low.c (the_low_target): Likewise.
11171 * linux-m68k-low.c (the_low_target): Likewise.
11172 * linux-ppc-low.c (the_low_target): Likewise.
11173 * linux-s390-low.c (the_low_target): Likewise.
11174 * linux-sh-low.c (the_low_target): Likewise.
11175 * linux-sparc-low.c (the_low_target): Likewise.
11176 * linux-tic6x-low.c (the_low_target): Likewise.
11177 * linux-x86-low.c (the_low_target): Likewise.
11178 * linux-xtensa-low.c (the_low_target): Likewise.
11179 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11180 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11181 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11182 srv_xmlfiles.
11183 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11184 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11185
11186 2012-02-29 Yao Qi <yao@codesourcery.com>
11187 Pedro Alves <palves@redhat.com>
11188
11189 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11190 `step_over_finished' is true.
11191
11192 2012-02-27 Pedro Alves <palves@redhat.com>
11193
11194 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11195 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11196
11197 2012-02-27 Pedro Alves <palves@redhat.com>
11198
11199 PR server/9684
11200 * linux-low.c (pid_is_stopped): New.
11201 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11202
11203 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11204
11205 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11206 of conditions.
11207
11208 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11209
11210 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11211
11212 2012-02-24 Luis Machado <lgustavo@codesourcery>
11213
11214 * server.c (handle_query): Advertise support for target-side
11215 breakpoint condition evaluation.
11216 (process_point_options): New function.
11217 (process_serial_event): When inserting a breakpoint, check for
11218 a target-side condition that should be evaluated.
11219
11220 * mem-break.c: Include regcache.h and ax.h.
11221 (point_cond_list_t): New data structure.
11222 (breakpoint) <cond_list>: New field.
11223 (find_gdb_breakpoint_at): Make non-static.
11224 (delete_gdb_breakpoint_at): Clear any target-side
11225 conditions.
11226 (clear_gdb_breakpoint_conditions): New function.
11227 (add_condition_to_breakpoint): Likewise.
11228 (add_breakpoint_condition): Likewise.
11229 (gdb_condition_true_at_breakpoint): Likewise.
11230 (gdb_breakpoint_here): Return result directly instead
11231 of going through a local variable.
11232
11233 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11234 (clear_gdb_breakpoint_conditions): Likewise.
11235 (add_breakpoint_condition): Likewise.
11236 (gdb_condition_true_at_breakpoint): Likewise.
11237
11238 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11239 (need_step_over_p): Take target-side breakpoint condition into
11240 consideration.
11241
11242 2012-02-24 Luis Machado <lgustavo@codesourcery>
11243
11244 * server.h: Include tracepoint.h.
11245 (agent_mem_read, agent_get_trace_state_variable_value,
11246 agent_set_trace_state_variable_value,
11247 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11248 get_set_tsv_func_addr): New prototypes.
11249
11250 * ax.h: New include file.
11251 * ax.c: New source file.
11252
11253 * tracepoint.c: Include ax.h.
11254 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11255 agent_expr, eval_result_type): Move to ax.h.
11256 (parse_agent_expr): Rename to ...
11257 (gdb_parse_agent_expr): ... this, make it non-static and move
11258 to ax.h.
11259 (unparse_agent_expr) Rename to ...
11260 (gdb_unparse_agent_expr): ... this, make it non-static and move
11261 to ax.h.
11262 (eval_agent_expr): Rename to ...
11263 (eval_tracepoint_agent_expr): ... this.
11264 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11265 forward declarations.
11266 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11267 (agent_get_trace_state_variable_value): New function.
11268 (agent_set_trace_state_variable_value): New function.
11269 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11270 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11271 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11272 (condition_true_at_tracepoint): Likewise.
11273 (parse_agent_expr): Rename to ...
11274 (gdb_parse_agent_expr): ... this and move to ax.c.
11275 (unparse_agent_expr): Rename to ...
11276 (gdb_unparse_agent_expr): ... this and move to ax.c.
11277 (gdb_agent_op_name): Move to ax.c.
11278 (eval_agent_expr): Rename to ...
11279 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11280 and move to ax.c.
11281 (eval_tracepoint_agent_expr): New function.
11282 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11283 non-static.
11284 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11285 ax.c.
11286 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11287 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11288 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11289 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11290 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11291 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11292 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11293 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11294 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11295 (compile_bytecodes): Remove forward declaration.
11296 (is_goto_target): Move to ax.c.
11297 (compile_bytecodes): Move to ax.c and call
11298 agent_get_trace_state_variable_value (...) and
11299 agent_set_trace_state_variable_value (...).
11300
11301 * Makefile.in: Update ax.c and IPA dependencies.
11302
11303 2012-02-24 Pedro Alves <palves@redhat.com>
11304
11305 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11306 (cmd_bigqtbuffer_circular): ... this. Only handle
11307 'QTBuffer:circular:'.
11308 (handle_tracepoint_general_set): Adjust.
11309
11310 2012-02-16 Yao Qi <yao@codesourcery.com>
11311
11312 * inferiors.c: Move code to ...
11313 * dll.c: .... here. New.
11314 * server.h: Declare clear_dlls.
11315 * Makefile.in (SFILES): Add dll.c.
11316 (OBS): Add dll.o
11317 (dll.o): New rule.
11318
11319 2012-02-11 Yao Qi <yao@codesourcery.com>
11320
11321 * server.c: (handle_monitor_command): Add a new parameter
11322 `own_buf'.
11323 (handle_query): Update caller.
11324
11325 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11326
11327 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11328 * configure, config.in: Regenerate.
11329 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11330 is not defined.
11331
11332 2012-02-02 Pedro Alves <palves@redhat.com>
11333
11334 Try SIGKILL first, then PTRACE_KILL.
11335 * linux-low.c (linux_kill_one_lwp): New.
11336 (linux_kill_one_lwp): Rename to ...
11337 (kill_one_lwp_callback): ... this. Use the new
11338 linux_kill_one_lwp.
11339
11340 2012-02-02 Pedro Alves <palves@redhat.com>
11341
11342 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11343 inferior.
11344
11345 2012-01-27 Pedro Alves <palves@redhat.com>
11346
11347 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11348 (elf_64_file_p): Make static.
11349 (linux_pid_exe_is_elf_64_file): New.
11350 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11351 Delete declarations.
11352 (linux_pid_exe_is_elf_64_file): Declare.
11353 * linux-x86-low.c (x86_arch_setup): Use
11354 linux_pid_exe_is_elf_64_file.
11355
11356 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11357
11358 * linux-low.c (linux_wait_for_event_1): Rename to ...
11359 (linux_wait_for_event): ... here and merge it with former
11360 linux_wait_for_event - new variable wait_ptid, use it.
11361 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11362
11363 2012-01-23 Pedro Alves <palves@redhat.com>
11364
11365 * server.c (main): Avoid yet another case of infinite loop while
11366 detaching/killing after a longjmp.
11367
11368 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11369
11370 Code cleanup.
11371 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11372
11373 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11374
11375 * hostio.c (handle_readlink): New function.
11376 (handle_vFile): Call it to handle "vFile:readlink" packets.
11377
11378 2012-01-20 Pedro Alves <palves@redhat.com>
11379 Ulrich Weigand <ulrich.weigand@linaro.org>
11380
11381 * server.c (handle_v_requests): Only support vAttach and vRun to
11382 start multiple processes when in extended protocol mode.
11383
11384 2012-01-17 Pedro Alves <palves@redhat.com>
11385
11386 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11387 memalign plus mprotect to allocate the scratch buffer.
11388
11389 2012-01-13 Pedro Alves <palves@redhat.com>
11390
11391 * server.c (attach_inferior): Clear `cont_thread'.
11392
11393 2012-01-13 Pedro Alves <palves@redhat.com>
11394
11395 * server.c (main): Avoid infinite loop while detaching/killing
11396 after a longjmp.
11397
11398 2012-01-09 Doug Evans <dje@google.com>
11399
11400 * server.c (start_inferior): Set last_ptid in --wrapper case.
11401
11402 2012-01-06 Yao Qi <yao@codesourcery.com>
11403
11404 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11405 defined.
11406 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11407
11408 2012-01-04 Yao Qi <yao@codesourcery.com>
11409
11410 * tracepoint.c (cmd_qtdp): Print debug message
11411 for static tracepoint.
11412
11413 2012-01-04 Yao Qi <yao@codesourcery.com>
11414
11415 * tracepoint.c (trace_vdebug): Differentiate debug message
11416 between gdbserver and IPA.
11417
11418 2012-01-03 Yao Qi <yao@codesourcery.com>
11419
11420 * tracepoint.c (tracepoint_was_hit): Don't collect for
11421 static tracepoint.
11422
11423 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11424
11425 * terminal.h: Reformat copyright header.
11426
11427 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11428
11429 * server.c (gdbserver_version): Update copyright year.
11430 * gdbreplay.c (gdbreplay_version): Likewise.
11431
11432 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11433
11434 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11435
11436 Revert:
11437 2011-12-18 Hui Zhu <teawater@gmail.com>
11438 * linux-low.c (linux_create_inferior): Save return value to ret.
11439
11440 2011-12-18 Hui Zhu <teawater@gmail.com>
11441
11442 * linux-low.c (linux_create_inferior): Save return value to ret.
11443
11444 2011-12-16 Doug Evans <dje@google.com>
11445
11446 * linux-low.c (linux_create_inferior): If stdio connection,
11447 redirect stdin from /dev/null, stdout to stderr.
11448 * remote-utils.c (remote_is_stdio): New static global.
11449 (remote_connection_is_stdio): New function.
11450 (remote_prepare): Handle stdio connection.
11451 (remote_open): Ditto.
11452 (remote_close): Don't close stdin for stdio connections.
11453 (read_prim,write_prim): New functions. Replace all calls to
11454 read/write to these.
11455 * server.c (main): Watch for "-" argument. Move call to
11456 remote_prepare before start_inferior.
11457 * server.h (STDIO_CONNECTION_NAME): New macro.
11458 (remote_connection_is_stdio): Declare.
11459
11460 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11461 in debugging output.
11462
11463 2011-12-15 Yao Qi <yao@codesourcery.com>
11464
11465 * tracepoint.c: Include sys/syscall.h.
11466 (gdb_ust_thread): Remove preprocessor conditional.
11467
11468 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11469
11470 * linux-low.c (linux_detach_one_lwp): Call
11471 the_low_target.prepare_to_resume before detaching.
11472
11473 2011-12-14 Yao Qi <yao@codesourcery.com>
11474
11475 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11476 of write.
11477
11478 2011-12-14 Yao Qi <yao@codesourcery.com>
11479
11480 * i386-low.c (i386_low_stopped_data_address): Initialize local
11481 variable `control'.
11482
11483 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11484
11485 PR remote/13492
11486
11487 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11488 DR_CONTROL unless necessary. Extend comments.
11489 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11490 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11491
11492 2011-12-13 Yao Qi <yao@codesourcery.com>
11493
11494 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11495 macros.
11496 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11497
11498 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11499
11500 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11501 Print new debug message for such case.
11502
11503 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11504
11505 Fix overlapping memcpy.
11506 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11507 the read_inferior_memory transfer.
11508 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11509 write_inferior_memory transfer.
11510 (set_fast_tracepoint_jump): New variable buf. Use it for the
11511 read_inferior_memory and write_inferior_memory transfers.
11512 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11513 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11514 Use it for the write_inferior_memory transfer.
11515 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11516 buffers.
11517
11518 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11519
11520 * linux-low.c (fetch_register, store_register): Make code
11521 consistent, fix formatting.
11522
11523 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11524
11525 * linux-low.c (usr_store_inferior_registers): Factor out code
11526 to handle individual registers into...
11527 (store_register): ... this new function.
11528
11529 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11530
11531 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11532 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11533 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11534 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11535 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11536 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11537 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11538 (srv_xmlfiles): Add new XML files.
11539
11540 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11541 and <sys/uio.h>.
11542 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11543 (init_registers_s390_linux32v1): Add prototype.
11544 (init_registers_s390_linux32v2): Likewise.
11545 (init_registers_s390_linux64v1): Likewise.
11546 (init_registers_s390_linux64v2): Likewise.
11547 (init_registers_s390x_linux64v1): Likewise.
11548 (init_registers_s390x_linux64v2): Likewise.
11549 (s390_num_regs): Increment to 52.
11550 (s390_regmap): Add orig_r2 register.
11551 (s390_num_regs_3264): Increment to 68.
11552 (s390_regmap_3264): Add orig_r2 register.
11553 (s390_collect_ptrace_register): Handle orig_r2 register.
11554 (s390_supply_ptrace_register): Likewise.
11555 (s390_fill_last_break): New function.
11556 (s390_store_last_break): Likewise.
11557 (s390_fill_system_call): New function.
11558 (s390_store_system_call): Likewise.
11559 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11560 register sets.
11561 (s390_check_regset): New function.
11562 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11563 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11564 Update target_regsets for available register sets.
11565
11566 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11567 Jan Kratochvil <jan.kratochvil@redhat.com>
11568
11569 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11570 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11571 New.
11572 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11573 * linux-low.h (struct process_info_private): New member r_debug.
11574 * server.c (handle_qxfer_libraries): Call
11575 the_target->qxfer_libraries_svr4.
11576 (handle_qxfer_libraries_svr4): New function.
11577 (qxfer_packets): New entry "libraries-svr4".
11578 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11579 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11580 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11581 PACKET_qXfer_libraries_svr4.
11582
11583 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11584
11585 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11586 PSW address/mask between 8-byte and 16-byte formats.
11587 (s390_supply_ptrace_register): Likewise.
11588 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11589 basic addressing mode bit.
11590
11591 2011-11-24 Stan Shebs <stan@codesourcery.com>
11592
11593 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11594
11595 2011-11-17 Stan Shebs <stan@codesourcery.com>
11596
11597 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11598 (tracing_start_time): New global.
11599 (tracing_stop_time): New global.
11600 (tracing_user_name): New global.
11601 (tracing_notes): New global.
11602 (tracing_stop_note): New global.
11603 (cmd_qtstart): Set traceframe_usage, start_time.
11604 (stop_tracing): Set stop_time.
11605 (cmd_qtstatus): Report additional status.
11606 (cmd_qtp): New function.
11607 (handle_tracepoint_query): Call it.
11608 (cmd_qtnotes): New function.
11609 (handle_tracepoint_general_set): Call it.
11610 (get_timestamp): Rename from tsv_get_timestamp.
11611
11612 2011-11-14 Stan Shebs <stan@codesourcery.com>
11613 Kwok Cheung Yeung <kcy@codesourcery.com>
11614
11615 * linux-x86-low.c (small_jump_insn): New.
11616 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11617 trampoline and error message, build a trampoline and issue a small
11618 jump instruction to it.
11619 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11620 trampoline and error message.
11621 (x86_get_min_fast_tracepoint_insn_len): New.
11622 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11623 * linux-low.h (struct linux_target_ops): Add arguments to
11624 install_fast_tracepoint_jump_pad operation, add new operation.
11625 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11626 arguments.
11627 (linux_get_min_fast_tracepoint_insn_len): New function.
11628 (linux_target_op): Add new operation.
11629 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11630 (gdb_trampoline_buffer_end): Ditto.
11631 (gdb_trampoline_buffer_error): Ditto.
11632 (struct ipa_sym_addresses): Add fields for new IPA variables.
11633 (symbol_list): Add entries for new IPA variables.
11634 (struct tracepoint): Add fields to hold the address range of the
11635 trampoline used by the tracepoint.
11636 (trampoline_buffer_head): New static variable.
11637 (trampoline_buffer_tail): Ditto.
11638 (claim_trampoline_space): New function.
11639 (have_fast_tracepoint_trampoline_buffer): New function.
11640 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11641 structure.
11642 (install_fast_tracepoint): Ditto, also add error buffer argument.
11643 (cmd_qtminftpilen): New function.
11644 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11645 (fast_tracepoint_from_trampoline_address): New function.
11646 (fast_tracepoint_collecting): Handle trampoline as part of jump
11647 pad space.
11648 (set_trampoline_buffer_space): New function.
11649 (initialize_tracepoint): Initialize new IPA variables.
11650 * target.h (struct target_ops): Add arguments to
11651 install_fast_tracepoint_jump_pad operation, add new
11652 get_min_fast_tracepoint_insn_len operation.
11653 (target_get_min_fast_tracepoint_insn_len): New.
11654 (install_fast_tracepoint_jump_pad): Add arguments.
11655 * server.h (IPA_BUFSIZ): Define.
11656 * linux-i386-ipa.c: Include extra header files.
11657 (initialize_fast_tracepoint_trampoline_buffer): New function.
11658 (initialize_low_tracepoint): Call it.
11659 * server.h (set_trampoline_buffer_space): Declare.
11660 (claim_trampoline_space): Ditto.
11661 (have_fast_tracepoint_trampoline_buffer): Ditto.
11662
11663 2011-11-14 Yao Qi <yao@codesourcery.com>
11664
11665 * server.c (handle_query): Handle InstallInTrace for qSupported.
11666 * tracepoint.c (add_tracepoint): Sort list.
11667 (install_tracepoint, download_tracepoint): New.
11668 (cmd_qtdp): Call them to install and download tracepoints.
11669 (sort_tracepoints): Removed.
11670 (cmd_qtstart): Update.
11671
11672 2011-11-14 Yao Qi <yao@codesourcery.com>
11673
11674 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11675 * mem-break.h: Declare.
11676 * tracepoint.c (cmd_qtstart): Move some code to ...
11677 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11678 New.
11679 (download_tracepoints): Move some code to ...
11680 (download_tracepoint_1): ... here. New.
11681
11682 2011-11-08 Yao Qi <yao@codesourcery.com>
11683
11684 * remote-utils.c (relocate_instruction): A comment fix.
11685
11686 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11687
11688 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11689 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11690 dr_status_mirror and dr_control_mirror from debug_reg_state.
11691 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11692 (i386_initial_stuff): Remove use of deleted globals.
11693 (i386_get_thread_context, i386_set_thread_context,
11694 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11695 from debug_reg_state.
11696
11697 2011-11-05 Yao Qi <yao@codesourcery.com>
11698
11699 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11700 address as TPOINT's.
11701
11702 2011-11-02 Stan Shebs <stan@codesourcery.com>
11703
11704 * tracepoint.c (agent_mem_read_string): New function.
11705 (eval_agent_expr): Call it for tracenz.
11706 * server.c (handle_query): Report support for tracenz.
11707
11708 2011-11-02 Yao Qi <yao@codesourcery.com>
11709
11710 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11711
11712 2011-11-02 Yao Qi <yao@codesourcery.com>
11713
11714 * target.h: Fix a typo in comment.
11715
11716 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11717
11718 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11719 clobber the breakpoints' shadows with fast tracepoint jumps.
11720 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11721 * target.c (write_inferior_memory): Also pass MYADDR down to
11722 check_mem_write.
11723
11724 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11725
11726 * configure.ac: Check support for personality routine.
11727 * configure: Regenerate.
11728 * config.in: Likewise.
11729 * linux-low.c: Include <sys/personality.h>.
11730 Define ADDR_NO_RANDOMIZE if necessary.
11731 (linux_create_inferior): Disable address space randomization when
11732 forking inferior, if requested.
11733 (linux_supports_disable_randomization): New function.
11734 (linux_target_ops): Install it.
11735 * server.h (disable_randomization): Declare.
11736 * server.c (disable_randomization): New global variable.
11737 (handle_general_set): Handle QDisableRandomization.
11738 (handle_query): Likewise for qSupported.
11739 (main): Support --disable-randomization and --no-disable-randomization
11740 command line arguments.
11741 * target.h (struct target_ops): Add supports_disable_randomization.
11742 (target_supports_disable_randomization): New macro.
11743
11744 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11745
11746 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11747 ifdef check.
11748 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11749 [!PT_GETDSBT] (target_loadmap): New definition.
11750 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11751 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11752 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11753 and PT_GETDSBT to LINUX_LOADMAP.
11754 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11755 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11756
11757 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11758
11759 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11760 (arm_linux_hwbp_cap): New static variable.
11761 (arm_linux_get_hwbp_cap): Replace by ...
11762 (arm_linux_init_hwbp_cap): ... this new function.
11763 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11764 (arm_linux_get_hw_watchpoint_count): Likewise.
11765 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11766 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11767 (arm_prepare_to_resume): Use perror_with_name instead of error.
11768
11769 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11770
11771 * linux-arm-low.c: Include <signal.h>.
11772 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11773 (struct arm_linux_hwbp_cap): New data type.
11774 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11775 (struct arm_linux_hw_breakpoint): New data type.
11776 (MAX_BPTS, MAX_WPTS): Define.
11777 (struct arch_process_info, struct arch_lwp_info): New data types.
11778 (arm_linux_get_hwbp_cap): New function.
11779 (arm_linux_get_hw_breakpoint_count): Likewise.
11780 (arm_linux_get_hw_watchpoint_count): Likewise.
11781 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11782 (arm_hwbp_control_initialize): Likewise.
11783 (arm_hwbp_control_is_enabled): Likewise.
11784 (arm_hwbp_control_is_initialized): Likewise.
11785 (arm_hwbp_control_disable): Likewise.
11786 (arm_linux_hw_breakpoint_equal): Likewise.
11787 (arm_linux_hw_point_initialize): Likewise.
11788 (struct update_registers_data): New data structure.
11789 (update_registers_callback: New function.
11790 (arm_insert_point): Likewise.
11791 (arm_remove_point): Likewise.
11792 (arm_stopped_by_watchpoint): Likewise.
11793 (arm_stopped_data_address): Likewise.
11794 (arm_new_process): Likewise.
11795 (arm_new_thread): Likewise.
11796 (arm_prepare_to_resume): Likewise.
11797 (the_low_target): Register arm_insert_point, arm_remove_point,
11798 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11799 arm_new_thread, and arm_prepare_to_resume.
11800
11801 2011-09-15 Stan Shebs <stan@codesourcery.com>
11802
11803 * server.h (struct emit_ops): Add compare-goto fields.
11804 * tracepoint.c (gdb_agent_op_sizes): New table.
11805 (emit_eq_goto): New function.
11806 (emit_ne_goto): New function.
11807 (emit_lt_goto): New function.
11808 (emit_le_goto): New function.
11809 (emit_gt_goto): New function.
11810 (emit_ge_goto): New function.
11811 (is_goto_target): New function.
11812 (compile_bytecodes): Recognize special cases of compare-goto
11813 combinations and call specialized emitters for them.
11814 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11815 (amd64_emit_ne_goto): New function.
11816 (amd64_emit_lt_goto): New function.
11817 (amd64_emit_le_goto): New function.
11818 (amd64_emit_gt_goto): New function.
11819 (amd64_emit_ge_goto): New function.
11820 (amd64_emit_ops): Add the new functions.
11821 (i386_emit_eq_goto): New function.
11822 (i386_emit_ne_goto): New function.
11823 (i386_emit_lt_goto): New function.
11824 (i386_emit_le_goto): New function.
11825 (i386_emit_gt_goto): New function.
11826 (i386_emit_ge_goto): New function.
11827 (i386_emit_ops): Add the new functions.
11828
11829 2011-09-08 Stan Shebs <stan@codesourcery.com>
11830
11831 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11832 (i386_emit_epilogue): Restore %ebx.
11833
11834 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11835
11836 * server.c (step_thread): Remove definition.
11837 (process_serial_event): Don't handle Hs.
11838 * server.h (step_thread): Remove declaration.
11839 * target.c (set_desired_inferior): Remove use of step_thread.
11840
11841 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11842
11843 * linux-low.c: Include linux-procfs.h.
11844 (linux_attach_lwp_1): Update comments.
11845 (linux_attach): Scan for existing threads when attaching to a
11846 process that is the tgid.
11847 * Makefile.in: Update dependencies.
11848
11849 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11850
11851 * configure.srv: Add linux-procfs.o dependencies.
11852
11853 2011-08-14 Yao Qi <yao@codesourcery.com>
11854
11855 * target.h (struct target_ops): Fix indent.
11856 * win32-low.c (win32_target_ops): Fix comment.
11857
11858 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11859 Yao Qi <yao@codesourcery.com>
11860
11861 * Makefile.in (clean): Remove tic6x-*.c files.
11862 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11863 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11864 (tic6x-c64xp-linux.c): Likewise.
11865 * configure.srv: Add support for tic6x-*-uclinux.
11866 * linux-tic6x-low.c: New.
11867 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11868
11869 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11870 Yao Qi <yao@codesourcery.com>
11871
11872 * target.h (struct target_ops): Add read_loadmap.
11873 * linux-low.c (struct target_loadseg): New type.
11874 (struct target_loadmap): New type.
11875 (linux_read_loadmap): New function.
11876 (linux_target_ops): Add linux_read_loadmap.
11877 * server.c (handle_query): Support qXfer:fdpic:read packet.
11878 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11879 to NULL.
11880
11881 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11882
11883 * win32-low.c: Include <stdint.h>.
11884
11885 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11886
11887 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11888 to the inferior here.
11889 (i386_remove_aligned_watchpoint): Ditto.
11890 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11891 fit part of the watchpoint in the debug registers.
11892 (i386_update_inferior_debug_regs): New.
11893 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11894 registers, and only update the inferior on success.
11895 (i386_low_remove_watchpoint): Ditto.
11896
11897 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11898
11899 * linux-low.c (compare_ints, unique, list_threads, show_process,
11900 linux_core_of_thread): Delete.
11901 (linux_target_ops): Change linux_core_of_thread to
11902 linux_common_core_of_thread.
11903 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11904 * utils.c (malloc_failure): Change type of argument.
11905 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11906 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11907 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11908 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11909 (IPA_OBJS): Add common-utils-ipa.o.
11910 (ptid_h, linux_osdata_h): New macros.
11911 (server_h): Add common/common-utils.h, common/xml-utils.h,
11912 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11913 common/ptid.h.
11914 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11915 ptid.o, buffer.o): New rules.
11916 (linux-low.o): Add common/linux-osdata.h as a dependency.
11917 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11918 * configure.ac: Add AC_HEADER_DIRENT check.
11919 * config.in: Regenerate.
11920 * configure: Regenerate.
11921 * remote-utils.c (xml_escape_text): Delete.
11922 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11923 buffer_xml_printf): Move to common/buffer.c.
11924 * server.c (main): Remove call to initialize_inferiors.
11925 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11926 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11927 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11928 internal_error, gdb_assert, gdb_assert_fail): Delete.
11929 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11930 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11931 common/buffer.h.
11932 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11933 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11934 initialize_inferiors): Delete.
11935
11936 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11937
11938 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11939 symbol error.
11940
11941 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11942
11943 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11944 assertion.
11945 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11946
11947 2011-05-26 Yao Qi <yao@codesourcery.com>
11948
11949 * Makefile.in (thread-db.o): Track dependence to
11950 common/gdb_thread_db.h.
11951 * thread-db.c: include gdb_thread_db.h from right place.
11952
11953 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11954
11955 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11956 __FILE__ and __LINE__ to internal_error.
11957
11958 2011-05-13 Doug Evans <dje@google.com>
11959
11960 * thread-db.c (try_thread_db_load_from_sdir): New function.
11961 (try_thread_db_load_from_dir): New function.
11962 (thread_db_load_search): Handle $sdir, ignore $pdir.
11963 Remove trying of system directories if search of
11964 libthread-db-search-path fails, that is now done via $sdir.
11965
11966 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11967
11968 * server.c (handle_query): Add EnableDisableTracepoints to the list
11969 of supported features.
11970 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11971 tracepoints.
11972 (cmd_qtenable_disable): New.
11973 (cmd_qtstart): Install tracepoints even if disabled.
11974 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11975 receiving a QTEnable or QTDisable packet.
11976 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11977 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11978 tracepoints.
11979 (gdb_probe): Skip data collection if static tracepoint is disabled.
11980
11981 2011-05-10 Doug Evans <dje@google.com>
11982
11983 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11984
11985 2011-05-04 Doug Evans <dje@google.com>
11986
11987 * linux-low.c (linux_join): Skip process lookup.
11988 * spu-low.c (spu_join): Ditto.
11989 * server.c (join_inferiors_callback): Delete.
11990 (process_serial_event): For 'D' packet (detach) call join_inferior
11991 directly.
11992
11993 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11994
11995 * README: Don't mention xscale*-*-linux*.
11996 * configure.srv (xscale*-*-linux*): Don't handle target.
11997
11998 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11999
12000 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12001 casting pointers.
12002 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12003 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12004 (i386_emit_void_call_2): Likewise.
12005
12006 2011-04-26 Yao Qi <yao@codesourcery.com>
12007
12008 * linux-low.c: Move common macros to linux-ptrace.h.
12009 Include linux-ptrace.h.
12010 * Makefile.in (linux_ptrace_h): New.
12011 (linux-low.o): Depends on linux-ptrace.h.
12012
12013 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12014
12015 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12016 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12017 (remote_prepare): New function with most of the TCP code from ...
12018 (remote_open): ... here. Detect PORT here unconditionally. Move also
12019 setting transport_is_reliable.
12020 * server.c (run_once): New variable.
12021 (gdbserver_usage): Document it.
12022 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12023 the first run if RUN_ONCE.
12024 * server.h (run_once, remote_prepare): New declarations.
12025
12026 2011-04-19 Tom Tromey <tromey@redhat.com>
12027
12028 * win32-low.c (handle_load_dll): Remove duplicate "the".
12029
12030 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12031
12032 Remove support for old Cygwin 1.5 versions.
12033 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12034 function to avoid warning.
12035 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12036 warning.
12037
12038 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12039
12040 * gdbserver/server.h (Macro _): Define it if not available.
12041
12042 2011-03-14 Michael Snyder <msnyder@vmware.com>
12043
12044 * hostio.c (handle_close): Remove unnecessary null test.
12045
12046 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12047
12048 * Makefile.in (maintainer-clean realclean distclean): Remove
12049 "make ... subdir_do" command.
12050
12051 2011-03-10 Michael Snyder <msnyder@vmware.com>
12052
12053 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12054
12055 * server.c (handle_v_run): Free alloced buffer on early return.
12056
12057 2011-03-09 Yao Qi <yao@codesourcery.com>
12058
12059 Revert:
12060 2011-03-04 Yao Qi <yao@codesourcery.com>
12061
12062 * Makefile.in: Remove GNU make feature --directory.
12063
12064 2011-03-05 Yao Qi <yao@codesourcery.com>
12065
12066 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12067 (subdir_do): New make target. Copied from gdb/Makefile.
12068 (maintainer-clean, realclean, distclean, clean): Call corresponding
12069 make targets in common/Makefile.
12070
12071 2011-02-11 Yao Qi <yao@codesourcery.com>
12072
12073 * configure.ac: Call AC_PROG_RANLIB.
12074 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12075 * configure: Regenerate.
12076
12077 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12078
12079 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12080
12081 2011-03-06 Yao Qi <yao@codesourcery.com>
12082
12083 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12084
12085 2011-03-05 Yao Qi <yao@codesourcery.com>
12086
12087 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12088 (subdir_do): New make target. Copied from gdb/Makefile.
12089 (maintainer-clean, realclean, distclean, clean): Call corresponding
12090 make targets in common/Makefile.
12091
12092 2011-03-04 Yao Qi <yao@codesourcery.com>
12093
12094 * Makefile.in: Remove GNU make feature --directory.
12095
12096 2011-03-04 Michael Snyder <msnyder@vmware.com>
12097
12098 * server.c (queue_stop_reply): Call xmalloc not malloc.
12099
12100 2011-03-02 Michael Snyder <msnyder@vmware.com>
12101
12102 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12103
12104 2011-02-28 Michael Snyder <msnyder@vmware.com>
12105
12106 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12107 (cmd_qtframe): Ditto.
12108 (cmd_qtbuffer): Ditto.
12109 (cmd_bigqtbuffer): Ditto.
12110
12111 * utils.c (decimal2str): Initialize 'width' to nine, then
12112 don't mess with it.
12113
12114 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12115
12116 * hostio.c (require_data): Free *data, not data.
12117
12118 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12119
12120 * hostio.c (require_data): Use free, not xfree.
12121
12122 2011-02-27 Michael Snyder <msnyder@vmware.com>
12123
12124 * server.c (handle_query): Discard unused value.
12125
12126 * hostio.c (require_data): Free malloc memory before returning
12127 error.
12128
12129 2011-02-26 Michael Snyder <msnyder@vmware.com>
12130
12131 * linux-low.c (list_threads): Call closedir for dirent.
12132
12133 2011-02-27 Michael Snyder <msnyder@vmware.com>
12134
12135 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12136 a case statement falls through.
12137
12138 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12139
12140 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12141 in comparison.
12142
12143 2011-02-26 Michael Snyder <msnyder@vmware.com>
12144
12145 * utils.c (decimal2str): Eliminate dead code and dead param.
12146 (pulongest): Drop dead param from call to decimal2str.
12147 (plongest): Ditto.
12148
12149 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12150
12151 Revert the following patch (not approved yet):
12152 2011-02-21 Hui Zhu <teawater@gmail.com>
12153 * tracepoint.c (tp_printf): New function.
12154 (eval_agent_expr): Handle gdb_agent_op_printf.
12155
12156 2011-02-21 Hui Zhu <teawater@gmail.com>
12157
12158 * tracepoint.c (tp_printf): New function.
12159 (eval_agent_expr): Handle gdb_agent_op_printf.
12160
12161 2011-02-18 Tom Tromey <tromey@redhat.com>
12162
12163 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12164 (tracepoint.o): Likewise.
12165 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12166 (gdb_agent_op_names): Likewise.
12167
12168 2011-02-18 Tom Tromey <tromey@redhat.com>
12169
12170 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12171 gdb_agent_op_rot>: New constants.
12172 (gdb_agent_op_names): Add pick and roll.
12173 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12174 cases.
12175
12176 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12177
12178 * aclocal.m4: Regenerated with aclocal-1.11.1.
12179
12180 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12181
12182 * server.c (handle_qxfer_traceframe_info): New.
12183 (qxfer_packets): Register "traceframe-info".
12184 (handle_query): Report support for qXfer:traceframe-info:read+.
12185 * tracepoint.c (match_blocktype): New.
12186 (traceframe_find_block_type): Rename to ...
12187 (traceframe_walk_blocks): ... this. Add callback filter argument,
12188 and use it.
12189 (traceframe_find_block_type): New, reimplemented on top of
12190 traceframe_walk_blocks.
12191 (build_traceframe_info_xml): New.
12192 (traceframe_read_info): New.
12193 * server.h (traceframe_read_info): Declare.
12194
12195 2011-02-11 Yao Qi <yao@codesourcery.com>
12196
12197 * configure.ac: Call AC_PROG_RANLIB.
12198 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12199 * configure: Regenerate.
12200
12201 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12202
12203 * server.c (gdb_read_memory): Change return semantics to allow
12204 partial transfers.
12205 (handle_search_memory_1): Adjust.
12206 (process_serial_event) <'m' packet>: Handle partial transfers.
12207 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12208
12209 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12210
12211 * regcache.c (init_register_cache): Initialize
12212 regcache->register_status.
12213 (free_register_cache): Release regcache->register_status.
12214 (regcache_cpy): Copy register_status.
12215 (registers_to_string): Print 'x's for unavailable registers.
12216 (supply_register): Mark the register's status valid or
12217 unavailable, depending on whether a buffer was passed in or not.
12218 (supply_register_zeroed): New.
12219 (supply_regblock): Mark the registers' status valid or
12220 unavailable, depending on whether a buffer was passed in or not.
12221 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12222 (struct regcache): New `register_status' field.
12223 (supply_register_zeroed): Declare.
12224 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12225 supply_register_zeroed, rather than passing a NULL buffer to
12226 supply_register.
12227 * tracepoint.c (fetch_traceframe_registers): Update comment.
12228
12229 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12230
12231 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12232 buffer explicit.
12233
12234 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12235
12236 * server.h (decode_xfer_write): Change prototype.
12237 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12238 and don't extract the annex here.
12239 * server.c (decode_xfer_read): Remove `annex' parameter,
12240 and don't extract the annex here.
12241 (decode_xfer): New.
12242 (struct qxfer): New.
12243 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12244 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12245 (handle_qxfer_statictrace): New functions, abstracted out from
12246 handle_query, and made to use the struct qxfer interface.
12247 (handle_threads_qxfer_proper): Rename to ...
12248 (handle_qxfer_threads_proper): ... this.
12249 (handle_threads_qxfer): Rename to ...
12250 (handle_qxfer_threads): ... this. Adjust.
12251 (qxfer_packets): New array.
12252 (handle_qxfer): New function.
12253 (handle_query): Use handle_qxfer.
12254
12255 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12256
12257 * gdbreplay.c: Shorten lines of >= 80 columns.
12258 * linux-low.c: Ditto.
12259 * linux-ppc-low.c: Ditto.
12260 * linux-s390-low.c: Ditto.
12261 * linux-sparc-low.c: Ditto.
12262 * linux-x86-low.c: Ditto.
12263 * linux-xtensa-low.c: Ditto.
12264 * mem-break.c: Ditto.
12265 * nto-low.c: Ditto.
12266 * regcache.h: Ditto.
12267 * remote-utils.c: Ditto.
12268 * server.c: Ditto.
12269 * server.h: Ditto.
12270 * thread-db.c: Ditto.
12271 * tracepoint.c: Ditto.
12272 * utils.c: Ditto.
12273 * win32-low.h: Ditto.
12274
12275 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12276
12277 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12278 update.
12279
12280 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12281
12282 * server.c (gdbserver_version): Update copyright year in version
12283 output.
12284 * gdbreplay.c (gdbreplay_version): Ditto.
12285
12286 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12287
12288 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12289 * linux-bfin-low.c: New file.
12290 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12291 PT_DATA_ADDR for BFIN targets.
12292 * Makefile.in (SFILES): Add linux-bfin-low.c.
12293 (clean): Remove reg-bfin.c.
12294 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12295 * README: Mention supported Blackfin targets.
12296
12297 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12298
12299 * .gitignore: New file.
12300
12301 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12302
12303 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12304
12305 2010-10-22 Jie Zhang <jie@codesourcery.com>
12306
12307 * Makefile.in: Add FLAGS_TO_PASS variable.
12308 (install): Remove dependency of install-only and recursively
12309 invoke make for install-only.
12310
12311 2010-10-04 Doug Evans <dje@google.com>
12312
12313 * Makefile.in (uninstall): Use $(DESTDIR).
12314
12315 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12316
12317 PR gdb/11842
12318
12319 * linux-x86-low.c (compat_siginfo_from_siginfo)
12320 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12321 si_code is < 0. Check for si_code == SI_TIMER before checking for
12322 si_code < 0.
12323
12324 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12325
12326 * lynx-i386-low.c: New file.
12327 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12328
12329 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12330
12331 * lynx-low.c (ptrace_request_to_str): Remove handling for
12332 request values that have been removed in LynxOS 5.x.
12333
12334 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12335
12336 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12337 <ptrace.h>
12338
12339 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12340
12341 * configure.ac: Add --enable-inprocess-agent option.
12342 * configure: Rebuilt.
12343
12344 2010-09-06 Yao Qi <yao@codesourcery.com>
12345
12346 * linux-low.c (linux_kill): Remove unused variable.
12347 (linux_stabilize_threads): Likewise.
12348 * server.c (start_inferior): Likewise.
12349 (queue_stop_reply_callback): Likewise.
12350 * tracepoint.c (do_action_at_tracepoint): Likewise.
12351
12352 2010-09-06 Yao Qi <yao@codesourcery.com>
12353
12354 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12355 on return.
12356
12357 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12358
12359 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12360
12361 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12362
12363 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12364 "$(IPA_DEPFILES)".
12365
12366 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12367
12368 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12369 gdbserver/lynx-ppc-low.c: New files.
12370 * Makefile.in (lynx_low_h): New variable.
12371 (lynx-low.o, lynx-ppc-low.o): New rules.
12372 * configure.ac: On LynxOS, link with -lnetinet.
12373 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12374 * configure: regenerate.
12375
12376 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12377
12378 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12379 * configure.ac: Add check for vasprintf and vsnprintf.
12380 * configure, config.in: Regenerate.
12381 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12382
12383 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12384
12385 * gdbreplay.c: Move include of alloca.h up, next to include of
12386 malloc.h.
12387 * server.h: Add include of malloc.h.
12388 * mem-break.c: Remove include of malloc.h.
12389 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12390
12391 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12392
12393 * Makefile.in (memmem.o): Build with -Wno-error.
12394
12395 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12396
12397 * utils.c (xsnprintf): Make non-static.
12398 * server.h: Add xsnprintf declaration.
12399 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12400 replace calls to snprintf by calls to xsnprintf throughout.
12401
12402 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12403
12404 * configure.ac: Add configure check for alloca.
12405 * configure, config.in: Regenerate.
12406 * server.h: Include alloca.h if it exists.
12407 * gdbreplay.c: Include alloca.h if it exists.
12408
12409 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12410
12411 * linux-low.c (__SIGRTMIN): Define if not already defined.
12412 (linux_create_inferior): Check for __ANDROID__ rather than
12413 __SIGRTMIN.
12414 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12415 are already deferred.
12416 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12417 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12418 stopped and already has a pending signal to report.
12419 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12420 a pending signal to report or is moving out of a jump pad.
12421 (linux_init_signals): Check for __ANDROID__ rather than
12422 __SIGRTMIN.
12423
12424 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12425
12426 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12427 debug_threads check. Avoid a linear search when not doing debug
12428 output.
12429
12430 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12431
12432 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12433 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12434 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12435 (process_event): Change local fd's type to gdb_fildes_t.
12436 (create_file_handler): Adjust prototype.
12437 (delete_file_handler): Adjust prototype.
12438 (handle_file_event): Adjust prototype. Use pfildes.
12439 (create_file_event): Adjsut prototype.
12440 * remote-utils.c (remote_desc, listen_desc): Change type to
12441 gdb_fildes_t.
12442 * server.h: New gdb_fildes_t typedef.
12443 [USE_WIN32API]: Include winsock2.h.
12444 (delete_file_handler, add_file_handler): Adjust prototypes.
12445 (pfildes): Declare.
12446 * utils.c (pfildes): New.
12447
12448 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12449
12450 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12451 * configure: Regenerate.
12452
12453 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12454
12455 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12456 (linux_done_accessing_memory): ... this.
12457 (linux_target_ops): Adjust.
12458 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12459 * nto-low.c (nto_target_ops): Adjust comment.
12460 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12461 * spu-low.c (spu_target_ops): Adjust comment.
12462 * target.h (target_ops): Rename unprepare_to_access_memory field
12463 to done_accessing_memory.
12464 (unprepare_to_access_memory): Rename to ...
12465 (done_accessing_memory): ... this.
12466
12467 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12468
12469 * linux-low.c (linux_prepare_to_access_memory): New.
12470 (linux_unprepare_to_access_memory): New.
12471 (linux_target_ops): Install them.
12472 * server.c (read_memory): Rename to ...
12473 (gdb_read_memory): ... this. Use
12474 prepare_to_access_memory/prepare_to_access_memory.
12475 (write_memory): Rename to ...
12476 (gdb_write_memory): ... this. Use
12477 prepare_to_access_memory/prepare_to_access_memory.
12478 (handle_search_memory_1): Adjust.
12479 (process_serial_event): Adjust.
12480 * target.h (struct target_ops): New fields
12481 prepare_to_access_memory and unprepare_to_access_memory.
12482 (prepare_to_access_memory, unprepare_to_access_memory): New.
12483 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12484 prepare_to_access_memory/prepare_to_access_memory.
12485 * nto-low.c (nto_target_ops): Adjust.
12486 * spu-low.c (spu_target_ops): Adjust.
12487 * win32-low.c (win32_target_ops): Adjust.
12488
12489 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12490
12491 * Makefile.in (WARN_CFLAGS): Get it from configure.
12492 (WERROR_CFLAGS): New.
12493 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12494 * configure.ac: Introduce --enable-werror, which adds -Werror to
12495 the compiler command line. Enabled by default. Disable with
12496 --disable-werror. Add -Wdeclaration-after-statement
12497 Wpointer-arith and -Wformat-nonliteral to warning flags.
12498 * configure: Regenerate.
12499
12500 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12501
12502 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12503
12504 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12505
12506 * gdbreplay.c (remote_error): New.
12507 (gdbchar): New.
12508 (expect): Use gdbchar. Check for error reading from GDB.
12509 Clarify sync error output.
12510 (play): Check for errors writing to GDB.
12511 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12512 * remote-utils.c (getpkt): Check for errors writing to the remote
12513 descriptor.
12514
12515 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12516
12517 * linux-low.c (linux_wait_1): Move non-debugging code out of
12518 `debug_threads' control.
12519
12520 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12521
12522 * linux-low.c (linux_wait_1): Don't set last_status here.
12523 * server.c (push_event, queue_stop_reply_callback): Assert we're
12524 not pushing a TARGET_WAITKIND_IGNORE event.
12525 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12526 (myresume, handle_target_event): Set the thread's last_resume_kind
12527 and last_status from the target returned status.
12528
12529 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12530
12531 PR threads/10729
12532
12533 * linux-x86-low.c (update_debug_registers_callback): New.
12534 (i386_dr_low_set_addr): Use it.
12535 (i386_dr_low_get_addr): New.
12536 (i386_dr_low_set_control): Use update_debug_registers_callback.
12537 (i386_dr_low_get_control): New.
12538 (i386_dr_low_get_status): Adjust.
12539 * linux-low.c (linux_stop_lwp): New.
12540 * linux-low.h (linux_stop_lwp): Declare.
12541
12542 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12543 argument instead of a i386_debug_reg_state.
12544 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12545 a i386_debug_reg_state.
12546 (i386_insert_aligned_watchpoint): Adjust.
12547 (i386_remove_aligned_watchpoint): Adjust.
12548 (i386_low_stopped_data_address): Read the debug registers from the
12549 inferior instead of from the mirrors.
12550 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12551 (i386_dr_low_get_addr): Declare.
12552 (i386_dr_low_get_control): Declare.
12553 (i386_dr_low_get_status): Change prototype.
12554
12555 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12556 (i386_dr_low_get_addr): New.
12557 (i386_dr_low_get_control): New.
12558 (i386_dr_low_get_status): Adjust prototype. Return
12559 dr_status_mirror.
12560 (i386_initial_stuff): Clear dr_status_mirror and
12561 dr_control_mirror.
12562 (i386_get_thread_context): Adjust.
12563 (i386_set_thread_context): Adjust.
12564 (i386_thread_added): Adjust.
12565
12566 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12567
12568 * linux-low.h (linux_thread_area): Delete declaration.
12569
12570 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12571
12572 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12573 after its termination.
12574
12575 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12576
12577 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12578 (gdb_wants_all_stopped): Delete.
12579 (linux_wait_1): Don't call them.
12580 * server.c (handle_v_cont): Tag all threads as want-stopped.
12581 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12582 stopped as "client-wants-stopped".
12583
12584 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12585
12586 * Makefile.in (signals_h): New.
12587 (server_h): Depend on it.
12588 (server.o): Don't depend on $(signals_def).
12589 (signals.o): Depend on $(signals_def).
12590
12591 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12592
12593 * Makefile.in (signals_def): New.
12594 (server_h): Append include/gdb/signals.h and signals_def.
12595 (server.o): Append signals_def.
12596
12597 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12598
12599 * server.c (handle_target_event): Use target_signal_to_host for
12600 resume_info.sig initialization.
12601 * target.h (struct thread_resume) <sig>: New comment.
12602
12603 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12604
12605 * server.c (handle_query): strcpy() the returned string from paddress()
12606 instead of sprintf().
12607 * utils.c (paddress): Return phex_nz().
12608
12609 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12610
12611 * server.c (handle_v_cont): Call mourn_inferior if process
12612 just exited.
12613 (myresume): Likewise.
12614
12615 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12616
12617 Static tracepoints, and integration with UST.
12618
12619 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12620 * mem-break.c (uninsert_all_breakpoints)
12621 (reinsert_all_breakpoints): New.
12622 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12623 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12624 (gdb_agent_ust_loaded, helper_thread_id)
12625 (gdb_agent_helper_thread_id): New macros.
12626 (struct ipa_sym_addresses): Add addr_ust_loaded,
12627 addr_helper_thread_id, addr_cmd_buf.
12628 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12629 (in_process_agent_loaded_ust): New.
12630 (write_e_ust_not_loaded): New.
12631 (maybe_write_ipa_ust_not_loaded): New.
12632 (struct collect_static_trace_data_action): New.
12633 (enum tracepoint_type) <static_tracepoint>: New.
12634 (struct tracepoint) <handle>: Mention static tracepoints.
12635 (struct static_tracepoint_ctx): New.
12636 (CMD_BUF_SIZE): New.
12637 (add_tracepoint_action): Handle static tracepoint actions.
12638 (unprobe_marker_at): New.
12639 (clear_installed_tracepoints): Handle static tracepoints.
12640 (cmd_qtdp): Handle static tracepoints.
12641 (probe_marker_at): New.
12642 (cmd_qtstart): Handle static tracepoints.
12643 (response_tracepoint): Handle static tracepoints.
12644 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12645 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12646 (get_context_regcache): Handle static tracepoints.
12647 (do_action_at_tracepoint): Handle static tracepoint actions.
12648 (traceframe_find_block_type): Handle static trace data blocks.
12649 (traceframe_read_sdata): New.
12650 (download_tracepoints): Download static tracepoint actions.
12651 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12652 (GDB_PROBE_NAME): New.
12653 (ust_ops): New.
12654 (GET_UST_SYM): New.
12655 (USTF): New.
12656 (dlsym_ust): New.
12657 (ust_marker_to_static_tracepoint): New.
12658 (gdb_probe): New.
12659 (collect_ust_data_at_tracepoint): New.
12660 (gdb_ust_probe): New.
12661 (UNIX_PATH_MAX, SOCK_DIR): New.
12662 (gdb_ust_connect_sync_socket): New.
12663 (resume_thread, stop_thread): New.
12664 (run_inferior_command): New.
12665 (init_named_socket): New.
12666 (gdb_ust_socket_init): New.
12667 (cstr_to_hexstr): New.
12668 (next_st): New.
12669 (first_marker, next_marker): New.
12670 (response_ust_marker): New.
12671 (cmd_qtfstm, cmd_qtsstm): New.
12672 (unprobe_marker_at, probe_marker_at): New.
12673 (cmd_qtstmat, gdb_ust_thread): New.
12674 (gdb_ust_init): New.
12675 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12676 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12677 (ST_REGENTRY): New.
12678 (x86_64_st_collect_regmap): New.
12679 (X86_64_NUM_ST_COLLECT_GREGS): New.
12680 (AMD64_RIP_REGNUM): New.
12681 (supply_static_tracepoint_registers): New.
12682 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12683 (ST_REGENTRY): New.
12684 (i386_st_collect_regmap): New.
12685 (i386_NUM_ST_COLLECT_GREGS): New.
12686 (supply_static_tracepoint_registers): New.
12687 * server.c (handle_query): Handle qXfer:statictrace:read.
12688 <qSupported>: Report support for StaticTracepoints, and
12689 qXfer:statictrace:read features.
12690 * server.h (traceframe_read_sdata)
12691 (supply_static_tracepoint_registers): Declare.
12692 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12693 (unpack_varlen_hex): Include in IPA build.
12694 * Makefile.in (ustlibs, ustinc): New.
12695 (IPA_OBJS): Add remote-utils-ipa.o.
12696 ($(IPA_LIB)): Link -ldl and -lpthread.
12697 (UST_CFLAGS): New.
12698 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12699 * config.in, configure: Regenerate.
12700
12701 2010-06-20 Ian Lance Taylor <iant@google.com>
12702 Pedro Alves <pedro@codesourcery.com>
12703
12704 * linux-x86-low.c (always_true): Delete.
12705 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12706 trying to fool the compiler with always_true.
12707
12708 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12709
12710 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12711 conditions in gdbserver.
12712
12713 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12714
12715 * spu-low.c (spu_read_memory): Wrap around local store limit.
12716 (spu_write_memory): Likewise.
12717
12718 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12719
12720 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12721 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12722 LONGEST uses.
12723 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12724 uses.
12725 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12726 uses with LONGEST uses.
12727
12728 2010-06-14 Stan Shebs <stan@codesourcery.com>
12729 Pedro Alves <pedro@codesourcery.com>
12730
12731 Bytecode compiler.
12732
12733 * linux-x86-low.c: Include limits.h.
12734 (add_insns): New.
12735 (always_true): New.
12736 (EMIT_ASM): New.
12737 (EMIT_ASM32): New.
12738 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12739 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12740 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12741 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12742 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12743 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12744 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12745 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12746 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12747 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12748 (amd64_emit_void_call_2): New.
12749 (amd64_emit_ops): New.
12750 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12751 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12752 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12753 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12754 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12755 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12756 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12757 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12758 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12759 (i386_emit_stack_adjust, i386_emit_int_call_1)
12760 (i386_emit_void_call_2): New.
12761 (i386_emit_ops): New.
12762 (x86_emit_ops): New.
12763 (the_low_target): Install x86_emit_ops.
12764 * server.h (struct emit_ops): New.
12765 (get_raw_reg_func_addr): Declare.
12766 (current_insn_ptr, emit_error): Declare.
12767 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12768 (set_trace_state_variable_value): New defines.
12769 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12770 addr_get_trace_state_variable_value and
12771 addr_set_trace_state_variable_value.
12772 (symbol_list): New fields for get_raw_reg,
12773 get_trace_state_variable_value and set_trace_state_variable_value.
12774 (condfn): New typedef.
12775 (struct tracepoint): New field `compiled_cond'.
12776 (do_action_at_tracepoint): Clear compiled_cond.
12777 (get_trace_state_variable_value, set_trace_state_variable_value):
12778 Export in the IPA.
12779 (condition_true_at_tracepoint): If there's a compiled condition,
12780 run that.
12781 (current_insn_ptr, emit_error): New globals.
12782 (struct bytecode_address): New.
12783 (get_raw_reg_func_addr): New.
12784 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12785 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12786 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12787 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12788 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12789 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12790 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12791 (compile_tracepoint_condition, compile_bytecodes): New.
12792 * target.h (emit_ops): Forward declare.
12793 (struct target_ops): New field emit_ops.
12794 (target_emit_ops): New.
12795 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12796 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12797 * linux-low.c (linux_emit_ops): New.
12798 (linux_target_ops): Install it.
12799 * linux-low.h (struct linux_target_ops): New field emit_ops.
12800
12801 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12802
12803 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12804 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12805
12806 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12807 Stan Shebs <stan@codesourcery.com>
12808
12809 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12810 (all): Depend on $(extra_libraries).
12811 (install-only): Install the IPA.
12812 (IPA_OBJS, IPA_LIB): New.
12813 (clean): Remove the IPA lib.
12814 (IPAGENT_CFLAGS): New.
12815 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12816 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12817 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12818 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12819 * configure.ac: Check for atomic builtins support in the compiler.
12820 (IPA_DEPFILES, extra_libraries): Define.
12821 * configure.srv (ipa_obj): Add description.
12822 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12823 (i[34567]86-*-linux*): Set ipa_obj.
12824 (x86_64-*-linux*): Set ipa_obj.
12825 * linux-low.c (stabilizing_threads): New.
12826 (supports_fast_tracepoints): New.
12827 (linux_detach): Stabilize threads before detaching.
12828 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12829 the lwp is either not stabilizing, or is moving out of a jump pad.
12830 (linux_fast_tracepoint_collecting): New.
12831 (maybe_move_out_of_jump_pad): New.
12832 (enqueue_one_deferred_signal): New.
12833 (dequeue_one_deferred_signal): New.
12834 (linux_wait_for_event_1): If moving out of a jump pad, defer
12835 pending signals to later.
12836 (linux_stabilize_threads): New.
12837 (linux_wait_1): Check if threads need moving out of jump pads, and
12838 do it if so.
12839 (stuck_in_jump_pad_callback): New.
12840 (move_out_of_jump_pad_callback): New.
12841 (lwp_running): New.
12842 (linux_resume_one_lwp): Handle moving out of jump pads.
12843 (linux_set_resume_request): Dequeue deferred signals.
12844 (need_step_over_p): Also step over fast tracepoint jumps.
12845 (start_step_over): Also uninsert fast tracepoint jumps.
12846 (finish_step_over): Also reinsert fast tracepoint jumps.
12847 (linux_install_fast_tracepoint_jump): New.
12848 (linux_target_ops): Install linux_stabilize_threads and
12849 linux_install_fast_tracepoint_jump_pad.
12850 * linux-low.h (linux_target_ops) <get_thread_area,
12851 install_fast_tracepoint_jump_pad>: New fields.
12852 (struct lwp_info) <collecting_fast_tracepoint,
12853 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12854 (linux_get_thread_area): Declare.
12855 * linux-x86-low.c (jump_insn): New.
12856 (x86_get_thread_area): New.
12857 (append_insns): New.
12858 (push_opcode): New.
12859 (amd64_install_fast_tracepoint_jump_pad): New.
12860 (i386_install_fast_tracepoint_jump_pad): New.
12861 (x86_install_fast_tracepoint_jump_pad): New.
12862 (the_low_target): Install x86_get_thread_area and
12863 x86_install_fast_tracepoint_jump_pad.
12864 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12865 (struct fast_tracepoint_jump): New.
12866 (fast_tracepoint_jump_insn): New.
12867 (fast_tracepoint_jump_shadow): New.
12868 (find_fast_tracepoint_jump_at): New.
12869 (fast_tracepoint_jump_here): New.
12870 (delete_fast_tracepoint_jump): New.
12871 (set_fast_tracepoint_jump): New.
12872 (uninsert_fast_tracepoint_jumps_at): New.
12873 (reinsert_fast_tracepoint_jumps_at): New.
12874 (set_breakpoint_at): Use write_inferior_memory.
12875 (uninsert_raw_breakpoint): Use write_inferior_memory.
12876 (check_mem_read): Mask out fast tracepoint jumps.
12877 (check_mem_write): Mask out fast tracepoint jumps.
12878 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12879 (set_fast_tracepoint_jump): Declare.
12880 (delete_fast_tracepoint_jump)
12881 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12882 (reinsert_fast_tracepoint_jumps_at): Declare.
12883 * regcache.c: Don't compile many functions when building the
12884 in-process agent library.
12885 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12886 the register buffer in the heap.
12887 (free_register_cache): If the register buffer isn't owned by the
12888 regcache, don't free it.
12889 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12890 pre-existing register caches.
12891 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12892 type.
12893 (convert_ascii_to_int): : Constify `from' parameter type.
12894 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12895 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12896 the needed buffer in-place.
12897 (relocate_instruction): New.
12898 * server.c (handle_query) <qSymbols>: If the target supports
12899 tracepoints, give it a chance of looking up symbols. Report
12900 support for fast tracepoints.
12901 (handle_status): Stabilize threads.
12902 (process_serial_event): Adjust.
12903 * server.h (struct fast_tracepoint_jump): Forward declare.
12904 (struct process_info) <fast_tracepoint_jumps>: New field.
12905 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12906 (decode_X_packet, decode_M_packet): Adjust.
12907 (relocate_instruction): Declare.
12908 (in_process_agent_loaded): Declare.
12909 (tracepoint_look_up_symbols): Declare.
12910 (struct fast_tpoint_collect_status): Declare.
12911 (fast_tracepoint_collecting): Declare.
12912 (force_unlock_trace_buffer): Declare.
12913 (handle_tracepoint_bkpts): Declare.
12914 (initialize_low_tracepoint)
12915 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12916 * target.h (struct target_ops) <stabilize_threads,
12917 install_fast_tracepoint_jump_pad>: New fields.
12918 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12919 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12920 [HAVE_STDINT_H]: Include stdint.h.
12921 (trace_debug_1): Rename to ...
12922 (trace_vdebug): ... this.
12923 (trace_debug): Rename to ...
12924 (trace_debug_1): ... this. Add `level' parameter.
12925 (trace_debug): New.
12926 (ATTR_USED, ATTR_NOINLINE): New.
12927 (IP_AGENT_EXPORT): New.
12928 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12929 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12930 (about_to_request_buffer_space, trace_buffer_is_full)
12931 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12932 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12933 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12934 (traceframe_write_count, traceframes_created)
12935 (trace_state_variables)
12936 New renaming defines.
12937 (struct ipa_sym_addresses): New.
12938 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12939 (symbol_list): New.
12940 (ipa_sym_addrs): New.
12941 (all_tracepoint_symbols_looked_up): New.
12942 (in_process_agent_loaded): New.
12943 (write_e_ipa_not_loaded): New.
12944 (maybe_write_ipa_not_loaded): New.
12945 (tracepoint_look_up_symbols): New.
12946 (debug_threads) [IN_PROCESS_AGENT]: New.
12947 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12948 (UNKNOWN_SIDE_EFFECTS): New.
12949 (stop_tracing): New.
12950 (flush_trace_buffer): New.
12951 (stop_tracing_bkpt): New.
12952 (flush_trace_buffer_bkpt): New.
12953 (read_inferior_integer): New.
12954 (read_inferior_uinteger): New.
12955 (read_inferior_data_pointer): New.
12956 (write_inferior_data_pointer): New.
12957 (write_inferior_integer): New.
12958 (write_inferior_uinteger): New.
12959 (struct collect_static_trace_data_action): Delete.
12960 (enum tracepoint_type): New.
12961 (struct tracepoint) <type>: New field `type'.
12962 <actions_str, step_actions, step_actions_str>: Only include in
12963 GDBserver.
12964 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12965 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12966 (tracepoints): Use IP_AGENT_EXPORT.
12967 (last_tracepoint): Don't include in the IPA.
12968 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12969 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12970 (alloced_trace_state_variables): New.
12971 (trace_state_variables): Use IP_AGENT_EXPORT.
12972 (traceframe_t): Delete unused variable.
12973 (circular_trace_buffer): Don't include in the IPA.
12974 (trace_buffer_start): Delete.
12975 (struct trace_buffer_control): New.
12976 (trace_buffer_free): Delete.
12977 (struct ipa_trace_buffer_control): New.
12978 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12979 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12980 New.
12981 (trace_buffer_ctrl): New.
12982 (TRACE_BUFFER_CTRL_CURR): New.
12983 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12984 Reimplement as macros.
12985 (trace_buffer_wrap): Delete.
12986 (traceframe_write_count, traceframe_read_count)
12987 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12988 (struct tracepoint_hit_ctx) <type>: New field.
12989 (struct fast_tracepoint_ctx): New.
12990 (memory_barrier): New.
12991 (cmpxchg): New.
12992 (record_tracepoint_error): Update atomically in the IPA.
12993 (clear_inferior_trace_buffer): New.
12994 (about_to_request_buffer_space): New.
12995 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12996 updating the same buffer.
12997 (add_tracepoint): Default the tracepoint's type to trap
12998 tracepoint, and orig_size to -1.
12999 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13000 internal variables.
13001 (create_trace_state_variable): New parameter `gdb'. Handle it.
13002 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13003 (cmd_qtdp): Handle fast tracepoints.
13004 (cmd_qtdv): Adjust.
13005 (max_jump_pad_size): New.
13006 (gdb_jump_pad_head): New.
13007 (get_jump_space_head): New.
13008 (claim_jump_space): New.
13009 (sort_tracepoints): New.
13010 (MAX_JUMP_SIZE): New.
13011 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13012 IPA.
13013 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13014 support. Upload fast traceframes, and delete internal IPA
13015 breakpoints.
13016 (stop_tracing_handler): New.
13017 (flush_trace_buffer_handler): New.
13018 (cmd_qtstop): Upload fast tracepoints.
13019 (response_tracepoint): Handle fast tracepoints.
13020 (tracepoint_finished_step): Upload fast traceframes. Set the
13021 tracepoint hit context's tracepoint type.
13022 (handle_tracepoint_bkpts): New.
13023 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13024 type. Add comment about fast tracepoints.
13025 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13026 non-existing action_str field.
13027 (get_context_regcache): Handle fast tracepoints.
13028 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13029 to the regcache.
13030 (fast_tracepoint_from_jump_pad_address): New.
13031 (fast_tracepoint_from_ipa_tpoint_address): New.
13032 (collecting_t): New.
13033 (force_unlock_trace_buffer): New.
13034 (fast_tracepoint_collecting): New.
13035 (collecting): New.
13036 (gdb_collect): New.
13037 (write_inferior_data_ptr): New.
13038 (target_tp_heap): New.
13039 (target_malloc): New.
13040 (download_agent_expr): New.
13041 (UALIGN): New.
13042 (download_tracepoints): New.
13043 (download_trace_state_variables): New.
13044 (upload_fast_traceframes): New.
13045 (IPA_FIRST_TRACEFRAME): New.
13046 (IPA_NEXT_TRACEFRAME_1): New.
13047 (IPA_NEXT_TRACEFRAME): New.
13048 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13049 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13050 (gdb_jump_pad_buffer_end): New.
13051 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13052 (initialize_tracepoint): Adjust.
13053 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13054 buffer. Initialize the low module.
13055 * utils.c (PREFIX, TOOLNAME): New.
13056 (malloc_failure): Use PREFIX.
13057 (error): In the IPA, an error causes an exit.
13058 (fatal, warning): Use PREFIX.
13059 (internal_error): Use TOOLNAME.
13060 (NUMCELLS): Increase to 10.
13061 * configure, config.in: Regenerate.
13062
13063 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13064
13065 * server.c (handle_query) <qSupported>: Do two passes over the
13066 qSupported string to avoid nesting strtok.
13067
13068 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13069
13070 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13071 (CDEPS): New.
13072 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13073 -Wl,--dynamic-list.
13074 * configure: Regenerate.
13075 * proc-service.list: New.
13076
13077 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13078
13079 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13080 New comment.
13081
13082 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13083
13084 * gdbreplay.c (remote_open): Check error return from socket() call by
13085 its equality to -1 not by it being negative.
13086 * remote-utils.c (remote_open): Likewise.
13087
13088 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13089
13090 * config.h: Regenerate.
13091
13092 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13093
13094 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13095 doesn't provide PTRACE_GET_THREAD_AREA.
13096
13097 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13098
13099 * linux-m68k-low.c: Include <asm/ptrace.h>
13100 (ps_get_thread_area): Implement.
13101
13102 2010-05-03 Doug Evans <dje@google.com>
13103
13104 * event-loop.c (struct callback_event): New struct.
13105 (callback_list): New global.
13106 (append_callback_event, delete_callback_event): New functions.
13107 (process_callback): New function.
13108 (start_event_loop): Call it.
13109 * remote-utils.c (NOT_SCHEDULED): Define.
13110 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13111 moved out of readchar.
13112 (readchar): Rewrite. Call reschedule before returning.
13113 (reset_readchar): New function.
13114 (remote_close): Call it.
13115 (process_remaining, reschedule): New functions.
13116 * server.h (callback_handler_func): New typedef.
13117 (append_callback_event, delete_callback_event): Declare.
13118
13119 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13120
13121 * proc-service.c (ps_pglobal_lookup): Use
13122 thread_db_look_up_one_symbol.
13123 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13124 parameter. Use it instead of all_symbols_looked_up.
13125 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13126 field.
13127 (all_symbols_looked_up): Don't declare.
13128 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13129 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13130 field.
13131 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13132 Set all_symbols_looked_up here.
13133 (thread_db_look_up_one_symbol): New.
13134 (thread_db_get_tls_address): Adjust.
13135 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13136 thread_db object on the heap, and tentatively set it in the
13137 process structure.
13138 (thread_db_init): Don't set all_symbols_looked_up here.
13139 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13140
13141 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13142
13143 * linux-low.c (linux_kill, linux_detach): Adjust.
13144 (status_pending_p_callback): Remove redundant statement. Check
13145 for !TARGET_WAITIKIND_IGNORE, instead of
13146 TARGET_WAITKIND_STOPPED.
13147 (handle_tracepoints): Make sure LWP is locked. Adjust.
13148 (linux_wait_for_event_1): Adjust.
13149 (linux_cancel_breakpoints): New.
13150 (unsuspend_one_lwp): New.
13151 (unsuspend_all_lwps): New.
13152 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13153 (send_sigstop_callback): Change return type to int, add new
13154 `except' parameter and handle it.
13155 (suspend_and_send_sigstop_callback): New.
13156 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13157 pass them down. If SUSPEND, also increment the lwp's suspend
13158 count.
13159 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13160 (need_step_over_p): Don't consider suspended LWPs.
13161 (start_step_over): Adjust.
13162 (proceed_one_lwp): Change return type to int, add new `except'
13163 parameter and handle it.
13164 (unsuspend_and_proceed_one_lwp): New.
13165 (proceed_all_lwps): Use find_inferior instead of
13166 for_each_inferior.
13167 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13168 also decrement the suspend count of LWPs. Pass `except' down,
13169 instead of hacking its suspend count.
13170 (linux_pause_all): Add `freeze' parameter. Adjust.
13171 (linux_unpause_all): New.
13172 (linux_target_ops): Install linux_unpause_all.
13173 * server.c (handle_status): Adjust.
13174 * target.h (struct target_ops): New fields `unpause_all' and
13175 `cancel_breakpoints'. Add new parameter to `pause_all'.
13176 (pause_all): Add new `freeze' parameter.
13177 (unpause_all): New.
13178 (cancel_breakpoints): New.
13179 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13180 cancel breakpoints.
13181 (cmd_qtstart): Pause threads.
13182 (stop_tracing): Pause threads, and cancel breakpoints.
13183 * win32-low.c (win32_target_ops): Adjust.
13184
13185 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13186
13187 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13188 the inferior right away from here...
13189 (linux_wait_1): ... to here, and adjust to check the thread's
13190 last_resume_kind instead of the lwp's step or stop_expected flags.
13191
13192 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13193
13194 * README: Use consistent `GDB' and `GDBserver' spellings.
13195
13196 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13197
13198 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13199 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13200 (linux_detach_one_lwp): Assume the lwp is stopped.
13201 (any_thread_of): Delete.
13202 (linux_detach): Stop all lwps here. Don't blindly delete all
13203 breakpoints.
13204 (delete_lwp_callback): New.
13205 (linux_mourn): Delete all lwps of the process that is gone.
13206 (linux_wait_1): Don't delete the last lwp of the process here.
13207 * mem-break.h (mark_breakpoints_out): Declare.
13208 * mem-break.c (mark_breakpoints_out): New.
13209 (free_all_breakpoints): Use it.
13210 * server.c (handle_target_event): If the process is gone, mark
13211 breakpoints out.
13212 * thread-db.c (struct thread_db) <create_bp>: New field.
13213 (thread_db_enable_reporting): Fix prototype. Store a thread event
13214 breakpoint reference in the thread_db struct.
13215 (thread_db_load_search): Clear the thread_db object.
13216 (try_thread_db_load_1): Ditto.
13217 (switch_to_process): New.
13218 (disable_thread_event_reporting): Use it.
13219 (remove_thread_event_breakpoints): New.
13220 (thread_db_detach, thread_db_mourn): Use it.
13221
13222 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13223
13224 * linux-low.c (linux_enable_event_reporting): New.
13225 (linux_wait_for_event_1, handle_extended_wait): Use it.
13226
13227 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13228
13229 * linux-low.c (linux_kill_one_lwp, linux_kill)
13230 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13231 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13232 SIGSTOP even if the LWP is stopped.
13233 (send_sigstop_callback): New.
13234 (stop_all_lwps): Use send_sigstop_callback instead.
13235 (linux_resume_one_thread): Adjust.
13236 (proceed_one_lwp): Still proceed an LWP that the client has
13237 requested to stop, if we haven't reported it as stopped yet. Make
13238 sure that LWPs the client want stopped, have a pending SIGSTOP.
13239
13240 2010-04-26 Doug Evans <dje@google.com>
13241
13242 * server.c (handle_general_set): Make static.
13243
13244 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13245 Print received char after testing for error/eof instead of before.
13246 (input_interrupt): Tweak comment.
13247
13248 2010-04-23 Doug Evans <dje@google.com>
13249
13250 * server.c (start_inferior): Print inferior argv if --debug.
13251
13252 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13253
13254 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13255 * nto-x86-low.c: Include server.h
13256
13257 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13258
13259 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13260 be consistent with other sources of this directory.
13261 (init_registers_amd64): Correct name of source file of this function
13262 in the comment.
13263
13264 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13265
13266 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13267 64-bit executables.
13268
13269 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13270
13271 * win32-i386-low.c: Add 64-bit support.
13272 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13273 (init_registers_amd64): Declare.
13274 (mappings): Add 64-bit version of array.
13275 (init_windows_x86): New function.
13276 (the_low_target): Change init_arch field to init_windows_x86.
13277
13278 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13279
13280 * win32-low.c: Adapt to support also 64-bit architecture.
13281 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13282 (get_image_name): Use SIZE_T type for local variable `done'.
13283 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13284 (toolhelp_get_dll_name): Idem.
13285 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13286 Use uintptr_t typecast to avoid warning.
13287 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13288 (handle_exception): Use phex_nz to avoid warning.
13289 (win32_wait): Remove unused local variable `process'.
13290
13291 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13292
13293 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13294 `amd64-avx.o'.
13295
13296 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13297
13298 * configure.ac: Use `ws2_32' library for srv_mingw.
13299 * configure: Regenerate.
13300 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13301 * remote-utils.c: Likewise.
13302
13303 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13304
13305 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13306 if __x86_64__ is defined.
13307
13308 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13309
13310 * configure: Regenerate.
13311
13312 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13313
13314 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13315 * target.h (target_ops): New get_tib_address field.
13316 * win32-low.h (win32_thread_info): Add thread_local_base field.
13317 * win32-low.c (child_add_thread): Add tlb argument.
13318 Set thread_local_base field to TLB.
13319 (get_child_debug_event): Adapt to child_add_thread change.
13320 (win32_get_tib_address): New function.
13321 (win32_target_ops): Set get_tib_address field to
13322 win32_get_tib_address.
13323 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13324
13325 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13326
13327 * linux-low.c (linux_mourn): Also remove the process.
13328 * server.c (handle_target_event): Don't remove the process here.
13329 * nto-low.c (nto_mourn): New.
13330 (nto_target_ops): Install it.
13331 * spu-low.c (spu_mourn): New.
13332 (spu_target_ops): Install it.
13333 * win32-low.c (win32_mourn): New.
13334 (win32_target_ops): Install it.
13335
13336 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13337
13338 * server.h (buffer_xml_printf): Remove redundant `;'.
13339
13340 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13341
13342 * regcache.c (set_register_cache): Invalidate regcaches before
13343 changing the register cache layout.
13344 (regcache_invalidate_one): Allow a NULL regcache.
13345 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13346 regcaches before changing the register cache layout or the target
13347 regsets.
13348
13349 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13350
13351 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13352 variable warning on Linux/x86-64.
13353
13354 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13355
13356 GDBserver disconnected tracing support.
13357
13358 * linux-low.c (linux_remove_process): Delete.
13359 (add_lwp): Don't set last_resume_kind here.
13360 (linux_kill): Use `mourn'.
13361 (linux_detach): Use `thread_db_detach', and `mourn'.
13362 (linux_mourn): New.
13363 (linux_attach_lwp_1): Adjust comment.
13364 (linux_attach): last_resume_kind moved the thread_info; adjust.
13365 (status_pending_p_callback): Adjust.
13366 (linux_wait_for_event_1): Adjust.
13367 (count_events_callback, select_singlestep_lwp_callback)
13368 (select_event_lwp_callback, cancel_breakpoints_callback)
13369 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13370 (proceed_one_lwp): Adjust.
13371 (linux_async): Add debug output.
13372 (linux_thread_stopped): New.
13373 (linux_pause_all): New.
13374 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13375 linux_pause_all.
13376 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13377 (thread_db_free): Delete declaration.
13378 (thread_db_detach, thread_db_mourn): Declare.
13379 * thread-db.c (thread_db_init): Use thread_db_mourn.
13380 (thread_db_free): Delete, split in two.
13381 (disable_thread_event_reporting): New.
13382 (thread_db_detach): New.
13383 (thread_db_mourn): New.
13384
13385 * server.h (struct thread_info) <last_resume_kind>: New field.
13386 <attached>: Add comment.
13387 <gdb_detached>: New field.
13388 (handler_func): Change return type to int.
13389 (handle_serial_event, handle_target_event): Ditto.
13390 (gdb_connected): Declare.
13391 (tracing): Delete.
13392 (disconnected_tracing): Declare.
13393 (stop_tracing): Declare.
13394
13395 * server.c (handle_query) <qSupported>: Report support for
13396 disconnected tracing.
13397 (queue_stop_reply_callback): Account for running threads.
13398 (gdb_wants_thread_stopped): New.
13399 (gdb_wants_all_threads_stopped): New.
13400 (gdb_reattached_process): New.
13401 (handle_status): Clear the `gdb_detached' flag of all processes.
13402 In all-stop, stop all threads.
13403 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13404 (process_serial_event): If the remote connection breaks, or if an
13405 exit was forced with "monitor exit", force an event loop exit.
13406 Handle disconnected tracing on detach.
13407 (handle_serial_event): Adjust.
13408 (handle_target_event): If GDB isn't connected, forward events back
13409 to the inferior, unless the last process exited, in which case,
13410 exit gdbserver. Adjust interface.
13411
13412 * remote-utils.c (remote_open): Don't block in accept. Instead
13413 register an event loop source on the listen socket file
13414 descriptor. Refactor bits into ...
13415 (listen_desc): ... this new global.
13416 (gdb_connected): ... this new function.
13417 (enable_async_notification): ... this new function.
13418 (handle_accept_event): ... this new function.
13419 (remote_close): Clear remote_desc.
13420
13421 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13422
13423 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13424 New fields.
13425 (mourn_inferior): Define.
13426 (target_process_qsupported): Avoid the dangling else problem.
13427 (thread_stopped): Define.
13428 (pause_all): Define.
13429 (target_waitstatus_to_string): Declare.
13430 * target.c (target_waitstatus_to_string): New.
13431
13432 * tracepoint.c (tracing): Make extern.
13433 (disconnected_tracing): New.
13434 (stop_tracing): Make extern. Handle tracing stops due to GDB
13435 disconnecting.
13436 (cmd_qtdisconnected): New.
13437 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13438 (handle_tracepoint_general_set): Handle QTDisconnected.
13439
13440 * event-loop.c (event_handler_func): Change return type to int.
13441 (process_event): Bail out if the event handler wants the event
13442 loop to stop.
13443 (handle_file_event): Ditto.
13444 (start_event_loop): Bail out if the event handler wants the event
13445 loop to stop.
13446
13447 * nto-low.c (nto_target_ops): Adjust.
13448 * spu-low.c (spu_wait): Don't remove the process here.
13449 (spu_target_ops): Adjust.
13450 * win32-low.c (win32_wait): Don't remove the process here.
13451 (win32_target_ops): Adjust.
13452
13453 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13454
13455 * regcache.c (realloc_register_cache): Invalidate inferior's
13456 regcache before recreating it.
13457
13458 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13459
13460 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13461
13462 2010-04-09 Stan Shebs <stan@codesourcery.com>
13463 Pedro Alves <pedro@codesourcery.com>
13464
13465 * server.h (LONGEST): New.
13466 (struct thread_info) <while_stepping>: New field.
13467 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13468 Declare.
13469 (initialize_tracepoint, handle_tracepoint_general_set)
13470 (handle_tracepoint_query, tracepoint_finished_step)
13471 (tracepoint_was_hit, release_while_stepping_state_list):
13472 (current_traceframe): Declare.
13473 * server.c (handle_general_set): Handle tracepoint packets.
13474 (read_memory): New.
13475 (write_memory): New.
13476 (handle_search_memory_1): Use read_memory.
13477 (handle_query): Report support for conditional tracepoints, trace
13478 state variables, and tracepoint sources. Handle tracepoint
13479 queries.
13480 (main): Initialize the tracepoints module.
13481 (process_serial_event): Handle traceframe reads/writes.
13482
13483 * linux-low.c (handle_tracepoints): New.
13484 (linux_wait_1): Call it.
13485 (linux_resume_one_lwp): Handle while-stepping.
13486 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13487 (linux_target_ops): Install them.
13488 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13489 New field.
13490 * linux-x86-low.c (x86_supports_tracepoints): New.
13491 (the_low_target). Install it.
13492
13493 * mem-break.h (delete_breakpoint): Declare.
13494 * mem-break.c (delete_breakpoint): Make external.
13495
13496 * target.h (struct target_ops): Add `supports_tracepoints',
13497 `read_pc', and `write_pc' fields.
13498 (target_supports_tracepoints): Define.
13499 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13500 (phex_nz): New.
13501
13502 * regcache.h (struct regcache) <registers_owned>: New field.
13503 (init_register_cache, regcache_cpy): Declare.
13504 (regcache_read_pc, regcache_write_pc): Declare.
13505 (register_cache_size): Declare.
13506 (supply_regblock): Declare.
13507 * regcache.c (init_register_cache): New.
13508 (new_register_cache): Use it.
13509 (regcache_cpy): New.
13510 (register_cache_size): New.
13511 (supply_regblock): New.
13512 (regcache_read_pc, regcache_write_pc): New.
13513
13514 * tracepoint.c: New.
13515
13516 * Makefile.in (OBS): Add tracepoint.o.
13517 (tracepoint.o): New rule.
13518
13519 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13520
13521 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13522 (i386-mmx.o): New.
13523 (i386-mmx.c): Likewise.
13524 (i386-mmx-linux.o): Likewise.
13525 (i386-mmx-linux.c): Likewise.
13526
13527 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13528 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13529 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13530 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13531
13532 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13533 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13534 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13535
13536 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13537
13538 * Makefile.in (clean): Updated.
13539 (i386-avx.o): New.
13540 (i386-avx.c): Likewise.
13541 (i386-avx-linux.o): Likewise.
13542 (i386-avx-linux.c): Likewise.
13543 (amd64-avx.o): Likewise.
13544 (amd64-avx.c): Likewise.
13545 (amd64-avx-linux.o): Likewise.
13546 (amd64-avx-linux.c): Likewise.
13547
13548 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13549 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13550 (srv_amd64_regobj): Add amd64-avx.o.
13551 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13552 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13553 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13554 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13555 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13556 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13557 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13558
13559 * i387-fp.c: Include "i386-xstate.h".
13560 (i387_xsave): New.
13561 (i387_cache_to_xsave): Likewise.
13562 (i387_xsave_to_cache): Likewise.
13563 (x86_xcr0): Likewise.
13564
13565 * i387-fp.h (i387_cache_to_xsave): Likewise.
13566 (i387_xsave_to_cache): Likewise.
13567 (x86_xcr0): Likewise.
13568
13569 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13570 * linux-crisv32-low.c (target_regsets): Likewise.
13571 * linux-m68k-low.c (target_regsets): Likewise.
13572 * linux-mips-low.c (target_regsets): Likewise.
13573 * linux-ppc-low.c (target_regsets): Likewise.
13574 * linux-s390-low.c (target_regsets): Likewise.
13575 * linux-sh-low.c (target_regsets): Likewise.
13576 * linux-sparc-low.c (target_regsets): Likewise.
13577 * linux-xtensa-low.c (target_regsets): Likewise.
13578
13579 * linux-low.c: Include <sys/uio.h>.
13580 (regsets_fetch_inferior_registers): Support nt_type.
13581 (regsets_store_inferior_registers): Likewise.
13582 (linux_process_qsupported): New.
13583 (linux_target_ops): Add linux_process_qsupported.
13584
13585 * linux-low.h (regset_info): Add nt_type.
13586 (linux_target_ops): Add process_qsupported.
13587
13588 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13589 and <sys/uio.h>.
13590 (init_registers_i386_avx_linux): New.
13591 (init_registers_amd64_avx_linux): Likewise.
13592 (xmltarget_i386_linux_no_xml): Likewise.
13593 (xmltarget_amd64_linux_no_xml): Likewise.
13594 (PTRACE_GETREGSET): Likewise.
13595 (PTRACE_SETREGSET): Likewise.
13596 (x86_fill_xstateregset): Likewise.
13597 (x86_store_xstateregset): Likewise.
13598 (use_xml): Likewise.
13599 (x86_linux_update_xmltarget): Likewise.
13600 (x86_linux_process_qsupported): Likewise.
13601 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13602 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13603 init_registers_i386_linux here. Call
13604 x86_linux_update_xmltarget.
13605 (the_low_target): Add x86_linux_process_qsupported.
13606
13607 * server.c (handle_query): Call target_process_qsupported.
13608
13609 * target.h (target_ops): Add process_qsupported.
13610 (target_process_qsupported): New.
13611
13612 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13613
13614 * inferiors.c (add_thread): Set last_status kind to
13615 TARGET_WAITKIND_IGNORE.
13616 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13617 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13618 (linux_wait_1): Move `thread' local definition to block that uses
13619 it. Don't NULL initialize `event_child'.
13620 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13621 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13622 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13623
13624 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13625
13626 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13627 an extended waitstatus, or by a watchpoint.
13628 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13629 thread was stepping or has been stopped by a watchpoint.
13630
13631 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13632
13633 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13634 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13635 of another, then delete the previous, and validate all
13636 breakpoints.
13637 (validate_inserted_breakpoint): New.
13638 (delete_disabled_breakpoints): New.
13639 (validate_breakpoints): New.
13640 (check_mem_read): Validate breakpoints before trusting their
13641 shadow. Delete disabled breakpoints.
13642 (check_mem_write): Validate breakpoints before trusting they
13643 should be inserted. Delete disabled breakpoints.
13644 * mem-break.h (validate_breakpoints):
13645 * server.c (handle_query): Validate breakpoints when we see a
13646 qSymbol query.
13647
13648 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13649
13650 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13651 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13652 if we could tell there's a GDB breakpoint at stop_pc.
13653 (need_step_over_p): Don't do a step over if we find a GDB
13654 breakpoint at the resume PC.
13655
13656 * mem-break.c (struct raw_breakpoint): New.
13657 (enum bkpt_type): New type `gdb_breakpoint'.
13658 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13659 fields. New field `raw'.
13660 (find_raw_breakpoint_at): New.
13661 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13662 breakpoint instead.
13663 (set_breakpoint_at): Adjust.
13664 (delete_raw_breakpoint): New.
13665 (release_breakpoint): New.
13666 (delete_breakpoint): Rename to...
13667 (delete_breakpoint_1): ... this. Add proc parameter. Use
13668 release_breakpoint. Return ENOENT.
13669 (delete_breakpoint): Reimplement.
13670 (find_breakpoint_at): Delete.
13671 (find_gdb_breakpoint_at): New.
13672 (delete_breakpoint_at): Delete.
13673 (set_gdb_breakpoint_at): New.
13674 (delete_gdb_breakpoint_at): New.
13675 (gdb_breakpoint_here): New.
13676 (set_reinsert_breakpoint): Use release_breakpoint.
13677 (uninsert_breakpoint): Rename to ...
13678 (uninsert_raw_breakpoint): ... this.
13679 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13680 (reinsert_raw_breakpoint): Change parameter type to
13681 raw_breakpoint.
13682 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13683 instead.
13684 (check_breakpoints): Adjust. Use release_breakpoint.
13685 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13686 (breakpoint_inserted_here): Ditto.
13687 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13688 Don't trust the breakpoint's shadow if it is not inserted.
13689 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13690 (delete_all_breakpoints): Adjust.
13691 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13692 use delete_breakpoint_1.
13693
13694 * mem-break.h (breakpoints_supported): Delete declaration.
13695 (set_gdb_breakpoint_at): Declare.
13696 (gdb_breakpoint_here): Declare.
13697 (delete_breakpoint_at): Delete.
13698 (delete_gdb_breakpoint_at): Declare.
13699
13700 * server.h (struct raw_breakpoint): Forward declare.
13701 (struct process_info): New field `raw_breakpoints'.
13702
13703 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13704 breakpoints.
13705
13706 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13707
13708 * linux-low.c (status_pending_p_callback): Fix comment.
13709 (linux_wait_for_event_1): Move most of the internal breakpoint
13710 handling from here...
13711 (linux_wait_1): ... to here.
13712 (count_events_callback): New.
13713 (select_singlestep_lwp_callback): New.
13714 (select_event_lwp_callback): New.
13715 (cancel_breakpoints_callback): New.
13716 (select_event_lwp): New.
13717 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13718 priority to all LWPs that have had events that should be reported
13719 to the client. Cancel breakpoints when about to reporting the
13720 event to the client, not while stopping lwps. No longer cancel
13721 finished single-steps here.
13722 (cancel_finished_single_step): Delete.
13723 (cancel_finished_single_steps): Delete.
13724
13725 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13726
13727 * mem-break.c (enum bkpt_type): New.
13728 (struct breakpoint): New field `type'.
13729 (set_breakpoint_at): Change return type to struct breakpoint
13730 pointer. Set type to `other_breakpoint' by default.
13731 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13732 in the breakpoint list.
13733 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13734 (reinsert_breakpoint): Rename to ...
13735 (reinsert_raw_breakpoint): ... this.
13736 (reinsert_breakpoints_at): Adjust.
13737 * mem-break.h (struct breakpoint): Declare.
13738 (set_breakpoint_at): Change return type to struct breakpoint
13739 pointer.
13740
13741 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13742
13743 * server.c (handle_query): Assign, not compare.
13744
13745 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13746
13747 Teach linux gdbserver to step-over-breakpoints.
13748
13749 * linux-low.c (can_hardware_single_step): New.
13750 (supports_breakpoints): New.
13751 (handle_extended_wait): If stopping threads, read the stop pc of
13752 the new cloned LWP.
13753 (get_pc): New.
13754 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13755 low target doesn't support retrieving the PC.
13756 (add_lwp): Set last_resume_kind to resume_continue.
13757 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13758 (linux_attach): Don't clear stop_expected. Set the lwp's
13759 last_resume_kind to resume_stop.
13760 (linux_detach_one_lwp): Don't check for removed breakpoints.
13761 (check_removed_breakpoint): Delete.
13762 (status_pending_p): Rename to ...
13763 (status_pending_p_callback): ... this. Don't check for removed
13764 breakpoints. Don't consider threads that are stopped from GDB's
13765 perspective.
13766 (linux_wait_for_lwp): Always read the stop_pc here.
13767 (cancel_breakpoint): New.
13768 (step_over_bkpt): New global.
13769 (linux_wait_for_event_1): Implement stepping over breakpoints.
13770 (gdb_wants_lwp_stopped): New.
13771 (gdb_wants_all_stopped): New.
13772 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13773 single-step traps here. Store the thread's last reported target
13774 wait status.
13775 (send_sigstop): Don't clear stop_expected. Always set it,
13776 instead.
13777 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13778 (cancel_finished_single_step): New.
13779 (cancel_finished_single_steps): New.
13780 (wait_for_sigstop): Don't cancel finished single-step traps here.
13781 (linux_resume_one_lwp): Don't check for removed breakpoints.
13782 Don't set `step' on non-hardware step archs.
13783 (linux_set_resume_request): Ignore resume_stop requests if already
13784 stopping or stopped. Set the lwp's last_resume_kind.
13785 (resume_status_pending_p): Don't check for removed breakpoints.
13786 (need_step_over_p): New.
13787 (start_step_over): New.
13788 (finish_step_over): New.
13789 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13790 requests. Clear the thread's last reported target waitstatus.
13791 Don't use the `suspended' flag. Don't consider pending breakpoints.
13792 (linux_resume): Start a step-over if necessary.
13793 (proceed_one_lwp): New.
13794 (proceed_all_lwps): New.
13795 (unstop_all_lwps): New.
13796 * linux-low.h (struct lwp_info): Rewrite comment for the
13797 `suspended' flag. Add the `stop_pc' field. Delete the
13798 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13799 Add `'last_resume_kind' and `need_step_over' fields.
13800 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13801 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13802 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13803 (set_raw_breakpoint_at): New.
13804 (set_breakpoint_at): Rewrite to use it.
13805 (reinsert_breakpoint_handler): Delete.
13806 (set_reinsert_breakpoint): New.
13807 (reinsert_breakpoint_by_bp): Delete.
13808 (delete_reinsert_breakpoints): New.
13809 (uninsert_breakpoint): Rewrite.
13810 (uninsert_breakpoints_at): New.
13811 (reinsert_breakpoint): Rewrite.
13812 (reinsert_breakpoints_at): New.
13813 (check_breakpoints): Rewrite.
13814 (breakpoint_here): New.
13815 (breakpoint_inserted_here): New.
13816 (check_mem_read): Adjust.
13817 * mem-break.h (breakpoints_supported, breakpoint_here)
13818 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13819 (reinsert_breakpoint_by_bp): Delete declaration.
13820 (delete_reinsert_breakpoints): Declare.
13821 (reinsert_breakpoint): Delete declaration.
13822 (reinsert_breakpoints_at): Declare.
13823 (uninsert_breakpoint): Delete declaration.
13824 (uninsert_breakpoints_at): Declare.
13825 (check_breakpoints): Adjust prototype.
13826 * server.h: Adjust include order.
13827 (struct thread_info): Declare here. Add a `last_status' field.
13828
13829 2010-03-23 Michael Snyder <msnyder@vmware.com>
13830
13831 * server.c (crc32): New function.
13832 (handle_query): Add handling for 'qCRC:' request.
13833
13834 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13835
13836 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13837 lwp had been stopped by a watchpoint.
13838
13839 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13840
13841 * server.h (internal_error): Declare.
13842 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13843 * utils.c (internal_error): New function.
13844
13845 2010-03-15 Andreas Schwab <schwab@redhat.com>
13846
13847 * configure.srv: Fix typo setting srv_regobj.
13848
13849 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13850
13851 * linux-low.c (fetch_register): Avoid passing a non string literal
13852 format to `error'.
13853 (usr_store_inferior_registers): Ditto.
13854
13855 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13856
13857 * linux-low.c (linux_write_memory): Bail out early if peeking
13858 memory failed.
13859
13860 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13861
13862 * linux-low.h (struct lwp_info): New fields
13863 `stopped_by_watchpoint' and `stopped_data_address'.
13864 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13865 here, and cache them in the lwp object.
13866 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13867 directly.
13868 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13869 field.
13870 (linux_stopped_by_watchpoint): Rewrite.
13871 (linux_stopped_data_address): Rewrite.
13872
13873 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13874
13875 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13876 switching the current inferior, not before.
13877
13878 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13879
13880 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13881 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13882 i386-linux.c and amd64-linux.c.
13883 (reg-i386.o): Removed.
13884 (reg-i386.c): Likewise.
13885 (reg-i386-linux.o): Likewise.
13886 (reg-i386-linux.c): Likewise.
13887 (reg-x86-64.o): Likewise.
13888 (reg-x86-64.c): Likewise.
13889 (reg-x86-64-linux.o): Likewise.
13890 (reg-x86-64-linux.c): Likewise.
13891 (i386.o): New.
13892 (i386.c): Likewise.
13893 (i386-linux.o): Likewise.
13894 (i386-linux.c): Likewise.
13895 (amd64.o): Likewise.
13896 (amd64.c): Likewise.
13897 (amd64-linux.o): Likewise.
13898 (amd64-linux.c): Likewise.
13899
13900 * configure.srv (srv_i386_regobj): New.
13901 (srv_i386_linux_regobj): Likewise.
13902 (srv_amd64_regobj): Likewise.
13903 (srv_amd64_linux_regobj): Likewise.
13904 (srv_i386_32bit_xmlfiles): Likewise.
13905 (srv_i386_64bit_xmlfiles): Likewise.
13906 (srv_i386_xmlfiles): Likewise.
13907 (srv_amd64_xmlfiles): Likewise.
13908 (srv_i386_linux_xmlfiles): Likewise.
13909 (srv_amd64_linux_xmlfiles): Likewise.
13910 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13911 srv_xmlfiles to $srv_i386_xmlfiles.
13912 (i[34567]86-*-mingw32ce*): Likewise.
13913 (i[34567]86-*-mingw*): Likewise.
13914 (i[34567]86-*-nto*): Likewise.
13915 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13916 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13917 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13918 (x86_64-*-linux*): Likewise.
13919
13920 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13921 (init_registers_amd64_linux): New.
13922 (x86_arch_setup): Replace init_registers_x86_64_linux with
13923 init_registers_amd64_linux.
13924
13925 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13926
13927 * configure.ac: Check for libdl. If it is not available link against
13928 static libthread_db.
13929 * configure: Regenerate.
13930
13931 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13932
13933 PR9605
13934
13935 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13936 handing a read watchpoint.
13937 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13938
13939 2010-02-12 Doug Evans <dje@google.com>
13940
13941 * linux-low.c (linux_supports_tracefork_flag): Document.
13942 (linux_look_up_symbols): Add comment.
13943
13944 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13945
13946 * regcache.c (supply_register): Clear regcache if buf is NULL.
13947
13948 2010-02-02 Nicolas Roche <roche@sourceware.org>
13949 Joel Brobecker <brobecker@adacore.com>
13950
13951 * inferiors.c (find_inferior): Add function documentation.
13952 (unloaded_dll): Handle the case where the unloaded dll has not
13953 been previously registered in the dll list.
13954
13955 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13956
13957 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13958 (thumb2_breakpoint): New.
13959 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13960
13961 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13964 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13965 breakpoints.
13966
13967 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13968
13969 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13970
13971 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13972
13973 * linux-s390-low.c (s390_collect_ptrace_register)
13974 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13975
13976 2010-01-21 Doug Evans <dje@google.com>
13977
13978 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13979 (PTRACE_ARG4_TYPE): New macro.
13980 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13981 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13982 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13983 (usr_store_inferior_registers): Ditto.
13984 (linux_read_memory, linux_write_memory): Ditto.
13985 (linux_test_for_tracefork): Ditto.
13986
13987 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13988 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13989
13990 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13991
13992 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13993 target.
13994
13995 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13996
13997 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13998 prototype to take a regcache. Adjust.
13999
14000 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14001
14002 * regcache.h (struct thread_info): Forward declare.
14003 (struct regcache): New.
14004 (new_register_cache): Adjust prototype.
14005 (get_thread_regcache): Declare.
14006 (free_register_cache): Adjust prototype.
14007 (registers_to_string, registers_from_string): Ditto.
14008 (supply_register, supply_register_by_name, collect_register)
14009 (collect_register_as_string, collect_register_by_name): Ditto.
14010 * regcache.c (struct inferior_regcache_data): Delete.
14011 (get_regcache): Rename to ...
14012 (get_thread_regcache): ... this. Adjust. Switch inferior before
14013 fetching registers.
14014 (regcache_invalidate_one): Adjust.
14015 (regcache_invalidate): Fix prototype.
14016 (new_register_cache): Return the new register cache.
14017 (free_register_cache): Change prototype.
14018 (realloc_register_cache): Adjust.
14019 (registers_to_string): Change prototype to take a regcache. Adjust.
14020 (registers_from_string): Ditto.
14021 (register_data): Ditto.
14022 (supply_register): Ditto.
14023 (supply_register_by_name): Ditto.
14024 (collect_register): Ditto.
14025 (collect_register_as_string): Ditto.
14026 (collect_register_by_name): Ditto.
14027 * server.c (process_serial_event): Adjust.
14028 * linux-low.h (regset_fill_func, regset_store_func): Change
14029 prototype.
14030 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14031 Change prototype.
14032 * linux-low.c (get_stop_pc): Adjust.
14033 (check_removed_breakpoint): Adjust.
14034 (linux_wait_for_event): Adjust.
14035 (linux_resume_one_lwp): Adjust.
14036 (fetch_register): Add regcache parameter. Adjust.
14037 (usr_store_inferior_registers): Ditto.
14038 (regsets_fetch_inferior_registers): Ditto.
14039 (regsets_store_inferior_registers): Ditto.
14040 (linux_fetch_registers, linux_store_registers): Ditto.
14041 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14042 regcache. Adjust.
14043 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14044 Ditto.
14045 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14046 prototype to take a regcache.
14047 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14048 * remote-utils.c (convert_ascii_to_int, outreg)
14049 (prepare_resume_reply): Change prototype to take a regcache.
14050 Adjust.
14051 * target.h (struct target_ops) <fetch_registers, store_registers>:
14052 Change prototype to take a regcache.
14053 (fetch_inferior_registers, store_inferior_registers): Change
14054 prototype to take a regcache. Adjust.
14055 * proc-service.c (ps_lgetregs): Adjust.
14056 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14057 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14058 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14059 take a regcache. Adjust.
14060 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14061 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14062 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14063 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14064 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14065 (cris_cannot_fetch_register):
14066 (cris_breakpoint_at): Change prototype to take a regcache.
14067 Adjust.
14068 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14069 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14070 to take a regcache. Adjust.
14071 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14072 Adjust.
14073 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14074 take a regcache. Adjust.
14075 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14076 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14077 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14078 * linux-mips-low.c (mips_get_pc):
14079 (mips_set_pc): Change prototype to take a regcache. Adjust.
14080 (mips_reinsert_addr): Adjust.
14081 (mips_collect_register): Change prototype to take a regcache.
14082 Adjust.
14083 (mips_supply_register):
14084 (mips_collect_register_32bit, mips_supply_register_32bit)
14085 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14086 (mips_store_fpregset): Ditto.
14087 * linux-ppc-low.c (ppc_supply_ptrace_register)
14088 (ppc_supply_ptrace_register): Ditto.
14089 (parse_spufs_run): Adjust.
14090 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14091 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14092 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14093 take a regcache. Adjust.
14094 * linux-s390-low.c (s390_collect_ptrace_register)
14095 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14096 (s390_set_pc): Change prototype to take a regcache. Adjust.
14097 (s390_arch_setup): Adjust.
14098 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14099 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14100 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14101 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14102 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14103 regcache. Adjust.
14104 (sparc_breakpoint_at): Adjust.
14105 * linux-xtensa-low.c (xtensa_fill_gregset):
14106 (xtensa_store_gregset):
14107 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14108 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14109 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14110 prototype to take a regcache. Adjust.
14111 * win32-arm-low.c (arm_fetch_inferior_register)
14112 (arm_store_inferior_register): Change prototype to take a
14113 regcache. Adjust.
14114 * win32-i386-low.c (i386_fetch_inferior_register)
14115 (i386_store_inferior_register): Change prototype to take a
14116 regcache. Adjust.
14117 * win32-low.c (child_fetch_inferior_registers)
14118 (child_store_inferior_registers): Change prototype to take a
14119 regcache. Adjust.
14120 (win32_wait): Adjust.
14121 (win32_fetch_inferior_registers): Change prototype to take a
14122 regcache. Adjust.
14123 (win32_store_inferior_registers): Adjust.
14124 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14125 store_inferior_register>: Change prototype to take a regcache.
14126
14127 2010-01-20 Doug Evans <dje@google.com>
14128
14129 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14130 #ifdef.
14131 (linux_wait_for_event1, linux_init_signals): Ditto.
14132 (W_STOPCODE): Provide definition if missing.
14133
14134 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14135
14136 * linux-low.c (linux_core_of_thread): New.
14137 (compare_ints, show_process, list_threads): New.
14138 (linux_qxfer_osdata): Report threads and cores.
14139 (linux_target_op): Register linux_core_of_thread.
14140 * remote-utils.c (prepare_resume_reply): Report the core.
14141 (buffer_xml_printf): Support %d specifier.
14142 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14143 New.
14144 (handle_query): Handle qXfer:threads. Announce availability
14145 thereof.
14146 * target.h (struct target_ops): New field core_of_thread.
14147
14148 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14149
14150 * Makefile.in (clean): Remove new generated files.
14151 (reg-s390.o, reg-s390.c): Remove rules.
14152 (reg-s390x.o, reg-s390x.c): Likewise.
14153 (s390-linux32.o, s390-linux32.c): Add rules.
14154 (s390-linux64.o, s390-linux64.c): Likewise.
14155 (s390x-linux64.o, s390x-linux64.c): Likewise.
14156 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14157 * linux-s390-low.c: Include <elf.h>.
14158 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14159 (init_registers_s390): Remove prototype.
14160 (init_registers_s390x): Likewise.
14161 (init_registers_s390_linux32): Add prototype.
14162 (init_registers_s390_linux64): Likewise.
14163 (init_registers_s390x_linux64): Likewise.
14164 (s390_num_regs_3264): New define.
14165 (s390_regmap_3264): New global variable.
14166 (s390_cannot_fetch_register): Remove obsolete check.
14167 (s390_cannot_store_register): Likewise.
14168 (s390_collect_ptrace_register): Handle upper/lower register halves.
14169 (s390_supply_ptrace_register): Likewise.
14170 (s390_fill_gregset): Update to register number changes.
14171 (s390_get_hwcap): New routine.
14172 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14173 Install appropriate regmap and register set.
14174
14175 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14176
14177 * server.c (gdbserver_version): Update copyright year to 2010.
14178 * gdbreplay.c (gdbreplay_version): Likewise.
14179
14180 2009-12-28 Doug Evans <dje@google.com>
14181
14182 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14183 elf/external.h. Include <elf.h> instead but only if necessary.
14184
14185 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14186
14187 * linux-low.c (linux_remove_process): Remove `detaching'
14188 parameter. Don't release/detach from thread_db here.
14189 (linux_kill): Release/detach from thread_db here, ...
14190 (linux_detach): ... and here, before actually detaching.
14191 (linux_wait_1): ... and here, when a process exits.
14192 * thread-db.c (any_thread_of): New.
14193 (thread_db_free): Switch the current inferior to a thread of the
14194 passed in process.
14195
14196 2009-12-21 Doug Evans <dje@google.com>
14197
14198 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14199
14200 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14201 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14202 warning ifndef __NR_tkill. Move setting of errno there too.
14203 Delete unnecessary resetting of errno after syscall.
14204 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14205
14206 * configure.ac: Check for dladdr.
14207 * config.in: Regenerate.
14208 * configure: Regenerate.
14209 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14210 (try_thread_db_load): Update.
14211
14212 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14213
14214 2009-12-18 Doug Evans <dje@google.com>
14215
14216 * event-loop.c: Include unistd.h if it exists.
14217
14218 * linux-low.c (my_waitpid): Move definition away from being in
14219 between linux_tracefork_child/linux_test_for_tracefork.
14220
14221 * gdb_proc_service.h (psaddr_t): Fix type.
14222 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14223 signature to match glibc.
14224
14225 2009-12-16 Doug Evans <dje@google.com>
14226
14227 * linux-low.c (linux_read_memory): Fix argument to read.
14228
14229 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14230
14231 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14232 events, don't leave current_inferior pointing at null.
14233
14234 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14235
14236 * win32-low.c (LOG): Delete.
14237 (OUTMSG): Output to stderr.
14238 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14239 on compile time LOG macro.
14240 (win32_wait): Fix debug output.
14241
14242 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14243
14244 * win32-low.c (win32_add_one_solib): If the dll name is
14245 "ntdll.dll", prepend the system directory to the dll path.
14246
14247 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14248
14249 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14250
14251 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14252 Vladimir Prus <vladimir@codesourcery.com>
14253
14254 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14255 * configure.ac: Check for __mcoldfire__ and set
14256 gdb_cv_m68k_is_coldfire.
14257 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14258 reg-cf.o and reg-m68k.o.
14259 * configure: Regenerated.
14260
14261 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14262
14263 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14264 Pass it to thread_db_free.
14265 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14266 proper `detaching' argument to linux_remove_process.
14267 * linux-low.h (thread_db_free): Add `detaching' parameter.
14268 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14269 to thread_db_free.
14270 (thread_db_free): Add `detaching' parameter. Only
14271 call td_ta_clear_event if detaching from process.
14272
14273 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14274
14275 * thread-db.c (thread_db_free): Fix typo.
14276
14277 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14278
14279 PR gdb/10838
14280 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14281
14282 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14283
14284 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14285 with an i686 compiler.
14286 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14287 needed.
14288 * configure: Rebuilt.
14289
14290 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14291
14292 PR gdb/10783
14293
14294 * server.c (handle_search_memory_1): Correct read_addr initialization
14295 in loop for searching subsequent chunks.
14296
14297 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14298
14299 * configure.ac: New --with-libthread-db option.
14300 * thread-db.c: Allow direct dependence on libthread_db.
14301 (thread_db_free): Adjust.
14302 * config.in: Regenerate.
14303 * configure: Likewise.
14304
14305 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14306
14307 PR gdb/10757
14308 * thread-db.c (attach_thread): New function.
14309 (maybe_attach_thread): Return success/failure.
14310 (find_new_threads_callback): Adjust.
14311 (thread_db_find_new_threads): Loop until no new threads.
14312
14313 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14314
14315 * proc-service.c (ps_lgetregs): Formatting.
14316
14317 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14318
14319 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14320 * configure.ac: Adjust.
14321 * linux-low.h (struct process_info_private): Move members to struct
14322 thread_db.
14323 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14324 * linux-low.c (linux_remove_process): Adjust.
14325 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14326 * server.c (handle_query): Move code ...
14327 (handle_monitor_command): ... here. New function.
14328 * target.h (struct target_ops): New member.
14329 * thread-db.c (struct thread_db): New.
14330 (libthread_db_search_path): New variable.
14331 (thread_db_create_event, thread_db_enable_reporting)
14332 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14333 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14334 (try_thread_db_load_1, dladdr_to_soname): New functions.
14335 (try_thread_db_load, thread_db_load_search): New functions.
14336 (thread_db_init): Search for libthread_db.
14337 (thread_db_free): New function.
14338 (thread_db_handle_monitor_command): Likewise.
14339 * config.in: Regenerate.
14340 * configure: Regenerate.
14341
14342 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14343
14344 * spu-low.c (spu_kill): Wait for inferior to terminate.
14345 Call clear_inferiors.
14346 (spu_detach): Call clear_inferiors.
14347
14348 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14349
14350 * aclocal.m4: Regenerate.
14351 * config.in: Likewise.
14352 * configure: Likewise.
14353
14354 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14355
14356 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14357 (parse_spufs_run): New function.
14358 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14359 (ppc_breakpoint_at): Handle SPU breakpoints.
14360
14361 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14362
14363 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14364 (SPUFS_MAGIC): Define.
14365 (spu_enumerate_spu_ids): New function.
14366 (linux_qxfer_spu): New function.
14367 (linux_target_ops): Install linux_qxfer_spu.
14368
14369 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14370
14371 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14372 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14373 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14374 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14375 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14376 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14377 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14378 (init_registers_powerpc_cell32l): Add prototype.
14379 (init_registers_powerpc_cell64l): Likewise.
14380 (ppc_arch_setup): Detect Cell/B.E. architecture.
14381
14382 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14383
14384 * Makefile.in (datarootdir): New variable.
14385
14386 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14387
14388 * linux-low.c (linux_write_memory): Update debugging output.
14389 * Makefile.in (clean): Add new descriptions.
14390 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14391 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14392 * configure.srv: Add new files for arm*-*-linux*.
14393 * linux-arm-low.c: Add new declarations.
14394 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14395 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14396 (HWCAP_VFPv3D16): New.
14397 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14398 instead of __IWMMXT__.
14399 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14400 (arm_arch_setup): New.
14401 (target_regsets): Remove #ifdef. Add VFP regset.
14402 (the_low_target): Use arm_arch_setup.
14403
14404 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14405
14406 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14407 the main thread again.
14408
14409 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14410
14411 Adding Neutrino gdbserver.
14412 * configure: Regenerated.
14413 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14414 * configure.srv (i[34567]86-*-nto*): New target.
14415 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14416 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14417 (nto_comctrl) [__QNX__]: New function.
14418 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14419
14420 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14421
14422 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14423 srv_tgtobj.
14424
14425 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14426 Pedro Alves <pedro@codesourcery.com>
14427
14428 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14429 don't support CONTEXT_EXTENDED_REGISTERS.
14430 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14431 (the_low_target): Install them.
14432 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14433 failing with ERROR_PIPE_NOT_CONNECTED.
14434
14435 2009-06-30 Doug Evans <dje@google.com>
14436 Pierre Muller <muller@ics.u-strasbg.fr>
14437
14438 Add h/w watchpoint support to x86-linux, win32-i386.
14439 * Makefile.in (SFILES): Add i386-low.c
14440 (i386_low_h): Define.
14441 (i386-low.o): Add dependencies.
14442 (linux-x86-low.o): Add i386-low.h dependency.
14443 (win32-i386-low.o): Ditto.
14444 * i386-low.c: New file.
14445 * i386-low.h: New file.
14446 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14447 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14448 * linux-low.c (linux_add_process): Initialize arch_private.
14449 (linux_remove_process): Free arch_private.
14450 (add_lwp): Initialize arch_private.
14451 (delete_lwp): Free arch_private.
14452 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14453 provided.
14454 * linux-low.h (process_info_private): New member arch_private.
14455 (lwp_info): New member arch_private.
14456 (linux_target_ops): New members new_process, new_thread,
14457 prepare_to_resume.
14458 (ptid_of): New macro.
14459 * linux-x86-low.c: Include stddef.h, i386-low.h.
14460 (arch_process_info): New struct.
14461 (arch_lwp_info): New struct.
14462 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14463 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14464 (i386_dr_low_get_status): New function.
14465 (x86_insert_point, x86_remove_point): New functions.
14466 (x86_stopped_by_watchpoint): New function.
14467 (x86_stopped_data_address): New function.
14468 (x86_linux_new_process, x86_linux_new_thread): New functions.
14469 (x86_linux_prepare_to_resume): New function.
14470 (the_low_target): Add entries for insert_point, remove_point,
14471 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14472 prepare_to_resume.
14473 * server.c (debug_hw_points): New global.
14474 (monitor_show_help): Document set debug-hw-points.
14475 (handle_query): Process "set debug-hw-points".
14476 * server.h (debug_hw_points): Declare.
14477 (paddress): Declare.
14478 * utils.c (NUMCELLS, CELLSIZE): New macros.
14479 (get_sell, xsnprintf, paddress): New functions.
14480 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14481 remove_point, stopped_by_watchpoint, stopped_data_address.
14482 * win32-i386-low.c: Include i386-low.h.
14483 (debug_reg_state): Replaces dr.
14484 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14485 (i386_dr_low_get_status): New function.
14486 (i386_insert_point, i386_remove_point): New functions.
14487 (i386_stopped_by_watchpoint): New function.
14488 (i386_stopped_data_address): New function.
14489 (i386_initial_stuff): Update.
14490 (get_thread_context,set_thread_context,i386_thread_added): Update.
14491 (the_low_target): Add entries for insert_point,
14492 remove_point, stopped_by_watchpoint, stopped_data_address.
14493 * win32-low.c (win32_insert_watchpoint): New function.
14494 (win32_remove_watchpoint): New function.
14495 (win32_stopped_by_watchpoint): New function.
14496 (win32_stopped_data_address): New function.
14497 (win32_target_ops): Add entries for insert_watchpoint,
14498 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14499 * win32-low.h (win32_target_ops): New members insert_point,
14500 remove_point, stopped_by_watchpoint, stopped_data_address.
14501
14502 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14503
14504 * server.c (process_serial_event): Re-return unsupported, not
14505 error, if the type isn't recognized. Re-allow supporting only
14506 insert or remove packets. Also call require_running for
14507 breakpoints. Add missing break statement to default case. Tidy.
14508 * target.h (struct target_ops): Rename insert_watchpoint to
14509 insert_point, and remove_watchpoint to remove_point.
14510
14511 * linux-low.h (struct linux_target_ops): Likewise.
14512 * linux-low.c (linux_insert_watchpoint): Rename to ...
14513 (linux_insert_point): ... this. Adjust.
14514 (linux_remove_watchpoint): Rename to ...
14515 (linux_remove_point): ... this. Adjust.
14516 (linux_target_ops): Adjust.
14517 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14518 (cris_insert_point): ... this.
14519 (cris_remove_watchpoint): Rename to ...
14520 (cris_remove_point): ... this.
14521 (the_low_target): Adjust.
14522
14523 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14524
14525 * server.c (handle_v_kill): Pass signal_pid to
14526 kill_inferior if multi_process is zero.
14527
14528 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14529
14530 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14531 * target.h (target_ops): Comment for *_watchpoint to make it clear
14532 the functions can get types '0' and '1'.
14533
14534 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14535
14536 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14537 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14538 * regcache.c (get_regcache): Likewise.
14539 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14540 * win32-low.c (child_fetch_inferior_registers): Remove check for
14541 regno 0.
14542
14543 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14544 Pedro Alves <pedro@codesourcery.com>
14545
14546 * target.h (struct target_ops) <supports_multi_process>: New
14547 callback.
14548 (target_supports_multi_process): New.
14549 * server.c (handle_query): Even if GDB reports support, only
14550 enable multi-process if the target also supports it. Report
14551 multi-process support only if the target backend supports it.
14552 * linux-low.c (linux_supports_multi_process): New function.
14553 (linux_target_ops): Install it as target_supports_multi_process
14554 callback.
14555
14556 2009-05-24 Doug Evans <dje@google.com>
14557
14558 Global renaming of find_thread_pid to find_thread_ptid.
14559 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14560 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14561 All callers updated.
14562
14563 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14564 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14565 directly.
14566
14567 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14568 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14569 (linux_resume_one_lwp): Ditto.
14570
14571 2009-05-23 Doug Evans <dje@google.com>
14572
14573 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14574 from struct inferior_list_entry * to struct lwp_info *.
14575 All callers updated.
14576
14577 2009-05-13 Doug Evans <dje@google.com>
14578
14579 * linux-x86-low.c: Don't include assert.h.
14580 (x86_siginfo_fixup): Use fatal, not assert.
14581 (x86_arch_setup): Fix comment.
14582
14583 2009-05-12 Doug Evans <dje@google.com>
14584
14585 Biarch support for i386/amd64 gdbserver.
14586 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14587 Add linux-x86-low.c.
14588 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14589 (linux-x86-low.o): Add.
14590 * linux-x86-64-low.c: Delete.
14591 * linux-i386-low.c: Delete.
14592 * linux-x86-low.c: New file.
14593 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14594 linux-x86-low.o.
14595 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14596 linux-x86-low.o.
14597 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14598 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14599 (linux_child_pid_to_exec_file): New function.
14600 (elf_64_header_p, elf_64_file_p): New functions.
14601 (siginfo_fixup): New function.
14602 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14603 give target a chance to convert layout.
14604 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14605 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14606
14607 2009-05-07 Doug Evans <dje@google.com>
14608
14609 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14610 (regsets_store_inferior_registers): Ditto.
14611
14612 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14613
14614 PR server/10048
14615
14616 * linux-low.c (must_set_ptrace_flags): Delete.
14617 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14618 of the global.
14619 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14620 `lwp->must_set_ptrace_flags' instead.
14621 (linux_wait_for_event_1): Set ptrace options here.
14622 (linux_wait_1): ... not here.
14623
14624 2009-04-30 Doug Evans <dje@google.com>
14625
14626 * inferiors.c (started_inferior_callback): New function.
14627 (attached_inferior_callback): New function.
14628 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14629 * server.c (print_started_pid, print_attached_pid): New functions.
14630 (detach_or_kill_for_exit): New function.
14631 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14632 * server.h (have_started_inferiors_p): Declare.
14633 (have_attached_inferiors_p): Declare.
14634
14635 * inferiors.c (remove_process): Fix memory leak, free process.
14636 * linux-low.c (linux_remove_process): New function.
14637 (linux_kill): Call it instead of remove_process.
14638 (linux_detach, linux_wait_1): Ditto.
14639
14640 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14641
14642 * configure.srv: Add x86 Windows CE target.
14643
14644 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14645
14646 * inferiors.c (get_thread_process): Make global.
14647 * server.h (get_thread_process): Add prototype.
14648 * thread-db.c (find_one_thread): Use get_thread_process
14649 instead of current_process.
14650 (thread_db_get_tls_address): Do not crash if called when
14651 thread layer is not yet initialized.
14652
14653 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14654
14655 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14656 * spu-low.c (current_tid): Rename to ...
14657 (current_ptid): ... this.
14658 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14659 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14660 ptid_get_lwp (current_ptid) instead of current_tid.
14661 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14662 instead of current_tid. Use find_process_pid to verify pid
14663 argument is valid. Pass proper argument to remove_process.
14664 (spu_thread_alive): Compare current_ptid instead of current_tid.
14665 (spu_resume): Likewise.
14666
14667 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14668
14669 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14670 variable.
14671
14672 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14673
14674 Implement the multiprocess extensions, and add linux multiprocess
14675 support.
14676
14677 * server.h (ULONGEST): Declare.
14678 (struct ptid, ptid_t): New.
14679 (minus_one_ptid, null_ptid): Declare.
14680 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14681 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14682 (struct inferior_list_entry): Change `id' type from unsigned from
14683 to ptid_t.
14684 (struct sym_cache, struct breakpoint, struct
14685 process_info_private): Forward declare.
14686 (struct process_info): Declare.
14687 (current_process): Declare.
14688 (all_processes): Declare.
14689 (initialize_inferiors): Declare.
14690 (add_thread): Adjust to use ptid_t.
14691 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14692 (add_process, remove_process, find_thread_pid): Declare.
14693 (find_inferior_id): Adjust to use ptid_t.
14694 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14695 (multi_process): Declare.
14696 (push_event): Adjust to use ptid_t.
14697 (read_ptid, write_ptid): Declare.
14698 (prepare_resume_reply): Adjust to use ptid_t.
14699 (clear_symbol_cache): Declare.
14700 * inferiors.c (all_processes): New.
14701 (null_ptid, minus_one_ptid): New.
14702 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14703 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14704 (add_thread): Change unsigned long to ptid. Remove gdb_id
14705 parameter. Adjust.
14706 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14707 (gdb_id_to_thread): Rename to ...
14708 (find_thread_pid): ... this. Change unsigned long to ptid.
14709 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14710 (loaded_dll, pull_pid_from_list): Adjust.
14711 (add_process, remove_process, find_process_pid)
14712 (get_thread_process, current_process, initialize_inferiors): New.
14713 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14714 (struct target_waitstatus) <related_pid>: Ditto.
14715 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14716 return type to int.
14717 (struct target_ops) <join>: Add `pid' argument.
14718 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14719 (struct target_ops) <wait>: Add `ptid' field. Change return type
14720 to ptid.
14721 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14722 (mywait): Add `ptid' argument. Change return type to ptid_t.
14723 (target_pid_to_str): Declare.
14724 * target.c (set_desired_inferior): Adjust to use ptids.
14725 (mywait): Add new `ptid' argument. Adjust.
14726 (target_pid_to_str): New.
14727 * mem-break.h (free_all_breakpoints): Declare.
14728 * mem-break.c (breakpoints): Delelete.
14729 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14730 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14731 to use per-process breakpoint list.
14732 (free_all_breakpoints): New.
14733 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14734 (symbol_cache, all_symbols_looked_up): Delete.
14735 (hexchars): New.
14736 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14737 read_ptid): New.
14738 (prepare_resume_reply): Change ptid argument's type from unsigned
14739 long to ptid_t. Adjust. Implement W;process and X;process.
14740 (free_sym_cache, clear_symbol_cache): New.
14741 (look_up_one_symbol): Adjust to per-process symbol cache. *
14742 * server.c (cont_thread, general_thread, step_thread): Change type
14743 to ptid_t.
14744 (attached): Delete.
14745 (multi_process): New.
14746 (last_ptid): Change type to ptid_t.
14747 (struct vstop_notif) <ptid>: Change type to ptid_t.
14748 (queue_stop_reply, push_event): Change `ptid' argument's type to
14749 ptid_t.
14750 (discard_queued_stop_replies): Add `pid' argument.
14751 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14752 changes. Don't reference the `attached' global.
14753 (attach_inferior): Adjust to mywait interface changes.
14754 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14755 features. Handle and report "multiprocess+". Handle
14756 "qAttached:PID".
14757 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14758 changes.
14759 (handle_v_kill): New.
14760 (handle_v_stopped): Adjust to use target_pid_to_str.
14761 (handle_v_requests): Allow multiple attaches and runs when
14762 multiprocess extensions are in effect. Handle "vKill".
14763 (myresume): Adjust to use ptids.
14764 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14765 (handle_status): Adjust to discard_queued_stop_replies interface
14766 change.
14767 (first_thread_of, kill_inferior_callback)
14768 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14769 (main): Call initialize_inferiors. Adjust to use ptids, killing
14770 and detaching from all inferiors. Handle multiprocess packet
14771 variants.
14772 * linux-low.h: Include gdb_proc_service.h.
14773 (struct process_info_private): New.
14774 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14775 <lwpid_of>: Use ptid_get_lwp.
14776 (get_lwp_thread): Adjust.
14777 (struct lwp_info): Add `dead' member.
14778 (find_lwp_pid): Declare.
14779 * linux-low.c (thread_db_active): Delete.
14780 (new_inferior): Adjust comment.
14781 (inferior_pid): Delete.
14782 (linux_add_process): New.
14783 (handle_extended_wait): Adjust.
14784 (add_lwp): Change unsigned long to ptid.
14785 (linux_create_inferior): Add process to processes table. Adjust
14786 to use ptids. Don't set new_inferior here.
14787 (linux_attach_lwp): Rename to ...
14788 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14789 it. Adjust to use ptids.
14790 (linux_attach_lwp): New.
14791 (linux_attach): Add process to processes table. Don't set
14792 new_inferior here.
14793 (struct counter): New.
14794 (second_thread_of_pid_p, last_thread_of_process_p): New.
14795 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14796 multiple processes.
14797 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14798 processes. Remove process from process table.
14799 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14800 to multiple processes.
14801 (any_thread_of): New.
14802 (linux_detach): Add `pid' argument, and handle it. Remove process
14803 from processes table.
14804 (linux_join): Add `pid' argument. Handle it.
14805 (linux_thread_alive): Change unsighed long argument to ptid_t.
14806 Consider dead lwps as not being alive.
14807 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14808 threads we're not interested in.
14809 (same_lwp, find_lwp_pid): New.
14810 (linux_wait_for_lwp): Change `pid' argument's type from int to
14811 ptid_t. Adjust.
14812 (linux_wait_for_event): Rename to ...
14813 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14814 from int to ptid_t. Adjust.
14815 (linux_wait_for_event): New.
14816 (linux_wait_1): Add `ptid' argument. Change return type to
14817 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14818 that exit from the process table.
14819 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14820 Adjust.
14821 (mark_lwp_dead): New.
14822 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14823 stopping all threads, mark its main lwp as dead.
14824 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14825 ptids.
14826 (fetch_register, usr_store_inferior_registers)
14827 (regsets_fetch_inferior_registers)
14828 (regsets_store_inferior_registers, linux_read_memory)
14829 (linux_write_memory): Inline `inferior_pid'.
14830 (linux_look_up_symbols): Adjust to use per-process
14831 `thread_db_active'.
14832 (linux_request_interrupt): Adjust to use ptids.
14833 (linux_read_auxv): Inline `inferior_pid'.
14834 (initialize_low): Don't reference thread_db_active.
14835 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14836 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14837 (ps_getpid): Return the pid of the current inferior.
14838 * thread-db.c (proc_handle, thread_agent): Delete.
14839 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14840 per-process data.
14841 (find_one_thread): Change argument type to ptid_t. Adjust to
14842 per-process data.
14843 (maybe_attach_thread): Adjust to per-process data and ptids.
14844 (thread_db_find_new_threads): Ditto.
14845 (thread_db_init): Ditto.
14846 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14847 processes table. Adjust to use ptids.
14848 (spu_kill, spu_detach): Adjust interface. Remove process from
14849 processes table.
14850 (spu_join, spu_thread_alive): Adjust interface.
14851 (spu_wait): Adjust interface. Remove process from processes
14852 table. Adjust to use ptids.
14853 * win32-low.c (current_inferior_tid): Delete.
14854 (current_inferior_ptid): New.
14855 (debug_event_ptid): New.
14856 (thread_rec): Take a ptid. Adjust.
14857 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14858 (child_delete_thread): Ditto.
14859 (do_initial_child_stuff): Add `attached' argument. Add process to
14860 processes table.
14861 (child_fetch_inferior_registers, child_store_inferior_registers):
14862 Adjust.
14863 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14864 (win32_attach): Pass 1 to do_initial_child_stuff.
14865 (win32_kill): Adjust interface. Remove process from processes
14866 table.
14867 (win32_detach): Ditto.
14868 (win32_join): Adjust interface.
14869 (win32_thread_alive): Take a ptid.
14870 (win32_resume): Adjust to use ptids.
14871 (get_child_debug_event): Ditto.
14872 (win32_wait): Adjust interface. Remove exiting process from
14873 processes table.
14874
14875 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14876
14877 Non-stop mode support.
14878
14879 * server.h (non_stop): Declare.
14880 (gdb_client_data, handler_func): Declare.
14881 (delete_file_handler, add_file_handler, start_event_loop):
14882 Declare.
14883 (handle_serial_event, handle_target_event, push_event)
14884 (putpkt_notif): Declare.
14885 * target.h (enum resume_kind): New.
14886 (struct thread_resume): Replace `step' field by `kind' field.
14887 (TARGET_WNOHANG): Define.
14888 (struct target_ops) <wait>: Add `options' argument.
14889 <supports_non_stop, async, start_non_stop>: New fields.
14890 (target_supports_non_stop, target_async): New.
14891 (start_non_stop): Declare.
14892 (mywait): Add `options' argument.
14893 * target.c (mywait): Add `options' argument. Print child exit
14894 notifications here.
14895 (start_non_stop): New.
14896 * server.c (non_stop, own_buf, mem_buf): New globals.
14897 (struct vstop_notif): New.
14898 (notif_queue): New global.
14899 (queue_stop_reply, push_event, discard_queued_stop_replies)
14900 (send_next_stop_reply): New.
14901 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14902 interface changes.
14903 (attach_inferior): In non-stop mode, don't wait for the target
14904 here.
14905 (handle_general_set): Handle QNonStop.
14906 (handle_query): When handling qC, return the current general
14907 thread, instead of the first thread of the list.
14908 (handle_query): If the backend supports non-stop mode, include
14909 QNonStop+ in the qSupported query response.
14910 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14911 and non-stop mode.
14912 (handle_v_attach, handle_v_run): Handle non-stop mode.
14913 (handle_v_stopped): New.
14914 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14915 (myresume): Adjust to use resume_kind. Handle non-stop.
14916 (queue_stop_reply_callback): New.
14917 (handle_status): Handle non-stop mode.
14918 (main): Clear non_stop flag on reconnection. Use the event-loop.
14919 Refactor serial protocol handling from here ...
14920 (process_serial_event): ... to this new function. When GDB
14921 selects any thread, select one here. In non-stop mode, wait until
14922 GDB acks all pending events before exiting.
14923 (handle_serial_event, handle_target_event): New.
14924 * remote-utils.c (remote_open): Install remote_desc in the event
14925 loop.
14926 (remote_close): Remove remote_desc from the event loop.
14927 (putpkt_binary): Rename to...
14928 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14929 (putpkt_binary): New as wrapper around putpkt_binary_1.
14930 (putpkt_notif): New.
14931 (prepare_resume_reply): In non-stop mode, don't change the
14932 general_thread.
14933 * event-loop.c: New.
14934 * Makefile.in (OBJ): Add event-loop.o.
14935 (event-loop.o): New rule.
14936
14937 * linux-low.h (pid_of): Moved here.
14938 (lwpid_of): New.
14939 (get_lwp_thread): Use lwpid_of.
14940 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14941 * linux-low.c (pid_of): Delete.
14942 (inferior_pid): Use lwpid_of.
14943 (linux_event_pipe): New.
14944 (target_is_async_p): New.
14945 (delete_lwp): New.
14946 (handle_extended_wait): Use lwpid_of.
14947 (add_lwp): Don't set lwpid field.
14948 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14949 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14950 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14951 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14952 first. Adjust to linux_wait_for_event interface changes. Use
14953 lwpid_of.
14954 (linux_detach): Don't delete the main lwp here.
14955 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14956 (status_pending_p): Don't consider explicitly suspended lwps.
14957 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14958 pointer. Add OPTIONS argument. Change return type to int. Use
14959 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14960 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14961 pointer. Add status pointer argument. Return a pid instead of a
14962 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14963 changes. In non-stop mode, don't switch to a random thread.
14964 (linux_wait): Rename to...
14965 (linux_wait_1): ... this. Add target_options argument, and handle
14966 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14967 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14968 clean exit and signal exit code. Don't stop all threads in
14969 non-stop mode. In all-stop mode, only stop all threads when
14970 reporting a stop to GDB. Handle explicit thread stop requests.
14971 (async_file_flush, async_file_mark): New.
14972 (linux_wait): New.
14973 (send_sigstop): Use lwpid_of.
14974 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14975 interface changes. In non-stop mode, don't switch to a random
14976 thread.
14977 (linux_resume_one_lwp): Use lwpid_of.
14978 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14979 (linux_resume_one_thread): ... this. Handle resume_stop. In
14980 non-stop mode, don't look for pending flag in all threads.
14981 (resume_status_pending_p): Don't consider explicitly suspended
14982 threads.
14983 (my_waitpid): Reimplement. Emulate __WALL.
14984 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14985 Use lwpid_of.
14986 (sigchld_handler, linux_supports_non_stop, linux_async)
14987 (linux_start_non_stop): New.
14988 (linux_target_ops): Register linux_supports_non_stop, linux_async
14989 and linux_start_non_stop.
14990 (initialize_low): Install SIGCHLD handler.
14991 * thread-db.c (thread_db_create_event, find_one_thread)
14992 (thread_db_get_tls_address): Use lwpid_of.
14993 * win32-low.c (win32_detach): Adjust to use resume_kind.
14994 (win32_wait): Add `options' argument.
14995 * spu-low.c (spu_resume): Adjust to use resume_kind.
14996 (spu_wait): Add `options' argument.
14997
14998 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14999
15000 Decouple target code from remote protocol.
15001
15002 * target.h (enum target_waitkind): New.
15003 (struct target_waitstatus): New.
15004 (struct target_ops) <wait>: Return an unsigned long. Take a
15005 target_waitstatus pointer instead of a char pointer.
15006 (mywait): Likewise.
15007 * target.c (mywait): Change prototype to return an unsigned long.
15008 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15009 * server.h (thread_from_wait, old_thread_from_wait): Delete
15010 declarations.
15011 (prepare_resume_reply): Change prototype to take a
15012 target_waitstatus.
15013 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15014 (last_status, last_ptid): New.
15015 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15016 pid instead of a signal.
15017 (attach_inferior): Remove "status" and "signal" parameters.
15018 Adjust.
15019 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15020 not as an address.
15021 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15022 (handle_v_requests, myresume): Remove "status" and "signal"
15023 parameters. Adjust.
15024 (handle_status): New.
15025 (main): Delete local `status'. Adjust.
15026 * remote-utils.c: Include target.h.
15027 (prepare_resume_reply): Change prototype to take a
15028 target_waitstatus. Adjust.
15029
15030 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15031 interface.
15032 * spu-low.c (spu_wait): Adjust.
15033 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15034 Delete.
15035 (win32_wait): Adjust.
15036
15037 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15038
15039 * target.h (struct thread_resume): Delete leave_stopped member.
15040 (struct target_ops): Add a `n' argument to the `resume' callback.
15041 * server.c (start_inferior): Adjust.
15042 (handle_v_cont, myresume): Adjust.
15043 * linux-low.c (check_removed_breakpoint): Adjust to resume
15044 interface change, and to removed leave_stopped field.
15045 (resume_ptr): Delete.
15046 (struct thread_resume_array): New.
15047 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15048 resume interface change.
15049 (linux_continue_one_thread, linux_queue_one_thread)
15050 (resume_status_pending_p): Check if the resume field is NULL
15051 instead of checking the leave_stopped member.
15052 (linux_resume): Adjust to the target resume interface change.
15053 * spu-low.c (spu_resume): Adjust to the target resume interface
15054 change.
15055 * win32-low.c (win32_detach, win32_resume): Ditto.
15056
15057 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15058
15059 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15060 flag.
15061 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15062 pending.
15063 (linux_continue_one_thread): Only preserve the stepping flag if
15064 there's a pending breakpoint.
15065
15066 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15067
15068 * server.c (main): After the inferior having exited, call
15069 remote_close before exiting gdbserver.
15070
15071 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15072
15073 Fix size of FPSCR in Power 7 processors.
15074 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15075 (PPC_FEATURE_HAS_DFP): New #define.
15076 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15077 size of the FPSCR.
15078
15079 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15080
15081 * server.c (handle_query) Whitespace and formatting.
15082
15083 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15084
15085 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15086 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15087 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15088 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15089 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15090 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15091 Makefile.in, configure.ac: Fix whitespace throughout.
15092 * configure: Regenerate.
15093
15094 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15095
15096 * inferiors.c (find_inferior): Make it safe for the callback
15097 function to delete the currently iterated inferior.
15098
15099 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15100
15101 * Makefile.in (linuw_low_h): Move higher.
15102 (thread-db.o): Depend on $(linux_low_h).
15103
15104 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15105
15106 Rename "process" to "lwp" throughout.
15107
15108 * linux-low.c (all_processes): Rename to...
15109 (all_lwps): ... this.
15110 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15111 (add_process): Rename to ...
15112 (add_lwp): ... this. Adjust.
15113 (linux_create_inferior): Adjust.
15114 (linux_attach_lwp): Adjust.
15115 (linux_attach): Adjust.
15116 (linux_kill_one_process): Rename to ...
15117 (linux_kill_one_lwp): ... this. Adjust.
15118 (linux_kill): Adjust.
15119 (linux_detach_one_process): Rename to ...
15120 (linux_detach_one_lwp): ... this. Adjust.
15121 (linux_detach): Adjust.
15122 (check_removed_breakpoint): Adjust.
15123 (status_pending_p): Adjust.
15124 (linux_wait_for_process): Rename to ...
15125 (linux_wait_for_lwp): ... this. Adjust.
15126 (linux_wait_for_event): Adjust.
15127 (send_sigstop): Adjust.
15128 (wait_for_sigstop): Adjust.
15129 (stop_all_processes): Rename to ...
15130 (stop_all_lwps): ... this.
15131 (linux_resume_one_process): Rename to ...
15132 (linux_resume_one_lwp): ... this. Adjust.
15133 (linux_set_resume_request, linux_continue_one_thread)
15134 (linux_queue_one_thread, resume_status_pending_p)
15135 (usr_store_inferior_registers, regsets_store_inferior_registers)
15136 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15137 Adjust.
15138 * linux-low.h (get_process): Rename to ...
15139 (get_lwp): ... this. Adjust.
15140 (get_thread_process): Rename to ...
15141 (get_thread_lwp): ... this. Adjust.
15142 (get_process_thread): Rename to ...
15143 (get_lwp_thread): ... this. Adjust.
15144 (struct process_info): Rename to ...
15145 (struct lwp_info): ... this.
15146 (all_processes): Rename to ...
15147 (all_lwps): ... this.
15148 * proc-service.c (ps_lgetregs): Adjust.
15149 * thread-db.c (thread_db_create_event, find_one_thread)
15150 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15151
15152 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15153
15154 * server.c (handle_query): Handle "qAttached".
15155
15156 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15157
15158 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15159 GPLv3, update license URL.
15160
15161 2009-03-01 Doug Evans <dje@google.com>
15162
15163 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15164 (server_h): Add gdb_signals.h.
15165 (signals.o): Update.
15166 * server.h (target_signal_from_host,target_signal_to_host_p)
15167 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15168
15169 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15170
15171 * remote-utils.c (getpkt): Also generate remote-debug
15172 information if noack_mode is set.
15173
15174 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15175
15176 * server.c (handle_query): Report qXfer:siginfo:read and
15177 qXfer:siginfo:write as supported and handle them.
15178 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15179 * linux-low.c (linux_xfer_siginfo): New.
15180 (linux_target_ops): Set it.
15181
15182 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15183
15184 * server.c (gdbserver_usage): Mention --remote-debug.
15185 (main): Accept '--remote-debug' switch.
15186
15187 2009-01-18 Doug Evans <dje@google.com>
15188
15189 * regcache.c (new_register_cache): No need to check result of xcalloc.
15190 * server.c (handle_search_memory): Back out calls to xmalloc,
15191 result is checked and error is returned to user upon failure.
15192 (handle_query): Ditto. Add more checks for result of malloc.
15193 (handle_v_cont): Check result of malloc, report error back to
15194 user upon failure.
15195 (handle_v_run): Ditto. Call freeargv.
15196 * server.h (freeargv): Declare.
15197 * utils.c (freeargv): New fn.
15198
15199 2009-01-15 Doug Evans <dje@google.com>
15200
15201 * gdbreplay.c (perror_with_name): Make arg const char *.
15202 * server.h (target_signal_to_name): Make return type const char *.
15203 * thread-db.c (thread_db_err_str): Make return type const char *.
15204 * utils.c (perror_with_name): Make arg const char *.
15205
15206 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15207
15208 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15209 when handling a EXIT_PROCESS_DEBUG_EVENT.
15210
15211 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15212
15213 * gdbreplay.c (gdbreplay_version): Update copyright year.
15214 * server.c (gdbserver_version): Likewise.
15215
15216 2009-01-05 Doug Evans <dje@google.com>
15217
15218 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15219 (handle_extended_wait): Improve comment.
15220
15221 2008-12-13 Doug Evans <dje@google.com>
15222
15223 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15224 * server.h (ATTR_MALLOC): New macro.
15225 (xmalloc,xcalloc,xstrdup): Declare.
15226 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15227 * inferiors.c: Ditto.
15228 * linux-low.c: Ditto.
15229 * mem-break.c: Ditto.
15230 * regcache.c: Ditto.
15231 * remote-utils.c: Ditto.
15232 * server.c: Ditto.
15233 * target.c: Ditto.
15234 * win32-low.c: Ditto.
15235
15236 2008-12-12 Doug Evans <dje@google.com>
15237
15238 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15239 in debugging printf.
15240
15241 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15242
15243 2008-12-09 Doug Evans <dje@google.com>
15244
15245 * linux-low.h (struct process_info): Delete member tid, unused.
15246 * thread-db.c (find_one_thread): Update.
15247 (maybe_attach_thread): Update.
15248
15249 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15250
15251 * target.h (struct target_ops): Add qxfer_osdata member.
15252 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15253 and dirent.h.
15254 (linux_qxfer_osdata): New functions.
15255 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15256 callback.
15257 * server.c (handle_query): Handle "qXfer:osdata:read:".
15258 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15259 (buffer_xml_printf): New functions.
15260 * server.h (struct buffer): New.
15261 (buffer_grow_str, buffer_grow_str0): New macros.
15262 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15263 (buffer_xml_printf): Declare.
15264
15265 2008-11-24 Doug Evans <dje@google.com>
15266
15267 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15268
15269 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15270
15271 * server.c (handle_v_run): Always use the supplied argument list.
15272
15273 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15274
15275 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15276 (xtensa_regmap_table): Add entry for scompare1.
15277
15278 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15279
15280 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15281 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15282 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15283 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15284 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15285 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15286 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15287 XML target descriptions.
15288 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15289 when inferior is running on an ISA 2.05 or later processor. Add
15290 special case to return offset for full 64-bit slot of FPSCR when
15291 in 32-bits.
15292
15293 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15294
15295 * Makefile.in (SFILES, clean): Added sparc64 files.
15296 (reg-sparc64.o, reg-sparc64.c): New.
15297 * configure.srv (sparc*-*-linux*): New configuration.
15298 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15299 syscall arguments for SPARC.
15300 (regsets_store_inferior_registers): Likewise.
15301 * linux-sparc-low.c: New file.
15302
15303 2008-10-21 Doug Evans <dje@google.com>
15304
15305 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15306 (READLINE_DIR,READLINE_DEP): Delete.
15307 (INTERNAL_CFLAGS): Update.
15308 (LINTFLAGS): Update.
15309
15310 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15311
15312 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15313 whole argv from the last run, not just argv[0].
15314
15315 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15316
15317 * regcache.c (new_register_cache): Return NULL if the register
15318 cache size isn't known yet.
15319 (free_register_cache): Avoid dereferencing a NULL regcache.
15320
15321 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15322
15323 * configure.srv: Merge MIPS and MIPS64.
15324
15325 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15326
15327 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15328
15329 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15330
15331 * Makefile.in: Add required vsx dependencies.
15332
15333 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15334 Declare init_registers_powerpc_vsx32l.
15335 Declare init_registers_powerpc_vsx64l.
15336 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15337 (ppc_arch_setup): Check for VSX in hwcap.
15338 (ppc_fill_vsxregset): New function.
15339 (ppc_store_vsxregset): New function.
15340 Add new VSX entry in regset_info target_regsets.
15341
15342 * configure.srv: Add new VSX dependencies.
15343
15344 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15345
15346 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15347 (remote_open): Set or clear transport_is_reliable.
15348 (putpkt_binary): Don't expect acks in noack mode.
15349 (getpkt): Don't send ack/nac in noack mode.
15350 * server.c (handle_general_set): Handle QStartNoAckMode.
15351 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15352 qSupported.
15353 (main): Reset noack_mode on every connection.
15354 * server.h (noack_mode): Declare.
15355
15356 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15357
15358 * Makefile.in (GDBREPLAY_OBS): New variable.
15359 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15360
15361 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15362 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15365 (usr_store_inferior_registers): Likewise.
15366 (regsets_store_inferior_registers): Likewise.
15367
15368 2008-07-31 Rolf Jansen <rj@surtec.com>
15369 Pedro Alves <pedro@codesourcery.com>
15370
15371 * configure.ac: Check for memmem declaration.
15372 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15373 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15374 (disable_packet_qfThreadInfo): Unconditionally compile.
15375 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15376 * configure, config.in: Regenerate.
15377
15378 2008-07-28 Doug Kwan <dougkwan@google.com>
15379
15380 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15381 (linux_write_memory): Remove declaration of errno.
15382
15383 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15384
15385 * linux-low.c (handle_extended_wait): Do not use "status"
15386 variable uninitialized.
15387
15388 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15389
15390 * server.c (handle_v_attach): Inhibit reporting dll changes.
15391
15392 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15393
15394 * remote-utils.c (prepare_resume_reply): If requested, don't
15395 output "thread:TID" in the T stop reply.
15396
15397 * server.c (disable_packet_vCont, disable_packet_Tthread)
15398 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15399 (handle_query): If requested, disable support for qC, qfThreadInfo
15400 and qsThreadInfo.
15401 (handle_v_requests): If requested, disable support for vCont.
15402 (gdbserver_show_disableable): New.
15403 (main): Handle --disable-packet and --disable-packet=LIST.
15404
15405 * server.h (disable_packet_vCont, disable_packet_Tthread)
15406 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15407
15408 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15409
15410 * server.c (gdbserver_usage): Mention --version.
15411
15412 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * Makefile.in (gdbreplay.o): New rule.
15415
15416 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15417
15418 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15419 message, not gdbserver.
15420
15421 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15422 Nathan Sidwell <nathan@codesourcery.com>
15423 Joseph Myers <joseph@codesourcery.com>
15424
15425 * acinclude.m4: Include ../../config/acx.m4.
15426 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15427 * configure, config.in: Regenerate.
15428 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15429 * server.c (gdbserver_version): Print PKGVERSION.
15430 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15431 (main): Adjust gdbserver_usage calls.
15432 * gdbreplay.c (version, host_name): Add declarations.
15433 (gdbreplay_version, gdbreplay_usage): New.
15434 (main): Accept --version and --help options.
15435
15436 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15437
15438 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15439 (arm_breakpoint_at): Handle Thumb.
15440 (the_low_target): Add comment.
15441
15442 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15443
15444 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15445
15446 2008-05-09 Doug Evans <dje@google.com>
15447
15448 * server.h (decode_search_memory_packet): Declare.
15449 * remote-utils.c (decode_search_memory_packet): New fn.
15450 * server.c (handle_search_memory_1): New fn.
15451 (handle_search_memory): New fn.
15452 (handle_query): Process qSearch:memory packets.
15453
15454 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15455
15456 * regcache.c (registers_length): Remove.
15457 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15458 full register packet.
15459 * regcache.h (registers_length): Remove prototype.
15460 * server.h (PBUFSIZ): Define to 16384.
15461
15462 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15463
15464 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15465 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15466 powerpc-64l.o, and powerpc-altivec64l.o.
15467 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15468 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15469 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15470 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15471 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15472 to srv_xmlfiles.
15473
15474 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15475 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15476 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15477 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15478 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15479 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15480 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15481 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15482 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15483 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15484 (clean): Update.
15485
15486 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15487 (init_registers_powerpc_32l): ... this new prototype.
15488 (init_registers_powerpc_32): Remove, replace by ...
15489 (init_registers_powerpc_altivec32l): ... this new prototype.
15490 (init_registers_powerpc_e500): Remove, replace by ...
15491 (init_registers_powerpc_e500l): ... this new prototype.
15492 (init_registers_ppc64): Remove, replace by ...
15493 (init_registers_powerpc_64l): ... this new prototype.
15494 (init_registers_powerpc_64): Remove, replace by ...
15495 (init_registers_powerpc_altivec64l): ... this new prototype.
15496 (ppc_num_regs): Set to 73.
15497 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15498 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15499 (ppc_cannot_store_register): Handle orig_r3 and trap.
15500 (ppc_arch_setup): Update init_registers_... calls.
15501 (ppc_fill_gregset): Handle orig_r3 and trap.
15502
15503 * inferiors.c (clear_inferiors): Reset current_inferior.
15504
15505 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15506
15507 * acinclude.m4: Add override.m4.
15508 * configure: Regenerate.
15509
15510 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15511
15512 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15513 initial call to init_register_ppc64.
15514
15515 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15516
15517 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15518 single powerpc*-*-linux* case.
15519 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15520
15521 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15522
15523 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15524 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15525 from reg_xmlfiles.
15526 * linux-ppc-low.c: Include <elf.h>.
15527 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15528 (ppc_hwcap): New global variable.
15529 (ppc_regmap): Remove __SPE__ #ifdef sections.
15530 (ppc_regmap_e500): New global variable.
15531 (ppc_cannot_store_register): Update __SPE__ special case.
15532 (ppc_get_hwcap): New function.
15533 (ppc_arch_setup): Use it to determine whether inferior supports
15534 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15535 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15536 Do not access registers if target does not support AltiVec.
15537 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15538 Do not access registers if target does not support SPE.
15539 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15540
15541 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15542
15543 * linux-low.c (disabled_regsets, num_regsets): New.
15544 (use_regsets_p): Delete.
15545 (linux_wait_for_process): Clear disabled_regsets.
15546 (regsets_fetch_inferior_registers): Check and set it.
15547 (regsets_store_inferior_registers): Likewise.
15548 (linux_fetch_registers, linux_store_registers): Do not use
15549 use_regsets_p.
15550 (initialize_low): Allocate disabled_regsets.
15551
15552 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15553
15554 * Makefile.in (LIBOBJS): New.
15555 (OBS): Use LIBOBJS.
15556 (memmem.o): New rule.
15557 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15558 * configure: Regenerated.
15559
15560 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15561
15562 * server.c (handle_query): Never return "unsupported" for
15563 qXfer:features:read queries.
15564
15565 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15566
15567 * server.c (get_features_xml): Fix inverted condition.
15568 (handle_query): Always support qXfer:feature:read.
15569
15570 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15571
15572 * server.c (wrapper_argv): New.
15573 (start_inferior): Handle wrapper_argv. If set, expect an extra
15574 trap.
15575 (gdbserver_usage): Document --wrapper.
15576 (main): Parse --wrapper.
15577
15578 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15579
15580 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15581 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15582 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15583 (ppc_set_pc): Likewise.
15584 (ppc_arch_setup): New function.
15585 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15586 of collect_register.
15587 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15588
15589 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15590
15591 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15592 instead of linux-ppc64-low.o.
15593 * linux-ppc64-low.c: Remove file.
15594 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15595 (linux-ppc64-low.o): Remove rule.
15596
15597 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15598 (init_registers_powerpc_64): Likewise.
15599 (ppc_regmap): Conditionally define depending on __powerpc64__.
15600 (ppc_cannot_store_register): Do not special-case "fpscr" when
15601 compiled on __powerpc64__.
15602 (ppc_collect_ptrace_register): New function.
15603 (ppc_supply_ptrace_register): New function.
15604 (ppc_breakpoint): Change type to "unsigned int".
15605 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15606 (the_low_target): Conditionally provide initializers for the
15607 arch_setup member depending on __powerpc64__. Install
15608 collect_ptrace_register and supply_ptrace_register members.
15609
15610 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15611
15612 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15613 * server.c (gdbserver_xmltarget): Define.
15614 (get_features_xml): Use it to replace "target.xml" and arch_string.
15615
15616 * configure.srv: Remove srv_xmltarget. Add XML files that were
15617 mentioned there to srv_xmlfiles instead. Remove conditional tests
15618 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15619 srv_xmlfiles and srv_regobj to include all possible choices.
15620 * configure.ac (srv_xmltarget): Remove.
15621 (srv_xmlfiles): Do not add "target.xml".
15622 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15623 checks for supplementary target information.
15624 * configure: Regenerate.
15625 * Makefile.in (XML_TARGET): Remove.
15626 (target.xml): Remove rule.
15627 (clean): Do not clean up target.xml.
15628 (.PRECIOUS): Do not mention target.xml.
15629
15630 * target.h (struct target_ops): Remove arch_string member.
15631 * linux-low.c (linux_arch_string): Remove.
15632 (linux_target_ops): Remove arch_string initializer.
15633 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15634 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15635 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15636 * spu-low.c (spu_arch_string): Remove.
15637 (spu_target_ops): Remove arch_string initializer.
15638 * win32-low.c (win32_arch_string): Remove.
15639 (win32_target_ops): Remove arch_string initializer.
15640 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15641 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15642 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15643
15644 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15645
15646 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15647 by collect_ptrace_register and supply_ptrace_register hooks.
15648 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15649 instead of checking for the_low_target.left_pad_xfer.
15650 (usr_store_inferior_registers): Use collect_ptrace_register callback
15651 instead of checking for the_low_target.left_pad_xfer.
15652
15653 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15654 (s390_supply_ptrace_register): Likewise.
15655 (s390_fill_gregset): Call s390_collect_ptrace_register.
15656 (the_low_target): Update.
15657
15658 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15659 (ppc_supply_ptrace_register): Likewise.
15660 (the_low_target): Update.
15661
15662 * linux-i386-low.c (the_low_target): Update.
15663 * linux-x86-64-low.c (the_low_target): Update.
15664
15665 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15666
15667 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15668 reg-s390.o and reg-s390x.o.
15669
15670 * linux-low.c (new_inferior): New global variable.
15671 (linux_create_inferior, linux_attach): Set it.
15672 (linux_wait_for_process): Call the_low_target.arch_setup after the
15673 target has stopped for the first time.
15674 (initialize_low): Do not call the_low_target.arch_setup.
15675
15676 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15677 (s390_set_pc): Likewise.
15678 (s390_arch_setup): New function.
15679 (the_low_target): Use s390_arch_setup as arch_setup routine.
15680
15681 * regcache.c (realloc_register_cache): New function.
15682 (set_register_cache): Call it for each existing regcache.
15683
15684 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15685
15686 * server.h (init_registers): Remove prototype.
15687
15688 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15689 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15690 instead of init_registers ().
15691 * linux-arm-low.c (init_registers_arm): Add prototype.
15692 (init_registers_arm_with_iwmmxt): Likewise.
15693 (the_low_target): Add initializer for arch_setup field.
15694 * linux-cris-low.c (init_registers_cris): Add prototype.
15695 (the_low_target): Add initializer for arch_setup field.
15696 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15697 (the_low_target): Add initializer for arch_setup field.
15698 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15699 (the_low_target): Add initializer for arch_setup field.
15700 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15701 (the_low_target): Add initializer for arch_setup field.
15702 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15703 (the_low_target): Add initializer for arch_setup field.
15704 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15705 (the_low_target): Add initializer for arch_setup field.
15706 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15707 (init_registers_mips64_linux): Likewise.
15708 (the_low_target): Add initializer for arch_setup field.
15709 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15710 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15711 (the_low_target): Add initializer for arch_setup field.
15712 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15713 (init_registers_powerpc_64): Likewise.
15714 (the_low_target): Add initializer for arch_setup field.
15715 * linux-s390-low.c (init_registers_s390): Add prototype.
15716 (init_registers_s390x): Likewise.
15717 (the_low_target): Add initializer for arch_setup field.
15718 * linux-sh-low.c (init_registers_sh): Add prototype.
15719 (the_low_target): Add initializer for arch_setup field.
15720 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15721 (the_low_target): Add initializer for arch_setup field.
15722 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15723 (the_low_target): Add initializer for arch_setup field.
15724
15725 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15726 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15727 instead of init_registers ().
15728 * win32-arm-low.c (init_registers_arm): Add prototype.
15729 (the_low_target): Add initializer for arch_setup field.
15730 * win32-i386-low.c (init_registers_i386): Add prototype.
15731 (the_low_target): Add initializer for arch_setup field.
15732
15733 * spu-low.c (init_registers_spu): Add prototype.
15734 (initialize_low): Call initialie_registers_spu () instead of
15735 initialize_registers ().
15736
15737 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15738
15739 * server.c (handle_v_requests): When handling the vRun and vAttach
15740 packets, if already debugging a process, don't kill it. Return an
15741 error instead.
15742
15743 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * server.c (handle_query): Correct length check.
15746
15747 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15748
15749 * win32-low.c (do_initial_child_stuff): Add process handle
15750 parameter. Set current_process_handle and current_process_id from the
15751 parameters. Clear globals.
15752 (win32_create_inferior): Don't set current_process_handle and
15753 current_process_id here. Instead pass them on the call to
15754 do_initial_child_stuff.
15755 (win32_attach): Likewise.
15756 (win32_clear_inferiors): New.
15757 (win32_kill): Don't close the current process handle or the
15758 current thread handle here. Instead call win32_clear_inferiors.
15759 (win32_detach): Don't open a new handle to the process. Call
15760 win32_clear_inferiors.
15761 (win32_join): Don't rely on current_process_handle; open a new
15762 handle using the process id.
15763 (win32_wait): Call win32_clear_inferiors when the inferior process
15764 has exited.
15765
15766 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15767
15768 * server.c (monitor_show_help): Add "exit".
15769
15770 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15771
15772 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15773 (clean): Add reg-xtensa.c.
15774 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15775 * configure.srv (xtensa*-*-linux*) New target.
15776 * linux-xtensa-low.c: New.
15777 * xtensa-xtregs.c: New.
15778
15779 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15780
15781 * hostio.c: Don't include errno.h.
15782 (errno_to_fileio_errno): Move to hostio-errno.
15783 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15784 error number outputting to the target->hostio_last_error callback.
15785 (hostio_packet_error): Use FILEIO_EINVAL directly.
15786 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15787 calls to hostio_error.
15788 * hostio-errno.c: New.
15789 * server.h (hostio_last_error_from_errno): Declare.
15790 * target.h (target_ops): Add hostio_last_error member.
15791 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15792 as hostio_last_error handler.
15793 * spu-low.c (spu_target_ops): Likewise.
15794 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15795 (wince_hostio_last_error): New functions.
15796 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15797 as hostio_last_error handler.
15798 (win32_target_ops) [!_WIN32_WCE]: Register
15799 hostio_last_error_from_errno as hostio_last_error handler.
15800 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15801 (hostio-errno.o): New rule.
15802 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15803 * configure.srv (srv_hostio_err_objs): New variable. Default to
15804 hostio-errno.o.
15805 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15806 * configure: Regenerate.
15807
15808 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15811 (linux_kill, linux_detach): Clean up the process list.
15812 * remote-utils.c (remote_open): Improve port number parsing.
15813 (putpkt_binary, input_interrupt): Only send interrupts if the target
15814 is running.
15815 * server.c (extended_protocol): Make static.
15816 (attached): Define earlier.
15817 (exit_requested, response_needed, program_argv): New variables.
15818 (target_running): New.
15819 (start_inferior): Clear attached here.
15820 (attach_inferior): Set attached here.
15821 (require_running): Define.
15822 (handle_query): Use require_running and target_running. Implement
15823 "monitor exit".
15824 (handle_v_attach, handle_v_run): New.
15825 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15826 (gdbserver_usage): Update.
15827 (main): Redo argument parsing. Handle --debug and --multi. Handle
15828 --attach along with other options or after the port. Save
15829 program_argv. Support no initial program. Resynchronize
15830 communication with GDB after an error. Handle "monitor exit".
15831 Use require_running and target_running. Always allow the extended
15832 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15833 restart in extended mode.
15834 * README: Refer to the GDB manual. Update --attach usage.
15835
15836 2007-12-20 Andreas Schwab <schwab@suse.de>
15837
15838 * linux-low.c (STACK_SIZE): Define.
15839 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15840 (linux_test_for_tracefork): Likewise.
15841
15842 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15843
15844 * linux-low.c (linux_wait_for_event): Update messages. Do not
15845 reinsert auto-delete breakpoints.
15846 * mem-break.c (struct breakpoint): Change return type of handler to
15847 int.
15848 (set_breakpoint_at): Update handler type.
15849 (reinsert_breakpoint_handler): Return 1 instead of calling
15850 delete_breakpoint.
15851 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15852 setting a new one.
15853 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15854 * mem-break.h (set_breakpoint_at): Update handler type.
15855 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15856 * win32-low.c (auto_delete_breakpoint): New.
15857 (get_child_debug_event): Use it.
15858
15859 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15860
15861 * configure.ac: Check for pread and pwrite.
15862 * hostio.c (handle_pread): Fall back to lseek and read.
15863 (handle_pwrite): Fall back to lseek and write.
15864 * config.in, configure: Regenerated.
15865
15866 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15867
15868 * server.c (myresume): Add own_buf argument.
15869 (main): Update calls.
15870
15871 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15872
15873 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15874 * remote-utils.c (remote_open): Do not call disable_async_io.
15875 (block_async_io): Delete.
15876 (unblock_async_io): Make static.
15877 (initialize_async_io): New.
15878 * server.c (handle_v_cont): Handle async I/O here.
15879 (myresume): Likewise. Move other common resume tasks here...
15880 (main): ... from here. Call initialize_async_io. Disable async
15881 I/O before the main loop.
15882 * server.h (initialize_async_io): Declare.
15883 (block_async_io, unblock_async_io): Delete prototypes.
15884 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15885
15886 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15887
15888 * remote-utils.c (readchar): Allow binary data in received messages.
15889
15890 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15891
15892 * win32-low.c (attaching): New global.
15893 (win32_create_inferior): Clear the `attaching' global.
15894 (win32_attach): Set the `attaching' global.
15895 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15896 attaching. Only set a breakpoint at the entry point if not
15897 attaching.
15898
15899 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15900
15901 * server.c (main): Don't report dll events on the initial
15902 connection on attaches.
15903
15904 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15905
15906 * server.c (main): Relax numerical bases supported for the pid of
15907 the --attach command line argument.
15908
15909 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15910
15911 * win32-low.c (win32_attach): Call OpenProcess before
15912 DebugActiveProcess, not after. Add last error output to error
15913 call.
15914
15915 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15916
15917 * win32-low.c (win32_get_thread_context)
15918 (win32_set_thread_context): New functions.
15919 (thread_rec): Use win32_get_thread_context.
15920 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15921 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15922 field.
15923
15924 2007-12-03 Leo Zayas
15925 Pedro Alves <pedro_alves@portugalmail.pt>
15926
15927 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15928 global variables.
15929 (child_add_thread): Minor cleanup.
15930 (child_continue): Resume artificially suspended threads before
15931 calling ContinueDebugEvent.
15932 (suspend_one_thread): New.
15933 (fake_breakpoint_event): New.
15934 (get_child_debug_event): Change return type to int. Check here if
15935 gdb sent an interrupt request. If a soft interrupt was requested,
15936 fake a breakpoint event. Return 0 if there is no event to handle,
15937 and 1 otherwise.
15938 (win32_wait): Don't check here if gdb sent an interrupt request.
15939 Ensure there is a valid event to handle.
15940 (win32_request_interrupt): Add soft interruption method as last
15941 resort.
15942
15943 2007-12-03 Leo Zayas
15944 Pedro Alves <pedro_alves@portugalmail.pt>
15945
15946 * win32-low.h (win32_thread_info): Add descriptions to the
15947 structure members. Replace `suspend_count' counter by a
15948 `suspended' flag.
15949 * win32-low.c (thread_rec): Update condition of when to get the
15950 context from the inferior. Rely on ContextFlags being set if it
15951 has already been retrieved. Only suspend the inferior thread if
15952 we haven't already. Warn if that fails.
15953 (continue_one_thread): s/suspend_count/suspended/. Only call
15954 ResumeThread once. Warn if that fails.
15955
15956 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15957
15958 * win32-low.c (win32_wait): Don't read from the inferior when it
15959 has already exited.
15960
15961 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15962
15963 * Makefile.in (win32_low_h): New variable.
15964 (win32-low.o): Add dependency on $(win32_low_h).
15965 (win32-arm-low.o, win32-i386-low.o): New rules.
15966
15967 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15968
15969 * hostio.c: Correct copyright year.
15970
15971 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15972
15973 * Makefile.in (OBS): Add hostio.o.
15974 (hostio.o): New rule.
15975 * server.h (handle_vFile): Declare.
15976 * hostio.c: New file.
15977 * server.c (handle_v_requests): Take packet_len and new_packet_len
15978 for binary packets. Call handle_vFile.
15979 (main): Update call to handle_v_requests.
15980
15981 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15982
15983 * linux-low.c: Include <sched.h>.
15984
15985 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15986
15987 * linux-low.c (linux_tracefork_grandchild): New.
15988 (linux_tracefork_child): Use clone.
15989 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15990
15991 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15992
15993 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15994
15995 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15996
15997 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15998
15999 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * inferiors.c (change_inferior_id): Delete.
16002 (add_pid_to_list, pull_pid_from_list): New.
16003 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16004 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16005 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16006 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16007 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16008 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16009 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16010 (using_threads): Always set to 1.
16011 (handle_extended_wait): New.
16012 (add_process): Do not set TID.
16013 (linux_create_inferior): Set must_set_ptrace_flags.
16014 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16015 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16016 (linux_thread_alive): Rename TID argument to LWPID.
16017 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16018 (linux_wait_for_event): Do not use TID or check using_threads. Update
16019 call to dead_thread_notify. Call handle_extended_wait.
16020 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16021 (send_sigstop): Delete sigstop_sent.
16022 (wait_for_sigstop): Avoid TID.
16023 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16024 (linux_test_for_tracefork): New.
16025 (linux_lookup_signals): Use thread_db_active and
16026 linux_supports_tracefork_flag.
16027 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16028 * linux-low.h (get_process_thread): Avoid TID.
16029 (struct process_ifo): Move thread_known and tid to the end. Remove
16030 sigstop_sent.
16031 (linux_attach_lwp, thread_db_init): Update prototypes.
16032 * server.h (change_inferior_id): Delete prototype.
16033 (add_pid_to_list, pull_pid_from_list): New prototypes.
16034 * thread-db.c (thread_db_use_events): New.
16035 (find_first_thread): Rename to...
16036 (find_one_thread): ...this. Update callers and messages. Do not
16037 call fatal. Check thread_db_use_events. Do not call
16038 change_inferior_id or new_thread_notify.
16039 (maybe_attach_thread): Update. Do not call new_thread_notify.
16040 (thread_db_init): Set thread_db_use_events. Check use_events.
16041 * utils.c (fatal, warning): Correct message prefix.
16042
16043 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * Makefile.in (clean): Remove new files.
16046 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16047 (powerpc-64.o, powerpc-64.c): New rules.
16048 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16049 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16050 with SPE.
16051 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16052 SPE targets.
16053 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16054 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16055 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16056 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16057 (target_regsets): Add AltiVec and SPE register sets.
16058 * configure.ac: Check for AltiVec and SPE.
16059 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16060 (ppc_fill_vrregset, ppc_store_vrregset): New.
16061 (target_regsets): Add AltiVec register set.
16062 * configure: Regenerated.
16063
16064 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16065
16066 * linux-low.c (O_LARGEFILE): Define.
16067 (linux_read_memory): Use /proc/PID/mem.
16068 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16069 * configure, config.in: Regenerated.
16070
16071 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16072
16073 * linux-low.c (linux_wait_for_event): Do not pass signals while
16074 single-stepping.
16075
16076 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16077
16078 * win32-low.c (create_process): New.
16079 (win32_create_inferior): Use create_process instead of
16080 CreateProcess. If create_process failed retry appending an ".exe"
16081 suffix. Store the GetLastError result immediatelly after
16082 create_process calls and use it on the call to error.
16083
16084 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16085
16086 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16087
16088 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16089
16090 * configure.ac: Switch license to GPLv3.
16091
16092 2007-08-01 Michael Snyder <msnyder@access-company.com>
16093
16094 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16095
16096 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16097
16098 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16099 typedef.
16100 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16101 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16102 CloseToolhelp32Snapshot.
16103 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16104 CloseToolhelp32Snapshot.
16105
16106 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16107
16108 * server.c (main): Check for inferior exit before main loop.
16109
16110 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16111
16112 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16113 instead of on tmp_desc.
16114
16115 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16116 Daniel Jacobowitz <dan@codesourcery.com>
16117
16118 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16119 (add_thread): Minor cleanups.
16120 (clear_inferiors): Move lower in the file. Clear the DLL
16121 list.
16122 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16123 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16124 (xml_escape_text): New.
16125 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16126 for qSupported.
16127 (handle_v_cont): Report errors.
16128 (gdbserver_version): Update.
16129 (main): Correct size of own_buf. Do not report initial DLL events.
16130 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16131 (unloaded_dll, xml_escape_text): New.
16132 * win32-low.c (enum target_waitkind): Update comments.
16133 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16134 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16135 (win32_EnumProcessModules, win32_GetModuleInformation)
16136 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16137 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16138 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16139 (win32_Module32First, win32_Module32Next, load_toolhelp)
16140 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16141 (get_child_debug_event): Handle DLL events.
16142 (win32_wait): Likewise.
16143
16144 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16145
16146 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16147 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16148
16149 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16150
16151 * win32-low.c (handle_output_debug_string): Ignore event if not
16152 waiting.
16153
16154 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16155
16156 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16157
16158 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16159
16160 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16161
16162 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16163
16164 * inferiors.c (change_inferior_id): Add comment.
16165 * linux-low.c (check_removed_breakpoint): Add an early
16166 prototype. Improve debug output.
16167 (linux_attach): Doc update.
16168 (linux_detach_one_process, linux_detach): Clean up before releasing
16169 each process.
16170 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16171 * linux-low.h (struct process_info): Doc improvement.
16172 * mem-break.c (delete_all_breakpoints): New.
16173 * mem-break.h (delete_all_breakpoints): New prototype.
16174 * thread-db.c (find_first_thread): New.
16175 (thread_db_create_event): Call it instead of
16176 thread_db_find_new_threads. Clean up unused variables.
16177 (maybe_attach_thread): Remove first thread handling.
16178 (thread_db_find_new_threads): Use find_first_thread.
16179 (thread_db_get_tls_address): Likewise.
16180
16181 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16182
16183 * thread-db.c (thread_db_find_new_threads): Add prototype.
16184 (thread_db_create_event): Check for the main thread before adding
16185 a new thread.
16186 (maybe_attach_thread): Only enable event reporting if TID == 0.
16187 (thread_db_get_tls_address): Check for new threads.
16188
16189 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16190
16191 * linux-low.c (linux_create_inferior): Try execv before execvp.
16192 * spu-low.c (spu_create_inferior): Likewise.
16193
16194 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16195
16196 * linux-low.c (linux_create_inferior): Change execv to execvp.
16197 * spu-low.c (spu_create_inferior): Likewies.
16198
16199 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16200
16201 * Makefile.in (clean): Clean new files instead of deleted ones.
16202 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16203 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16204 rules.
16205 * configure.srv: Specify XML files and new regformats for MIPS and
16206 MIPS64 GNU/Linux.
16207 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16208 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16209 an entry for the restart register.
16210 (mips_cannot_fetch_register, mips_cannot_store_register)
16211 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16212 register names to match the XML descriptions.
16213 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16214 restart register instead of $0.
16215
16216 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16217 Markus Deuling <deuling@de.ibm.com>
16218
16219 * remote-utils.c (decode_xfer_write): New function.
16220 * server.h (decode_xfer_write): Add prototype.
16221 * server.c (handle_query): Add PACKET_LEN argument. Support
16222 qXfer:spu:read and qXfer:spu:write packets.
16223 (main): Pass packet_len to handle_query.
16224 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16225 * target.h (target_ops): Add qxfer_spu.
16226
16227 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16228
16229 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16230 accessing non-seekable spufs files.
16231
16232 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16233
16234 * server.c (handle_query): Add reply for qC packet.
16235
16236 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16237 Leo Zayas <lerele@champenstudios@com>
16238
16239 * server.h (check_remote_input_interrupt_request): New function.
16240 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16241 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16242 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16243 (check_remote_input_interrupt_request): New function.
16244 * server.h (check_remote_input_interrupt_request): Declare.
16245 * win32-low.c (winapi_DebugBreakProcess,
16246 winapi_GenerateConsoleCtrlEvent): New typedefs.
16247 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16248 to 250 ms.
16249 (win32_wait): Check for remote interrupt request
16250 with check_remote_input_interrupt_request.
16251 (win32_request_interrupt): New function.
16252 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16253
16254 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16255
16256 * win32-low.c (debug_registers_changed,
16257 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16258 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16259 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16260 (thread_rec): Get context using the low target.
16261 (child_add_thread): Call thread_added on the low target,
16262 which does the same thing.
16263 (regptr): Delete.
16264 (do_initial_child_stuff): Remove debug registers references.
16265 Set context using the low target. Resume threads after
16266 setting the contexts.
16267 (child_continue): Remove dead variable. Remove debug
16268 registers references.
16269 (child_fetch_inferior_registers): Go through the low target.
16270 (do_child_store_inferior_registers): Remove.
16271 (child_store_inferior_registers): Go through the low target.
16272 (win32_resume): Remove debug registers references.
16273 Set context using the low target.
16274 (handle_exception): Change return type to void. Don't record
16275 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16276 first chance exception.
16277 (get_child_debug_event): Change return type to void. Remove
16278 goto loop. Always return after waiting for debug event.
16279 (win32_wait): Convert to switch statement. Handle spurious
16280 events.
16281
16282 * win32-i386-low.c (debug_registers_changed,
16283 debug_registers_used): New.
16284 (initial_stuff): Rename to ...
16285 (i386_initial_stuff): ... this. Clear debug registers
16286 state variables.
16287 (store_debug_registers): Delete.
16288 (i386_get_thread_context): New.
16289 (load_debug_registers): Delete.
16290 (i386_set_thread_context): New.
16291 (i386_thread_added): New.
16292 (single_step): Rename to ...
16293 (i386_single_step): ... this.
16294 (do_fetch_inferior_registers): Rename to ...
16295 (i386_fetch_inferior_register): ... this.
16296 (i386_store_inferior_register): New.
16297 (the_low_target): Adapt to new interface.
16298
16299 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16300 (arm_get_thread_context): New.
16301 (arm_set_thread_context): New.
16302 (regptr): New.
16303 (do_fetch_inferior_registers): Rename to ...
16304 (arm_fetch_inferior_register): ... this.
16305 (arm_store_inferior_register): New.
16306 (arm_wince_breakpoint): Reimplement as unsigned long.
16307 (arm_wince_breakpoint_len): Define.
16308 (the_low_target): Adapt to new interface.
16309
16310 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16311 load_debug_registers. Add get_thread_context, set_thread_context,
16312 thread_added and store_inferior_register. Rename
16313 fetch_inferior_registers to fetch_inferior_register.
16314 (regptr): Remove declaration.
16315
16316 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16317
16318 * linux-low.c (linux_detach): Change return type to int. Return 0.
16319 * spu-low.c (spu_detach): Likewise.
16320
16321 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16322
16323 * target.h (target_ops): Change return type of detach to int.
16324 Add join.
16325 (join_inferior): New.
16326 * server.c (main): Don't skip detach support on mingw32.
16327 If the inferior doesn't support detaching return error.
16328 Call join_inferior instead of using waitpid.
16329 * linux-low.c (linux_join): New.
16330 (linux_target_op): Add linux_join.
16331 * spu-low.c (spu_join): New.
16332 (spu_target_ops): Add spu_join.
16333 * win32-low.c (win32_detach): Adapt to new interface.
16334 Reopen current_process_handle before detaching. Issue a child
16335 resume before detaching.
16336 (win32_join): New.
16337 (win32_target_op): Add win32_join.
16338
16339 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16340
16341 * win32-low.c (win32-attach): Fix return value.
16342 * target.h (target_ops): Describe ATTACH return values.
16343
16344 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16345
16346 * win32-low.c (GETPROCADDRESS): Define.
16347 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16348 (winapi_DebugSetProcessKillOnExit): Likewise.
16349 (win32_create_inferior): Force usage of ansi CreateProcessA.
16350 (win32_attach): Use GETPROCADDRESS.
16351 (win32_detach): Likewise.
16352
16353 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16354
16355 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16356
16357 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16358
16359 * win32-low.c: Commit leftover changes from 2007-03-29.
16360
16361 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16362
16363 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16364 fields short instead of int. Add explicit padding.
16365 (i387_cache_to_fsave): Remove unnecessary casts.
16366 (i387_fsave_to_cache): Doc fix.
16367 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16368
16369 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16370
16371 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16372 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16373
16374 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16375
16376 * configure.srv (arm*-*-mingw32ce*): Move near the other
16377 arm targets.
16378
16379 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16380
16381 * configure.ac: Add errno checking.
16382 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16383 sys/file.h and malloc.h.
16384 (AC_CHECK_DECLS): Add perror.
16385 (srv_mingwce): Handle.
16386 * configure.srv (i[34567]86-*-cygwin*): Add
16387 win32-i386-low.o to srv_tgtobj.
16388 (i[34567]86-*-mingw*): Likewise.
16389 (arm*-*-mingw32ce*): Add case.
16390 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16391 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16392 [__MINGW32CE__] (strerror): New function.
16393 [__MINGW32CE__] (errno): Define to GetLastError.
16394 [__MINGW32CE__] (COUNTOF): New macro.
16395 (remote_open): Remove extra close call.
16396 * mem-break.c (delete_breakpoint_at): New function.
16397 * mem-break.h (delete_breakpoint_at): Declare.
16398 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16399 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16400 [USE_WIN32API] (read, write): Add char* casts.
16401 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16402 * server.h: Include wincecompat.h on Windows CE.
16403 [HAVE_ERRNO_H]: Check.
16404 (perror): Declare if not declared.
16405 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16406 (perror_with_name): Remove errno declaration.
16407 * wincecompat.h: New.
16408 * wincecompat.c: New.
16409 * win32-low.h: New.
16410 * win32-arm-low.c: New.
16411 * win32-i386-low.c: New.
16412 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16413 (OUTMSG2): Make it safe.
16414 (_T): New macro.
16415 (COUNTOF): New macro.
16416 (NUM_REGS): Get it from the low target.
16417 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16418 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16419 (thread_rec): Let low target handle debug registers.
16420 (child_add_thread): Likewise.
16421 (child_init_thread_list): Likewise.
16422 (continue_one_thread): Likewise.
16423 (regptr): New.
16424 (do_child_fetch_inferior_registers): Move to ...
16425 * win32-i386-low.c: ... here, and rename to ...
16426 (do_fetch_inferior_registers): ... this.
16427 * win32-low.c (child_fetch_inferior_registers):
16428 Go through the low target.
16429 (do_child_store_inferior_registers): Use regptr.
16430 (strwinerror): New function.
16431 (win32_create_inferior): Handle Windows CE.
16432 Use strwinerror instead of strerror on Windows error
16433 codes. Add program to the error output.
16434 Don't close the main thread handle on Windows CE.
16435 (win32_attach): Use coredll.dll on Windows CE.
16436 (win32_kill): Close current process and current
16437 thread handles.
16438 (win32_detach): Use coredll.dll on Windows CE.
16439 (win32_resume): Let low target handle debug registers, and
16440 step request.
16441 (handle_exception): Add/Remove initial breakpoint. Avoid
16442 non-existant WSTOPSIG on Windows CE.
16443 (win32_read_inferior_memory): Cast to remove warning.
16444 (win32_arch_string): Go through the low target.
16445 (initialize_low): Call set_breakpoint_data with the low
16446 target's breakpoint.
16447 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16448 FOP_REGNUM, mappings): Move to ...
16449 * win32-i386-low.c: ... here.
16450 * win32-low.c (win32_thread_info): Move to ...
16451 * win32-low.h: ... here.
16452 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16453 win32-arm-low.c and wincecompat.c.
16454 (all:): Add $EXEEXT.
16455 (install-only:): Likewise.
16456 (gdbserver:): Likewise.
16457 (gdbreplay:): Likewise.
16458 * config.in: Regenerate.
16459 * configure: Regenerate.
16460
16461 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16462
16463 * win32-low.c: Rename typedef thread_info to
16464 win32_thread_info throughout.
16465
16466 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16467
16468 * win32-i386-low.c: Rename to ...
16469 * win32-low.c: ... this.
16470 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16471 * Makefile.in: Likewise.
16472
16473 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16474
16475 * remote-utils.c (monitor_output): Constify msg parameter.
16476 * server.h (monitor_output): Likewise.
16477 * win32-i386-low.c (handle_output_debug_string): New.
16478 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16479 handle_output_debug_string.
16480 (get_child_debug_event): Likewise.
16481
16482 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16483
16484 * server.c (main): Correct strtoul check.
16485
16486 2007-03-27 Jon Ringle <jon@ringle.org>
16487
16488 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16489
16490 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16491
16492 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16493
16494 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16495
16496 * terminal.h: Check HAVE_SGTTY_H.
16497
16498 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16499
16500 * remote-utils.c (remote_open): Print out the assigned port number.
16501
16502 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16503
16504 * remote-utils.c (monitor_output): New function.
16505 * server.c (debug_threads): Define here.
16506 (monitor_show_help): New function.
16507 (handle_query): Handle qRcmd.
16508 (main): Do not handle 'd' packet.
16509 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16510 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16511 of debug_threads.
16512
16513 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16514
16515 * Makefile.in (EXEEXT): New.
16516 (clean): Use $(EXEEXT).
16517
16518 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16519
16520 * target.h (target_ops): Rename send_signal to request_interrupt,
16521 and remove enum target_signal parameter.
16522 * linux-low.c (linux_request_interrupt): Rename from
16523 linux_send_signal, and always send SIGINT.
16524 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16525 and always send SIGINT.
16526 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16527 of send_signal.
16528 (input_interrupt): Likewise.
16529
16530 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16531
16532 * server.c (get_features_xml): Check if target implemented
16533 arch_string.
16534 * win32-i386-low.c (win32_arch_string): New.
16535 (win32_target_ops): Add win32_arch_string as arch_string member.
16536
16537 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16538
16539 * spu-low.c (spu_arch_string): New.
16540 (spu_target_ops): Add spu_arch_string.
16541
16542 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16543
16544 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16545 * configure.ac: Do not check for terminal.h.
16546 * configure, config.in: Regenerated.
16547
16548 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16549
16550 * Makefile.in (OBS): Add $(XML_BUILTIN).
16551 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16552 (clean): Update.
16553 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16554 (arm-with-iwmmxt.c): New.
16555 * config.in, configure: Regenerate.
16556 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16557 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16558 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16559 (arm*-*-linux*): Add iWMMXt and regset support.
16560 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16561 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16562 (arm_store_wmmxregset, target_regsets): New.
16563 * server.c (get_features_xml): Take annex argument. Check builtin
16564 XML documents.
16565 (handle_query): Handle multiple annexes.
16566
16567 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16568
16569 * remote-utils.c [USE_WIN32API] (read, write): Define.
16570 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16571 write.
16572
16573 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16574
16575 * linux-i386-low.c (the_low_target): Set arch_string.
16576 * linux-x86-64-low.c (the_low_target): Likewise.
16577 * linux-low.c (linux_arch_string): New.
16578 (linux_target_ops): Add it.
16579 * linux-low.h (struct linux_target_ops): Add arch_string.
16580 * server.c (write_qxfer_response): Use const void * for DATA.
16581 (get_features_xml): New.
16582 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16583 * target.h (struct target_ops): Add arch_string method.
16584
16585 2007-01-03 Denis Pilat <denis.pilat@st.com>
16586 Daniel Jacobowitz <dan@codesourcery.com>
16587
16588 * linux-low.c (linux_kill): Handle being called with no threads.
16589 * win32-i386-low.c (win32_kill): Likewise.
16590 (get_child_debug_event): Clear current_process_handle.
16591
16592 2006-12-30 Denis PILAT <denis.pilat@st.com>
16593 Daniel Jacobowitz <dan@codesourcery.com>
16594
16595 * remote-utils.c (remote_open): Check the type of specified
16596 serial port devices before opening them.
16597 * server.c (main): Kill the inferior if an error occurs during
16598 the first remote_open.
16599
16600 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16601
16602 * README: Update supported targets.
16603
16604 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * Makefile.in (clean): Remove reg-mips64.c.
16607 (reg-mips64.c, reg-mips64.o): New rules.
16608 * configure.srv: Handle mips64. Include regset support for mips.
16609 * linux-mips-low.c (union mips_register): New.
16610 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16611 (mips_breakpoint, mips_breakpoint_at): Use int.
16612 (mips_collect_register, mips_supply_register)
16613 (mips_collect_register_32bit, mips_supply_register_32bit)
16614 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16615 (mips_store_fpregset, target_regsets): New.
16616 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16617
16618 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16619
16620 * configure.srv: Add target "spu*-*-*".
16621 * Makefile.in (clean): Remove reg-spu.c.
16622 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16623 * spu-low.c: New file.
16624
16625 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16626
16627 * configure.ac: Correct td_thr_tls_get_addr test.
16628 * configure: Regenerated.
16629
16630 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16631
16632 * linux-low.c (linux_wait_for_event): Reformat. Use the
16633 pass_signals array.
16634 * remote-utils.c (decode_address_to_semicolon): New.
16635 * server.c (pass_signals, handle_general_set): New.
16636 (handle_query): Mention QPassSignals for qSupported.
16637 (main): Call handle_general_set.
16638 * server.h (pass_signals, decode_address_to_semicolon): New.
16639
16640 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16641
16642 * server.c (handle_query): Correct error handling for read_auxv.
16643
16644 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16645
16646 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16647 and srv_linux_thread_db to yes.
16648 * linux-s390-low.c (s390_fill_gregset): New function.
16649 (target_regsets): Define data structure.
16650
16651 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16652
16653 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16654 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16655 * config.in, configure: Regenerated.
16656 * inferiors.c (gdb_id_to_thread): New function.
16657 (gdb_id_to_thread_id): Use it.
16658 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16659 * linux-low.h (struct process_info): Add th member.
16660 (thread_db_get_tls_address): New prototype.
16661 * remote-utils.c (decode_address): Make non-static.
16662 * server.c (handle_query): Handle qGetTLSAddr.
16663 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16664 * target.h (struct target_ops): Add get_tls_address.
16665 * thread-db.c (maybe_attach_thread): Save the thread handle.
16666 (thread_db_get_tls_address): New.
16667
16668 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16669
16670 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16671 (linux_resume_one_process): Take a siginfo_t *. Update all
16672 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16673 (struct pending_signals): Add a siginfo_t.
16674 (linux_wait_for_process): Always set last_status.
16675 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16676 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16677 * linux-low.h (struct process_info): Add last_status.
16678
16679 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16680
16681 * remote-utils.c (try_rle): New function.
16682 (putpkt_binary): Use it.
16683
16684 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16685
16686 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16687 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16688 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16689 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16690 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16691 point registers.
16692
16693 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16694
16695 * server.c (terminal_fd): New variable.
16696 (old_foreground_pgrp): Likewise.
16697 (restore_old_foreground_pgrp): New function.
16698 (start_inferior): Record the terminal file descriptor in terminal_fd
16699 and its original foreground group in old_foreground_pgrp. Register
16700 restore_old_foreground_pgrp with atexit().
16701
16702 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16703
16704 * server.c (handle_query): Correct qPart to qXfer.
16705
16706 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16707
16708 * configure.ac: Check for more headers which are missing on
16709 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16710 * configure.srv: Add Cygwin and mingw32.
16711 * remote-utils.c: Don't include headers unconditionally which
16712 are missing on mingw32. Include <winsock.h> for mingw32.
16713 (remote_open): Adjust for mingw32 support. Flush
16714 standard error after writing to it.
16715 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16716 (unblock_async_io, enable_async_io, disable_async_io)
16717 (readchar, getpkt): Update for Winsock support.
16718 (prepare_resume_reply): Expect a protocol signal number.
16719 * server.c: Disable <sys/wait.h> on mingw32.
16720 (start_inferior): Adjust for mingw32 support. Flush
16721 standard error after writing to it.
16722 (attach_inferior): Likewise. Use protocol signal
16723 numbers.
16724 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16725 and names.
16726 * win32-i386-low.c: New file.
16727 * Makefile.in (XM_CLIBS): Set.
16728 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16729 (win32-i386-low.o): New dependency rule.
16730 * linux-low.c (linux_wait): Use target signal numbers.
16731 * target.h (struct target_ops): Doc fix.
16732 * server.h (target_signal_to_name): New prototype.
16733 * gdbreplay.c: Don't include headers unconditionally which
16734 are missing on mingw32. Include <winsock.h> for mingw32.
16735 (remote_close, remote_open): Adjust for Winsock support.
16736 * configure, config.in: Regenerated.
16737
16738 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16739
16740 * server.c (decode_xfer_read, write_qxfer_response): New.
16741 (handle_query): Take a packet length argument. Handle
16742 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16743 the qSupported response.
16744 (main): Update call to handle_query.
16745
16746 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16749 (putpkt_binary): Renamed from putpkt and adjusted for binary
16750 data.
16751 (putpkt): New wrapper for putpkt_binary.
16752 (readchar): Don't mask off the high bit.
16753 (decode_X_packet): New function.
16754 * server.c (main): Call putpkt_binary if a handler sets the packet
16755 length. Save the length of the incoming packet. Handle 'X'.
16756 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16757
16758 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * server.c (handle_query): Handle qSupported.
16761
16762 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16763
16764 * remote-utils.c (all_symbols_looked_up): New variable.
16765 (look_up_one_symbol): Check it.
16766 * server.h (look_up_one_symbol): New declaration.
16767 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16768
16769 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16770
16771 * Makefile.in (linux-arm-low.o): Update dependencies.
16772 * linux-arm-low.c: Include "gdb_proc_service.h".
16773 (PTRACE_GET_THREAD_AREA): Define.
16774 (ps_get_thread_area): New function.
16775
16776 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16777
16778 * configure.srv (m68k*-*-uclinux*): New target.
16779 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16780 (linux_resume_one_process): Remove extraneous cast.
16781 (linux_read_offsets): New.
16782 (linux_target_op): Add linux_read_offsets on mmuless systems.
16783 * server.c (handle_query): Add qOffsets logic.
16784 * target.h (struct target_ops): Add read_offsets.
16785
16786 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16787
16788 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16789 (PTRACE_GET_THREAD_AREA): Define.
16790 (ps_get_thread_area): New function.
16791 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16792 (linux-x86-64-low.o): Update.
16793
16794 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16795
16796 * configure.ac: Remove checks for prfpregset_t.
16797 * gdb_proc_service.h: New file.
16798 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16799 new "gdb_proc_service.h".
16800 * proc-service.c: Likewise.
16801 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16802 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16803 * Makefile.in (gdb_proc_service_h): Updated.
16804 * configure, config.in: Regenerated.
16805
16806 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16807
16808 * remote-utils.c (prepare_resume_reply): Move declaration
16809 of gdb_id_from_wait to the top of the block.
16810
16811 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16812
16813 * linux-low.c (regsets_store_inferior_registers): Read the regset
16814 from the target before filling it.
16815
16816 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * server.c (attach_inferior): Return SIGTRAP for a successful
16819 attach.
16820
16821 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16822
16823 * Makefile.in (OBS): Add version.o.
16824 (STAGESTUFF): Delete.
16825 (version.o): Add dependencies.
16826 (version.c): Replace rule.
16827 (clean): Remove version.c.
16828 * server.c (gdbserver_version): New.
16829 (gdbserver_usage): Use printf.
16830 (main): Handle --version and --help.
16831 * server.h (version, host_name): Add declarations.
16832
16833 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16834
16835 * linux-arm-low.c:
16836 * linux-arm-low.c:
16837 * inferiors.c:
16838 * i387-fp.h:
16839 * i387-fp.c:
16840 * gdbreplay.c:
16841 * regcache.c:
16842 * proc-service.c:
16843 * mem-break.h:
16844 * mem-break.c:
16845 * linux-x86-64-low.c:
16846 * linux-sh-low.c:
16847 * linux-s390-low.c:
16848 * linux-ppc64-low.c:
16849 * linux-ppc-low.c:
16850 * linux-mips-low.c:
16851 * linux-m68k-low.c:
16852 * linux-m32r-low.c:
16853 * linux-low.h:
16854 * linux-low.c:
16855 * linux-ia64-low.c:
16856 * linux-i386-low.c:
16857 * linux-crisv32-low.c:
16858 * thread-db.c:
16859 * terminal.h:
16860 * target.h:
16861 * target.c:
16862 * server.h:
16863 * server.c:
16864 * remote-utils.c:
16865 * regcache.h:
16866 * utils.c:
16867 * Makefile.in:
16868 * configure.ac:
16869 * gdbserver.1: Add (C) after Copyright. Update the FSF
16870 address.
16871
16872 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16873
16874 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16875 (arm_breakpoint_at): Recognize both breakpoints.
16876 (the_low_target): Use the correct breakpoint instruction.
16877
16878 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16881 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16882 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16883 (the_low_target): Update.
16884
16885 2005-10-25 Andreas Schwab <schwab@suse.de>
16886
16887 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16888
16889 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16890 (ia64_num_regs): Reduce to 462.
16891
16892 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16893
16894 * acinclude.m4: Correct quoting.
16895 * aclocal.m4: Regenerated.
16896
16897 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16898 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16899 (thread_db_init): Call thread_db_err_str.
16900 * configure.ac: Check for TD_VERSION.
16901 * config.in, configure: Regenerated.
16902
16903 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16904
16905 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16906
16907 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16908
16909 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16910 is not available. Define HAVE_PTRACE_GETREGS if it is.
16911 * config.in, configure: Regenerated.
16912 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16913 * linux-i386-low.c, linux-m68k-low.c: Update to use
16914 HAVE_PTRACE_GETREGS.
16915 * linux-low.c (regsets_fetch_inferior_registers)
16916 (regsets_store_inferior_registers): Only return 0 if we processed
16917 GENERAL_REGS.
16918 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16919 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16920
16921 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16922
16923 * inferiors.c (struct thread_info): Add gdb_id.
16924 (add_thread): Add gdb_id argument.
16925 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16926 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16927 calls to add_thread.
16928 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16929 * server.c (handle_query): Use thread_to_gdb_id.
16930 (handle_v_cont, main): Use gdb_id_to_thread_id.
16931 * server.h (add_thread): Update prototype.
16932 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16933 prototypes.
16934
16935 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16936
16937 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16938 left-padded registers.
16939 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16940 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16941
16942 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16943
16944 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16945 * configure: Regenerate.
16946 * config.in: Regenerate.
16947 * server.h (NEED_DECLARATION_STRERROR):
16948 Replace with !HAVE_DECL_STRERROR.
16949
16950 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16951
16952 * linux-low.c (linux_wait, linux_send_signal): Don't test
16953 an unsigned long variable for > 0 if it could be MAX_ULONG.
16954 * server.c (myresume): Likewise.
16955 * target.c (set_desired_inferior): Likewise.
16956
16957 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16958
16959 * configure.ac: Simplify and improve check for socklen_t.
16960 * configure, config.in: Regenerate.
16961
16962 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16963
16964 * acconfig.h: Remove.
16965 * configure.ac: Add a test for socklen_t. Use three-argument
16966 AC_DEFINE throughout.
16967 * config.in: Regenerated using autoheader 2.59.
16968 * configure: Regenerated.
16969
16970 * gdbreplay.c (socklen_t): Provide a default.
16971 (remote_open): Use socklen_t.
16972 * remote-utils.c (socklen_t): Provide a default.
16973 (remote_open): Use socklen_t.
16974 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16975 unsigned char.
16976
16977 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16978 char for buffers.
16979 * linux-low.c (linux_read_memory, linux_write_memory)
16980 (linux_read_auxv): Likewise.
16981 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16982 (check_mem_write): Likewise.
16983 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16984 Likewise.
16985 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16986 (registers_from_string, register_data): Likewise.
16987 * server.c (handle_query, main): Likewise.
16988 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16989 (decode_M_packet): Likewise.
16990 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16991 * target.h (struct target_ops): Update read_memory, write_memory,
16992 and read_auxv.
16993 (read_inferior_memory, write_inferior_memory): Update.
16994 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16995 to unsigned char *.
16996 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16997 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16998 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16999 linux-s390-low.c, linux-sh-low.c: Update for changes in
17000 read_inferior_memory and the_low_target->breakpoint.
17001
17002 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17005 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17006 * configure.srv: Add powerpc64-*-linux*.
17007 * linux-ppc64-low.c: New file.
17008
17009 2005-05-23 Orjan Friberg <orjanf@axis.com>
17010
17011 * linux-cris-low.c: New file with support for CRIS.
17012 * linux-crisv32-low.c: Ditto for CRISv32.
17013 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17014 (clean): Add reg-cris.c and reg-crisv32.c.
17015 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17016 reg-crisv32.o, and reg-crisv32.c to make rules.
17017 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17018 recognized targets.
17019
17020 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17021
17022 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17023 of sizeof (PTRACE_XFER_TYPE).
17024 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17025
17026 2005-05-12 Orjan Friberg <orjanf@axis.com>
17027
17028 * target.h (struct target_ops): Add insert_watchpoint,
17029 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17030 pointers for hardware watchpoint support.
17031 * linux-low.h (struct linux_target_ops): Ditto.
17032 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17033 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17034 to linux_target_ops.
17035 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17036 reply packet.
17037 * server.c (main): Recognize 'Z' and 'z' packets.
17038
17039 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17040
17041 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17042 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17043 (the_low_target): Add new members.
17044
17045 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17046
17047 * proc-service.c (ps_lgetregs): Search all_processes instead of
17048 all_threads.
17049
17050 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17051
17052 * server.c (start_inferior): Change return type to int.
17053 (attach_inferior): Change sigptr to int *.
17054 (handle_v_cont, handle_v_requests): Change signal to int *.
17055 (main): Change signal to int.
17056
17057 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17058
17059 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17060 * configure.srv: Add m32r*-*-linux*.
17061 * linux-m32r-low.c: New file.
17062
17063 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17064
17065 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17066
17067 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17068
17069 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17070 Take unsigned long arguments for PIDs.
17071 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17072 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17073 (wait_for_sigstop, linux_resume_one_process)
17074 (regsets_fetch_inferior_registers, linux_send_signal)
17075 (linux_read_auxv): Likewise. Update the types of variables holding
17076 PIDs. Update format string specifiers.
17077 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17078 * remote-utils.c (prepare_resume_reply): Likewise.
17079 * server.c (cont_thread, general_thread, step_thread)
17080 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17081 unsigned long.
17082 (handle_query): Update format specifiers.
17083 (handle_v_cont, main): Use strtoul for thread IDs.
17084 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17085 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17086 (general_thread, step_thread, thread_from_wait)
17087 (old_thread_from_wait): Update.
17088 * target.h (struct thread_resume): Use unsigned long for THREAD.
17089 (struct target_ops): Use unsigned long for arguments to attach and
17090 thread_alive.
17091
17092 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17093
17094 * acinclude.m4: Include bfd/bfd.m4 directly.
17095 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17096 <agriffis@toolchain.org>.
17097 * aclocal.m4, configure: Regenerated.
17098
17099 2005-01-07 Andrew Cagney <cagney@gnu.org>
17100
17101 * configure.ac: Rename configure.in, require autoconf 2.59.
17102 * configure: Re-generate.
17103
17104 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17105
17106 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17107 LIBS when finished.
17108 * aclocal.m4: Regenerated.
17109 * configure: Regenerated.
17110
17111 2004-11-21 Andreas Schwab <schwab@suse.de>
17112
17113 * linux-m68k-low.c (m68k_num_gregs): Define.
17114 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17115 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17116 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17117 (m68k_breakpoint_at): New. Add to the_low_target.
17118
17119 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17120 srv_linux_thread_db to yes.
17121
17122 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17123
17124 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17125 (ARCH_SET_FS): Likewise.
17126 (ARCH_GET_FS): Likewise.
17127 (ARCH_GET_GS): Likewise.
17128
17129 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17130
17131 * linux-i386-low.c (ps_get_thread_area): New.
17132 * linux-x86-64-low.c (ps_get_thread_area): New.
17133 * linux-low.c: Include <sys/syscall.h>.
17134 (linux_kill_one_process): Don't kill the first thread here.
17135 (linux_kill): Kill the first thread here.
17136 (kill_lwp): New function.
17137 (send_sigstop, linux_send_signal): Use it.
17138 * proc-service.c: Clean up #ifdefs.
17139 (fpregset_info): Delete.
17140 (ps_lgetregs): Update and enable implementation.
17141 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17142 implementations.
17143 * remote-utils.c (struct sym_cache, symbol_cache): New.
17144 (input_interrupt): Print a clearer message.
17145 (async_io_enabled): New variable.
17146 (enable_async_io, disable_async_io): Use it. Update comments.
17147 (look_up_one_symbol): Use the symbol cache.
17148 * thread-db.c (thread_db_look_up_symbols): New function.
17149 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17150
17151 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17152
17153 * configure.in: Test for -rdynamic.
17154 * configure: Regenerated.
17155 * Makefile (INTERNAL_LDFLAGS): New.
17156 (gdbserver, gdbreplay): Use it.
17157
17158 2004-09-02 Andrew Cagney <cagney@gnu.org>
17159
17160 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17161
17162 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17163
17164 * linux-low.c (linux_wait): Clear all_processes list also.
17165
17166 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17167
17168 * linux-low.c: Include <errno.h>. Remove extern declaration of
17169 errno.
17170
17171 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17172
17173 * gdbreplay.c, server.h, utils.c: Update copyright years.
17174
17175 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17176
17177 * server.c (main): Print child status or termination signal from
17178 variable 'signal', not 'sig'.
17179
17180 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17181
17182 * linux-low.c (linux_read_memory): Change return type to
17183 int. Check for and return error from ptrace().
17184 * target.c (read_inferior_memory): Change return type to int. Pass
17185 back return status from the_target->read_memory().
17186 * target.h (struct target_ops): Adapt *read_memory() prototype.
17187 Update comment.
17188 (read_inferior_memory): Adapt prototype.
17189 * server.c (main): Return an error packet if
17190 read_inferior_memory() returns an error.
17191
17192 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17193
17194 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17195 Unify with other clean targets.
17196
17197 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17198
17199 * server.c (handle_v_cont): Call set_desired_inferior.
17200
17201 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17202
17203 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17204
17205 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17206
17207 * linux-low.c (linux_wait): Unblock async I/O.
17208 (linux_resume): Block and enable async I/O.
17209 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17210 * server.h (block_async_io, unblock_async_io): Add prototypes.
17211
17212 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17213
17214 * remote-utils.c (remote_open): Print a status notice after
17215 opening a TCP port.
17216 * server.c (attach_inferior): Print a status notice after
17217 attaching.
17218
17219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17220
17221 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17222
17223 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17224
17225 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17226 error packet.
17227 * server.c, target.h: Update copyright years.
17228
17229 2004-02-25 Roland McGrath <roland@redhat.com>
17230
17231 * target.h (struct target_ops): New member `read_auxv'.
17232 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17233 * linux-low.c (linux_read_auxv): New function.
17234 (linux_target_ops): Initialize `read_auxv' member to that.
17235
17236 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17237
17238 Committed by Jim Blandy <jimb@redhat.com>.
17239
17240 * linux-s390-low.c (s390_num_regs): Update.
17241 (s390_regmap): Remove control registers. Use __s390x__ predefine
17242 instead of GPR_SIZE to distiguish s390 and s390x targets.
17243
17244 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17245
17246 * linux-low.c: Update copyright year.
17247 (check_removed_breakpoint): Clear pending_is_breakpoint.
17248 (linux_set_resume_request, linux_queue_one_thread)
17249 (resume_status_pending_p): New functions.
17250 (linux_continue_one_thread): Use process->resume.
17251 (linux_resume): Only resume threads if there are no pending events.
17252 * linux-low.h (struct process_info): Add resume request
17253 pointer.
17254
17255 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17256
17257 * regcache.c (new_register_cache): Clear the allocated register
17258 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17259
17260 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17261
17262 * linux-low.c (linux_resume): Take a struct thread_resume *
17263 argument.
17264 (linux_wait): Update call.
17265 (resume_ptr): New static variable.
17266 (linux_continue_one_thread): Renamed from
17267 linux_continue_one_process. Use resume_ptr.
17268 (linux_resume): Use linux_continue_one_thread.
17269 * server.c (handle_v_cont, handle_v_requests): New functions.
17270 (myresume): New function.
17271 (main): Handle 'v' case.
17272 * target.h (struct thread_resume): New type.
17273 (struct target_ops): Change argument of "resume" to struct
17274 thread_resume *.
17275 (myresume): Delete macro.
17276
17277 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17278
17279 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17280 (uninstall): Support DESTDIR.
17281
17282 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17283
17284 * configure.srv: Add xscale*linux copy of arm*linux entry.
17285
17286 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17287
17288 * linux-arm-low.c (arm_reinsert_addr): New function.
17289 (the_low_target): Add arm_reinsert_addr.
17290
17291 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17292
17293 * mem-break.c: Remove whitespace at end of file.
17294
17295 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17296
17297 * configure.in: Check whether we need to prototype strerror.
17298 * server.h: Optionally prototype strerror.
17299 * gdbreplay.c (perror_with_name): Use strerror.
17300 * linux-low.c (linux_attach_lwp): Use strerror.
17301 * utils.c (perror_with_name): Use strerror.
17302 * config.in, configure: Regenerated.
17303
17304 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17305
17306 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17307 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17308
17309 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17310
17311 * Makefile.in (SFILES): Update.
17312 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17313 low-sun3.c: Remove files.
17314
17315 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17316
17317 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17318 (linux_detach_one_process, linux_detach): New functions.
17319 (linux_target_ops): Add linux_detach.
17320 * server.c (main): Handle 'D' packet.
17321 * target.h (struct target_ops): Add "detach" member.
17322 (detach_inferior): Define.
17323
17324 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17325
17326 From Kelley Cook <kelleycook@wideopenwest.com>:
17327 * configure.srv: Accept i[34567]86 variants.
17328
17329 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17330
17331 * linux-low.c (linux_wait_for_event): Correct comment typos.
17332 (linux_resume_one_process): Call check_removed_breakpoint.
17333 (linux_send_signal): New function.
17334 (linux_target_ops): Add linux_send_signal.
17335 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17336 of kill.
17337 * target.h (struct target_ops): Add send_signal.
17338
17339 2003-05-29 Jim Blandy <jimb@redhat.com>
17340
17341 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17342 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17343 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17344 away part of the register's value.
17345
17346 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17347
17348 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17349 (linux_wait_for_event, linux_init_signals): Likewise.
17350
17351 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17352
17353 * configure.in: Check for stdlib.h.
17354 * configure: Regenerated.
17355 * config.in: Regenerated.
17356
17357 2003-01-04 Andreas Schwab <schwab@suse.de>
17358
17359 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17360
17361 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17362
17363 * Makefile.in: Remove obsolete code.
17364
17365 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17366
17367 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17368 defined(PT_FPR0_HI).
17369
17370 2002-11-17 Stuart Hughes <seh@zee2.com>
17371
17372 * linux-arm-low.c (arm_num_regs): Increase.
17373 (arm_regmap): Include status register.
17374
17375 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * linux-low.c (register_addr): Remove incorrect -1 check.
17378
17379 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17380
17381 * linux-low.c (linux_create_inferior): Call setpgid. Return
17382 the new PID.
17383 (unstopped_p, linux_signal_pid): Remove.
17384 (linux_target_ops): Remove linux_signal_pid.
17385 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17386 global instead of target method.
17387 * target.h (struct target_ops): Remove signal_pid. Update comment
17388 for create_inferior.
17389 * server.c (signal_pid): New variable.
17390 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17391 gdbserver. Set the child to be the foreground process group.
17392 (attach_inferior): Set signal_pid.
17393
17394 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17395
17396 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17397
17398 2002-08-20 Jim Blandy <jimb@redhat.com>
17399
17400 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17401 default for this.
17402
17403 2002-08-01 Andrew Cagney <cagney@redhat.com>
17404
17405 * Makefile.in: Make chill references obsolete.
17406
17407 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17408
17409 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17410 * configure: Regenerate.
17411 * config.in: Regenerate.
17412
17413 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17414
17415 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17416 (perror_with_name, remote_close, remote_open, expect, play): Static.
17417
17418 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17419
17420 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17421 byte offsets instead of an array of indexes.
17422 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17423
17424 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17425
17426 * regcache.c: Add comment.
17427
17428 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17429
17430 * thread-db.c: New file.
17431 * proc-service.c: New file.
17432 * acinclude.m4: New file.
17433 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17434 proc-service.o, and thread-db.o.
17435 (linux-low.o): Add USE_THREAD_DB.
17436 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17437 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17438 * aclocal.m4: Regenerated.
17439 * config.in: Regenerated.
17440 * configure: Regenerated.
17441 * configure.in: Check for proc_service.h, sys/procfs.h,
17442 thread_db.h, and linux/elf.h headrs.
17443 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17444 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17445 Check for -lthread_db and thread support.
17446 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17447 PowerPC, and SuperH.
17448 * i387-fp.c: Constify arguments.
17449 * i387-fp.h: Likewise.
17450 * inferiors.c: (struct thread_info): Renamed from
17451 `struct inferior_info'. Remove PID member. Use generic inferior
17452 list header. All uses updated.
17453 (inferiors, signal_pid): Removed.
17454 (all_threads): New variable.
17455 (get_thread): Define.
17456 (add_inferior_to_list): New function.
17457 (for_each_inferior): New function.
17458 (change_inferior_id): New function.
17459 (add_inferior): Removed.
17460 (remove_inferior): New function.
17461 (add_thread): New function.
17462 (free_one_thread): New function.
17463 (remove_thread): New function.
17464 (clear_inferiors): Use for_each_inferior and free_one_thread.
17465 (find_inferior): New function.
17466 (find_inferior_id): New function.
17467 (inferior_target_data): Update argument type.
17468 (set_inferior_target_data): Likewise.
17469 (inferior_regcache_data): Likewise.
17470 (set_inferior_regcache_data): Likewise.
17471 * linux-low.c (linux_bp_reinsert): Remove.
17472 (all_processes, stopping_threads, using_thrads)
17473 (struct pending_signals, debug_threads, pid_of): New.
17474 (inferior_pid): Replace with macro.
17475 (struct inferior_linux_data): Remove.
17476 (get_stop_pc, add_process): New functions.
17477 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17478 Use add_process and add_thread.
17479 (linux_attach_lwp): New function, based on old linux_attach. Use
17480 add_process and add_thread. Set stop_expected for new threads.
17481 (linux_attach): New function.
17482 (linux_kill_one_process): New function.
17483 (linux_kill): Kill all LWPs.
17484 (linux_thread_alive): Use find_inferior_id.
17485 (check_removed_breakpoints, status_pending_p): New functions.
17486 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17487 Update. Use WNOHANG. Wait for cloned processes also. Update process
17488 struct for the found process.
17489 (linux_wait_for_event): New function.
17490 (linux_wait): Use it. Support LWPs.
17491 (send_sigstop, wait_for_sigstop, stop_all_processes)
17492 (linux_resume_one_process, linux_continue_one_process): New functions.
17493 (linux_resume): Support LWPs.
17494 (REGISTER_RAW_SIZE): Remove.
17495 (fetch_register): Use register_size instead. Call supply_register.
17496 (usr_store_inferior_registers): Likewise. Call collect_register.
17497 Fix recursive case.
17498 (regsets_fetch_inferior_registers): Improve error message.
17499 (regsets_store_inferior_registers): Add debugging.
17500 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17501 (unstopped_p, linux_signal_pid): New functions.
17502 (linux_target_ops): Add linux_signal_pid.
17503 (linux_init_signals): New function.
17504 (initialize_low): Call it. Initialize using_threads.
17505 * regcache.c (inferior_regcache_data): Add valid
17506 flag.
17507 (get_regcache): Fetch registers lazily. Add fetch argument
17508 and update all callers.
17509 (regcache_invalidate_one, regcache_invalidate): New
17510 functions.
17511 (new_register_cache): Renamed from create_register_cache.
17512 Return the new regcache.
17513 (free_register_cache): Change argument to a void *.
17514 (registers_to_string, registers_from_string): Call get_regcache
17515 with fetch flag set.
17516 (register_data): Make static. Pass fetch flag to get_regcache.
17517 (supply_register): Call get_regcache with fetch flag clear.
17518 (collect_register): Call get_regcache with fetch flag set.
17519 (collect_register_as_string): New function.
17520 * regcache.h: Update.
17521 * remote-utils.c (putpkt): Flush after debug output and use
17522 stderr.
17523 Handle input interrupts while waiting for an ACK.
17524 (input_interrupt): Use signal_pid method.
17525 (getpkt): Flush after debug output and use stderr.
17526 (outreg): Use collect_register_as_string.
17527 (new_thread_notify, dead_thread_notify): New functions.
17528 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17529 and general_thread.
17530 (look_up_one_symbol): Flush after debug output.
17531 * server.c (step_thread, server_waiting): New variables.
17532 (start_inferior): Don't use signal_pid. Update call to mywait.
17533 (attach_inferior): Update call to mywait.
17534 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17535 (main): Don't fetch/store registers explicitly. Use
17536 set_desired_inferior. Support proposed ``Hs'' packet. Update
17537 calls to mywait.
17538 * server.h: Update.
17539 (struct inferior_list, struct_inferior_list_entry): New.
17540 * target.c (set_desired_inferior): New.
17541 (write_inferior_memory): Constify.
17542 (mywait): New function.
17543 * target.h: Update.
17544 (struct target_ops): New signal_pid method.
17545 (mywait): Removed macro, added prototype.
17546
17547 * linux-low.h (regset_func): Removed.
17548 (regset_fill_func, regset_store_func): New.
17549 (enum regset_type): New.
17550 (struct regset_info): Add type field. Use new operation types.
17551 (struct linux_target_ops): stop_pc renamed to get_pc.
17552 Add decr_pc_after_break and breakpoint_at.
17553 (get_process, get_thread_proess, get_process_thread)
17554 (strut process_info, all_processes, linux_attach_lwp)
17555 (thread_db_init): New.
17556
17557 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17558 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17559 (the_low_target): Add new members.
17560 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17561 (i386_store_fpxregset): Constify.
17562 (target_regsets): Add new kind identifier.
17563 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17564 (i386_set_pc): Add debugging.
17565 (i386_breakpoint_at): New function.
17566 (the_low_target): Add new members.
17567 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17568 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17569 (mips_breakpoint_at): New.
17570 (the_low_target): Add new members.
17571 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17572 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17573 (the_low_target): Add new members.
17574 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17575 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17576 (the_low_target): Add new members.
17577 * linux-x86-64-low.c (target_regsets): Add new kind
17578 identifier.
17579
17580 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17581
17582 From Martin Pool <mbp@samba.org>:
17583 * server.c (gdbserver_usage): New function.
17584 (main): Call it.
17585
17586 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17587
17588 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17589 stop_at -> stop_pc.
17590
17591 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17592
17593 * Makefile.in: Remove obsolete code.
17594
17595 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17596
17597 * linux-low.c (regsets_fetch_inferior_registers),
17598 (regsets_store_inferior_registers): Removed cast to int from
17599 ptrace() calls.
17600 * regcache.h: Added declaration of struct inferior_info.
17601
17602 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17603
17604 * inferiors.c (struct inferior_info): Add regcache_data.
17605 (add_inferior): Call create_register_cache.
17606 (clear_inferiors): Call free_register_cache.
17607 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17608 * regcache.c (struct inferior_regcache_data): New.
17609 (registers): Remove.
17610 (get_regcache): New function.
17611 (create_register_cache, free_register_cache): New functions.
17612 (set_register_cache): Don't initialize the register cache here.
17613 (registers_to_string, registers_from_string, register_data): Call
17614 get_regcache.
17615 * regcache.h: Add prototypes.
17616 * server.h: Likewise.
17617
17618 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17619
17620 * mem-break.c: New file.
17621 * mem-break.h: New file.
17622 * Makefile.in: Add mem-break.o rule; update server.h
17623 dependencies.
17624 * inferiors.c (struct inferior_info): Add target_data
17625 member.
17626 (clear_inferiors): Free target_data member if set.
17627 (inferior_target_data, set_inferior_target_data): New functions.
17628 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17629 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17630 * linux-low.c (linux_bp_reinsert): New variable.
17631 (struct inferior_linux_data): New.
17632 (linux_create_inferior): Use set_inferior_target_data.
17633 (linux_attach): Likewise. Call add_inferior.
17634 (linux_wait_for_one_inferior): New function.
17635 (linux_wait): Call it.
17636 (linux_write_memory): Add const.
17637 (initialize_low): Call set_breakpoint_data.
17638 * linux-low.h (struct linux_target_ops): Add breakpoint
17639 handling members.
17640 * server.c (attach_inferior): Remove extra add_inferior
17641 call.
17642 * server.h: Include mem-break.h. Update inferior.c
17643 prototypes.
17644 * target.c (read_inferior_memory)
17645 (write_inferior_memory): New functions.
17646 * target.h (read_inferior_memory)
17647 (write_inferior_memory): Change macros to prototypes.
17648 (struct target_ops): Update comments. Add const to write_memory
17649 definition.
17650
17651 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17652
17653 * linux-low.c (usr_store_inferior_registers): Support
17654 registers which are allowed to fail to store.
17655 * linux-low.h (linux_target_ops): Likewise.
17656 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17657 (ppc_cannot_store_register): FPSCR may not be storable.
17658
17659 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17660
17661 * server.h: Include <string.h> if HAVE_STRING_H.
17662 * ChangeLog: Correct paths in last ChangeLog entry.
17663
17664 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17665
17666 * linux-low.h: Remove obsolete prototypes.
17667 (struct linux_target_ops): New.
17668 (extern the_low_target): New.
17669 * linux-low.c (num_regs, regmap): Remove declarations.
17670 (register_addr): Use the_low_target explicitly.
17671 (fetch_register): Likewise.
17672 (usr_fetch_inferior_registers): Likewise.
17673 (usr_store_inferior_registers): Likewise.
17674 * linux-arm-low.c (num_regs): Remove.
17675 (arm_num_regs): Define.
17676 (arm_regmap): Renamed from regmap, made static.
17677 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17678 made static.
17679 (arm_cannot_store_register): Renamed from cannot_store_register,
17680 made static.
17681 (the_low_target): New.
17682 * linux-i386-low.c (num_regs): Remove.
17683 (i386_num_regs): Define.
17684 (i386_regmap): Renamed from regmap, made static.
17685 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17686 made static.
17687 (i386_cannot_store_register): Renamed from cannot_store_register,
17688 made static.
17689 (the_low_target): New.
17690 * linux-ia64-low.c (num_regs): Remove.
17691 (ia64_num_regs): Define.
17692 (ia64_regmap): Renamed from regmap, made static.
17693 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17694 made static.
17695 (ia64_cannot_store_register): Renamed from cannot_store_register,
17696 made static.
17697 (the_low_target): New.
17698 * linux-m68k-low.c (num_regs): Remove.
17699 (m68k_num_regs): Define.
17700 (m68k_regmap): Renamed from regmap, made static.
17701 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17702 made static.
17703 (m68k_cannot_store_register): Renamed from cannot_store_register,
17704 made static.
17705 (the_low_target): New.
17706 * linux-mips-low.c (num_regs): Remove.
17707 (mips_num_regs): Define.
17708 (mips_regmap): Renamed from regmap, made static.
17709 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17710 made static.
17711 (mips_cannot_store_register): Renamed from cannot_store_register,
17712 made static.
17713 (the_low_target): New.
17714 * linux-ppc-low.c (num_regs): Remove.
17715 (ppc_num_regs): Define.
17716 (ppc_regmap): Renamed from regmap, made static.
17717 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17718 made static.
17719 (ppc_cannot_store_register): Renamed from cannot_store_register,
17720 made static.
17721 (the_low_target): New.
17722 * linux-s390-low.c (num_regs): Remove.
17723 (s390_num_regs): Define.
17724 (s390_regmap): Renamed from regmap, made static.
17725 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17726 made static.
17727 (s390_cannot_store_register): Renamed from cannot_store_register,
17728 made static.
17729 (the_low_target): New.
17730 * linux-sh-low.c (num_regs): Remove.
17731 (sh_num_regs): Define.
17732 (sh_regmap): Renamed from regmap, made static.
17733 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17734 made static.
17735 (sh_cannot_store_register): Renamed from cannot_store_register,
17736 made static.
17737 (the_low_target): New.
17738 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17739 (the_low_target): New.
17740
17741 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17742
17743 * Makefile.in: Add stamp-h target.
17744 * configure.in: Create stamp-h.
17745 * configure: Regenerated.
17746
17747 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17748
17749 * inferiors.c: New file.
17750 * target.c: New file.
17751 * target.h: New file.
17752 * Makefile.in: Add target.o and inferiors.o. Update
17753 dependencies.
17754 * linux-low.c (inferior_pid): New static variable,
17755 moved from server.c.
17756 (linux_create_inferior): Renamed from create_inferior.
17757 Call add_inferior. Return 0 on success instead of a PID.
17758 (linux_attach): Renamed from myattach.
17759 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17760 (linux_thread_alive): Renamed from mythread_alive.
17761 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17762 child dies.
17763 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17764 (regsets_store_inferior_registers): Correct error message.
17765 Add missing ``return 0''.
17766 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17767 (linux_store_registers): Renamed from store_inferior_registers.
17768 (linux_read_memory): Renamed from read_inferior_memory.
17769 (linux_write_memory): Renamed from write_inferior_memory.
17770 (linux_target_ops): New structure.
17771 (initialize_low): Call set_target_ops ().
17772 * remote-utils.c (unhexify): New function.
17773 (hexify): New function.
17774 (input_interrupt): Send signals to ``signal_pid''.
17775 * server.c (inferior_pid): Remove.
17776 (start_inferior): Update create_inferior call.
17777 (attach_inferior): Call add_inferior.
17778 (handle_query): New function.
17779 (main): Call handle_query for `q' packets.
17780 * server.h: Include "target.h". Remove obsolete prototypes.
17781 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17782
17783 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17784
17785 * Makefile.in: Add WARN_CFLAGS. Update configury
17786 dependencies.
17787 * configure.in: Check for <string.h>
17788 * configure: Regenerate.
17789 * config.in: Regenerate.
17790 * gdbreplay.c: Include needed system headers.
17791 (remote_open): Remove strchr prototype.
17792 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17793 * regcache.c (supply_register): Change buf argument to const void *.
17794 (supply_register_by_name): Likewise.
17795 (collect_register): Change buf argument to void *.
17796 (collect_register_by_name): Likewise.
17797 * regcache.h: Add missing prototypes.
17798 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17799 * server.c (handle_query): New function.
17800 (attached): New static variable, moved out of main.
17801 (main): Quiet longjmp clobber warnings.
17802 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17803 * utils.c (error): Remove NORETURN.
17804 (fatal): Likewise.
This page took 0.371421 seconds and 3 git commands to generate.