adeef83a14cde9719bb8b62bddf5da1b4b52bc4f
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-12-26 Christian Biesinger <cbiesinger@google.com>
2
3 * configure: Regenerate.
4 * configure.ac: Quote variable arguments of test.
5
6 2019-12-10 Christian Biesinger <cbiesinger@google.com>
7
8 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
9 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
10 * config.in: Regenerate.
11 * configure: Regenerate.
12 * configure.ac: Don't check for strerror.
13 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
14 Call safe_strerror instead of strerror.
15 * server.h (strerror): Remove this now-unnecessary declaration.
16 * tracepoint.c (init_named_socket): Call safe_strerror instead of
17 strerror.
18 (gdb_agent_helper_thread): Likewise.
19 * utils.c (perror_with_name): Likewise.
20
21 2019-11-26 Tom Tromey <tom@tromey.com>
22
23 * configure, config.in: Rebuild.
24
25 2019-11-26 Tom Tromey <tom@tromey.com>
26
27 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
28 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
29 gdb_sigmask.
30 * configure, config.in: Rebuild.
31
32 2019-11-26 Tom Tromey <tom@tromey.com>
33
34 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
35 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
36 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
37 * acinclude.m4: Include ax_pthread.m4.
38 * config.in, configure: Rebuild.
39
40 2019-11-26 Christian Biesinger <cbiesinger@google.com>
41
42 * debug.c (debug_set_output): Call safe_strerror instead of
43 strerror.
44 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
45 (linux_kill_one_lwp): Likewise.
46 (linux_detach_one_lwp): Likewise.
47 (linux_wait_for_event_filtered): Likewise.
48 (store_register): Likewise.
49 * lynx-low.c (lynx_attach): Likewise.
50 * mem-break.c (insert_memory_breakpoint): Likewise.
51 (remove_memory_breakpoint): Likewise.
52 (delete_fast_tracepoint_jump): Likewise.
53 (set_fast_tracepoint_jump): Likewise.
54 (uninsert_fast_tracepoint_jumps_at): Likewise.
55 (reinsert_fast_tracepoint_jumps_at): Likewise.
56 * nto-low.c (nto_xfer_memory): Likewise.
57 (nto_resume): Likewise.
58
59 2019-11-20 Luis Machado <luis.machado@linaro.org>
60
61 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
62 instead of register count.
63 * tdesc.c (tdesc_contains_feature): New function.
64 * tdesc.h (tdesc_contains_feature): New prototype.
65
66 2019-11-15 Christian Biesinger <cbiesinger@google.com>
67
68 * Makefile.in: Add safe-strerror.c.
69 * configure: Regenerate.
70 * configure.ac: Don't source common.host.
71
72 2019-11-15 Christian Biesinger <cbiesinger@google.com>
73
74 * config.in: Regenerate.
75 * configure: Regenerate.
76
77 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
78
79 * ax.c (ax_printf): Handle size_t_arg.
80
81 2019-11-06 Christian Biesinger <cbiesinger@google.com>
82
83 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
84 * mi/mi-main.c (output_cores): Likewise.
85 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
86 (linux_xfer_osdata_modules): Likewise.
87 * remote.c (register_remote_support_xml): Likewise.
88 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
89 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
90
91 2019-11-01 Christian Biesinger <cbiesinger@google.com>
92
93 * configure: Regenerate.
94 * configure.ac: Remove check for strerror_r.
95
96 2019-10-31 Christian Biesinger <cbiesinger@google.com>
97
98 * config.in: Regenerate.
99 * configure: Regenerate.
100 * configure.ac: Also check for strerror_r.
101
102 2019-10-31 Christian Biesinger <cbiesinger@google.com>
103
104 * ax.h (debug_agent): Remove duplicate declaration.
105
106 2019-10-26 Tom de Vries <tdevries@suse.de>
107
108 * linux-aarch64-low.c: Fix typos in comments.
109 * linux-arm-low.c: Same.
110 * linux-low.c: Same.
111 * linux-ppc-low.c: Same.
112 * proc-service.c: Same.
113 * regcache.h: Same.
114 * server.c: Same.
115 * tracepoint.c: Same.
116 * win32-low.c: Same.
117
118 2019-10-25 Tom Tromey <tromey@adacore.com>
119
120 * utils.c (xstrdup): Remove.
121
122 2019-10-23 Tom Tromey <tom@tromey.com>
123
124 * configure, config.in: Rebuild.
125
126 2019-10-23 Tom Tromey <tom@tromey.com>
127
128 * configure: Rebuild.
129 * acinclude.m4: Use m4_include, not sinclude.
130
131 2019-10-17 Tom Tromey <tromey@adacore.com>
132
133 * configure: Rebuild.
134 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
135 in AC_CONFIG_FILES invocation.
136 * Makefile.in (stamp-h, Makefile): Use new-style config.status
137 invocation.
138
139 2019-10-16 Christian Biesinger <cbiesinger@google.com>
140
141 * server.c: Include xml-builtin.h.
142 (get_xml_features): Don't declare xml_builtins here.
143
144 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
145
146 * Makefile.in: Remove references to vec-ipa.o.
147
148 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
149
150 * Makefile.in: Remove references to vec.c.
151
152 2019-10-02 Christian Biesinger <cbiesinger@google.com>
153
154 * server.c (server_waiting): Change to bool.
155 (extended_protocol): Likewise.
156 (response_needed): Likewise.
157 (exit_requested): Likewise.
158 (run_once): Likewise.
159 (report_no_resumed): Likewise.
160 (non_stop): Likewise.
161 (disable_packet_vCont): Likewise.
162 (disable_packet_Tthread): Likewise.
163 (disable_packet_qC): Likewise.
164 (disable_packet_qfThreadInfo): Likewise.
165 (handle_general_set): Update.
166 (handle_detach): Update.
167 (handle_monitor_command): Update.
168 (handle_query): Update.
169 (captured_main): Update.
170 (process_serial_event): Update.
171 * server.h (server_waiting): Change to bool.
172 (disable_packet_vCont): Likewise.
173 (disable_packet_Tthread): Likewise.
174 (disable_packet_qC): Likewise.
175 (disable_packet_qfThreadInfo): Likewise.
176 (run_once): Likewise.
177 (non_stop): Likewise.
178 * target.c (target_stop_and_wait): Update.
179
180 2019-10-02 Tom Tromey <tromey@adacore.com>
181
182 * Makefile.in (SFILES): Add common-inferior.c.
183 (OBS): Add common-inferior.o.
184 * server.c (startup_with_shell): Don't define.
185
186 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
187
188 * linux-low.c (linux_low_read_btrace): Update for change to
189 std::vector.
190
191 2019-09-20 Christian Biesinger <cbiesinger@google.com>
192
193 * debug.c (debug_threads): Remove comment in favor of the header.
194 * debug.h (using_threads): Add declaration.
195 (debug_threads): Add comment.
196 * linux-aarch64-low.c: Include debug.h and remove declaration of
197 debug_threads.
198 * nto-low.c: Likewise.
199 * remote-utils.c: Likewise.
200 * thread-db.c: Likewise.
201
202 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
203
204 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
205 and powerpc-cell64l-ipa.o.
206 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
207 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
208 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
209 (spu*-*-*): Remove.
210
211 * spu-low.c: Remove file.
212
213 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
214 (parse_spufs_run): Remove.
215 (ppc_get_pc): Remove Cell/B.E. support.
216 (ppc_set_pc): Likewise.
217 (ppc_breakpoint_at): Likewise.
218 (ppc_arch_setup): Likewise.
219 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
220 tdesc_powerpc_cell32l.
221 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
222 or init_registers_powerpc_cell32l.
223 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
224 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
225 or init_registers_powerpc_cell32l.
226 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
227 (init_registers_powerpc_cell32l): Remove prototype.
228 (init_registers_powerpc_cell64l): Likewise.
229
230 * target.h (struct target_ops): Remove qxfer_spu member.
231 * server.c (handle_qxfer_spu): Remove.
232 (qxfer_packets): Remove entry for "spu".
233 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
234 * linux-low.c (SPUFS_MAGIC): Remove.
235 (spu_enumerate_spu_ids): Remove.
236 (linux_qxfer_spu): Remove.
237 (linux_target_ops): Remove qxfer_spu member.
238 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
239 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
240 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
241
242 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
243
244 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
245 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
246 * config.in: Regenerate.
247 * configure: Regenerate.
248
249 2019-08-15 Tom Tromey <tromey@adacore.com>
250
251 * target.c (target_write_memory): Use gdb::byte_vector.
252
253 2019-08-15 Tom Tromey <tromey@adacore.com>
254
255 * tracepoint.c (write_inferior_data_pointer)
256 (write_inferior_integer, write_inferior_int8)
257 (write_inferior_uinteger, m_tracepoint_action_download)
258 (r_tracepoint_action_download, x_tracepoint_action_download)
259 (l_tracepoint_action_download, clear_inferior_trace_buffer)
260 (download_agent_expr, download_tracepoint_1)
261 (download_trace_state_variables, upload_fast_traceframes): Update.
262 * server.c (gdb_write_memory): Update.
263 * remote-utils.c (relocate_instruction): Update.
264 * proc-service.c (ps_pdwrite): Update.
265 * mem-break.c (remove_memory_breakpoint)
266 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
267 (uninsert_fast_tracepoint_jumps_at)
268 (reinsert_fast_tracepoint_jumps_at): Update.
269 * linux-x86-low.c (append_insns)
270 (i386_install_fast_tracepoint_jump_pad)
271 (amd64_write_goto_address, i386_write_goto_address): Update.
272 * linux-s390-low.c (append_insns, s390_write_goto_address):
273 Update.
274 * linux-ppc-low.c (ppc_relocate_instruction)
275 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
276 (ppc_write_goto_address): Update.
277 * linux-aarch64-low.c (append_insns): Update.
278 * target.h (struct target_ops): Update.
279 (write_inferior_memory): Don't declare.
280 * target.c (target_write_memory): Rename from
281 write_inferior_memory. Remove old target_write_memory.
282
283 2019-08-15 Tom Tromey <tromey@adacore.com>
284
285 * target.c (write_inferior_memory): Use std::vector.
286
287 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
288
289 PR build/24886
290 * configure.ac: Drop enable-libmcheck support.
291 * configure, config.in: Rebuild.
292 * acinclude.m4: Don't include it.
293
294 2019-07-19 Alan Hayward <alan.hayward@arm.com>
295
296 * configure.srv: Remove Arm xml files.
297
298 2019-07-19 Alan Hayward <alan.hayward@arm.com>
299
300 * configure.srv: Add new files. Remove xml generated files.
301 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
302 registers.
303 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
304 * linux-aarch32-tdesc.c: New file.
305 * linux-aarch32-tdesc.h: New file.
306 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
307 * linux-arm-low.c (init_registers_arm, tdesc_arm)
308 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
309 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
310 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
311 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
312 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
313 (arm_read_description): Call arm_linux_read_description.
314 (initialize_low_arch): Don't init registers.
315 * linux-arm-tdesc.c: New file.
316 * linux-arm-tdesc.h: New file.
317
318 2019-07-10 Alan Hayward <alan.hayward@arm.com>
319
320 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
321 Move counter inside for.
322 (arm_read_description): Check ptrace earlier.
323 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
324
325 2019-07-09 Tom Tromey <tom@tromey.com>
326
327 * configure: Rebuild.
328 * configure.ac: Change common to gdbsupport.
329 * acinclude.m4: Change common to gdbsupport.
330 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
331 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
332 common to gdbsupport.
333 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
334 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
335 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
336 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
337 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
338 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
339 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
340 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
341 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
342 common to gdbsupport.
343
344 2019-07-04 Alan Hayward <alan.hayward@arm.com>
345
346 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
347 defines.
348 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
349
350 2019-07-04 Alan Hayward <alan.hayward@arm.com>
351
352 * configure.srv: Remove legacy xml.
353 * linux-aarch64-low.c (initialize_low_arch): Remove
354 initialize_low_tdesc call.
355 * linux-aarch64-tdesc-selftest.c: Remove file.
356 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
357 * linux-x86-low.c (initialize_low_arch): Remove
358 initialize_low_tdesc call.
359 * linux-x86-tdesc-selftest.c: Remove file.
360 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
361
362 2019-06-20 Tom de Vries <tdevries@suse.de>
363
364 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
365 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
366
367 2019-06-19 Tom de Vries <tdevries@suse.de>
368
369 * debug.h (debug_write): Change return type to ssize_t.
370 * debug.c (debug_write): Same.
371
372 2019-06-14 Tom Tromey <tom@tromey.com>
373
374 * configure.ac: Use new path to gnulib.
375 * configure: Rebuild.
376 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
377 to gnulib.
378
379 2019-06-11 Tom Tromey <tom@tromey.com>
380
381 * Makefile.in (SFILES): Add alloc.c.
382 (OBS): Add alloc.o.
383 (IPA_OBJS): Add alloc-ipa.o.
384 (alloc-ipa.o): New target.
385 (%.o: ../%.c): New pattern rule.
386
387 2019-06-10 Tom Tromey <tromey@adacore.com>
388
389 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
390 end warning with a newline.
391 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
392 newline.
393 * thread-db.c (attach_thread): Don't end warning with a newline.
394 (thread_db_notice_clone): Likewise.
395 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
396 newline.
397 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
398 end warning with a newline.
399
400 2019-06-04 Pedro Alves <palves@redhat.com>
401
402 * server.c (captured_main): Use make_unique_xstrdup.
403
404 2019-06-02 Tom Tromey <tom@tromey.com>
405
406 * gdbreplay.c (fromhex): Remove.
407 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
408
409 2019-05-29 Tom Tromey <tromey@adacore.com>
410
411 * configure: Rebuild.
412
413 2019-05-06 Kevin Buettner <kevinb@redhat.com>
414
415 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
416 sign extension code on 32-bit builds.
417
418 2019-05-03 Eli Zaretskii <eliz@gnu.org>
419
420 * remote-utils.c:
421 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
422
423 2019-04-19 Tom Tromey <tom@tromey.com>
424
425 * server.c (struct vstop_notif): Derive from notif_event.
426 <base>: Remove.
427 (queue_stop_reply): Update.
428 (remove_all_on_match_ptid): Change type. Rewrite.
429 (discard_queued_stop_replies): Rewrite.
430 (in_queued_stop_replies_ptid): Change type.
431 (in_queued_stop_replies): Rewrite.
432 (notif_stop): Update.
433 (queue_stop_reply_callback): Update.
434 (captured_main): Don't call initialize_notif.
435 (push_stop_notification): Update.
436 * notif.c (notif_write_event, handle_notif_ack)
437 (notif_event_enque, notif_push): Update.
438 (notif_event_xfree, initialize_notif): Remove.
439 * notif.h (struct notif_event): Include <list>, not
440 "common/queue.h".
441 (struct notif_server) <queue>: Now a std::list.
442 (notif_event_p): Remove typedef.
443 (initialize_notif): Don't declare.
444 (struct notif_event): Add virtual destructor.
445
446 2019-04-17 Alan Hayward <alan.hayward@arm.com>
447
448 * ax.c (ax_vdebug): Call debug_printf.
449 * debug.c (debug_write): New function.
450 * debug.h (debug_write): New declaration.
451 * linux-low.c (sigchld_handler): Call debug_write.
452
453 2019-04-17 Alan Hayward <alan.hayward@arm.com>
454
455 * debug.c (debug_set_output): New function.
456 (debug_vprintf): Send output to debug_file.
457 (debug_flush): Likewise.
458 * debug.h (debug_set_output): New declaration.
459 * server.c (handle_monitor_command): Add debug-file option.
460 (captured_main): Likewise.
461
462 2019-04-17 Alan Hayward <alan.hayward@arm.com>
463
464 * debug.c (remote_debug): Add definition.
465 * debug.h (remote_debug): Add declaration.
466 * hostio.c (remote_debug): Remove declaration.
467 * remote-utils.c (struct ui_file): Likewise.
468 (remote_debug): Likewise.
469 * remote-utils.h (remote_debug): Likewise,
470 * server.c (remote_debug): Remove definition.
471
472 2019-04-10 Kevin Buettner <kevinb@redhat.com>
473
474 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
475 when using a 64-bit gdbserver.
476
477 2019-04-09 Tom Tromey <tromey@adacore.com>
478
479 * linux-low.c (select_event_lwp): Use find_thread_in_random.
480
481 2019-04-08 Tom Tromey <tom@tromey.com>
482
483 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
484 throw.
485 (linux_resume_one_lwp): Likewise.
486
487 2019-04-08 Tom Tromey <tom@tromey.com>
488
489 * gdbreplay.c: Update.
490 * linux-low.c: Update.
491 * server.c: Update.
492
493 2019-04-08 Tom Tromey <tom@tromey.com>
494
495 * server.c: Use C++ exception handling.
496 * linux-low.c: Use C++ exception handling.
497 * gdbreplay.c: Use C++ exception handling.
498
499 2019-04-08 Tom Tromey <tom@tromey.com>
500
501 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
502 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
503 (captured_main, main): Update.
504 * gdbreplay.c (main): Update.
505
506 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
507
508 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
509 value in argument pointer, return 1 if the entry is found and 0
510 otherwise. Move comment.
511 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
512 * linux-low.h (linux_get_auxv): Declare.
513 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
514
515 2019-04-05 Tom Tromey <tromey@adacore.com>
516
517 * server.c (gdbserver_usage): Use upper-case for metasyntactic
518 variables.
519
520 2019-03-28 Alan Hayward <alan.hayward@arm.com>
521
522 * linux-low.c (AT_HWCAP2): Add define if not already included.
523
524 2019-03-26 Alan Hayward <alan.hayward@arm.com>
525
526 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
527 (aarch64_arch_setup): Call linux_get_hwcap.
528 * linux-arm-low.c (arm_get_hwcap): Remove function.
529 (arm_read_description): Call linux_get_hwcap.
530 * linux-low.c (linux_get_auxv): New function.
531 (linux_get_hwcap): Likewise.
532 (linux_get_hwcap2): Likewise.
533 * linux-low.h (linux_get_hwcap): New declaration.
534 (linux_get_hwcap2): Likewise.
535 * linux-ppc-low.c (ppc_get_auxv): Remove function.
536 (ppc_arch_setup): Call linux_get_hwcap.
537 * linux-s390-low.c (s390_get_hwcap): Remove function.
538 (s390_arch_setup): Call linux_get_hwcap.
539
540 2019-03-22 Alan Hayward <alan.hayward@arm.com>
541 Jiong Wang <jiong.wang@arm.com>
542
543 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
544 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
545 to fail.
546 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
547
548 2019-03-22 Alan Hayward <alan.hayward@arm.com>
549 Jiong Wang <jiong.wang@arm.com>
550
551 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
552 (aarch64_get_hwcap): New function.
553 (aarch64_arch_setup): Read APIA hwcap.
554
555 2019-03-22 Alan Hayward <alan.hayward@arm.com>
556 Jiong Wang <jiong.wang@arm.com>
557
558 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
559 (initialize_low_tracepoint): Likewise.
560 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
561 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
562 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
563 (aarch64_linux_read_description): Likewise.
564 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
565
566 2019-03-12 John Baldwin <jhb@FreeBSD.org>
567
568 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
569 i386_create_target_description for 'segments' parameter.
570 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
571 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
572 * win32-i386-low.c (i386_arch_setup): Likewise.
573
574 2019-03-12 Tom Tromey <tromey@adacore.com>
575
576 * linux-low.c (iterate_over_lwps): Update.
577
578 2019-03-06 Tom Tromey <tom@tromey.com>
579
580 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
581 (captured_main): Use SCOPE_EXIT.
582
583 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
584
585 * configure.srv: Use '$enable_unittest' instead of '$development'
586 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
587 case.
588
589 2019-02-27 Tom Tromey <tromey@adacore.com>
590
591 * gdbreplay.c (logchar): Handle \r\n.
592
593 2019-02-07 Alan Hayward <alan.hayward@arm.com>
594
595 * linux-low.c (linux_attach): Add process before lwp.
596 * server.c (attach_inferior): Check if already attached.
597
598 2019-02-07 Tom Tromey <tom@tromey.com>
599
600 * x86-tdesc.h: Rename include guard.
601 * x86-low.h: Add include guard.
602 * wincecompat.h: Rename include guard.
603 * win32-low.h: Add include guard.
604 * utils.h: Rename include guard.
605 * tracepoint.h: Rename include guard.
606 * tdesc.h: Rename include guard.
607 * target.h: Rename include guard.
608 * server.h: Rename include guard.
609 * remote-utils.h: Rename include guard.
610 * regcache.h: Rename include guard.
611 * nto-low.h: Rename include guard.
612 * notif.h: Add include guard.
613 * mem-break.h: Rename include guard.
614 * lynx-low.h: Add include guard.
615 * linux-x86-tdesc.h: Add include guard.
616 * linux-s390-tdesc.h: Add include guard.
617 * linux-ppc-tdesc-init.h: Add include guard.
618 * linux-low.h: Add include guard.
619 * linux-aarch64-tdesc.h: Add include guard.
620 * linux-aarch32-low.h: Add include guard.
621 * inferiors.h: Rename include guard.
622 * i387-fp.h: Rename include guard.
623 * hostio.h: Rename include guard.
624 * gdbthread.h: Rename include guard.
625 * gdb_proc_service.h: Rename include guard.
626 * event-loop.h: Rename include guard.
627 * dll.h: Rename include guard.
628 * debug.h: Rename include guard.
629 * ax.h: Rename include guard.
630
631 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
632
633 PR gdb/23985
634 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
635 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
636
637 2019-01-25 Tom Tromey <tom@tromey.com>
638
639 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
640
641 2019-01-25 Tom Tromey <tom@tromey.com>
642
643 * win32-low.c: Fix common/ includes.
644 * win32-i386-low.c: Fix common/ includes.
645 * tracepoint.c: Fix common/ includes.
646 * thread-db.c: Fix common/ includes.
647 * target.h: Fix common/ includes.
648 * symbol.c: Fix common/ includes.
649 * spu-low.c: Fix common/ includes.
650 * server.h: Fix common/ includes.
651 * server.c: Fix common/ includes.
652 * remote-utils.c: Fix common/ includes.
653 * regcache.h: Fix common/ includes.
654 * regcache.c: Fix common/ includes.
655 * nto-x86-low.c: Fix common/ includes.
656 * notif.h: Fix common/ includes.
657 * mem-break.h: Fix common/ includes.
658 * lynx-low.c: Fix common/ includes.
659 * lynx-i386-low.c: Fix common/ includes.
660 * linux-x86-tdesc-selftest.c: Fix common/ includes.
661 * linux-x86-low.c: Fix common/ includes.
662 * linux-low.c: Fix common/ includes.
663 * inferiors.h: Fix common/ includes.
664 * i387-fp.c: Fix common/ includes.
665 * hostio.c: Fix common/ includes.
666 * hostio-errno.c: Fix common/ includes.
667 * gdbthread.h: Fix common/ includes.
668 * gdbreplay.c: Fix common/ includes.
669 * fork-child.c: Fix common/ includes.
670 * event-loop.c: Fix common/ includes.
671 * ax.c:
672 (enum gdb_agent_op): Fix common/ includes.
673
674 2019-01-21 Tom Tromey <tom@tromey.com>
675
676 * tracepoint.c: Fix includes.
677 * remote-utils.c: Fix includes.
678 * linux-x86-low.c: Fix includes.
679
680 2019-01-01 Joel Brobecker <brobecker@adacore.com>
681
682 * gdbreplay.c (gdbreplay_version): Update copyright year in
683 version message.
684 * server.c (gdbserver_version): Likewise.
685
686 2018-12-05 Alan Hayward <alan.hayward@arm.com>
687
688 * linux-low.c (add_lwp): Switch ordering.
689
690 2018-11-29 Tom Tromey <tom@tromey.com>
691
692 * win32-low.c (win32_join): Take pid, not process.
693 * target.h (struct target_ops) <join>: Change argument type.
694 (join_inferior): Change argument name.
695 * spu-low.c (spu_join): Take pid, not process.
696 * server.c (handle_detach): Preserve pid before destroying
697 process.
698 * lynx-low.c (lynx_join): Take pid, not process.
699 * linux-low.c (linux_join): Take pid, not process.
700
701 2018-11-23 Alan Hayward <alan.hayward@arm.com>
702
703 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
704 (aarch64_cannot_fetch_register): Likewise.
705 (struct linux_target_ops): Update references.
706
707 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
708
709 * linux-ppc-low.c: Include nat/linux-ptrace.h.
710
711 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
712
713 * configure.srv (ipa_ppc_linux_regobj): Add
714 powerpc-isa207-htm-vsx32l-ipa.o and
715 powerpc-isa207-htm-vsx64l-ipa.o.
716 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
717 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
718 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
719 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
720 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
721 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
722 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
723 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
724 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
725 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
726 (init_registers_powerpc_isa207_htm_vsx32l)
727 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
728 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
729 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
730 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
731 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
732 (ppc_store_tm_ctarregset): New functions.
733 (ppc_regsets): Add entries for HTM regsets.
734 (ppc_arch_setup): Set htm in features struct when needed. Set
735 sizes for the HTM regsets.
736 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
737 (initialize_low_arch): Call
738 init_registers_powerpc_isa207_htm_vsx32l and
739 init_registers_powerpc_isa207_htm_vsx64l.
740 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
741 PPC_TDESC_ISA207_HTM_VSX.
742 (initialize_low_tracepoint): Call
743 init_registers_powerpc_isa207_htm_vsx32l and
744 init_registers_powerpc_isa207_htm_vsx64l.
745
746 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
747
748 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
749 rs6000/power-linux-pmu.xml to srv_xmlfiles.
750 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
751 (ppc_store_pmuregset): New functions.
752 (ppc_regsets): Add entries for ebb and pmu regsets.
753 (ppc_arch_setup): Set isa207 in features struct if the ebb and
754 pmu regsets are available. Set sizes for these regsets.
755
756 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
757
758 * configure.srv (ipa_ppc_linux_regobj): Add
759 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
760 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
761 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
762 rs6000/powerpc-isa207-vsx32l.xml, and
763 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
764 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
765 <PPC_TDESC_ISA207_VSX>: New enum value.
766 (init_registers_powerpc_isa207_vsx32l): Declare.
767 (init_registers_powerpc_isa207_vsx64l): Declare.
768 * linux-ppc-low.c (ppc_fill_tarregset): New function.
769 (ppc_store_tarregset): New function.
770 (ppc_regsets): Add entry for the TAR regset.
771 (ppc_arch_setup): Set isa207 in features struct when needed. Set
772 size for the TAR regsets.
773 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
774 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
775 and init_registers_powerpc_isa207_vsx64l.
776 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
777 (initialize_low_tracepoint): Call
778 init_registers_powerpc_isa207_vsx32l and
779 init_registers_powerpc_isa207_vsx64l.
780
781 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
782 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
783
784 * configure.srv (ipa_ppc_linux_regobj): Add
785 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
786 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
787 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
788 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
789 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
790 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
791 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
792 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
793 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
794 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
795 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
796 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
797 (ppc_hwcap): Add comment.
798 (ppc_hwcap2): New global.
799 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
800 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
801 (ppc_regsets): Add entries for the DSCR and PPR regsets.
802 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
803 when needed. Set sizes for the the DSCR and PPR regsets.
804 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
805 (initialize_low_arch): Call
806 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
807 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
808 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
809 PPC_TDESC_ISA205_PPR_DSCR_VSX.
810 (initialize_low_tracepoint): Call
811 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
812 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
813
814 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
815
816 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
817
818 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
819 Simon Marchi <simark@simark.ca>
820
821 * acinclude.m4: Include "../selftest.m4".
822 * configure: Regenerate.
823 * configure.ac: Use "GDB_AC_SELFTEST".
824 * configure.srv: Use "$enable_unittests" instead of
825 "$development" when checking whether unit tests have been
826 enabled.
827 * server.c (captured_main): Update message informing that
828 selftests have been disabled.
829
830 2018-10-04 Tom Tromey <tom@tromey.com>
831
832 * configure: Rebuild.
833
834 2018-10-04 Tom Tromey <tom@tromey.com>
835
836 * server.c (handle_status): Rename inner "thread".
837 (process_serial_event): Declare "res" in 'm' case.
838 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
839 (iterate_over_lwps): Rename inner "thread".
840 (linux_qxfer_libraries_svr4): Rename inner "len".
841 * gdbthread.h (find_thread_in_random): Rename inner "thread".
842
843 2018-10-01 Gary Benson <gbenson@redhat.com>
844
845 * gdb_proc_service.h: Moved common code to
846 common/gdb_proc_service.h.
847
848 2018-10-01 Gary Benson <gbenson@redhat.com>
849
850 * gdb_proc_service.h: Synchronize comments and whitespace with
851 GDB's version of this file.
852
853 2018-09-25 Tom Tromey <tom@tromey.com>
854
855 * configure: Rebuild.
856 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
857
858 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
859
860 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
861 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
862 ($(IPA_LIB)): Sort IPA_OBJS.
863
864 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
865
866 * Makefile.in: Remove references to $(ADD_DEPS).
867
868 2018-09-16 Tom Tromey <tom@tromey.com>
869
870 * remote-utils.c (remote_open): Use GNU style for metasyntactic
871 variables.
872 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
873 variables.
874
875 2018-09-05 Tom Tromey <tom@tromey.com>
876
877 * configure: Rebuild.
878
879 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
880
881 PR build/23399
882 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
883
884 2018-08-27 Tom Tromey <tom@tromey.com>
885
886 PR build/23087:
887 * configure: Rebuild.
888
889 2018-08-27 Tom Tromey <tom@tromey.com>
890
891 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
892 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
893 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
894 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
895 (s390x_emit_stack_adjust): Add casts to unsigned char.
896
897 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
898
899 PR gdb/23374
900 PR gdb/23375
901 * server.h (struct client_state) <disable_randomization>:
902 Initialize to 1.
903
904 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
907 variable.
908 (mips_supply_ptrace_register): Likewise.
909
910 2018-07-22 Tom Tromey <tom@tromey.com>
911
912 * configure: Rebuild.
913
914 2018-07-22 Tom Tromey <tom@tromey.com>
915
916 * win32-low.c (win32_create_inferior): Remove unused variables.
917 * gdbreplay.c (remote_open): Remove unused variable.
918 * remote-utils.c (remote_prepare): Remove unused variable.
919 * x86-tdesc.h (X86_TDESC_H): Define.
920 (amd64_expedite_regs): Define conditionally.
921 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
922 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
923 * remote-utils.c (readchar): Remove unused variable.
924
925 2018-07-13 Pedro Alves <palves@redhat.com>
926
927 * linux-low.c (linux_kill): Change parameter to process_info
928 pointer instead of pid. Adjust.
929 * lynx-low.c (lynx_kill): Likewise.
930 * nto-low.c (nto_kill): Likewise.
931 * spu-low.c (spu_kill): Likewise.
932 * win32-low.c (win32_kill): Likewise.
933 * server.c (handle_v_kill, kill_inferior_callback)
934 (detach_or_kill_for_exit): Adjust.
935 * target.c (kill_inferior): Change parameter to process_info
936 pointer instead of pid. Adjust.
937 * target.h (struct target_ops) <kill>: Change parameter to
938 process_info pointer instead of pid. Adjust all implementations
939 and callers.
940 (kill_inferior): Likewise.
941
942 2018-07-13 Pedro Alves <palves@redhat.com>
943
944 * linux-low.c (linux_detach, linux_join): Change parameter to
945 process_info pointer instead of pid. Adjust.
946 * lynx-low.c (lynx_detach, lynx_join): Likewise.
947 * nto-low.c (nto_detach): Likewise.
948 * spu-low.c (spu_detach, spu_join): Likewise.
949 * win32-low.c (win32_detach, win32_join): Likewise.
950 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
951 * target.h (struct target_ops) <detach, join>: Change parameter to
952 process_info pointer instead of pid. Adjust all implementations
953 and callers.
954 (detach_inferior, join_inferior): Rename 'pid' parameter to
955 'proc'.
956
957 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
958 Jan Kratochvil <jan.kratochvil@redhat.com>
959 Paul Fertser <fercerpav@gmail.com>
960 Tsutomu Seki <sekiriki@gmail.com>
961
962 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
963 (OBS): Add 'common/netstuff.o'.
964 (GDBREPLAY_OBS): Likewise.
965 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
966 (remote_open): Implement support for IPv6
967 connections.
968 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
969 and 'wspiapi.h'.
970 (handle_accept_event): Accept connections from IPv6 sources.
971 (remote_prepare): Handle IPv6-style hostnames; implement
972 support for IPv6 connections.
973 (remote_open): Implement support for printing connections from
974 IPv6 sources.
975
976 2018-07-11 Pedro Alves <palves@redhat.com>
977
978 PR gdb/23377
979 * mem-break.c (any_persistent_commands): Add process_info
980 parameter and use it instead of relying on the current process.
981 Change return type to bool.
982 * mem-break.h (any_persistent_commands): Add process_info
983 parameter and change return type to bool.
984 * server.c (handle_detach): Remove require_running_or_return call.
985 Look up the process_info for the process we're about to detach.
986 If not found, return back error to GDB. Adjust
987 any_persistent_commands call to pass down a process pointer.
988
989 2018-07-11 Pedro Alves <palves@redhat.com>
990
991 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
992 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
993 instead of collect_register_by_name.
994 * regcache.c (regcache_raw_get_unsigned_by_name): New.
995 * regcache.h (regcache_raw_get_unsigned_by_name): New.
996
997 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
998 Pedro Alves <palves@redhat.com>
999
1000 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1001
1002 2018-07-03 Tom Tromey <tom@tromey.com>
1003
1004 * linux-low.c: Update.
1005 * lynx-low.c: Update.
1006 * mem-break.c: Update.
1007 * nto-low.c: Update.
1008 * remote-utils.c: Update.
1009 * server.c: Update.
1010 * spu-low.c: Update.
1011 * target.c: Update.
1012 * win32-low.c: Update.
1013
1014 2018-07-03 Tom Tromey <tom@tromey.com>
1015
1016 * server.c: Update.
1017
1018 2018-07-03 Tom Tromey <tom@tromey.com>
1019
1020 * linux-low.c: Update.
1021
1022 2018-07-03 Tom Tromey <tom@tromey.com>
1023
1024 * target.c: Update.
1025
1026 2018-07-03 Tom Tromey <tom@tromey.com>
1027
1028 * linux-low.c: Update.
1029 * linux-mips-low.c: Update.
1030 * lynx-low.c: Update.
1031 * nto-low.c: Update.
1032 * remote-utils.c: Update.
1033 * server.c: Update.
1034 * spu-low.c: Update.
1035 * target.c: Update.
1036 * thread-db.c: Update.
1037
1038 2018-07-03 Tom Tromey <tom@tromey.com>
1039
1040 * linux-low.c: Update.
1041 * linux-mips-low.c: Update.
1042 * lynx-low.c: Update.
1043 * mem-break.c: Update.
1044 * nto-low.c: Update.
1045 * remote-utils.c: Update.
1046 * server.c: Update.
1047 * spu-low.c: Update.
1048 * target.c: Update.
1049 * tracepoint.c: Update.
1050
1051 2018-07-03 Tom Tromey <tom@tromey.com>
1052
1053 * linux-low.c: Update.
1054 * linux-ppc-low.c: Update.
1055 * linux-x86-low.c: Update.
1056 * proc-service.c: Update.
1057 * server.c: Update.
1058 * spu-low.c: Update.
1059 * thread-db.c: Update.
1060 * win32-low.c: Update.
1061
1062 2018-07-03 Tom Tromey <tom@tromey.com>
1063
1064 * linux-low.c: Update.
1065 * lynx-low.c: Update.
1066 * nto-low.c: Update.
1067 * remote-utils.c: Update.
1068 * spu-low.c: Update.
1069 * thread-db.c: Update.
1070 * win32-low.c: Update.
1071
1072 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1073
1074 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1075 parameter in call to 'amd64_create_target_description'.
1076
1077 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1078
1079 * x86-tdesc.h: Remove executable permission flag.
1080
1081 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1082
1083 * configure.ac: Remove AC_PREREQ, add missing quoting.
1084 * configure: Re-generate.
1085 * config.in: Re-generate.
1086 * aclocal.m4: Re-generate.
1087
1088 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * tracepoint.h (current_traceframe): Remove declaration.
1091
1092 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1093
1094 * linux-aarch64-low.c (is_sve_tdesc): New function.
1095 (aarch64_sve_regs_copy_to_regcache): Likewise.
1096 (aarch64_sve_regs_copy_from_regcache): Likewise.
1097 (aarch64_regs_info): Add SVE checks.
1098 (initialize_low_arch): Initialize SVE.
1099
1100 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1101
1102 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1103
1104 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1105
1106 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1107 (initialize_low_tracepoint): Likewise
1108 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1109 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1110 param.
1111 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1112 checks.
1113 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1114
1115 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1116
1117 * server.h (PBUFSIZ): Increase size
1118
1119 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1120
1121 * regcache.c (regcache::raw_compare): New function.
1122 * regcache.h (regcache::raw_compare): New declaration.
1123
1124 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1125
1126 * regcache.c (new_register_cache): Use new.
1127 (free_register_cache): Use delete.
1128 (register_data): Use const.
1129 (supply_register): Move body inside regcache.
1130 (regcache::raw_supply): New override function.
1131 (collect_register): Move body inside regcache.
1132 (regcache::raw_collect): New override function.
1133 (regcache::get_register_status): New override function.
1134 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1135
1136 2018-06-09 Tom Tromey <tom@tromey.com>
1137
1138 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1139 declare queue.
1140 (event_queue): Use std::queue.
1141 (gdb_event_xfree): Remove.
1142 (initialize_event_loop, process_event, wait_for_event): Update.
1143
1144 2018-06-08 Stan Cox <scox@redhat.com>
1145
1146 * win32-low.c (win32_create_inferior): last_ptid and last_status
1147 moved to client_state.
1148
1149 2018-06-08 Pedro Alves <palves@redhat.com>
1150
1151 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1152 common/common-exceptions.o, common/common-utils.o,
1153 common/errors.o, common/print-utils.o and utils.o.
1154 * gdbreplay.c: Include "common-defs.h" instead of the two
1155 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1156 string.h or alloca.h.
1157 (perror_with_name): Delete.
1158 (remote_open): Use xstrdup instead of strdup.
1159 (main): Rename to ...
1160 (captured_main): ... this.
1161 (main): New.
1162
1163 2018-06-08 Tom Tromey <tom@tromey.com>
1164
1165 * linux-low.c (linux_low_read_btrace): Update.
1166
1167 2018-06-04 Stan Cox <scox@redhat.com>
1168
1169 * server.h (struct client_state): New.
1170 * server.c (cont_thread, general_thread, multi_process)
1171 (report_fork_events, report_vfork_events, report_exec_events)
1172 (report_thread_events, swbreak_feature, hwbreak_feature)
1173 (vCont_supported, disable_randomization, pass_signals)
1174 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1175 Moved to client_state.
1176 * remote-utils.c (remote_debug, noack_mode)
1177 (transport_is_reliable): Moved to client_state.
1178 * tracepoint.c (current_traceframe): Moved to client_state.
1179
1180 Update all callers.
1181 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1182 linux-low.c, remote-utils.h, target.c: Use client_state.
1183
1184 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1185
1186 * configure.srv: Add new c/h file.
1187
1188 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1189
1190 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1191 null VQ.
1192
1193 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1194
1195 * gdb.arch/mips-fpregset-core.exp: New test.
1196 * gdb.arch/mips-fpregset-core.c: New test source.
1197
1198 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1199
1200 PR server/23198
1201 * hostio.c (require_int): Do not report overflow for integers
1202 between 0xfffffff and 0x7fffffff.
1203
1204 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1205
1206 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1207 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1208 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1209 functions.
1210 (the_low_target): Wire them.
1211
1212 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1213
1214 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1215 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1216 mode. Call collect_register_by_name with vscr using
1217 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1218 (ppc_store_vrregset): Add and set vscr_offset variable as in
1219 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1220 vscr_offset.
1221
1222 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1223
1224 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1225 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1226 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1227
1228 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1229
1230 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1231 (ppc_store_vsxregset): Likewise.
1232 (ppc_fill_vrregset): Likewise.
1233 (ppc_store_vrregset): Likewise.
1234 (ppc_fill_evrregset): Likewise.
1235 (ppc_store_evrregset): Likewise.
1236 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1237 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1238 needed.
1239
1240 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1241
1242 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1243 wordsize of the inferior. Call ppc_linux_target_wordsize.
1244
1245 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1246
1247 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1248 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1249 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1250 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1251 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1252 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1253 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1254 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1255 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1256 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1257 (tdesc_powerpc_e500l): Remove.
1258 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1259 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1260 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1261 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1262 linux-ppc-tdesc.h.
1263 (ppc_arch_setup): Remove target description matching code. Fill a
1264 ppc_linux_features struct and call ppc_linux_match_description
1265 with it.
1266
1267 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1268
1269 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1270 width of the requested register exceeds the width of the
1271 `ptrace' data type.
1272 (mips_cannot_store_register): Likewise.
1273
1274 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1275
1276 * linux-mips-low.c (mips_fetch_register): New function. Update
1277 preceding comment.
1278 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1279 (the_low_target): Wire `mips_fetch_register'.
1280
1281 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1282
1283 * lynx-i386-low.c (LYNXOS_178): New macro.
1284 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1285 the layout on LynxOS-178.
1286 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1287 handle floating point registers that are not supported by
1288 LynxOS-178.
1289
1290 2018-05-10 Tom Tromey <tom@tromey.com>
1291
1292 * configure: Rebuild.
1293
1294 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1295
1296 PR server/23158:
1297 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1298 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1299 Use it to set the expedite_regs field in the given tdesc.
1300 * x86-tdesc.h: New file.
1301 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1302 Adjust following the addition of the new expedite_regs parameter
1303 to init_target_desc.
1304 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1305 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1306 (i386_linux_read_description, amd64_linux_read_description):
1307 Adjust following the addition of the new expedite_regs parameter
1308 to init_target_desc.
1309 * lynx-i386-low.c: #include "x86-tdesc.h".
1310 (lynx_i386_arch_setup): Adjust following the addition of the new
1311 expedite_regs parameter to init_target_desc.
1312 * nto-x86-low.c: #include "x86-tdesc.h".
1313 (nto_x86_arch_setup): Adjust following the addition of the new
1314 expedite_regs parameter to init_target_desc.
1315 * win32-i386-low.c: #include "x86-tdesc.h".
1316 (i386_arch_setup): Adjust following the addition of the new
1317 expedite_regs parameter to init_target_desc.
1318
1319 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1320
1321 PR server/23158:
1322 * win32-low.c (win32_create_inferior): Add call to my_wait
1323 setting last_status global.
1324
1325 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1326
1327 PR server/23158:
1328 * win32-low.c (create_process): Only call gdb_tilde_expand if
1329 inferior_cwd is not NULL.
1330
1331 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1332
1333 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1334 registers to the cache if their values have changed.
1335 (i387_xsave_to_cache): Provide default values for x87 control
1336 registers when these features are available, but disabled.
1337 * regcache.c (supply_register_by_name_zeroed): New function.
1338 * regcache.h (supply_register_by_name_zeroed): Declare new
1339 function.
1340
1341 2018-05-07 Tom Tromey <tom@tromey.com>
1342
1343 * configure: Rebuild.
1344
1345 2018-05-04 Tom Tromey <tom@tromey.com>
1346
1347 * configure: Rebuild.
1348
1349 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1350 Pedro Alves <palves@redhat.com>
1351
1352 * linux-aarch64-low.c (aarch64_stopped_data_address):
1353 Likewise.
1354
1355 2018-04-27 Tom Tromey <tom@tromey.com>
1356
1357 * configure: Rebuild.
1358
1359 2018-04-23 Tom Tromey <tom@tromey.com>
1360
1361 * configure: Rebuild.
1362
1363 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1364
1365 * Makefile.in (depcomp): Add "..".
1366 (all_deps_files): New and use it.
1367
1368 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1369
1370 * configure.srv (aarch64*-*-linux*): Don't include xml.
1371 (i[34567]86-*-cygwin*): Likewise.
1372 (i[34567]86-*-linux*): Likewise.
1373 (i[34567]86-*-lynxos*): Likewise.
1374 (i[34567]86-*-mingw32ce*): Likewise.
1375 (i[34567]86-*-mingw*): Likewise.
1376 (i[34567]86-*-nto*): Likewise.
1377 (tic6x-*-uclinux): Likewise.
1378 (x86_64-*-linux*): Likewise.
1379 (x86_64-*-mingw*): Likewise.
1380 (x86_64-*-cygwin*): Likewise.
1381
1382 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1383
1384 * tdesc.c: Remove xml parameter.
1385
1386 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1387
1388 * server.c (get_features_xml): Remove cast.
1389 * tdesc.c (void target_desc::accept): Fill in function.
1390 (tdesc_get_features_xml): Remove old xml creation.
1391 (print_xml_feature::visit_pre): Add xml vistor.
1392 * tdesc.h (struct target_desc): Make xmltarget mutable.
1393 (tdesc_get_features_xml): Remove declaration.
1394
1395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1396
1397 * tdesc.c (tdesc_architecture_name): Add new function.
1398 (tdesc_osabi_name): Likewise.
1399 (tdesc_get_features_xml): Use new functions.
1400
1401 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1402
1403 * tdesc.c (tdesc_create_flags): Remove.
1404 (tdesc_add_flag): Likewise.
1405 (tdesc_named_type): Likewise.
1406 (tdesc_create_union): Likewise.
1407 (tdesc_create_struct): Likewise.
1408 (tdesc_create_vector): Likewise.
1409 (tdesc_add_bitfield): Likewise.
1410 (tdesc_add_field): Likewise.
1411 (tdesc_set_struct_size): Likewise.
1412
1413 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1414
1415 * tdesc.c (~target_desc): Remove implictly deleted items.
1416 (init_target_desc): Iterate all features.
1417 (tdesc_get_features_xml): Use vector.
1418 (tdesc_create_feature): Create feature.
1419 * tdesc.h (tdesc_feature) Remove
1420 (target_desc): Add features.
1421
1422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1423
1424 * Makefile.in: Add common/tdesc.c
1425 * tdesc.c (init_target_desc): init all reg_defs from register
1426 vector.
1427 (tdesc_create_reg): Create tdesc_reg.
1428 * tdesc.h (tdesc_feature): Add register vector.
1429
1430 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1431
1432 * tdesc.h (struct target_desc) <features>: Change type to
1433 std::vector<std::string>.
1434 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1435 changes.
1436 (tdesc_get_features_xml): Likewise.
1437 (tdesc_create_feature): Likewise.
1438
1439 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1440
1441 * regcache.c (find_register_by_number): Return a ref.
1442 (find_regno): Use references.
1443 (register_size): Likewise.
1444 (register_data): Likewise.
1445 * tdesc.c (target_desc::~target_desc): Remove free calls.
1446 (target_desc::operator==): Use std::vector compare.
1447 (init_target_desc): Use reference.
1448 (tdesc_create_reg): Use reg constructors.
1449 * tdesc.h (struct target_desc): Replace pointer with object.
1450
1451 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1452
1453 * regcache.c (find_register_by_number): Make static.
1454 (find_regno): Use find_register_by_number
1455 * regcache.h (struct reg): Remove declaration.
1456
1457 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1458
1459 * tdesc.c (target_desc::~target_desc): Move to here.
1460 (target_desc::operator==): Likewise.
1461 * tdesc.h (target_desc::~target_desc): Move from here.
1462 (target_desc::operator==): Likewise.
1463
1464 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1465
1466 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1467
1468 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1469
1470 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1471 S390_TDESC_GS.
1472 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1473 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1474 and init_registers_s390_gs_linux64.
1475
1476 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1477
1478 * linux-s390-low.c (s390_fill_gs): Remove function.
1479 (s390_fill_gsbc): Remove function.
1480 (s390_regsets): Set fill functions for the guarded storage regsets
1481 to NULL.
1482
1483 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1484
1485 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1486 the word size. Add comment.
1487 (s390_get_wordsize): New function.
1488 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1489 pswm with it. Instead, use s390_get_wordsize to determine the
1490 word size first and derive the correct tdesc from that directly.
1491
1492 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * Makefile.in: Include silent-rules.mk.
1495 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1496 (COMPILE): Add ECHO_CXX.
1497 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1498 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1499 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1500 (version-generated.c): Add ECHO_GEN.
1501 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1502 (IPAGENT_COMPILE): Add ECHO_CXX.
1503 (%-generated.c): Add ECHO_REGDAT.
1504
1505 2018-03-14 Tom Tromey <tom@tromey.com>
1506
1507 PR cli/14977:
1508 * ax.c (ax_printf): Special case for NULL.
1509
1510 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1511
1512 * linux-low.c (linux_qxfer_libraries_svr4): Use
1513 xml_escape_text_append.
1514
1515 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1518
1519 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1520
1521 * server.c (handle_general_set): Remove unnecessary xstrdup.
1522
1523 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * server.c (parse_debug_format_options): Adjust to
1526 delim_string_to_char_ptr_vec changes.
1527 * thread-db.c (thread_db_load_search): Adjust to
1528 dirnames_to_char_ptr_vec changes.
1529
1530 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1531
1532 * target.h (target_enable_btrace, target_disable_btrace)
1533 (target_read_btrace, target_read_btrace_conf): Turn macro into
1534 inline function. Throw error if target method is not defined.
1535 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1536 check for btrace target method. Be prepared to handle exceptions
1537 from btrace target methods.
1538
1539 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1540
1541 * server.c (captured_main): Change order of error message printed
1542 when the current working directory cannot be found.
1543
1544 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1545
1546 * server.c: Include "filenames.h" and "pathstuff.h".
1547 (program_name): Delete variable.
1548 (program_path): New anonymous class.
1549 (get_exec_wrapper): Use "program_path" instead of
1550 "program_name".
1551 (handle_v_run): Likewise.
1552 (captured_main): Likewise.
1553 (process_serial_event): Likewise.
1554
1555 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1556
1557 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1558 (OBJS): Add "pathstuff.o".
1559 * server.c (current_directory): New global variable.
1560 (captured_main): Initialize "current_directory".
1561
1562 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1563
1564 * tdesc.c: Use common/tdesc.h.
1565 * tdesc.h: Likewise.
1566
1567 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1568 Simon Marchi <simon.marchi@ericsson.com>
1569
1570 * Makefile.in: Switch order of make rules.
1571
1572 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1573
1574 * Makefile.in: Add common directory in build.
1575 * configure.ac: Add common reference.
1576 * configure: Regenerate.
1577
1578 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1579
1580 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1581 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1582 * spu-low.c (spu_target_ops): Likewise.
1583 * win32-low.c (win32_target_ops): Likewise.
1584 * server.c (supported_btrace_packets): Report packets unconditionally.
1585 * target.h (target_ops) <supports_btrace>: Remove.
1586 (target_supports_btrace): Remove.
1587
1588 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1589
1590 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1591 (handle_btrace_disable): Change return type to void. Use exceptions
1592 to report errors.
1593 (handle_btrace_general_set): Catch exception and copy message to
1594 return message.
1595
1596 2018-02-08 Tom Tromey <tom@tromey.com>
1597
1598 * linux-low.c (install_software_single_step_breakpoints): Use
1599 make_scoped_restore.
1600 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1601 (do_restore_current_thread_cleanup): Remove.
1602 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1603 declare.
1604
1605 2018-02-08 Tom Tromey <tom@tromey.com>
1606
1607 * mem-break.c (set_raw_breakpoint_at): Use
1608 gdb::unique_xmalloc_ptr.
1609
1610 2018-01-30 Pedro Alves <palves@redhat.com>
1611
1612 PR gdb/13211
1613 * target.c (target_terminal::terminal_state): Rename to ...
1614 (target_terminal::m_terminal_state): ... this.
1615
1616 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1617
1618 * linux-low.c (handle_extended_wait): Surround call to
1619 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1620
1621 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1622
1623 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1624 linux_ptrace_attach_fail_reason_string now returning an
1625 std::string.
1626 (linux_attach): Likewise.
1627 * thread-db.c (attach_thread): Likewise.
1628
1629 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1630
1631 PR gdb/21559
1632 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1633 checking for fs_base/gs_base fields in struct user_regs_struct.
1634 * configure: Regenerate.
1635
1636 2018-01-16 Yao Qi <yao.qi@linaro.org>
1637
1638 PR gdb/18749
1639 * linux-low.c (fetch_register): Call supply_register instead of
1640 error.
1641
1642 2018-01-08 Yao Qi <yao.qi@linaro.org>
1643 Simon Marchi <simon.marchi@ericsson.com>
1644
1645 * Makefile.in (OBS): Remove selftest.o.
1646 * configure.ac: Set srv_selftest_objs if $development is true.
1647 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1648 * configure: Re-generated.
1649 * server.c (captured_main): Wrap variable selftest_filter with
1650 GDB_SELF_TEST.
1651
1652 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1653
1654 * server.c (parse_debug_format_options): Return std::string.
1655 (handle_monitor_command, captured_main): Adjust.
1656
1657 2018-01-05 Pedro Alves <palves@redhat.com>
1658
1659 PR gdb/18653
1660 * server.c (captured_main): Pass quiet=false to
1661 save_original_signals_state.
1662
1663 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1664
1665 * gdbreplay.c (gdbreplay_version): Update copyright year in
1666 version message.
1667 * server.c (gdbserver_version): Likewise.
1668
1669 2017-12-08 Tom Tromey <tom@tromey.com>
1670
1671 * ax.c (ax_printf): Update.
1672
1673 2017-12-07 Yao Qi <yao.qi@linaro.org>
1674
1675 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1676 aarch64_linux_read_description.
1677 * linux-amd64-ipa.c (idx2mask): New array.
1678 (get_ipa_tdesc): Move idx2mask out.
1679 (initialize_low_tracepoint): Initialize target descriptions.
1680 * linux-i386-ipa.c (idx2mask): New array.
1681 (get_ipa_tdesc): Move idx2mask out.
1682 (initialize_low_tracepoint): Initialize target descriptions.
1683
1684 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1685
1686 * tdesc.c (struct tdesc_type): Change return type.
1687 (tdesc_add_flag): Change parameter type.
1688 (tdesc_add_bitfield): Likewise.
1689 (tdesc_add_field): Likewise.
1690 (tdesc_set_struct_size): Likewise.
1691
1692 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * regcache.c (registers_to_string): Remove unused variable.
1695
1696 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1697
1698 * inferiors.c (for_each_inferior_with_data): Remove.
1699 * inferiors.h (for_each_inferior_with_data): Remove.
1700 * server.c (handle_qxfer_threads_worker): Change parameter type.
1701 (handle_qxfer_threads_proper): Use for_each_thread.
1702
1703 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1704
1705 * inferiors.c (for_each_inferior): Remove.
1706 (clear_inferiors): Use for_each_thread.
1707 * inferiors.h (for_each_inferior): Remove.
1708 * linux-low.c (linux_wait_for_event_filtered): Use
1709 for_each_thread.
1710 (linux_stabilize_threads): Likewise.
1711 * regcache.c (regcache_release): Likewise.
1712 * server.c (gdb_wants_all_threads_stopped): Likewise.
1713 (clear_pending_status_callback): Remove.
1714 (handle_status): Use for_each_thread.
1715 (captured_main): Likewise.
1716 * win32-low.c (child_init_thread_list): Likewise.
1717 (win32_clear_inferiors): Likewise.
1718 (fake_breakpoint_event): Likewise.
1719
1720 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1721
1722 * inferiors.h (find_inferior): Remove.
1723 * inferiors.c (find_inferior): Remove.
1724
1725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * linux-low.c (resume_status_pending_p): Update comment.
1728 (need_step_over_p): Update comment.
1729
1730 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1731
1732 * linux-low.c (proceed_one_lwp): Return void, change parameter
1733 type.
1734 (unsuspend_and_proceed_one_lwp): Likewise.
1735 (proceed_all_lwps): Use for_each_thread.
1736 (unstop_all_lwps): Likewise.
1737
1738 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1739
1740 * linux-low.c (linux_resume_one_thread): Return void, take
1741 parameter directly.
1742 (linux_resume): Use for_each_thread.
1743
1744 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1745
1746 * linux-low.c (send_sigstop_callback): Return void, change
1747 parameter type. Rename to...
1748 (send_sigstop): ... this.
1749 (suspend_and_send_sigstop_callback): Return void, change parameter
1750 type. Rename to...
1751 (suspend_and_send_sigstop): ... this.
1752 (stop_all_lwps): Use for_each_thread.
1753
1754 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1755
1756 * linux-low.c (lwp_running): Return bool, remove unused
1757 argument.
1758 (linux_stabilize_threads): Use find_thread.
1759
1760 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1761
1762 * linux-low.c (select_singlestep_lwp_callback): Remove.
1763 (count_events_callback): Remove.
1764 (select_event_lwp_callback): Remove.
1765 (select_event_lwp): Use find_thread/for_each_thread.
1766
1767 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * linux-low.c (not_stopped_callback): Return bool, take filter
1770 argument directly.
1771 (linux_wait_for_event_filtered): Use find_thread.
1772 (linux_wait_1): Likewise.
1773
1774 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1775
1776 * linux-low.c (same_lwp): Remove.
1777 (find_lwp_pid): Use find_thread.
1778
1779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1780
1781 * linux-low.c (delete_lwp_callback): Remove.
1782 (linux_mourn): Use for_each_thread.
1783
1784 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1785
1786 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1787 args parameter, don't check for pid.
1788 (linux_detach): Use for_each_thread.
1789
1790 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1791
1792 * linux-low.c (struct counter): Remove.
1793 (second_thread_of_pid_p): Remove.
1794 (last_thread_of_process_p): Use find_thread.
1795
1796 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1797
1798 * inferiors.c (find_inferior_in_random): Remove.
1799 * inferiors.h (find_inferior_in_random): Remove.
1800 * linux-low.c (status_pending_p_callback): Return bool, accept
1801 parameter ptid directly.
1802 (linux_wait_for_event_filtered): Use find_thread_in_random.
1803 (linux_wait_1): Likewise.
1804
1805 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 * inferiors.c (find_inferior_id): Remove.
1808 (find_thread_ptid): Move implemention from find_inferior_id to
1809 here.
1810 * inferiors.h (find_inferior_id): Remove.
1811 * server.c (handle_status): Use find_thread_ptid.
1812 (process_serial_event): Likewise.
1813 * thread-db.c (find_one_thread): Likewise.
1814 (thread_db_thread_handle): Likewise.
1815 * win32-low.c (thread_rec): Likewise.
1816 (child_delete_thread): Likewise.
1817 (win32_thread_alive): Likewise.
1818 (get_child_debug_event): Likewise.
1819
1820 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1821
1822 * linux-mips-low.c (update_watch_registers_callback): Return
1823 void, remove pid_p parameter, don't check for pid.
1824 (mips_insert_point, mips_remove_point): Use for_each_thread.
1825
1826 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1827
1828 * lynx.low (lynx_delete_thread_callback): Remove.
1829 (lynx_mourn): Use for_each_thread.
1830
1831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * regcache.c (regcache_invalidate_one): Remove.
1834 (regcache_invalidate_pid): use for_each_thread.
1835
1836 2017-11-26 Tom Tromey <tom@tromey.com>
1837
1838 * linux-low.c (linux_create_inferior): Update.
1839
1840 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1841
1842 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1843
1844 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1845
1846 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1847 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1848 * linux-aarch64-tdesc-selftest.c: New file.
1849 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1850
1851 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1852
1853 * configure.srv: Add new file.
1854 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1855 * linux-aarch64-tdesc-selftest.c: New file.
1856 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1857
1858 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1859
1860 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1861 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1862 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1863
1864 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1865
1866 * configure.srv: Add new files.
1867 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1868 aarch64_linux_read_description.
1869 * linux-aarch64-low.c (aarch64_linux_read_description):
1870 Merge with aarch64_arch_setup.
1871 (aarch64_arch_setup): Call aarch64_linux_read_description.
1872 * linux-aarch64-tdesc.c: New file.
1873 * linux-aarch64-tdesc.h: New file.
1874
1875 2017-11-24 Yao Qi <yao.qi@linaro.org>
1876
1877 * configure.srv: Set $srv_regobj for tic6x-linux.
1878 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1879 (tic6x_read_description): Move some code to tic6x_arch_setup.
1880 (tic6x_tdesc_test): New function.
1881 (initialize_low_arch): Call selftests::register_test.
1882
1883 2017-11-22 Yao Qi <yao.qi@linaro.org>
1884
1885 * remote-utils.c (prepare_resume_reply): Use memcpy.
1886
1887 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1888
1889 * linux-low.c (kill_one_lwp_callback): Return void, take
1890 argument directly, don't filter on pid.
1891 (linux_kill): Use for_each_thread.
1892
1893 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * linux-low.c (need_step_over_p): Return bool, remove dummy
1896 argument.
1897 (linux_resume, proceed_all_lwps): Use find_thread.
1898
1899 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1900
1901 * linux-low.c (resume_status_pending_p): Return bool, remove
1902 flag_p argument.
1903 (linux_resume): Use find_thread.
1904
1905 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1906
1907 * linux-low.c (struct thread_resume_array): Remove.
1908 (linux_set_resume_request): Return void, take arguments
1909 directly.
1910 (linux_resume): Use for_each_thread.
1911
1912 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1913
1914 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1915 return bool, remove data argument.
1916 (linux_stabilize_threads): Use find_thread.
1917
1918 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1919
1920 * linux-low.c (unsuspend_one_lwp): Remove.
1921 (unsuspend_all_lwps): Use for_each_thread, inline code from
1922 unsuspend_one_lwp.
1923
1924 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1927 * linux-low.c (struct iterate_over_lwps_args): Remove.
1928 (iterate_over_lwps_filter): Remove.
1929 (iterate_over_lwps): Use find_thread.
1930
1931 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1932
1933 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1934 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1935 code from reset_lwp_ptrace_options_callback.
1936
1937 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1938
1939 * linux-arm-low.c (struct update_registers_data): Remove.
1940 (update_registers_callback): Return void, take arguments
1941 directly, don't check thread's pid.
1942 (arm_insert_point, arm_remove_point): Use for_each_thread.
1943
1944 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * win32-low.c (continue_one_thread): Return void, take argument
1947 directly.
1948 (child_continue): Use for_each_thread.
1949
1950 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1951
1952 * win32-i386-low.c (update_debug_registers_callback): Rename
1953 to ...
1954 (update_debug_registers): ... this, return void, remove pid_p arg.
1955 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1956
1957 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1958
1959 * inferiors.h (struct process_info): Add constructor, initialize
1960 fields..
1961 <syscalls_to_catch>: Change type to std::vector<int>.
1962 * inferiors.c (add_process): Allocate process_info with new.
1963 (remove_process): Free process_info with delete.
1964 * linux-low.c (handle_extended_wait): Adjust.
1965 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1966 * server.c (handle_general_set): Adjust.
1967
1968 2017-11-16 Pedro Alves <palves@redhat.com>
1969
1970 * remote-utils.c (remote_close): Block SIGIO signals instead of
1971 uninstalling the SIGIO handler.
1972
1973 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1974
1975 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1976
1977 2017-11-16 Yao Qi <yao.qi@linaro.org>
1978
1979 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1980 (tic6x_store_gregset): Likewise.
1981 (tic6x_usrregs_info): Move it up.
1982
1983 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1984
1985 * Makefile.in: Update arch rules.
1986 * configure.srv: Explicitly mark arch/ files.
1987
1988 2017-11-13 Andreas Schwab <schwab@suse.de>
1989
1990 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1991 function.
1992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1993
1994 2017-11-06 Pedro Alves <palves@redhat.com>
1995
1996 * config.in, configure: Regenerate.
1997
1998 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1999
2000 * target.c (struct thread_search): Remove.
2001 (thread_search_callback): Remove.
2002 (prepare_to_access_memory): Use for_each_thread instead of
2003 find_inferior. Inline code from thread_search_callback.
2004
2005 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2006
2007 * server.c (struct visit_actioned_threads_data): Remove.
2008 (visit_actioned_threads): Change prototype to take arguments
2009 directly.
2010 (resume): Use find_thread instead of find_inferior.
2011
2012 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * server.c (queue_stop_reply_callback): Change prototype, return
2015 void.
2016 (find_status_pending_thread_callback): Remove.
2017 (handle_status): Replace find_inferior with find_thread and
2018 for_each_thread.
2019
2020 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2021
2022 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2023 with REGNO.
2024 (aarch64_store_gregset): Likewise.
2025 (aarch64_fill_fpregset): Likewise.
2026 (aarch64_store_fpregset): Likewise.
2027
2028 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * gdbthread.h (find_thread, for_each_thread): New functions.
2031 * inferiors.c (thread_of_pid): Remove.
2032 (find_any_thread_of_pid): Use find_thread.
2033 * linux-low.c (num_lwps): Use for_each_thread.
2034
2035 2017-10-17 Yao Qi <yao.qi@linaro.org>
2036
2037 * Makefile.in: Remove one rule.
2038 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2039
2040 2017-10-17 Yao Qi <yao.qi@linaro.org>
2041
2042 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2043 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2044
2045 2017-10-17 Yao Qi <yao.qi@linaro.org>
2046
2047 * configure.srv: Rename arm.o with arch/arm.o.
2048
2049 2017-10-17 Yao Qi <yao.qi@linaro.org>
2050
2051 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2052 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2053 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2054 (arch-i386.o, arch-amd64.o): Remove rules.
2055 (arch/%.o): New rule.
2056 Update POSTCOMPILE and COMPILE.pre.
2057 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2058 * configure: Re-generated.
2059 * configure.srv: Replace arch-i386.o with arch/i386.o.
2060 Replace arch-amd64.o with arch/amd64.o.
2061
2062 2017-10-16 Yao Qi <yao.qi@linaro.org>
2063
2064 * configure: Regenerated.
2065
2066 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2067
2068 * inferiors.h: (struct inferior_list): Remove.
2069 (struct inferior_list_entry); Remove.
2070 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2071 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2072 get_first_inferior): Remove.
2073 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2074 find_inferior_id, find_inferior_in_random): Change signature.
2075 * inferiors.c (all_threads): Change type to
2076 std::list<thread_info *>.
2077 (get_thread): Remove macro.
2078 (find_inferior, find_inferior_id): Change signature, implement
2079 using find_thread.
2080 (find_inferior_in_random): Change signature, implement using
2081 find_thread_in_random.
2082 (for_each_inferior, for_each_inferior_with_data): Change
2083 signature, implement using for_each_thread.
2084 (add_inferior_to_list, remove_inferior): Remove.
2085 (add_thread, get_first_thread, thread_of_pid,
2086 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2087 (get_first_inferior, one_inferior_p, clear_inferior_list):
2088 Remove.
2089 (clear_inferiors, get_thread_process): Update.
2090 * gdbthread.h: Include <list>.
2091 (struct thread_info) <entry>: Remove field.
2092 <id>: New field.
2093 (all_threads): Change type to std::list<thread_info *>.
2094 (get_first_inferior): Add doc.
2095 (find_thread, for_each_thread, find_thread_in_random): New
2096 functions.
2097 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2098 * linux-arm-low.c (update_registers_callback): Update.
2099 * linux-low.c (second_thread_of_pid_p): Update.
2100 (kill_one_lwp_callback, linux_detach_lwp_callback,
2101 delete_lwp_callback, status_pending_p_callback, same_lwp,
2102 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2103 iterate_over_lwps, not_stopped_callback,
2104 resume_stopped_resumed_lwps, count_events_callback,
2105 select_singlestep_lwp_callback, select_event_lwp_callback,
2106 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2107 suspend_and_send_sigstop_callback, wait_for_sigstop,
2108 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2109 lwp_running, linux_set_resume_request, resume_status_pending_p,
2110 need_step_over_p, start_step_over, linux_resume_one_thread,
2111 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2112 reset_lwp_ptrace_options_callback): Update.
2113 * linux-mips-low.c (update_watch_registers_callback): Update.
2114 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2115 Update.
2116 (free_register_cache_thread_one): Remove.
2117 (regcache_release): Update.
2118 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2119 handle_qxfer_threads_worker): Update.
2120 (handle_query): Update, use list iterator.
2121 (visit_actioned_threads, handle_pending_status,
2122 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2123 clear_pending_status_callback, set_pending_status_callback,
2124 find_status_pending_thread_callback, handle_status,
2125 process_serial_event): Update.
2126 * target.c (thread_search_callback): Update.
2127 * thread-db.c (thread_db_get_tls_address): Update.
2128 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2129 Update.
2130 * win32-i386-low.c (update_debug_registers_callback): Update.
2131 * win32-low.c (delete_thread_info, child_delete_thread,
2132 continue_one_thread, suspend_one_thread,
2133 get_child_debug_event): Adjust.
2134
2135 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2136
2137 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2138 * inferiors.h: Include <list>.
2139 (struct process_info) <entry>: Remove field.
2140 <pid>: New field.
2141 (pid_of): Change macro to function.
2142 (ptid_of, lwpid_of): Remove macro.
2143 (all_processes): Change type to std::list<process_info *>.
2144 (ALL_PROCESSES): Remove macro.
2145 (for_each_process, find_process): New function.
2146 * inferiors.c (all_processes): Change type to
2147 std::list<process_info *>.
2148 (find_thread_process): Adjust.
2149 (add_process): Likewise.
2150 (remove_process): Likewise.
2151 (find_process_pid): Likewise.
2152 (get_first_process): Likewise.
2153 (started_inferior_callback): Remove.
2154 (have_started_inferiors_p): Adjust.
2155 (attached_inferior_callback): Remove.
2156 (have_attached_inferiors_p): Adjust.
2157 * linux-low.c (check_zombie_leaders): Likewise.
2158 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2159 (x86_linux_update_xmltarget): Adjust.
2160 * server.c (handle_query): Likewise.
2161 (gdb_reattached_process): Remove.
2162 (handle_status): Adjust.
2163 (kill_inferior_callback): Likewise.
2164 (detach_or_kill_inferior): Remove.
2165 (print_started_pid): Likewise.
2166 (print_attached_pid): Likewise.
2167 (detach_or_kill_for_exit): Update.
2168 (process_serial_event): Likewise.
2169 * linux-arm-low.c (arm_new_fork): Likewise.
2170
2171 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2172
2173 * dll.h: Include <list>.
2174 (struct dll_info): Add constructor.
2175 <entry>: Remove field.
2176 (all_dlls): Change type to std::list<dll_info>.
2177 * dll.c: Include <algorithm>.
2178 (get_dll): Remove macro.
2179 (all_dlls): Change type to std::list<dll_info *>.
2180 (free_one_dll): Remove.
2181 (match_dll): Likewise.
2182 (loaded_dll): Adjust.
2183 (unloaded_dll): Adjust to all_dlls type change, use
2184 std::find_if. Inline code from match_dll.
2185 (clear_dlls): Adjust to all_dlls type change.
2186 * server.c (emit_dll_description): Remove.
2187 (handle_qxfer_libraries): Adjust to all_dlls type change,
2188 integrate emit_dll_description's functionality.
2189
2190 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2191
2192 * linux-low.h (struct linux_target_ops) <delete_process>: New
2193 field.
2194 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2195 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2196 (struct linux_target_ops): Add delete_process callback.
2197 * linux-arm-low.c (arm_delete_process): New.
2198 (struct linux_target_ops): Add delete_process callback.
2199 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2200 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2201 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2202 * linux-mips-low.c (mips_linux_delete_process): New.
2203 (struct linux_target_ops): Add delete_process callback.
2204 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2205 * linux-s390-low.c (struct linux_target_ops): Likewise.
2206 * linux-sh-low.c (struct linux_target_ops): Likewise.
2207 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2208 * linux-tile-low.c (struct linux_target_ops): Likewise.
2209 * linux-x86-low.c (x86_linux_delete_process): New.
2210 (struct linux_target_ops): Add delete_process callback.
2211 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2212
2213 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2214
2215 * linux-aarch64-low.c (the_low_target): Add thread delete
2216 callback.
2217 * linux-arm-low.c (arm_delete_thread): New function.
2218 (the_low_target): Add thread delete callback.
2219 * linux-bfin-low.c (the_low_target): Likewise.
2220 * linux-crisv32-low.c (the_low_target): Likewise.
2221 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2222 set.
2223 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2224 field.
2225 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2226 * linux-mips-low.c (mips_linux_delete_thread): New function.
2227 (the_low_target): Add thread delete callback.
2228 * linux-ppc-low.c (the_low_target): Likewise.
2229 * linux-s390-low.c (the_low_target): Likewise.
2230 * linux-sh-low.c (the_low_target): Likewise.
2231 * linux-tic6x-low.c (the_low_target): Likewise.
2232 * linux-tile-low.c (the_low_target): Likewise.
2233 * linux-x86-low.c (the_low_target): Likewise.
2234 * linux-xtensa-low.c (the_low_target): Likewise.
2235
2236 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2237
2238 * win32-low.c: Include "common-inferior.h".
2239
2240 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2241
2242 * inferiors.c (set_inferior_cwd): New function.
2243 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2244 (handle_query): Inform that QSetWorkingDir is supported.
2245 * win32-low.c (create_process): Pass the inferior's cwd to
2246 CreateProcess.
2247
2248 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2249
2250 * inferiors.c (current_inferior_cwd): New global variable.
2251 (get_inferior_cwd): New function.
2252 * inferiors.h (struct process_info) <cwd>: New field.
2253
2254 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2255
2256 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2257 (OBS): Add gdb_tilde_expand.o.
2258
2259 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2260
2261 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2262 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2263
2264 2017-09-29 Pedro Alves <palves@redhat.com>
2265
2266 * ax.c (gdb_parse_agent_expr): Constify.
2267 * ax.h (gdb_parse_agent_expr): Constify.
2268 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2269 Constify.
2270 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2271 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2272 * remote-utils.h (read_ptid): Constify.
2273 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2274 (process_point_options, process_serial_event): Constify.
2275 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2276 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2277 (cmd_qtbuffer): Constify.
2278
2279 2017-09-29 Pedro Alves <palves@redhat.com>
2280
2281 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2282 fails.
2283
2284 2017-09-29 Pedro Alves <palves@redhat.com>
2285
2286 * linux-low.c (handle_extended_wait): Pass parent thread instead
2287 of process to thread_db_notice_clone.
2288 * linux-low.h (thread_db_notice_clone): Replace parent process
2289 parameter with parent thread parameter.
2290 * thread-db.c (find_one_thread): Add comment.
2291 (thread_db_notice_clone): Replace parent process parameter with
2292 parent thread parameter. Temporarily switch to the parent thread.
2293
2294 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2295
2296 * gdbthread.h: Include "common-gdbthread.h".
2297 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2298 "if" when validating the ptid.
2299 * remote-utils.c: Include "gdbthread.h".
2300 (prepare_resume_reply): Use "switch_to_thread".
2301 * target.c (done_accessing_memory): Likewise.
2302
2303 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2304
2305 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2306 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2307 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2308 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2309 s390x-gs-linux64-ipa.o to ipa_obj.
2310 * linux-s390-low.c (HWCAP_S390_GS): New define.
2311 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2312 New functions.
2313 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2314 (s390_arch_setup): Check for guarded-storage support and choose
2315 appropriate tdesc.
2316 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2317 init_registers_s390x_gs_linux64.
2318 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2319 enum value.
2320 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2321 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2322
2323 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2324
2325 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2326
2327 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2328
2329 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2330 (thread_db_thread_handle): Declare.
2331 * linux-low.c (linux_target_ops): Initialize thread_handle.
2332 * server.c (handle_qxfer_threads_worker): Add support for
2333 "handle" attribute.
2334 * target.h (struct target_ops): Add new function pointer,
2335 thread_handle.
2336 (target_thread_handle): Define.
2337 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2338 field in lwp.
2339 (thread_db_thread_handle): New function.
2340
2341 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2342
2343 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2344 * linux-low.h (thread_db_notice_clone): Declare.
2345 * thread-db.c (thread_db_notice_clone): New function.
2346
2347 2017-09-21 Pedro Alves <palves@redhat.com>
2348
2349 * server.c (gdb_read_memory, handle_status, process_serial_event)
2350 (handle_serial_event, handle_target_event): Adjust to
2351 set_desired_thread prototype change.
2352 * target.c (set_desired_thread): Remove 'use_general' parameter
2353 and adjust.
2354 * target.h (set_desired_thread): Remove 'use_general' parameter.
2355
2356 2017-09-20 Tom Tromey <tom@tromey.com>
2357
2358 * target.c (target_terminal::terminal_state): Define.
2359 (target_terminal::init): Rename from target_terminal_init.
2360 (target_terminal::inferior): Rename from
2361 target_terminal_inferior.
2362 (target_terminal::ours): Rename from target_terminal_ours.
2363 (target_terminal::ours_for_output, target_terminal::info): New.
2364
2365 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2366
2367 * server.c (accumulate_file_name_length): Remove.
2368 (emit_dll_description): Adjust to std::string change.
2369 (handle_qxfer_libraries): Use std::string to hold document.
2370
2371 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2372
2373 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2374 return type of xml_escape_text.
2375 * server.c (emit_dll_description): Likewise.
2376
2377 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2378
2379 * server.c (captured_main): Accept argument for --selftest.
2380 Update run_tests call.
2381 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2382 when registering selftests.
2383
2384 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2385
2386 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2387 instead of "VEC" for "target_desc.reg_defs".
2388 (regcache_cpy): Likewise.
2389 (registers_to_string): Likewise.
2390 (registers_from_string): Likewise.
2391 (find_regno): Likewise.
2392 (supply_regblock): Likewise.
2393 (regcache_raw_read_unsigned): Likewise.
2394 * tdesc.c (init_target_desc): Likewise.
2395 (tdesc_create_reg): Likewise.
2396 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2397 (struct target_desc) <reg_defs>: Convert to "std::vector".
2398 (target_desc): Do not initialize "reg_defs".
2399 (~target_desc): Update code to use "std::vector" instead of "VEC"
2400 for "target_desc.reg_defs".
2401 (operator==): Likewise.
2402
2403 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2404
2405 * inferiors.h (thread_to_gdb_id): Remove.
2406 * inferiors.c (thread_to_gdb_id): Remove.
2407 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2408 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2409 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2410 Likewise.
2411 * nto-low.c (nto_fetch_registers, nto_store_registers,
2412 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2413
2414 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2415
2416 * inferiors.h (gdb_id_to_thread_id): Remove.
2417 * inferiors.c (gdb_id_to_thread_id): Remove.
2418 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2419 removal. Move pid declaration closer to where it's used.
2420
2421 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * server.c (handle_detach): New function.
2424 (process_serial_event): Move code out, call handle_detach.
2425
2426 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2427
2428 * server.c (require_running): Rename to ...
2429 (require_running_or_return): ... this ...
2430 (require_running_or_break): ... and this.
2431 (handle_query, process_serial_event): Adjust.
2432
2433 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * linux-low.c (linux_set_resume_request): Remove unused
2436 variables.
2437
2438 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2439
2440 * server.c (first_thread_of): Remove.
2441 (process_serial_event): Replace usage of first_thread_of with
2442 find_any_thread_of_pid.
2443 * tracepoint.c (same_process_p): Remove.
2444 (gdb_agent_about_to_close): Replace usage of same_process_p with
2445 find_any_thread_of_pid.
2446 * linux-x86-low.c (same_process_callback): Remove.
2447 (x86_arch_setup_process_callback): Replace usage of
2448 same_process_callback with find_any_thread_of_pid.
2449 * thread-db.c (any_thread_of): Remove.
2450 (switch_to_process): Replace usage of any_thread_of with
2451 find_any_thread_of_pid.
2452 * inferiors.c (thread_pid_matches_callback): Remove.
2453 (find_thread_process): Adjust to use find_any_thread_of_pid.
2454
2455 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2456
2457 * regcache.c (get_thread_regcache): Guard calls to "memset"
2458 with "!VEC_empty".
2459
2460 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2461
2462 * linux-low.c (handle_extended_wait): Use
2463 "allocate_target_description" instead of "XNEW".
2464 * linux-x86-low.c (initialize_low_arch): Likewise.
2465
2466 2017-09-05 Yao Qi <yao.qi@linaro.org>
2467
2468 * configure.srv (srv_i386_regobj): Remove.
2469 (srv_amd64_regobj): Remove.
2470 (srv_regobj): Set it to "" for x86 non-linux targets.
2471 * linux-x86-tdesc.c (i386_linux_read_description):
2472 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2473 (init_registers_i386): Remove the declaration.
2474 (tdesc_i386): Remove the declaration.
2475 (lynx_i386_arch_setup): Call i386_create_target_description.
2476 * nto-x86-low.c: Likewise.
2477 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2478 [!__x86_64__]: include arch/i386.h.
2479 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2480
2481 2017-09-05 Yao Qi <yao.qi@linaro.org>
2482
2483 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2484 i386/amd64-XXX-linux from it.
2485
2486 2017-09-05 Yao Qi <yao.qi@linaro.org>
2487
2488 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2489 false.
2490 (ipa_amd64_linux_regobj): Remove.
2491 (ipa_x32_linux_regobj): Remove.
2492
2493 2017-09-05 Yao Qi <yao.qi@linaro.org>
2494
2495 * Makefile.in (arch-amd64.o): New rule.
2496 * configure.srv: Append arch-amd64.o.
2497 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2498 (get_ipa_tdesc): Call amd64_linux_read_description.
2499 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2500 and init_registers_amd64_XXX.
2501 * linux-x86-low.c (x86_linux_read_description): Call
2502 amd64_linux_read_description.
2503 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2504 (initialize_low_arch): Don't call init_registers_x32_XXX and
2505 init_registers_amd64_XXX.
2506 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2507 and tdesc_amd64_XXX.
2508 [__x86_64__] (amd64_tdesc_test): New function.
2509 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2510 and init_registers_amd64_XXX.
2511 * linux-x86-tdesc.c: Include arch/amd64.h.
2512 (xcr0_to_tdesc_idx): New function.
2513 (i386_linux_read_description): New function.
2514 (amd64_get_ipa_tdesc_idx): New function.
2515 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2516 (amd64_get_ipa_tdesc): Declare.
2517
2518 2017-09-05 Yao Qi <yao.qi@linaro.org>
2519
2520 * configure.srv (srv_i386_linux_xmlfiles): Remove
2521 i386/i386-XXX-linux.xml from it.
2522
2523 2017-09-05 Yao Qi <yao.qi@linaro.org>
2524
2525 * configure.srv: Set srv_i386_linux_regobj empty if $development
2526 is false.
2527 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2528 initialize_low_tdesc.
2529 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2530 with #if initialize_low_tdesc.
2531 * linux-x86-tdesc-selftest.c: New file.
2532 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2533
2534 2017-09-05 Yao Qi <yao.qi@linaro.org>
2535
2536 * Makefile.in (arch-i386.o): New rule.
2537 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2538 (x86_64-*-linux*): Likewise.
2539 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2540 include arch/i386.h.
2541 (i386_linux_read_description): Remove code and call
2542 i386_create_target_description.
2543 * tdesc.c (allocate_target_description): New function.
2544 * tdesc.h (set_tdesc_architecture): Remove declaration.
2545 (set_tdesc_osabi): Likewise.
2546
2547 2017-09-05 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2550 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2551 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2552 .xmltarget.
2553 * server.c (get_features_xml): Call tdesc_get_features_xml.
2554 * tdesc.c (set_tdesc_architecture): New function.
2555 (set_tdesc_osabi): New function.
2556 (tdesc_get_features_xml): New function.
2557 (tdesc_create_feature): Add an argument.
2558 * tdesc.h (struct target_desc) <features>: New field.
2559 <arch, osabi>: New field.
2560 (~target_desc): xfree features, arch, and osabi.
2561 (target_desc::oerator==): Don't compare .xmltarget.
2562 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2563 (set_tdesc_osabi): Likewise.
2564 (tdesc_get_features_xml): Likewise.
2565
2566 2017-09-05 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-x86-tdesc.c: Include selftest.h.
2569 (i386_tdesc_test): New function.
2570 (initialize_low_tdesc): Call selftests::register_test.
2571 * tdesc.h: Include regdef.h.
2572 (target_desc): Override operator == and !=.
2573
2574 2017-09-05 Yao Qi <yao.qi@linaro.org>
2575
2576 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2577 (ipa_obj): Likewise.
2578 * linux-i386-ipa.c: Include common/x86-xstate.h
2579 (get_ipa_tdesc): Call i386_linux_read_description.
2580 (initialize_low_tracepoint): Don't call init_registers_XXX
2581 functions, call initialize_low_tdesc instead.
2582 * linux-x86-low.c (x86_linux_read_description): Call
2583 i386_linux_read_description.
2584 (initialize_low_arch): Don't call init_registers_i386_XXX
2585 functions, call initialize_low_tdesc.
2586 * linux-x86-tdesc.c: New file.
2587 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2588 (i386_get_ipa_tdesc_idx): Declare.
2589 (i386_get_ipa_tdesc): Declare.
2590 (initialize_low_tdesc): Declare.
2591
2592 2017-09-05 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2595 instead of 0.
2596
2597 2017-09-05 Yao Qi <yao.qi@linaro.org>
2598
2599 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2600 * regcache.c (get_thread_regcache): Use VEC_length.
2601 (init_register_cache): Likewise.
2602 (regcache_cpy): Likewise.
2603 (registers_to_string): Iterate reg_defs via VEC_iterate.
2604 (find_regno): Likewise.
2605 (find_register_by_number): Use VEC_index.
2606 (register_size): Call find_register_by_number.
2607 (register_data): Call find_register_by_number.
2608 (supply_regblock): Use VEC_length.
2609 (regcache_raw_read_unsigned): Likewise.
2610 * tdesc.c (init_target_desc): Iterate reg_defs via
2611 VEC_iterate.
2612 (default_description): Update initializer.
2613 (copy_target_description): Don't update field num_registers.
2614 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2615 <num_registers>: Remove.
2616
2617 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2618
2619 * Makefile.in (.SECONDARY): Define target.
2620
2621 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2622
2623 * linux-low.c (linux_wait_1): Adjust.
2624 * server.c (queue_stop_reply_callback): Adjust.
2625
2626 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2627
2628 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2629 QEnvironmentUnset and QEnvironmentReset packets.
2630 (handle_query): Inform remote that QEnvironmentHexEncoded,
2631 QEnvironmentUnset and QEnvironmentReset are supported.
2632
2633 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2634
2635 * inferiors.h (inferior_target_data): Rename to ...
2636 (thread_target_data): ... this.
2637 (inferior_regcache_data): Rename to ...
2638 (thread_regcache_data): ... this.
2639 (set_inferior_regcache_data): Rename to ...
2640 (set_thread_regcache_data): ... this.
2641 * inferiors.c (inferior_target_data): Rename to ...
2642 (thread_target_data): ... this.
2643 (inferior_regcache_data): Rename to ...
2644 (thread_regcache_data): ... this.
2645 (set_inferior_regcache_data): Rename to ...
2646 (set_thread_regcache_data): ... this.
2647 (free_one_thread): Update.
2648 * linux-low.h (get_thread_lwp): Update.
2649 * regcache.c (get_thread_regcache): Update.
2650 (regcache_invalidate_thread): Update.
2651 (free_register_cache_thread): Update.
2652 * win32-i386-low.c (update_debug_registers_callback): Update.
2653 (win32_get_current_dr): Update.
2654 * win32-low.c (thread_rec): Update.
2655 (delete_thread_info): Update.
2656 (continue_one_thread): Update.
2657 (suspend_one_thread): Update.
2658
2659 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * inferiors.c (set_inferior_target_data): Remove.
2662 * inferiors.h (set_inferior_target_data): Remove.
2663
2664 2017-08-18 Yao Qi <yao.qi@linaro.org>
2665
2666 * Makefile.in (OBS): Add selftest.o.
2667 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2668 * configure, config.in: Re-generated.
2669 * server.c: Include common/sefltest.h.
2670 (captured_main): Handle option --selftest.
2671
2672 2017-08-09 Yao Qi <yao.qi@linaro.org>
2673
2674 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2675 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2676 i386-avx-mpx.o and i386-mmx.o.
2677 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2678 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2679 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2680 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2681 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2682 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2683 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2684 i386/amd64-avx-mpx.xml.
2685
2686 2017-08-09 Yao Qi <yao.qi@linaro.org>
2687
2688 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2689 and x32-avx-avx512.o.
2690 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2691 i386/x32-avx-avx512.xml.
2692
2693 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2694
2695 * tracepoint.h (enum class fast_tpoint_collect_result): New
2696 enumeration.
2697 (fast_tracepoint_collecting): Change return type to
2698 fast_tpoint_collect_result.
2699 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2700 * linux-low.h: Include tracepoint.h.
2701 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2702 fast_tpoint_collect_result.
2703 * linux-low.c (handle_tracepoints): Adjust.
2704 (linux_fast_tracepoint_collecting): Change return type to
2705 fast_tpoint_collect_result.
2706 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2707 linux_wait_1, stuck_in_jump_pad_callback,
2708 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2709 proceed_one_lwp): Adjust to type change.
2710
2711 2017-07-10 Yao Qi <yao.qi@linaro.org>
2712
2713 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2714
2715 2017-06-29 Yao Qi <yao.qi@linaro.org>
2716
2717 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2718 Remove.
2719 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2720
2721 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2724
2725 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2726
2727 * linux-low.c (linux_create_inferior): Adjust code to access the
2728 environment information via 'gdb_environ' class.
2729 * lynx-low.c (lynx_create_inferior): Likewise.
2730 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2731 (get_environ): Return a pointer to 'our_environ'.
2732 (captured_main): Initialize 'our_environ'.
2733 * server.h (get_environ): Adjust prototype.
2734 * spu-low.c (spu_create_inferior): Adjust code to access the
2735 environment information via 'gdb_environ' class.
2736
2737 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2738
2739 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2740 usage of "register" keyword.
2741
2742 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2743
2744 * configure: Re-generate.
2745
2746 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2747
2748 * configure: Re-generate.
2749
2750 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2751
2752 * Makefile.in (COMPILE.pre): Add "-x c++".
2753
2754 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2755
2756 * fork-child.c: Conditionally include <signal.h>.
2757
2758 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2759
2760 * server.c (handle_general_set): Handle new packet
2761 "QStartupWithShell".
2762 (handle_query): Add "QStartupWithShell" to the list of supported
2763 packets.
2764 (gdbserver_usage): Add help text explaining the
2765 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2766 options.
2767 (captured_main): Recognize and act upon the presence of the new
2768 CLI options.
2769
2770 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2771 Pedro Alves <palves@redhat.com>
2772
2773 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2774 * configure: Regenerate.
2775 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2776 "fork-inferior.o".
2777 (i[34567]86-*-lynxos*): Likewise.
2778 (spu*-*-*): Likewise.
2779 * fork-child.c: New file.
2780 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2781 and "environ.h".
2782 (linux_ptrace_fun): New function.
2783 (linux_create_inferior): Adjust function prototype to reflect
2784 change on "target.h". Adjust function code to use
2785 "fork_inferior".
2786 (linux_request_interrupt): Delete "signal_pid".
2787 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2788 (lynx_ptrace_fun): New function.
2789 (lynx_create_inferior): Adjust function prototype to reflect
2790 change on "target.h". Adjust function code to use
2791 "fork_inferior".
2792 * nto-low.c (nto_create_inferior): Adjust function prototype and
2793 code to reflect change on "target.h". Update comments.
2794 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2795 "common-terminal.h" and "environ.h".
2796 (terminal_fd): Moved to fork-child.c.
2797 (old_foreground_pgrp): Likewise.
2798 (restore_old_foreground_pgrp): Likewise.
2799 (last_status): Make it global.
2800 (last_ptid): Likewise.
2801 (our_environ): New variable.
2802 (startup_with_shell): Likewise.
2803 (program_name): Likewise.
2804 (program_argv): Rename to...
2805 (program_args): ...this.
2806 (wrapper_argv): New variable.
2807 (start_inferior): Delete function.
2808 (get_exec_wrapper): New function.
2809 (get_exec_file): Likewise.
2810 (get_environ): Likewise.
2811 (prefork_hook): Likewise.
2812 (post_fork_inferior): Likewise.
2813 (postfork_hook): Likewise.
2814 (postfork_child_hook): Likewise.
2815 (handle_v_run): Update code to deal with arguments coming from the
2816 remote host. Update calls from "start_inferior" to
2817 "create_inferior".
2818 (captured_main): Likewise. Initialize environment variable. Call
2819 "have_job_control".
2820 * server.h (post_fork_inferior): New prototype.
2821 (get_environ): Likewise.
2822 (last_status): Declare.
2823 (last_ptid): Likewise.
2824 (signal_pid): Likewise.
2825 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2826 (spu_ptrace_fun): New function.
2827 (spu_create_inferior): Adjust function prototype to reflect change
2828 on "target.h". Adjust function code to use "fork_inferior".
2829 * target.c (target_terminal_init): New function.
2830 (target_terminal_inferior): Likewise.
2831 (target_terminal_ours): Likewise.
2832 * target.h: Include <vector>.
2833 (struct target_ops) <create_inferior>: Update prototype.
2834 (create_inferior): Update macro.
2835 * utils.c (gdb_flush_out_err): New function.
2836 * win32-low.c (win32_create_inferior): Adjust function prototype
2837 and code to reflect change on "target.h".
2838
2839 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2840
2841 * inferiors.c (switch_to_thread): New function.
2842
2843 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2844
2845 * Makefile.in (SFILE): Add "common/job-control.c".
2846 (OBS): Add "job-control.o".
2847
2848 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2849
2850 * Makefile: Remove "@host_makefile_frag@".
2851
2852 2017-05-05 Pedro Alves <palves@redhat.com>
2853
2854 * configure: Regenerate.
2855
2856 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2857
2858 * configure: Regenerate.
2859
2860 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2861
2862 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2863 software_single_step change of return type to
2864 std::vector<CORE_ADDR>.
2865 * linux-low.c (install_software_single_step_breakpoints):
2866 Likewise.
2867 * linux-low.h (install_software_single_step_breakpoints):
2868 Likewise.
2869
2870 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2871
2872 * remote-utils.c: Include "gdb_termios.h" instead of
2873 "terminal.h".
2874 * terminal.h: Delete file.
2875
2876 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2877
2878 * server.c: Include <vector>.
2879 <program_argv, wrapper_argv>: Convert to std::vector.
2880 (start_inferior): Rewrite function to use C++.
2881 (handle_v_run): Likewise. Update code that calculates the argv
2882 based on the vRun packet; use C++.
2883 (captured_main): Likewise.
2884
2885 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2886
2887 * server.c (handle_v_cont): Initialize thread_resume::thread
2888 with null_ptid.
2889
2890 2017-04-05 Pedro Alves <palves@redhat.com>
2891
2892 * configure: Regenerate.
2893
2894 2017-04-05 Pedro Alves <palves@redhat.com>
2895
2896 * gdbreplay.c (sync_error): Constify.
2897 * linux-x86-low.c (push_opcode): Constify.
2898
2899 2017-04-05 Pedro Alves <palves@redhat.com>
2900
2901 * win32-low.c (get_child_debug_event)
2902 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2903 Report TARGET_WAITKIND_SPURIOUS instead.
2904
2905 2017-04-05 Pedro Alves <palves@redhat.com>
2906
2907 * remote-utils.c (remote_prepare, remote_open): Constify.
2908 * remote-utils.h (remote_prepare, remote_open): Constify.
2909 * server.c (captured_main): Constify 'port' handling.
2910
2911 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2912
2913 * Makefile.in (clean): Clear .deps.
2914
2915 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2916
2917 * .gitignore: Remove generated files, replace with wildcard.
2918 * (clean): Replace removal of generated files with wildcard.
2919 (version.c): Replace with...
2920 (version-generated.c): ...this.
2921 (xml-builtin.c): Replace with...
2922 (xml-builtin-generated.c): ...this.
2923 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2924 (%.c: *regformats*): Replace with...
2925 (%-generated.c: *regformats*): ...this.
2926
2927 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2928
2929 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2930 (xtensa_fill_gregset): Call collect_register_by_name for
2931 threadptr register.
2932 (xtensa_store_gregset): Call supply_register_by_name for
2933 threadptr register.
2934
2935 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2936
2937 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2938 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2939 (xtensa_store_gregset): Call supply_register for all registers in
2940 a0_regnum..a0_regnum + C0_NREGS range.
2941
2942 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2943
2944 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2945 (ax-ipa.o: ax.c): Remove.
2946 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2947 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2948 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2949 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2950 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2951
2952 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2953
2954 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2955 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2956 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2957 (errors-ipa.o: ../common/errors.c): Remove.
2958 (format-ipa.o: ../common/format.c): Remove.
2959 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2960
2961 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2962
2963 * Makefile.in (%-ipa.o: %.c): New rule.
2964 (tracepoint-ipa.o: tracepoint.c): Remove.
2965 (utils-ipa.o: utils.c): Remove.
2966 (remote-utils-ipa.o: remote-utils.c): Remove.
2967 (regcache-ipa.o: regcache.c): Remove.
2968 (i386-linux-ipa.o: i386-linux.c): Remove.
2969 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2970 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2971 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2972 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2973 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2974 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2975 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2976 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2977 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2978 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2979 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2980 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2981 (aarch64-ipa.o: aarch64.c): Remove.
2982 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2983 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2984 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2985 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2986 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2987 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2988 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2989 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2990 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2991 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2992 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2993 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2994 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2995 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2996 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2997 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2998 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2999 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3000 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3001 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3002 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3003 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3004 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3005 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3006 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3007 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3008 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3009 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3010 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3011 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3012 (tdesc-ipa.o: tdesc.c): Remove.
3013 (x32-linux-ipa.o: x32-linux.c): Remove.
3014 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3015 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3016
3017 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3018
3019 * Makefile.in (%.o: ../arch/%.c): New rule.
3020 (arm.o: ../arch/arm.c): Remove.
3021 (arm-linux.o: ../arch/arm-linux.c): Remove.
3022 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3023 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3024
3025 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3026
3027 * Makefile.in (%.o: ../nat/%.c): New rule.
3028 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3029 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3030 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3031 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3032 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3033 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3034 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3035 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3036 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3037 (linux-personality.o: ../nat/linux-personality.c): Remove.
3038 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3039 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3040 (x86-linux.o: ../nat/x86-linux.c): Remove.
3041 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3042 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3043
3044 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3045
3046 * Makefile.in (%.o: ../common/%.c): New rule.
3047 (signals.o: ../common/signals.c): Remove.
3048 (print-utils.o: ../common/print-utils.c): Remove.
3049 (rsp-low.o: ../common/rsp-low.c): Remove.
3050 (common-utils.o: ../common/common-utils.c): Remove.
3051 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3052 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3053 (vec.o: ../common/vec.c): Remove.
3054 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3055 (xml-utils.o: ../common/xml-utils.c): Remove.
3056 (ptid.o: ../common/ptid.c): Remove.
3057 (buffer.o: ../common/buffer.c): Remove.
3058 (format.o: ../common/format.c): Remove.
3059 (filestuff.o: ../common/filestuff.c): Remove.
3060 (agent.o: ../common/agent.c): Remove.
3061 (errors.o: ../common/errors.c): Remove.
3062 (environ.o: ../common/environ.c): Remove.
3063 (common-debug.o: ../common/common-debug.c): Remove.
3064 (cleanups.o: ../common/cleanups.c): Remove.
3065 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3066 (fileio.o: ../common/fileio.c): Remove.
3067 (common-regcache.o: ../common/common-regcache.c): Remove.
3068 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3069 (new-op.o: ../common/new-op.c): Remove.
3070 (btrace-common.o: ../common/btrace-common.c): Remove.
3071
3072 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3073
3074 * Makefile.in (%.o: ../target/%.c): New rule.
3075 (waitstatus.o: ../target/waitstatus.c): Remove.
3076
3077 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * Makefile.in
3080 (%.c: ../regformats/%.dat,
3081 (%.c: ../regformats/arm/%.dat,
3082 (%.c: ../regformats/i386/%.dat,
3083 (%.c: ../regformats/rs6000/%.dat): New rules.
3084 (aarch64.c): Remove.
3085 (reg-arm.c): Remove.
3086 (arm-with-iwmmxt.c): Remove.
3087 (arm-with-vfpv2.c): Remove.
3088 (arm-with-vfpv3.c): Remove.
3089 (arm-with-neon.c): Remove.
3090 (reg-bfin.c): Remove.
3091 (reg-cris.c): Remove.
3092 (reg-crisv32.c): Remove.
3093 (i386.c): Remove.
3094 (i386-linux.c): Remove.
3095 (i386-avx.c): Remove.
3096 (i386-avx-linux.c): Remove.
3097 (i386-avx-avx512.c): Remove.
3098 (i386-avx-avx512-linux.c): Remove.
3099 (i386-mpx.c): Remove.
3100 (i386-mpx-linux.c): Remove.
3101 (i386-avx-mpx-avx512-pku.c): Remove.
3102 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3103 (i386-avx-mpx.c): Remove.
3104 (i386-avx-mpx-linux.c): Remove.
3105 (i386-mmx.c): Remove.
3106 (i386-mmx-linux.c): Remove.
3107 (reg-ia64.c): Remove.
3108 (reg-m32r.c): Remove.
3109 (reg-m68k.c): Remove.
3110 (reg-cf.c): Remove.
3111 (mips-linux.c): Remove.
3112 (mips-dsp-linux.c): Remove.
3113 (mips64-linux.c): Remove.
3114 (mips64-dsp-linux.c): Remove.
3115 (nios2-linux.c): Remove.
3116 (powerpc-32.c): Remove.
3117 (powerpc-32l.c): Remove.
3118 (powerpc-altivec32l.c): Remove.
3119 (powerpc-cell32l.c): Remove.
3120 (powerpc-vsx32l.c): Remove.
3121 (powerpc-isa205-32l.c): Remove.
3122 (powerpc-isa205-altivec32l.c): Remove.
3123 (powerpc-isa205-vsx32l.c): Remove.
3124 (powerpc-e500l.c): Remove.
3125 (powerpc-64l.c): Remove.
3126 (powerpc-altivec64l.c): Remove.
3127 (powerpc-cell64l.c): Remove.
3128 (powerpc-vsx64l.c): Remove.
3129 (powerpc-isa205-64l.c): Remove.
3130 (powerpc-isa205-altivec64l.c): Remove.
3131 (powerpc-isa205-vsx64l.c): Remove.
3132 (s390-linux32.c): Remove.
3133 (s390-linux32v1.c): Remove.
3134 (s390-linux32v2.c): Remove.
3135 (s390-linux64.c): Remove.
3136 (s390-linux64v1.c): Remove.
3137 (s390-linux64v2.c): Remove.
3138 (s390-te-linux64.c): Remove.
3139 (s390-vx-linux64.c): Remove.
3140 (s390-tevx-linux64.c): Remove.
3141 (s390x-linux64.c): Remove.
3142 (s390x-linux64v1.c): Remove.
3143 (s390x-linux64v2.c): Remove.
3144 (s390x-te-linux64.c): Remove.
3145 (s390x-vx-linux64.c): Remove.
3146 (s390x-tevx-linux64.c): Remove.
3147 (tic6x-c64xp-linux.c): Remove.
3148 (tic6x-c64x-linux.c): Remove.
3149 (tic6x-c62x-linux.c): Remove.
3150 (reg-sh.c): Remove.
3151 (reg-sparc64.c): Remove.
3152 (reg-spu.c): Remove.
3153 (amd64.c): Remove.
3154 (amd64-linux.c): Remove.
3155 (amd64-avx.c): Remove.
3156 (amd64-avx-linux.c): Remove.
3157 (amd64-avx-avx512.c): Remove.
3158 (amd64-avx-avx512-linux.c): Remove.
3159 (amd64-mpx.c): Remove.
3160 (amd64-mpx-linux.c): Remove.
3161 (amd64-avx-mpx-avx512-pku.c): Remove.
3162 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3163 (amd64-avx-mpx.c): Remove.
3164 (amd64-avx-mpx-linux.c): Remove.
3165 (x32.c): Remove.
3166 (x32-linux.c): Remove.
3167 (x32-avx.c): Remove.
3168 (x32-avx-linux.c): Remove.
3169 (x32-avx-avx512.c): Remove.
3170 (x32-avx-avx512-linux.c): Remove.
3171 (reg-xtensa.c): Remove.
3172 (reg-tilegx.c): Remove.
3173 (reg-tilegx32.c): Remove.
3174
3175 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3176
3177 * Makefile.in (SFILES): Add "common/environ.c".
3178 (OBJS): Add "common/environ.h".
3179
3180 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3181
3182 * configure.ac: Check if the fs_base and gs_base members of
3183 `struct user_regs_struct' exist.
3184 * config.in: Regenerated.
3185 * configure: Likewise.
3186
3187 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3188
3189 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3190 target_read_memory.
3191 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3192 (get_next_pcs_syscall_next_pc): Likewise.
3193
3194 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3195
3196 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3197 * nto-x86-low.c: Likewise.
3198
3199 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3200
3201 * Makefile.in: Include disable-implicit-rules.mk.
3202
3203 2016-11-23 Pedro Alves <palves@redhat.com>
3204
3205 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3206 (debug_vprintf): Use std::chrono::steady_clock instead of
3207 gettimeofday. Use '.' instead of ':'.
3208 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3209 (get_timestamp): Use std::chrono::steady_clock instead of
3210 gettimeofday.
3211
3212 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3213
3214 * Makefile.in: Fix whitespace formatting.
3215
3216 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3217
3218 * Makefile.in (SFILES, OBS): Flatten list and order
3219 alphabetically.
3220
3221 2016-11-23 Pedro Alves <palves@redhat.com>
3222
3223 * event-loop.c (handle_file_event): Use warning.
3224 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3225 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3226 Use warning.
3227
3228 2016-11-23 Pedro Alves <palves@redhat.com>
3229
3230 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3231 output.
3232 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3233 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3234 debug_printf and debug_flush for debug output.
3235 * server.c (handle_general_set): Likewise.
3236 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3237 output.
3238
3239 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * Makefile.in (.c.o): Replace rule with ...
3242 (%.o: %.c): ... this one.
3243
3244 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3245
3246 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3247 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3248 make.
3249 * configure.ac: Remove checks for the make program.
3250 * configure: Re-generate.
3251
3252 2016-10-28 Pedro Alves <palves@redhat.com>
3253
3254 * Makefile.in (CXX_DIALECT): Get from configure.
3255 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3256 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3257 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3258 * config.in: Regenerate.
3259 * configure: Regenerate.
3260
3261 2016-10-27 Yao Qi <yao.qi@linaro.org>
3262
3263 * linux-low.c (linux_supports_range_stepping): Return true if
3264 can_software_single_step return true.
3265
3266 2016-10-27 Yao Qi <yao.qi@linaro.org>
3267
3268 * inferiors.c (find_inferior_in_random): New function.
3269 * inferiors.h (find_inferior_in_random): Declare.
3270 * linux-low.c (linux_wait_for_event_filtered): Call
3271 find_inferior_in_random instead of find_inferior.
3272
3273 2016-10-27 Yao Qi <yao.qi@linaro.org>
3274
3275 * linux-low.c (linux_wait_1): If single-step breakpoints are
3276 inserted, remove them.
3277
3278 2016-10-26 Pedro Alves <palves@redhat.com>
3279
3280 * linux-low.c (handle_extended_wait): Link parent/child fork
3281 threads.
3282 (linux_wait_1): Unlink them.
3283 (linux_set_resume_request): Ignore resume requests for
3284 already-resumed and unhandled fork child threads.
3285 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3286 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3287 New functions.
3288 (handle_v_requests) <vCont>: Don't call require_running.
3289 * server.h (in_queued_stop_replies): New declaration.
3290
3291 2016-10-24 Yao Qi <yao.qi@linaro.org>
3292
3293 PR server/20733
3294 * linux-aarch64-low.c (append_insns): Cast the return value to
3295 'uint32_t *'.
3296
3297 2016-10-10 Yao Qi <yao.qi@linaro.org>
3298
3299 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3300
3301 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3302
3303 * target.c (target_supports_multi_process): New function, moved
3304 from...
3305 * target.h (target_supports_multi_process): ... here. Remove
3306 macro.
3307
3308 2016-10-05 Tom Tromey <tom@tromey.com>
3309
3310 PR remote/20655:
3311 * tracepoint.c (handle_tracepoint_bkpts): Check
3312 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3313
3314 2016-10-05 Yao Qi <yao.qi@linaro.org>
3315
3316 * configure.srv: Update the path of arm-*.xml files.
3317
3318 2016-10-05 Terry Guo <terry.guo@arm.com>
3319 Yao Qi <yao.qi@linaro.org>
3320
3321 * Makefile.in: Adjust the path of rules.
3322 * configure.srv: Update the path of xml files.
3323 * regformats/arm-with-iwmmxt.dat: Regenerated.
3324 * regformats/arm-with-neon.dat: Likewise.
3325 * regformats/arm-with-vfpv2.dat: Likewise.
3326 * regformats/arm-with-vfpv3.dat Likewise.
3327
3328 2016-09-30 Yao Qi <yao.qi@linaro.org>
3329
3330 PR gdbserver/20627
3331 * target.c (target_stop_and_wait): Don't call
3332 target_continue_no_signal, use resume_stop instead.
3333
3334 2016-09-26 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-low.c (linux_wait_1): Call debug_exit.
3337
3338 2016-09-23 Pedro Alves <palves@redhat.com>
3339
3340 * Makefile.in (SFILES): Add common/new-op.c.
3341 (OBS): Add common/new-op.o.
3342 (new-op.o): New rule.
3343
3344 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3345
3346 * .gitinore: Ignore more files.
3347
3348 2016-09-21 Yao Qi <yao.qi@linaro.org>
3349
3350 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3351 23.
3352
3353 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3354
3355 * server.c (start_inferior): Call target_mourn_inferior instead of
3356 mourn_inferior; pass ptid_t argument to it.
3357 (resume): Likewise.
3358 (handle_target_event): Likewise.
3359 * target.c (target_mourn_inferior): New function.
3360 * target.h (mourn_inferior): Delete macro.
3361
3362 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3363
3364 * linux-low.c (lwp_is_stepping): New function.
3365
3366 2016-09-06 Carl Love <cel@us.ibm.com>
3367
3368 * server.c (start_inferior): Fixed comment, requested comment change
3369 didn't get updated correctly. Removed reference to ptrace () call as
3370 it is only true on Linux systems.
3371
3372 2016-09-06 Carl Love <cel@us.ibm.com>
3373
3374 * server.c (start_inferior): Do not call
3375 function target_post_create_inferior () if the
3376 inferior process has already exited.
3377
3378 2016-09-05 Pedro Alves <palves@redhat.com>
3379
3380 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3381 (COMPILE.pre, CC_LD): Use CXX directly.
3382 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3383 * acinclude.m4: Don't include build-with-cxx.m4.
3384 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3385 * configure: Regenerate.
3386
3387 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3388
3389 PR gdb/19495
3390 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3391 call writing data to own_buf.
3392
3393 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3394
3395 * target.c (mywait): Call target_wait instead of
3396 the_target->wait.
3397 (target_wait): New function.
3398
3399 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3400
3401 * server.c (start_inferior): New variable 'ptid'. Replace calls
3402 to the_target->resume by target_continue{,_no_signal}, depending
3403 on the case.
3404 * target.c (target_stop_and_wait): Call target_continue_no_signal
3405 instead of the_target->resume.
3406 (target_continue): New function.
3407
3408 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3409
3410 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3411
3412 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3413
3414 PR server/20491
3415 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3416 ps_prochandle.
3417 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3418 * linux-arm-low.c (ps_get_thread_area): Likewise.
3419 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3420 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3421 * linux-mips-low.c (ps_get_thread_area): Likewise.
3422 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3423 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3424 * linux-x86-low.c (ps_get_thread_area): Likewise.
3425 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3426
3427 2016-08-19 Pedro Alves <palves@redhat.com>
3428
3429 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3430
3431 2016-08-19 Pedro Alves <palves@redhat.com>
3432
3433 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3434 comment. Use memcpy instead of casting through unsigned long.
3435
3436 2016-08-19 Pedro Alves <palves@redhat.com>
3437
3438 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3439 allocating around 0x80000000.
3440
3441 2016-08-19 Pedro Alves <palves@redhat.com>
3442
3443 PR gdb/20415
3444 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3445 (x32-avx512-linux-ipa.o): New rules.
3446 * configure.ac (x86_64-*-linux*): New x32 check.
3447 * configure.srv (ipa_x32_linux_regobj): New.
3448 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3449 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3450 descriptions.
3451 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3452 descriptions.
3453 * configure: Regenerate.
3454
3455 2016-08-09 Pedro Alves <palves@redhat.com>
3456
3457 PR gdb/18653
3458 * Makefile.in (OBS): Add signals-state-save-restore.o.
3459 (signals-state-save-restore.o): New rule.
3460 * config.in: Regenerate.
3461 * configure: Regenerate.
3462 * linux-low.c: Include "signals-state-save-restore.h".
3463 (linux_create_inferior): Call
3464 restore_original_signals_state.
3465 * server.c: Include "dispositions-save-restore.h".
3466 (captured_main): Call save_original_signals_state.
3467
3468 2016-08-05 Pedro Alves <palves@redhat.com>
3469
3470 * configure: Regenerate.
3471
3472 2016-08-04 Yao Qi <yao.qi@linaro.org>
3473
3474 * linux-low.c (regsets_fetch_inferior_registers): Check
3475 errno is ESRCH or not.
3476
3477 2016-08-02 Yao Qi <yao.qi@linaro.org>
3478
3479 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3480 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3481 (thread_db_load_search): Update.
3482 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3483 td_ta_set_event and td_ta_event_getmsg.
3484
3485 2016-07-26 Pedro Alves <palves@redhat.com>
3486
3487 PR server/20414
3488 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3489 of unsigned long for 64-bit registers and use uint32_t instead of
3490 unsigned int for 32-bit registers.
3491
3492 2016-07-26 Pedro Alves <palves@redhat.com>
3493
3494 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3495 to 'ptrace'.
3496
3497 2016-07-21 Tom Tromey <tom@tromey.com>
3498
3499 * configure: Rebuild.
3500
3501 2016-07-21 Yao Qi <yao.qi@linaro.org>
3502
3503 * mem-break.c (find_gdb_breakpoint): Cast bp to
3504 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3505
3506 2016-07-21 Yao Qi <yao.qi@linaro.org>
3507
3508 * server.c (handle_v_requests): Support s and S actions
3509 if target_supports_software_single_step return true.
3510
3511 2016-07-21 Yao Qi <yao.qi@linaro.org>
3512
3513 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3514 is resume_step, call maybe_hw_step.
3515 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3516 and unstop them.
3517 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3518 breakpoints or not.
3519 (proceed_one_lwp): If resume request is resume_step, install
3520 reinsert breakpoints and call maybe_hw_step.
3521
3522 2016-07-21 Yao Qi <yao.qi@linaro.org>
3523
3524 * linux-low.c (proceed_one_lwp): Declare.
3525 (linux_resume_one_thread): Remove local variable 'step'.
3526 Lift code enqueue signal. Call proceed_one_lwp instead of
3527 linux_resume_one_lwp.
3528
3529 2016-07-21 Yao Qi <yao.qi@linaro.org>
3530
3531 * linux-low.c (linux_resume_one_thread): Call
3532 enqueue_pending_signal.
3533
3534 2016-07-21 Yao Qi <yao.qi@linaro.org>
3535
3536 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3537 * inferiors.c (do_restore_current_thread_cleanup): New function.
3538 (make_cleanup_restore_current_thread): Likewise.
3539 * linux-low.c (install_software_single_step_breakpoints): Call
3540 make_cleanup_restore_current_thread. Switch current_thread to
3541 thread.
3542
3543 2016-07-21 Yao Qi <yao.qi@linaro.org>
3544
3545 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3546 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3547 (clone_one_breakpoint): Likewise.
3548 (delete_reinsert_breakpoints): Change parameter to thread.
3549 Callers updated.
3550 (has_reinsert_breakpoints): Likewise.
3551 (uninsert_reinsert_breakpoints): Likewise.
3552 (reinsert_reinsert_breakpoints): Likewise.
3553 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3554 (delete_reinsert_breakpoints): Likewise.
3555 (reinsert_reinsert_breakpoints): Likewise.
3556 (uninsert_reinsert_breakpoints): Likewise.
3557 (has_reinsert_breakpoints): Likewise.
3558
3559 2016-07-21 Yao Qi <yao.qi@linaro.org>
3560
3561 * inferiors.c (get_thread_process): Make parameter const.
3562 * inferiors.h (get_thread_process): Update declaration.
3563 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3564 Add new parameters child_thread and parent_thread. Callers
3565 updated.
3566 * mem-break.h (clone_all_breakpoints): Update declaration.
3567
3568 2016-07-21 Yao Qi <yao.qi@linaro.org>
3569
3570 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3571 <command_list, handler>: Remove.
3572 (struct gdb_breakpoint): New.
3573 (struct other_breakpoint): New.
3574 (struct reinsert_breakpoint): New.
3575 (is_gdb_breakpoint): New function.
3576 (any_persistent_commands): Update command_list if
3577 is_gdb_breakpoint returns true.
3578 (set_breakpoint): Create breakpoints according to their types.
3579 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3580 (set_gdb_breakpoint_1): Likewise.
3581 (set_gdb_breakpoint): Likewise.
3582 (clear_breakpoint_conditions): Change parameter type to
3583 'struct gdb_breakpoint *'.
3584 (clear_breakpoint_commands): Likewise.
3585 (clear_breakpoint_conditions_and_commands): Likewise.
3586 (add_condition_to_breakpoint): Likewise.
3587 (add_breakpoint_condition): Likewise.
3588 (add_commands_to_breakpoint): Likewise.
3589 (check_breakpoints): Check other_breakpoint.
3590 (clone_one_breakpoint): Clone breakpopint according to its type.
3591 * mem-break.h (struct gdb_breakpoint): Declare.
3592 (set_gdb_breakpoint): Update declaration.
3593 (clear_breakpoint_conditions_and_commands): Likewise.
3594 (add_breakpoint_condition): Likewise.
3595 (add_breakpoint_commands): Likewise.
3596 * server.c (process_point_options): Change parameter type to
3597 'struct gdb_breakpoint *'.
3598
3599 2016-07-21 Yao Qi <yao.qi@linaro.org>
3600
3601 * mem-break.c (set_breakpoint_at): Rename it to ...
3602 (set_breakpoint_type_at): ... it.
3603 (set_breakpoint_at): Call set_breakpoint_type_at.
3604 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3605 * mem-break.h (set_breakpoint_at): Update comments.
3606
3607 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3608
3609 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3610 to buf parameter.
3611 (nios2_store_gregset): Likewise.
3612
3613 2016-07-01 Pedro Alves <palves@redhat.com>
3614 Antoine Tremblay <antoine.tremblay@ericsson.com>
3615
3616 * linux-low.c: Change interface to take the target lwp_info
3617 pointer directly and return void. Handle detaching from a zombie
3618 thread.
3619 (linux_detach_lwp_callback): New function.
3620 (linux_detach): Detach from the leader thread after detaching from
3621 the clone threads.
3622
3623 2016-06-28 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3626 for variable new_offset.
3627 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3628 (aarch64_ftrace_insn_reloc_cb): Likewise.
3629 (aarch64_ftrace_insn_reloc_tb): Likewise.
3630 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3631 PRIx64 instead of PRIx32.
3632
3633 2016-06-28 Yao Qi <yao.qi@linaro.org>
3634
3635 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3636 (the_low_target): Install arm_get_syscall_trapinfo.
3637
3638 2016-06-28 Yao Qi <yao.qi@linaro.org>
3639
3640 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3641 function.
3642 (the_low_target): Install aarch64_get_syscall_trapinfo.
3643
3644 2016-06-28 Yao Qi <yao.qi@linaro.org>
3645
3646 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3647 Callers updated.
3648 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3649 Remove parameter sysno.
3650 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3651 sysret.
3652
3653 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3654
3655 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3656 (s390_emit_ne_goto): Likewise.
3657 (s390_emit_lt_goto): Likewise.
3658 (s390_emit_le_goto): Likewise.
3659 (s390_emit_gt_goto): Likewise.
3660 (s390_emit_ge_goto): Likewise.
3661 (s390x_emit_eq_goto): Likewise.
3662 (s390x_emit_ne_goto): Likewise.
3663 (s390x_emit_lt_goto): Likewise.
3664 (s390x_emit_le_goto): Likewise.
3665 (s390x_emit_gt_goto): Likewise.
3666 (s390x_emit_ge_goto): Likewise.
3667 (s390_emit_ops_impl): Mark variable static.
3668 (s390x_emit_ops): Likewise.
3669
3670 2016-06-17 Yao Qi <yao.qi@linaro.org>
3671
3672 * linux-low.c (handle_extended_wait): Call
3673 uninsert_reinsert_breakpoints for the parent process. Remove
3674 reinsert breakpoints from the child process. Reinsert them to
3675 the parent process when vfork is done.
3676 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3677 (reinsert_reinsert_breakpoints): New function.
3678 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3679 (reinsert_reinsert_breakpoints): Declare.
3680
3681 2016-06-17 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-low.c (handle_extended_wait): If the parent is doing
3684 step-over, remove the reinsert breakpoints from the forked child.
3685
3686 2016-06-17 Yao Qi <yao.qi@linaro.org>
3687
3688 * linux-low.c (unsuspend_all_lwps): Declare.
3689 (linux_low_filter_event): If thread exited, call finish_step_over.
3690 If step-over is finished, unsuspend other threads.
3691
3692 2016-06-17 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-low.c (linux_resume_one_lwp_throw): Assert
3695 has_reinsert_breakpoints returns false.
3696 * mem-break.c (delete_disabled_breakpoints): Assert
3697 bp type isn't reinsert_breakpoint.
3698
3699 2016-06-17 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-low.c (maybe_hw_step): New function.
3702 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3703 (finish_step_over): Switch current_thread to lwp temporarily,
3704 and assert has_reinsert_breakpoints returns true.
3705 (proceed_one_lwp): Call maybe_hw_step.
3706 * mem-break.c (has_reinsert_breakpoints): New function.
3707 * mem-break.h (has_reinsert_breakpoints): Declare.
3708
3709 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3710
3711 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3712
3713 2016-05-17 Yao Qi <yao.qi@linaro.org>
3714
3715 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3716 instead of find_inferior.
3717
3718 2016-05-05 Yao Qi <yao.qi@linaro.org>
3719
3720 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3721 Initialize res to zero.
3722
3723 2016-05-05 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3726 to uint32_t.
3727
3728 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3729
3730 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3731 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3732 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3733
3734 2016-04-28 Par Olsson <par.olsson@windriver.com>
3735 Simon Marchi <simon.marchi@ericsson.com>
3736
3737 * tracepoint.c (write_inferior_int8): New function.
3738 (cmd_qtenable_disable): Write enable flag using
3739 write_inferior_int8.
3740
3741 2016-04-25 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3744 (need_step_over_p): Return zero if the LWP has pending signals
3745 can be delivered on software single step target.
3746
3747 2016-04-25 Yao Qi <yao.qi@linaro.org>
3748
3749 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3750 return instead of error.
3751
3752 2016-04-22 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3755 to 23.
3756
3757 2016-04-22 Yao Qi <yao.qi@linaro.org>
3758
3759 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3760 signal when stepping over breakpoint with software single
3761 step.
3762
3763 2016-04-21 Pedro Alves <palves@redhat.com>
3764
3765 * linux-s390-low.c (s390_collect_ptrace_register)
3766 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3767 add casts.
3768 (s390_check_regset): Use void * instead of gdb_byte *.
3769
3770 2016-04-20 Pedro Alves <palves@redhat.com>
3771
3772 * configure: Renegerate.
3773
3774 2016-04-20 Yao Qi <yao.qi@linaro.org>
3775
3776 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3777 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3778 number 16.
3779 (arm_store_gregset): Likewise.
3780
3781 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3782
3783 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3784 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3785 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3786 (amd64-avx-mpx-linux.c): New rules.
3787 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3788 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3789 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3790 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3791 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3792 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3793 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3794 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3795 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3796 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3797 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3798 * linux-x86-low.c (x86_linux_read_description): Add case for
3799 X86_XSTATE_AVX_MPX_MASK.
3800 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3801 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3802 init_registers_i386_avx_mpx_linux.
3803 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3804 (initialize_low_tracepoint): Call
3805 init_registers_i386_avx_mpx_linux.
3806 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3807 (initialize_low_tracepoint): Call
3808 init_registers_amd64_avx_mpx_linux.
3809 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3810 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3811 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3812 declarations.
3813
3814 2016-04-18 Pedro Alves <palves@redhat.com>
3815
3816 * configure: Regenerate.
3817
3818 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3819
3820 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3821 (aarch64_emit_sub): Likewise.
3822
3823 2016-04-12 Pedro Alves <palves@redhat.com>
3824
3825 * utils.c (prepare_to_throw_exception): Delete.
3826
3827 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3828
3829 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3830
3831 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3832
3833 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3834
3835 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3836
3837 * linux-aarch64-ipa.c: Add <elf.h> include.
3838 * linux-ppc-ipa.c: Add <elf.h> include.
3839 * linux-s390-ipa.c: Add <elf.h> include.
3840
3841 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3842
3843 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3844 (get_raw_reg_ptr): Likewise.
3845 (get_trace_state_variable_value_ptr): Likewise.
3846 (set_trace_state_variable_value_ptr): Likewise.
3847 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3848 char *.
3849
3850 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3851 Marcin Kościelnicki <koriakin@0x04.net>
3852
3853 PR/17221
3854 * linux-ppc-low.c (emit_insns): New function.
3855 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3856 (ppc_emit_prologue): New function.
3857 (ppc_emit_epilogue): New function.
3858 (ppc_emit_add): New function.
3859 (ppc_emit_sub): New function.
3860 (ppc_emit_mul): New function.
3861 (ppc_emit_lsh): New function.
3862 (ppc_emit_rsh_signed): New function.
3863 (ppc_emit_rsh_unsigned): New function.
3864 (ppc_emit_ext): New function.
3865 (ppc_emit_zero_ext): New function.
3866 (ppc_emit_log_not): New function.
3867 (ppc_emit_bit_and): New function.
3868 (ppc_emit_bit_or): New function.
3869 (ppc_emit_bit_xor): New function.
3870 (ppc_emit_bit_not): New function.
3871 (ppc_emit_equal): New function.
3872 (ppc_emit_less_signed): New function.
3873 (ppc_emit_less_unsigned): New function.
3874 (ppc_emit_ref): New function.
3875 (ppc_emit_const): New function.
3876 (ppc_emit_reg): New function.
3877 (ppc_emit_pop): New function.
3878 (ppc_emit_stack_flush): New function.
3879 (ppc_emit_swap): New function.
3880 (ppc_emit_stack_adjust): New function.
3881 (ppc_emit_call): New function.
3882 (ppc_emit_int_call_1): New function.
3883 (ppc_emit_void_call_2): New function.
3884 (ppc_emit_if_goto): New function.
3885 (ppc_emit_goto): New function.
3886 (ppc_emit_eq_goto): New function.
3887 (ppc_emit_ne_goto): New function.
3888 (ppc_emit_lt_goto): New function.
3889 (ppc_emit_le_goto): New function.
3890 (ppc_emit_gt_goto): New function.
3891 (ppc_emit_ge_goto): New function.
3892 (ppc_write_goto_address): New function.
3893 (ppc_emit_ops_impl): New static variable.
3894 (ppc64v1_emit_prologue): New function.
3895 (ppc64v2_emit_prologue): New function.
3896 (ppc64_emit_epilogue): New function.
3897 (ppc64_emit_add): New function.
3898 (ppc64_emit_sub): New function.
3899 (ppc64_emit_mul): New function.
3900 (ppc64_emit_lsh): New function.
3901 (ppc64_emit_rsh_signed): New function.
3902 (ppc64_emit_rsh_unsigned): New function.
3903 (ppc64_emit_ext): New function.
3904 (ppc64_emit_zero_ext): New function.
3905 (ppc64_emit_log_not): New function.
3906 (ppc64_emit_bit_and): New function.
3907 (ppc64_emit_bit_or): New function.
3908 (ppc64_emit_bit_xor): New function.
3909 (ppc64_emit_bit_not): New function.
3910 (ppc64_emit_equal): New function.
3911 (ppc64_emit_less_signed): New function.
3912 (ppc64_emit_less_unsigned): New function.
3913 (ppc64_emit_ref): New function.
3914 (ppc64_emit_const): New function.
3915 (ppc64v1_emit_reg): New function.
3916 (ppc64v2_emit_reg): New function.
3917 (ppc64_emit_pop): New function.
3918 (ppc64_emit_stack_flush): New function.
3919 (ppc64_emit_swap): New function.
3920 (ppc64v1_emit_call): New function.
3921 (ppc64v2_emit_call): New function.
3922 (ppc64v1_emit_int_call_1): New function.
3923 (ppc64v2_emit_int_call_1): New function.
3924 (ppc64v1_emit_void_call_2): New function.
3925 (ppc64v2_emit_void_call_2): New function.
3926 (ppc64_emit_if_goto): New function.
3927 (ppc64_emit_eq_goto): New function.
3928 (ppc64_emit_ne_goto): New function.
3929 (ppc64_emit_lt_goto): New function.
3930 (ppc64_emit_le_goto): New function.
3931 (ppc64_emit_gt_goto): New function.
3932 (ppc64_emit_ge_goto): New function.
3933 (ppc64v1_emit_ops_impl): New static variable.
3934 (ppc64v2_emit_ops_impl): New static variable.
3935 (ppc_emit_ops): New function.
3936 (linux_low_target): Wire in ppc_emit_ops.
3937
3938 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3939 Marcin Kościelnicki <koriakin@0x04.net>
3940
3941 PR/17221
3942 * Makefile.in: Add powerpc-*-ipa.o
3943 * configure.srv: Add ipa_obj for powerpc*-linux.
3944 * linux-ppc-ipa.c: New file.
3945 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3946 includes.
3947 (PPC_FIELD): New macro.
3948 (PPC_SEXT): New macro.
3949 (PPC_OP6): New macro.
3950 (PPC_BO): New macro.
3951 (PPC_LI): New macro.
3952 (PPC_BD): New macro.
3953 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3954 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3955 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3956 (ppc_get_thread_area): New function.
3957 (is_elfv2_inferior): New function.
3958 (gen_ds_form): New function.
3959 (GEN_STD): New macro.
3960 (GEN_STDU): New macro.
3961 (GEN_LD): New macro.
3962 (GEN_LDU): New macro.
3963 (gen_d_form): New function.
3964 (GEN_ADDI): New macro.
3965 (GEN_ADDIS): New macro.
3966 (GEN_LI): New macro.
3967 (GEN_LIS): New macro.
3968 (GEN_ORI): New macro.
3969 (GEN_ORIS): New macro.
3970 (GEN_LWZ): New macro.
3971 (GEN_STW): New macro.
3972 (GEN_STWU): New macro.
3973 (gen_xfx_form): New function.
3974 (GEN_MFSPR): New macro.
3975 (GEN_MTSPR): New macro.
3976 (GEN_MFCR): New macro.
3977 (GEN_MTCR): New macro.
3978 (GEN_SYNC): New macro.
3979 (GEN_LWSYNC): New macro.
3980 (gen_x_form): New function.
3981 (GEN_OR): New macro.
3982 (GEN_MR): New macro.
3983 (GEN_LWARX): New macro.
3984 (GEN_STWCX): New macro.
3985 (GEN_CMPW): New macro.
3986 (gen_md_form): New function.
3987 (GEN_RLDICL): New macro.
3988 (GEN_RLDICR): New macro.
3989 (gen_i_form): New function.
3990 (GEN_B): New macro.
3991 (GEN_BL): New macro.
3992 (gen_b_form): New function.
3993 (GEN_BNE): New macro.
3994 (GEN_LOAD): New macro.
3995 (GEN_STORE): New macro.
3996 (gen_limm): New function.
3997 (gen_atomic_xchg): New function.
3998 (gen_call): New function.
3999 (ppc_relocate_instruction): New function.
4000 (ppc_install_fast_tracepoint_jump_pad): New function.
4001 (ppc_get_min_fast_tracepoint_insn_len): New function.
4002 (ppc_get_ipa_tdesc_idx): New function.
4003 (the_low_target): Wire in the new functions.
4004 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4005 tdescs.
4006 * linux-ppc-tdesc.h: New file.
4007
4008 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4009
4010 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4011 (alloc_jump_pad_buffer): New function.
4012 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4013 (alloc_jump_pad_buffer): New function.
4014 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4015 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4016 (alloc_jump_pad_buffer): New function.
4017 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4018 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4019 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4020 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4021
4022 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4023
4024 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4025 * linux-amd64-ipa.c: Likewise.
4026 * linux-i386-ipa.c: Likewise.
4027 * linux-s390-ipa.c: Likewise.
4028 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4029 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4030 set_trace_state_variable_value_ptr.
4031 (struct ipa_sym_addresses): Likewise.
4032 (symbol_list): Likewise.
4033 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4034 accessing gdb_collect directly.
4035 (gdb_collect_ptr_type): New typedef.
4036 (get_raw_reg_ptr_type): New typedef.
4037 (get_trace_state_variable_value_ptr_type): New typedef.
4038 (set_trace_state_variable_value_ptr_type): New typedef.
4039 (gdb_collect_ptr): New global.
4040 (get_raw_reg_ptr): New global.
4041 (get_trace_state_variable_value_ptr): New global.
4042 (set_trace_state_variable_value_ptr): New global.
4043 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4044 accessing get_raw_reg directly.
4045 (get_get_tsv_func_addr): Likewise for
4046 get_trace_state_variable_value_ptr.
4047 (get_set_tsv_func_addr): Likewise for
4048 set_trace_state_variable_value_ptr.
4049 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4050
4051 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4052
4053 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4054
4055 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4056
4057 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4058 packets.
4059 (relocate_instruction): Remove own_buf.
4060 * server.c (own_buf): Make global.
4061 (handle_v_requests): Make global.
4062 * server.h (own_buf): New declaration.
4063 (handle_v_requests): New prototype.
4064
4065 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4066
4067 PR 18377
4068 * linux-s390-low.c (add_insns): New function.
4069 (s390_emit_prologue): New function.
4070 (s390_emit_epilogue): New function.
4071 (s390_emit_add): New function.
4072 (s390_emit_sub): New function.
4073 (s390_emit_mul): New function.
4074 (s390_emit_lsh): New function.
4075 (s390_emit_rsh_signed): New function.
4076 (s390_emit_rsh_unsigned): New function.
4077 (s390_emit_ext): New function.
4078 (s390_emit_log_not): New function.
4079 (s390_emit_bit_and): New function.
4080 (s390_emit_bit_or): New function.
4081 (s390_emit_bit_xor): New function.
4082 (s390_emit_bit_not): New function.
4083 (s390_emit_equal): New function.
4084 (s390_emit_less_signed): New function.
4085 (s390_emit_less_unsigned): New function.
4086 (s390_emit_ref): New function.
4087 (s390_emit_if_goto): New function.
4088 (s390_emit_goto): New function.
4089 (s390_write_goto_address): New function.
4090 (s390_emit_litpool): New function.
4091 (s390_emit_const): New function.
4092 (s390_emit_call): New function.
4093 (s390_emit_reg): New function.
4094 (s390_emit_pop): New function.
4095 (s390_emit_stack_flush): New function.
4096 (s390_emit_zero_ext): New function.
4097 (s390_emit_swap): New function.
4098 (s390_emit_stack_adjust): New function.
4099 (s390_emit_set_r2): New function.
4100 (s390_emit_int_call_1): New function.
4101 (s390_emit_void_call_2): New function.
4102 (s390_emit_eq_goto): New function.
4103 (s390_emit_ne_goto): New function.
4104 (s390_emit_lt_goto): New function.
4105 (s390_emit_le_goto): New function.
4106 (s390_emit_gt_goto): New function.
4107 (s390_emit_ge_goto): New function.
4108 (s390x_emit_prologue): New function.
4109 (s390x_emit_epilogue): New function.
4110 (s390x_emit_add): New function.
4111 (s390x_emit_sub): New function.
4112 (s390x_emit_mul): New function.
4113 (s390x_emit_lsh): New function.
4114 (s390x_emit_rsh_signed): New function.
4115 (s390x_emit_rsh_unsigned): New function.
4116 (s390x_emit_ext): New function.
4117 (s390x_emit_log_not): New function.
4118 (s390x_emit_bit_and): New function.
4119 (s390x_emit_bit_or): New function.
4120 (s390x_emit_bit_xor): New function.
4121 (s390x_emit_bit_not): New function.
4122 (s390x_emit_equal): New function.
4123 (s390x_emit_less_signed): New function.
4124 (s390x_emit_less_unsigned): New function.
4125 (s390x_emit_ref): New function.
4126 (s390x_emit_if_goto): New function.
4127 (s390x_emit_const): New function.
4128 (s390x_emit_call): New function.
4129 (s390x_emit_reg): New function.
4130 (s390x_emit_pop): New function.
4131 (s390x_emit_stack_flush): New function.
4132 (s390x_emit_zero_ext): New function.
4133 (s390x_emit_swap): New function.
4134 (s390x_emit_stack_adjust): New function.
4135 (s390x_emit_int_call_1): New function.
4136 (s390x_emit_void_call_2): New function.
4137 (s390x_emit_eq_goto): New function.
4138 (s390x_emit_ne_goto): New function.
4139 (s390x_emit_lt_goto): New function.
4140 (s390x_emit_le_goto): New function.
4141 (s390x_emit_gt_goto): New function.
4142 (s390x_emit_ge_goto): New function.
4143 (s390_emit_ops): New function.
4144 (struct linux_target_ops): Fill in emit_ops hook.
4145
4146 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4147
4148 PR 18377
4149 * Makefile.in: Add s390 IPA files.
4150 * configure.srv: Build IPA for s390.
4151 * linux-s390-ipa.c: New file.
4152 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4153 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4154 (tdesc_s390_linux32): Likewise.
4155 (init_registers_s390_linux32v1): Likewise.
4156 (tdesc_s390_linux32v1): Likewise.
4157 (init_registers_s390_linux32v2): Likewise.
4158 (tdesc_s390_linux32v2): Likewise.
4159 (init_registers_s390_linux64): Likewise.
4160 (tdesc_s390_linux64): Likewise.
4161 (init_registers_s390_linux64v1): Likewise.
4162 (tdesc_s390_linux64v1): Likewise.
4163 (init_registers_s390_linux64v2): Likewise.
4164 (tdesc_s390_linux64v2): Likewise.
4165 (init_registers_s390_te_linux64): Likewise.
4166 (tdesc_s390_te_linux64): Likewise.
4167 (init_registers_s390_vx_linux64): Likewise.
4168 (tdesc_s390_vx_linux64): Likewise.
4169 (init_registers_s390_tevx_linux64): Likewise.
4170 (tdesc_s390_tevx_linux64): Likewise.
4171 (init_registers_s390x_linux64): Likewise.
4172 (tdesc_s390x_linux64): Likewise.
4173 (init_registers_s390x_linux64v1): Likewise.
4174 (tdesc_s390x_linux64v1): Likewise.
4175 (init_registers_s390x_linux64v2): Likewise.
4176 (tdesc_s390x_linux64v2): Likewise.
4177 (init_registers_s390x_te_linux64): Likewise.
4178 (tdesc_s390x_te_linux64): Likewise.
4179 (init_registers_s390x_vx_linux64): Likewise.
4180 (tdesc_s390x_vx_linux64): Likewise.
4181 (init_registers_s390x_tevx_linux64): Likewise.
4182 (tdesc_s390x_tevx_linux64): Likewise.
4183 (have_hwcap_s390_vx): New static variable.
4184 (s390_arch_setup): Fill have_hwcap_s390_vx.
4185 (s390_get_thread_area): New function.
4186 (s390_ft_entry_gpr_esa): New const.
4187 (s390_ft_entry_gpr_zarch): New const.
4188 (s390_ft_entry_misc): New const.
4189 (s390_ft_entry_fr): New const.
4190 (s390_ft_entry_vr): New const.
4191 (s390_ft_main_31): New const.
4192 (s390_ft_main_64): New const.
4193 (s390_ft_exit_fr): New const.
4194 (s390_ft_exit_vr): New const.
4195 (s390_ft_exit_misc): New const.
4196 (s390_ft_exit_gpr_esa): New const.
4197 (s390_ft_exit_gpr_zarch): New const.
4198 (append_insns): New function.
4199 (s390_relocate_instruction): New function.
4200 (s390_install_fast_tracepoint_jump_pad): New function.
4201 (s390_get_min_fast_tracepoint_insn_len): New function.
4202 (s390_get_ipa_tdesc_idx): New function.
4203 (struct linux_target_ops): Wire in the above functions.
4204 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4205 * linux-s390-tdesc.h: New file.
4206
4207 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4208
4209 * linux-s390-low.c (s390_supports_tracepoints): New function.
4210 (struct linux_target_ops): Fill supports_tracepoints hook.
4211
4212 2016-03-18 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-low.c (lwp_signal_can_be_delivered): New function.
4215 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4216
4217 2016-03-18 Yao Qi <yao.qi@linaro.org>
4218
4219 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4220 0 if signal is enqueued. Remove 'signal' from one debugging
4221 message. Move one debugging message to some lines below.
4222 Remove code setting 'signal' to 0.
4223
4224 2016-03-18 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-low.c (linux_low_filter_event): Remove redundant
4227 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4228
4229 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4230
4231 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4232 (struct linux_target_ops): Wire in the above.
4233
4234 2016-03-03 Yao Qi <yao.qi@linaro.org>
4235
4236 * linux-low.c: Update comments to start_step_over.
4237
4238 2016-03-03 Yao Qi <yao.qi@linaro.org>
4239
4240 PR server/19736
4241 * linux-low.c (handle_extended_wait): Set child suspended
4242 if event_lwp->bp_reinsert isn't zero.
4243
4244 2016-03-02 Yao Qi <yao.qi@linaro.org>
4245
4246 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4247 enqueue_pending_signal.
4248
4249 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4250
4251 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4252 is actually loaded.
4253
4254 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4255
4256 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4257 (s390_regmap_3264) [!__s390x__]: New global.
4258 (s390_collect_ptrace_register): Skip map entries containing -1.
4259 (s390_supply_ptrace_register): Ditto.
4260 (s390_fill_gprs_high): New function.
4261 (s390_store_gprs_high): New function.
4262 (s390_regsets): Add NT_S390_HIGH_GPRS.
4263 (s390_get_hwcap): Enable on 31-bit.
4264 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4265 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4266 Detect NT_S390_HIGH_GPRS.
4267 (s390_usrregs_info_3264): Enable on 31-bit.
4268 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4269 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4270
4271 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4272
4273 PR gdb/13808
4274 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4275 * configure.srv: Ditto.
4276 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4277 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4278 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4279 (init_registers_amd64_linux): Remove prototype.
4280 (tdesc_amd64_linux): Remove declaration.
4281 (get_ipa_tdesc): New function.
4282 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4283 initialize remaining tdescs.
4284 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4285 (init_registers_i386_linux): Remove prototype.
4286 (tdesc_i386_linux): Remove declaration.
4287 (get_ipa_tdesc): New function.
4288 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4289 initialize remaining tdescs.
4290 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4291 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4292 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4293 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4294 (x86_get_ipa_tdesc_idx): New function.
4295 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4296 * linux-x86-tdesc.h: New file.
4297 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4298 (target_get_ipa_tdesc_idx): New macro.
4299 * tracepoint.c (ipa_tdesc_idx): New macro.
4300 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4301 (symbol_list): Add ipa_tdesc_idx.
4302 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4303 (ipa_tdesc): Remove.
4304 (ipa_tdesc_idx): New variable.
4305 (get_context_regcache): Use get_ipa_tdesc.
4306 (gdb_collect): Ditto.
4307 (gdb_probe): Ditto.
4308 * tracepoint.h (get_ipa_tdesc): New prototype.
4309 (ipa_tdesc): Remove.
4310
4311 2016-02-24 Pedro Alves <palves@redhat.com>
4312
4313 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4314 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4315 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4316 Factor out common code between the USE_SIGTRAP_SIGINFO and
4317 !USE_SIGTRAP_SIGINFO blocks.
4318 (linux_low_filter_event): Call save_stop_reason instead of
4319 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4320 Update comments.
4321 (linux_wait_1): Update comments.
4322
4323 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4324
4325 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4326 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4327 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4328 ppc_insert_point, ppc_remove_point.
4329
4330 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4331
4332 * linux-s390-low.c (s390_supports_z_point_type): New function.
4333 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4334
4335 2016-02-16 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4338 PC. Get pc from regcache_read_pc.
4339
4340 2016-02-12 Yao Qi <yao.qi@linaro.org>
4341
4342 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4343 or linux_get_pc_32bit.
4344 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4345
4346 2016-02-12 Yao Qi <yao.qi@linaro.org>
4347
4348 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4349 arm_linux_get_next_pcs_fixup.
4350
4351 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4352
4353 * tracepoint.c (x_tracepoint_action_download): Change
4354 write_inferior_data_ptr to write_inferior_data_pointer.
4355 (cmd_qtstart): Likewise.
4356 (write_inferior_data_ptr): Remove.
4357 (download_agent_expr): Change write_inferior_data_ptr to
4358 write_inferior_data_pointer.
4359 (download_tracepoint_1): Likewise.
4360 (download_tracepoint): Likewise.
4361 (download_trace_state_variables): Likewise.
4362
4363 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4364 Marcin Kościelnicki <koriakin@0x04.net>
4365
4366 * tracepoint.c (struct tracepoint_action_ops): Remove.
4367 (struct tracepoint_action): Remove ops.
4368 (m_tracepoint_action_download, r_tracepoint_action_download)
4369 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4370 size and offset accordingly.
4371 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4372 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4373 (tracepoint_action_send, tracepoint_action_download): New functions.
4374 Helpers for trace action handlers.
4375 (add_tracepoint_action): Remove setup actions ops.
4376 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4377
4378 2016-02-10 Yao Qi <yao.qi@linaro.org>
4379
4380 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4381
4382 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4383
4384 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4385 to AC_OUTPUT.
4386 * configure: Regenerate.
4387
4388 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4389
4390 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4391 void * to gdb_byte *.
4392 * linux-low.c (siginfo_fixup): Likewise.
4393 (linux_xfer_siginfo): Likewise.
4394 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4395 Likewise.
4396 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4397
4398 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4399
4400 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4401 to srv_tgtobj.
4402 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4403 to srv_tgtobj.
4404 * linux-x86-low.c [__x86_64__]: Include
4405 "nat/amd64-linux-siginfo.h".
4406 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4407 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4408 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4409 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4410 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4411 (cpt_si_fd, si_timerid, si_overrun): Move from
4412 nat/amd64-linux-siginfo.c.
4413 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4414
4415 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4416
4417 * server.c (skip_to_semicolon): Remove.
4418 (process_point_options): Use strchrnul instead of
4419 skip_to_semicolon.
4420
4421 2016-01-26 Yao Qi <yao.qi@linaro.org>
4422
4423 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4424 * linux-low.c (install_software_single_step_breakpoints): Don't
4425 call regcache_read_pc.
4426 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4427 argument pc.
4428
4429 2016-01-26 Yao Qi <yao.qi@linaro.org>
4430
4431 * linux-low.c (install_software_single_step_breakpoints): Call
4432 regcache_read_pc instead of get_pc.
4433
4434 2016-01-26 Yao Qi <yao.qi@linaro.org>
4435
4436 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4437 (unblock_async_io): Rename to ...
4438 (block_unblock_async_io): ... it. New function.
4439 (enable_async_io): Don't install SIGIO handler. Unblock it
4440 instead.
4441 (disable_async_io): Don't ignore SIGIO. Block it instead.
4442 (initialize_async_io): Install SIGIO handler. Don't call
4443 unblock_async_io.
4444
4445 2016-01-26 Yao Qi <yao.qi@linaro.org>
4446
4447 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4448 first character is '\003', call *the_target->request_interrupt.
4449
4450 2016-01-25 Yao Qi <yao.qi@linaro.org>
4451
4452 * remote-utils.c (new_thread_notify): Remove.
4453 (dead_thread_notify): Likewise.
4454 * remote-utils.h (new_thread_notify): Remove declaration.
4455 (dead_thread_notify): Likewise.
4456
4457 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4458
4459 * gdb.trace/pending.exp: Fix expected message on continue.
4460
4461 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4462
4463 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4464 it works properly on big-endian machines where sizeof (CORE_ADDR)
4465 != sizeof (void *).
4466
4467 2016-01-21 Pedro Alves <palves@redhat.com>
4468
4469 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4470 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4471 * configure: Regenerate.
4472
4473 2016-01-21 Yao Qi <yao.qi@linaro.org>
4474
4475 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4476 is_thumb and set it according to CPSR saved on the stack.
4477 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4478 arm_sigreturn_next_pc.
4479
4480 2016-01-18 Yao Qi <yao.qi@linaro.org>
4481
4482 * linux-low.c (linux_set_pc_64bit): New function.
4483 (linux_get_pc_64bit): New function.
4484 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4485 Declare.
4486 * linux-sparc-low.c (debug_threads): Remove declaration.
4487 (sparc_get_pc): Remove.
4488 (the_low_target): Use linux_get_pc_64bit instead of
4489 sparc_get_pc.
4490 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4491 (the_low_target): Use linux_get_pc_64bit and
4492 linux_set_pc_64bit.
4493
4494 2016-01-18 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-arm-low.c (debug_threads): Remove declaration.
4497 (arm_get_pc, arm_set_pc): Remove.
4498 (the_low_target): Use linux_get_pc_32bit and
4499 linux_set_pc_32bit.
4500 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4501 (the_low_target): Use linux_get_pc_32bit and
4502 linux_set_pc_32bit.
4503 * linux-cris-low.c (debug_threads): Remove declaration.
4504 (cris_get_pc, cris_set_pc,): Remove.
4505 (the_low_target): Use linux_get_pc_32bit and
4506 linux_set_pc_32bit.
4507 * linux-crisv32-low.c (debug_threads): Remove declaration.
4508 (cris_get_pc, cris_set_pc): Remove.
4509 (the_low_target): Use linux_get_pc_32bit and
4510 linux_set_pc_32bit.
4511 * linux-low.c: Include inttypes.h.
4512 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4513 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4514 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4515 (the_low_target): Use linux_get_pc_32bit and
4516 linux_set_pc_32bit.
4517 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4518 (the_low_target): Use linux_get_pc_32bit and
4519 linux_set_pc_32bit.
4520 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4521 (the_low_target): Use linux_get_pc_32bit and
4522 linux_set_pc_32bit.
4523 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4524 (the_low_target): Use linux_get_pc_32bit and
4525 linux_set_pc_32bit.
4526 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4527 (the_low_target): Use linux_get_pc_32bit and
4528 linux_set_pc_32bit.
4529
4530 2016-01-18 Gary Benson <gbenson@redhat.com>
4531
4532 * configure.ac (AC_FUNC_FORK): New check.
4533 * config.in: Regenerate.
4534 * configure: Likewise.
4535
4536 2016-01-14 Yao Qi <yao.qi@linaro.org>
4537
4538 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4539 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4540 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4541 arm_get_next_pcs_ctor.
4542
4543 2016-01-12 Josh Stone <jistone@redhat.com>
4544 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4545
4546 * inferiors.h: Include "gdb_vecs.h".
4547 (struct process_info): Add syscalls_to_catch.
4548 * inferiors.c (remove_process): Free syscalls_to_catch.
4549 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4550 syscall_return stops.
4551 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4552 * server.c (handle_general_set): Handle QCatchSyscalls.
4553 (handle_query): Report support for QCatchSyscalls.
4554 * target.h (struct target_ops): Add supports_catch_syscall.
4555 (target_supports_catch_syscall): New macro.
4556 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4557 (struct lwp_info): Add syscall_state.
4558 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4559 Maintain syscall_state and syscalls_to_catch across exec.
4560 (get_syscall_trapinfo): New function, proxy to the_low_target.
4561 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4562 (linux_low_filter_event): Toggle syscall_state entry/return for
4563 syscall traps, and set it ignored for all others.
4564 (gdb_catching_syscalls_p): New function.
4565 (gdb_catch_this_syscall_p): New function.
4566 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4567 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4568 (linux_supports_catch_syscall): New function.
4569 (linux_target_ops): Install it.
4570 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4571 (the_low_target): Install it.
4572
4573 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4574
4575 * acinclude.m4: Include new ../warning.m4 file.
4576 * configure: Regenerated.
4577 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4578
4579 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4580
4581 * ax.c (is_goto_target): Mark static.
4582 * linux-low.c (register_addr): Likewise.
4583 (linux_fetch_registers, linux_store_registers): Likewise.
4584 * mem-break.c (any_persistent_commands): Fix old prototype.
4585 (add_commands_to_breakpoint): Mark static.
4586 * regcache.c (find_register_by_name): Delete unused func.
4587 * remote-utils.c (hex_or_minus_one): Mark static.
4588 * server.c (monitor_show_help): Mark static.
4589 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4590 handle_v_requests): Likewise.
4591
4592 2016-01-12 Pedro Alves <palves@redhat.com>
4593
4594 Remove use of the registered trademark symbol throughout.
4595
4596 2016-01-08 Yao Qi <yao.qi@linaro.org>
4597
4598 * remote-utils.c (getpkt): If c is '\003', call target hook
4599 request_interrupt.
4600
4601 2016-01-06 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4604 linux-aarch32-low.c.
4605 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4606 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4607 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4608 (thumb2_breakpoint): Declare.
4609 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4610 linux-aarch32-low.h.
4611 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4612 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4613 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4614
4615 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4616
4617 * gdbreplay.c (gdbreplay_version): Change copyright year in
4618 version message.
4619 * server.c (gdbserver_version): Likewise.
4620
4621 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4622
4623 * server.c (crc32_table): Delete.
4624 (crc32): Use libiberty's xcrc32 function.
4625
4626 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4627
4628 * lynx-low.c (lynx_delete_thread_callback): New function.
4629 (lynx_mourn): Properly delete our process and all of its
4630 threads. Remove call to clear_inferiors.
4631
4632 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4633
4634 * target.c (thread_search_callback): Add check that
4635 the thread_stopped target callback is not NULL before
4636 calling it.
4637
4638 2015-12-21 Yao Qi <yao.qi@linaro.org>
4639
4640 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4641 arm breakpoint.
4642
4643 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4644
4645 * server.c (handle_query): Call target_supports_software_single_step.
4646
4647 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4648
4649 * linux-low.c (single_step): New function.
4650 (linux_resume_one_lwp_throw): Call single_step.
4651 (start_step_over): Likewise.
4652
4653 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4654
4655 * Makefile.in (SFILES): Append arch/arm-linux.c,
4656 arch/arm-get-next-pcs.c.
4657 (arm-linux.o): New rule.
4658 (arm-get-next-pcs.o): New rule.
4659 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4660 arm-linux.o.
4661 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4662 to linux-aarch32-low.c.
4663 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4664 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4665 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4666 (thumb2_breakpoint_len): Likewise.
4667 (arm_is_thumb_mode): Make non-static.
4668 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4669 from linux-aarch32-low.c.
4670 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4671 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4672 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4673 (thumb2_breakpoint_len): Likewise.
4674 (arm_is_thumb_mode): New declaration.
4675 * linux-arm-low.c: Include arch/arm-linux.h
4676 aarch/arm-get-next-pcs.h, sys/syscall.h.
4677 (get_next_pcs_ops): New struct.
4678 (get_next_pcs_addr_bits_remove): New function.
4679 (get_next_pcs_is_thumb): New function.
4680 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4681 (arm_sigreturn_next_pc): Likewise.
4682 (get_next_pcs_syscall_next_pc): Likewise.
4683 (arm_gdbserver_get_next_pcs): Likewise.
4684 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4685 Initialize.
4686 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4687 * server.h: Include gdb_vecs.h.
4688
4689 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4690
4691 * Makefile.in (SFILES): Append common/common-regcache.c.
4692 (OBS): Append common-regcache.o.
4693 (common-regcache.o): New rule.
4694 * regcache.c (init_register_cache): Initialize cache to
4695 REG_UNAVAILABLE.
4696 (regcache_raw_read_unsigned): New function.
4697 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4698 register_status enum.
4699
4700 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4701
4702 * linux-aarch64-low.c (the_low_targets): Rename
4703 breakpoint_reinsert_addr to get_next_pcs.
4704 * linux-arm-low.c (the_low_targets): Likewise.
4705 * linux-bfin-low.c (the_low_targets): Likewise.
4706 * linux-cris-low.c (the_low_targets): Likewise.
4707 * linux-crisv32-low.c (the_low_targets): Likewise.
4708 * linux-low.c (can_software_single_step): Likewise.
4709 (install_software_single_step_breakpoints): New function.
4710 (start_step_over): Use install_software_single_step_breakpoints.
4711 * linux-low.h: New CORE_ADDR vector.
4712 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4713 get_next_pcs.
4714 * linux-mips-low.c (the_low_targets): Likewise.
4715 * linux-nios2-low.c (the_low_targets): Likewise.
4716 * linux-sparc-low.c (the_low_targets): Likewise.
4717
4718 2015-12-17 Pedro Alves <palves@redhat.com>
4719
4720 * linux-low.c (linux_kill_one_lwp): Remove references to
4721 LinuxThreads.
4722 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4723 to 'kill'.
4724 (linux_init_signals): Delete.
4725 (initialize_low): Adjust.
4726 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4727
4728 2015-12-16 Pedro Alves <palves@redhat.com>
4729
4730 * configure.ac (compiler warning flags): When testing a
4731 -Wno-foo option, check whether -Wfoo works instead.
4732 * configure: Regenerate.
4733
4734 2015-12-11 Don Breazeal <donb@codesourcery.com>
4735
4736 * server.c (process_serial_event): Don't exit from gdbserver
4737 in remote mode if there are still active inferiors.
4738
4739 2015-12-11 Yao Qi <yao.qi@linaro.org>
4740
4741 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4742 arm_breakpoint_at if the process is 32-bit.
4743
4744 2015-12-11 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4747 arm breakpoint.
4748
4749 2015-12-07 Yao Qi <yao.qi@linaro.org>
4750
4751 * configure.srv: Append arm.o to srv_tgtobj for
4752 aarch64*-*-linux* target.
4753 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4754 from linux-arm-low.c.
4755 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4756 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4757 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4758 (thumb2_breakpoint_len): Likewise.
4759 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4760 (arm_breakpoint_kinds): Likewise.
4761 (arm_breakpoint_kind_from_pc): Likewise.
4762 (arm_sw_breakpoint_from_kind): Likewise.
4763 (arm_breakpoint_kind_from_current_state): Likewise.
4764 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4765 (arm_sw_breakpoint_from_kind): Declare.
4766 (arm_breakpoint_kind_from_current_state): Declare.
4767 (arm_breakpoint_at): Declare.
4768 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4769 arm_sw_breakpoint_from_kind if process is 32-bit.
4770 (aarch64_breakpoint_kind_from_pc): New function.
4771 (aarch64_breakpoint_kind_from_current_state): New function.
4772 (the_low_target): Initialize fields breakpoint_kind_from_pc
4773 and breakpoint_kind_from_current_state.
4774 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4775 linux-aarch32-low.c.
4776 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4777 (arm_breakpoint, arm_breakpoint_len): Likewise.
4778 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4779 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4780 (arm_is_thumb_mode): Likewise.
4781 (arm_breakpoint_at): Likewise.
4782 (arm_breakpoint_kind_from_pc): Likewise.
4783 (arm_sw_breakpoint_from_kind): Likewise.
4784 (arm_breakpoint_kind_from_current_state): Likewise.
4785
4786 Revert:
4787 2015-08-04 Yao Qi <yao.qi@linaro.org>
4788
4789 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4790 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4791 * server.c (extended_protocol): Remove "static".
4792 * server.h (extended_protocol): Declare it.
4793
4794 2015-12-04 Josh Stone <jistone@redhat.com>
4795
4796 * target.h (struct target_ops) <arch_setup>: Rename to ...
4797 (struct target_ops) <post_create_inferior>: ... this.
4798 (target_arch_setup): Rename to ...
4799 (target_post_create_inferior): ... this, calling post_create_inferior.
4800 * server.c (start_inferior): Update target_arch_setup calls to
4801 target_post_create_inferior.
4802 * linux-low.c (linux_low_ptrace_options): Forward declare.
4803 (linux_arch_setup): Update its comment for general use.
4804 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4805 (struct linux_target_ops): Use linux_post_create_inferior.
4806 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4807 to post_create_inferior.
4808 * nto-low.c (struct nto_target_ops): Likewise.
4809 * spu-low.c (struct spu_target_ops): Likewise.
4810 * win32-low.c (struct win32_target_ops): Likewise.
4811
4812 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4813
4814 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4815
4816 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4817
4818 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4819 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4820 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4821 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4822 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4823 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4824 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4825 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4826 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4827 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4828 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4829 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4830
4831 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4832
4833 * linux-low.c (linux_look_up_symbols): Don't call
4834 linux_supports_traceclone.
4835 * linux-low.h (thread_db_init): Remove use_events argument.
4836 * thread-db.c (thread_db_use_event): Remove global variable.
4837 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4838 (struct thread_db) <td_create_bp>: Remove field.
4839 (thread_db_create_event): Remove function.
4840 (thread_db_enable_reporting): Likewise.
4841 (find_one_thread): Don't check for thread_db_use_events.
4842 (attach_thread): Likewise.
4843 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4844 (try_thread_db_load_1): Don't check for thread_db_use_events.
4845 (thread_db_init): Remove use_events argument and thread events
4846 handling.
4847 (remove_thread_event_breakpoints): Remove function.
4848 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4849
4850 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4851
4852 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4853 New function.
4854 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4855 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4856 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4857 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4858 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4859 Initialize.
4860 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4861 New function.
4862 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4863 * linux-low.c (can_hardware_single_step): Use
4864 supports_hardware_single_step.
4865 (can_software_single_step): New function.
4866 (start_step_over): Call can_software_single_step.
4867 (linux_supports_hardware_single_step): New function.
4868 (struct target_ops) <supports_software_single_step>: Initialize.
4869 * linux-low.h (struct linux_target_ops)
4870 <supports_hardware_single_step>: Initialize.
4871 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4872 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4873 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4874 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4875 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4876 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4877 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4878 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4879 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4880 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4881 Initialize.
4882 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4883 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4884 Initialize.
4885 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4886 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4887 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4888 New function.
4889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4890 * target.h (struct target_ops): <supports_software_single_step>:
4891 New field.
4892 (target_supports_software_single_step): New macro.
4893
4894 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4895
4896 * linux-low.c (linux_wait_1): Fix pc advance condition.
4897 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4898 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4899
4900 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4901
4902 * linux-arm-low.c (arm_is_thumb_mode): New function.
4903 (arm_breakpoint_at): Use arm_is_thumb_mode.
4904 (arm_breakpoint_kind_from_current_state): New function.
4905 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4906 Initialize.
4907 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4908 (linux_breakpoint_kind_from_current_state): New function.
4909 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4910 * linux-low.h (struct linux_target_ops)
4911 <breakpoint_kind_from_current_state>: New field.
4912 * target.h (struct target_ops): Likewise.
4913 (target_breakpoint_kind_from_current_state): New macro.
4914
4915 2015-11-30 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.c (linux_resume): Wake up the event loop before
4918 returning.
4919
4920 2015-11-30 Pedro Alves <palves@redhat.com>
4921
4922 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4923 check.
4924 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4925 to -1.
4926 * target.c (struct thread_search): New structure.
4927 (thread_search_callback): New function.
4928 (prev_general_thread): New global.
4929 (prepare_to_access_memory, done_accessing_memory): New functions.
4930 * target.h (prepare_to_access_memory, done_accessing_memory):
4931 Replace macros with function declarations.
4932
4933 2015-11-30 Pedro Alves <palves@redhat.com>
4934
4935 PR 14618
4936 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4937 report TARGET_WAITKIND_NO_RESUMED.
4938 * remote-utils.c (prepare_resume_reply): Handle
4939 TARGET_WAITKIND_NO_RESUMED.
4940 * server.c (report_no_resumed): New global.
4941 (handle_query) <qSupported>: Handle "no-resumed+". Report
4942 "no-resumed+" support.
4943 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4944 return error if the client doesn't support no-resumed events.
4945 (push_stop_notification): New function.
4946 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4947 events if the client supports them.
4948
4949 2015-11-30 Pedro Alves <palves@redhat.com>
4950
4951 * linux-low.c (thread_still_has_status_pending_p): Don't check
4952 vCont;t here.
4953 (lwp_resumed): New function.
4954 (status_pending_p_callback): Return early if the LWP is not
4955 supposed to be resumed.
4956
4957 2015-11-30 Pedro Alves <palves@redhat.com>
4958
4959 * linux-low.c (handle_extended_wait): Assert that the LWP's
4960 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4961 thread create events, leave the new child's status pending.
4962 (linux_low_filter_event): If GDB wants to hear about thread exit
4963 events, leave the LWP marked dead and don't delete it.
4964 (linux_wait_for_event_filtered): Don't check for thread exit.
4965 (filter_exit_event): New function.
4966 (linux_wait_1): Use it, when returning an exit event.
4967 (linux_resume_one_lwp_throw): Assert that the LWP's
4968 waitstatus is TARGET_WAITKIND_IGNORE.
4969 * remote-utils.c (prepare_resume_reply): Handle
4970 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4971 * server.c (report_thread_events): New global.
4972 (handle_general_set): Handle QThreadEvents.
4973 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4974 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4975 TARGET_WAITKIND_THREAD_EXITED.
4976 * server.h (report_thread_events): Declare.
4977
4978 2015-11-30 Pedro Alves <palves@redhat.com>
4979
4980 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4981 the thread's last_resume_kind was resume_stop.
4982
4983 2015-11-30 Pedro Alves <palves@redhat.com>
4984
4985 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4986 before returning.
4987
4988 2015-11-30 Pedro Alves <palves@redhat.com>
4989
4990 * server.c (handle_v_requests): Handle vCtrlC.
4991
4992 2015-11-30 Pedro Alves <palves@redhat.com>
4993
4994 * gdbthread.h (find_any_thread_of_pid): Declare.
4995 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4996 functions.
4997 * server.c (handle_query): If current_thread is NULL, look for
4998 another thread of the selected process.
4999
5000 2015-11-26 Daniel Colascione <dancol@dancol.org>
5001 Simon Marchi <simon.marchi@ericsson.com>
5002
5003 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5004 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5005 name in reply.
5006 * target.h (struct target_ops) <thread_name>: New field.
5007 (target_thread_name): New macro.
5008
5009 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5010
5011 * regcache.h (regcache_invalidate_pid): Add declaration.
5012 * regcache.c (regcache_invalidate_pid): New function, extracted
5013 from regcache_invalidate.
5014 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5015 Add trivial documentation comment.
5016 * lynx-low.c: Use regcache_invalidate_pid instead of
5017 regcache_invalidate.
5018
5019 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5020
5021 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5022 and Elf64_auxv_t if the target is Android.
5023
5024 2015-11-22 Doug Evans <xdje42@gmail.com>
5025
5026 * target.h: #include <sys/types.h>.
5027
5028 2015-11-19 Pedro Alves <palves@redhat.com>
5029
5030 * linux-low.c (linux_process_qsupported): Change prototype.
5031 Adjust.
5032 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5033 Change prototype.
5034 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5035 and adjust to loop over all features.
5036 * server.c (handle_query) <qSupported>: Adjust to call
5037 target_process_qsupported once, passing it a vector of unprocessed
5038 features.
5039 * target.h (struct target_ops) <process_qsupported>: Change
5040 prototype.
5041 (target_process_qsupported): Adjust.
5042
5043 2015-11-19 Pedro Alves <palves@redhat.com>
5044
5045 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5046 mode.
5047 * configure: Regenerate.
5048
5049 2015-11-19 Pedro Alves <palves@redhat.com>
5050
5051 * configure: Regenerate.
5052
5053 2015-11-19 Yao Qi <yao.qi@linaro.org>
5054
5055 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5056 type to uint32_t.
5057
5058 2015-11-19 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5061 (struct aarch64_operand): Move enum out.
5062
5063 2015-11-19 Yao Qi <yao.qi@linaro.org>
5064
5065 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5066 struct user_fpsimd_state *.
5067 (aarch64_store_fpregset): Likewise.
5068
5069 2015-11-19 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5072 struct user_pt_regs *.
5073 (aarch64_store_gregset): Likewise.
5074
5075 2015-11-18 Pedro Alves <palves@redhat.com>
5076
5077 * Makefile.in (all_object_files): Add $IPA_OBJS.
5078
5079 2015-11-17 Pedro Alves <palves@redhat.com>
5080
5081 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5082 GDB_SIGNAL_0 and gdb_signal_to_string.
5083
5084 2015-11-17 Pedro Alves <palves@redhat.com>
5085
5086 * win32-low.c (handle_output_debug_string): Remove parameter.
5087 (win32_kill): Remove our_status local and adjust call to
5088 handle_output_debug_string.
5089 (get_child_debug_event): Adjust call to
5090 handle_output_debug_string.
5091
5092 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5093
5094 * linux-mips-low.c (mips_fill_gregset): Add cast.
5095 (mips_store_gregset): Likewise.
5096 (mips_fill_fpregset): Likewise.
5097 (mips_store_fpregset): Likewise.
5098
5099 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5100
5101 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5102 priv.
5103
5104 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5105
5106 * linux-mips-low.c (mips_linux_new_thread): Change type of
5107 watch_type to enum target_hw_bp_type.
5108
5109 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5110
5111 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5112 Change return type to arm_hwbp_type.
5113
5114 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5115
5116 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5117 (arm_store_gregset): Likewise.
5118 * linux-arm-low.c (arm_get_hwcap): Likewise.
5119 (arm_read_description): Likewise.
5120
5121 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5122
5123 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5124
5125 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5126
5127 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5128 (ppc_fill_vsxregset): Likewise.
5129 (ppc_store_vsxregset): Likewise.
5130 (ppc_fill_vrregset): Likewise.
5131 (ppc_store_vrregset): Likewise.
5132 (ppc_fill_evrregset): Likewise.
5133 (ppc_store_evrregset): Likewise.
5134
5135 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5136
5137 * linux-ppc-low.c (ppc_usrregs_info): Remove
5138 forward-declaration.
5139 (ppc_arch_setup): Move lower in file.
5140
5141 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5142
5143 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5144 (ps_pdwrite): Likewise.
5145
5146 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5147
5148 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5149 to after assert checks.
5150
5151 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5152
5153 * proc-service.c (ps_pdread): Add/adjust casts.
5154 (ps_pdwrite): Add/adjust casts.
5155
5156 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5157
5158 * server.c (handle_search_memory_1): Cast return value of
5159 memmem.
5160
5161 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5162
5163 * server.c (write_qxfer_response): Change type of data to
5164 gdb_byte *.
5165
5166 2015-10-29 Pedro Alves <palves@redhat.com>
5167
5168 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5169
5170 2015-10-29 Pedro Alves <palves@redhat.com>
5171
5172 * tracepoint.c (clear_installed_tracepoints): Add casts.
5173
5174 2015-10-29 Pedro Alves <palves@redhat.com>
5175
5176 * server.c (handle_v_cont, process_serial_event): Add enum
5177 gdb_signal casts to signal parsing code.
5178
5179 2015-10-29 Pedro Alves <palves@redhat.com>
5180
5181 * linux-low.h (NULL_REGSET): Define.
5182 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5183 * linux-arm-low.c (arm_regsets): Likewise.
5184 * linux-crisv32-low.c (cris_regsets): Likewise.
5185 * linux-m68k-low.c (m68k_regsets): Likewise.
5186 * linux-mips-low.c (mips_regsets): Likewise.
5187 * linux-nios2-low.c (nios2_regsets): Likewise.
5188 * linux-ppc-low.c (ppc_regsets): Likewise.
5189 * linux-s390-low.c (s390_regsets): Likewise.
5190 * linux-sh-low.c (sh_regsets): Likewise.
5191 * linux-sparc-low.c (sparc_regsets): Likewise.
5192 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5193 * linux-tile-low.c (tile_regsets): Likewise.
5194 * linux-x86-low.c (x86_regsets): Likewise.
5195 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5196
5197 2015-10-29 Pedro Alves <palves@redhat.com>
5198
5199 * linux-low.h (NULL_REGSET): Define.
5200 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5201 * linux-arm-low.c (arm_regsets): Likewise.
5202 * linux-crisv32-low.c (cris_regsets): Likewise.
5203 * linux-m68k-low.c (m68k_regsets): Likewise.
5204 * linux-mips-low.c (mips_regsets): Likewise.
5205 * linux-nios2-low.c (nios2_regsets): Likewise.
5206 * linux-ppc-low.c (ppc_regsets): Likewise.
5207 * linux-s390-low.c (s390_regsets): Likewise.
5208 * linux-sh-low.c (sh_regsets): Likewise.
5209 * linux-sparc-low.c (sparc_regsets): Likewise.
5210 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5211 * linux-tile-low.c (tile_regsets): Likewise.
5212 * linux-x86-low.c (x86_regsets): Likewise.
5213 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5214
5215 2015-10-26 Doug Evans <dje@google.com>
5216
5217 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5218
5219 2015-10-26 Doug Evans <dje@google.com>
5220
5221 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5222
5223 2015-10-26 Doug Evans <dje@google.com>
5224
5225 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5226 for debug_printf.
5227 (attach_thread, find_new_threads_callback): Ditto.
5228
5229 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5230
5231 * mem-break.h (set_breakpoint_data): Remove.
5232
5233 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5234
5235 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5236 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5237 (initialize_low): Remove set_breakpoint_data call.
5238 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5239 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5240 (initialize_low): Remove set_breakpoint_data call.
5241 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5242 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5243 (initialize_low): Remove set_breakpoint_data call.
5244
5245 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5246
5247 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5248 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5249 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5250 * target.h (target_breakpoint_kind_from_pc): New macro.
5251
5252 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5253
5254 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5255 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5256 the default breakpoint kind.
5257
5258 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5259
5260 * linux-arm-low.c (arm_supports_z_point_type): Add software
5261 breakpoint support.
5262
5263 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5264
5265 * linux-arm-low.c: Refactor breakpoint definitions.
5266 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5267 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5268
5269 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5270
5271 * Makefile.in: Add arm.c/o.
5272 * configure.srv: Likewise.
5273 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5274 (arm_breakpoint_kind_from_pc): New function.
5275 (arm_sw_breakpoint_from_kind): Return proper kind.
5276 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5277
5278 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5279
5280 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5281 removal.
5282 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5283 (struct raw_breakpoint) <size>: Remove.
5284 (struct raw_breakpoint) <kind>: Add.
5285 (bp_size): New function.
5286 (bp_opcode): Likewise.
5287 (find_raw_breakpoint_at): Adjust for kind.
5288 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5289 (remove_memory_breakpoint): Adjust for kind call bp_size.
5290 (set_raw_breakpoint_at): Adjust for kind.
5291 (set_breakpoint): Likewise.
5292 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5293 (delete_raw_breakpoint): Adjust for kind.
5294 (delete_breakpoint): Likewise.
5295 (find_gdb_breakpoint): Likewise.
5296 (set_gdb_breakpoint_1): Likewise.
5297 (set_gdb_breakpoint): Likewise.
5298 (delete_gdb_breakpoint_1): Likewise.
5299 (delete_gdb_breakpoint): Likewise.
5300 (uninsert_raw_breakpoint): Likewise.
5301 (reinsert_raw_breakpoint): Likewise.
5302 (set_breakpoint_data): Remove.
5303 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5304 (check_mem_read): Adjust for kind call bp_size.
5305 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5306 (clone_one_breakpoint): Adjust for kind.
5307 * mem-break.h (set_gdb_breakpoint): Likewise.
5308 (delete_gdb_breakpoint): Likewise.
5309 * server.c (process_serial_event): Likewise.
5310
5311 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5312
5313 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5314 (struct linux_target_ops) <breakpoint>: Remove.
5315 (struct linux_target_ops) <breakpoint_len>: Remove.
5316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5318 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5319 (arm_sw_breakpoint_from_kind): New function.
5320 * linux-bfin-low.c (bfin_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-cris-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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5331 (struct linux_target_ops) <breakpoint>: Remove.
5332 (struct linux_target_ops) <breakpoint_len>: Remove.
5333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5335 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5336 and sw_breakpoint_from_kind to increment the pc.
5337 (linux_breakpoint_kind_from_pc): New function.
5338 (linux_sw_breakpoint_from_kind): New function.
5339 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5340 (initialize_low): Call breakpoint_kind_from_pc and
5341 sw_breakpoint_from_kind to replace breakpoint_data/len.
5342 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5343 New field.
5344 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5345 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5386 (struct linux_target_ops) <breakpoint>: Remove.
5387 (struct linux_target_ops) <breakpoint_len>: Remove.
5388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5390 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5391 * linux-x86-low.c (x86_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 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5397 (struct linux_target_ops) <breakpoint>: Remove.
5398 (struct linux_target_ops) <breakpoint_len>: Remove.
5399 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5400 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5401
5402 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5403
5404 * linux-cris-low.c (cris_get_pc): Remove void arg.
5405
5406 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5407
5408 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5409 variable name.
5410
5411 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5412
5413 * inferiors.c (thread_pid_matches_callback): New function.
5414 (find_thread_process): New function.
5415 (remove_thread): Reset current_thread.
5416 (remove_process): Assert threads have been removed first.
5417
5418 2015-10-15 Yao Qi <yao.qi@linaro.org>
5419
5420 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5421 if it is 3.
5422 (aarch64_remove_point): Likewise.
5423 * regcache.c (regcache_register_size): New function.
5424
5425 2015-10-12 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-aarch64-low.c: Update all callers as emit_load_store
5428 is renamed to aarch64_emit_load_store.
5429
5430 2015-10-12 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c: Update all callers of function renaming
5433 from emit_insn to aarch64_emit_insn.
5434
5435 2015-10-12 Yao Qi <yao.qi@linaro.org>
5436
5437 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5438 arch/aarch64-insn.h.
5439 (struct aarch64_memory_operand): Likewise.
5440 (ENCODE): Likewise.
5441 (emit_insn): Move to arch/aarch64-insn.c.
5442 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5443 (emit_load_store): Move to arch/aarch64-insn.c.
5444 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5445 (can_encode_int32): Remove.
5446
5447 2015-10-12 Yao Qi <yao.qi@linaro.org>
5448
5449 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5450 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5451 (aarch64_relocate_instruction): Likewise.
5452 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5453 (struct aarch64_insn_visitor): Likewise.
5454
5455 2015-10-12 Yao Qi <yao.qi@linaro.org>
5456
5457 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5458 (struct aarch64_insn_visitor): New.
5459 (struct aarch64_insn_relocation_data): New.
5460 (aarch64_ftrace_insn_reloc_b): New function.
5461 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5462 (aarch64_ftrace_insn_reloc_cb): Likewise.
5463 (aarch64_ftrace_insn_reloc_tb): Likewise.
5464 (aarch64_ftrace_insn_reloc_adr): Likewise.
5465 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5466 (aarch64_ftrace_insn_reloc_others): Likewise.
5467 (visitor): New.
5468 (aarch64_relocate_instruction): Use visitor.
5469
5470 2015-10-12 Yao Qi <yao.qi@linaro.org>
5471
5472 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5473 int. Add argument buf.
5474 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5475 aarch64_relocate_instruction.
5476
5477 2015-10-12 Yao Qi <yao.qi@linaro.org>
5478
5479 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5480 argument insn. Remove local variable insn. Don't call
5481 target_read_uint32.
5482 (aarch64_install_fast_tracepoint_jump_pad): Call
5483 target_read_uint32.
5484
5485 2015-09-30 Yao Qi <yao.qi@linaro.org>
5486
5487 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5488 (emit_load_store_pair): Likewise.
5489
5490 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5491
5492 * dll.c (match_dll): Add cast(s).
5493 (unloaded_dll): Likewise.
5494 * linux-low.c (second_thread_of_pid_p): Likewise.
5495 (delete_lwp_callback): Likewise.
5496 (count_events_callback): Likewise.
5497 (select_event_lwp_callback): Likewise.
5498 (linux_set_resume_request): Likewise.
5499 * server.c (accumulate_file_name_length): Likewise.
5500 (emit_dll_description): Likewise.
5501 (handle_qxfer_threads_worker): Likewise.
5502 (visit_actioned_threads): Likewise.
5503 * thread-db.c (any_thread_of): Likewise.
5504 * tracepoint.c (same_process_p): Likewise.
5505 (match_blocktype): Likewise.
5506 (build_traceframe_info_xml): Likewise.
5507
5508 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5509
5510 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5511 assignment.
5512 (gdb_unparse_agent_expr): Likewise.
5513 * hostio.c (require_data): Likewise.
5514 (handle_pread): Likewise.
5515 * linux-low.c (disable_regset): Likewise.
5516 (fetch_register): Likewise.
5517 (store_register): Likewise.
5518 (get_dynamic): Likewise.
5519 (linux_qxfer_libraries_svr4): Likewise.
5520 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5521 (set_fast_tracepoint_jump): Likewise.
5522 (uninsert_fast_tracepoint_jumps_at): Likewise.
5523 (reinsert_fast_tracepoint_jumps_at): Likewise.
5524 (validate_inserted_breakpoint): Likewise.
5525 (clone_agent_expr): Likewise.
5526 * regcache.c (init_register_cache): Likewise.
5527 * remote-utils.c (putpkt_binary_1): Likewise.
5528 (decode_M_packet): Likewise.
5529 (decode_X_packet): Likewise.
5530 (look_up_one_symbol): Likewise.
5531 (relocate_instruction): Likewise.
5532 (monitor_output): Likewise.
5533 * server.c (handle_search_memory): Likewise.
5534 (handle_qxfer_exec_file): Likewise.
5535 (handle_qxfer_libraries): Likewise.
5536 (handle_qxfer): Likewise.
5537 (handle_query): Likewise.
5538 (handle_v_cont): Likewise.
5539 (handle_v_run): Likewise.
5540 (captured_main): Likewise.
5541 * target.c (write_inferior_memory): Likewise.
5542 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5543 * tracepoint.c (init_trace_buffer): Likewise.
5544 (add_tracepoint_action): Likewise.
5545 (add_traceframe): Likewise.
5546 (add_traceframe_block): Likewise.
5547 (cmd_qtdpsrc): Likewise.
5548 (cmd_qtdv): Likewise.
5549 (cmd_qtstatus): Likewise.
5550 (response_source): Likewise.
5551 (response_tsv): Likewise.
5552 (cmd_qtnotes): Likewise.
5553 (gdb_collect): Likewise.
5554 (initialize_tracepoint): Likewise.
5555
5556 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5557
5558 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5559 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5560 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5561 <NOP>: New.
5562 (enum aarch64_condition_codes): New enum.
5563 (w0): New static global.
5564 (fp): Likewise.
5565 (lr): Likewise.
5566 (struct aarch64_memory_operand) <type>: New
5567 MEMORY_OPERAND_POSTINDEX type.
5568 (postindex_memory_operand): New helper function.
5569 (emit_ret): New function.
5570 (emit_load_store_pair): New function, factored out of emit_stp
5571 with support for MEMORY_OPERAND_POSTINDEX.
5572 (emit_stp): Rewrite using emit_load_store_pair.
5573 (emit_ldp): New function.
5574 (emit_load_store): Likewise.
5575 (emit_ldr): Mention post-index instruction in comment.
5576 (emit_ldrh): New function.
5577 (emit_ldrb): New function.
5578 (emit_ldrsw): Mention post-index instruction in comment.
5579 (emit_str): Likewise.
5580 (emit_subs): New function.
5581 (emit_cmp): Likewise.
5582 (emit_and): Likewise.
5583 (emit_orr): Likewise.
5584 (emit_orn): Likewise.
5585 (emit_eor): Likewise.
5586 (emit_mvn): Likewise.
5587 (emit_lslv): Likewise.
5588 (emit_lsrv): Likewise.
5589 (emit_asrv): Likewise.
5590 (emit_mul): Likewise.
5591 (emit_sbfm): Likewise.
5592 (emit_sbfx): Likewise.
5593 (emit_ubfm): Likewise.
5594 (emit_ubfx): Likewise.
5595 (emit_csinc): Likewise.
5596 (emit_cset): Likewise.
5597 (emit_nop): Likewise.
5598 (emit_ops_insns): New helper function.
5599 (emit_pop): Likewise.
5600 (emit_push): Likewise.
5601 (aarch64_emit_prologue): New function.
5602 (aarch64_emit_epilogue): Likewise.
5603 (aarch64_emit_add): Likewise.
5604 (aarch64_emit_sub): Likewise.
5605 (aarch64_emit_mul): Likewise.
5606 (aarch64_emit_lsh): Likewise.
5607 (aarch64_emit_rsh_signed): Likewise.
5608 (aarch64_emit_rsh_unsigned): Likewise.
5609 (aarch64_emit_ext): Likewise.
5610 (aarch64_emit_log_not): Likewise.
5611 (aarch64_emit_bit_and): Likewise.
5612 (aarch64_emit_bit_or): Likewise.
5613 (aarch64_emit_bit_xor): Likewise.
5614 (aarch64_emit_bit_not): Likewise.
5615 (aarch64_emit_equal): Likewise.
5616 (aarch64_emit_less_signed): Likewise.
5617 (aarch64_emit_less_unsigned): Likewise.
5618 (aarch64_emit_ref): Likewise.
5619 (aarch64_emit_if_goto): Likewise.
5620 (aarch64_emit_goto): Likewise.
5621 (aarch64_write_goto_address): Likewise.
5622 (aarch64_emit_const): Likewise.
5623 (aarch64_emit_call): Likewise.
5624 (aarch64_emit_reg): Likewise.
5625 (aarch64_emit_pop): Likewise.
5626 (aarch64_emit_stack_flush): Likewise.
5627 (aarch64_emit_zero_ext): Likewise.
5628 (aarch64_emit_swap): Likewise.
5629 (aarch64_emit_stack_adjust): Likewise.
5630 (aarch64_emit_int_call_1): Likewise.
5631 (aarch64_emit_void_call_2): Likewise.
5632 (aarch64_emit_eq_goto): Likewise.
5633 (aarch64_emit_ne_goto): Likewise.
5634 (aarch64_emit_lt_goto): Likewise.
5635 (aarch64_emit_le_goto): Likewise.
5636 (aarch64_emit_gt_goto): Likewise.
5637 (aarch64_emit_ge_got): Likewise.
5638 (aarch64_emit_ops_impl): New static global variable.
5639 (aarch64_emit_ops): New target function, return
5640 &aarch64_emit_ops_impl.
5641 (struct linux_target_ops): Install it.
5642
5643 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5644
5645 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5646 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5647 aarch64-ipa.o.
5648 * linux-aarch64-ipa.c: New file.
5649 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5650 and endian.h.
5651 (aarch64_get_thread_area): New target method.
5652 (extract_signed_bitfield): New helper function.
5653 (aarch64_decode_ldr_literal): New function.
5654 (enum aarch64_opcodes): New enum.
5655 (struct aarch64_register): New struct.
5656 (struct aarch64_operand): New struct.
5657 (x0): New static global.
5658 (x1): Likewise.
5659 (x2): Likewise.
5660 (x3): Likewise.
5661 (x4): Likewise.
5662 (w2): Likewise.
5663 (ip0): Likewise.
5664 (sp): Likewise.
5665 (xzr): Likewise.
5666 (aarch64_register): New helper function.
5667 (register_operand): Likewise.
5668 (immediate_operand): Likewise.
5669 (struct aarch64_memory_operand): New struct.
5670 (offset_memory_operand): New helper function.
5671 (preindex_memory_operand): Likewise.
5672 (enum aarch64_system_control_registers): New enum.
5673 (ENCODE): New macro.
5674 (emit_insn): New helper function.
5675 (emit_b): New function.
5676 (emit_bcond): Likewise.
5677 (emit_cb): Likewise.
5678 (emit_tb): Likewise.
5679 (emit_blr): Likewise.
5680 (emit_stp): Likewise.
5681 (emit_ldp_q_offset): Likewise.
5682 (emit_stp_q_offset): Likewise.
5683 (emit_load_store): Likewise.
5684 (emit_ldr): Likewise.
5685 (emit_ldrsw): Likewise.
5686 (emit_str): Likewise.
5687 (emit_ldaxr): Likewise.
5688 (emit_stxr): Likewise.
5689 (emit_stlr): Likewise.
5690 (emit_data_processing_reg): Likewise.
5691 (emit_data_processing): Likewise.
5692 (emit_add): Likewise.
5693 (emit_sub): Likewise.
5694 (emit_mov): Likewise.
5695 (emit_movk): Likewise.
5696 (emit_mov_addr): Likewise.
5697 (emit_mrs): Likewise.
5698 (emit_msr): Likewise.
5699 (emit_sevl): Likewise.
5700 (emit_wfe): Likewise.
5701 (append_insns): Likewise.
5702 (can_encode_int32_in): New helper function.
5703 (aarch64_relocate_instruction): New function.
5704 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5705 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5706 (struct linux_target_ops): Install aarch64_get_thread_area,
5707 aarch64_install_fast_tracepoint_jump_pad and
5708 aarch64_get_min_fast_tracepoint_insn_len.
5709
5710 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5711
5712 * Makefile.in (aarch64-insn.o): New rule.
5713 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5714
5715 2015-09-21 Yao Qi <yao.qi@linaro.org>
5716
5717 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5718
5719 2015-09-21 Yao Qi <yao.qi@linaro.org>
5720
5721 * tracepoint.c (max_jump_pad_size): Remove.
5722
5723 2015-09-18 Yao Qi <yao.qi@linaro.org>
5724
5725 * linux-aarch64-low.c: Don't include sys/uio.h.
5726 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5727
5728 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5729
5730 * tracepoint.c (eval_result_type): Change prototype.
5731 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5732
5733 2015-09-15 Pedro Alves <palves@redhat.com>
5734
5735 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5736 Check whether to report exec events instead of checking whether
5737 multiprocess is enabled.
5738
5739 2015-09-15 Pedro Alves <palves@redhat.com>
5740
5741 PR remote/18965
5742 * remote-utils.c (prepare_resume_reply): Merge
5743 TARGET_WAITKIND_VFORK_DONE switch case with the
5744 TARGET_WAITKIND_FORKED case.
5745
5746 2015-09-15 Yao Qi <yao.qi@linaro.org>
5747
5748 * server.c (handle_query): Check string comparison using
5749 "else if" instead of "if".
5750
5751 2015-09-15 Yao Qi <yao.qi@linaro.org>
5752
5753 * server.c (vCont_supported): New global variable.
5754 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5755 matches. Append ";vContSupported+" to own_buf.
5756 (handle_v_requests): Append ";s;S" to own_buf if target supports
5757 hardware single step or vCont_supported is false.
5758 (capture_main): Set vCont_supported to zero.
5759
5760 2015-09-15 Yao Qi <yao.qi@linaro.org>
5761
5762 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5763 it to ...
5764 (linux_supports_hardware_single_step): ... New function.
5765 (linux_target_ops): Update.
5766 * lynx-low.c (lynx_target_ops): Set field
5767 supports_hardware_single_step to target_can_do_hardware_single_step.
5768 * nto-low.c (nto_target_ops): Likewise.
5769 * spu-low.c (spu_target_ops): Likewise.
5770 * win32-low.c (win32_target_ops): Likewise.
5771 * target.c (target_can_do_hardware_single_step): New function.
5772 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5773 Remove. <supports_hardware_single_step>: New field.
5774 (target_supports_conditional_breakpoints): Remove.
5775 (target_supports_hardware_single_step): New macro.
5776 (target_can_do_hardware_single_step): Declare.
5777 * server.c (handle_query): Use target_supports_hardware_single_step
5778 instead of target_supports_conditional_breakpoints.
5779
5780 2015-09-15 Yao Qi <yao.qi@linaro.org>
5781
5782 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5783 function.
5784 (struct linux_target_ops the_low_target): Install
5785 aarch64_linux_siginfo_fixup.
5786
5787 2015-09-11 Don Breazeal <donb@codesourcery.com>
5788 Luis Machado <lgustavo@codesourcery.com>
5789
5790 * linux-low.c (linux_mourn): Static declaration.
5791 (linux_arch_setup): Move in front of
5792 handle_extended_wait.
5793 (linux_arch_setup_thread): New function.
5794 (handle_extended_wait): Handle exec events. Call
5795 linux_arch_setup_thread. Make event_lwp argument a
5796 pointer-to-a-pointer.
5797 (check_zombie_leaders): Do not check stopped threads.
5798 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5799 (linux_low_filter_event): Add lwp and thread for exec'ing
5800 non-leader thread if leader thread has been deleted.
5801 Refactor code into linux_arch_setup_thread and call it.
5802 Pass child lwp pointer by reference to handle_extended_wait.
5803 (linux_wait_for_event_filtered): Update comment.
5804 (linux_wait_1): Prevent clobbering exec event status.
5805 (linux_supports_exec_events): New function.
5806 (linux_target_ops) <supports_exec_events>: Initialize new member.
5807 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5808 new member.
5809 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5810 * server.c (report_exec_events): New global variable.
5811 (handle_query): Handle qSupported query for exec-events feature.
5812 (captured_main): Initialize report_exec_events.
5813 * server.h (report_exec_events): Declare new global variable.
5814 * target.h (struct target_ops) <supports_exec_events>: New
5815 member.
5816 (target_supports_exec_events): New macro.
5817 * win32-low.c (win32_target_ops) <supports_exec_events>:
5818 Initialize new member.
5819
5820 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5821
5822 * linux-low.c (linux_low_enable_btrace): Remove.
5823 (linux_target_ops): Replace linux_low_enable_btrace with
5824 linux_enable_btrace.
5825
5826 2015-09-03 Yao Qi <yao.qi@linaro.org>
5827
5828 * linux-aarch64-low.c (aarch64_insert_point): Call
5829 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5830 returns true.
5831
5832 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5833
5834 * linux-low.c (check_stopped_by_breakpoint): Use
5835 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5836
5837 2015-08-27 Pedro Alves <palves@redhat.com>
5838
5839 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5840
5841 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5842
5843 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5844 the XNEW-family equivalent.
5845 (compile_bytecodes): Likewise.
5846 * dll.c (loaded_dll): Likewise.
5847 * event-loop.c (append_callback_event): Likewise.
5848 (create_file_handler): Likewise.
5849 (create_file_event): Likewise.
5850 * hostio.c (handle_open): Likewise.
5851 * inferiors.c (add_thread): Likewise.
5852 (add_process): Likewise.
5853 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5854 * linux-arm-low.c (arm_new_process): Likewise.
5855 (arm_new_thread): Likewise.
5856 * linux-low.c (add_to_pid_list): Likewise.
5857 (linux_add_process): Likewise.
5858 (handle_extended_wait): Likewise.
5859 (add_lwp): Likewise.
5860 (enqueue_one_deferred_signal): Likewise.
5861 (enqueue_pending_signal): Likewise.
5862 (linux_resume_one_lwp_throw): Likewise.
5863 (linux_resume_one_thread): Likewise.
5864 (linux_read_memory): Likewise.
5865 (linux_write_memory): Likewise.
5866 * linux-mips-low.c (mips_linux_new_process): Likewise.
5867 (mips_linux_new_thread): Likewise.
5868 (mips_add_watchpoint): Likewise.
5869 * linux-x86-low.c (initialize_low_arch): Likewise.
5870 * lynx-low.c (lynx_add_process): Likewise.
5871 * mem-break.c (set_raw_breakpoint_at): Likewise.
5872 (set_breakpoint): Likewise.
5873 (add_condition_to_breakpoint): Likewise.
5874 (add_commands_to_breakpoint): Likewise.
5875 (clone_agent_expr): Likewise.
5876 (clone_one_breakpoint): Likewise.
5877 * regcache.c (new_register_cache): Likewise.
5878 * remote-utils.c (look_up_one_symbol): Likewise.
5879 * server.c (queue_stop_reply): Likewise.
5880 (start_inferior): Likewise.
5881 (queue_stop_reply_callback): Likewise.
5882 (handle_target_event): Likewise.
5883 * spu-low.c (fetch_ppc_memory): Likewise.
5884 (store_ppc_memory): Likewise.
5885 * target.c (set_target_ops): Likewise.
5886 * thread-db.c (thread_db_load_search): Likewise.
5887 (try_thread_db_load_1): Likewise.
5888 * tracepoint.c (add_tracepoint): Likewise.
5889 (add_tracepoint_action): Likewise.
5890 (create_trace_state_variable): Likewise.
5891 (cmd_qtdpsrc): Likewise.
5892 (cmd_qtro): Likewise.
5893 (add_while_stepping_state): Likewise.
5894 * win32-low.c (child_add_thread): Likewise.
5895 (get_image_name): Likewise.
5896
5897 2015-08-25 Yao Qi <yao.qi@linaro.org>
5898
5899 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5900
5901 2015-08-25 Yao Qi <yao.qi@linaro.org>
5902
5903 * Makefile.in (aarch64-linux.o): New rule.
5904 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5905 srv_tgtobj.
5906 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5907 (aarch64_init_debug_reg_state): Make it extern.
5908 (aarch64_linux_prepare_to_resume): Remove.
5909
5910 2015-08-25 Yao Qi <yao.qi@linaro.org>
5911
5912 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5913 lwp_arch_private_info and ptid_of_lwp.
5914
5915 2015-08-25 Yao Qi <yao.qi@linaro.org>
5916
5917 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5918 Find proc_info by find_process_pid. All callers updated.
5919
5920 2015-08-25 Yao Qi <yao.qi@linaro.org>
5921
5922 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5923 Remove.
5924 (debug_reg_change_callback): Remove.
5925 (aarch64_notify_debug_reg_change): Remove.
5926
5927 2015-08-25 Yao Qi <yao.qi@linaro.org>
5928
5929 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5930 Call current_lwp_ptid.
5931
5932 2015-08-25 Yao Qi <yao.qi@linaro.org>
5933
5934 * linux-aarch64-low.c (debug_reg_change_callback): Use
5935 debug_printf.
5936
5937 2015-08-25 Yao Qi <yao.qi@linaro.org>
5938
5939 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5940
5941 2015-08-25 Yao Qi <yao.qi@linaro.org>
5942
5943 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5944
5945 2015-08-25 Yao Qi <yao.qi@linaro.org>
5946
5947 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5948 the code.
5949
5950 2015-08-25 Yao Qi <yao.qi@linaro.org>
5951
5952 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5953 Remove.
5954 (debug_reg_change_callback): Remove argument entry and add argument
5955 lwp. Remove local variable thread. Don't print thread id in the
5956 debugging output. Don't check whether pid of thread equals to pid.
5957 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5958 iterate_over_lwps instead find_inferior.
5959
5960 2015-08-24 Pedro Alves <palves@redhat.com>
5961
5962 * inferiors.c (get_first_process): New function.
5963 * inferiors.h (get_first_process): New declaration.
5964 * remote-utils.c (read_ptid): Default to the first process in the
5965 list, instead of to the current thread's process.
5966
5967 2015-08-24 Pedro Alves <palves@redhat.com>
5968
5969 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5970 * event-loop.c: Likewise.
5971 * remote-utils.c: Likewise.
5972 * tracepoint.c: Likewise.
5973
5974 2015-08-24 Pedro Alves <palves@redhat.com>
5975
5976 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5977 ptid_get_lwp.
5978
5979 2015-08-21 Pedro Alves <palves@redhat.com>
5980
5981 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5982 instead of literal 1.
5983
5984 2015-08-21 Pedro Alves <palves@redhat.com>
5985
5986 * tdesc.c (default_description): Explicitly zero-initialize.
5987
5988 2015-08-21 Pedro Alves <palves@redhat.com>
5989
5990 PR gdb/18749
5991 * inferiors.c (remove_thread): Discard any pending stop reply for
5992 this thread.
5993 * server.c (remove_all_on_match_pid): Rename to ...
5994 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5995 instead of a pid.
5996 (discard_queued_stop_replies): Change parameter to a ptid. Now
5997 extern.
5998 (handle_v_kill, kill_inferior_callback, captured_main)
5999 (process_serial_event): Adjust.
6000 * server.h (discard_queued_stop_replies): Declare.
6001
6002 2015-08-21 Pedro Alves <palves@redhat.com>
6003
6004 * linux-low.c (wait_for_sigstop): Always switch to no thread
6005 selected if the previously current thread dies.
6006 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6007 process instead of the current thread's.
6008 * remote-utils.c (input_interrupt): Don't check if there's no
6009 current thread.
6010 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6011 current thread to the general thread fails, error out.
6012 (handle_qxfer_auxv, handle_qxfer_libraries)
6013 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6014 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6015 (handle_query): Check if there's a thread selected instead of
6016 checking whether there's any thread in the thread list.
6017 (handle_qxfer_threads, handle_qxfer_btrace)
6018 (handle_qxfer_btrace_conf): Don't error out early if there's no
6019 thread in the thread list.
6020 (handle_v_cont, myresume): Don't set the current thread to the
6021 continue thread.
6022 (process_serial_event) <Hg handling>: Also set thread_id if the
6023 previous general thread is still alive.
6024 (process_serial_event) <g/G handling>: If setting the current
6025 thread to the general thread fails, error out.
6026 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6027 thread's lwp instead of the current thread's.
6028 * target.c (set_desired_thread): If the desired thread was not
6029 found, leave the current thread pointing to NULL. Return an int
6030 (boolean) indicating success.
6031 * target.h (set_desired_thread): Change return type to int.
6032
6033 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6034
6035 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6036 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6037 #includes.
6038 (ps_get_thread_area): New function.
6039
6040 2015-08-19 Gary Benson <gbenson@redhat.com>
6041
6042 * hostio.c (handle_pread): Do not attempt to read more data
6043 than hostio_reply_with_data can fit in a packet.
6044
6045 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6046
6047 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6048
6049 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6050
6051 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6052
6053 2015-08-06 Pedro Alves <palves@redhat.com>
6054
6055 * tracepoint.c (expr_eval_result): Now an int.
6056
6057 2015-08-06 Pedro Alves <palves@redhat.com>
6058
6059 * gdbthread.h (struct regcache): Forward declare.
6060 (struct thread_info) <regcache_data>: Now a struct regcache
6061 pointer.
6062 * inferiors.c (inferior_regcache_data)
6063 (set_inferior_regcache_data): Now work with struct regcache
6064 pointers.
6065 * inferiors.h (struct regcache): Forward declare.
6066 (inferior_regcache_data, set_inferior_regcache_data): Now work
6067 with struct regcache pointers.
6068 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6069 (free_register_cache_thread): Remove struct regcache pointer
6070 casts.
6071
6072 2015-08-06 Pedro Alves <palves@redhat.com>
6073
6074 * server.c (captured_main): On error, print the exception message
6075 to stderr, and if run_once is set, throw a quit.
6076
6077 2015-08-06 Pedro Alves <palves@redhat.com>
6078
6079 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6080 the current thread.
6081
6082 2015-08-06 Pedro Alves <palves@redhat.com>
6083
6084 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6085 reading beyond the passed in buffer length.
6086
6087 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6088
6089 * tracepoint.c (symbol_list) <required>: Remove.
6090
6091 2015-08-06 Pedro Alves <palves@redhat.com>
6092
6093 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6094 count if stopping and suspending threads.
6095 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6096 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6097 (linux_detach): Complete an ongoing step-over.
6098 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6099 throughout.
6100 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6101 (linux_wait_1): If passing a signal to the inferior after
6102 finishing a step-over, unsuspend and re-resume all lwps. If we
6103 see a single-step event but the thread should be continuing, don't
6104 pass the trap to gdb.
6105 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6106 internal_error instead of gdb_assert.
6107 (enqueue_pending_signal): New function.
6108 (check_ptrace_stopped_lwp_gone): Add debug output.
6109 (start_step_over): Use internal_error instead of gdb_assert.
6110 (complete_ongoing_step_over): New function.
6111 (linux_resume_one_thread): Don't resume a suspended thread.
6112 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6113 it stepping.
6114
6115 2015-08-06 Pedro Alves <palves@redhat.com>
6116
6117 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6118 (linux_thread_alive): Use lwp_is_marked_dead.
6119 (extended_event_reported): Delete.
6120 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6121 instead of extended_event_reported.
6122 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6123 as well.
6124 (lwp_is_marked_dead): New function.
6125 (lwp_running): Use lwp_is_marked_dead.
6126 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6127 comment.
6128
6129 2015-08-06 Pedro Alves <palves@redhat.com>
6130
6131 * linux-low.c (linux_wait_1): Move fork event output out of the
6132 !report_to_gdb check. Pass event_child->waitstatus to
6133 target_waitstatus_to_string instead of ourstatus.
6134
6135 2015-08-04 Yao Qi <yao.qi@linaro.org>
6136
6137 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6138 if current_thread is 32 bit.
6139
6140 2015-08-04 Yao Qi <yao.qi@linaro.org>
6141
6142 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6143 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6144 * server.c (extended_protocol): Remove "static".
6145 * server.h (extended_protocol): Declare it.
6146
6147 2015-08-04 Yao Qi <yao.qi@linaro.org>
6148
6149 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6150 both aarch64 and aarch32.
6151 (aarch64_set_pc): Likewise.
6152
6153 2015-08-04 Yao Qi <yao.qi@linaro.org>
6154
6155 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6156 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6157 arm-with-neon.xml to srv_xmlfiles.
6158 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6159 (is_64bit_tdesc): New function.
6160 (aarch64_linux_read_description): New function.
6161 (aarch64_arch_setup): Call aarch64_linux_read_description.
6162 (regs_info): Rename to regs_info_aarch64.
6163 (aarch64_regs_info): Return right regs_info.
6164 (initialize_low_arch): Call initialize_low_arch_aarch32.
6165
6166 2015-08-04 Yao Qi <yao.qi@linaro.org>
6167
6168 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6169 * linux-aarch32-low.c: New file.
6170 * linux-aarch32-low.h: New file.
6171 * linux-arm-low.c (arm_fill_gregset): Move it to
6172 linux-aarch32-low.c.
6173 (arm_store_gregset): Likewise.
6174 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6175 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6176 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6177 (regs_info): Rename to regs_info_arm.
6178 (arm_regs_info): Return regs_info_aarch32 if
6179 have_ptrace_getregset is 1 and target description is
6180 arm_with_neon or arm_with_vfpv3.
6181 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6182 Call initialize_low_arch_aarch32 instead.
6183
6184 2015-08-04 Yao Qi <yao.qi@linaro.org>
6185
6186 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6187 * linux-low.c: ... here.
6188 * linux-low.h (have_ptrace_getregset): Declare it.
6189
6190 2015-08-04 Pedro Alves <palves@redhat.com>
6191
6192 * thread-db.c (struct thread_db): Use new typedefs.
6193 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6194 CHK calls.
6195 (disable_thread_event_reporting): Cast result of dlsym to
6196 destination function pointer type.
6197 (thread_db_mourn): Use td_ta_delete_ftype.
6198
6199 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6200
6201 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6202 arch variant.
6203 (CDX_BREAKPOINT): Define for R2.
6204 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6205 (the_low_target): Add comments.
6206
6207 2015-07-30 Yao Qi <yao.qi@linaro.org>
6208
6209 * linux-arm-low.c (arm_hwcap): Remove it.
6210 (arm_read_description): New local variable arm_hwcap. Don't
6211 set arm_hwcap to zero.
6212
6213 2015-07-30 Yao Qi <yao.qi@linaro.org>
6214
6215 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6216 Use regcache->tdesc instead.
6217 (arm_store_wmmxregset): Likewise.
6218 (arm_fill_vfpregset): Likewise.
6219 (arm_store_vfpregset): Likewise.
6220
6221 2015-07-30 Yao Qi <yao.qi@linaro.org>
6222
6223 * linux-arm-low.c: Include arch/arm.h.
6224 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6225 (arm_store_gregset): Likewise.
6226
6227 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6228
6229 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6230 ptrace's 4th parameter.
6231
6232 2015-07-27 Yao Qi <yao.qi@linaro.org>
6233
6234 * configure.srv (case aarch64*-*-linux*): Don't set
6235 srv_linux_usrregs.
6236
6237 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6238
6239 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6240 sys/ptrace.h.
6241 * linux-arm-low.c: Likewise.
6242 * linux-cris-low.c: Likewise.
6243 * linux-crisv32-low.c: Likewise.
6244 * linux-low.c: Likewise.
6245 * linux-m68k-low.c: Likewise.
6246 * linux-mips-low.c: Likewise.
6247 * linux-nios2-low.c: Likewise.
6248 * linux-s390-low.c: Likewise.
6249 * linux-sparc-low.c: Likewise.
6250 * linux-tic6x-low.c: Likewise.
6251 * linux-tile-low.c: Likewise.
6252 * linux-x86-low.c: Likewise.
6253
6254 2015-07-24 Pedro Alves <palves@redhat.com>
6255
6256 * config.in: Regenerate.
6257 * configure: Regenerate.
6258
6259 2015-07-24 Pedro Alves <palves@redhat.com>
6260
6261 * acinclude.m4: Include ../ptrace.m4.
6262 * configure.ac: Call GDB_AC_PTRACE.
6263 * config.in, configure: Regenerate.
6264
6265 2015-07-24 Yao Qi <yao.qi@linaro.org>
6266
6267 * linux-low.c (linux_create_inferior): Remove setting to
6268 proc->priv->new_inferior.
6269 (linux_attach): Likewise.
6270 (linux_low_filter_event): Likewise.
6271 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6272
6273 2015-07-24 Yao Qi <yao.qi@linaro.org>
6274
6275 * linux-low.c (linux_arch_setup): New function.
6276 (linux_low_filter_event): If proc->tdesc is NULL and
6277 proc->attached is true, call the_low_target.arch_setup.
6278 Otherwise, keep status pending, and return.
6279 (linux_resume_one_lwp_throw): Don't call get_pc if
6280 thread->while_stepping isn't NULL. Don't call
6281 get_thread_regcache if proc->tdesc is NULL.
6282 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6283 (linux_target_ops): Install arch_setup.
6284 * server.c (start_inferior): Call the_target->arch_setup.
6285 * target.h (struct target_ops) <arch_setup>: New field.
6286 (target_arch_setup): New marco.
6287 * lynx-low.c (lynx_target_ops): Update.
6288 * nto-low.c (nto_target_ops): Update.
6289 * spu-low.c (spu_target_ops): Update.
6290 * win32-low.c (win32_target_ops): Update.
6291
6292 2015-07-24 Yao Qi <yao.qi@linaro.org>
6293
6294 * linux-low.c (linux_add_process): Don't set
6295 proc->priv->new_inferior.
6296 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6297 (linux_attach): Likewise.
6298
6299 2015-07-24 Yao Qi <yao.qi@linaro.org>
6300
6301 * server.c (start_inferior): Code refactor.
6302
6303 2015-07-24 Yao Qi <yao.qi@linaro.org>
6304
6305 * server.c (process_serial_event): Set general_thread.
6306
6307 2015-07-21 Yao Qi <yao.qi@linaro.org>
6308
6309 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6310 aarch64_linux_get_debug_reg_capacity.
6311
6312 2015-07-17 Yao Qi <yao.qi@linaro.org>
6313
6314 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6315 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6316 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6317 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6318 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6319 (AARCH64_HWP_ALIGNMENT): Likewise.
6320 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6321 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6322 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6323 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6324 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6325 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6326 (struct aarch64_debug_reg_state): Likewise.
6327 (struct arch_lwp_info): Likewise.
6328 (aarch64_align_watchpoint): Likewise.
6329 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6330 (aarch64_watchpoint_length): Likewise.
6331 (aarch64_point_encode_ctrl_reg): Likewise
6332 (aarch64_point_is_aligned): Likewise.
6333 (aarch64_align_watchpoint): Likewise.
6334 (aarch64_linux_set_debug_regs):
6335 (aarch64_dr_state_insert_one_point): Likewise.
6336 (aarch64_dr_state_remove_one_point): Likewise.
6337 (aarch64_handle_breakpoint): Likewise.
6338 (aarch64_handle_aligned_watchpoint): Likewise.
6339 (aarch64_handle_unaligned_watchpoint): Likewise.
6340 (aarch64_handle_watchpoint): Likewise.
6341
6342 2015-07-17 Yao Qi <yao.qi@linaro.org>
6343
6344 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6345 and don't aarch64_get_debug_reg_state. All callers update.
6346 (aarch64_handle_aligned_watchpoint): Likewise.
6347 (aarch64_handle_unaligned_watchpoint): Likewise.
6348 (aarch64_handle_watchpoint): Likewise.
6349 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6350 (aarch64_remove_point): Likewise.
6351
6352 2015-07-17 Yao Qi <yao.qi@linaro.org>
6353
6354 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6355 debug_printf.
6356 (aarch64_handle_unaligned_watchpoint): Likewise.
6357
6358 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6359
6360 Revert the previous 3 commits:
6361 Move gdb_regex* to common/
6362 Move linux_find_memory_regions_full & co.
6363 gdbserver build-id attribute generator
6364
6365 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6366 Jan Kratochvil <jan.kratochvil@redhat.com>
6367
6368 gdbserver build-id attribute generator.
6369 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6370 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6371 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6372 (find_phdr): New.
6373 (get_dynamic): Use find_pdhr to traverse program headers.
6374 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6375 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6376 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6377 (get_hex_build_id): New.
6378 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6379 to reply XML document.
6380
6381 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6382 Jan Kratochvil <jan.kratochvil@redhat.com>
6383
6384 * target.c: Include target/target-utils.h and fcntl.h.
6385 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6386 (target_fileio_read_stralloc): New functions.
6387
6388 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6389
6390 * Makefile.in (OBS): Add gdb_regex.o.
6391 (gdb_regex.o): New.
6392 * config.in: Rebuilt.
6393 * configure: Rebuilt.
6394
6395 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6396 Jan Kratochvil <jan.kratochvil@redhat.com>
6397
6398 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6399 * Makefile.in (OBS): Add target-utils.o.
6400 (linux-maps.o, target-utils.o): New.
6401 * configure.srv (srv_linux_obj): Add linux-maps.o.
6402
6403 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6404
6405 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6406 function, return 1.
6407 (the_low_target): Install it.
6408
6409 2015-07-14 Pedro Alves <palves@redhat.com>
6410
6411 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6412 Instead, ignore ECHILD, and throw an error for other errnos.
6413
6414 2015-07-10 Pedro Alves <palves@redhat.com>
6415
6416 * event-loop.c (struct callback_event) <data>: Change type to
6417 gdb_client_data instance instead of gdb_client_data pointer.
6418 (append_callback_event): Adjust.
6419
6420 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6421
6422 * linux-aarch64-low.c: Add comments for each linux_target_ops
6423 method. Remove comments already covered in target_ops and
6424 linux_target_ops definitions.
6425 (the_low_target): Add comments for each unimplemented method.
6426
6427 2015-07-09 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-aarch64-low.c (aarch64_regmap): Remove.
6430 (aarch64_usrregs_info): Remove.
6431 (regs_info): Set field usrregs to NULL.
6432
6433 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6434
6435 * linux-low.c: Include "rsp-low.h"
6436 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6437 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6438 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6439 (handle_btrace_enable_pt): New.
6440 (handle_btrace_general_set): Support "pt".
6441 (handle_btrace_conf_general_set): Support "pt:size".
6442
6443 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6444
6445 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6446 Z_PACKET_SW_BP.
6447
6448 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6449
6450 * linux-aarch64-low.c: Remove comment about endianness.
6451 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6452 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6453 memcmp.
6454
6455 2015-06-24 Gary Benson <gbenson@redhat.com>
6456
6457 * linux-i386-ipa.c (stdint.h): Do not include.
6458 * lynx-i386-low.c (stdint.h): Likewise.
6459 * lynx-ppc-low.c (stdint.h): Likewise.
6460 * mem-break.c (stdint.h): Likewise.
6461 * thread-db.c (stdint.h): Likewise.
6462 * tracepoint.c (stdint.h): Likewise.
6463 * win32-low.c (stdint.h): Likewise.
6464
6465 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6466
6467 * server.c (write_qxfer_response): Update call to
6468 remote_escape_output.
6469
6470 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6471 Jan Kratochvil <jan.kratochvil@redhat.com>
6472
6473 Merge multiple hex conversions.
6474 * gdbreplay.c (tohex): Rename to 'fromhex'.
6475 (logchar): Use fromhex.
6476
6477 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6478
6479 * server.c (handle_qxfer_libraries): Set `version' attribute for
6480 <library-list>.
6481
6482 2015-06-10 Gary Benson <gbenson@redhat.com>
6483
6484 * target.h (struct target_ops) <multifs_open>: New field.
6485 <multifs_unlink>: Likewise.
6486 <multifs_readlink>: Likewise.
6487 * linux-low.c (nat/linux-namespaces.h): New include.
6488 (linux_target_ops): Initialize the_target->multifs_open,
6489 the_target->multifs_unlink and the_target->multifs_readlink.
6490 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6491 * hostio.c (hostio_fs_pid): New static variable.
6492 (hostio_handle_new_gdb_connection): New function.
6493 (handle_setfs): Likewise.
6494 (handle_open): Use the_target->multifs_open as appropriate.
6495 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6496 (handle_readlink): Use the_target->multifs_readlink as
6497 appropriate.
6498 (handle_vFile): Handle vFile:setfs packets.
6499 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6500 after target_handle_new_gdb_connection.
6501
6502 2015-06-10 Gary Benson <gbenson@redhat.com>
6503
6504 * configure.ac (AC_CHECK_FUNCS): Add setns.
6505 * config.in: Regenerate.
6506 * configure: Likewise.
6507 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6508 (linux-namespaces.o): New rule.
6509 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6510
6511 2015-06-09 Gary Benson <gbenson@redhat.com>
6512
6513 * hostio.c (handle_open): Process mode argument with
6514 fileio_to_host_mode.
6515
6516 2015-06-01 Yao Qi <yao.qi@linaro.org>
6517
6518 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6519 * linux-x86-low.c: Likewise.
6520
6521 2015-05-28 Don Breazeal <donb@codesourcery.com>
6522
6523 * linux-low.c (handle_extended_wait): Initialize
6524 thread_info.last_resume_kind for new fork children.
6525
6526 2015-05-15 Pedro Alves <palves@redhat.com>
6527
6528 * target.h (target_handle_new_gdb_connection): Rewrite using if
6529 wrapped in do/while.
6530
6531 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6532
6533 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6534 * configure, config.in: Regenerate.
6535 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6536 Declare typedef.
6537
6538 2015-05-12 Don Breazeal <donb@codesourcery.com>
6539
6540 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6541 PTRACE_EVENT_VFORK_DONE.
6542 (linux_low_ptrace_options, extended_event_reported): Add vfork
6543 events.
6544 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6545 and "vforkdone" for RSP 'T' Stop Reply Packet.
6546 * server.h (report_vfork_events): Declare
6547 global variable.
6548
6549 2015-05-12 Don Breazeal <donb@codesourcery.com>
6550
6551 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6552 (the_low_target) <new_fork>: Initialize new member.
6553 * linux-arm-low.c (arm_new_fork): New function.
6554 (the_low_target) <new_fork>: Initialize new member.
6555 * linux-low.c (handle_extended_wait): Call new target function
6556 new_fork.
6557 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6558 * linux-mips-low.c (mips_add_watchpoint): New function
6559 extracted from mips_insert_point.
6560 (the_low_target) <new_fork>: Initialize new member.
6561 (mips_linux_new_fork): New function.
6562 (mips_insert_point): Call mips_add_watchpoint.
6563 * linux-x86-low.c (x86_linux_new_fork): New function.
6564 (the_low_target) <new_fork>: Initialize new member.
6565
6566 2015-05-12 Don Breazeal <donb@codesourcery.com>
6567
6568 * linux-low.c (handle_extended_wait): Implement return value,
6569 rename argument 'event_child' to 'event_lwp', handle
6570 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6571 (linux_low_ptrace_options): New function.
6572 (linux_low_filter_event): Call linux_low_ptrace_options,
6573 use different argument fo linux_enable_event_reporting,
6574 use return value from handle_extended_wait.
6575 (extended_event_reported): New function.
6576 (linux_wait_1): Call extended_event_reported and set
6577 status to report fork events.
6578 (linux_write_memory): Add pid to debug message.
6579 (reset_lwp_ptrace_options_callback): New function.
6580 (linux_handle_new_gdb_connection): New function.
6581 (linux_target_ops): Initialize new structure member.
6582 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6583 * lynx-low.c: Initialize new structure member.
6584 * remote-utils.c (prepare_resume_reply): Implement stop reason
6585 "fork" for "T" stop message.
6586 * server.c (handle_query): Call handle_new_gdb_connection.
6587 * server.h (report_fork_events): Declare global flag.
6588 * target.h (struct target_ops) <handle_new_gdb_connection>:
6589 New member.
6590 (target_handle_new_gdb_connection): New macro.
6591 * win32-low.c: Initialize new structure member.
6592
6593 2015-05-12 Don Breazeal <donb@codesourcery.com>
6594
6595 * mem-break.c (APPEND_TO_LIST): Define macro.
6596 (clone_agent_expr): New function.
6597 (clone_one_breakpoint): New function.
6598 (clone_all_breakpoints): New function.
6599 * mem-break.h: Declare new functions.
6600
6601 2015-05-12 Don Breazeal <donb@codesourcery.com>
6602
6603 * linux-low.c (linux_supports_fork_events): New function.
6604 (linux_supports_vfork_events): New function.
6605 (linux_target_ops): Initialize new structure members.
6606 (initialize_low): Call linux_check_ptrace_features.
6607 * lynx-low.c (lynx_target_ops): Initialize new structure
6608 members.
6609 * server.c (report_fork_events, report_vfork_events):
6610 New global flags.
6611 (handle_query): Add new features to qSupported packet and
6612 response.
6613 (captured_main): Initialize new global variables.
6614 * target.h (struct target_ops) <supports_fork_events>:
6615 New member.
6616 <supports_vfork_events>: New member.
6617 (target_supports_fork_events): New macro.
6618 (target_supports_vfork_events): New macro.
6619 * win32-low.c (win32_target_ops): Initialize new structure
6620 members.
6621
6622 2015-05-12 Gary Benson <gbenson@redhat.com>
6623
6624 * server.c (handle_qxfer_exec_file): Use current process
6625 if annex is empty.
6626
6627 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6628
6629 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6630 Remove HAVE_PTRACE_GETREGS conditionals.
6631 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6632 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6633
6634 2015-05-08 Yao Qi <yao.qi@linaro.org>
6635
6636 * linux-low.c (linux_supports_conditional_breakpoints): New
6637 function.
6638 (linux_target_ops): Install new target method.
6639 * lynx-low.c (lynx_target_ops): Install NULL hook for
6640 supports_conditional_breakpoints.
6641 * nto-low.c (nto_target_ops): Likewise.
6642 * spu-low.c (spu_target_ops): Likewise.
6643 * win32-low.c (win32_target_ops): Likewise.
6644 * server.c (handle_query): Check
6645 target_supports_conditional_breakpoints.
6646 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6647 New field.
6648 (target_supports_conditional_breakpoints): New macro.
6649
6650 2015-05-06 Pedro Alves <palves@redhat.com>
6651
6652 PR server/18081
6653 * server.c (start_inferior): If the process exits, mourn it.
6654
6655 2015-04-21 Gary Benson <gbenson@redhat.com>
6656
6657 * hostio.c (fileio_open_flags_to_host): Factored out to
6658 fileio_to_host_openflags in common/fileio.c. Single use
6659 updated.
6660
6661 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6662
6663 * linux-xtensa-low.c (xtensa_fill_gregset)
6664 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6665 XCHAL_HAVE_LOOP.
6666
6667 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6668
6669 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6670 (regs_info): Replace usrregs pointer with NULL.
6671
6672 2015-04-17 Gary Benson <gbenson@redhat.com>
6673
6674 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6675 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6676 * server.c (handle_qxfer_exec_file): New function.
6677 (qxfer_packets): Add exec-file entry.
6678 (handle_query): Report qXfer:exec-file:read as supported packet.
6679
6680 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6681
6682 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6683
6684 2015-04-09 Gary Benson <gbenson@redhat.com>
6685
6686 * hostio-errno.c (errno_to_fileio_error): Remove function.
6687 Update caller to use remote_fileio_to_fio_error.
6688
6689 2015-04-09 Yao Qi <yao.qi@linaro.org>
6690
6691 * linux-low.c (linux_insert_point): Call
6692 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6693 (linux_remove_point): Call remove_memory_breakpoint if type is
6694 raw_bkpt_type_sw.
6695 * linux-x86-low.c (x86_insert_point): Don't call
6696 insert_memory_breakpoint.
6697 (x86_remove_point): Don't call remove_memory_breakpoint.
6698
6699 2015-04-01 Pedro Alves <palves@redhat.com>
6700 Cleber Rosa <crosa@redhat.com>
6701
6702 * server.c (gdbserver_usage): Reorganize and extend the usage
6703 message.
6704
6705 2015-03-24 Pedro Alves <palves@redhat.com>
6706
6707 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6708 output. Also dump TRAP_TRACE.
6709 (linux_low_filter_event): In debug output, distinguish a
6710 resume_stop SIGSTOP from a delayed SIGSTOP.
6711
6712 2015-03-24 Gary Benson <gbenson@redhat.com>
6713
6714 * linux-x86-low.c (x86_linux_new_thread): Moved to
6715 nat/x86-linux.c.
6716 (x86_linux_prepare_to_resume): Likewise.
6717
6718 2015-03-24 Gary Benson <gbenson@redhat.com>
6719
6720 * Makefile.in (x86-linux-dregs.o): New rule.
6721 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6722 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6723 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6724 (x86_linux_dr_get): Likewise.
6725 (x86_linux_dr_set): Likewise.
6726 (update_debug_registers_callback): Likewise.
6727 (x86_linux_dr_set_addr): Likewise.
6728 (x86_linux_dr_get_addr): Likewise.
6729 (x86_linux_dr_set_control): Likewise.
6730 (x86_linux_dr_get_control): Likewise.
6731 (x86_linux_dr_get_status): Likewise.
6732 (x86_linux_update_debug_registers): Likewise.
6733
6734 2015-03-24 Gary Benson <gbenson@redhat.com>
6735
6736 * linux-x86-low.c (x86_linux_update_debug_registers):
6737 New function, factored out from...
6738 (x86_linux_prepare_to_resume): ...this.
6739
6740 2015-03-24 Gary Benson <gbenson@redhat.com>
6741
6742 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6743 (x86_linux_dr_set): Likewise.
6744 (update_debug_registers_callback): Likewise.
6745 (x86_linux_dr_set_addr): Likewise.
6746 (x86_linux_dr_get_addr): Likewise.
6747 (x86_linux_dr_set_control): Likewise.
6748 (x86_linux_dr_get_control): Likewise.
6749 (x86_linux_dr_get_status): Likewise.
6750 (x86_linux_prepare_to_resume): Likewise.
6751
6752 2015-03-24 Gary Benson <gbenson@redhat.com>
6753
6754 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6755 Use perror_with_name. Pass string through gettext.
6756 (x86_linux_dr_set): Likewise.
6757
6758 2015-03-24 Gary Benson <gbenson@redhat.com>
6759
6760 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6761 (x86_linux_dr_set_addr): ...this.
6762 (x86_dr_low_get_addr): Rename to...
6763 (x86_linux_dr_get_addr): ...this.
6764 (x86_dr_low_set_control): Rename to...
6765 (x86_linux_dr_set_control): ...this.
6766 (x86_dr_low_get_control): Rename to...
6767 (x86_linux_dr_get_control): ...this.
6768 (x86_dr_low_get_status): Rename to...
6769 (x86_linux_dr_get_status): ...this.
6770 (x86_dr_low): Update with new function names.
6771
6772 2015-03-24 Gary Benson <gbenson@redhat.com>
6773
6774 * Makefile.in (x86-linux.o): New rule.
6775 * configure.srv: Add x86-linux.o to relevant targets.
6776 * linux-low.c (lwp_set_arch_private_info): New function.
6777 (lwp_arch_private_info): Likewise.
6778 * linux-x86-low.c: Include nat/x86-linux.h.
6779 (arch_lwp_info): Removed structure.
6780 (update_debug_registers_callback):
6781 Use lwp_set_debug_registers_changed.
6782 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6783 and lwp_set_debug_registers_changed.
6784 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6785
6786 2015-03-24 Gary Benson <gbenson@redhat.com>
6787
6788 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6789 * linux-arm-low.c (arm_new_thread): Likewise.
6790 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6791 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6792 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6793 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6794
6795 2015-03-24 Gary Benson <gbenson@redhat.com>
6796
6797 * linux-low.c (ptid_of_lwp): New function.
6798 (lwp_is_stopped): Likewise.
6799 (lwp_stop_reason): Likewise.
6800 * linux-x86-low.c (update_debug_registers_callback):
6801 Use lwp_is_stopped.
6802 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6803 lwp_stop_reason.
6804
6805 2015-03-24 Gary Benson <gbenson@redhat.com>
6806
6807 * linux-low.h (linux_stop_lwp): Remove declaration.
6808
6809 2015-03-24 Gary Benson <gbenson@redhat.com>
6810
6811 * linux-low.h: Include nat/linux-nat.h.
6812 * linux-low.c (iterate_over_lwps_args): New structure.
6813 (iterate_over_lwps_filter): New function.
6814 (iterate_over_lwps): Likewise.
6815 * linux-x86-low.c (update_debug_registers_callback):
6816 Update signature to what iterate_over_lwps expects.
6817 Remove PID check that iterate_over_lwps now performs.
6818 (x86_dr_low_set_addr): Use iterate_over_lwps.
6819 (x86_dr_low_set_control): Likewise.
6820
6821 2015-03-24 Gary Benson <gbenson@redhat.com>
6822
6823 * linux-x86-low.c (x86_debug_reg_state): New function.
6824 (x86_linux_prepare_to_resume): Use the above.
6825
6826 2015-03-24 Gary Benson <gbenson@redhat.com>
6827
6828 * linux-low.c (current_lwp_ptid): New function.
6829 * linux-x86-low.c: Include nat/linux-nat.h.
6830 (x86_dr_low_get_addr): Use current_lwp_ptid.
6831 (x86_dr_low_get_control): Likewise.
6832 (x86_dr_low_get_status): Likewise.
6833
6834 2015-03-20 Pedro Alves <palves@redhat.com>
6835
6836 * tracepoint.c (cmd_qtstatus): Make "str" const.
6837
6838 2015-03-20 Pedro Alves <palves@redhat.com>
6839
6840 * server.c (handle_general_set): Make "req_str" const.
6841
6842 2015-03-19 Pedro Alves <palves@redhat.com>
6843
6844 * linux-low.c (linux_resume_one_lwp): Rename to ...
6845 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6846 instead call perror_with_name.
6847 (check_ptrace_stopped_lwp_gone): New function.
6848 (linux_resume_one_lwp): Reimplement as wrapper around
6849 linux_resume_one_lwp_throw that swallows errors if the LWP is
6850 gone.
6851
6852 2015-03-19 Pedro Alves <palves@redhat.com>
6853
6854 * linux-low.c (count_events_callback, select_event_lwp_callback):
6855 No longer check whether the thread has resume_stop as last resume
6856 kind.
6857
6858 2015-03-19 Pedro Alves <palves@redhat.com>
6859
6860 * linux-low.c (count_events_callback, select_event_lwp_callback):
6861 Use the lwp's status_pending_p field, not the thread's.
6862
6863 2015-03-19 Pedro Alves <palves@redhat.com>
6864
6865 * linux-low.c (select_event_lwp_callback): Update comments to
6866 no longer mention SIGTRAP.
6867
6868 2015-03-18 Gary Benson <gbenson@redhat.com>
6869
6870 * server.c (handle_query): Do not report vFile:fstat as supported.
6871
6872 2015-03-11 Gary Benson <gbenson@redhat.com>
6873
6874 * hostio.c (sys/types.h): New include.
6875 (sys/stat.h): Likewise.
6876 (common-remote-fileio.h): Likewise.
6877 (handle_fstat): New function.
6878 (handle_vFile): Handle vFile:fstat packets.
6879
6880 2015-03-11 Gary Benson <gbenson@redhat.com>
6881
6882 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6883 struct stat.st_blocks and struct stat.st_blksize.
6884 * configure: Regenerate.
6885 * config.in: Likewise.
6886 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6887 (OBS): Add common-remote-fileio.o.
6888 (common-remote-fileio.o): New rule.
6889
6890 2015-03-09 Pedro Alves <palves@redhat.com>
6891
6892 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6893 'struct sockaddr' pointer in 'accept' call.
6894
6895 2015-03-09 Pedro Alves <palves@redhat.com>
6896
6897 Revert:
6898 2015-03-07 Pedro Alves <palves@redhat.com>
6899 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6900 or <winsock2.h> here. Instead include "gdb_socket.h".
6901 (remote_open): Use union gdb_sockaddr_u.
6902 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6903 or <winsock2.h> here. Instead include "gdb_socket.h".
6904 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6905 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6906 or <sys/un.h>.
6907 (init_named_socket, gdb_agent_helper_thread): Use union
6908 gdb_sockaddr_u.
6909
6910 2015-03-07 Pedro Alves <palves@redhat.com>
6911
6912 * configure.ac (build_warnings): Move
6913 -Wdeclaration-after-statement to the C-specific set.
6914 * configure: Regenerate.
6915
6916 2015-03-07 Pedro Alves <palves@redhat.com>
6917
6918 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6919 or <winsock2.h> here. Instead include "gdb_socket.h".
6920 (remote_open): Use union gdb_sockaddr_u.
6921 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6922 or <winsock2.h> here. Instead include "gdb_socket.h".
6923 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6924 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6925 or <sys/un.h>.
6926 (init_named_socket, gdb_agent_helper_thread): Use union
6927 gdb_sockaddr_u.
6928
6929 2015-03-07 Pedro Alves <palves@redhat.com>
6930
6931 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6932 instead.
6933
6934 2015-03-06 Yao Qi <yao.qi@linaro.org>
6935
6936 * linux-aarch64-low.c (aarch64_insert_point): Use
6937 show_debug_regs as a boolean.
6938 (aarch64_remove_point): Likewise.
6939
6940 2015-03-05 Pedro Alves <palves@redhat.com>
6941
6942 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6943 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6944 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6945 * nto-low.c (nto_target_ops): Likewise.
6946 * spu-low.c (spu_target_ops): Likewise.
6947 * win32-low.c (win32_target_ops): Likewise.
6948
6949 2015-03-04 Pedro Alves <palves@redhat.com>
6950
6951 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6952 Decide whether a breakpoint triggered based on the SIGTRAP's
6953 siginfo.si_code.
6954 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6955 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6956 (linux_low_filter_event): Check for breakpoints before checking
6957 watchpoints.
6958 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6959 siginfo.si_code.
6960 (linux_stopped_by_sw_breakpoint)
6961 (linux_supports_stopped_by_sw_breakpoint)
6962 (linux_stopped_by_hw_breakpoint)
6963 (linux_supports_stopped_by_hw_breakpoint): New functions.
6964 (linux_target_ops): Install new target methods.
6965
6966 2015-03-04 Pedro Alves <palves@redhat.com>
6967
6968 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6969 * server.c (swbreak_feature, hwbreak_feature): New globals.
6970 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6971 (captured_main): Clear swbreak_feature and hwbreak_feature.
6972 * server.h (swbreak_feature, hwbreak_feature): Declare.
6973 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6974 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6975 supports_stopped_by_hw_breakpoint>: New fields.
6976 (target_supports_stopped_by_sw_breakpoint)
6977 (target_stopped_by_sw_breakpoint)
6978 (target_supports_stopped_by_hw_breakpoint)
6979 (target_stopped_by_hw_breakpoint): Declare.
6980
6981 2015-03-04 Pedro Alves <palves@redhat.com>
6982
6983 enum lwp_stop_reason -> enum target_stop_reason
6984 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6985 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6986 (linux_wait_1, stuck_in_jump_pad_callback)
6987 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6988 (linux_stopped_by_watchpoint):
6989 * linux-low.h (enum lwp_stop_reason): Delete.
6990 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6991 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6992
6993 2015-03-04 Yao Qi <yao.qi@linaro.org>
6994
6995 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6996
6997 2015-03-03 Gary Benson <gbenson@redhat.com>
6998
6999 * hostio.c (handle_vFile): Fix prefix lengths.
7000
7001 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7002
7003 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7004 ptr_bits.
7005
7006 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7007
7008 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7009 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7010 (clean): Add "rm -f" for above C files.
7011 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7012 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7013 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7014 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7015 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7016 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7017 (init_registers_s390x_vx_linux64)
7018 (init_registers_s390x_tevx_linux64)
7019 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7020 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7021 declarations.
7022 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7023 (s390_store_vxrs_high): New functions.
7024 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7025 NT_S390_VXRS_HIGH.
7026 (s390_arch_setup): Add logic for selecting one of the new target
7027 descriptions. Activate the new vector regsets if applicable.
7028 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7029 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7030 and init_registers_s390x_tevx_linux64.
7031
7032 2015-03-01 Pedro Alves <palves@redhat.com>
7033
7034 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7035 parameter.
7036
7037 2015-02-27 Pedro Alves <palves@redhat.com>
7038
7039 * linux-x86-low.c (u_debugreg_offset): New function.
7040 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7041
7042 2015-02-27 Pedro Alves <palves@redhat.com>
7043
7044 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7045 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7046 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7047 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7048 (ps_lsetfpregs, ps_getpid)
7049 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7050 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7051 (ps_lsetxregs, ps_plog): Declare.
7052
7053 2015-02-27 Pedro Alves <palves@redhat.com>
7054
7055 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7056 IP_AGENT_EXPORT_FUNC.
7057 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7058 IP_AGENT_EXPORT_FUNC.
7059 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7060 (IP_AGENT_EXPORT): Delete.
7061 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7062 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7063 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7064 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7065 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7066 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7067 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7068 (traceframe_read_count, traceframe_write_count)
7069 (traceframes_created, trace_state_variables, get_raw_reg)
7070 (get_trace_state_variable_value, set_trace_state_variable_value)
7071 (ust_loaded, helper_thread_id, cmd_buf): Use
7072 IPA_SYM_EXPORTED_NAME.
7073 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7074 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7075 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7076 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7077 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7078 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7079 EXTERN_C_PUSH/EXTERN_C_POP.
7080 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7081 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7082 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7083 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7084 (traceframe_write_count, traceframe_read_count)
7085 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7086 (about_to_request_buffer_space, get_trace_state_variable_value)
7087 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7088 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7089 EXTERN_C_PUSH/EXTERN_C_POP.
7090 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7091 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7092 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7093 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7094 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7095 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7096 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7097 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7098 Define.
7099 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7100 (IP_AGENT_EXPORT_VAR_DECL): Define.
7101 (tracing): Declare.
7102 (gdb_agent_get_raw_reg): Declare.
7103
7104 2015-02-27 Tom Tromey <tromey@redhat.com>
7105 Pedro Alves <palves@redhat.com>
7106
7107 Rename symbols whose names are reserved C++ keywords throughout.
7108
7109 2015-02-27 Pedro Alves <palves@redhat.com>
7110
7111 * Makefile.in (COMPILER): New, get it from autoconf.
7112 (CXX): Get from autoconf instead.
7113 (COMPILE.pre): Use COMPILER.
7114 (CC-LD): Rename to ...
7115 (CC_LD): ... this. Use COMPILER.
7116 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7117 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7118 * acinclude.m4: Include build-with-cxx.m4.
7119 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7120 Disable -Werror by default if building in C++ mode.
7121 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7122 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7123 the C++ compiler. Save/restore CXXFLAGS too.
7124 * configure: Regenerate.
7125
7126 2015-02-27 Pedro Alves <palves@redhat.com>
7127
7128 * acinclude.m4: Include libiberty.m4.
7129 * configure.ac: Call libiberty_INIT.
7130 * config.in, configure: Regenerate.
7131
7132 2015-02-26 Pedro Alves <palves@redhat.com>
7133
7134 * linux-low.c (linux_wait_1): When incrementing the PC past a
7135 program breakpoint always use the_low_target.breakpoint_len as
7136 increment, rather than the maximum between that and
7137 the_low_target.decr_pc_after_break.
7138
7139 2015-02-23 Pedro Alves <palves@redhat.com>
7140
7141 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7142 thread was doing a step-over; always adjust the PC if
7143 we stepped over a permanent breakpoint.
7144 (linux_wait_1): If we stepped over breakpoint that was on top of a
7145 permanent breakpoint, manually advance the PC past it.
7146
7147 2015-02-23 Pedro Alves <palves@redhat.com>
7148
7149 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7150 modes.
7151 (x86_fill_gregset, x86_store_gregset): Use it when handling
7152 $orig_eax.
7153
7154 2015-02-20 Pedro Alves <palves@redhat.com>
7155
7156 * thread-db.c: Include "nat/linux-procfs.h".
7157 (thread_db_init): Skip listing new threads if the kernel supports
7158 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7159
7160 2015-02-20 Pedro Alves <palves@redhat.com>
7161
7162 * linux-low.c (status_pending_p_callback): Use ptid_match.
7163
7164 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7165
7166 PR breakpoints/16812
7167 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7168 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7169 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7170
7171 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7172
7173 PR breakpoints/15956
7174 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7175
7176 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7177
7178 * linux-low.c (linux_low_btrace_conf): Print size.
7179 * server.c (handle_btrace_conf_general_set): New.
7180 (hanle_general_set): Call handle_btrace_conf_general_set.
7181 (handle_query): Report Qbtrace-conf:bts:size as supported.
7182
7183 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7184
7185 * linux-low.c (linux_low_enable_btrace): Update parameters.
7186 (linux_low_btrace_conf): New.
7187 (linux_target_ops)<to_btrace_conf>: Initialize.
7188 * server.c (current_btrace_conf): New.
7189 (handle_btrace_enable): Rename to ...
7190 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7191 to target_enable_btrace. Update comment. Update users.
7192 (handle_qxfer_btrace_conf): New.
7193 (qxfer_packets): Add btrace-conf entry.
7194 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7195 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7196 (target_ops)<read_btrace_conf>: New.
7197 (target_enable_btrace): Update parameters.
7198 (target_read_btrace_conf): New.
7199
7200 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7201
7202 * server.c (handle_btrace_general_set): Remove call to
7203 target_supports_btrace.
7204 (supported_btrace_packets): New.
7205 (handle_query): Call supported_btrace_packets.
7206 * target.h: include btrace-common.h.
7207 (btrace_target_info): Removed.
7208 (supports_btrace, target_supports_btrace): Update parameters.
7209
7210 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7211
7212 * Makefile.in (SFILES): Add common/btrace-common.c.
7213 (OBS): Add common/btrace-common.o.
7214 (btrace-common.o): Add build rules.
7215 * linux-low: Include btrace-common.h.
7216 (linux_low_read_btrace): Use struct btrace_data. Call
7217 btrace_data_init and btrace_data_fini.
7218
7219 2015-02-06 Pedro Alves <palves@redhat.com>
7220
7221 * thread-db.c (find_new_threads_callback): Add debug output.
7222
7223 2015-02-04 Pedro Alves <palves@redhat.com>
7224
7225 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7226 (resume_stopped_resumed_lwps): New function.
7227 (linux_wait_for_event_filtered): Use it.
7228
7229 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7230
7231 * Makefile.in (SFILES): Add linux-personality.c.
7232 (linux-personality.o): New rule.
7233 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7234 list of objects to be built.
7235 * linux-low.c: Include nat/linux-personality.h.
7236 (linux_create_inferior): Remove code to disable address space
7237 randomization (moved to ../nat/linux-personality.c). Create
7238 cleanup to disable address space randomization.
7239
7240 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7241
7242 * Makefile.in (posix-strerror.o): New rule.
7243 (mingw-strerror.o): Likewise.
7244 * configure: Regenerated.
7245 * configure.ac: Source file ../common/common.host. Initialize new
7246 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7247
7248 2015-01-14 Yao Qi <yao@codesourcery.com>
7249
7250 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7251 (ppc-linux.o): New rule.
7252 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7253 * configure.ac: AC_CHECK_FUNCS(getauxval).
7254 * config.in: Re-generated.
7255 * configure: Re-generated.
7256 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7257 ppc64_64bit_inferior_p
7258
7259 2015-01-14 Yao Qi <yao@codesourcery.com>
7260
7261 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7262 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7263 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7264 (PT_ORIG_R3, PT_TRAP): Likewise.
7265 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7266 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7267 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7268
7269 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7270
7271 * i387-fp.c (i387_cache_to_xsave): In look over
7272 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7273 zmmh_low_space field by use of zmmh_high_space.
7274
7275 2015-01-09 Pedro Alves <palves@redhat.com>
7276
7277 * linux-low.c (step_over_bkpt): Move higher up in the file.
7278 (handle_extended_wait): Don't store the stop_pc here.
7279 (get_stop_pc): Adjust comments and rename to ...
7280 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7281 stopped for a software breakpoint or hardware breakpoint.
7282 (thread_still_has_status_pending_p): New function.
7283 (status_pending_p_callback): Use
7284 thread_still_has_status_pending_p. If the event is no longer
7285 interesting, resume the LWP.
7286 (handle_tracepoints): Add assert.
7287 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7288 (wstatus_maybe_breakpoint): New function.
7289 (cancel_breakpoint): Delete function.
7290 (check_stopped_by_watchpoint): New function, factored out from
7291 linux_low_filter_event.
7292 (lp_status_maybe_breakpoint): Delete function.
7293 (linux_low_filter_event): Remove filter_ptid argument.
7294 Leave thread group exits pending here. Store the LWP's stop PC.
7295 Always leave events pending.
7296 (linux_wait_for_event_filtered): Pull all events out of the
7297 kernel, and leave them all pending.
7298 (count_events_callback, select_event_lwp_callback): Consider all
7299 events.
7300 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7301 (select_event_lwp): Only give preference to the stepping LWP in
7302 all-stop mode. Adjust comments.
7303 (ignore_event): New function.
7304 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7305 references to cancel_breakpoints. Adjust to renames. Also give
7306 equal priority to all LWPs that have had events in non-stop mode.
7307 If reporting a software breakpoint event, unadjust the LWP's PC.
7308 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7309 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7310 Adjust.
7311 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7312 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7313 (linux_stopped_by_watchpoint): Adjust.
7314 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7315 * linux-low.h (enum lwp_stop_reason): New.
7316 (struct lwp_info) <stop_pc>: Adjust comment.
7317 <stopped_by_watchpoint>: Delete field.
7318 <stop_reason>: New field.
7319 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7320 * mem-break.c (software_breakpoint_inserted_here)
7321 (hardware_breakpoint_inserted_here): New function.
7322 * mem-break.h (software_breakpoint_inserted_here)
7323 (hardware_breakpoint_inserted_here): Declare.
7324 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7325 (cancel_breakpoints): Delete.
7326 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7327 (upload_fast_traceframes): Remove references to
7328 cancel_breakpoints.
7329
7330 2015-01-09 Pedro Alves <palves@redhat.com>
7331
7332 * thread-db.c (find_new_threads_callback): Ignore thread if the
7333 kernel thread ID is -1.
7334
7335 2015-01-09 Pedro Alves <palves@redhat.com>
7336
7337 * linux-low.c (linux_attach_fail_reason_string): Move to
7338 nat/linux-ptrace.c, and rename.
7339 (linux_attach_lwp): Update comment.
7340 (attach_proc_task_lwp_callback): New function.
7341 (linux_attach): Adjust to rename and use
7342 linux_proc_attach_tgid_threads.
7343 (linux_attach_fail_reason_string): Delete declaration.
7344
7345 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7346
7347 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7348 * server.c (gdbserver_version): Likewise.
7349
7350 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7351
7352 * remote-utils.c: Include ctype.h.
7353 (input_interrupt): Explicitly handle the case when the char
7354 received is the NUL byte. Improve the printing of non-ASCII
7355 characters.
7356
7357 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7358
7359 * linux-low.c (linux_low_filter_event): Update call to
7360 linux_enable_event_reporting following the addition of
7361 a new parameter to that function.
7362
7363 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7364
7365 PR server/17457
7366 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7367 (AARCH64_FPCR_REGNO): Likewise.
7368 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7369 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7370 (aarch64_store_fpregset): Likewise.
7371
7372 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7373
7374 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7375 Remove FIXME comment about assumption about N.
7376
7377 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7378
7379 * configure.ac: If large-file support is disabled in GDBserver,
7380 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7381 * configure: Regenerate.
7382
7383 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7384
7385 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7386 warning upon ENODATA from ptrace.
7387 * linux-s390-low.c (s390_store_tdb): New.
7388 (s390_regsets): Add regset for NT_S390_TDB.
7389
7390 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7391
7392 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7393 without a fill_function.
7394 * linux-s390-low.c (s390_fill_last_break): Remove.
7395 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7396 (s390_arch_setup): Use regset's size instead of fill_function for
7397 loop end condition.
7398
7399 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7400
7401 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7402 the regset's store function when ptrace returned an error.
7403 * regcache.c (get_thread_regcache): Invalidate register cache
7404 before fetching inferior's registers.
7405
7406 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7407
7408 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7409 while-loop as for-loop.
7410 (regsets_store_inferior_registers): Likewise.
7411
7412 2014-11-28 Yao Qi <yao@codesourcery.com>
7413
7414 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7415 * config.in, configure: Re-generate.
7416 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7417 is defined.
7418
7419 2014-11-21 Yao Qi <yao@codesourcery.com>
7420
7421 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7422 (AC_CHECK_HEADERS): Remove malloc.h.
7423 * configure: Re-generated.
7424 * config.in: Re-generated.
7425 * server.h: Don't include alloca.h and malloc.h.
7426 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7427 Don't include malloc.h.
7428
7429 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7430
7431 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7432 corresponding ERRNO check in same block.
7433
7434 2014-11-12 Pedro Alves <palves@redhat.com>
7435
7436 * server.c (cont_thread): Update comment.
7437 (start_inferior, attach_inferior): No longer clear cont_thread.
7438 (handle_v_cont): No longer set cont_thread.
7439 (captured_main): Clear cont_thread each time a GDB connects.
7440
7441 2014-11-12 Pedro Alves <palves@redhat.com>
7442
7443 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7444 thread, and don't resume all threads if the Hc thread has exited.
7445
7446 2014-11-12 Pedro Alves <palves@redhat.com>
7447
7448 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7449 the process group instead of to a specific LWP.
7450
7451 2014-10-15 Pedro Alves <palves@redhat.com>
7452
7453 PR server/17487
7454 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7455 parameter.
7456 (arm_set_thread_context): Delete.
7457 (the_low_target): Adjust.
7458 * win32-i386-low.c (debug_registers_changed)
7459 (debug_registers_used): Delete.
7460 (update_debug_registers_callback): New function.
7461 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7462 needing to update their debug registers.
7463 (win32_get_current_dr): New function.
7464 (x86_dr_low_get_addr, x86_dr_low_get_control)
7465 (x86_dr_low_get_status): Fetch the debug register from the thread
7466 record's context.
7467 (i386_initial_stuff): Adjust.
7468 (i386_get_thread_context): Remove current_event parameter. Don't
7469 clear debug_registers_changed nor copy DR values to
7470 debug_reg_state.
7471 (i386_set_thread_context): Delete.
7472 (i386_prepare_to_resume): New function.
7473 (i386_thread_added): Mark the thread as needing to update irs
7474 debug registers.
7475 (the_low_target): Remove i386_set_thread_context and install
7476 i386_prepare_to_resume.
7477 * win32-low.c (win32_get_thread_context): Adjust.
7478 (win32_set_thread_context): Use SetThreadContext
7479 directly.
7480 (win32_prepare_to_resume): New function.
7481 (win32_require_context): New function, factored out from ...
7482 (thread_rec): ... this.
7483 (continue_one_thread): Call win32_prepare_to_resume on each thread
7484 we're about to continue.
7485 (win32_resume): Call win32_prepare_to_resume on the event thread.
7486 * win32-low.h (struct win32_thread_info)
7487 <debug_registers_changed>: New field.
7488 (struct win32_target_ops): Change prototype of set_thread_context,
7489 delete set_thread_context and add prepare_to_resume.
7490 (win32_require_context): New declaration.
7491
7492 2014-10-08 Gary Benson <gbenson@redhat.com>
7493
7494 * server.h: Do not include common-exceptions.h.
7495
7496 2014-10-08 Gary Benson <gbenson@redhat.com>
7497
7498 * server.h: Do not include cleanups.h.
7499
7500 2014-09-30 James Hogan <james.hogan@imgtec.com>
7501
7502 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7503 mips64-dsp-linux.c.
7504
7505 2014-09-23 Yao Qi <yao@codesourcery.com>
7506
7507 * linux-low.c (lp_status_maybe_breakpoint): New function.
7508 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7509 (count_events_callback): Likewise.
7510 (select_event_lwp_callback): Likewise.
7511 (cancel_breakpoints_callback): Likewise.
7512
7513 2014-09-19 Don Breazeal <donb@codesourcery.com>
7514
7515 * linux-low.c (handle_extended_wait): Call
7516 linux_ptrace_get_extended_event.
7517 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7518 linux_is_extended_waitstatus.
7519
7520 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7521
7522 * Makefile.in (CPPFLAGS): Define.
7523 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7524 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7525
7526 2014-09-16 Gary Benson <gbenson@redhat.com>
7527
7528 * inferiors.h (current_inferior): Renamed as...
7529 (current_thread): New variable. All uses updated.
7530 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7531 (maybe_move_out_of_jump_pad): Likewise.
7532 (cancel_breakpoint): Likewise.
7533 (linux_low_filter_event): Likewise.
7534 (wait_for_sigstop): Likewise.
7535 (linux_resume_one_lwp): Likewise.
7536 (need_step_over_p): Likewise.
7537 (start_step_over): Likewise.
7538 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7539 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7540 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7541 and save_inferior as saved_thread.
7542 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7543 saved_thread.
7544 (regcache_invalidate_thread): Likewise.
7545 * remote-utils.c (prepare_resume_reply): Likewise.
7546 * thread-db.c (thread_db_get_tls_address): Likewise.
7547 (disable_thread_event_reporting): Likewise.
7548 (remove_thread_event_breakpoints): Likewise.
7549 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7550 as saved_thread.
7551 * target.h (set_desired_inferior): Renamed as...
7552 (set_desired_thread): New declaration. All uses updated.
7553 * server.c (myresume): Updated comment to reference thread instead
7554 of inferior.
7555 (handle_serial_event): Likewise.
7556 (handle_target_event): Likewise.
7557
7558 2014-09-12 Tom Tromey <tromey@redhat.com>
7559 Gary Benson <gbenson@redhat.com>
7560
7561 * regcache.h: Include common-regcache.h.
7562 (regcache_read_pc): Don't declare.
7563 * regcache.c (get_thread_regcache_for_ptid): New function.
7564
7565 2014-09-11 Tom Tromey <tromey@redhat.com>
7566 Gary Benson <gbenson@redhat.com>
7567
7568 * symbol.c: New file.
7569 * Makefile.in (SFILES): Add symbol.c.
7570 (OBS): Add symbol.o.
7571
7572 2014-09-11 Gary Benson <gbenson@redhat.com>
7573
7574 * target.c (target_stop_ptid, target_continue_ptid): New
7575 functions.
7576
7577 2014-09-11 Tom Tromey <tromey@redhat.com>
7578 Gary Benson <gbenson@redhat.com>
7579
7580 * target.h: Include target/target.h.
7581 * target.c (target_read_memory, target_read_uint32)
7582 (target_write_memory): New functions.
7583
7584 2014-09-11 Gary Benson <gbenson@redhat.com>
7585
7586 * server.h (debug_hw_points): Don't declare.
7587 * server.c (debug_hw_points): Don't define. Replace all uses
7588 with show_debug_regs.
7589 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7590 all uses with show_debug_regs.
7591
7592 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7593
7594 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7595 endianness into account.
7596 (ppc_supply_ptrace_register): Likewise.
7597
7598 2014-09-03 James Hogan <james.hogan@imgtec.com>
7599
7600 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7601 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7602
7603 2014-09-03 Gary Benson <gbenson@redhat.com>
7604
7605 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7606 ALL_DEBUG_ADDRESS_REGISTERS.
7607
7608 2014-09-02 Gary Benson <gbenson@redhat.com>
7609
7610 * i386-low.h: Renamed as...
7611 * x86-low.h: New file. All type, function and variable name
7612 prefixes changed from "i386_" to "x86_". All references updated.
7613 * i386-low.c: Renamed as...
7614 * x86-low.c: New file. All type, function and variable name
7615 prefixes changed from "i386_" to "x86_". All references updated.
7616
7617 2014-09-02 Gary Benson <gbenson@redhat.com>
7618
7619 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7620 (x86_linux_new_thread): Likewise.
7621
7622 2014-08-29 Gary Benson <gbenson@redhat.com>
7623
7624 * server.h (setjmp.h): Do not include.
7625 (toplevel): Do not declare.
7626 (common-exceptions.h): Include.
7627 (cleanups.h): Likewise.
7628 * server.c (toplevel): Do not define.
7629 (exit_code): New static global.
7630 (detach_or_kill_for_exit_cleanup): New function.
7631 (main): New function. Original main renamed to...
7632 (captured_main): New function.
7633 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7634
7635 2014-08-29 Gary Benson <gbenson@redhat.com>
7636
7637 * Makefile.in (SFILES): Add common/common-exceptions.c.
7638 (OBS): Add common-exceptions.o.
7639 (common-exceptions.o): New rule.
7640 * utils.c (prepare_to_throw_exception): New function.
7641
7642 2014-08-29 Gary Benson <gbenson@redhat.com>
7643
7644 * config.in: Regenerate.
7645 * configure: Likewise.
7646
7647 2014-08-29 Gary Benson <gbenson@redhat.com>
7648
7649 * Makefile.in (SFILES): Add common/cleanups.c.
7650 (OBS): cleanups.o.
7651 (cleanups.o): New rule.
7652
7653 2014-08-29 Gary Benson <gbenson@redhat.com>
7654
7655 * utils.c (internal_vwarning): New function.
7656
7657 2014-08-28 Gary Benson <gbenson@redhat.com>
7658
7659 * utils.h (fatal): Remove declaration.
7660 * utils.c (fatal): Remove function.
7661
7662 2014-08-28 Gary Benson <gbenson@redhat.com>
7663
7664 * tracepoint.c (gdb_agent_init): Replace fatal with
7665 perror_with_name.
7666 (initialize_tracepoint): Likewise.
7667
7668 2014-08-28 Gary Benson <gbenson@redhat.com>
7669
7670 * remote-utils.c (remote_prepare): Replace fatal with error.
7671
7672 2014-08-28 Gary Benson <gbenson@redhat.com>
7673
7674 * linux-low.c (linux_async): Replace fatal with warning.
7675 Tidy up and return.
7676 (linux_start_non_stop): Return -1 if linux_async failed.
7677
7678 2014-08-28 Gary Benson <gbenson@redhat.com>
7679
7680 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7681 gdb_assert.
7682 (i386_dr_low_get_addr): Remove vague comment.
7683 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7684 gdb_assert.
7685
7686 2014-08-28 Gary Benson <gbenson@redhat.com>
7687
7688 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7689 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7690 internal_error.
7691 (linux_resume_one_lwp): Likewise.
7692 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7693 gdb_assert.
7694 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7695 with internal_error.
7696 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7697 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7698 (find_register_by_name): Replace fatal with internal_error.
7699 (find_regno): Likewise.
7700 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7701 * thread-db.c (thread_db_create_event): Likewise.
7702 (thread_db_load_search): Likewise.
7703 (try_thread_db_load_1): Likewise.
7704 * tracepoint.c (get_jump_space_head): Replace fatal with
7705 internal_error.
7706 (claim_trampoline_space): Likewise.
7707 (have_fast_tracepoint_trampoline_buffer): Likewise.
7708 (cmd_qtstart): Likewise.
7709 (stop_tracing): Likewise.
7710 (fast_tracepoint_collecting): Likewise.
7711 (target_malloc): Likewise.
7712 (download_tracepoint): Likewise.
7713 (download_trace_state_variables): Replace check with gdb_assert.
7714 (upload_fast_traceframes): Replace fatal with internal_error.
7715
7716 2014-08-19 Tom Tromey <tromey@redhat.com>
7717 Gary Benson <gbenson@redhat.com>
7718
7719 * Makefile.in (SFILES): Add common/common-debug.c.
7720 (OBS): Add common-debug.o.
7721 (common-debug.o): New rule.
7722 * debug.h (debug_printf): Don't declare.
7723 * debug.c (debug_printf): Renamed and rewritten as...
7724 (debug_vprintf): New function.
7725
7726 2014-08-19 Gary Benson <gbenson@redhat.com>
7727
7728 * utils.h: Do not include print-utils.h.
7729
7730 2014-08-19 Tom Tromey <tromey@redhat.com>
7731 Gary Benson <gbenson@redhat.com>
7732
7733 * server.h: Add static assertion.
7734 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7735
7736 2014-08-19 Tom Tromey <tromey@redhat.com>
7737 Gary Benson <gbenson@redhat.com>
7738
7739 * Makefile.in (SFILES): Add common/errors.c.
7740 (OBS): Add errors.o.
7741 (IPA_OBS): Add errors-ipa.o.
7742 (errors.o): New rule.
7743 (errors-ipa.o): Likewise.
7744 * utils.h (perror_with_name, error, warning): Don't declare.
7745 * utils.c (warning): Renamed and rewritten as...
7746 (vwarning): New function.
7747 (error): Renamed and rewritten as...
7748 (verror): New function.
7749 (internal_error): Renamed and rewritten as...
7750 (internal_verror): New function.
7751
7752 2014-08-07 Gary Benson <gbenson@redhat.com>
7753
7754 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7755 * configure: Regenerate.
7756 * config.in: Likewise.
7757 * server.h: Do not include errno.h.
7758 * event-loop.c: Likewise.
7759 * hostio-errno.c: Likewise.
7760 * linux-low.c: Likewise.
7761 * remote-utils.c: Likewise.
7762 * spu-low.c: Likewise.
7763 * utils.c: Likewise.
7764 * gdbreplay.c: Unconditionally include errno.h.
7765
7766 2014-08-07 Gary Benson <gbenson@redhat.com>
7767
7768 * server.h: Do not include string.h.
7769 * event-loop.c: Likewise.
7770 * linux-low.c: Likewise.
7771 * regcache.c: Likewise.
7772 * remote-utils.c: Likewise.
7773 * spu-low.c: Likewise.
7774 * utils.c: Likewise.
7775
7776 2014-08-07 Gary Benson <gbenson@redhat.com>
7777
7778 * server.h: Do not include gdb_assert.h.
7779
7780 2014-08-07 Gary Benson <gbenson@redhat.com>
7781
7782 * server.h: Do not include common-utils.h.
7783
7784 2014-08-07 Gary Benson <gbenson@redhat.com>
7785
7786 * server.h: Do not include ptid.h.
7787 * notif.h: Likewise.
7788
7789 2014-08-07 Gary Benson <gbenson@redhat.com>
7790
7791 * server.h: Do not include gdb_locale.h.
7792
7793 2014-08-07 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h: Do not include gdb/signals.h.
7796 * win32-low.c: Likewise.
7797
7798 2014-08-07 Gary Benson <gbenson@redhat.com>
7799
7800 * server.h: Do not include pathmax.h.
7801
7802 2014-08-07 Gary Benson <gbenson@redhat.com>
7803
7804 * server.h: Do not include libiberty.h.
7805 * linux-bfin-low.c: Likewise.
7806
7807 2014-08-07 Gary Benson <gbenson@redhat.com>
7808
7809 * server.h: Do not include ansidecl.h.
7810
7811 2014-08-07 Gary Benson <gbenson@redhat.com>
7812
7813 * linux-x86-low.c: Do not include stddef.h.
7814 * lynx-ppc-low.c: Likewise.
7815 * tracepoint.c: Likewise.
7816
7817 2014-08-07 Gary Benson <gbenson@redhat.com>
7818
7819 * server.h: Do not include stdarg.h.
7820 * nto-low.c: Likewise.
7821
7822 2014-08-07 Gary Benson <gbenson@redhat.com>
7823
7824 * server.h: Do not include stdlib.h.
7825 * inferiors.c: Likewise.
7826 * linux-low.c: Likewise.
7827 * regcache.c: Likewise.
7828 * spu-low.c: Likewise.
7829 * tracepoint.c: Likewise.
7830 * utils.c: Likewise.
7831
7832 2014-08-07 Gary Benson <gbenson@redhat.com>
7833
7834 * server.h: Do not include stdio.h.
7835 * linux-low.c: Likewise.
7836 * remote-utils.c: Likewise.
7837 * spu-low.c: Likewise.
7838 * utils.c: Likewise.
7839 * wincecompat.c: Likewise.
7840
7841 2014-08-06 Gary Benson <gbenson@redhat.com>
7842
7843 * regcache.c (init_register_cache): Move conditionals inside if.
7844
7845 2014-08-06 Gary Benson <gbenson@redhat.com>
7846
7847 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7848
7849 2014-07-31 Gary Benson <gbenson@redhat.com>
7850
7851 * ax.h: Do not include server.h.
7852 * gdbthread.h: Likewise.
7853 * lynx-low.h: Likewise.
7854 * notif.h: Likewise.
7855
7856 2014-07-30 Gary Benson <gbenson@redhat.com>
7857
7858 * server.h: Include common-defs.h.
7859 Do not include config.h or build-gnulib-gdbserver/config.h.
7860
7861 2014-07-30 Gary Benson <gbenson@redhat.com>
7862
7863 * hostio-errno.c: Move server.h to top of includes list.
7864 * inferiors.c: Likewise.
7865 * linux-x86-low.c: Likewise.
7866 * notif.c: Include server.h.
7867
7868 2014-07-24 Tom Tromey <tromey@redhat.com>
7869 Gary Benson <gbenson@redhat.com>
7870
7871 * server.h (CORE_ADDR): Now unsigned.
7872
7873 2014-07-16 Pedro Alves <palves@redhat.com>
7874
7875 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7876
7877 2014-07-15 Pedro Alves <palves@redhat.com>
7878
7879 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7880 copy.
7881
7882 2014-07-11 Pedro Alves <palves@redhat.com>
7883
7884 * linux-low.c (kill_wait_lwp): New function, based on
7885 kill_one_lwp_callback, but use my_waitpid directly.
7886 (kill_one_lwp_callback, linux_kill): Use it.
7887
7888 2014-06-23 Pedro Alves <palves@redhat.com>
7889
7890 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7891 before setting DR0..DR3.
7892
7893 2014-06-20 Gary Benson <gbenson@redhat.com>
7894
7895 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7896 * configure: Regenerated.
7897 * config.in: Likewise.
7898
7899 2014-06-20 Gary Benson <gbenson@redhat.com>
7900
7901 * Makefile.in (SFILES): Update locations for files moved
7902 from common to nat.
7903 (object file files): Reordered.
7904
7905 2014-06-20 Gary Benson <gbenson@redhat.com>
7906
7907 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7908 (i386_dr_low_set_addr): Likewise.
7909 (i386_dr_low_get_addr): Likewise.
7910 (i386_dr_low_can_set_control): Likewise.
7911 (i386_dr_low_set_control): Likewise.
7912 (i386_dr_low_get_control): Likewise.
7913 (i386_dr_low_get_status): Likewise.
7914 (i386_get_debug_register_length): Likewise.
7915 * linux-x86-low.c (i386_dr_low_set_addr):
7916 Changed signature. Made static.
7917 (i386_dr_low_get_addr): Likewise.
7918 (i386_dr_low_set_control): Likewise.
7919 (i386_dr_low_get_control): Likewise.
7920 (i386_dr_low_get_status): Likewise.
7921 (i386_dr_low): New global variable.
7922 * win32-i386-low.c (i386_dr_low_set_addr):
7923 Changed signature. Made static.
7924 (i386_dr_low_get_addr): Likewise.
7925 (i386_dr_low_set_control): Likewise.
7926 (i386_dr_low_get_control): Likewise.
7927 (i386_dr_low_get_status): Likewise.
7928 (i386_dr_low): New global variable.
7929
7930 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7931
7932 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7933 * Makefile.in (AR, AR_FLAGS): Define.
7934 * configure: Regenerate.
7935
7936 2014-06-19 Gary Benson <gbenson@redhat.com>
7937
7938 * Makefile.in (i386-dregs.o): New rule.
7939 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7940 * i386-low.c (target.h): Remove include.
7941 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7942 (DR_CONTROL_SHIFT): Likewise.
7943 (DR_CONTROL_SIZE): Likewise.
7944 (DR_RW_EXECUTE): Likewise.
7945 (DR_RW_WRITE): Likewise.
7946 (DR_RW_READ): Likewise.
7947 (DR_RW_IORW): Likewise.
7948 (DR_LEN_1): Likewise.
7949 (DR_LEN_2): Likewise.
7950 (DR_LEN_4): Likewise.
7951 (DR_LEN_8): Likewise.
7952 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7953 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7954 (DR_ENABLE_SIZE): Likewise.
7955 (DR_LOCAL_SLOWDOWN): Likewise.
7956 (DR_GLOBAL_SLOWDOWN): Likewise.
7957 (DR_CONTROL_RESERVED): Likewise.
7958 (I386_DR_CONTROL_MASK): Likewise.
7959 (I386_DR_VACANT): Likewise.
7960 (I386_DR_LOCAL_ENABLE): Likewise.
7961 (I386_DR_GLOBAL_ENABLE): Likewise.
7962 (I386_DR_DISABLE): Likewise.
7963 (I386_DR_SET_RW_LEN): Likewise.
7964 (I386_DR_GET_RW_LEN): Likewise.
7965 (I386_DR_WATCH_HIT): Likewise.
7966 (i386_wp_op_t): Likewise.
7967 (i386_show_dr): Likewise.
7968 (i386_length_and_rw_bits): Likewise.
7969 (i386_insert_aligned_watchpoint): Likewise.
7970 (i386_remove_aligned_watchpoint): Likewise.
7971 (i386_handle_nonaligned_watchpoint): Likewise.
7972 i386_update_inferior_debug_regs(): Likewise.
7973 (i386_dr_insert_watchpoint): Likewise.
7974 (i386_dr_remove_watchpoint): Likewise.
7975 (i386_dr_region_ok_for_watchpoint): Likewise.
7976 (i386_dr_stopped_data_address): Likewise.
7977 (i386_dr_stopped_by_watchpoint): Likewise.
7978
7979 2014-06-19 Gary Benson <gbenson@redhat.com>
7980
7981 * i386-low.c (i386_dr_show): Renamed to
7982 i386_show_dr and made static. All uses updated.
7983 (i386_dr_length_and_rw_bits): Renamed to
7984 i386_length_and_rw_bits and made static.
7985 All uses updated.
7986 (i386_dr_insert_aligned_watchpoint): Renamed to
7987 i386_insert_aligned_watchpoint and made static.
7988 All uses updated.
7989 (i386_dr_remove_aligned_watchpoint): Renamed to
7990 i386_remove_aligned_watchpoint and made static.
7991 All uses updated.
7992 (i386_dr_update_inferior_debug_regs): Renamed to
7993 i386_update_inferior_debug_regs and made static.
7994 All uses updated.
7995
7996 2014-06-18 Gary Benson <gbenson@redhat.com>
7997
7998 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7999 (i386_dr_low_can_set_control): Likewise.
8000 (i386_get_debug_register_length): Likewise.
8001 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8002 (i386_dr_low_can_set_control): Likewise.
8003 (i386_get_debug_register_length): Likewise.
8004
8005 2014-06-17 Gary Benson <gbenson@redhat.com>
8006
8007 * i386-low.h (i386-dregs.h): New include.
8008 (DR_FIRSTADDR): Now in i386-dregs.h.
8009 (DR_LASTADDR): Likewise.
8010 (DR_NADDR): Likewise.
8011 (DR_STATUS): Likewise.
8012 (DR_CONTROL): Likewise.
8013 (i386_debug_reg_state): Likewise.
8014 (i386_dr_insert_watchpoint): Likewise.
8015 (i386_dr_remove_watchpoint): Likewise.
8016 (i386_dr_region_ok_for_watchpoint): Likewise.
8017 (i386_dr_stopped_data_address): Likewise.
8018 (i386_dr_stopped_by_watchpoint): Likewise.
8019 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8020
8021 2014-06-18 Gary Benson <gbenson@redhat.com>
8022
8023 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8024 i386_dr_insert_watchpoint.
8025 (i386_low_remove_watchpoint): Renamed to
8026 i386_dr_remove_watchpoint.
8027 (i386_low_region_ok_for_watchpoint): Renamed to
8028 i386_dr_region_ok_for_watchpoint.
8029 (i386_low_stopped_data_address): Renamed to
8030 i386_dr_stopped_data_address.
8031 (i386_low_stopped_by_watchpoint): Renamed to
8032 i386_dr_stopped_by_watchpoint.
8033 * i386-low.c (i386_show_dr): Renamed to
8034 i386_dr_show and made nonstatic. All uses updated.
8035 (i386_length_and_rw_bits): Renamed to
8036 i386_dr_length_and_rw_bits and made nonstatic.
8037 All uses updated.
8038 (i386_insert_aligned_watchpoint): Renamed to
8039 i386_dr_insert_aligned_watchpoint and made nonstatic.
8040 All uses updated.
8041 (i386_remove_aligned_watchpoint): Renamed to
8042 i386_dr_remove_aligned_watchpoint and made nonstatic.
8043 All uses updated.
8044 (i386_update_inferior_debug_regs): Renamed to
8045 i386_dr_update_inferior_debug_regs and made nonstatic.
8046 All uses updated.
8047 (i386_low_insert_watchpoint): Renamed to
8048 i386_dr_insert_watchpoint. All uses updated.
8049 (i386_low_remove_watchpoint): Renamed to
8050 i386_dr_remove_watchpoint. All uses updated.
8051 (i386_low_region_ok_for_watchpoint): Renamed to
8052 i386_dr_region_ok_for_watchpoint. All uses updated.
8053 (i386_low_stopped_data_address): Renamed to
8054 i386_dr_stopped_data_address. All uses updated.
8055 (i386_low_stopped_by_watchpoint): Renamed to
8056 i386_dr_stopped_by_watchpoint. All uses updated.
8057
8058 2014-06-18 Gary Benson <gbenson@redhat.com>
8059
8060 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8061 (i386_dr_low_can_set_control): Likewise.
8062 (i386_insert_aligned_watchpoint): New check.
8063
8064 2014-06-18 Gary Benson <gbenson@redhat.com>
8065
8066 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8067 Renamed to state.
8068
8069 2014-06-18 Gary Benson <gbenson@redhat.com>
8070
8071 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8072 instead of fatal and error.
8073 (i386_handle_nonaligned_watchpoint): Likewise.
8074
8075 2014-06-18 Gary Benson <gbenson@redhat.com>
8076
8077 * i386-low.c (i386_get_debug_register_length): New macro.
8078 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8079 (i386_show_dr): Use debug_printf instead of fprintf. Use
8080 phex to format values.
8081
8082 2014-06-18 Gary Benson <gbenson@redhat.com>
8083
8084 * i386-low.h: Comment changes.
8085 * i386-low.c: Likewise.
8086
8087 2014-06-18 Gary Benson <gbenson@redhat.com>
8088
8089 * i386-low.c: Whitespace changes.
8090
8091 2014-06-12 Tom Tromey <tromey@redhat.com>
8092
8093 * utils.c (freeargv): Remove.
8094
8095 2014-06-12 Tom Tromey <tromey@redhat.com>
8096
8097 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8098 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8099 (parse_debug_format_options): Likewise.
8100 (gdbserver_usage): Likewise.
8101 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8102 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8103 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8104 against libiberty.
8105 ($(LIBGNU)): Depend on libiberty.
8106 (all-lib): Recurse into all subdirs.
8107 (install-only): Invoke "install" target in subdirs.
8108 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8109 targets.
8110 * configure: Rebuild.
8111 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8112 for vasprintf, vsnprintf, or gettimeofday.
8113 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8114 srv_tgtobj.
8115
8116 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8117
8118 * development.sh: Delete.
8119 * Makefile.in (config.status): Adjust dependency on development.sh.
8120 * configure.ac: Adjust development.sh source call.
8121 * configure: Regenerate.
8122
8123 2014-06-02 Pedro Alves <palves@redhat.com>
8124
8125 * ax.c (gdb_free_agent_expr): New function.
8126 * ax.h (gdb_free_agent_expr): New declaration.
8127 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8128 list.
8129 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8130 static.
8131 (clear_breakpoint_conditions_and_commands): New function.
8132 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8133 (clear_breakpoint_conditions_and_commands): New declaration.
8134
8135 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8136
8137 * linux-aarch64-low.c (asm/ptrace.h): Include.
8138
8139 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8140
8141 Fix TLS access for -static -pthread.
8142 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8143 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8144 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8145
8146 2014-05-20 Pedro Alves <palves@redhat.com>
8147
8148 * linux-aarch64-low.c (aarch64_insert_point)
8149 (aarch64_remove_point): No longer check whether the type is
8150 supported here. Adjust to new interface.
8151 (the_low_target): Install aarch64_supports_z_point_type as
8152 supports_z_point_type method.
8153 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8154 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8155 instead of a Z packet char. Adjust.
8156 (arm_supports_z_point_type): New function.
8157 (arm_insert_point, arm_remove_point): Adjust to new interface.
8158 (the_low_target): Install arm_supports_z_point_type.
8159 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8160 (cris_insert_point, cris_remove_point): Adjust to new interface.
8161 Don't check whether the type is supported here.
8162 (the_low_target): Install cris_supports_z_point_type.
8163 * linux-low.c (linux_supports_z_point_type): New function.
8164 (linux_insert_point, linux_remove_point): Adjust to new interface.
8165 * linux-low.h (struct linux_target_ops) <insert_point,
8166 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8167 raw_breakpoint pointer parameter.
8168 <supports_z_point_type>: New method.
8169 * linux-mips-low.c (mips_supports_z_point_type): New function.
8170 (mips_insert_point, mips_remove_point): Adjust to new interface.
8171 Use mips_supports_z_point_type.
8172 (the_low_target): Install mips_supports_z_point_type.
8173 * linux-ppc-low.c (the_low_target): Install NULL as
8174 supports_z_point_type method.
8175 * linux-s390-low.c (the_low_target): Install NULL as
8176 supports_z_point_type method.
8177 * linux-sparc-low.c (the_low_target): Install NULL as
8178 supports_z_point_type method.
8179 * linux-x86-low.c (x86_supports_z_point_type): New function.
8180 (x86_insert_point): Adjust to new insert_point interface. Use
8181 insert_memory_breakpoint. Adjust to new
8182 i386_low_insert_watchpoint interface.
8183 (x86_remove_point): Adjust to remove_point interface. Use
8184 remove_memory_breakpoint. Adjust to new
8185 i386_low_remove_watchpoint interface.
8186 (the_low_target): Install x86_supports_z_point_type.
8187 * lynx-low.c (lynx_target_ops): Install NULL as
8188 supports_z_point_type callback.
8189 * nto-low.c (nto_supports_z_point_type): New.
8190 (nto_insert_point, nto_remove_point): Adjust to new interface.
8191 (nto_target_ops): Install nto_supports_z_point_type.
8192 * mem-break.c: Adjust intro comment.
8193 (struct raw_breakpoint) <raw_type, size>: New fields.
8194 <inserted>: Update comment.
8195 <shlib_disabled>: Delete field.
8196 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8197 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8198 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8199 (raw_bkpt_type_to_target_hw_bp_type): New function.
8200 (find_enabled_raw_code_breakpoint_at): New function.
8201 (find_raw_breakpoint_at): New type and size parameters. Use them.
8202 (insert_memory_breakpoint): New function, based off
8203 set_raw_breakpoint_at.
8204 (remove_memory_breakpoint): New function.
8205 (set_raw_breakpoint_at): Reimplement.
8206 (set_breakpoint): New, based on set_breakpoint_at.
8207 (set_breakpoint_at): Reimplement.
8208 (delete_raw_breakpoint): Go through the_target->remove_point
8209 instead of assuming memory breakpoints.
8210 (find_gdb_breakpoint_at): Delete.
8211 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8212 (find_gdb_breakpoint): New function.
8213 (set_gdb_breakpoint_at): Delete.
8214 (z_type_supported): New function.
8215 (set_gdb_breakpoint_1): New function, loosely based off
8216 set_gdb_breakpoint_at.
8217 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8218 (delete_gdb_breakpoint_at): Delete.
8219 (delete_gdb_breakpoint_1): New function, loosely based off
8220 delete_gdb_breakpoint_at.
8221 (delete_gdb_breakpoint): New function.
8222 (clear_gdb_breakpoint_conditions): Rename to ...
8223 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8224 breakpoint.
8225 (add_condition_to_breakpoint): Make static.
8226 (add_breakpoint_condition): Take a struct breakpoint pointer
8227 instead of an address. Adjust.
8228 (gdb_condition_true_at_breakpoint): Rename to ...
8229 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8230 z_type parameter.
8231 (gdb_condition_true_at_breakpoint): Reimplement.
8232 (add_breakpoint_commands): Take a struct breakpoint pointer
8233 instead of an address. Adjust.
8234 (gdb_no_commands_at_breakpoint): Rename to ...
8235 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8236 parameter. Return true if no breakpoint was found. Change debug
8237 output.
8238 (gdb_no_commands_at_breakpoint): Reimplement.
8239 (run_breakpoint_commands): Rename to ...
8240 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8241 and change return type to boolean.
8242 (run_breakpoint_commands): New function.
8243 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8244 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8245 breakpoint. Go through the_target->remove_point instead of
8246 assuming memory breakpoint.
8247 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8248 software and hardware breakpoints.
8249 (reinsert_raw_breakpoint): Go through the_target->insert_point
8250 instead of assuming memory breakpoint.
8251 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8252 software and hardware breakpoints.
8253 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8254 Check both software and hardware breakpoints.
8255 (validate_inserted_breakpoint): Assert the breakpoint is a
8256 software breakpoint. Set the inserted flag to -1 instead of
8257 setting shlib_disabled.
8258 (delete_disabled_breakpoints): Adjust.
8259 (validate_breakpoints): Only validate software breakpoints.
8260 Adjust to inserted flag change.
8261 (check_mem_read, check_mem_write): Skip breakpoint types other
8262 than software breakpoints. Adjust to inserted flag change.
8263 * mem-break.h (enum raw_bkpt_type): New enum.
8264 (raw_breakpoint, struct process_info): Forward declare.
8265 (Z_packet_to_target_hw_bp_type): Delete declaration.
8266 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8267 (set_gdb_breakpoint, delete_gdb_breakpoint)
8268 (clear_breakpoint_conditions): New declarations.
8269 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8270 (breakpoint_inserted_here): Update comment.
8271 (add_breakpoint_condition, add_breakpoint_commands): Replace
8272 address parameter with a breakpoint pointer parameter.
8273 (gdb_breakpoint_here): Update comment.
8274 (delete_gdb_breakpoint_at): Delete.
8275 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8276 * server.c (process_point_options): Take a struct breakpoint
8277 pointer instead of an address. Adjust.
8278 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8279 delete_gdb_breakpoint.
8280 * spu-low.c (spu_target_ops): Install NULL as
8281 supports_z_point_type method.
8282 * target.h: Include mem-break.h.
8283 (struct target_ops) <prepare_to_access_memory>: Update comment.
8284 <supports_z_point_type>: New field.
8285 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8286 instead of a char. Also take a raw breakpoint pointer.
8287 * win32-arm-low.c (the_low_target): Install NULL as
8288 supports_z_point_type.
8289 * win32-i386-low.c (i386_supports_z_point_type): New function.
8290 (i386_insert_point, i386_remove_point): Adjust to new interface.
8291 (the_low_target): Install i386_supports_z_point_type.
8292 * win32-low.c (win32_supports_z_point_type): New function.
8293 (win32_insert_point, win32_remove_point): Adjust to new interface.
8294 (win32_target_ops): Install win32_supports_z_point_type.
8295 * win32-low.h (struct win32_target_ops):
8296 <supports_z_point_type>: New method.
8297 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8298 instead of a char. Also take a raw breakpoint pointer.
8299
8300 2014-05-20 Pedro Alves <palves@redhat.com>
8301
8302 * mem-break.h: Include break-common.h.
8303 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8304 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8305 (Z_packet_to_target_hw_bp_type): New declaration.
8306 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8307 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8308 (Z_PACKET_ACCESS_WP): Delete macros.
8309 (Z_packet_to_hw_type): Delete function.
8310 * i386-low.h: Don't include break-common.h here.
8311 (Z_packet_to_hw_type): Delete declaration.
8312 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8313 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8314 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8315 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8316 * linux-aarch64-low.c: Don't include break-common.h here.
8317 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8318 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8319 (Z_packet_to_target_hw_bp_type): Delete function.
8320 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8321 function.
8322 (mips_insert_point, mips_remove_point): Use
8323 Z_packet_to_target_hw_bp_type.
8324
8325 2014-05-20 Pedro Alves <palves@redhat.com>
8326
8327 * linux-aarch64-low.c: Include break-common.h.
8328 (enum target_point_type): Delete.
8329 (Z_packet_to_point_type): Rename to ...
8330 (Z_packet_to_target_hw_bp_type): ... this, and return a
8331 target_hw_bp_type instead.
8332 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8333 instead of an enum target_point_type.
8334 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8335 breakpoint type.
8336 (aarch64_dr_state_insert_one_point)
8337 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8338 (aarch64_handle_aligned_watchpoint)
8339 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8340 Take an enum target_hw_bp_type instead of an enum
8341 target_point_type.
8342 (aarch64_supports_z_point_type): New function.
8343 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8344 use Z_packet_to_target_hw_bp_type.
8345
8346 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8347
8348 * configure.ac: Only use -Werror by default when DEVELOPMENT
8349 is true.
8350 * configure: Regenerate.
8351
8352 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8353
8354 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8355 * linux-x86-low.c (X86_64_USER_REGS): New.
8356 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8357
8358 2014-04-28 Yao Qi <yao@codesourcery.com>
8359
8360 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8361 name.
8362
8363 2014-04-25 Pedro Alves <palves@redhat.com>
8364
8365 PR server/16255
8366 * linux-low.c (linux_attach_fail_reason_string): New function.
8367 (linux_attach_lwp): Delete.
8368 (linux_attach_lwp_1): Rename to ...
8369 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8370 argument. Remove "initial" parameter. Return int instead of
8371 void. Don't error or warn here.
8372 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8373 failure to attach to the tgid. Call warning when failing to
8374 attach to an lwp.
8375 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8376 argument. Remove "initial" parameter. Return int instead of
8377 void. Don't error or warn here.
8378 (linux_attach_fail_reason_string): New declaration.
8379 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8380 interface change. Use linux_attach_fail_reason_string.
8381
8382 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8383 Walfred Tedeschi <walfred.tedeschi@intel.com>
8384
8385 * Makefile.in: Added rules to handle new files
8386 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8387 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8388 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8389 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8390 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8391 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8392 x32-avx512-linux.o.
8393 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8394 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8395 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8396 i386/x32-avx512.xml.
8397 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8398 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8399 i386/x32-avx512-linux.xml.
8400 * i387-fp.c (num_avx512_k_registers): New constant for number
8401 of K registers.
8402 (num_avx512_zmmh_low_registers): New constant for number of
8403 lower ZMM registers (0-15).
8404 (num_avx512_zmmh_high_registers): New constant for number of
8405 higher ZMM registers (16-31).
8406 (num_avx512_ymmh_registers): New contant for number of higher
8407 YMM registers (ymm16-31 added by avx521 on x86_64).
8408 (num_avx512_xmm_registers): New constant for number of higher
8409 XMM registers (xmm16-31 added by AVX512 on x86_64).
8410 (struct i387_xsave): Add space for AVX512 registers.
8411 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8412 Add code to handle AVX512 registers.
8413 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8414 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8415 prototypei from generated file.
8416 (tdesc_amd64_avx512_linux): Likewise.
8417 (init_registers_x32_avx512_linux): Likewise.
8418 (tdesc_x32_avx512_linux): Likewise.
8419 (init_registers_i386_avx512_linux): Likewise.
8420 (tdesc_i386_avx512_linux): Likewise.
8421 (x86_64_regmap): Add AVX512 registers.
8422 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8423 mask.
8424 (initialize_low_arch): Add code to initialize AVX512 registers.
8425
8426 2014-04-23 Pedro Alves <palves@redhat.com>
8427
8428 * mem-break.c (find_gdb_breakpoint_at): Make static.
8429 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8430
8431 2014-04-23 Pedro Alves <palves@redhat.com>
8432
8433 * i386-low.c: Don't include break-common.h here.
8434 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8435 prototype to take target_hw_bp_type as argument instead of a Z
8436 packet char.
8437 * i386-low.h: Include break-common.h here.
8438 (Z_packet_to_hw_type): Declare.
8439 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8440 prototypes.
8441 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8442 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8443 (x86_remove_point): Convert the packet number to a
8444 target_hw_bp_type before calling i386_low_remove_watchpoint.
8445 * win32-i386-low.c (i386_insert_point): Convert the packet number
8446 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8447 (i386_remove_point): Convert the packet number to a
8448 target_hw_bp_type before calling i386_low_remove_watchpoint.
8449
8450 2014-04-23 Pedro Alves <palves@redhat.com>
8451
8452 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8453
8454 2014-04-10 Pedro Alves <palves@redhat.com>
8455
8456 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8457 Check if the condition or command is NULL before checking if the
8458 breakpoint is known. On success, return true.
8459 * mem-break.h (add_breakpoint_condition): Document return.
8460 (add_breakpoint_commands): Add describing comment.
8461 * server.c (skip_to_semicolon): New function.
8462 (process_point_options): Use it.
8463
8464 2014-04-09 Pedro Alves <palves@redhat.com>
8465
8466 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8467 to lwpid_of.
8468
8469 2014-02-27 Pedro Alves <palves@redhat.com>
8470
8471 PR 12702
8472 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8473 macros.
8474 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8475 output.
8476 (last_thread_of_process_p): Take a PID argument instead of a
8477 thread pointer.
8478 (linux_wait_for_lwp): Delete.
8479 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8480 functions.
8481 (linux_low_filter_event): New function, party factored out from
8482 linux_wait_for_event.
8483 (linux_wait_for_event): Rename to ...
8484 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8485 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8486 sigsuspend. Check for zombie leaders.
8487 (linux_wait_for_event): Reimplement as wrapper around
8488 linux_wait_for_event_filtered.
8489 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8490 a normal or signal exit is seen, it's the whole process exiting.
8491 (wait_for_sigstop): No longer a for_each_inferior callback.
8492 Rewrite on top of linux_wait_for_event_filtered.
8493 (stop_all_lwps): Call wait_for_sigstop directly.
8494 * server.c (resume, handle_target_event): Handle
8495 TARGET_WAITKIND_NO_RESUMED.
8496
8497 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8498
8499 * win32-low.c (psapi_get_dll_name,
8500 * win32_CreateToolhelp32Snapshot): Delete.
8501 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8502 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8503 Delete.
8504 (handle_load_dll): Add function description.
8505 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8506
8507 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8508
8509 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8510 Add comment.
8511 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8512 base address when calling win32_add_one_solib.
8513 (handle_load_dll): Delete local variable load_addr.
8514 Remove 0x1000 offset applied to DLL base address when calling
8515 win32_add_one_solib.
8516 (handle_unload_dll): Add comment.
8517
8518 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8519
8520 * win32-low.c (win32_add_all_dlls): Renames
8521 win32_ensure_ntdll_loaded. Rewrite function documentation.
8522 Adjust implementation to always load all DLLs.
8523 Add 0x1000 offset to DLL base address when calling
8524 win32_add_one_solib.
8525 (child_initialization_done): New static global.
8526 (do_initial_child_stuff): Set child_initialization_done to
8527 zero during child initialization, and 1 after. Replace call
8528 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8529 Add comment.
8530 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8531 (handle_unload_dll): Add function documentation.
8532 (get_child_debug_event): Ignore load and unload DLL events
8533 during child initialization.
8534
8535 2014-02-20 Doug Evans <dje@google.com>
8536
8537 Remove global all_lwps.
8538 * inferiors.h (ptid_of): Move here from linux-low.h.
8539 (pid_of, lwpid_of): Ditto.
8540 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8541 parameter is a struct thread_info * now.
8542 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8543 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8544 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8545 directly.
8546 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8547 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8548 * linux-arm-low.c (update_registers_callback): Update, "entry"
8549 parameter is a struct thread_info * now.
8550 Fetch lwpid from current_inferior directly.
8551 (arm_insert_point): Pass &all_threads to find_inferior instead of
8552 &all_lwps.
8553 (arm_remove_point): Ditto.
8554 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8555 (arm_prepare_to_resume): Fetch pid from thread.
8556 (arm_read_description): Fetch lwpid from current_inferior directly.
8557 * linux-low.c (all_lwps): Delete.
8558 (delete_lwp): Delete call to remove_inferior.
8559 (handle_extended_wait): Fetch lwpid from thread.
8560 (add_lwp): Don't set lwp->entry.id. Remove call to
8561 add_inferior_to_list.
8562 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8563 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8564 (kill_one_lwp_callback): Ditto.
8565 (linux_kill): Don't dereference NULL pointer.
8566 Fetch ptid,lwpid from thread.
8567 (get_detach_signal): Fetch ptid from thread.
8568 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8569 Simplify call to regcache_invalidate_thread.
8570 (delete_lwp_callback): Update, "entry" parameter is a
8571 struct thread_info * now. Fetch pid from thread.
8572 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8573 (status_pending_p_callback): Update, "entry" parameter is a
8574 struct thread_info * now. Fetch ptid from thread.
8575 (find_lwp_pid): Update, "entry" parameter is a
8576 struct thread_info * now.
8577 (linux_wait_for_lwp): Fetch pid from thread.
8578 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8579 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8580 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8581 (dequeue_one_deferred_signal): Ditto.
8582 (cancel_breakpoint): Fetch ptid from current_inferior.
8583 (linux_wait_for_event): Pass &all_threads to find_inferior,
8584 not &all_lwps. Fetch ptid, lwpid from thread.
8585 (count_events_callback): Update, "entry" parameter is a
8586 struct thread_info * now.
8587 (select_singlestep_lwp_callback): Ditto.
8588 (select_event_lwp_callback): Ditto.
8589 (cancel_breakpoints_callback): Ditto.
8590 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8591 not &all_lwps.
8592 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8593 (unsuspend_one_lwp): Update, "entry" parameter is a
8594 struct thread_info * now.
8595 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8596 not &all_lwps.
8597 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8598 Fetch lwpid from thread, not lwp.
8599 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8600 Pass &all_threads to find_inferior, not &all_lwps.
8601 (send_sigstop): Fetch lwpid from thread, not lwp.
8602 (send_sigstop_callback): Update, "entry" parameter is a
8603 struct thread_info * now.
8604 (suspend_and_send_sigstop_callback): Ditto.
8605 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8606 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8607 struct thread_info * now.
8608 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8609 from thread, lwp.
8610 (lwp_running): Update, "entry" parameter is a
8611 struct thread_info * now.
8612 (stop_all_lwps): Fetch ptid from thread.
8613 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8614 (linux_resume_one_lwp): Fetch lwpid from thread.
8615 (linux_set_resume_request): Update, "entry" parameter is a
8616 struct thread_info * now. Fetch pid, lwpid from thread.
8617 (resume_status_pending_p): Update, "entry" parameter is a
8618 struct thread_info * now.
8619 (need_step_over_p): Ditto. Fetch lwpid from thread.
8620 (start_step_over): Fetch lwpid from thread.
8621 (linux_resume_one_thread): Update, "entry" parameter is a
8622 struct thread_info * now. Fetch lwpid from thread.
8623 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8624 (proceed_one_lwp): Update, "entry" parameter is a
8625 struct thread_info * now. Fetch lwpid from thread.
8626 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8627 struct thread_info * now.
8628 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8629 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8630 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8631 directly.
8632 (regsets_store_inferior_registers): Ditto.
8633 (fetch_register, store_register): Ditto.
8634 (linux_read_memory, linux_write_memory): Ditto.
8635 (linux_request_interrupt): Ditto.
8636 (linux_read_auxv): Ditto.
8637 (linux_xfer_siginfo): Ditto.
8638 (linux_qxfer_spu): Ditto.
8639 (linux_qxfer_libraries_svr4): Ditto.
8640 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8641 moved to inferiors.h.
8642 (get_lwp): Delete.
8643 (get_thread_lwp): Update.
8644 (struct lwp_info): Delete member "entry". Simplify comment for
8645 member "thread".
8646 (all_lwps): Delete.
8647 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8648 current_inferior directly.
8649 (update_watch_registers_callback): Update, "entry" parameter is a
8650 struct thread_info * now. Fetch pid from thread.
8651 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8652 (mips_insert_point): Fetch lwpid from current_inferior.
8653 Pass &all_threads to find_inferior, not &all_lwps.
8654 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8655 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8656 directly.
8657 (mips_stopped_data_address): Ditto.
8658 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8659 directly.
8660 * linux-tile-low.c (tile_arch_setup): Ditto.
8661 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8662 (update_debug_registers_callback): Update, "entry" parameter is a
8663 struct thread_info * now. Fetch pid from thread.
8664 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8665 Pass &all_threads to find_inferior, not &all_lwps.
8666 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8667 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8668 Pass &all_threads to find_inferior, not &all_lwps.
8669 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8670 (i386_dr_low_get_status): Ditto.
8671 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8672 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8673 (x86_linux_read_description): Ditto.
8674 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8675
8676 2014-02-20 Doug Evans <dje@google.com>
8677
8678 * inferiors.c (get_first_inferior): Fix buglet.
8679
8680 2014-02-19 Doug Evans <dje@google.com>
8681
8682 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8683 * inferiors.c (add_thread): Change result type to struct thread_info *.
8684 All callers updated.
8685 (add_lwp): Call add_thread here instead of in callers.
8686 All callers updated.
8687 * linux-low.h (get_lwp_thread): Rewrite.
8688 (struct lwp_info): New member "thread".
8689
8690 2014-02-19 Doug Evans <dje@google.com>
8691
8692 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8693 All callers updated.
8694
8695 2014-02-19 Doug Evans <dje@google.com>
8696
8697 * inferiors.c (add_thread): Fix whitespace.
8698
8699 2014-02-19 Doug Evans <dje@google.com>
8700
8701 * dll.c (clear_dlls): Replace accessing list implemention details
8702 with API function.
8703 * gdbthread.h (get_first_thread): Declare.
8704 * inferiors.c (for_each_inferior_with_data): New function.
8705 (get_first_thread): New function.
8706 (find_thread_ptid): Simplify.
8707 (get_first_inferior): New function.
8708 (clear_list): Delete.
8709 (one_inferior_p): New function.
8710 (clear_inferior_list): New function.
8711 (clear_inferiors): Update.
8712 * inferiors.h (for_each_inferior_with_data): Declare.
8713 (clear_inferior_list): Declare.
8714 (one_inferior_p): Declare.
8715 (get_first_inferior): Declare.
8716 * linux-low.c (linux_wait_for_event): Replace accessing list
8717 implemention details with API function.
8718 * server.c (target_running): Ditto.
8719 (accumulate_file_name_length): New function.
8720 (emit_dll_description): New function.
8721 (handle_qxfer_libraries): Replace accessing list implemention
8722 details with API function.
8723 (handle_qxfer_threads_worker): New function.
8724 (handle_qxfer_threads_proper): Replace accessing list implemention
8725 details with API function.
8726 (handle_query): Ditto.
8727 (visit_actioned_threads_callback_ftype): New typedef.
8728 (visit_actioned_threads_data): New struct.
8729 (visit_actioned_threads): Rewrite to be find_inferior callback.
8730 (resume): Call find_inferior.
8731 (handle_status): Replace accessing list implemention
8732 details with API function.
8733 (process_serial_event): Replace accessing list implemention details
8734 with API function.
8735 * target.c (set_desired_inferior): Replace accessing list implemention
8736 details with API function.
8737 * tracepoint.c (same_process_p): New function.
8738 (gdb_agent_about_to_close): Replace accessing list implemention
8739 details with API function.
8740 * win32-low.c (child_delete_thread): Replace accessing list
8741 implemention details with API function.
8742 (match_dll_by_basename): New function.
8743 (dll_is_loaded_by_basename): New function.
8744 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8745 details call to dll_is_loaded_by_basename.
8746
8747 2014-02-19 Doug Evans <dje@google.com>
8748
8749 * dll.h (struct dll_info): Add comment.
8750 * gdbthread.h (struct thread_info): Add comment.
8751 (current_ptid): Simplify.
8752 * inferiors.c (add_process): Update.
8753 (remove_process): Update.
8754 * inferiors.h (struct process_info): Rename member "head" to "entry".
8755 * linux-low.c (delete_lwp): Update.
8756 (add_lwp): Update.
8757 (last_thread_of_process_p): Update.
8758 (kill_one_lwp_callback, linux_kill): Update.
8759 (status_pending_p_callback): Update.
8760 (wait_for_sigstop): Update. Simplify read of ptid.
8761 (start_step_over): Update.
8762 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8763 (get_lwp_thread): Update.
8764 (struct lwp_info): Rename member "head" to "entry".
8765 * regcache.h (inferior_list_entry): Delete.
8766 * server.c (kill_inferior_callback): Update.
8767 (detach_or_kill_inferior_callback): Update.
8768 (print_started_pid): Update.
8769 (print_attached_pid): Update.
8770 (process_serial_event): Simplify read of ptid.
8771 * thread-db.c (thread_db_create_event): Update.
8772 (thread_db_get_tls_address): Update.
8773 * win32-low.c (current_inferior_ptid): Simplify.
8774
8775 2014-02-19 Tom Tromey <tromey@redhat.com>
8776
8777 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8778 argument.
8779 (target_supports_btrace): Update.
8780
8781 2014-02-14 Yao Qi <yao@codesourcery.com>
8782
8783 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8784 (rsp-low-ipa.o): New target.
8785
8786 2014-02-12 Tom Tromey <tromey@redhat.com>
8787
8788 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8789 convert_ascii_to_int.
8790 * regcache.c (registers_to_string): Likewise.
8791 * remote-utils.c (decode_M_packet): Likewise.
8792 * server.c (process_serial_event): Likewise.
8793
8794 2014-02-12 Tom Tromey <tromey@redhat.com>
8795
8796 * server.c (handle_query, handle_v_run): Use hex2bin, not
8797 unhexify.
8798 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8799
8800 2014-02-12 Tom Tromey <tromey@redhat.com>
8801
8802 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8803 convert_int_to_ascii.
8804 * regcache.c (registers_to_string, collect_register_as_string):
8805 Likewise.
8806 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8807 Likewise.
8808 * server.c (process_serial_event): Likewise.
8809 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8810 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8811
8812 2014-02-12 Tom Tromey <tromey@redhat.com>
8813
8814 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8815 bin2hex, not hexify.
8816 * tracepoint.c (cmd_qtstatus): Likewise.
8817
8818 2014-02-12 Tom Tromey <tromey@redhat.com>
8819
8820 * remote-utils.c (monitor_output): Pass explicit length to
8821 hexify.
8822
8823 2014-02-12 Tom Tromey <tromey@redhat.com>
8824
8825 * tracepoint.c: Include rsp-low.h.
8826 * server.c: Include rsp-low.h.
8827 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8828 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8829 declare.
8830 * remote-utils.c: Include rsp-low.h.
8831 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8832 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8833 (convert_int_to_ascii, convert_ascii_to_int): Move to
8834 common/rsp-low.c.
8835 * regcache.c: Include rsp-low.h.
8836 * ax.c: Include rsp-low.h.
8837 * Makefile.in (SFILES): Add common/rsp-low.c.
8838 (OBS): Add rsp-low.o.
8839 (rsp-low.o): New target.
8840
8841 2014-02-12 Tom Tromey <tromey@redhat.com>
8842
8843 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8844 Include print-utils.h.
8845 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8846 (plongest, thirty_two, phex_nz): Remove.
8847 * Makefile.in (SFILES): Add common/print-utils.c.
8848 (OBS): Add print-utils.o.
8849 (print-utils-ipa.o): New target.
8850 (print-utils.o): New target.
8851 (IPA_OBJS): Add print-utils-ipa.o.
8852
8853 2014-02-06 Tom Tromey <tromey@redhat.com>
8854
8855 * Makefile.in (SFILES): Fix indentation.
8856
8857 2014-02-05 Doug Evans <dje@google.com>
8858
8859 * linux-low.c (linux_wait_for_event): Improve comment.
8860 (linux_wait_1): Keep current_inferior in sync with event_child.
8861
8862 2014-01-22 Doug Evans <dje@google.com>
8863
8864 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8865
8866 2014-01-22 Doug Evans <dje@google.com>
8867
8868 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8869 * configure: Regenerate.
8870 * config.in: Regenerate.
8871 * Makefile.in (SFILES): Add debug.c.
8872 (OBS): Add debug.o.
8873 * debug.c: New file.
8874 * debug.h: New file.
8875 * linux-aarch64-low.c (*): Update all debugging printfs to use
8876 debug_printf instead of fprintf.
8877 * linux-arm-low.c (*): Ditto.
8878 * linux-cris-low.c (*): Ditto.
8879 * linux-crisv32-low.c (*): Ditto.
8880 * linux-m32r-low.c (*): Ditto.
8881 * linux-sparc-low.c (*): Ditto.
8882 * linux-x86.c (*): Ditto.
8883 * linux-low.c (*): Ditto.
8884 (linux_wait_1): Add calls to debug_enter, debug_exit.
8885 (linux_wait): Remove redundant debugging printf.
8886 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8887 (linux_resume, unstop_all_lwps): Ditto.
8888 * mem-break.c (*): Update all debugging printfs to use
8889 debug_printf instead of fprintf.
8890 * remote-utils.c (*): Ditto.
8891 * thread-db.c (*): Ditto.
8892 * server.c #include <ctype.h>, "gdb_vecs.h".
8893 (debug_threads): Moved to debug.c.
8894 (*): Update all debugging printfs to use debug_printf instead of
8895 fprintf.
8896 (start_inferior): Replace call to fflush with call to debug_flush.
8897 (monitor_show_help): Mention set debug-format.
8898 (parse_debug_format_options): New function.
8899 (handle_monitor_command): Handle "monitor set debug-format".
8900 (gdbserver_usage): Mention --debug-format.
8901 (main): Parse --debug-format.
8902 * server.h (debug_threads): Declaration moved to debug.h.
8903 #include "debug.h".
8904 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8905 trace_debug_1 that uses debug_printf.
8906 (tracepoint_look_up_symbols): Update all debugging printfs to use
8907 debug_printf instead of fprintf.
8908
8909 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8910
8911 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8912 sys/ptrace.h.
8913
8914 2014-01-17 Pedro Alves <palves@redhat.com>
8915
8916 PR build/16445
8917 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8918 defined after including gdb_proc_service.h.
8919
8920 2014-01-16 Doug Evans <dje@google.com>
8921
8922 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8923 (match_dll): Use it.
8924
8925 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8926
8927 * target.h (target_ops) <read_btrace>: Change parameters and
8928 return type to allow error reporting.
8929 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8930 trace reading errors on.
8931 * linux-low.c (linux_low_read_btrace): Pass trace reading
8932 errors on.
8933 (linux_low_disable_btrace): New.
8934
8935 2014-01-15 Doug Evans <dje@google.com>
8936
8937 * inferiors.c (thread_id_to_gdb_id): Delete.
8938 * inferiors.h (thread_id_to_gdb_id): Delete.
8939
8940 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8941
8942 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8943 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8944 versions.
8945
8946 2014-01-08 Pedro Alves <palves@redhat.com>
8947
8948 * server.c (handle_status): Don't discard previous queued stop
8949 replies or thread's pending status here.
8950 (main) <disconnection>: Do it here instead.
8951
8952 2014-01-08 Pedro Alves <palves@redhat.com>
8953
8954 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8955 * server.c (visit_actioned_threads, handle_pending_status): New
8956 function.
8957 (handle_v_cont): Factor out parts to ...
8958 (resume): ... this new function. If in all-stop, and a thread
8959 being resumed has a pending status, report it without actually
8960 resuming.
8961 (myresume): Adjust to use the new 'resume' function.
8962 (clear_pending_status_callback, set_pending_status_callback)
8963 (find_status_pending_thread_callback): New functions.
8964 (handle_status): Handle the case of multiple threads having
8965 interesting statuses to report. Report threads' real last signal
8966 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8967 with an interesting thread to report the status for, instead of
8968 always reporting the status of the first thread.
8969
8970 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8971
8972 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8973 * gdbreplay.c (gdbreplay_version): Likewise.
8974
8975 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8976
8977 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8978 iov.iov_len with the real length in use.
8979
8980 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8981
8982 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8983 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8984 for all targets that use win32-low.c.
8985 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8986 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8987
8988 2013-12-13 Pedro Alves <palves@redhat.com>
8989
8990 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8991 if equal to TARGET_WAITKIND_LOADED.
8992 * win32-low.c (cached_status): New static global.
8993 (win32_wait): Add declaration.
8994 (do_initial_child_stuff): Flush all initial pending debug events
8995 up to the initial breakpoint.
8996 (win32_wait): If CACHED_STATUS was set, return that instead
8997 of doing a real wait. Remove the code resuming the execution
8998 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8999 during the initial phase. Also remove the code changing
9000 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9001 TARGET_WAITKIND_STOPPED.
9002
9003 2013-12-11 Yao Qi <yao@codesourcery.com>
9004
9005 * notif.c (handle_notif_ack): Return 0 if no notification
9006 matches.
9007
9008 2013-11-20 Doug Evans <dje@google.com>
9009
9010 * linux-low.c (linux_set_resume_request): Fix comment.
9011
9012 2013-11-20 Doug Evans <dje@google.com>
9013
9014 * linux-low.c (resume_status_pending_p): Tweak comment.
9015
9016 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9017
9018 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9019 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9020 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9021 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9022 (srv_amd64_regobj): Add amd64-mpx.o.
9023 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9024 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9025 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9026 * i387-fp.c (num_pl_bnd_register) Added constant.
9027 (num_pl_bnd_cfg_registers) Added constant.
9028 (struct i387_xsave) Added reserved area and MPX fields.
9029 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9030 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9031 function.
9032 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9033 (init_registers_amd64_mpx_linux): Declare new function.
9034 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9035 (x86_64_regmap): Add MPX registers.
9036 (x86_linux_read_description): Add MPX case.
9037 (initialize_low_arch): Initialize MPX targets.
9038
9039 2013-11-18 Tom Tromey <tromey@redhat.com>
9040
9041 * configure: Rebuild.
9042 * configure.ac: Don't check for stdlib.h.
9043 * gdbreplay.c: Unconditionally include stdlib.h.
9044
9045 2013-11-18 Tom Tromey <tromey@redhat.com>
9046
9047 * config.in: Rebuild.
9048 * configure: Rebuild.
9049 * configure.ac: Don't use AC_HEADER_DIRENT.
9050
9051 2013-11-18 Tom Tromey <tromey@redhat.com>
9052
9053 * server.h: Don't check HAVE_STRING_H.
9054 * gdbreplay.c: Don't check HAVE_STRING_H.
9055 * configure: Rebuild.
9056
9057 2013-11-18 Tom Tromey <tromey@redhat.com>
9058
9059 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9060 LIBGNU.
9061
9062 2013-11-08 Tom Tromey <tromey@redhat.com>
9063
9064 * configure, config.in: Rebuild.
9065 * configure.ac: Remove unused configury.
9066
9067 2013-11-08 Tom Tromey <tromey@redhat.com>
9068
9069 * acinclude.m4: Include common.m4, codeset.m4.
9070 * configure, config.in: Rebuild.
9071 * configure.ac: Use GDB_AC_COMMON.
9072
9073 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9074
9075 * linux-s390-low.c (HWCAP_S390_TE): New define.
9076 (s390_arch_setup): Consider the TE field in the HWCAP for
9077 determining 'have_regset_tdb'.
9078
9079 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9080
9081 PR gdb/16014
9082 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9083 call to sizeof.
9084
9085 2013-10-02 Pedro Alves <palves@redhat.com>
9086
9087 * server.c (process_serial_event): Don't output "GDBserver
9088 exiting" if GDB is connected through stdio.
9089 * target.c (mywait): Likewise, be silent if GDB is connected
9090 through stdio.
9091
9092 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9093
9094 * lynx-low.c (lynx_add_threads_after_attach): New function.
9095 (lynx_attach): Remove call to add_thread. Add call to
9096 lynx_add_threads_after_attach instead.
9097
9098 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9099
9100 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9101 * config.in, configure: Regenerated.
9102
9103 2013-09-18 Yao Qi <yao@codesourcery.com>
9104
9105 PR server/15959
9106 * server.c (start_inferior): Clear 'resume_info'.
9107
9108 2013-09-16 Jiong Wang <jiwang@tilera.com>
9109
9110 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9111 for each register.
9112
9113 2013-09-16 Jiong Wang <jiwang@tilera.com>
9114
9115 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9116 linux-tile-low.o to srv_tgtobj.
9117
9118 2013-09-16 Will Newton <will.newton@linaro.org>
9119
9120 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9121 out regs.
9122
9123 2013-09-06 Pedro Alves <palves@redhat.com>
9124
9125 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9126 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9127 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9128 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9129 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9130 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9131
9132 2013-09-06 Pedro Alves <palves@redhat.com>
9133
9134 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9135 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9136
9137 2013-09-06 Pedro Alves <palves@redhat.com>
9138
9139 * linux-amd64-ipa.c: Include tracepoint.h.
9140 * linux-i386-ipa.c: Include tracepoint.h.
9141
9142 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9143
9144 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9145 (ps_get_thread_area): New function.
9146
9147 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9148
9149 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9150 (initialize_low_arch): Call init_registers_crisv32 rather than
9151 init_register_crisv32.
9152
9153 2013-09-05 Pedro Alves <palves@redhat.com>
9154
9155 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9156 to ...
9157 * hostio.h: ... this new file.
9158 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9159 win32-low.c: Include hostio.h.
9160
9161 2013-09-05 Pedro Alves <palves@redhat.com>
9162
9163 * server.h (gdb_client_data, handler_func, callback_handler_func)
9164 (delete_file_handler, add_file_handler, append_callback_event)
9165 (delete_callback_event, start_event_loop, initialize_event_loop):
9166 Move to event-loop.h and include it.
9167 * event-loop.h: New file.
9168
9169 2013-09-05 Pedro Alves <palves@redhat.com>
9170
9171 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9172 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9173 (loaded_dll, unloaded_dll): Move to ...
9174 * dll.h: ... this new file.
9175 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9176
9177 2013-09-05 Pedro Alves <palves@redhat.com>
9178
9179 * server.h (current_process, get_thread_process, all_processes)
9180 (add_inferior_to_list, for_each_inferior, current_inferior)
9181 (remove_inferior, add_process, remove_process, find_process_pid)
9182 (have_started_inferiors_p, have_attached_inferiors_p)
9183 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9184 (clear_inferiors, find_inferior, find_inferior_id)
9185 (inferior_target_data, set_inferior_target_data)
9186 (inferior_regcache_data, set_inferior_regcache_data): Move to
9187 inferiors.h, and include it.
9188 * inferiors.h: New file.
9189
9190 2013-09-05 Pedro Alves <palves@redhat.com>
9191
9192 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9193 Move ...
9194 * ax.h: ... here.
9195
9196 2013-09-05 Pedro Alves <palves@redhat.com>
9197
9198 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9199 tracepoint.h.
9200 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9201 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9202 (handle_tracepoint_general_set, handle_tracepoint_query)
9203 (tracepoint_finished_step, tracepoint_was_hit)
9204 (release_while_stepping_state_list, current_traceframe)
9205 (in_readonly_region, traceframe_read_mem)
9206 (fetch_traceframe_registers, traceframe_read_sdata)
9207 (traceframe_read_info, struct fast_tpoint_collect_status)
9208 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9209 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9210 (supply_fast_tracepoint_registers)
9211 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9212 (ipa_tdesc, claim_trampoline_space)
9213 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9214 (agent_mem_read, agent_get_trace_state_variable_value)
9215 (agent_set_trace_state_variable_value, agent_tsv_read)
9216 (agent_mem_read_string, get_raw_reg_func_addr)
9217 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9218 * tracepoint.h: ... this new file.
9219
9220 2013-09-05 Pedro Alves <palves@redhat.com>
9221
9222 * server.h (perror_with_name, error, fatal, warning, paddress)
9223 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9224 include it.
9225 * utils.h: New file.
9226
9227 2013-09-05 Pedro Alves <palves@redhat.com>
9228
9229 * server.h (remote_debug, noack_mode, transport_is_reliable)
9230 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9231 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9232 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9233 (write_enn, initialize_async_io, enable_async_io)
9234 (disable_async_io, check_remote_input_interrupt_request)
9235 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9236 (dead_thread_notify, prepare_resume_reply)
9237 (decode_address_to_semicolon, decode_address, decode_m_packet)
9238 (decode_M_packet, decode_X_packet, decode_xfer_write)
9239 (decode_search_memory_packet, unhexify, hexify)
9240 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9241 (look_up_one_symbol, relocate_instruction)
9242 (monitor_output): Move to remote-utils.h, and include it.
9243 * remote-utils.h: New file.
9244
9245 2013-09-05 Pedro Alves <palves@redhat.com>
9246
9247 * server.h (_): Delete.
9248
9249 2013-09-02 Pedro Alves <palves@redhat.com>
9250
9251 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9252 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9253 allocated.
9254 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9255
9256 2013-09-02 Pierre Muller <muller@sourceware.org>
9257
9258 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9259 or WriteProcessMemory complete successfully and handle
9260 ERROR_PARTIAL_COPY error.
9261
9262 2013-09-02 Pedro Alves <palves@redhat.com>
9263
9264 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9265 error instead of EIO.
9266
9267 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9268
9269 PR server/15604
9270 * linux-low.c: Include filestuff.h.
9271 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9272 * lynx-low.c: Include filestuff.h.
9273 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9274 * server.c: Include filestuff.h.
9275 (main): Call notice_open_fds.
9276 * spu-low.c: Include filestuff.h.
9277 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9278
9279 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9280
9281 * Makefile.in: Explain why ../target and ../nat are not
9282 listed as include file search paths.
9283 (linux-waitpid.o): New object file rule.
9284 * configure.srv (srv_native_linux_obj): New variable.
9285 Replace all occurrences of linux native object files with
9286 $srv_native_linux_obj.
9287 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9288 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9289 (linux_enable_event_reporting): Remove declaration.
9290 (my_waitpid): Moved to common/linux-waitpid.c.
9291 (linux_wait_for_event): Pass ptid when calling
9292 linux_enable_event_reporting.
9293 (linux_supports_tracefork_flag): Remove.
9294 (linux_enable_event_reporting): Likewise.
9295 (linux_tracefork_grandchild): Remove.
9296 (STACK_SIZE): Moved to common/linux-ptrace.c.
9297 (linux_tracefork_child): Remove.
9298 (linux_test_for_tracefork): Remove.
9299 (linux_look_up_symbols): Call linux_supports_traceclone.
9300 (initialize_low): Remove call to linux_test_for_tracefork.
9301 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9302 common/linux-ptrace.h.
9303 (PTRACE_TYPE_ARG4): Likewise.
9304 Include linux-ptrace.h.
9305
9306 2013-08-21 Pedro Alves <palves@redhat.com>
9307
9308 * config.in: Renegerate.
9309
9310 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9311
9312 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9313 (SFILES): Remove $(srcdir)/common/target-common.c and
9314 add $(srcdir)/target/waitstatus.c.
9315 (OBS): Remove target-common.o and add waitstatus.o.
9316 (server_h): Remove $(srcdir)/../common/target-common.h and
9317 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9318 and $(srcdir)/../target/waitstatus.h.
9319 (target-common.o): Remove.
9320 (waitstatus.o): New target object file.
9321 * target.h: Do not include target-common.h and
9322 include target/resume.h, target/wait.h and
9323 target/waitstatus.h.
9324
9325 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9326
9327 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9328 to PTRACE_TYPE_ARG3.
9329 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9330 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9331 PTRACE_TYPE_ARG4.
9332 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9333 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9334
9335 2013-07-27 Jie Zhang <jie@codesourcery.com>
9336 Daniel Jacobowitz <dan@codesourcery.com>
9337 Yao Qi <yao@codesourcery.com>
9338
9339 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9340 (mips-linux-watch.o): New rule.
9341 (mips_linux_watch_h): New variable.
9342 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9343 srv_tgtobj.
9344 * linux-mips-low.c: Include mips-linux-watch.h.
9345 (struct arch_process_info, struct arch_lwp_info): New.
9346 (update_watch_registers_callback): New function.
9347 (mips_linux_new_process, mips_linux_new_thread) New functions.
9348 (mips_linux_prepare_to_resume, mips_insert_point): New
9349 functions.
9350 (mips_remove_point, mips_stopped_by_watchpoint): New
9351 functions.
9352 (rsp_bp_type_to_target_hw_bp_type): New function.
9353 (mips_stopped_data_address): New function.
9354 (the_low_target): Add watchpoint support functions.
9355
9356 2013-07-27 Yao Qi <yao@codesourcery.com>
9357
9358 * i386-low.c: Include break-common.h.
9359 (enum target_hw_bp_type): Remove.
9360
9361 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9362
9363 * Makefile.in (SFILES): /common/target-common.c.
9364 (OBS): Add target-common.o.
9365 (server_h): Add $(srcdir)/../common/target-common.h.
9366 (target-common.o): New target.
9367 * server.c (queue_stop_reply_callback): Free
9368 status string after use.
9369 * target.c (target_waitstatus_to_string): Remove.
9370 * target.h: Include target-common.h.
9371 (resume_kind): Likewise.
9372 (target_waitkind): Likewise.
9373 (target_waitstatus): Likewise.
9374 (TARGET_WNOHANG): Likewise.
9375
9376 2013-07-04 Yao Qi <yao@codesourcery.com>
9377
9378 * Makefile.in (host_alias): Use @host_noncanonical@.
9379 (target_alias): Use @target_noncanonical@.
9380 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9381 ACX_NONCANONICAL_HOST.
9382 * configure: Regenerated.
9383
9384 Revert:
9385 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9386
9387 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9388 * configure: Rebuild.
9389 * Makefile.in (version_host, version_target): Get from configure.
9390 (version.c): Use $(version_host) and $(version_target).
9391
9392 2013-07-03 Pedro Alves <palves@redhat.com>
9393
9394 * Makefile.in (config.status): Depend on development.sh.
9395 * acinclude.m4: Include libmcheck.m4.
9396 * configure: Regenerate.
9397
9398 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9399
9400 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9401 attribute inside the parentheses.
9402 (winapi_DebugSetProcessKillOnExit): Ditto.
9403 (winapi_DebugBreakProcess): Ditto.
9404 (winapi_GenerateConsoleCtrlEvent): Ditto.
9405
9406 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9407
9408 * notif.h (notif_event): Add a dummy member to avoid compiler
9409 errors.
9410
9411 2013-07-01 Pedro Alves <palves@redhat.com>
9412
9413 * hostio.c (HOSTIO_PATH_MAX): Define.
9414 (require_filename, handle_open, handle_unlink, handle_readlink):
9415 Use it.
9416
9417 2013-07-01 Pedro Alves <palves@redhat.com>
9418
9419 * server.h: Include "pathmax.h".
9420 * linux-low.c: Don't include sys/param.h.
9421 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9422 MAXPATHLEN.
9423 * win32-low.c: Don't include sys/param.h.
9424 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9425
9426 2013-07-01 Pedro Alves <palves@redhat.com>
9427
9428 * event-loop.c: Don't check HAVE_UNISTD_H before including
9429 <unistd.h>.
9430 * gdbreplay.c: Likewise.
9431 * remote-utils.c: Likewise.
9432 * server.c: Likewise.
9433 * configure.ac: Don't check for unistd.h.
9434 * configure: Regenerate.
9435
9436 2013-06-28 Tom Tromey <tromey@redhat.com>
9437
9438 * Makefile.in (version.c): Use version.in, not
9439 common/version.in.
9440
9441 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9442
9443 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9444 * configure: Rebuild.
9445 * Makefile.in (version_host, version_target): Get from configure.
9446 (version.c): Use $(version_host) and $(version_target).
9447
9448 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9449
9450 Fix trace-status to output user name without trailing colon.
9451 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9452
9453 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9454
9455 Fix trace-status to output proper start-time and stop-time.
9456 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9457 output start time and stop time in hex as gdb expects.
9458
9459 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9460
9461 * tracepoint.c (build_traceframe_info_xml): Output trace state
9462 variables present in the trace buffer.
9463
9464 2013-06-24 Tom Tromey <tromey@redhat.com>
9465
9466 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9467 create-version.sh.
9468 (version.o): Remove.
9469 * gdbreplay.c: Include version.h.
9470 (version, host_name): Don't declare.
9471 * server.h: Include version.h.
9472 (version, host_name): Don't declare.
9473
9474 2013-06-12 Pedro Alves <palves@redhat.com>
9475
9476 * linux-x86-low.c (linux_is_elf64): Delete global.
9477 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9478 with local linux_pid_exe_is_elf_64_file use.
9479
9480 2013-06-11 Pedro Alves <palves@redhat.com>
9481
9482 * linux-low.c (regset_disabled, disable_regset): New functions.
9483 (regsets_fetch_inferior_registers)
9484 (regsets_store_inferior_registers): Use them.
9485 (initialize_regsets_info); Don't allocate the disabled_regsets
9486 array here.
9487 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9488 comment.
9489
9490 2013-06-11 Pedro Alves <palves@redhat.com>
9491
9492 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9493 xmalloc.
9494
9495 2013-06-11 Pedro Alves <palves@redhat.com>
9496
9497 * linux-x86-low.c (initialize_low_arch): Call
9498 init_registers_x32_avx_linux.
9499
9500 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9501
9502 Fix compatibility with Android Bionic.
9503 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9504 it is not empty.
9505
9506 2013-06-07 Pedro Alves <palves@redhat.com>
9507
9508 PR server/14823
9509 * Makefile.in (OBS): Add tdesc.o.
9510 (IPA_OBJS): Add tdesc-ipa.o.
9511 (tdesc-ipa.o): New rule.
9512 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9513 interface.
9514 * linux-low.c (new_inferior): Delete.
9515 (disabled_regsets, num_regsets): Delete.
9516 (linux_add_process): Adjust to set the new per-process
9517 new_inferior flag.
9518 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9519 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9520 was a stop. When calling arch_setup, switch the current inferior
9521 to the thread that got an event.
9522 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9523 (regsets_fetch_inferior_registers)
9524 (regsets_store_inferior_registers): New regsets_info parameter.
9525 Adjust to use it.
9526 (linux_register_in_regsets): New regs_info parameter. Adjust to
9527 use it.
9528 (register_addr, fetch_register, store_register): New usrregs_info
9529 parameter. Adjust to use it.
9530 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9531 parameter regs_info. Adjust to use it.
9532 (linux_fetch_registers): Get the current inferior's regs_info, and
9533 adjust to use it.
9534 (linux_store_registers): Ditto.
9535 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9536 (initialize_low): Don't initialize the target_regsets here. Call
9537 initialize_low_arch.
9538 * linux-low.h (target_regsets): Delete declaration.
9539 (struct regsets_info): New.
9540 (struct usrregs_info): New.
9541 (struct regs_info): New.
9542 (struct process_info_private) <new_inferior>: New field.
9543 (struct linux_target_ops): Delete the num_regs, regmap, and
9544 regset_bitmap fields. New field regs_info.
9545 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9546 * i387-fp.c (num_xmm_registers): Delete.
9547 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9548 calls to new interface.
9549 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9550 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9551 Infer the number of xmm registers from the regcache's target
9552 description.
9553 * i387-fp.h (num_xmm_registers): Delete.
9554 * inferiors.c (add_thread): Don't install the thread's regcache
9555 here.
9556 * proc-service.c (gregset_info): Fetch the current inferior's
9557 regs_info. Adjust to use it.
9558 * regcache.c: Include tdesc.h.
9559 (register_bytes, reg_defs, num_registers)
9560 (gdbserver_expedite_regs): Delete.
9561 (get_thread_regcache): If the thread doesn't have a regcache yet,
9562 create one, instead of aborting gdbserver.
9563 (regcache_invalidate_one): Rename to ...
9564 (regcache_invalidate_thread): ... this.
9565 (regcache_invalidate_one): New.
9566 (regcache_invalidate): Only invalidate registers of the current
9567 process.
9568 (init_register_cache): Add target_desc parameter, and use it.
9569 (new_register_cache): Ditto. Assert the target description has a
9570 non zero registers_size.
9571 (regcache_cpy): Add assertions. Adjust.
9572 (realloc_register_cache, set_register_cache): Delete.
9573 (registers_to_string, registers_from_string): Adjust.
9574 (find_register_by_name, find_regno, find_register_by_number)
9575 (register_cache_size): Add target_desc parameter, and use it.
9576 (free_register_cache_thread, free_register_cache_thread_one)
9577 (regcache_release, register_cache_size): New.
9578 (register_size): Add target_desc parameter, and use it.
9579 (register_data, supply_register, supply_register_zeroed)
9580 (supply_regblock, supply_register_by_name, collect_register)
9581 (collect_register_as_string, collect_register_by_name): Adjust.
9582 * regcache.h (struct target_desc): Forward declare.
9583 (struct regcache) <tdesc>: New field.
9584 (init_register_cache, new_register_cache): Add target_desc
9585 parameter.
9586 (regcache_invalidate_thread): Declare.
9587 (regcache_invalidate_one): Delete declaration.
9588 (regcache_release): Declare.
9589 (find_register_by_number, register_cache_size, register_size)
9590 (find_regno): Add target_desc parameter.
9591 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9592 declarations.
9593 * remote-utils.c: Include tdesc.h.
9594 (outreg, prepare_resume_reply): Adjust.
9595 * server.c: Include tdesc.h.
9596 (gdbserver_xmltarget): Delete declaration.
9597 (get_features_xml, process_serial_event): Adjust.
9598 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9599 declare.
9600 (struct process_info) <tdesc>: New field.
9601 (ipa_tdesc): Declare.
9602 * tdesc.c: New file.
9603 * tdesc.h: New file.
9604 * tracepoint.c: Include tdesc.h.
9605 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9606 (get_context_regcache): Adjust to pass ipa_tdesc down.
9607 (do_action_at_tracepoint): Adjust to get the register cache size
9608 from the context regcache's description.
9609 (traceframe_walk_blocks): Adjust to get the register cache size
9610 from the current trace frame's description.
9611 (traceframe_get_pc): Adjust to get current trace frame's
9612 description and pass it down.
9613 (gdb_collect): Adjust to get the register cache size from the
9614 IPA's description.
9615 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9616 (gdbserver_xmltarget): Delete.
9617 (initialize_low_tracepoint): Set the ipa's target description.
9618 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9619 (initialize_low_tracepoint): Set the ipa's target description.
9620 * linux-x86-low.c: Include tdesc.h.
9621 [__x86_64__] (is_64bit_tdesc): New.
9622 (ps_get_thread_area, x86_get_thread_area): Use it.
9623 (i386_cannot_store_register): Rename to ...
9624 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9625 (i386_cannot_fetch_register): Rename to ...
9626 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9627 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9628 to new interface.
9629 (target_regsets): Rename to ...
9630 (x86_regsets): ... this.
9631 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9632 interface.
9633 (x86_siginfo_fixup): Use is_64bit_tdesc.
9634 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9635 (tdesc_x32_avx_linux, tdesc_x32_linux)
9636 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9637 Declare.
9638 (x86_linux_update_xmltarget): Delete.
9639 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9640 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9641 (AMD64_LINUX_USER64_CS): New.
9642 (x86_linux_read_description): New, based on
9643 x86_linux_update_xmltarget.
9644 (same_process_callback): New.
9645 (x86_arch_setup_process_callback): New.
9646 (x86_linux_update_xmltarget): New.
9647 (x86_regsets_info): New.
9648 (amd64_linux_regs_info): New.
9649 (i386_linux_usrregs_info): New.
9650 (i386_linux_regs_info): New.
9651 (x86_linux_regs_info): New.
9652 (x86_arch_setup): Reimplement.
9653 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9654 (x86_emit_ops): Ditto.
9655 (the_low_target): Adjust. Install x86_linux_regs_info,
9656 x86_cannot_fetch_register, and x86_cannot_store_register.
9657 (initialize_low_arch): New.
9658 * linux-ia64-low.c (tdesc_ia64): Declare.
9659 (ia64_fetch_register): Adjust.
9660 (ia64_usrregs_info, regs_info): New globals.
9661 (ia64_regs_info): New function.
9662 (the_low_target): Adjust.
9663 (initialize_low_arch): New function.
9664 * linux-sparc-low.c (tdesc_sparc64): Declare.
9665 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9666 Adjust.
9667 (sparc_arch_setup): New function.
9668 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9669 (the_low_target): Adjust.
9670 (initialize_low_arch): New function.
9671 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9672 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9673 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9674 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9675 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9676 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9677 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9678 (tdesc_powerpc_isa205_vsx64l): Declare.
9679 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9680 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9681 (ppc_set_pc, ppc_get_hwcap): Adjust.
9682 (ppc_usrregs_info): Forward declare.
9683 (!__powerpc64__) ppc_regmap_adjusted: New global.
9684 (ppc_arch_setup): Adjust to the current process'es target
9685 description.
9686 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9687 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9688 (ppc_store_evrregset): Adjust.
9689 (target_regsets): Rename to ...
9690 (ppc_regsets): ... this, and make static.
9691 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9692 (ppc_regs_info): New function.
9693 (the_low_target): Adjust.
9694 (initialize_low_arch): New function.
9695 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9696 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9697 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9698 (tdesc_s390x_linux64v2): Declare.
9699 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9700 (s390_fill_gregset, s390_store_last_break): Adjust.
9701 (target_regsets): Rename to ...
9702 (s390_regsets): ... this, and make static.
9703 (s390_get_pc, s390_set_pc): Adjust.
9704 (s390_get_hwcap): New target_desc parameter, and use it.
9705 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9706 (s390_arch_setup): Adjust to set the current process'es target
9707 description. Don't adjust the regmap.
9708 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9709 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9710 (regs_info_3264): New globals.
9711 (s390_regs_info): New function.
9712 (the_low_target): Adjust.
9713 (initialize_low_arch): New function.
9714 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9715 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9716 [__mips64] (init_registers_mips_linux)
9717 (init_registers_mips_dsp_linux): Delete defines.
9718 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9719 (have_dsp): New global.
9720 (mips_read_description): New, based on mips_arch_setup.
9721 (mips_arch_setup): Reimplement.
9722 (get_usrregs_info): New function.
9723 (mips_cannot_fetch_register, mips_cannot_store_register)
9724 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9725 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9726 (target_regsets): Rename to ...
9727 (mips_regsets): ... this, and make static.
9728 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9729 (dsp_regs_info, regs_info): New globals.
9730 (mips_regs_info): New function.
9731 (the_low_target): Adjust.
9732 (initialize_low_arch): New function.
9733 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9734 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9735 Declare.
9736 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9737 (arm_read_description): New, with bits factored from
9738 arm_arch_setup.
9739 (arm_arch_setup): Reimplement.
9740 (target_regsets): Rename to ...
9741 (arm_regsets): ... this, and make static.
9742 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9743 (arm_regs_info): New function.
9744 (the_low_target): Adjust.
9745 (initialize_low_arch): New function.
9746 * linux-m68k-low.c (tdesc_m68k): Declare.
9747 (target_regsets): Rename to ...
9748 (m68k_regsets): ... this, and make static.
9749 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9750 (m68k_regs_info): New function.
9751 (m68k_arch_setup): New function.
9752 (the_low_target): Adjust.
9753 (initialize_low_arch): New function.
9754 * linux-sh-low.c (tdesc_sharch): Declare.
9755 (target_regsets): Rename to ...
9756 (sh_regsets): ... this, and make static.
9757 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9758 (sh_regs_info, sh_arch_setup): New functions.
9759 (the_low_target): Adjust.
9760 (initialize_low_arch): New function.
9761 * linux-bfin-low.c (tdesc_bfin): Declare.
9762 (bfin_arch_setup): New function.
9763 (bfin_usrregs_info, regs_info): New globals.
9764 (bfin_regs_info): New function.
9765 (the_low_target): Adjust.
9766 (initialize_low_arch): New function.
9767 * linux-cris-low.c (tdesc_cris): Declare.
9768 (cris_arch_setup): New function.
9769 (cris_usrregs_info, regs_info): New globals.
9770 (cris_regs_info): New function.
9771 (the_low_target): Adjust.
9772 (initialize_low_arch): New function.
9773 * linux-cris-low.c (tdesc_crisv32): Declare.
9774 (cris_arch_setup): New function.
9775 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9776 (cris_regs_info): New function.
9777 (the_low_target): Adjust.
9778 (initialize_low_arch): New function.
9779 * linux-m32r-low.c (tdesc_m32r): Declare.
9780 (m32r_arch_setup): New function.
9781 (m32r_usrregs_info, regs_info): New globals.
9782 (m32r_regs_info): Adjust.
9783 (initialize_low_arch): New function.
9784 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9785 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9786 (tic6x_usrregs_info): Forward declare.
9787 (tic6x_read_description): New function, based on ...
9788 (tic6x_arch_setup): ... this. Reimplement.
9789 (target_regsets): Rename to ...
9790 (tic6x_regsets): ... this, and make static.
9791 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9792 (tic6x_regs_info): New function.
9793 (the_low_target): Adjust.
9794 (initialize_low_arch): New function.
9795 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9796 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9797 (target_regsets): Rename to ...
9798 (xtensa_regsets): ... this, and make static.
9799 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9800 globals.
9801 (xtensa_arch_setup, xtensa_regs_info): New functions.
9802 (the_low_target): Adjust.
9803 (initialize_low_arch): New function.
9804 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9805 (nios2_arch_setup): Set the current process'es tdesc.
9806 (target_regsets): Rename to ...
9807 (nios2_regsets): ... this.
9808 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9809 (nios2_regs_info): New function.
9810 (the_low_target): Adjust.
9811 (initialize_low_arch): New function.
9812 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9813 (aarch64_arch_setup): Set the current process'es tdesc.
9814 (target_regsets): Rename to ...
9815 (aarch64_regsets): ... this.
9816 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9817 (aarch64_regs_info): New function.
9818 (the_low_target): Adjust.
9819 (initialize_low_arch): New function.
9820 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9821 globals.
9822 (target_regsets): Rename to ...
9823 (tile_regsets): ... this.
9824 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9825 (tile_regs_info): New function.
9826 (tile_arch_setup): Set the current process'es tdesc.
9827 (the_low_target): Adjust.
9828 (initialize_low_arch): New function.
9829 * spu-low.c (tdesc_spu): Declare.
9830 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9831 * win32-arm-low.c (tdesc_arm): Declare.
9832 (arm_arch_setup): New function.
9833 (the_low_target): Install arm_arch_setup instead of
9834 init_registers_arm.
9835 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9836 (init_windows_x86): Rename to ...
9837 (i386_arch_setup): ... this. Set `win32_tdesc'.
9838 (the_low_target): Adjust.
9839 * win32-low.c (win32_tdesc): New global.
9840 (child_add_thread): Don't create the thread cache here.
9841 (do_initial_child_stuff): Set the new process'es tdesc.
9842 * win32-low.h (struct target_desc): Forward declare.
9843 (win32_tdesc): Declare.
9844 * lynx-i386-low.c (tdesc_i386): Declare global.
9845 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9846 * lynx-low.c (lynx_tdesc): New global.
9847 (lynx_add_process): Set the new process'es tdesc.
9848 * lynx-low.h (struct target_desc): Forward declare.
9849 (lynx_tdesc): Declare global.
9850 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9851 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9852 * nto-low.c (nto_tdesc): New global.
9853 (do_attach): Set the new process'es tdesc.
9854 * nto-low.h (struct target_desc): Forward declare.
9855 (nto_tdesc): Declare.
9856 * nto-x86-low.c (tdesc_i386): Declare.
9857 (nto_x86_arch_setup): Set `nto_tdesc'.
9858
9859 2013-06-04 Gary Benson <gbenson@redhat.com>
9860
9861 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9862 to qSupported response when appropriate.
9863 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9864 with nonzero-length annex.
9865 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9866 arguments supplied in annex.
9867
9868 2013-05-31 Doug Evans <dje@google.com>
9869
9870 PR server/15594
9871 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9872 64 bits in 64-cross-32 environment.
9873
9874 2013-05-28 Pedro Alves <palves@redhat.com>
9875
9876 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9877 (aarch64-without-fpu.c): Delete rule.
9878 * configure.srv (aarch64*-*-linux*): Remove references to
9879 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9880 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9881 declaration.
9882
9883 2013-05-24 Pedro Alves <palves@redhat.com>
9884
9885 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9886 instead of strchr/decode_address. Error if the range isn't split
9887 with a ','. Don't assume there's be a ':' in the action.
9888
9889 2013-05-23 Yao Qi <yao@codesourcery.com>
9890 Pedro Alves <palves@redhat.com>
9891
9892 * linux-low.c (lwp_in_step_range): New function.
9893 (linux_wait_1): If the thread was range stepping and stopped
9894 outside the stepping range, report the stop to GDB. Otherwise,
9895 continue stepping. Add range stepping debug output.
9896 (linux_set_resume_request): Copy the step range from the resume
9897 request to the lwp.
9898 (linux_supports_range_stepping): New.
9899 (linux_target_ops) <supports_range_stepping>: Set to
9900 linux_supports_range_stepping.
9901 * linux-low.h (struct linux_target_ops)
9902 <supports_range_stepping>: New field.
9903 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9904 * linux-x86-low.c (x86_supports_range_stepping): New.
9905 (the_low_target) <supports_range_stepping>: Set to
9906 x86_supports_range_stepping.
9907 * server.c (handle_v_cont): Handle 'r' action.
9908 (handle_v_requests): Append ";r" if the target supports range
9909 stepping.
9910 * target.h (struct thread_resume) <step_range_start,
9911 step_range_end>: New fields.
9912 (struct target_ops) <supports_range_stepping>:
9913 New field.
9914 (target_supports_range_stepping): New macro.
9915
9916 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9917
9918 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9919 confusion in comment.
9920
9921 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9922
9923 * lynx-low.c (struct process_info_private): New type.
9924 (lynx_add_process): New function.
9925 (lynx_create_inferior, lynx_attach): Replace calls to
9926 add_process by calls to lynx_add_process.
9927 (lynx_resume): If PTID is null, then try using
9928 current_process()->private->last_wait_event_ptid.
9929 Add comments.
9930 (lynx_clear_inferiors): Delete. The contents of that function
9931 has been inlined in lynx_mourn;
9932 (lynx_wait_1): Save the ptid in the process's private data.
9933 (lynx_mourn): Free the process' private data. Replace call
9934 to lynx_clear_inferiors by call to clear_inferiors.
9935
9936 2013-05-17 Yao Qi <yao@codesourcery.com>
9937
9938 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9939 the right place.
9940
9941 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9942
9943 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9944 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9945 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9946 PT_TEXT_END_ADDR guards. Update comments.
9947 (linux_target_op) <read_offsets>: Conditionally define to
9948 linux_read_offsets if the target is UCLIBC and if it defines
9949 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9950
9951 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9952 Andrew Jenner <andrew@codesourcery.com>
9953
9954 * Makefile.in (SFILES): Add linux-nios2-low.c.
9955 (clean): Add action to delete nios2-linux.c.
9956 (nios2-linux.c): New rule.
9957 * configure.srv: Add nios2*-*-linux*.
9958 * linux-nios2-low.c: New.
9959
9960 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9961
9962 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9963
9964 2013-04-25 Hui Zhu <hui@codesourcery.com>
9965
9966 PR gdb/15186
9967 * ax.c (ax_printf): Add fflush.
9968
9969 2013-04-22 Tom Tromey <tromey@redhat.com>
9970
9971 * Makefile.in (SFILES): Add filestuff.c.
9972 (OBS): Add filestuff.o.
9973 (filestuff.o): New target.
9974 * config.in, configure: Rebuild.
9975 * configure.ac: Check for fdwalk, pipe2.
9976
9977 2013-04-17 Pedro Alves <palves@redhat.com>
9978
9979 * configure.ac (USE_THREAD_DB): Delete variable.
9980 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9981 Don't AC_SUBST USE_THREAD_DB.
9982 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9983 * config.in, configure: Regenerate.
9984
9985 2013-04-16 Pedro Alves <palves@redhat.com>
9986
9987 * linux-low.h (struct lwp_info) <thread_known>: Move under
9988 the USE_THREAD_DB #ifdef.
9989
9990 2013-04-16 Pedro Alves <palves@redhat.com>
9991
9992 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9993 (linux-low.o): Delete rule.
9994 * linux-low.h: Always include "gdb_thread_db.h" instead of
9995 conditionally including thread_db.h.
9996 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9997 HAVE_THREAD_DB_H.
9998
9999 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10000
10001 * Makefile.in (install-only): Fix make install regression.
10002
10003 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10004
10005 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10006 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10007 installation.
10008 * gdbserver.1: Remove.
10009
10010 2013-03-22 Pedro Alves <palves@redhat.com>
10011
10012 * linux-low.c (handle_extended_wait): Don't call
10013 linux_enable_event_reporting.
10014
10015 2013-03-15 Tony Theodore <tonyt@logyst.com>
10016
10017 PR build/9098:
10018 * Makefile.in (SHELL): Use @SHELL@.
10019
10020 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10021
10022 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10023 compiler warning.
10024
10025 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10026
10027 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10028 Remove extraneous NULL element.
10029
10030 2013-03-13 Yao Qi <yao@codesourcery.com>
10031
10032 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10033 'V' block in trace frame.
10034
10035 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10036
10037 * target.h (struct target_ops): Add btrace ops.
10038 (target_supports_btrace): New macro.
10039 (target_enable_btrace): New macro.
10040 (target_disable_btrace): New macro.
10041 (target_read_btrace): New macro.
10042 * gdbthread.h (struct thread_info): Add btrace field.
10043 * server.c: Include btrace-common.h.
10044 (handle_btrace_general_set): New function.
10045 (handle_btrace_enable): New function.
10046 (handle_btrace_disable): New function.
10047 (handle_general_set): Call handle_btrace_general_set.
10048 (handle_qxfer_btrace): New function.
10049 (struct qxfer qxfer_packets[]): Add btrace entry.
10050 * inferiors.c (remove_thread): Disable btrace.
10051 * linux-low: Include linux-btrace.h.
10052 (linux_low_enable_btrace): New function.
10053 (linux_low_read_btrace): New function.
10054 (linux_target_ops): Add btrace ops.
10055 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10056 Add srv_linux_btrace=yes.
10057 (x86_64-*-linux*): Add linux-btrace.o.
10058 Add srv_linux_btrace=yes.
10059 * configure.ac: Define HAVE_LINUX_BTRACE.
10060 * config.in: Regenerated.
10061 * configure: Regenerated.
10062
10063 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10064
10065 * server.c (handle_qxfer): Preserve error message if -3 is
10066 returned.
10067 (qxfer): Document the -3 return value.
10068
10069 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10070
10071 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10072 (linux_btrace_h): New variable.
10073 (linux-btrace.o): New rule.
10074
10075 2013-03-08 Stan Shebs <stan@codesourcery.com>
10076 Hafiz Abid Qadeer <abidh@codesourcery.com>
10077
10078 * tracepoint.c (trace_buffer_size): New global.
10079 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10080 (init_trace_buffer): Change to one-argument function. Allocate
10081 trace buffer memory.
10082 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10083 handle QTBuffer:size packet.
10084 (cmd_bigqtbuffer_size): New function.
10085 (initialize_tracepoint): Call init_trace_buffer with
10086 DEFAULT_TRACE_BUFFER_SIZE.
10087 * server.c (handle_query): Add QTBuffer:size in the
10088 supported packets.
10089
10090 2013-03-07 Yao Qi <yao@codesourcery.com>
10091
10092 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10093 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10094 of -1.
10095 (cmd_qtsp): Adjust condition. Do post increment.
10096 Set cur_action and cur_step_action back to 0.
10097
10098 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10099
10100 PR server/15236
10101 * linux-low.c (linux_write_memory): Return early success if LEN is
10102 zero.
10103
10104 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10105
10106 * configure.srv: Add x86_64-*-cygwin* as target.
10107
10108 2013-02-28 Tom Tromey <tromey@redhat.com>
10109
10110 * configure.ac: Invoke AC_SYS_LARGEFILE.
10111 * configure, config.in: Rebuild.
10112
10113 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10114
10115 * win32-low.c: Throughout, fix format strings and casts of
10116 printf-like functions to avoid type related warnings on all
10117 platforms.
10118 (get_child_debug_event): Print dwDebugEventCode as hex since
10119 that's how it's usually documented.
10120
10121 2013-02-28 Yao Qi <yao@codesourcery.com>
10122
10123 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10124 pulongest.
10125
10126 2013-02-27 Jiong Wang <jiwang@tilera.com>
10127
10128 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10129 (reg-tilegx32.c): New rule.
10130 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10131 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10132 different register info initializer according to elf class.
10133 (init_registers_tilgx32): New function. The tilegx32 register info
10134 initializer.
10135 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10136 (tile_store_gregset): Likewise.
10137
10138 2013-02-27 Yao Qi <yao@codesourcery.com>
10139
10140 * server.c (process_point_options): Print debug message when
10141 debug_threads is true.
10142
10143 2013-02-26 Yao Qi <yao@codesourcery.com>
10144
10145 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10146
10147 2013-02-19 Pedro Alves <palves@redhat.com>
10148 Kai Tietz <ktietz@redhat.com>
10149
10150 PR gdb/15161
10151
10152 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10153 instead of strtoul to extract address from packet.
10154 (process_serial_event) <'z'>: Likewise.
10155
10156 2013-02-18 Yao Qi <yao@codesourcery.com>
10157
10158 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10159
10160 2013-02-14 Pedro Alves <palves@redhat.com>
10161
10162 Plug memory leak.
10163
10164 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10165 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10166
10167 2013-02-14 Pedro Alves <palves@redhat.com>
10168
10169 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10170
10171 2013-02-14 Pedro Alves <palves@redhat.com>
10172
10173 * tracepoint.c (save_string): Delete.
10174 (add_tracepoint_action): Use savestring instead of save_string.
10175
10176 2013-02-12 Pedro Alves <palves@redhat.com>
10177
10178 * linux-xtensa-low.c: Ditto.
10179 * xtensa-xtregs.c: Ditto.
10180
10181 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10182
10183 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10184 thread_db.
10185
10186 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10187
10188 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10189 aarch64_num_wp_regs and aarch64_num_bp_regs to
10190 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10191
10192 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10193
10194 * linux-aarch64-low.c (ps_get_thread_area): Replace
10195 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10196
10197 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10198 Marcus Shawcroft <marcus.shawcroft@arm.com>
10199 Nigel Stephens <nigel.stephens@arm.com>
10200 Yufeng Zhang <yufeng.zhang@arm.com>
10201
10202 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10203 (aarch64.c, aarch64-without-fpu.c): New targets.
10204 * configure.srv (aarch64*-*-linux*): New.
10205 * linux-aarch64-low.c: New file.
10206
10207 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10208
10209 * linux-low.c (handle_extended_wait, linux_create_inferior)
10210 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10211 (dequeue_one_deferred_signal, linux_resume_one_thread)
10212 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10213 (linux_tracefork_grandchild, linux_test_for_tracefork)
10214 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10215 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10216 where the argument is 0.
10217
10218 2013-01-25 Yao Qi <yao@codesourcery.com>
10219
10220 * event-loop.c: Include "queue.h".
10221 (gdb_event_p): New typedef.
10222 (struct gdb_event) <next_event>: Remove.
10223 (event_queue): Change to QUEUE(gdb_event_p).
10224 (async_queue_event): Remove.
10225 (gdb_event_xfree): New.
10226 (initialize_event_loop): New.
10227 (process_event): Use API from QUEUE.
10228 (wait_for_event): Likewise.
10229 * server.c (main): Call initialize_event_loop.
10230 * server.h (initialize_event_loop): Declare.
10231
10232 2013-01-18 Yao Qi <yao@codesourcery.com>
10233
10234 * ax.h (struct eval_agent_expr_context): New.
10235 (gdb_eval_agent_expr): Update declaration.
10236 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10237 TFRAME. Add new argument CTX.
10238 * server.h (struct eval_agent_expr_context): Declare.
10239 (agent_mem_read, agent_tsv_read): Update declaration.
10240 (agent_mem_read_string): Likewise.
10241 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10242 (add_traceframe_block): Add new argument TPOINT.
10243 Increase TPOINT->traceframe_usage.
10244 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10245 eval_tracepoint_agent_expr.
10246 (condition_true_at_tracepoint): Likewise.
10247 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10248 (agent_mem_read_string, agent_tsv_read): Likewise.
10249
10250 2013-01-16 Yao Qi <yao@codesourcery.com>
10251
10252 * linux-low.c (linux_resume_one_lwp): Don't check
10253 'lwp->bp_reinsert != 0'.
10254
10255 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10256 Pedro Alves <palves@redhat.com>
10257
10258 * lynx-low.c (ptrace_request_to_str): Define a temporary
10259 macro and use it to simplify this function's implementation.
10260
10261 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10262
10263 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10264 sets errno.
10265
10266 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10267
10268 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10269
10270 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10271
10272 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10273
10274 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10275
10276 * lynx-low.c (lynx_resume): Use the resume_info parameter
10277 to determine the ptid for the lynx_ptrace call, unless
10278 it is equal to minus_one_ptid, in which case we use the
10279 ptid of the current_inferior.
10280 (lynx_wait_1): After having received a thread create/exit
10281 event, resume the inferior's execution using the signaling
10282 thread's ptid, rather than the old ptid.
10283
10284 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10285
10286 * lynx-low.c (lynx_resume): Delete variable ret.
10287
10288 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10289
10290 * gdbreplay.c (gdbreplay_version): Update copyright year.
10291 * server.c (gdbserver_version): Likewise.
10292
10293 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10294
10295 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10296 new thread.
10297
10298 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10299
10300 * lynx-low.c (ptrace_request_to_str): Add handling for
10301 PTRACE_GETTRACESIG.
10302
10303 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10304
10305 * lynx-low.c (lynx_attach): Delete variable new_process.
10306
10307 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10308
10309 * lynx-low.c (lynx_create_inferior): Delete variable
10310 new_process.
10311
10312 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10313
10314 * lynx-low.c (ptrace_request_to_str): Do not handle
10315 PTRACE_GETTHREADLIST if this macro does not exist.
10316
10317 2012-12-15 Yao Qi <yao@codesourcery.com>
10318
10319 * Makefile.in (OBS): Add notif.o.
10320 * notif.c, notif.h: New.
10321 * server.c: Include "notif.h".
10322 (struct vstop_notif) <next>: Remove.
10323 <base>: New field.
10324 (queue_stop_reply): Update.
10325 (push_event, send_next_stop_reply): Remove.
10326 (discard_queued_stop_replies): Update.
10327 (notif_stop): New variable.
10328 (handle_v_stopped): Remove.
10329 (handle_v_requests): Don't call handle_v_stopped. Call
10330 handle_ack_notif instead.
10331 (queue_stop_reply_callback): Call notif_event_enque instead
10332 of queue_stop_reply.
10333 (handle_status): Don't call send_next_stop_reply, call
10334 notif_write_event instead.
10335 (kill_inferior_callback): Likewise.
10336 (detach_or_kill_inferior_callback): Likewise.
10337 (main): Call initialize_notif.
10338 (process_serial_event): Call QUEUE_is_empty.
10339 (handle_target_event): Call notif_push instead of push event.
10340 * server.h (push_event): Remove declaration.
10341
10342 2012-12-10 Tom Tromey <tromey@redhat.com>
10343
10344 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10345 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10346 macros.
10347 (.c.o): Rewrite.
10348 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10349 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10350 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10351 (amd64-linux-ipa.o, ax.o): Rewrite.
10352 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10353 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10354 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10355 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10356 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10357 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10358 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10359 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10360 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10361 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10362 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10363 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10364 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10365 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10366 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10367 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10368 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10369 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10370 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10371 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10372 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10373 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10374 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10375 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10376 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10377 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10378 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10379 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10380 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10381 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10382 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10383 (reg-tilegx.o): Remove.
10384 (all_object_files): New macro.
10385 Include .deps files.
10386 * aclocal.m4, configure: Rebuild.
10387 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10388 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10389 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10390
10391 2012-12-05 Tom Tromey <tromey@redhat.com>
10392
10393 PR gdb/14917:
10394 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10395
10396 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10397
10398 * configure.ac: Check for linux/perf_event.h.
10399 * config.in: Regenerated.
10400 * configure: Regenerated.
10401
10402 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10403
10404 * hostio.c (handle_readlink): Decrease buffer size
10405 parameter passed to readlink by one byte.
10406
10407 2012-11-26 Yao Qi <yao@codesourcery.com>
10408
10409 * configure.ac (build_warnings): Append '-Wempty-body'.
10410 * configure: Regenerated.
10411 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10412 body.
10413
10414 2012-11-15 Pierre Muller <muller@sourceware.org>
10415
10416 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10417 * config.in: Regenerate.
10418 * configure: Regenerate.
10419 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10420 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10421 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10422 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10423 header.
10424 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10425 instead of <sys/wait.h> header.
10426 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10427
10428 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10429
10430 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10431 (various make rules): Remove -DGDBSERVER
10432
10433 2012-11-09 Yao Qi <yao@codesourcery.com>
10434
10435 * spu-low.c (current_ptid): Move it to ..
10436 * gdbthread.h: ... here. New.
10437 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10438 * server.c (myresume, process_serial_event): Likewise.
10439 * thread-db.c (thread_db_find_new_threads): Likewise.
10440 * tracepoint.c (run_inferior_command): Likewise.
10441
10442 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10443
10444 * server.c (handle_search_memory_1): Include access length in
10445 warning message.
10446
10447 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10448
10449 * linux-crisv32-low.c: Fix compile errors.
10450
10451 2012-09-04 Yao Qi <yao@codesourcery.com>
10452
10453 * tracepoint.c (cmd_qtsv): Adjust debug message.
10454 Don't check CUR_TPOINT.
10455
10456 2012-08-28 Yao Qi <yao@codesourcery.com>
10457
10458 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10459 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10460 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10461 Remove declarations of xmalloc, xreallloc, xstrdup and
10462 freeargv.
10463 * Makefile.in (libiberty_h): New.
10464 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10465 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10466
10467 2012-08-23 Yao Qi <yao@codesourcery.com>
10468
10469 * server.h: Remove declaration of 'xsnprintf'.
10470
10471 2012-08-22 Keith Seitz <keiths@redhat.com>
10472
10473 * server.h: Include build-gnulib-gbserver/config.h.
10474 * gdbreplay.c: Likewise.
10475
10476 2012-08-08 Doug Evans <dje@google.com>
10477
10478 * Makefile.in (SFILES): Add gdb_vecs.c.
10479 (OBS): Add gdb_vecs.o.
10480 (gdb_vecs_h, host_defs_h): New variables.
10481 (thread-db.o): Add $(gdb_vecs_h) dependency.
10482 (gdb_vecs.o): New rule.
10483 * thread-db.c: #include "gdb_vecs.h".
10484 (thread_db_load_search): Use a vector to iterate over path elements.
10485 Handle text appearing after "$pdir".
10486
10487 * configure.ac: Add check for strstr.
10488 * config.in: Regenerate.
10489 * configure: Regenerate.
10490
10491 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10492
10493 * hostio.c (handle_pread): If pread fails, fall back to attempting
10494 lseek/read.
10495 (handle_pwrite): Likewise for pwrite.
10496
10497 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10498
10499 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10500 between unsupported TYPE and unimplementable ADDR/LEN combination.
10501 (arm_insert_point): Act on new return value.
10502
10503 2012-07-31 Pedro Alves <palves@redhat.com>
10504
10505 * server.c (process_point_options): Only skip tokens if we find
10506 one that is unrecognized. Don't treat 'X' specially while
10507 skipping unrecognized tokens.
10508
10509 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10510
10511 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10512 to 4-byte-align HW breakpoint addresses for Thumb.
10513
10514 2012-07-27 Yao Qi <yao@codesourcery.com>
10515
10516 PR remote/14161.
10517
10518 * server.h: Declare gdb_agent_about_to_close.
10519 * target.c (kill_inferior): Include "agent.h".
10520 New. Send command 'kill'.
10521 * target.h (kill_inferior): Removed macro.
10522 * tracepoint.c (gdb_agent_about_to_close): New.
10523 (gdb_agent_helper_thread): Handle command 'close'.
10524 Wait endlessly until the inferior stops.
10525 Install gdb_agent_remove_socket to atexit hook.
10526 (agent_socket_name): New static variable.
10527 (gdb_agent_socket_init): Replace local variable 'name' with
10528 'agent_socket_name'.
10529 (gdb_agent_remove_socket): New.
10530
10531 2012-07-27 Yao Qi <yao@codesourcery.com>
10532
10533 * server.c (process_point_options): Stop at 'X' when parsing.
10534
10535 2012-07-19 Michael Eager <eager@eagercon.com>
10536
10537 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10538 to hw_execute.
10539 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10540 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10541 hardware breakpoint.
10542
10543 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10544
10545 * gdbserver/linux-low.c (initialize_low): Call
10546 linux_ptrace_init_warnings.
10547
10548 2012-07-02 Doug Evans <dje@google.com>
10549
10550 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10551 pointer to int.
10552
10553 2012-07-02 Stan Shebs <stan@codesourcery.com>
10554
10555 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10556 (ax.o): Add it to build rule.
10557 (ax-ipa.o): Ditto.
10558 (OBS): Add format.o.
10559 (IPA_OBS): Add format.o.
10560 * server.c (handle_query): Claim support for breakpoint commands.
10561 (process_point_options): Add command case.
10562 (process_serial_event): Leave running if there are printfs in
10563 effect.
10564 * mem-break.h (any_persistent_commands): Declare.
10565 (add_breakpoint_commands): Declare.
10566 (gdb_no_commands_at_breakpoint): Declare.
10567 (run_breakpoint_commands): Declare.
10568 * mem-break.c (struct point_command_list): New struct.
10569 (struct breakpoint): New field command_list.
10570 (any_persistent_commands): New function.
10571 (add_commands_to_breakpoint): New function.
10572 (add_breakpoint_commands): New function.
10573 (gdb_no_commands_at_breakpoint): New function.
10574 (run_breakpoint_commands): New function.
10575 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10576 locally.
10577 * ax.c: Include format.h.
10578 (ax_printf): New function.
10579 (gdb_eval_agent_expr): Add printf opcode.
10580
10581 2012-06-13 Yao Qi <yao@codesourcery.com>
10582
10583 * server.c (start_inferior): Remove duplicated writes to fields
10584 'last_resume_kind' and 'last_status' of 'current_inferior'.
10585
10586 2012-06-12 Yao Qi <yao@codesourcery.com>
10587 Pedro Alves <palves@redhat.com>
10588
10589 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10590 comment.
10591 * server.c (handle_v_cont): Extend comment.
10592
10593 2012-06-11 Yao Qi <yao@codesourcery.com>
10594
10595 * linux-low.c (linux_attach): Add 'static'.
10596
10597 2012-06-06 Yao Qi <yao@codesourcery.com>
10598
10599 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10600
10601 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10602
10603 Fix gcc -flto compilation warning.
10604 * server.c (main): Make variable multi_mode and attach volatile.
10605
10606 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10607
10608 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10609 if the platform doesn't know about it.
10610
10611 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10612
10613 * Makefile.in (SFILES): Add linux-tile-low.c.
10614 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10615 * configure.srv: Handle tilegx-*-linux*.
10616 * linux-tile-low.c: New file.
10617
10618 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10621
10622 2012-05-24 Pedro Alves <palves@redhat.com>
10623
10624 PR gdb/7205
10625
10626 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10627
10628 2012-05-24 Pedro Alves <palves@redhat.com>
10629
10630 PR gdb/7205
10631
10632 Replace target_signal with gdb_signal throughout.
10633
10634 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10635
10636 * linux-low.c (linux_store_registers): Avoid the copying sequence
10637 when no data has been retrieved by ptrace.
10638
10639 2012-05-22 Will Deacon <will.deacon@arm.com>
10640
10641 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10642 Include asm/ptrace.h.
10643 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10644 already defined.
10645
10646 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10647
10648 * linux-low.c (linux_store_registers): Don't re-retrieve data
10649 with ptrace that has already been obtained from /proc. Always
10650 copy any data retrieved with ptrace to the buffer supplied.
10651
10652 2012-05-11 Yao Qi <yao@codesourcery.com>
10653 Pedro Alves <palves@redhat.com>
10654
10655 * linux-low.c (enum stopping_threads_kind): New.
10656 (stopping_threads): Change type to `enum stopping_threads_kind'.
10657 (handle_extended_wait): If stopping and suspending threads, leave
10658 the new_lwp suspended too.
10659 (linux_wait_for_event): Adjust.
10660 (stop_all_lwps): Set `stopping_threads' to
10661 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10662 whether we're suspending threads or just stopping them. Assert no
10663 recursion happens.
10664
10665 2012-04-29 Yao Qi <yao@codesourcery.com>
10666
10667 * server.h: Move some code to ...
10668 * gdbthread.h: ... here. New.
10669 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10670 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10671 (nto-low.o, win32-low.o): Likewise.
10672 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10673 * regcache.c, remote-utils.c, server.c: Likewise.
10674 * target.c, tracepoint.c, win32-low.c: Likewise.
10675
10676 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10677
10678 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10679 (PTRACE_ARG4_TYPE): Likewise.
10680 (PTRACE_XFER_TYPE): Likewise.
10681 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10682 ptrace to PTRACE_ARG3_TYPE.
10683 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10684 (PTRACE_ARG4_TYPE): Likewise.
10685 (PTRACE_XFER_TYPE): Likewise.
10686 (linux_detach_one_lwp): Cast fourth argument of
10687 ptrace to long then PTRACE_ARG4_TYPE.
10688 (regsets_fetch_inferior_registers): Cast third argument of
10689 ptrace to long then PTRACE_ARG3_TYPE.
10690 (regsets_store_inferior_registers): Likewise.
10691
10692 2012-04-20 Pedro Alves <palves@redhat.com>
10693
10694 * configure: Regenerate.
10695
10696 2012-04-19 Pedro Alves <palves@redhat.com>
10697
10698 * Makefile.in (GNULIB_BUILDDIR): New.
10699 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10700 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10701 (all, install-only, uninstall, clean-info, all-lib, clean): No
10702 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10703 (maintainer-clean realclean distclean): Use subdir_do.
10704 (subdir_do): New.
10705 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10706 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10707 * acinclude.m4: Include acx_configure_dir.m4.
10708 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10709 calls. Call AC_PROG_RANLIB. Configure gnulib using
10710 ACX_CONFIGURE_DIR.
10711 (GNULIB): New.
10712 (GNULIB_STDINT_H): Adjust.
10713 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10714 * gdbreplay.c: Include build-gnulib/config.h.
10715 * server.h: Likewise.
10716 * aclocal.m4: Regenerate.
10717 * config.in: Regenerate.
10718 * configure: Regenerate.
10719
10720 2012-04-19 Pedro Alves <palves@redhat.com>
10721
10722 * Makefile.in (LIBGNU, INCGNU): Adjust.
10723 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10724 (all, install-only, uninstall, clean-info, all-lib, clean)
10725 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10726 * configure.ac: Adjust AC_OUTPUT output.
10727 * aclocal.m4: Regenerate.
10728 * configure: Regenerate.
10729
10730 2012-04-19 Pedro Alves <palves@redhat.com>
10731
10732 * Makefile.in (generated_files): New.
10733 (server_h): Remove the explicit dependency on config.h, and depend
10734 on $generated_files.
10735
10736 2012-04-19 Pedro Alves <palves@redhat.com>
10737
10738 * Makefile.in (INCGNU): Add -Ignulib.
10739
10740 2012-04-19 Pedro Alves <palves@redhat.com>
10741
10742 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10743 (INCGNU): ... this, and spell out -I here.
10744 (GNULIB_LIB): Rename to ...
10745 (LIBGNU): ... this.
10746 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10747
10748 2012-04-19 Pedro Alves <palves@redhat.com>
10749
10750 * config.in: Regenerate.
10751
10752 2012-04-19 Pedro Alves <palves@redhat.com>
10753
10754 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10755 * server.h (memmem): Remove declaration.
10756 * config.in: Regenerate.
10757 * configure: Regenerate.
10758
10759 2012-04-19 Yao Qi <yao@codesourcery.com>
10760
10761 * Makefile.in (SFILES): Add common/vec.c.
10762 (OBS): Add vec.o.
10763 (vec.o): New rule.
10764
10765 2012-04-19 Yao Qi <yao@codesourcery.com>
10766
10767 * remote-utils.c (prepare_resume_reply): Replace with macro
10768 target_core_of_thread.
10769 * server.c (handle_qxfer_threads_proper): Likewise.
10770 * target.h (traget_core_of_thread): New macro.
10771
10772 2012-04-18 Pedro Alves <palves@redhat.com>
10773
10774 * aclocal.m4: Regenerate.
10775 * configure: Regenerate.
10776
10777 2012-04-16 Yao Qi <yao@codesourcery.com>
10778
10779 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10780 duplicated on address.
10781
10782 2012-04-16 Yao Qi <yao@codesourcery.com>
10783
10784 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10785 (struct tracepoint_action_ops) <send>: New field.
10786 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10787 (agent_expr_send, x_tracepoint_action_send): New.
10788 (l_tracepoint_action_send): New.
10789 (cmd_qtdp): Download and install tracepoint
10790 according to `use_agent'.
10791 (run_inferior_command): Add one more parameter `len'.
10792 Update callers.
10793 (tracepoint_send_agent): New.
10794 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10795
10796 2012-04-16 Yao Qi <yao@codesourcery.com>
10797
10798 * tracepoint.c (download_tracepoints): Moved to ...
10799 (cmd_qtstart): ... here.
10800
10801 2012-04-14 Yao Qi <yao@codesourcery.com>
10802
10803 * tracepoint.c: Include inttypes.h.
10804 (struct collect_memory_action): Use sized types.
10805 (struct tracepoint): Likewise.
10806 (cmd_qtdp, stop_tracing): Update print specifiers.
10807 (cmd_qtp, response_tracepoint): Likewise.
10808 (collect_data_at_tracepoint): Likewise.
10809 (collect_data_at_step): Likewise.
10810
10811 2012-04-14 Yao Qi <yao@codesourcery.com>
10812
10813 Import gnulib module inttypes.
10814 * aclocal.m4, config.in, configure: Regenerated.
10815
10816 2012-04-14 Yao Qi <yao@codesourcery.com>
10817
10818 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10819 Makefile and config.status at last.
10820
10821 2012-04-13 Yao Qi <yao@codesourcery.com>
10822
10823 * tracepoint.c: Include stdint.h unconditionally.
10824
10825 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10826
10827 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10828 on BFD_HAVE_SYS_PROCFS_TYPE.
10829 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10830 * configure: Regenerate.
10831 * config.in: Likewise.
10832
10833 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10834
10835 * Makefile.in (clean): Also remove x32.c x32-linux.c
10836 x32-avx.c x32-avx-linux.c.
10837 (x32.o): New target.
10838 (x32.c): Likewise.
10839 (x32-linux.o): Likewise.
10840 (x32-linux.c): Likewise.
10841 (x32-avx.o): Likewise.
10842 (x32-avx.c): Likewise.
10843 (x32-avx-linux.o): Likewise.
10844 (x32-avx-linux.c): Likewise.
10845
10846 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10847 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10848 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10849 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10850 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10851 i386/x32-avx-linux.xml.
10852
10853 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10854 (init_registers_x32_avx_linux): Likwise.
10855 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10856 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10857
10858 2012-04-13 Pedro Alves <palves@redhat.com>
10859
10860 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10861 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10862 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10863 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10864 the sub-make.
10865
10866 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10867
10868 * linux-x86-low.c (compat_x32_clock_t): New.
10869 (compat_x32_siginfo_t): Likewise.
10870 (compat_x32_siginfo_from_siginfo): Likewise.
10871 (siginfo_from_compat_x32_siginfo): Likewise.
10872 (linux_is_elf64): Likewise.
10873 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10874 and siginfo_from_compat_x32_siginfo for x32.
10875 (x86_arch_setup): Set linux_is_elf64.
10876
10877 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10878
10879 PR gdb/13969
10880 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10881 e_machine field.
10882 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10883 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10884 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10885 compatible with process.
10886
10887 2012-04-12 Yao Qi <yao@codesourcery.com>
10888
10889 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10890 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10891 (install-only, install-info, clean): Handle sub dir gnulib.
10892 (all-lib, am--refresh): New targets.
10893 (memmem.o): Remove target.
10894 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10895 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10896 (AC_REPLACE_FUNCS): Remove memmem.
10897 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10898 (AC_OUTPUT): Generate Makefile in gnulib/.
10899 * aclocal.m4, config.in, configure: Regenerated.
10900
10901 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10902
10903 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10904
10905 2012-04-05 Pedro Alves <palves@redhat.com>
10906
10907 -Werror=strict-aliasing
10908
10909 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10910 pointer.
10911
10912 2012-04-04 Pedro Alves <palves@redhat.com>
10913
10914 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10915 (sparc_store_gregset_from_stack, sparc_store_gregset)
10916 (sparc_breakpoint_at): Fix formatting.
10917
10918 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10919
10920 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10921 are available.
10922 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10923 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10924 * config.in: Regenerate.
10925 * configure: Likewise.
10926
10927 2012-03-29 Pedro Alves <palves@redhat.com>
10928
10929 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10930 Correct ptrace arguments.
10931
10932 2012-03-28 Pedro Alves <palves@redhat.com>
10933
10934 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10935 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10936 (IA64_FR1_REGNUM): New defines.
10937 (ia64_fetch_register): New.
10938 (the_low_target): Install it.
10939 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10940 field.
10941 * linux-low.c (linux_fetch_registers): Try the
10942 the_low_target.fetch_register hook first.
10943
10944 * linux-arm-low.c (the_low_target): Adjust.
10945 * linux-bfin-low.c (the_low_target): Adjust.
10946 * linux-cris-low.c (the_low_target): Adjust.
10947 * linux-crisv32-low.c (the_low_target): Adjust.
10948 * linux-m32r-low.c (the_low_target): Adjust.
10949 * linux-m68k-low.c (the_low_target): Adjust.
10950 * linux-mips-low.c (the_low_target): Adjust.
10951 * linux-ppc-low.c (the_low_target): Adjust.
10952 * linux-s390-low.c (the_low_target): Adjust.
10953 * linux-sh-low.c (the_low_target): Adjust.
10954 * linux-sparc-low.c (the_low_target): Adjust.
10955 * linux-tic6x-low.c (the_low_target): Adjust.
10956 * linux-x86-low.c (the_low_target): Adjust.
10957 * linux-xtensa-low.c (the_low_target): Adjust.
10958
10959 2012-03-26 Pedro Alves <palves@redhat.com>
10960
10961 * server.c (handle_qxfer_libraries): Don't bail early if
10962 the_target->qxfer_libraries_svr4 is not NULL.
10963
10964 2012-03-26 Pedro Alves <palves@redhat.com>
10965
10966 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10967
10968 2012-03-23 Pedro Alves <palves@redhat.com>
10969
10970 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10971 "library-list-svr4" element's start tag when the the DSO list is
10972 empty.
10973
10974 2012-03-23 Pedro Alves <palves@redhat.com>
10975
10976 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10977 a variable whose type size is the same as the inferior's pointer
10978 size.
10979
10980 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10981
10982 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10983 struct siginfo.
10984 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10985 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10986 * linux-low.h: Include <signal.h>.
10987 (struct siginfo): Remove forward declaration.
10988 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10989 struct siginfo.
10990
10991 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10992
10993 * .gitignore: Ignore more files.
10994
10995 2012-03-19 Pedro Alves <palves@redhat.com>
10996 Jan Kratochvil <jan.kratochvil@redhat.com>
10997
10998 * server.c (cont_thread, general_thread): Add describing comments.
10999 (start_inferior): Clear `cont_thread'.
11000 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11001 of a process.
11002
11003 2012-03-15 Yao Qi <yao@codesourcery.com>
11004
11005 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11006 handling to ...
11007 (cmd_qtdp): ... here.
11008
11009 2012-03-15 Yao Qi <yao@codesourcery.com>
11010
11011 * tracepoint.c (struct tracepoint_action_ops): New.
11012 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11013 (m_tracepoint_action_download): New.
11014 (r_tracepoint_action_download): New.
11015 (x_tracepoint_action_download): New.
11016 (l_tracepoint_action_download): New.
11017 (add_tracepoint_action): Install `action->ops' according type.
11018 (download_tracepoint_1): Move code `download' function pointer
11019 of various tracepoint_action_ops.
11020
11021 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11022
11023 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11024 linux_ptrace_attach_warnings.
11025
11026 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11027
11028 * Makefile.in (linux-ptrace.o): New.
11029 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11030 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11031 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11032 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11033 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11034 of these targets.
11035 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11036
11037 2012-03-08 Yao Qi <yao@codesourcery.com>
11038 Pedro Alves <palves@redhat.com>
11039
11040 Fix PR server/13392.
11041 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11042 offset of JMP insn.
11043 * tracepoint.c (remove_tracepoint): New.
11044 (cmd_qtdp): Call remove_tracepoint when failed to install.
11045
11046 2012-03-07 Pedro Alves <palves@redhat.com>
11047
11048 * linux-low.c (get_detach_signal): New.
11049 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11050 Pass on pending signals to PTRACE_DETACH. Check the result of the
11051 ptrace call.
11052 * server.c (program_signals, program_signals_p): New.
11053 (handle_general_set): Handle QProgramSignals.
11054 * server.h (program_signals, program_signals_p): Declare.
11055
11056 2012-03-05 Pedro Alves <palves@redhat.com>
11057 Jan Kratochvil <jan.kratochvil@redhat.com>
11058
11059 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11060 New comment why.
11061
11062 2012-03-03 Yao Qi <yao@codesourcery.com>
11063
11064 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11065 agent_look_up_symbols.
11066
11067 2012-03-03 Yao Qi <yao@codesourcery.com>
11068
11069 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11070 (linux-x86-low.o): Likewise.
11071 * server.h: Remove in_process_agent_loaded.
11072 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11073 common/agent.c.
11074 Update callers.
11075
11076 2012-03-03 Yao Qi <yao@codesourcery.com>
11077
11078 * tracepoint.c (gdb_agent_capability): New global.
11079 (in_process_agent_loaded_ust): Renamed to
11080 `in_process_agent_supports_ust'.
11081 Update callers.
11082 (in_process_agent_supports_ust): Call agent_capability_check.
11083 (clear_installed_tracepoints): Assert that agent supports
11084 agent.
11085
11086 2012-03-03 Yao Qi <yao@codesourcery.com>
11087
11088 * linux-low.c (linux_supports_agent): New.
11089 (linux_target_ops): Initialize field `supports_agent' with
11090 linux_supports_agent.
11091 * target.h (struct target_ops) <supports_agent>: New.
11092 (target_supports_agent): New macro.
11093 * server.c (handle_general_set): Handle packet 'QAgent'.
11094 (handle_query): Send `QAgent+'.
11095 * Makefile.in (server.o): Depends on agent.h.
11096
11097 2012-03-03 Yao Qi <yao@codesourcery.com>
11098
11099 * Makefile.in (OBS): Add agent.o.
11100 Add new rule for agent.o.
11101 Track dependence of tracepoint.c on agent.h.
11102 * tracepoint.c (run_inferior_command_1):
11103 (run_inferior_command): Call agent_run_command.
11104 (gdb_ust_connect_sync_socket): Deleted. Move it to
11105 common/agent.c.
11106 (resume_thread, stop_thread): Likewise.
11107 (gdb_ust_socket_init): Renamed to ...
11108 (gdb_agent_socket_init): ... New.
11109 (gdb_ust_thread): Renamed to ...
11110 (gdb_agent_helper_thread): ... New.
11111 (gdb_ust_init): Move some code to ...
11112 (gdb_agent_init): ... here. New.
11113 [HAVE_UST]: Call gdb_ust_init.
11114 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11115 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11116 * config.in, configure: Regenerated.
11117
11118 2012-03-02 Pedro Alves <palves@redhat.com>
11119
11120 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11121 * linux-low.c (struct simple_pid_list): New.
11122 (stopped_pids): New a struct simple_pid_list pointer.
11123 (add_to_pid_list, pull_pid_from_list): New.
11124 (handle_extended_wait): Don't assume the first signal new children
11125 report is SIGSTOP. Adjust call to pull_pid_from_list.
11126 (linux_wait_for_lwp): Adjust.
11127
11128 2012-03-02 Yao Qi <yao@codesourcery.com>
11129
11130 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11131 debug log.
11132
11133 2012-03-02 Yao Qi <yao@codesourcery.com>
11134
11135 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11136 `stop_pc' and `tpoint'. Update caller.
11137
11138 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11139
11140 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11141 * linux-low.c (use_linux_regsets): New macro.
11142 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11143 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11144 (linux_register_in_regsets): New function.
11145 (usr_fetch_inferior_registers): Skip registers covered by
11146 regsets.
11147 (usr_store_inferior_registers): Likewise.
11148 (usr_fetch_inferior_registers): New macro.
11149 (usr_store_inferior_registers): Likewise.
11150 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11151 (linux_store_registers): Likewise.
11152 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11153 prototype.
11154 (init_registers_mips64_dsp_linux): Likewise.
11155 (init_registers_mips_linux): New macro.
11156 (init_registers_mips_dsp_linux): Likewise.
11157 (mips_dsp_num_regs): Likewise.
11158 (DSP_BASE, DSP_CONTROL): New fallback macros.
11159 (mips_base_regs): New macro.
11160 (mips_regmap): Use it. Fix the size.
11161 (mips_dsp_regmap): New variable.
11162 (mips_dsp_regset_bitmap): Likewise.
11163 (mips_arch_setup): New function.
11164 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11165 than mips_regmap.
11166 (mips_cannot_store_register): Likewise.
11167 (the_low_target): Update .arch_setup, .num_regs and .regmap
11168 initializers. Add .regset_bitmap initializer.
11169 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11170 initializer.
11171 * linux-bfin-low.c (the_low_target): Likewise.
11172 * linux-cris-low.c (the_low_target): Likewise.
11173 * linux-crisv32-low.c (the_low_target): Likewise.
11174 * linux-ia64-low.c (the_low_target): Likewise.
11175 * linux-m32r-low.c (the_low_target): Likewise.
11176 * linux-m68k-low.c (the_low_target): Likewise.
11177 * linux-ppc-low.c (the_low_target): Likewise.
11178 * linux-s390-low.c (the_low_target): Likewise.
11179 * linux-sh-low.c (the_low_target): Likewise.
11180 * linux-sparc-low.c (the_low_target): Likewise.
11181 * linux-tic6x-low.c (the_low_target): Likewise.
11182 * linux-x86-low.c (the_low_target): Likewise.
11183 * linux-xtensa-low.c (the_low_target): Likewise.
11184 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11185 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11186 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11187 srv_xmlfiles.
11188 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11189 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11190
11191 2012-02-29 Yao Qi <yao@codesourcery.com>
11192 Pedro Alves <palves@redhat.com>
11193
11194 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11195 `step_over_finished' is true.
11196
11197 2012-02-27 Pedro Alves <palves@redhat.com>
11198
11199 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11200 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11201
11202 2012-02-27 Pedro Alves <palves@redhat.com>
11203
11204 PR server/9684
11205 * linux-low.c (pid_is_stopped): New.
11206 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11207
11208 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11209
11210 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11211 of conditions.
11212
11213 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11214
11215 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11216
11217 2012-02-24 Luis Machado <lgustavo@codesourcery>
11218
11219 * server.c (handle_query): Advertise support for target-side
11220 breakpoint condition evaluation.
11221 (process_point_options): New function.
11222 (process_serial_event): When inserting a breakpoint, check for
11223 a target-side condition that should be evaluated.
11224
11225 * mem-break.c: Include regcache.h and ax.h.
11226 (point_cond_list_t): New data structure.
11227 (breakpoint) <cond_list>: New field.
11228 (find_gdb_breakpoint_at): Make non-static.
11229 (delete_gdb_breakpoint_at): Clear any target-side
11230 conditions.
11231 (clear_gdb_breakpoint_conditions): New function.
11232 (add_condition_to_breakpoint): Likewise.
11233 (add_breakpoint_condition): Likewise.
11234 (gdb_condition_true_at_breakpoint): Likewise.
11235 (gdb_breakpoint_here): Return result directly instead
11236 of going through a local variable.
11237
11238 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11239 (clear_gdb_breakpoint_conditions): Likewise.
11240 (add_breakpoint_condition): Likewise.
11241 (gdb_condition_true_at_breakpoint): Likewise.
11242
11243 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11244 (need_step_over_p): Take target-side breakpoint condition into
11245 consideration.
11246
11247 2012-02-24 Luis Machado <lgustavo@codesourcery>
11248
11249 * server.h: Include tracepoint.h.
11250 (agent_mem_read, agent_get_trace_state_variable_value,
11251 agent_set_trace_state_variable_value,
11252 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11253 get_set_tsv_func_addr): New prototypes.
11254
11255 * ax.h: New include file.
11256 * ax.c: New source file.
11257
11258 * tracepoint.c: Include ax.h.
11259 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11260 agent_expr, eval_result_type): Move to ax.h.
11261 (parse_agent_expr): Rename to ...
11262 (gdb_parse_agent_expr): ... this, make it non-static and move
11263 to ax.h.
11264 (unparse_agent_expr) Rename to ...
11265 (gdb_unparse_agent_expr): ... this, make it non-static and move
11266 to ax.h.
11267 (eval_agent_expr): Rename to ...
11268 (eval_tracepoint_agent_expr): ... this.
11269 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11270 forward declarations.
11271 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11272 (agent_get_trace_state_variable_value): New function.
11273 (agent_set_trace_state_variable_value): New function.
11274 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11275 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11276 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11277 (condition_true_at_tracepoint): Likewise.
11278 (parse_agent_expr): Rename to ...
11279 (gdb_parse_agent_expr): ... this and move to ax.c.
11280 (unparse_agent_expr): Rename to ...
11281 (gdb_unparse_agent_expr): ... this and move to ax.c.
11282 (gdb_agent_op_name): Move to ax.c.
11283 (eval_agent_expr): Rename to ...
11284 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11285 and move to ax.c.
11286 (eval_tracepoint_agent_expr): New function.
11287 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11288 non-static.
11289 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11290 ax.c.
11291 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11292 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11293 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11294 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11295 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11296 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11297 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11298 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11299 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11300 (compile_bytecodes): Remove forward declaration.
11301 (is_goto_target): Move to ax.c.
11302 (compile_bytecodes): Move to ax.c and call
11303 agent_get_trace_state_variable_value (...) and
11304 agent_set_trace_state_variable_value (...).
11305
11306 * Makefile.in: Update ax.c and IPA dependencies.
11307
11308 2012-02-24 Pedro Alves <palves@redhat.com>
11309
11310 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11311 (cmd_bigqtbuffer_circular): ... this. Only handle
11312 'QTBuffer:circular:'.
11313 (handle_tracepoint_general_set): Adjust.
11314
11315 2012-02-16 Yao Qi <yao@codesourcery.com>
11316
11317 * inferiors.c: Move code to ...
11318 * dll.c: .... here. New.
11319 * server.h: Declare clear_dlls.
11320 * Makefile.in (SFILES): Add dll.c.
11321 (OBS): Add dll.o
11322 (dll.o): New rule.
11323
11324 2012-02-11 Yao Qi <yao@codesourcery.com>
11325
11326 * server.c: (handle_monitor_command): Add a new parameter
11327 `own_buf'.
11328 (handle_query): Update caller.
11329
11330 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11331
11332 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11333 * configure, config.in: Regenerate.
11334 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11335 is not defined.
11336
11337 2012-02-02 Pedro Alves <palves@redhat.com>
11338
11339 Try SIGKILL first, then PTRACE_KILL.
11340 * linux-low.c (linux_kill_one_lwp): New.
11341 (linux_kill_one_lwp): Rename to ...
11342 (kill_one_lwp_callback): ... this. Use the new
11343 linux_kill_one_lwp.
11344
11345 2012-02-02 Pedro Alves <palves@redhat.com>
11346
11347 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11348 inferior.
11349
11350 2012-01-27 Pedro Alves <palves@redhat.com>
11351
11352 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11353 (elf_64_file_p): Make static.
11354 (linux_pid_exe_is_elf_64_file): New.
11355 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11356 Delete declarations.
11357 (linux_pid_exe_is_elf_64_file): Declare.
11358 * linux-x86-low.c (x86_arch_setup): Use
11359 linux_pid_exe_is_elf_64_file.
11360
11361 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11362
11363 * linux-low.c (linux_wait_for_event_1): Rename to ...
11364 (linux_wait_for_event): ... here and merge it with former
11365 linux_wait_for_event - new variable wait_ptid, use it.
11366 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11367
11368 2012-01-23 Pedro Alves <palves@redhat.com>
11369
11370 * server.c (main): Avoid yet another case of infinite loop while
11371 detaching/killing after a longjmp.
11372
11373 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11374
11375 Code cleanup.
11376 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11377
11378 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11379
11380 * hostio.c (handle_readlink): New function.
11381 (handle_vFile): Call it to handle "vFile:readlink" packets.
11382
11383 2012-01-20 Pedro Alves <palves@redhat.com>
11384 Ulrich Weigand <ulrich.weigand@linaro.org>
11385
11386 * server.c (handle_v_requests): Only support vAttach and vRun to
11387 start multiple processes when in extended protocol mode.
11388
11389 2012-01-17 Pedro Alves <palves@redhat.com>
11390
11391 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11392 memalign plus mprotect to allocate the scratch buffer.
11393
11394 2012-01-13 Pedro Alves <palves@redhat.com>
11395
11396 * server.c (attach_inferior): Clear `cont_thread'.
11397
11398 2012-01-13 Pedro Alves <palves@redhat.com>
11399
11400 * server.c (main): Avoid infinite loop while detaching/killing
11401 after a longjmp.
11402
11403 2012-01-09 Doug Evans <dje@google.com>
11404
11405 * server.c (start_inferior): Set last_ptid in --wrapper case.
11406
11407 2012-01-06 Yao Qi <yao@codesourcery.com>
11408
11409 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11410 defined.
11411 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11412
11413 2012-01-04 Yao Qi <yao@codesourcery.com>
11414
11415 * tracepoint.c (cmd_qtdp): Print debug message
11416 for static tracepoint.
11417
11418 2012-01-04 Yao Qi <yao@codesourcery.com>
11419
11420 * tracepoint.c (trace_vdebug): Differentiate debug message
11421 between gdbserver and IPA.
11422
11423 2012-01-03 Yao Qi <yao@codesourcery.com>
11424
11425 * tracepoint.c (tracepoint_was_hit): Don't collect for
11426 static tracepoint.
11427
11428 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11429
11430 * terminal.h: Reformat copyright header.
11431
11432 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11433
11434 * server.c (gdbserver_version): Update copyright year.
11435 * gdbreplay.c (gdbreplay_version): Likewise.
11436
11437 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11438
11439 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11440
11441 Revert:
11442 2011-12-18 Hui Zhu <teawater@gmail.com>
11443 * linux-low.c (linux_create_inferior): Save return value to ret.
11444
11445 2011-12-18 Hui Zhu <teawater@gmail.com>
11446
11447 * linux-low.c (linux_create_inferior): Save return value to ret.
11448
11449 2011-12-16 Doug Evans <dje@google.com>
11450
11451 * linux-low.c (linux_create_inferior): If stdio connection,
11452 redirect stdin from /dev/null, stdout to stderr.
11453 * remote-utils.c (remote_is_stdio): New static global.
11454 (remote_connection_is_stdio): New function.
11455 (remote_prepare): Handle stdio connection.
11456 (remote_open): Ditto.
11457 (remote_close): Don't close stdin for stdio connections.
11458 (read_prim,write_prim): New functions. Replace all calls to
11459 read/write to these.
11460 * server.c (main): Watch for "-" argument. Move call to
11461 remote_prepare before start_inferior.
11462 * server.h (STDIO_CONNECTION_NAME): New macro.
11463 (remote_connection_is_stdio): Declare.
11464
11465 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11466 in debugging output.
11467
11468 2011-12-15 Yao Qi <yao@codesourcery.com>
11469
11470 * tracepoint.c: Include sys/syscall.h.
11471 (gdb_ust_thread): Remove preprocessor conditional.
11472
11473 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11474
11475 * linux-low.c (linux_detach_one_lwp): Call
11476 the_low_target.prepare_to_resume before detaching.
11477
11478 2011-12-14 Yao Qi <yao@codesourcery.com>
11479
11480 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11481 of write.
11482
11483 2011-12-14 Yao Qi <yao@codesourcery.com>
11484
11485 * i386-low.c (i386_low_stopped_data_address): Initialize local
11486 variable `control'.
11487
11488 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11489
11490 PR remote/13492
11491
11492 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11493 DR_CONTROL unless necessary. Extend comments.
11494 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11495 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11496
11497 2011-12-13 Yao Qi <yao@codesourcery.com>
11498
11499 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11500 macros.
11501 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11502
11503 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11504
11505 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11506 Print new debug message for such case.
11507
11508 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11509
11510 Fix overlapping memcpy.
11511 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11512 the read_inferior_memory transfer.
11513 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11514 write_inferior_memory transfer.
11515 (set_fast_tracepoint_jump): New variable buf. Use it for the
11516 read_inferior_memory and write_inferior_memory transfers.
11517 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11518 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11519 Use it for the write_inferior_memory transfer.
11520 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11521 buffers.
11522
11523 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11524
11525 * linux-low.c (fetch_register, store_register): Make code
11526 consistent, fix formatting.
11527
11528 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11529
11530 * linux-low.c (usr_store_inferior_registers): Factor out code
11531 to handle individual registers into...
11532 (store_register): ... this new function.
11533
11534 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11535
11536 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11537 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11538 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11539 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11540 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11541 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11542 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11543 (srv_xmlfiles): Add new XML files.
11544
11545 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11546 and <sys/uio.h>.
11547 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11548 (init_registers_s390_linux32v1): Add prototype.
11549 (init_registers_s390_linux32v2): Likewise.
11550 (init_registers_s390_linux64v1): Likewise.
11551 (init_registers_s390_linux64v2): Likewise.
11552 (init_registers_s390x_linux64v1): Likewise.
11553 (init_registers_s390x_linux64v2): Likewise.
11554 (s390_num_regs): Increment to 52.
11555 (s390_regmap): Add orig_r2 register.
11556 (s390_num_regs_3264): Increment to 68.
11557 (s390_regmap_3264): Add orig_r2 register.
11558 (s390_collect_ptrace_register): Handle orig_r2 register.
11559 (s390_supply_ptrace_register): Likewise.
11560 (s390_fill_last_break): New function.
11561 (s390_store_last_break): Likewise.
11562 (s390_fill_system_call): New function.
11563 (s390_store_system_call): Likewise.
11564 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11565 register sets.
11566 (s390_check_regset): New function.
11567 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11568 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11569 Update target_regsets for available register sets.
11570
11571 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11572 Jan Kratochvil <jan.kratochvil@redhat.com>
11573
11574 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11575 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11576 New.
11577 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11578 * linux-low.h (struct process_info_private): New member r_debug.
11579 * server.c (handle_qxfer_libraries): Call
11580 the_target->qxfer_libraries_svr4.
11581 (handle_qxfer_libraries_svr4): New function.
11582 (qxfer_packets): New entry "libraries-svr4".
11583 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11584 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11585 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11586 PACKET_qXfer_libraries_svr4.
11587
11588 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11589
11590 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11591 PSW address/mask between 8-byte and 16-byte formats.
11592 (s390_supply_ptrace_register): Likewise.
11593 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11594 basic addressing mode bit.
11595
11596 2011-11-24 Stan Shebs <stan@codesourcery.com>
11597
11598 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11599
11600 2011-11-17 Stan Shebs <stan@codesourcery.com>
11601
11602 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11603 (tracing_start_time): New global.
11604 (tracing_stop_time): New global.
11605 (tracing_user_name): New global.
11606 (tracing_notes): New global.
11607 (tracing_stop_note): New global.
11608 (cmd_qtstart): Set traceframe_usage, start_time.
11609 (stop_tracing): Set stop_time.
11610 (cmd_qtstatus): Report additional status.
11611 (cmd_qtp): New function.
11612 (handle_tracepoint_query): Call it.
11613 (cmd_qtnotes): New function.
11614 (handle_tracepoint_general_set): Call it.
11615 (get_timestamp): Rename from tsv_get_timestamp.
11616
11617 2011-11-14 Stan Shebs <stan@codesourcery.com>
11618 Kwok Cheung Yeung <kcy@codesourcery.com>
11619
11620 * linux-x86-low.c (small_jump_insn): New.
11621 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11622 trampoline and error message, build a trampoline and issue a small
11623 jump instruction to it.
11624 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11625 trampoline and error message.
11626 (x86_get_min_fast_tracepoint_insn_len): New.
11627 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11628 * linux-low.h (struct linux_target_ops): Add arguments to
11629 install_fast_tracepoint_jump_pad operation, add new operation.
11630 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11631 arguments.
11632 (linux_get_min_fast_tracepoint_insn_len): New function.
11633 (linux_target_op): Add new operation.
11634 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11635 (gdb_trampoline_buffer_end): Ditto.
11636 (gdb_trampoline_buffer_error): Ditto.
11637 (struct ipa_sym_addresses): Add fields for new IPA variables.
11638 (symbol_list): Add entries for new IPA variables.
11639 (struct tracepoint): Add fields to hold the address range of the
11640 trampoline used by the tracepoint.
11641 (trampoline_buffer_head): New static variable.
11642 (trampoline_buffer_tail): Ditto.
11643 (claim_trampoline_space): New function.
11644 (have_fast_tracepoint_trampoline_buffer): New function.
11645 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11646 structure.
11647 (install_fast_tracepoint): Ditto, also add error buffer argument.
11648 (cmd_qtminftpilen): New function.
11649 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11650 (fast_tracepoint_from_trampoline_address): New function.
11651 (fast_tracepoint_collecting): Handle trampoline as part of jump
11652 pad space.
11653 (set_trampoline_buffer_space): New function.
11654 (initialize_tracepoint): Initialize new IPA variables.
11655 * target.h (struct target_ops): Add arguments to
11656 install_fast_tracepoint_jump_pad operation, add new
11657 get_min_fast_tracepoint_insn_len operation.
11658 (target_get_min_fast_tracepoint_insn_len): New.
11659 (install_fast_tracepoint_jump_pad): Add arguments.
11660 * server.h (IPA_BUFSIZ): Define.
11661 * linux-i386-ipa.c: Include extra header files.
11662 (initialize_fast_tracepoint_trampoline_buffer): New function.
11663 (initialize_low_tracepoint): Call it.
11664 * server.h (set_trampoline_buffer_space): Declare.
11665 (claim_trampoline_space): Ditto.
11666 (have_fast_tracepoint_trampoline_buffer): Ditto.
11667
11668 2011-11-14 Yao Qi <yao@codesourcery.com>
11669
11670 * server.c (handle_query): Handle InstallInTrace for qSupported.
11671 * tracepoint.c (add_tracepoint): Sort list.
11672 (install_tracepoint, download_tracepoint): New.
11673 (cmd_qtdp): Call them to install and download tracepoints.
11674 (sort_tracepoints): Removed.
11675 (cmd_qtstart): Update.
11676
11677 2011-11-14 Yao Qi <yao@codesourcery.com>
11678
11679 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11680 * mem-break.h: Declare.
11681 * tracepoint.c (cmd_qtstart): Move some code to ...
11682 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11683 New.
11684 (download_tracepoints): Move some code to ...
11685 (download_tracepoint_1): ... here. New.
11686
11687 2011-11-08 Yao Qi <yao@codesourcery.com>
11688
11689 * remote-utils.c (relocate_instruction): A comment fix.
11690
11691 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11692
11693 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11694 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11695 dr_status_mirror and dr_control_mirror from debug_reg_state.
11696 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11697 (i386_initial_stuff): Remove use of deleted globals.
11698 (i386_get_thread_context, i386_set_thread_context,
11699 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11700 from debug_reg_state.
11701
11702 2011-11-05 Yao Qi <yao@codesourcery.com>
11703
11704 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11705 address as TPOINT's.
11706
11707 2011-11-02 Stan Shebs <stan@codesourcery.com>
11708
11709 * tracepoint.c (agent_mem_read_string): New function.
11710 (eval_agent_expr): Call it for tracenz.
11711 * server.c (handle_query): Report support for tracenz.
11712
11713 2011-11-02 Yao Qi <yao@codesourcery.com>
11714
11715 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11716
11717 2011-11-02 Yao Qi <yao@codesourcery.com>
11718
11719 * target.h: Fix a typo in comment.
11720
11721 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11722
11723 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11724 clobber the breakpoints' shadows with fast tracepoint jumps.
11725 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11726 * target.c (write_inferior_memory): Also pass MYADDR down to
11727 check_mem_write.
11728
11729 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11730
11731 * configure.ac: Check support for personality routine.
11732 * configure: Regenerate.
11733 * config.in: Likewise.
11734 * linux-low.c: Include <sys/personality.h>.
11735 Define ADDR_NO_RANDOMIZE if necessary.
11736 (linux_create_inferior): Disable address space randomization when
11737 forking inferior, if requested.
11738 (linux_supports_disable_randomization): New function.
11739 (linux_target_ops): Install it.
11740 * server.h (disable_randomization): Declare.
11741 * server.c (disable_randomization): New global variable.
11742 (handle_general_set): Handle QDisableRandomization.
11743 (handle_query): Likewise for qSupported.
11744 (main): Support --disable-randomization and --no-disable-randomization
11745 command line arguments.
11746 * target.h (struct target_ops): Add supports_disable_randomization.
11747 (target_supports_disable_randomization): New macro.
11748
11749 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11750
11751 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11752 ifdef check.
11753 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11754 [!PT_GETDSBT] (target_loadmap): New definition.
11755 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11756 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11757 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11758 and PT_GETDSBT to LINUX_LOADMAP.
11759 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11760 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11761
11762 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11763
11764 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11765 (arm_linux_hwbp_cap): New static variable.
11766 (arm_linux_get_hwbp_cap): Replace by ...
11767 (arm_linux_init_hwbp_cap): ... this new function.
11768 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11769 (arm_linux_get_hw_watchpoint_count): Likewise.
11770 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11771 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11772 (arm_prepare_to_resume): Use perror_with_name instead of error.
11773
11774 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11775
11776 * linux-arm-low.c: Include <signal.h>.
11777 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11778 (struct arm_linux_hwbp_cap): New data type.
11779 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11780 (struct arm_linux_hw_breakpoint): New data type.
11781 (MAX_BPTS, MAX_WPTS): Define.
11782 (struct arch_process_info, struct arch_lwp_info): New data types.
11783 (arm_linux_get_hwbp_cap): New function.
11784 (arm_linux_get_hw_breakpoint_count): Likewise.
11785 (arm_linux_get_hw_watchpoint_count): Likewise.
11786 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11787 (arm_hwbp_control_initialize): Likewise.
11788 (arm_hwbp_control_is_enabled): Likewise.
11789 (arm_hwbp_control_is_initialized): Likewise.
11790 (arm_hwbp_control_disable): Likewise.
11791 (arm_linux_hw_breakpoint_equal): Likewise.
11792 (arm_linux_hw_point_initialize): Likewise.
11793 (struct update_registers_data): New data structure.
11794 (update_registers_callback: New function.
11795 (arm_insert_point): Likewise.
11796 (arm_remove_point): Likewise.
11797 (arm_stopped_by_watchpoint): Likewise.
11798 (arm_stopped_data_address): Likewise.
11799 (arm_new_process): Likewise.
11800 (arm_new_thread): Likewise.
11801 (arm_prepare_to_resume): Likewise.
11802 (the_low_target): Register arm_insert_point, arm_remove_point,
11803 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11804 arm_new_thread, and arm_prepare_to_resume.
11805
11806 2011-09-15 Stan Shebs <stan@codesourcery.com>
11807
11808 * server.h (struct emit_ops): Add compare-goto fields.
11809 * tracepoint.c (gdb_agent_op_sizes): New table.
11810 (emit_eq_goto): New function.
11811 (emit_ne_goto): New function.
11812 (emit_lt_goto): New function.
11813 (emit_le_goto): New function.
11814 (emit_gt_goto): New function.
11815 (emit_ge_goto): New function.
11816 (is_goto_target): New function.
11817 (compile_bytecodes): Recognize special cases of compare-goto
11818 combinations and call specialized emitters for them.
11819 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11820 (amd64_emit_ne_goto): New function.
11821 (amd64_emit_lt_goto): New function.
11822 (amd64_emit_le_goto): New function.
11823 (amd64_emit_gt_goto): New function.
11824 (amd64_emit_ge_goto): New function.
11825 (amd64_emit_ops): Add the new functions.
11826 (i386_emit_eq_goto): New function.
11827 (i386_emit_ne_goto): New function.
11828 (i386_emit_lt_goto): New function.
11829 (i386_emit_le_goto): New function.
11830 (i386_emit_gt_goto): New function.
11831 (i386_emit_ge_goto): New function.
11832 (i386_emit_ops): Add the new functions.
11833
11834 2011-09-08 Stan Shebs <stan@codesourcery.com>
11835
11836 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11837 (i386_emit_epilogue): Restore %ebx.
11838
11839 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11840
11841 * server.c (step_thread): Remove definition.
11842 (process_serial_event): Don't handle Hs.
11843 * server.h (step_thread): Remove declaration.
11844 * target.c (set_desired_inferior): Remove use of step_thread.
11845
11846 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11847
11848 * linux-low.c: Include linux-procfs.h.
11849 (linux_attach_lwp_1): Update comments.
11850 (linux_attach): Scan for existing threads when attaching to a
11851 process that is the tgid.
11852 * Makefile.in: Update dependencies.
11853
11854 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11855
11856 * configure.srv: Add linux-procfs.o dependencies.
11857
11858 2011-08-14 Yao Qi <yao@codesourcery.com>
11859
11860 * target.h (struct target_ops): Fix indent.
11861 * win32-low.c (win32_target_ops): Fix comment.
11862
11863 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11864 Yao Qi <yao@codesourcery.com>
11865
11866 * Makefile.in (clean): Remove tic6x-*.c files.
11867 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11868 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11869 (tic6x-c64xp-linux.c): Likewise.
11870 * configure.srv: Add support for tic6x-*-uclinux.
11871 * linux-tic6x-low.c: New.
11872 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11873
11874 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11875 Yao Qi <yao@codesourcery.com>
11876
11877 * target.h (struct target_ops): Add read_loadmap.
11878 * linux-low.c (struct target_loadseg): New type.
11879 (struct target_loadmap): New type.
11880 (linux_read_loadmap): New function.
11881 (linux_target_ops): Add linux_read_loadmap.
11882 * server.c (handle_query): Support qXfer:fdpic:read packet.
11883 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11884 to NULL.
11885
11886 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11887
11888 * win32-low.c: Include <stdint.h>.
11889
11890 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11891
11892 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11893 to the inferior here.
11894 (i386_remove_aligned_watchpoint): Ditto.
11895 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11896 fit part of the watchpoint in the debug registers.
11897 (i386_update_inferior_debug_regs): New.
11898 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11899 registers, and only update the inferior on success.
11900 (i386_low_remove_watchpoint): Ditto.
11901
11902 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11903
11904 * linux-low.c (compare_ints, unique, list_threads, show_process,
11905 linux_core_of_thread): Delete.
11906 (linux_target_ops): Change linux_core_of_thread to
11907 linux_common_core_of_thread.
11908 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11909 * utils.c (malloc_failure): Change type of argument.
11910 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11911 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11912 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11913 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11914 (IPA_OBJS): Add common-utils-ipa.o.
11915 (ptid_h, linux_osdata_h): New macros.
11916 (server_h): Add common/common-utils.h, common/xml-utils.h,
11917 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11918 common/ptid.h.
11919 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11920 ptid.o, buffer.o): New rules.
11921 (linux-low.o): Add common/linux-osdata.h as a dependency.
11922 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11923 * configure.ac: Add AC_HEADER_DIRENT check.
11924 * config.in: Regenerate.
11925 * configure: Regenerate.
11926 * remote-utils.c (xml_escape_text): Delete.
11927 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11928 buffer_xml_printf): Move to common/buffer.c.
11929 * server.c (main): Remove call to initialize_inferiors.
11930 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11931 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11932 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11933 internal_error, gdb_assert, gdb_assert_fail): Delete.
11934 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11935 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11936 common/buffer.h.
11937 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11938 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11939 initialize_inferiors): Delete.
11940
11941 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11942
11943 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11944 symbol error.
11945
11946 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11947
11948 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11949 assertion.
11950 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11951
11952 2011-05-26 Yao Qi <yao@codesourcery.com>
11953
11954 * Makefile.in (thread-db.o): Track dependence to
11955 common/gdb_thread_db.h.
11956 * thread-db.c: include gdb_thread_db.h from right place.
11957
11958 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11959
11960 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11961 __FILE__ and __LINE__ to internal_error.
11962
11963 2011-05-13 Doug Evans <dje@google.com>
11964
11965 * thread-db.c (try_thread_db_load_from_sdir): New function.
11966 (try_thread_db_load_from_dir): New function.
11967 (thread_db_load_search): Handle $sdir, ignore $pdir.
11968 Remove trying of system directories if search of
11969 libthread-db-search-path fails, that is now done via $sdir.
11970
11971 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11972
11973 * server.c (handle_query): Add EnableDisableTracepoints to the list
11974 of supported features.
11975 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11976 tracepoints.
11977 (cmd_qtenable_disable): New.
11978 (cmd_qtstart): Install tracepoints even if disabled.
11979 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11980 receiving a QTEnable or QTDisable packet.
11981 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11982 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11983 tracepoints.
11984 (gdb_probe): Skip data collection if static tracepoint is disabled.
11985
11986 2011-05-10 Doug Evans <dje@google.com>
11987
11988 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11989
11990 2011-05-04 Doug Evans <dje@google.com>
11991
11992 * linux-low.c (linux_join): Skip process lookup.
11993 * spu-low.c (spu_join): Ditto.
11994 * server.c (join_inferiors_callback): Delete.
11995 (process_serial_event): For 'D' packet (detach) call join_inferior
11996 directly.
11997
11998 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11999
12000 * README: Don't mention xscale*-*-linux*.
12001 * configure.srv (xscale*-*-linux*): Don't handle target.
12002
12003 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12004
12005 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12006 casting pointers.
12007 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12008 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12009 (i386_emit_void_call_2): Likewise.
12010
12011 2011-04-26 Yao Qi <yao@codesourcery.com>
12012
12013 * linux-low.c: Move common macros to linux-ptrace.h.
12014 Include linux-ptrace.h.
12015 * Makefile.in (linux_ptrace_h): New.
12016 (linux-low.o): Depends on linux-ptrace.h.
12017
12018 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12019
12020 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12021 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12022 (remote_prepare): New function with most of the TCP code from ...
12023 (remote_open): ... here. Detect PORT here unconditionally. Move also
12024 setting transport_is_reliable.
12025 * server.c (run_once): New variable.
12026 (gdbserver_usage): Document it.
12027 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12028 the first run if RUN_ONCE.
12029 * server.h (run_once, remote_prepare): New declarations.
12030
12031 2011-04-19 Tom Tromey <tromey@redhat.com>
12032
12033 * win32-low.c (handle_load_dll): Remove duplicate "the".
12034
12035 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12036
12037 Remove support for old Cygwin 1.5 versions.
12038 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12039 function to avoid warning.
12040 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12041 warning.
12042
12043 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12044
12045 * gdbserver/server.h (Macro _): Define it if not available.
12046
12047 2011-03-14 Michael Snyder <msnyder@vmware.com>
12048
12049 * hostio.c (handle_close): Remove unnecessary null test.
12050
12051 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12052
12053 * Makefile.in (maintainer-clean realclean distclean): Remove
12054 "make ... subdir_do" command.
12055
12056 2011-03-10 Michael Snyder <msnyder@vmware.com>
12057
12058 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12059
12060 * server.c (handle_v_run): Free alloced buffer on early return.
12061
12062 2011-03-09 Yao Qi <yao@codesourcery.com>
12063
12064 Revert:
12065 2011-03-04 Yao Qi <yao@codesourcery.com>
12066
12067 * Makefile.in: Remove GNU make feature --directory.
12068
12069 2011-03-05 Yao Qi <yao@codesourcery.com>
12070
12071 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12072 (subdir_do): New make target. Copied from gdb/Makefile.
12073 (maintainer-clean, realclean, distclean, clean): Call corresponding
12074 make targets in common/Makefile.
12075
12076 2011-02-11 Yao Qi <yao@codesourcery.com>
12077
12078 * configure.ac: Call AC_PROG_RANLIB.
12079 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12080 * configure: Regenerate.
12081
12082 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12083
12084 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12085
12086 2011-03-06 Yao Qi <yao@codesourcery.com>
12087
12088 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12089
12090 2011-03-05 Yao Qi <yao@codesourcery.com>
12091
12092 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12093 (subdir_do): New make target. Copied from gdb/Makefile.
12094 (maintainer-clean, realclean, distclean, clean): Call corresponding
12095 make targets in common/Makefile.
12096
12097 2011-03-04 Yao Qi <yao@codesourcery.com>
12098
12099 * Makefile.in: Remove GNU make feature --directory.
12100
12101 2011-03-04 Michael Snyder <msnyder@vmware.com>
12102
12103 * server.c (queue_stop_reply): Call xmalloc not malloc.
12104
12105 2011-03-02 Michael Snyder <msnyder@vmware.com>
12106
12107 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12108
12109 2011-02-28 Michael Snyder <msnyder@vmware.com>
12110
12111 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12112 (cmd_qtframe): Ditto.
12113 (cmd_qtbuffer): Ditto.
12114 (cmd_bigqtbuffer): Ditto.
12115
12116 * utils.c (decimal2str): Initialize 'width' to nine, then
12117 don't mess with it.
12118
12119 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12120
12121 * hostio.c (require_data): Free *data, not data.
12122
12123 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12124
12125 * hostio.c (require_data): Use free, not xfree.
12126
12127 2011-02-27 Michael Snyder <msnyder@vmware.com>
12128
12129 * server.c (handle_query): Discard unused value.
12130
12131 * hostio.c (require_data): Free malloc memory before returning
12132 error.
12133
12134 2011-02-26 Michael Snyder <msnyder@vmware.com>
12135
12136 * linux-low.c (list_threads): Call closedir for dirent.
12137
12138 2011-02-27 Michael Snyder <msnyder@vmware.com>
12139
12140 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12141 a case statement falls through.
12142
12143 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12144
12145 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12146 in comparison.
12147
12148 2011-02-26 Michael Snyder <msnyder@vmware.com>
12149
12150 * utils.c (decimal2str): Eliminate dead code and dead param.
12151 (pulongest): Drop dead param from call to decimal2str.
12152 (plongest): Ditto.
12153
12154 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12155
12156 Revert the following patch (not approved yet):
12157 2011-02-21 Hui Zhu <teawater@gmail.com>
12158 * tracepoint.c (tp_printf): New function.
12159 (eval_agent_expr): Handle gdb_agent_op_printf.
12160
12161 2011-02-21 Hui Zhu <teawater@gmail.com>
12162
12163 * tracepoint.c (tp_printf): New function.
12164 (eval_agent_expr): Handle gdb_agent_op_printf.
12165
12166 2011-02-18 Tom Tromey <tromey@redhat.com>
12167
12168 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12169 (tracepoint.o): Likewise.
12170 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12171 (gdb_agent_op_names): Likewise.
12172
12173 2011-02-18 Tom Tromey <tromey@redhat.com>
12174
12175 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12176 gdb_agent_op_rot>: New constants.
12177 (gdb_agent_op_names): Add pick and roll.
12178 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12179 cases.
12180
12181 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12182
12183 * aclocal.m4: Regenerated with aclocal-1.11.1.
12184
12185 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12186
12187 * server.c (handle_qxfer_traceframe_info): New.
12188 (qxfer_packets): Register "traceframe-info".
12189 (handle_query): Report support for qXfer:traceframe-info:read+.
12190 * tracepoint.c (match_blocktype): New.
12191 (traceframe_find_block_type): Rename to ...
12192 (traceframe_walk_blocks): ... this. Add callback filter argument,
12193 and use it.
12194 (traceframe_find_block_type): New, reimplemented on top of
12195 traceframe_walk_blocks.
12196 (build_traceframe_info_xml): New.
12197 (traceframe_read_info): New.
12198 * server.h (traceframe_read_info): Declare.
12199
12200 2011-02-11 Yao Qi <yao@codesourcery.com>
12201
12202 * configure.ac: Call AC_PROG_RANLIB.
12203 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12204 * configure: Regenerate.
12205
12206 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12207
12208 * server.c (gdb_read_memory): Change return semantics to allow
12209 partial transfers.
12210 (handle_search_memory_1): Adjust.
12211 (process_serial_event) <'m' packet>: Handle partial transfers.
12212 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12213
12214 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12215
12216 * regcache.c (init_register_cache): Initialize
12217 regcache->register_status.
12218 (free_register_cache): Release regcache->register_status.
12219 (regcache_cpy): Copy register_status.
12220 (registers_to_string): Print 'x's for unavailable registers.
12221 (supply_register): Mark the register's status valid or
12222 unavailable, depending on whether a buffer was passed in or not.
12223 (supply_register_zeroed): New.
12224 (supply_regblock): Mark the registers' status valid or
12225 unavailable, depending on whether a buffer was passed in or not.
12226 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12227 (struct regcache): New `register_status' field.
12228 (supply_register_zeroed): Declare.
12229 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12230 supply_register_zeroed, rather than passing a NULL buffer to
12231 supply_register.
12232 * tracepoint.c (fetch_traceframe_registers): Update comment.
12233
12234 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12235
12236 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12237 buffer explicit.
12238
12239 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12240
12241 * server.h (decode_xfer_write): Change prototype.
12242 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12243 and don't extract the annex here.
12244 * server.c (decode_xfer_read): Remove `annex' parameter,
12245 and don't extract the annex here.
12246 (decode_xfer): New.
12247 (struct qxfer): New.
12248 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12249 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12250 (handle_qxfer_statictrace): New functions, abstracted out from
12251 handle_query, and made to use the struct qxfer interface.
12252 (handle_threads_qxfer_proper): Rename to ...
12253 (handle_qxfer_threads_proper): ... this.
12254 (handle_threads_qxfer): Rename to ...
12255 (handle_qxfer_threads): ... this. Adjust.
12256 (qxfer_packets): New array.
12257 (handle_qxfer): New function.
12258 (handle_query): Use handle_qxfer.
12259
12260 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12261
12262 * gdbreplay.c: Shorten lines of >= 80 columns.
12263 * linux-low.c: Ditto.
12264 * linux-ppc-low.c: Ditto.
12265 * linux-s390-low.c: Ditto.
12266 * linux-sparc-low.c: Ditto.
12267 * linux-x86-low.c: Ditto.
12268 * linux-xtensa-low.c: Ditto.
12269 * mem-break.c: Ditto.
12270 * nto-low.c: Ditto.
12271 * regcache.h: Ditto.
12272 * remote-utils.c: Ditto.
12273 * server.c: Ditto.
12274 * server.h: Ditto.
12275 * thread-db.c: Ditto.
12276 * tracepoint.c: Ditto.
12277 * utils.c: Ditto.
12278 * win32-low.h: Ditto.
12279
12280 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12281
12282 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12283 update.
12284
12285 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12286
12287 * server.c (gdbserver_version): Update copyright year in version
12288 output.
12289 * gdbreplay.c (gdbreplay_version): Ditto.
12290
12291 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12292
12293 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12294 * linux-bfin-low.c: New file.
12295 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12296 PT_DATA_ADDR for BFIN targets.
12297 * Makefile.in (SFILES): Add linux-bfin-low.c.
12298 (clean): Remove reg-bfin.c.
12299 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12300 * README: Mention supported Blackfin targets.
12301
12302 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12303
12304 * .gitignore: New file.
12305
12306 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12307
12308 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12309
12310 2010-10-22 Jie Zhang <jie@codesourcery.com>
12311
12312 * Makefile.in: Add FLAGS_TO_PASS variable.
12313 (install): Remove dependency of install-only and recursively
12314 invoke make for install-only.
12315
12316 2010-10-04 Doug Evans <dje@google.com>
12317
12318 * Makefile.in (uninstall): Use $(DESTDIR).
12319
12320 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12321
12322 PR gdb/11842
12323
12324 * linux-x86-low.c (compat_siginfo_from_siginfo)
12325 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12326 si_code is < 0. Check for si_code == SI_TIMER before checking for
12327 si_code < 0.
12328
12329 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12330
12331 * lynx-i386-low.c: New file.
12332 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12333
12334 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12335
12336 * lynx-low.c (ptrace_request_to_str): Remove handling for
12337 request values that have been removed in LynxOS 5.x.
12338
12339 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12340
12341 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12342 <ptrace.h>
12343
12344 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12345
12346 * configure.ac: Add --enable-inprocess-agent option.
12347 * configure: Rebuilt.
12348
12349 2010-09-06 Yao Qi <yao@codesourcery.com>
12350
12351 * linux-low.c (linux_kill): Remove unused variable.
12352 (linux_stabilize_threads): Likewise.
12353 * server.c (start_inferior): Likewise.
12354 (queue_stop_reply_callback): Likewise.
12355 * tracepoint.c (do_action_at_tracepoint): Likewise.
12356
12357 2010-09-06 Yao Qi <yao@codesourcery.com>
12358
12359 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12360 on return.
12361
12362 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12363
12364 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12365
12366 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12367
12368 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12369 "$(IPA_DEPFILES)".
12370
12371 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12372
12373 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12374 gdbserver/lynx-ppc-low.c: New files.
12375 * Makefile.in (lynx_low_h): New variable.
12376 (lynx-low.o, lynx-ppc-low.o): New rules.
12377 * configure.ac: On LynxOS, link with -lnetinet.
12378 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12379 * configure: regenerate.
12380
12381 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12382
12383 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12384 * configure.ac: Add check for vasprintf and vsnprintf.
12385 * configure, config.in: Regenerate.
12386 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12387
12388 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12389
12390 * gdbreplay.c: Move include of alloca.h up, next to include of
12391 malloc.h.
12392 * server.h: Add include of malloc.h.
12393 * mem-break.c: Remove include of malloc.h.
12394 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12395
12396 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12397
12398 * Makefile.in (memmem.o): Build with -Wno-error.
12399
12400 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12401
12402 * utils.c (xsnprintf): Make non-static.
12403 * server.h: Add xsnprintf declaration.
12404 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12405 replace calls to snprintf by calls to xsnprintf throughout.
12406
12407 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12408
12409 * configure.ac: Add configure check for alloca.
12410 * configure, config.in: Regenerate.
12411 * server.h: Include alloca.h if it exists.
12412 * gdbreplay.c: Include alloca.h if it exists.
12413
12414 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12415
12416 * linux-low.c (__SIGRTMIN): Define if not already defined.
12417 (linux_create_inferior): Check for __ANDROID__ rather than
12418 __SIGRTMIN.
12419 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12420 are already deferred.
12421 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12422 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12423 stopped and already has a pending signal to report.
12424 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12425 a pending signal to report or is moving out of a jump pad.
12426 (linux_init_signals): Check for __ANDROID__ rather than
12427 __SIGRTMIN.
12428
12429 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12430
12431 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12432 debug_threads check. Avoid a linear search when not doing debug
12433 output.
12434
12435 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12436
12437 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12438 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12439 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12440 (process_event): Change local fd's type to gdb_fildes_t.
12441 (create_file_handler): Adjust prototype.
12442 (delete_file_handler): Adjust prototype.
12443 (handle_file_event): Adjust prototype. Use pfildes.
12444 (create_file_event): Adjsut prototype.
12445 * remote-utils.c (remote_desc, listen_desc): Change type to
12446 gdb_fildes_t.
12447 * server.h: New gdb_fildes_t typedef.
12448 [USE_WIN32API]: Include winsock2.h.
12449 (delete_file_handler, add_file_handler): Adjust prototypes.
12450 (pfildes): Declare.
12451 * utils.c (pfildes): New.
12452
12453 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12454
12455 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12456 * configure: Regenerate.
12457
12458 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12459
12460 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12461 (linux_done_accessing_memory): ... this.
12462 (linux_target_ops): Adjust.
12463 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12464 * nto-low.c (nto_target_ops): Adjust comment.
12465 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12466 * spu-low.c (spu_target_ops): Adjust comment.
12467 * target.h (target_ops): Rename unprepare_to_access_memory field
12468 to done_accessing_memory.
12469 (unprepare_to_access_memory): Rename to ...
12470 (done_accessing_memory): ... this.
12471
12472 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12473
12474 * linux-low.c (linux_prepare_to_access_memory): New.
12475 (linux_unprepare_to_access_memory): New.
12476 (linux_target_ops): Install them.
12477 * server.c (read_memory): Rename to ...
12478 (gdb_read_memory): ... this. Use
12479 prepare_to_access_memory/prepare_to_access_memory.
12480 (write_memory): Rename to ...
12481 (gdb_write_memory): ... this. Use
12482 prepare_to_access_memory/prepare_to_access_memory.
12483 (handle_search_memory_1): Adjust.
12484 (process_serial_event): Adjust.
12485 * target.h (struct target_ops): New fields
12486 prepare_to_access_memory and unprepare_to_access_memory.
12487 (prepare_to_access_memory, unprepare_to_access_memory): New.
12488 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12489 prepare_to_access_memory/prepare_to_access_memory.
12490 * nto-low.c (nto_target_ops): Adjust.
12491 * spu-low.c (spu_target_ops): Adjust.
12492 * win32-low.c (win32_target_ops): Adjust.
12493
12494 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12495
12496 * Makefile.in (WARN_CFLAGS): Get it from configure.
12497 (WERROR_CFLAGS): New.
12498 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12499 * configure.ac: Introduce --enable-werror, which adds -Werror to
12500 the compiler command line. Enabled by default. Disable with
12501 --disable-werror. Add -Wdeclaration-after-statement
12502 Wpointer-arith and -Wformat-nonliteral to warning flags.
12503 * configure: Regenerate.
12504
12505 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12506
12507 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12508
12509 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12510
12511 * gdbreplay.c (remote_error): New.
12512 (gdbchar): New.
12513 (expect): Use gdbchar. Check for error reading from GDB.
12514 Clarify sync error output.
12515 (play): Check for errors writing to GDB.
12516 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12517 * remote-utils.c (getpkt): Check for errors writing to the remote
12518 descriptor.
12519
12520 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12521
12522 * linux-low.c (linux_wait_1): Move non-debugging code out of
12523 `debug_threads' control.
12524
12525 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12526
12527 * linux-low.c (linux_wait_1): Don't set last_status here.
12528 * server.c (push_event, queue_stop_reply_callback): Assert we're
12529 not pushing a TARGET_WAITKIND_IGNORE event.
12530 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12531 (myresume, handle_target_event): Set the thread's last_resume_kind
12532 and last_status from the target returned status.
12533
12534 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12535
12536 PR threads/10729
12537
12538 * linux-x86-low.c (update_debug_registers_callback): New.
12539 (i386_dr_low_set_addr): Use it.
12540 (i386_dr_low_get_addr): New.
12541 (i386_dr_low_set_control): Use update_debug_registers_callback.
12542 (i386_dr_low_get_control): New.
12543 (i386_dr_low_get_status): Adjust.
12544 * linux-low.c (linux_stop_lwp): New.
12545 * linux-low.h (linux_stop_lwp): Declare.
12546
12547 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12548 argument instead of a i386_debug_reg_state.
12549 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12550 a i386_debug_reg_state.
12551 (i386_insert_aligned_watchpoint): Adjust.
12552 (i386_remove_aligned_watchpoint): Adjust.
12553 (i386_low_stopped_data_address): Read the debug registers from the
12554 inferior instead of from the mirrors.
12555 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12556 (i386_dr_low_get_addr): Declare.
12557 (i386_dr_low_get_control): Declare.
12558 (i386_dr_low_get_status): Change prototype.
12559
12560 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12561 (i386_dr_low_get_addr): New.
12562 (i386_dr_low_get_control): New.
12563 (i386_dr_low_get_status): Adjust prototype. Return
12564 dr_status_mirror.
12565 (i386_initial_stuff): Clear dr_status_mirror and
12566 dr_control_mirror.
12567 (i386_get_thread_context): Adjust.
12568 (i386_set_thread_context): Adjust.
12569 (i386_thread_added): Adjust.
12570
12571 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12572
12573 * linux-low.h (linux_thread_area): Delete declaration.
12574
12575 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12576
12577 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12578 after its termination.
12579
12580 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12581
12582 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12583 (gdb_wants_all_stopped): Delete.
12584 (linux_wait_1): Don't call them.
12585 * server.c (handle_v_cont): Tag all threads as want-stopped.
12586 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12587 stopped as "client-wants-stopped".
12588
12589 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12590
12591 * Makefile.in (signals_h): New.
12592 (server_h): Depend on it.
12593 (server.o): Don't depend on $(signals_def).
12594 (signals.o): Depend on $(signals_def).
12595
12596 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12597
12598 * Makefile.in (signals_def): New.
12599 (server_h): Append include/gdb/signals.h and signals_def.
12600 (server.o): Append signals_def.
12601
12602 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12603
12604 * server.c (handle_target_event): Use target_signal_to_host for
12605 resume_info.sig initialization.
12606 * target.h (struct thread_resume) <sig>: New comment.
12607
12608 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12609
12610 * server.c (handle_query): strcpy() the returned string from paddress()
12611 instead of sprintf().
12612 * utils.c (paddress): Return phex_nz().
12613
12614 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12615
12616 * server.c (handle_v_cont): Call mourn_inferior if process
12617 just exited.
12618 (myresume): Likewise.
12619
12620 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12621
12622 Static tracepoints, and integration with UST.
12623
12624 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12625 * mem-break.c (uninsert_all_breakpoints)
12626 (reinsert_all_breakpoints): New.
12627 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12628 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12629 (gdb_agent_ust_loaded, helper_thread_id)
12630 (gdb_agent_helper_thread_id): New macros.
12631 (struct ipa_sym_addresses): Add addr_ust_loaded,
12632 addr_helper_thread_id, addr_cmd_buf.
12633 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12634 (in_process_agent_loaded_ust): New.
12635 (write_e_ust_not_loaded): New.
12636 (maybe_write_ipa_ust_not_loaded): New.
12637 (struct collect_static_trace_data_action): New.
12638 (enum tracepoint_type) <static_tracepoint>: New.
12639 (struct tracepoint) <handle>: Mention static tracepoints.
12640 (struct static_tracepoint_ctx): New.
12641 (CMD_BUF_SIZE): New.
12642 (add_tracepoint_action): Handle static tracepoint actions.
12643 (unprobe_marker_at): New.
12644 (clear_installed_tracepoints): Handle static tracepoints.
12645 (cmd_qtdp): Handle static tracepoints.
12646 (probe_marker_at): New.
12647 (cmd_qtstart): Handle static tracepoints.
12648 (response_tracepoint): Handle static tracepoints.
12649 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12650 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12651 (get_context_regcache): Handle static tracepoints.
12652 (do_action_at_tracepoint): Handle static tracepoint actions.
12653 (traceframe_find_block_type): Handle static trace data blocks.
12654 (traceframe_read_sdata): New.
12655 (download_tracepoints): Download static tracepoint actions.
12656 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12657 (GDB_PROBE_NAME): New.
12658 (ust_ops): New.
12659 (GET_UST_SYM): New.
12660 (USTF): New.
12661 (dlsym_ust): New.
12662 (ust_marker_to_static_tracepoint): New.
12663 (gdb_probe): New.
12664 (collect_ust_data_at_tracepoint): New.
12665 (gdb_ust_probe): New.
12666 (UNIX_PATH_MAX, SOCK_DIR): New.
12667 (gdb_ust_connect_sync_socket): New.
12668 (resume_thread, stop_thread): New.
12669 (run_inferior_command): New.
12670 (init_named_socket): New.
12671 (gdb_ust_socket_init): New.
12672 (cstr_to_hexstr): New.
12673 (next_st): New.
12674 (first_marker, next_marker): New.
12675 (response_ust_marker): New.
12676 (cmd_qtfstm, cmd_qtsstm): New.
12677 (unprobe_marker_at, probe_marker_at): New.
12678 (cmd_qtstmat, gdb_ust_thread): New.
12679 (gdb_ust_init): New.
12680 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12681 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12682 (ST_REGENTRY): New.
12683 (x86_64_st_collect_regmap): New.
12684 (X86_64_NUM_ST_COLLECT_GREGS): New.
12685 (AMD64_RIP_REGNUM): New.
12686 (supply_static_tracepoint_registers): New.
12687 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12688 (ST_REGENTRY): New.
12689 (i386_st_collect_regmap): New.
12690 (i386_NUM_ST_COLLECT_GREGS): New.
12691 (supply_static_tracepoint_registers): New.
12692 * server.c (handle_query): Handle qXfer:statictrace:read.
12693 <qSupported>: Report support for StaticTracepoints, and
12694 qXfer:statictrace:read features.
12695 * server.h (traceframe_read_sdata)
12696 (supply_static_tracepoint_registers): Declare.
12697 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12698 (unpack_varlen_hex): Include in IPA build.
12699 * Makefile.in (ustlibs, ustinc): New.
12700 (IPA_OBJS): Add remote-utils-ipa.o.
12701 ($(IPA_LIB)): Link -ldl and -lpthread.
12702 (UST_CFLAGS): New.
12703 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12704 * config.in, configure: Regenerate.
12705
12706 2010-06-20 Ian Lance Taylor <iant@google.com>
12707 Pedro Alves <pedro@codesourcery.com>
12708
12709 * linux-x86-low.c (always_true): Delete.
12710 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12711 trying to fool the compiler with always_true.
12712
12713 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12714
12715 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12716 conditions in gdbserver.
12717
12718 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12719
12720 * spu-low.c (spu_read_memory): Wrap around local store limit.
12721 (spu_write_memory): Likewise.
12722
12723 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12724
12725 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12726 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12727 LONGEST uses.
12728 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12729 uses.
12730 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12731 uses with LONGEST uses.
12732
12733 2010-06-14 Stan Shebs <stan@codesourcery.com>
12734 Pedro Alves <pedro@codesourcery.com>
12735
12736 Bytecode compiler.
12737
12738 * linux-x86-low.c: Include limits.h.
12739 (add_insns): New.
12740 (always_true): New.
12741 (EMIT_ASM): New.
12742 (EMIT_ASM32): New.
12743 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12744 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12745 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12746 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12747 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12748 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12749 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12750 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12751 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12752 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12753 (amd64_emit_void_call_2): New.
12754 (amd64_emit_ops): New.
12755 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12756 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12757 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12758 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12759 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12760 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12761 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12762 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12763 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12764 (i386_emit_stack_adjust, i386_emit_int_call_1)
12765 (i386_emit_void_call_2): New.
12766 (i386_emit_ops): New.
12767 (x86_emit_ops): New.
12768 (the_low_target): Install x86_emit_ops.
12769 * server.h (struct emit_ops): New.
12770 (get_raw_reg_func_addr): Declare.
12771 (current_insn_ptr, emit_error): Declare.
12772 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12773 (set_trace_state_variable_value): New defines.
12774 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12775 addr_get_trace_state_variable_value and
12776 addr_set_trace_state_variable_value.
12777 (symbol_list): New fields for get_raw_reg,
12778 get_trace_state_variable_value and set_trace_state_variable_value.
12779 (condfn): New typedef.
12780 (struct tracepoint): New field `compiled_cond'.
12781 (do_action_at_tracepoint): Clear compiled_cond.
12782 (get_trace_state_variable_value, set_trace_state_variable_value):
12783 Export in the IPA.
12784 (condition_true_at_tracepoint): If there's a compiled condition,
12785 run that.
12786 (current_insn_ptr, emit_error): New globals.
12787 (struct bytecode_address): New.
12788 (get_raw_reg_func_addr): New.
12789 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12790 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12791 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12792 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12793 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12794 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12795 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12796 (compile_tracepoint_condition, compile_bytecodes): New.
12797 * target.h (emit_ops): Forward declare.
12798 (struct target_ops): New field emit_ops.
12799 (target_emit_ops): New.
12800 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12801 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12802 * linux-low.c (linux_emit_ops): New.
12803 (linux_target_ops): Install it.
12804 * linux-low.h (struct linux_target_ops): New field emit_ops.
12805
12806 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12807
12808 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12809 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12810
12811 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12812 Stan Shebs <stan@codesourcery.com>
12813
12814 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12815 (all): Depend on $(extra_libraries).
12816 (install-only): Install the IPA.
12817 (IPA_OBJS, IPA_LIB): New.
12818 (clean): Remove the IPA lib.
12819 (IPAGENT_CFLAGS): New.
12820 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12821 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12822 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12823 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12824 * configure.ac: Check for atomic builtins support in the compiler.
12825 (IPA_DEPFILES, extra_libraries): Define.
12826 * configure.srv (ipa_obj): Add description.
12827 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12828 (i[34567]86-*-linux*): Set ipa_obj.
12829 (x86_64-*-linux*): Set ipa_obj.
12830 * linux-low.c (stabilizing_threads): New.
12831 (supports_fast_tracepoints): New.
12832 (linux_detach): Stabilize threads before detaching.
12833 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12834 the lwp is either not stabilizing, or is moving out of a jump pad.
12835 (linux_fast_tracepoint_collecting): New.
12836 (maybe_move_out_of_jump_pad): New.
12837 (enqueue_one_deferred_signal): New.
12838 (dequeue_one_deferred_signal): New.
12839 (linux_wait_for_event_1): If moving out of a jump pad, defer
12840 pending signals to later.
12841 (linux_stabilize_threads): New.
12842 (linux_wait_1): Check if threads need moving out of jump pads, and
12843 do it if so.
12844 (stuck_in_jump_pad_callback): New.
12845 (move_out_of_jump_pad_callback): New.
12846 (lwp_running): New.
12847 (linux_resume_one_lwp): Handle moving out of jump pads.
12848 (linux_set_resume_request): Dequeue deferred signals.
12849 (need_step_over_p): Also step over fast tracepoint jumps.
12850 (start_step_over): Also uninsert fast tracepoint jumps.
12851 (finish_step_over): Also reinsert fast tracepoint jumps.
12852 (linux_install_fast_tracepoint_jump): New.
12853 (linux_target_ops): Install linux_stabilize_threads and
12854 linux_install_fast_tracepoint_jump_pad.
12855 * linux-low.h (linux_target_ops) <get_thread_area,
12856 install_fast_tracepoint_jump_pad>: New fields.
12857 (struct lwp_info) <collecting_fast_tracepoint,
12858 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12859 (linux_get_thread_area): Declare.
12860 * linux-x86-low.c (jump_insn): New.
12861 (x86_get_thread_area): New.
12862 (append_insns): New.
12863 (push_opcode): New.
12864 (amd64_install_fast_tracepoint_jump_pad): New.
12865 (i386_install_fast_tracepoint_jump_pad): New.
12866 (x86_install_fast_tracepoint_jump_pad): New.
12867 (the_low_target): Install x86_get_thread_area and
12868 x86_install_fast_tracepoint_jump_pad.
12869 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12870 (struct fast_tracepoint_jump): New.
12871 (fast_tracepoint_jump_insn): New.
12872 (fast_tracepoint_jump_shadow): New.
12873 (find_fast_tracepoint_jump_at): New.
12874 (fast_tracepoint_jump_here): New.
12875 (delete_fast_tracepoint_jump): New.
12876 (set_fast_tracepoint_jump): New.
12877 (uninsert_fast_tracepoint_jumps_at): New.
12878 (reinsert_fast_tracepoint_jumps_at): New.
12879 (set_breakpoint_at): Use write_inferior_memory.
12880 (uninsert_raw_breakpoint): Use write_inferior_memory.
12881 (check_mem_read): Mask out fast tracepoint jumps.
12882 (check_mem_write): Mask out fast tracepoint jumps.
12883 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12884 (set_fast_tracepoint_jump): Declare.
12885 (delete_fast_tracepoint_jump)
12886 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12887 (reinsert_fast_tracepoint_jumps_at): Declare.
12888 * regcache.c: Don't compile many functions when building the
12889 in-process agent library.
12890 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12891 the register buffer in the heap.
12892 (free_register_cache): If the register buffer isn't owned by the
12893 regcache, don't free it.
12894 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12895 pre-existing register caches.
12896 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12897 type.
12898 (convert_ascii_to_int): : Constify `from' parameter type.
12899 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12900 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12901 the needed buffer in-place.
12902 (relocate_instruction): New.
12903 * server.c (handle_query) <qSymbols>: If the target supports
12904 tracepoints, give it a chance of looking up symbols. Report
12905 support for fast tracepoints.
12906 (handle_status): Stabilize threads.
12907 (process_serial_event): Adjust.
12908 * server.h (struct fast_tracepoint_jump): Forward declare.
12909 (struct process_info) <fast_tracepoint_jumps>: New field.
12910 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12911 (decode_X_packet, decode_M_packet): Adjust.
12912 (relocate_instruction): Declare.
12913 (in_process_agent_loaded): Declare.
12914 (tracepoint_look_up_symbols): Declare.
12915 (struct fast_tpoint_collect_status): Declare.
12916 (fast_tracepoint_collecting): Declare.
12917 (force_unlock_trace_buffer): Declare.
12918 (handle_tracepoint_bkpts): Declare.
12919 (initialize_low_tracepoint)
12920 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12921 * target.h (struct target_ops) <stabilize_threads,
12922 install_fast_tracepoint_jump_pad>: New fields.
12923 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12924 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12925 [HAVE_STDINT_H]: Include stdint.h.
12926 (trace_debug_1): Rename to ...
12927 (trace_vdebug): ... this.
12928 (trace_debug): Rename to ...
12929 (trace_debug_1): ... this. Add `level' parameter.
12930 (trace_debug): New.
12931 (ATTR_USED, ATTR_NOINLINE): New.
12932 (IP_AGENT_EXPORT): New.
12933 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12934 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12935 (about_to_request_buffer_space, trace_buffer_is_full)
12936 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12937 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12938 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12939 (traceframe_write_count, traceframes_created)
12940 (trace_state_variables)
12941 New renaming defines.
12942 (struct ipa_sym_addresses): New.
12943 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12944 (symbol_list): New.
12945 (ipa_sym_addrs): New.
12946 (all_tracepoint_symbols_looked_up): New.
12947 (in_process_agent_loaded): New.
12948 (write_e_ipa_not_loaded): New.
12949 (maybe_write_ipa_not_loaded): New.
12950 (tracepoint_look_up_symbols): New.
12951 (debug_threads) [IN_PROCESS_AGENT]: New.
12952 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12953 (UNKNOWN_SIDE_EFFECTS): New.
12954 (stop_tracing): New.
12955 (flush_trace_buffer): New.
12956 (stop_tracing_bkpt): New.
12957 (flush_trace_buffer_bkpt): New.
12958 (read_inferior_integer): New.
12959 (read_inferior_uinteger): New.
12960 (read_inferior_data_pointer): New.
12961 (write_inferior_data_pointer): New.
12962 (write_inferior_integer): New.
12963 (write_inferior_uinteger): New.
12964 (struct collect_static_trace_data_action): Delete.
12965 (enum tracepoint_type): New.
12966 (struct tracepoint) <type>: New field `type'.
12967 <actions_str, step_actions, step_actions_str>: Only include in
12968 GDBserver.
12969 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12970 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12971 (tracepoints): Use IP_AGENT_EXPORT.
12972 (last_tracepoint): Don't include in the IPA.
12973 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12974 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12975 (alloced_trace_state_variables): New.
12976 (trace_state_variables): Use IP_AGENT_EXPORT.
12977 (traceframe_t): Delete unused variable.
12978 (circular_trace_buffer): Don't include in the IPA.
12979 (trace_buffer_start): Delete.
12980 (struct trace_buffer_control): New.
12981 (trace_buffer_free): Delete.
12982 (struct ipa_trace_buffer_control): New.
12983 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12984 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12985 New.
12986 (trace_buffer_ctrl): New.
12987 (TRACE_BUFFER_CTRL_CURR): New.
12988 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12989 Reimplement as macros.
12990 (trace_buffer_wrap): Delete.
12991 (traceframe_write_count, traceframe_read_count)
12992 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12993 (struct tracepoint_hit_ctx) <type>: New field.
12994 (struct fast_tracepoint_ctx): New.
12995 (memory_barrier): New.
12996 (cmpxchg): New.
12997 (record_tracepoint_error): Update atomically in the IPA.
12998 (clear_inferior_trace_buffer): New.
12999 (about_to_request_buffer_space): New.
13000 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13001 updating the same buffer.
13002 (add_tracepoint): Default the tracepoint's type to trap
13003 tracepoint, and orig_size to -1.
13004 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13005 internal variables.
13006 (create_trace_state_variable): New parameter `gdb'. Handle it.
13007 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13008 (cmd_qtdp): Handle fast tracepoints.
13009 (cmd_qtdv): Adjust.
13010 (max_jump_pad_size): New.
13011 (gdb_jump_pad_head): New.
13012 (get_jump_space_head): New.
13013 (claim_jump_space): New.
13014 (sort_tracepoints): New.
13015 (MAX_JUMP_SIZE): New.
13016 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13017 IPA.
13018 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13019 support. Upload fast traceframes, and delete internal IPA
13020 breakpoints.
13021 (stop_tracing_handler): New.
13022 (flush_trace_buffer_handler): New.
13023 (cmd_qtstop): Upload fast tracepoints.
13024 (response_tracepoint): Handle fast tracepoints.
13025 (tracepoint_finished_step): Upload fast traceframes. Set the
13026 tracepoint hit context's tracepoint type.
13027 (handle_tracepoint_bkpts): New.
13028 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13029 type. Add comment about fast tracepoints.
13030 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13031 non-existing action_str field.
13032 (get_context_regcache): Handle fast tracepoints.
13033 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13034 to the regcache.
13035 (fast_tracepoint_from_jump_pad_address): New.
13036 (fast_tracepoint_from_ipa_tpoint_address): New.
13037 (collecting_t): New.
13038 (force_unlock_trace_buffer): New.
13039 (fast_tracepoint_collecting): New.
13040 (collecting): New.
13041 (gdb_collect): New.
13042 (write_inferior_data_ptr): New.
13043 (target_tp_heap): New.
13044 (target_malloc): New.
13045 (download_agent_expr): New.
13046 (UALIGN): New.
13047 (download_tracepoints): New.
13048 (download_trace_state_variables): New.
13049 (upload_fast_traceframes): New.
13050 (IPA_FIRST_TRACEFRAME): New.
13051 (IPA_NEXT_TRACEFRAME_1): New.
13052 (IPA_NEXT_TRACEFRAME): New.
13053 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13054 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13055 (gdb_jump_pad_buffer_end): New.
13056 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13057 (initialize_tracepoint): Adjust.
13058 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13059 buffer. Initialize the low module.
13060 * utils.c (PREFIX, TOOLNAME): New.
13061 (malloc_failure): Use PREFIX.
13062 (error): In the IPA, an error causes an exit.
13063 (fatal, warning): Use PREFIX.
13064 (internal_error): Use TOOLNAME.
13065 (NUMCELLS): Increase to 10.
13066 * configure, config.in: Regenerate.
13067
13068 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13069
13070 * server.c (handle_query) <qSupported>: Do two passes over the
13071 qSupported string to avoid nesting strtok.
13072
13073 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13074
13075 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13076 (CDEPS): New.
13077 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13078 -Wl,--dynamic-list.
13079 * configure: Regenerate.
13080 * proc-service.list: New.
13081
13082 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13083
13084 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13085 New comment.
13086
13087 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13088
13089 * gdbreplay.c (remote_open): Check error return from socket() call by
13090 its equality to -1 not by it being negative.
13091 * remote-utils.c (remote_open): Likewise.
13092
13093 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13094
13095 * config.h: Regenerate.
13096
13097 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13098
13099 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13100 doesn't provide PTRACE_GET_THREAD_AREA.
13101
13102 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13103
13104 * linux-m68k-low.c: Include <asm/ptrace.h>
13105 (ps_get_thread_area): Implement.
13106
13107 2010-05-03 Doug Evans <dje@google.com>
13108
13109 * event-loop.c (struct callback_event): New struct.
13110 (callback_list): New global.
13111 (append_callback_event, delete_callback_event): New functions.
13112 (process_callback): New function.
13113 (start_event_loop): Call it.
13114 * remote-utils.c (NOT_SCHEDULED): Define.
13115 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13116 moved out of readchar.
13117 (readchar): Rewrite. Call reschedule before returning.
13118 (reset_readchar): New function.
13119 (remote_close): Call it.
13120 (process_remaining, reschedule): New functions.
13121 * server.h (callback_handler_func): New typedef.
13122 (append_callback_event, delete_callback_event): Declare.
13123
13124 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13125
13126 * proc-service.c (ps_pglobal_lookup): Use
13127 thread_db_look_up_one_symbol.
13128 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13129 parameter. Use it instead of all_symbols_looked_up.
13130 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13131 field.
13132 (all_symbols_looked_up): Don't declare.
13133 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13134 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13135 field.
13136 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13137 Set all_symbols_looked_up here.
13138 (thread_db_look_up_one_symbol): New.
13139 (thread_db_get_tls_address): Adjust.
13140 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13141 thread_db object on the heap, and tentatively set it in the
13142 process structure.
13143 (thread_db_init): Don't set all_symbols_looked_up here.
13144 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13145
13146 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13147
13148 * linux-low.c (linux_kill, linux_detach): Adjust.
13149 (status_pending_p_callback): Remove redundant statement. Check
13150 for !TARGET_WAITIKIND_IGNORE, instead of
13151 TARGET_WAITKIND_STOPPED.
13152 (handle_tracepoints): Make sure LWP is locked. Adjust.
13153 (linux_wait_for_event_1): Adjust.
13154 (linux_cancel_breakpoints): New.
13155 (unsuspend_one_lwp): New.
13156 (unsuspend_all_lwps): New.
13157 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13158 (send_sigstop_callback): Change return type to int, add new
13159 `except' parameter and handle it.
13160 (suspend_and_send_sigstop_callback): New.
13161 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13162 pass them down. If SUSPEND, also increment the lwp's suspend
13163 count.
13164 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13165 (need_step_over_p): Don't consider suspended LWPs.
13166 (start_step_over): Adjust.
13167 (proceed_one_lwp): Change return type to int, add new `except'
13168 parameter and handle it.
13169 (unsuspend_and_proceed_one_lwp): New.
13170 (proceed_all_lwps): Use find_inferior instead of
13171 for_each_inferior.
13172 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13173 also decrement the suspend count of LWPs. Pass `except' down,
13174 instead of hacking its suspend count.
13175 (linux_pause_all): Add `freeze' parameter. Adjust.
13176 (linux_unpause_all): New.
13177 (linux_target_ops): Install linux_unpause_all.
13178 * server.c (handle_status): Adjust.
13179 * target.h (struct target_ops): New fields `unpause_all' and
13180 `cancel_breakpoints'. Add new parameter to `pause_all'.
13181 (pause_all): Add new `freeze' parameter.
13182 (unpause_all): New.
13183 (cancel_breakpoints): New.
13184 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13185 cancel breakpoints.
13186 (cmd_qtstart): Pause threads.
13187 (stop_tracing): Pause threads, and cancel breakpoints.
13188 * win32-low.c (win32_target_ops): Adjust.
13189
13190 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13191
13192 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13193 the inferior right away from here...
13194 (linux_wait_1): ... to here, and adjust to check the thread's
13195 last_resume_kind instead of the lwp's step or stop_expected flags.
13196
13197 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13198
13199 * README: Use consistent `GDB' and `GDBserver' spellings.
13200
13201 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13202
13203 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13204 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13205 (linux_detach_one_lwp): Assume the lwp is stopped.
13206 (any_thread_of): Delete.
13207 (linux_detach): Stop all lwps here. Don't blindly delete all
13208 breakpoints.
13209 (delete_lwp_callback): New.
13210 (linux_mourn): Delete all lwps of the process that is gone.
13211 (linux_wait_1): Don't delete the last lwp of the process here.
13212 * mem-break.h (mark_breakpoints_out): Declare.
13213 * mem-break.c (mark_breakpoints_out): New.
13214 (free_all_breakpoints): Use it.
13215 * server.c (handle_target_event): If the process is gone, mark
13216 breakpoints out.
13217 * thread-db.c (struct thread_db) <create_bp>: New field.
13218 (thread_db_enable_reporting): Fix prototype. Store a thread event
13219 breakpoint reference in the thread_db struct.
13220 (thread_db_load_search): Clear the thread_db object.
13221 (try_thread_db_load_1): Ditto.
13222 (switch_to_process): New.
13223 (disable_thread_event_reporting): Use it.
13224 (remove_thread_event_breakpoints): New.
13225 (thread_db_detach, thread_db_mourn): Use it.
13226
13227 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13228
13229 * linux-low.c (linux_enable_event_reporting): New.
13230 (linux_wait_for_event_1, handle_extended_wait): Use it.
13231
13232 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13233
13234 * linux-low.c (linux_kill_one_lwp, linux_kill)
13235 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13236 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13237 SIGSTOP even if the LWP is stopped.
13238 (send_sigstop_callback): New.
13239 (stop_all_lwps): Use send_sigstop_callback instead.
13240 (linux_resume_one_thread): Adjust.
13241 (proceed_one_lwp): Still proceed an LWP that the client has
13242 requested to stop, if we haven't reported it as stopped yet. Make
13243 sure that LWPs the client want stopped, have a pending SIGSTOP.
13244
13245 2010-04-26 Doug Evans <dje@google.com>
13246
13247 * server.c (handle_general_set): Make static.
13248
13249 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13250 Print received char after testing for error/eof instead of before.
13251 (input_interrupt): Tweak comment.
13252
13253 2010-04-23 Doug Evans <dje@google.com>
13254
13255 * server.c (start_inferior): Print inferior argv if --debug.
13256
13257 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13258
13259 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13260 * nto-x86-low.c: Include server.h
13261
13262 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13263
13264 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13265 be consistent with other sources of this directory.
13266 (init_registers_amd64): Correct name of source file of this function
13267 in the comment.
13268
13269 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13270
13271 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13272 64-bit executables.
13273
13274 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13275
13276 * win32-i386-low.c: Add 64-bit support.
13277 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13278 (init_registers_amd64): Declare.
13279 (mappings): Add 64-bit version of array.
13280 (init_windows_x86): New function.
13281 (the_low_target): Change init_arch field to init_windows_x86.
13282
13283 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13284
13285 * win32-low.c: Adapt to support also 64-bit architecture.
13286 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13287 (get_image_name): Use SIZE_T type for local variable `done'.
13288 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13289 (toolhelp_get_dll_name): Idem.
13290 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13291 Use uintptr_t typecast to avoid warning.
13292 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13293 (handle_exception): Use phex_nz to avoid warning.
13294 (win32_wait): Remove unused local variable `process'.
13295
13296 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13297
13298 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13299 `amd64-avx.o'.
13300
13301 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13302
13303 * configure.ac: Use `ws2_32' library for srv_mingw.
13304 * configure: Regenerate.
13305 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13306 * remote-utils.c: Likewise.
13307
13308 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13309
13310 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13311 if __x86_64__ is defined.
13312
13313 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13314
13315 * configure: Regenerate.
13316
13317 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13318
13319 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13320 * target.h (target_ops): New get_tib_address field.
13321 * win32-low.h (win32_thread_info): Add thread_local_base field.
13322 * win32-low.c (child_add_thread): Add tlb argument.
13323 Set thread_local_base field to TLB.
13324 (get_child_debug_event): Adapt to child_add_thread change.
13325 (win32_get_tib_address): New function.
13326 (win32_target_ops): Set get_tib_address field to
13327 win32_get_tib_address.
13328 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13329
13330 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13331
13332 * linux-low.c (linux_mourn): Also remove the process.
13333 * server.c (handle_target_event): Don't remove the process here.
13334 * nto-low.c (nto_mourn): New.
13335 (nto_target_ops): Install it.
13336 * spu-low.c (spu_mourn): New.
13337 (spu_target_ops): Install it.
13338 * win32-low.c (win32_mourn): New.
13339 (win32_target_ops): Install it.
13340
13341 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13342
13343 * server.h (buffer_xml_printf): Remove redundant `;'.
13344
13345 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13346
13347 * regcache.c (set_register_cache): Invalidate regcaches before
13348 changing the register cache layout.
13349 (regcache_invalidate_one): Allow a NULL regcache.
13350 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13351 regcaches before changing the register cache layout or the target
13352 regsets.
13353
13354 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13355
13356 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13357 variable warning on Linux/x86-64.
13358
13359 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13360
13361 GDBserver disconnected tracing support.
13362
13363 * linux-low.c (linux_remove_process): Delete.
13364 (add_lwp): Don't set last_resume_kind here.
13365 (linux_kill): Use `mourn'.
13366 (linux_detach): Use `thread_db_detach', and `mourn'.
13367 (linux_mourn): New.
13368 (linux_attach_lwp_1): Adjust comment.
13369 (linux_attach): last_resume_kind moved the thread_info; adjust.
13370 (status_pending_p_callback): Adjust.
13371 (linux_wait_for_event_1): Adjust.
13372 (count_events_callback, select_singlestep_lwp_callback)
13373 (select_event_lwp_callback, cancel_breakpoints_callback)
13374 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13375 (proceed_one_lwp): Adjust.
13376 (linux_async): Add debug output.
13377 (linux_thread_stopped): New.
13378 (linux_pause_all): New.
13379 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13380 linux_pause_all.
13381 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13382 (thread_db_free): Delete declaration.
13383 (thread_db_detach, thread_db_mourn): Declare.
13384 * thread-db.c (thread_db_init): Use thread_db_mourn.
13385 (thread_db_free): Delete, split in two.
13386 (disable_thread_event_reporting): New.
13387 (thread_db_detach): New.
13388 (thread_db_mourn): New.
13389
13390 * server.h (struct thread_info) <last_resume_kind>: New field.
13391 <attached>: Add comment.
13392 <gdb_detached>: New field.
13393 (handler_func): Change return type to int.
13394 (handle_serial_event, handle_target_event): Ditto.
13395 (gdb_connected): Declare.
13396 (tracing): Delete.
13397 (disconnected_tracing): Declare.
13398 (stop_tracing): Declare.
13399
13400 * server.c (handle_query) <qSupported>: Report support for
13401 disconnected tracing.
13402 (queue_stop_reply_callback): Account for running threads.
13403 (gdb_wants_thread_stopped): New.
13404 (gdb_wants_all_threads_stopped): New.
13405 (gdb_reattached_process): New.
13406 (handle_status): Clear the `gdb_detached' flag of all processes.
13407 In all-stop, stop all threads.
13408 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13409 (process_serial_event): If the remote connection breaks, or if an
13410 exit was forced with "monitor exit", force an event loop exit.
13411 Handle disconnected tracing on detach.
13412 (handle_serial_event): Adjust.
13413 (handle_target_event): If GDB isn't connected, forward events back
13414 to the inferior, unless the last process exited, in which case,
13415 exit gdbserver. Adjust interface.
13416
13417 * remote-utils.c (remote_open): Don't block in accept. Instead
13418 register an event loop source on the listen socket file
13419 descriptor. Refactor bits into ...
13420 (listen_desc): ... this new global.
13421 (gdb_connected): ... this new function.
13422 (enable_async_notification): ... this new function.
13423 (handle_accept_event): ... this new function.
13424 (remote_close): Clear remote_desc.
13425
13426 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13427
13428 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13429 New fields.
13430 (mourn_inferior): Define.
13431 (target_process_qsupported): Avoid the dangling else problem.
13432 (thread_stopped): Define.
13433 (pause_all): Define.
13434 (target_waitstatus_to_string): Declare.
13435 * target.c (target_waitstatus_to_string): New.
13436
13437 * tracepoint.c (tracing): Make extern.
13438 (disconnected_tracing): New.
13439 (stop_tracing): Make extern. Handle tracing stops due to GDB
13440 disconnecting.
13441 (cmd_qtdisconnected): New.
13442 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13443 (handle_tracepoint_general_set): Handle QTDisconnected.
13444
13445 * event-loop.c (event_handler_func): Change return type to int.
13446 (process_event): Bail out if the event handler wants the event
13447 loop to stop.
13448 (handle_file_event): Ditto.
13449 (start_event_loop): Bail out if the event handler wants the event
13450 loop to stop.
13451
13452 * nto-low.c (nto_target_ops): Adjust.
13453 * spu-low.c (spu_wait): Don't remove the process here.
13454 (spu_target_ops): Adjust.
13455 * win32-low.c (win32_wait): Don't remove the process here.
13456 (win32_target_ops): Adjust.
13457
13458 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13459
13460 * regcache.c (realloc_register_cache): Invalidate inferior's
13461 regcache before recreating it.
13462
13463 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13464
13465 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13466
13467 2010-04-09 Stan Shebs <stan@codesourcery.com>
13468 Pedro Alves <pedro@codesourcery.com>
13469
13470 * server.h (LONGEST): New.
13471 (struct thread_info) <while_stepping>: New field.
13472 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13473 Declare.
13474 (initialize_tracepoint, handle_tracepoint_general_set)
13475 (handle_tracepoint_query, tracepoint_finished_step)
13476 (tracepoint_was_hit, release_while_stepping_state_list):
13477 (current_traceframe): Declare.
13478 * server.c (handle_general_set): Handle tracepoint packets.
13479 (read_memory): New.
13480 (write_memory): New.
13481 (handle_search_memory_1): Use read_memory.
13482 (handle_query): Report support for conditional tracepoints, trace
13483 state variables, and tracepoint sources. Handle tracepoint
13484 queries.
13485 (main): Initialize the tracepoints module.
13486 (process_serial_event): Handle traceframe reads/writes.
13487
13488 * linux-low.c (handle_tracepoints): New.
13489 (linux_wait_1): Call it.
13490 (linux_resume_one_lwp): Handle while-stepping.
13491 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13492 (linux_target_ops): Install them.
13493 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13494 New field.
13495 * linux-x86-low.c (x86_supports_tracepoints): New.
13496 (the_low_target). Install it.
13497
13498 * mem-break.h (delete_breakpoint): Declare.
13499 * mem-break.c (delete_breakpoint): Make external.
13500
13501 * target.h (struct target_ops): Add `supports_tracepoints',
13502 `read_pc', and `write_pc' fields.
13503 (target_supports_tracepoints): Define.
13504 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13505 (phex_nz): New.
13506
13507 * regcache.h (struct regcache) <registers_owned>: New field.
13508 (init_register_cache, regcache_cpy): Declare.
13509 (regcache_read_pc, regcache_write_pc): Declare.
13510 (register_cache_size): Declare.
13511 (supply_regblock): Declare.
13512 * regcache.c (init_register_cache): New.
13513 (new_register_cache): Use it.
13514 (regcache_cpy): New.
13515 (register_cache_size): New.
13516 (supply_regblock): New.
13517 (regcache_read_pc, regcache_write_pc): New.
13518
13519 * tracepoint.c: New.
13520
13521 * Makefile.in (OBS): Add tracepoint.o.
13522 (tracepoint.o): New rule.
13523
13524 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13525
13526 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13527 (i386-mmx.o): New.
13528 (i386-mmx.c): Likewise.
13529 (i386-mmx-linux.o): Likewise.
13530 (i386-mmx-linux.c): Likewise.
13531
13532 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13533 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13534 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13535 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13536
13537 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13538 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13539 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13540
13541 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13542
13543 * Makefile.in (clean): Updated.
13544 (i386-avx.o): New.
13545 (i386-avx.c): Likewise.
13546 (i386-avx-linux.o): Likewise.
13547 (i386-avx-linux.c): Likewise.
13548 (amd64-avx.o): Likewise.
13549 (amd64-avx.c): Likewise.
13550 (amd64-avx-linux.o): Likewise.
13551 (amd64-avx-linux.c): Likewise.
13552
13553 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13554 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13555 (srv_amd64_regobj): Add amd64-avx.o.
13556 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13557 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13558 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13559 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13560 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13561 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13562 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13563
13564 * i387-fp.c: Include "i386-xstate.h".
13565 (i387_xsave): New.
13566 (i387_cache_to_xsave): Likewise.
13567 (i387_xsave_to_cache): Likewise.
13568 (x86_xcr0): Likewise.
13569
13570 * i387-fp.h (i387_cache_to_xsave): Likewise.
13571 (i387_xsave_to_cache): Likewise.
13572 (x86_xcr0): Likewise.
13573
13574 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13575 * linux-crisv32-low.c (target_regsets): Likewise.
13576 * linux-m68k-low.c (target_regsets): Likewise.
13577 * linux-mips-low.c (target_regsets): Likewise.
13578 * linux-ppc-low.c (target_regsets): Likewise.
13579 * linux-s390-low.c (target_regsets): Likewise.
13580 * linux-sh-low.c (target_regsets): Likewise.
13581 * linux-sparc-low.c (target_regsets): Likewise.
13582 * linux-xtensa-low.c (target_regsets): Likewise.
13583
13584 * linux-low.c: Include <sys/uio.h>.
13585 (regsets_fetch_inferior_registers): Support nt_type.
13586 (regsets_store_inferior_registers): Likewise.
13587 (linux_process_qsupported): New.
13588 (linux_target_ops): Add linux_process_qsupported.
13589
13590 * linux-low.h (regset_info): Add nt_type.
13591 (linux_target_ops): Add process_qsupported.
13592
13593 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13594 and <sys/uio.h>.
13595 (init_registers_i386_avx_linux): New.
13596 (init_registers_amd64_avx_linux): Likewise.
13597 (xmltarget_i386_linux_no_xml): Likewise.
13598 (xmltarget_amd64_linux_no_xml): Likewise.
13599 (PTRACE_GETREGSET): Likewise.
13600 (PTRACE_SETREGSET): Likewise.
13601 (x86_fill_xstateregset): Likewise.
13602 (x86_store_xstateregset): Likewise.
13603 (use_xml): Likewise.
13604 (x86_linux_update_xmltarget): Likewise.
13605 (x86_linux_process_qsupported): Likewise.
13606 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13607 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13608 init_registers_i386_linux here. Call
13609 x86_linux_update_xmltarget.
13610 (the_low_target): Add x86_linux_process_qsupported.
13611
13612 * server.c (handle_query): Call target_process_qsupported.
13613
13614 * target.h (target_ops): Add process_qsupported.
13615 (target_process_qsupported): New.
13616
13617 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13618
13619 * inferiors.c (add_thread): Set last_status kind to
13620 TARGET_WAITKIND_IGNORE.
13621 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13622 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13623 (linux_wait_1): Move `thread' local definition to block that uses
13624 it. Don't NULL initialize `event_child'.
13625 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13626 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13627 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13628
13629 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13630
13631 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13632 an extended waitstatus, or by a watchpoint.
13633 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13634 thread was stepping or has been stopped by a watchpoint.
13635
13636 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13637
13638 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13639 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13640 of another, then delete the previous, and validate all
13641 breakpoints.
13642 (validate_inserted_breakpoint): New.
13643 (delete_disabled_breakpoints): New.
13644 (validate_breakpoints): New.
13645 (check_mem_read): Validate breakpoints before trusting their
13646 shadow. Delete disabled breakpoints.
13647 (check_mem_write): Validate breakpoints before trusting they
13648 should be inserted. Delete disabled breakpoints.
13649 * mem-break.h (validate_breakpoints):
13650 * server.c (handle_query): Validate breakpoints when we see a
13651 qSymbol query.
13652
13653 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13654
13655 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13656 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13657 if we could tell there's a GDB breakpoint at stop_pc.
13658 (need_step_over_p): Don't do a step over if we find a GDB
13659 breakpoint at the resume PC.
13660
13661 * mem-break.c (struct raw_breakpoint): New.
13662 (enum bkpt_type): New type `gdb_breakpoint'.
13663 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13664 fields. New field `raw'.
13665 (find_raw_breakpoint_at): New.
13666 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13667 breakpoint instead.
13668 (set_breakpoint_at): Adjust.
13669 (delete_raw_breakpoint): New.
13670 (release_breakpoint): New.
13671 (delete_breakpoint): Rename to...
13672 (delete_breakpoint_1): ... this. Add proc parameter. Use
13673 release_breakpoint. Return ENOENT.
13674 (delete_breakpoint): Reimplement.
13675 (find_breakpoint_at): Delete.
13676 (find_gdb_breakpoint_at): New.
13677 (delete_breakpoint_at): Delete.
13678 (set_gdb_breakpoint_at): New.
13679 (delete_gdb_breakpoint_at): New.
13680 (gdb_breakpoint_here): New.
13681 (set_reinsert_breakpoint): Use release_breakpoint.
13682 (uninsert_breakpoint): Rename to ...
13683 (uninsert_raw_breakpoint): ... this.
13684 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13685 (reinsert_raw_breakpoint): Change parameter type to
13686 raw_breakpoint.
13687 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13688 instead.
13689 (check_breakpoints): Adjust. Use release_breakpoint.
13690 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13691 (breakpoint_inserted_here): Ditto.
13692 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13693 Don't trust the breakpoint's shadow if it is not inserted.
13694 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13695 (delete_all_breakpoints): Adjust.
13696 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13697 use delete_breakpoint_1.
13698
13699 * mem-break.h (breakpoints_supported): Delete declaration.
13700 (set_gdb_breakpoint_at): Declare.
13701 (gdb_breakpoint_here): Declare.
13702 (delete_breakpoint_at): Delete.
13703 (delete_gdb_breakpoint_at): Declare.
13704
13705 * server.h (struct raw_breakpoint): Forward declare.
13706 (struct process_info): New field `raw_breakpoints'.
13707
13708 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13709 breakpoints.
13710
13711 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13712
13713 * linux-low.c (status_pending_p_callback): Fix comment.
13714 (linux_wait_for_event_1): Move most of the internal breakpoint
13715 handling from here...
13716 (linux_wait_1): ... to here.
13717 (count_events_callback): New.
13718 (select_singlestep_lwp_callback): New.
13719 (select_event_lwp_callback): New.
13720 (cancel_breakpoints_callback): New.
13721 (select_event_lwp): New.
13722 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13723 priority to all LWPs that have had events that should be reported
13724 to the client. Cancel breakpoints when about to reporting the
13725 event to the client, not while stopping lwps. No longer cancel
13726 finished single-steps here.
13727 (cancel_finished_single_step): Delete.
13728 (cancel_finished_single_steps): Delete.
13729
13730 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13731
13732 * mem-break.c (enum bkpt_type): New.
13733 (struct breakpoint): New field `type'.
13734 (set_breakpoint_at): Change return type to struct breakpoint
13735 pointer. Set type to `other_breakpoint' by default.
13736 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13737 in the breakpoint list.
13738 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13739 (reinsert_breakpoint): Rename to ...
13740 (reinsert_raw_breakpoint): ... this.
13741 (reinsert_breakpoints_at): Adjust.
13742 * mem-break.h (struct breakpoint): Declare.
13743 (set_breakpoint_at): Change return type to struct breakpoint
13744 pointer.
13745
13746 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13747
13748 * server.c (handle_query): Assign, not compare.
13749
13750 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13751
13752 Teach linux gdbserver to step-over-breakpoints.
13753
13754 * linux-low.c (can_hardware_single_step): New.
13755 (supports_breakpoints): New.
13756 (handle_extended_wait): If stopping threads, read the stop pc of
13757 the new cloned LWP.
13758 (get_pc): New.
13759 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13760 low target doesn't support retrieving the PC.
13761 (add_lwp): Set last_resume_kind to resume_continue.
13762 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13763 (linux_attach): Don't clear stop_expected. Set the lwp's
13764 last_resume_kind to resume_stop.
13765 (linux_detach_one_lwp): Don't check for removed breakpoints.
13766 (check_removed_breakpoint): Delete.
13767 (status_pending_p): Rename to ...
13768 (status_pending_p_callback): ... this. Don't check for removed
13769 breakpoints. Don't consider threads that are stopped from GDB's
13770 perspective.
13771 (linux_wait_for_lwp): Always read the stop_pc here.
13772 (cancel_breakpoint): New.
13773 (step_over_bkpt): New global.
13774 (linux_wait_for_event_1): Implement stepping over breakpoints.
13775 (gdb_wants_lwp_stopped): New.
13776 (gdb_wants_all_stopped): New.
13777 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13778 single-step traps here. Store the thread's last reported target
13779 wait status.
13780 (send_sigstop): Don't clear stop_expected. Always set it,
13781 instead.
13782 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13783 (cancel_finished_single_step): New.
13784 (cancel_finished_single_steps): New.
13785 (wait_for_sigstop): Don't cancel finished single-step traps here.
13786 (linux_resume_one_lwp): Don't check for removed breakpoints.
13787 Don't set `step' on non-hardware step archs.
13788 (linux_set_resume_request): Ignore resume_stop requests if already
13789 stopping or stopped. Set the lwp's last_resume_kind.
13790 (resume_status_pending_p): Don't check for removed breakpoints.
13791 (need_step_over_p): New.
13792 (start_step_over): New.
13793 (finish_step_over): New.
13794 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13795 requests. Clear the thread's last reported target waitstatus.
13796 Don't use the `suspended' flag. Don't consider pending breakpoints.
13797 (linux_resume): Start a step-over if necessary.
13798 (proceed_one_lwp): New.
13799 (proceed_all_lwps): New.
13800 (unstop_all_lwps): New.
13801 * linux-low.h (struct lwp_info): Rewrite comment for the
13802 `suspended' flag. Add the `stop_pc' field. Delete the
13803 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13804 Add `'last_resume_kind' and `need_step_over' fields.
13805 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13806 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13807 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13808 (set_raw_breakpoint_at): New.
13809 (set_breakpoint_at): Rewrite to use it.
13810 (reinsert_breakpoint_handler): Delete.
13811 (set_reinsert_breakpoint): New.
13812 (reinsert_breakpoint_by_bp): Delete.
13813 (delete_reinsert_breakpoints): New.
13814 (uninsert_breakpoint): Rewrite.
13815 (uninsert_breakpoints_at): New.
13816 (reinsert_breakpoint): Rewrite.
13817 (reinsert_breakpoints_at): New.
13818 (check_breakpoints): Rewrite.
13819 (breakpoint_here): New.
13820 (breakpoint_inserted_here): New.
13821 (check_mem_read): Adjust.
13822 * mem-break.h (breakpoints_supported, breakpoint_here)
13823 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13824 (reinsert_breakpoint_by_bp): Delete declaration.
13825 (delete_reinsert_breakpoints): Declare.
13826 (reinsert_breakpoint): Delete declaration.
13827 (reinsert_breakpoints_at): Declare.
13828 (uninsert_breakpoint): Delete declaration.
13829 (uninsert_breakpoints_at): Declare.
13830 (check_breakpoints): Adjust prototype.
13831 * server.h: Adjust include order.
13832 (struct thread_info): Declare here. Add a `last_status' field.
13833
13834 2010-03-23 Michael Snyder <msnyder@vmware.com>
13835
13836 * server.c (crc32): New function.
13837 (handle_query): Add handling for 'qCRC:' request.
13838
13839 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13840
13841 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13842 lwp had been stopped by a watchpoint.
13843
13844 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13845
13846 * server.h (internal_error): Declare.
13847 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13848 * utils.c (internal_error): New function.
13849
13850 2010-03-15 Andreas Schwab <schwab@redhat.com>
13851
13852 * configure.srv: Fix typo setting srv_regobj.
13853
13854 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13855
13856 * linux-low.c (fetch_register): Avoid passing a non string literal
13857 format to `error'.
13858 (usr_store_inferior_registers): Ditto.
13859
13860 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13861
13862 * linux-low.c (linux_write_memory): Bail out early if peeking
13863 memory failed.
13864
13865 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13866
13867 * linux-low.h (struct lwp_info): New fields
13868 `stopped_by_watchpoint' and `stopped_data_address'.
13869 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13870 here, and cache them in the lwp object.
13871 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13872 directly.
13873 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13874 field.
13875 (linux_stopped_by_watchpoint): Rewrite.
13876 (linux_stopped_data_address): Rewrite.
13877
13878 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13879
13880 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13881 switching the current inferior, not before.
13882
13883 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13884
13885 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13886 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13887 i386-linux.c and amd64-linux.c.
13888 (reg-i386.o): Removed.
13889 (reg-i386.c): Likewise.
13890 (reg-i386-linux.o): Likewise.
13891 (reg-i386-linux.c): Likewise.
13892 (reg-x86-64.o): Likewise.
13893 (reg-x86-64.c): Likewise.
13894 (reg-x86-64-linux.o): Likewise.
13895 (reg-x86-64-linux.c): Likewise.
13896 (i386.o): New.
13897 (i386.c): Likewise.
13898 (i386-linux.o): Likewise.
13899 (i386-linux.c): Likewise.
13900 (amd64.o): Likewise.
13901 (amd64.c): Likewise.
13902 (amd64-linux.o): Likewise.
13903 (amd64-linux.c): Likewise.
13904
13905 * configure.srv (srv_i386_regobj): New.
13906 (srv_i386_linux_regobj): Likewise.
13907 (srv_amd64_regobj): Likewise.
13908 (srv_amd64_linux_regobj): Likewise.
13909 (srv_i386_32bit_xmlfiles): Likewise.
13910 (srv_i386_64bit_xmlfiles): Likewise.
13911 (srv_i386_xmlfiles): Likewise.
13912 (srv_amd64_xmlfiles): Likewise.
13913 (srv_i386_linux_xmlfiles): Likewise.
13914 (srv_amd64_linux_xmlfiles): Likewise.
13915 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13916 srv_xmlfiles to $srv_i386_xmlfiles.
13917 (i[34567]86-*-mingw32ce*): Likewise.
13918 (i[34567]86-*-mingw*): Likewise.
13919 (i[34567]86-*-nto*): Likewise.
13920 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13921 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13922 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13923 (x86_64-*-linux*): Likewise.
13924
13925 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13926 (init_registers_amd64_linux): New.
13927 (x86_arch_setup): Replace init_registers_x86_64_linux with
13928 init_registers_amd64_linux.
13929
13930 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13931
13932 * configure.ac: Check for libdl. If it is not available link against
13933 static libthread_db.
13934 * configure: Regenerate.
13935
13936 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13937
13938 PR9605
13939
13940 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13941 handing a read watchpoint.
13942 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13943
13944 2010-02-12 Doug Evans <dje@google.com>
13945
13946 * linux-low.c (linux_supports_tracefork_flag): Document.
13947 (linux_look_up_symbols): Add comment.
13948
13949 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13950
13951 * regcache.c (supply_register): Clear regcache if buf is NULL.
13952
13953 2010-02-02 Nicolas Roche <roche@sourceware.org>
13954 Joel Brobecker <brobecker@adacore.com>
13955
13956 * inferiors.c (find_inferior): Add function documentation.
13957 (unloaded_dll): Handle the case where the unloaded dll has not
13958 been previously registered in the dll list.
13959
13960 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13961
13962 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13963 (thumb2_breakpoint): New.
13964 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13965
13966 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13967
13968 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13969 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13970 breakpoints.
13971
13972 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13973
13974 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13975
13976 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13977
13978 * linux-s390-low.c (s390_collect_ptrace_register)
13979 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13980
13981 2010-01-21 Doug Evans <dje@google.com>
13982
13983 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13984 (PTRACE_ARG4_TYPE): New macro.
13985 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13986 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13987 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13988 (usr_store_inferior_registers): Ditto.
13989 (linux_read_memory, linux_write_memory): Ditto.
13990 (linux_test_for_tracefork): Ditto.
13991
13992 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13993 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13994
13995 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13996
13997 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13998 target.
13999
14000 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14001
14002 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14003 prototype to take a regcache. Adjust.
14004
14005 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14006
14007 * regcache.h (struct thread_info): Forward declare.
14008 (struct regcache): New.
14009 (new_register_cache): Adjust prototype.
14010 (get_thread_regcache): Declare.
14011 (free_register_cache): Adjust prototype.
14012 (registers_to_string, registers_from_string): Ditto.
14013 (supply_register, supply_register_by_name, collect_register)
14014 (collect_register_as_string, collect_register_by_name): Ditto.
14015 * regcache.c (struct inferior_regcache_data): Delete.
14016 (get_regcache): Rename to ...
14017 (get_thread_regcache): ... this. Adjust. Switch inferior before
14018 fetching registers.
14019 (regcache_invalidate_one): Adjust.
14020 (regcache_invalidate): Fix prototype.
14021 (new_register_cache): Return the new register cache.
14022 (free_register_cache): Change prototype.
14023 (realloc_register_cache): Adjust.
14024 (registers_to_string): Change prototype to take a regcache. Adjust.
14025 (registers_from_string): Ditto.
14026 (register_data): Ditto.
14027 (supply_register): Ditto.
14028 (supply_register_by_name): Ditto.
14029 (collect_register): Ditto.
14030 (collect_register_as_string): Ditto.
14031 (collect_register_by_name): Ditto.
14032 * server.c (process_serial_event): Adjust.
14033 * linux-low.h (regset_fill_func, regset_store_func): Change
14034 prototype.
14035 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14036 Change prototype.
14037 * linux-low.c (get_stop_pc): Adjust.
14038 (check_removed_breakpoint): Adjust.
14039 (linux_wait_for_event): Adjust.
14040 (linux_resume_one_lwp): Adjust.
14041 (fetch_register): Add regcache parameter. Adjust.
14042 (usr_store_inferior_registers): Ditto.
14043 (regsets_fetch_inferior_registers): Ditto.
14044 (regsets_store_inferior_registers): Ditto.
14045 (linux_fetch_registers, linux_store_registers): Ditto.
14046 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14047 regcache. Adjust.
14048 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14049 Ditto.
14050 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14051 prototype to take a regcache.
14052 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14053 * remote-utils.c (convert_ascii_to_int, outreg)
14054 (prepare_resume_reply): Change prototype to take a regcache.
14055 Adjust.
14056 * target.h (struct target_ops) <fetch_registers, store_registers>:
14057 Change prototype to take a regcache.
14058 (fetch_inferior_registers, store_inferior_registers): Change
14059 prototype to take a regcache. Adjust.
14060 * proc-service.c (ps_lgetregs): Adjust.
14061 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14062 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14063 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14064 take a regcache. Adjust.
14065 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14066 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14067 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14068 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14069 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14070 (cris_cannot_fetch_register):
14071 (cris_breakpoint_at): Change prototype to take a regcache.
14072 Adjust.
14073 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14074 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14075 to take a regcache. Adjust.
14076 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14077 Adjust.
14078 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14079 take a regcache. Adjust.
14080 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14081 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14082 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14083 * linux-mips-low.c (mips_get_pc):
14084 (mips_set_pc): Change prototype to take a regcache. Adjust.
14085 (mips_reinsert_addr): Adjust.
14086 (mips_collect_register): Change prototype to take a regcache.
14087 Adjust.
14088 (mips_supply_register):
14089 (mips_collect_register_32bit, mips_supply_register_32bit)
14090 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14091 (mips_store_fpregset): Ditto.
14092 * linux-ppc-low.c (ppc_supply_ptrace_register)
14093 (ppc_supply_ptrace_register): Ditto.
14094 (parse_spufs_run): Adjust.
14095 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14096 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14097 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14098 take a regcache. Adjust.
14099 * linux-s390-low.c (s390_collect_ptrace_register)
14100 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14101 (s390_set_pc): Change prototype to take a regcache. Adjust.
14102 (s390_arch_setup): Adjust.
14103 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14104 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14105 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14106 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14107 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14108 regcache. Adjust.
14109 (sparc_breakpoint_at): Adjust.
14110 * linux-xtensa-low.c (xtensa_fill_gregset):
14111 (xtensa_store_gregset):
14112 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14113 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14114 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14115 prototype to take a regcache. Adjust.
14116 * win32-arm-low.c (arm_fetch_inferior_register)
14117 (arm_store_inferior_register): Change prototype to take a
14118 regcache. Adjust.
14119 * win32-i386-low.c (i386_fetch_inferior_register)
14120 (i386_store_inferior_register): Change prototype to take a
14121 regcache. Adjust.
14122 * win32-low.c (child_fetch_inferior_registers)
14123 (child_store_inferior_registers): Change prototype to take a
14124 regcache. Adjust.
14125 (win32_wait): Adjust.
14126 (win32_fetch_inferior_registers): Change prototype to take a
14127 regcache. Adjust.
14128 (win32_store_inferior_registers): Adjust.
14129 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14130 store_inferior_register>: Change prototype to take a regcache.
14131
14132 2010-01-20 Doug Evans <dje@google.com>
14133
14134 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14135 #ifdef.
14136 (linux_wait_for_event1, linux_init_signals): Ditto.
14137 (W_STOPCODE): Provide definition if missing.
14138
14139 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14140
14141 * linux-low.c (linux_core_of_thread): New.
14142 (compare_ints, show_process, list_threads): New.
14143 (linux_qxfer_osdata): Report threads and cores.
14144 (linux_target_op): Register linux_core_of_thread.
14145 * remote-utils.c (prepare_resume_reply): Report the core.
14146 (buffer_xml_printf): Support %d specifier.
14147 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14148 New.
14149 (handle_query): Handle qXfer:threads. Announce availability
14150 thereof.
14151 * target.h (struct target_ops): New field core_of_thread.
14152
14153 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14154
14155 * Makefile.in (clean): Remove new generated files.
14156 (reg-s390.o, reg-s390.c): Remove rules.
14157 (reg-s390x.o, reg-s390x.c): Likewise.
14158 (s390-linux32.o, s390-linux32.c): Add rules.
14159 (s390-linux64.o, s390-linux64.c): Likewise.
14160 (s390x-linux64.o, s390x-linux64.c): Likewise.
14161 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14162 * linux-s390-low.c: Include <elf.h>.
14163 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14164 (init_registers_s390): Remove prototype.
14165 (init_registers_s390x): Likewise.
14166 (init_registers_s390_linux32): Add prototype.
14167 (init_registers_s390_linux64): Likewise.
14168 (init_registers_s390x_linux64): Likewise.
14169 (s390_num_regs_3264): New define.
14170 (s390_regmap_3264): New global variable.
14171 (s390_cannot_fetch_register): Remove obsolete check.
14172 (s390_cannot_store_register): Likewise.
14173 (s390_collect_ptrace_register): Handle upper/lower register halves.
14174 (s390_supply_ptrace_register): Likewise.
14175 (s390_fill_gregset): Update to register number changes.
14176 (s390_get_hwcap): New routine.
14177 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14178 Install appropriate regmap and register set.
14179
14180 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14181
14182 * server.c (gdbserver_version): Update copyright year to 2010.
14183 * gdbreplay.c (gdbreplay_version): Likewise.
14184
14185 2009-12-28 Doug Evans <dje@google.com>
14186
14187 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14188 elf/external.h. Include <elf.h> instead but only if necessary.
14189
14190 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14191
14192 * linux-low.c (linux_remove_process): Remove `detaching'
14193 parameter. Don't release/detach from thread_db here.
14194 (linux_kill): Release/detach from thread_db here, ...
14195 (linux_detach): ... and here, before actually detaching.
14196 (linux_wait_1): ... and here, when a process exits.
14197 * thread-db.c (any_thread_of): New.
14198 (thread_db_free): Switch the current inferior to a thread of the
14199 passed in process.
14200
14201 2009-12-21 Doug Evans <dje@google.com>
14202
14203 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14204
14205 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14206 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14207 warning ifndef __NR_tkill. Move setting of errno there too.
14208 Delete unnecessary resetting of errno after syscall.
14209 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14210
14211 * configure.ac: Check for dladdr.
14212 * config.in: Regenerate.
14213 * configure: Regenerate.
14214 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14215 (try_thread_db_load): Update.
14216
14217 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14218
14219 2009-12-18 Doug Evans <dje@google.com>
14220
14221 * event-loop.c: Include unistd.h if it exists.
14222
14223 * linux-low.c (my_waitpid): Move definition away from being in
14224 between linux_tracefork_child/linux_test_for_tracefork.
14225
14226 * gdb_proc_service.h (psaddr_t): Fix type.
14227 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14228 signature to match glibc.
14229
14230 2009-12-16 Doug Evans <dje@google.com>
14231
14232 * linux-low.c (linux_read_memory): Fix argument to read.
14233
14234 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14235
14236 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14237 events, don't leave current_inferior pointing at null.
14238
14239 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14240
14241 * win32-low.c (LOG): Delete.
14242 (OUTMSG): Output to stderr.
14243 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14244 on compile time LOG macro.
14245 (win32_wait): Fix debug output.
14246
14247 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14248
14249 * win32-low.c (win32_add_one_solib): If the dll name is
14250 "ntdll.dll", prepend the system directory to the dll path.
14251
14252 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14255
14256 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14257 Vladimir Prus <vladimir@codesourcery.com>
14258
14259 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14260 * configure.ac: Check for __mcoldfire__ and set
14261 gdb_cv_m68k_is_coldfire.
14262 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14263 reg-cf.o and reg-m68k.o.
14264 * configure: Regenerated.
14265
14266 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14267
14268 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14269 Pass it to thread_db_free.
14270 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14271 proper `detaching' argument to linux_remove_process.
14272 * linux-low.h (thread_db_free): Add `detaching' parameter.
14273 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14274 to thread_db_free.
14275 (thread_db_free): Add `detaching' parameter. Only
14276 call td_ta_clear_event if detaching from process.
14277
14278 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14279
14280 * thread-db.c (thread_db_free): Fix typo.
14281
14282 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14283
14284 PR gdb/10838
14285 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14286
14287 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14288
14289 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14290 with an i686 compiler.
14291 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14292 needed.
14293 * configure: Rebuilt.
14294
14295 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14296
14297 PR gdb/10783
14298
14299 * server.c (handle_search_memory_1): Correct read_addr initialization
14300 in loop for searching subsequent chunks.
14301
14302 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14303
14304 * configure.ac: New --with-libthread-db option.
14305 * thread-db.c: Allow direct dependence on libthread_db.
14306 (thread_db_free): Adjust.
14307 * config.in: Regenerate.
14308 * configure: Likewise.
14309
14310 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14311
14312 PR gdb/10757
14313 * thread-db.c (attach_thread): New function.
14314 (maybe_attach_thread): Return success/failure.
14315 (find_new_threads_callback): Adjust.
14316 (thread_db_find_new_threads): Loop until no new threads.
14317
14318 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14319
14320 * proc-service.c (ps_lgetregs): Formatting.
14321
14322 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14323
14324 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14325 * configure.ac: Adjust.
14326 * linux-low.h (struct process_info_private): Move members to struct
14327 thread_db.
14328 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14329 * linux-low.c (linux_remove_process): Adjust.
14330 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14331 * server.c (handle_query): Move code ...
14332 (handle_monitor_command): ... here. New function.
14333 * target.h (struct target_ops): New member.
14334 * thread-db.c (struct thread_db): New.
14335 (libthread_db_search_path): New variable.
14336 (thread_db_create_event, thread_db_enable_reporting)
14337 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14338 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14339 (try_thread_db_load_1, dladdr_to_soname): New functions.
14340 (try_thread_db_load, thread_db_load_search): New functions.
14341 (thread_db_init): Search for libthread_db.
14342 (thread_db_free): New function.
14343 (thread_db_handle_monitor_command): Likewise.
14344 * config.in: Regenerate.
14345 * configure: Regenerate.
14346
14347 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14348
14349 * spu-low.c (spu_kill): Wait for inferior to terminate.
14350 Call clear_inferiors.
14351 (spu_detach): Call clear_inferiors.
14352
14353 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14354
14355 * aclocal.m4: Regenerate.
14356 * config.in: Likewise.
14357 * configure: Likewise.
14358
14359 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14360
14361 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14362 (parse_spufs_run): New function.
14363 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14364 (ppc_breakpoint_at): Handle SPU breakpoints.
14365
14366 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14367
14368 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14369 (SPUFS_MAGIC): Define.
14370 (spu_enumerate_spu_ids): New function.
14371 (linux_qxfer_spu): New function.
14372 (linux_target_ops): Install linux_qxfer_spu.
14373
14374 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14375
14376 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14377 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14378 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14379 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14380 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14381 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14382 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14383 (init_registers_powerpc_cell32l): Add prototype.
14384 (init_registers_powerpc_cell64l): Likewise.
14385 (ppc_arch_setup): Detect Cell/B.E. architecture.
14386
14387 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14388
14389 * Makefile.in (datarootdir): New variable.
14390
14391 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * linux-low.c (linux_write_memory): Update debugging output.
14394 * Makefile.in (clean): Add new descriptions.
14395 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14396 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14397 * configure.srv: Add new files for arm*-*-linux*.
14398 * linux-arm-low.c: Add new declarations.
14399 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14400 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14401 (HWCAP_VFPv3D16): New.
14402 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14403 instead of __IWMMXT__.
14404 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14405 (arm_arch_setup): New.
14406 (target_regsets): Remove #ifdef. Add VFP regset.
14407 (the_low_target): Use arm_arch_setup.
14408
14409 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14412 the main thread again.
14413
14414 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14415
14416 Adding Neutrino gdbserver.
14417 * configure: Regenerated.
14418 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14419 * configure.srv (i[34567]86-*-nto*): New target.
14420 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14421 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14422 (nto_comctrl) [__QNX__]: New function.
14423 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14424
14425 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14426
14427 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14428 srv_tgtobj.
14429
14430 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14431 Pedro Alves <pedro@codesourcery.com>
14432
14433 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14434 don't support CONTEXT_EXTENDED_REGISTERS.
14435 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14436 (the_low_target): Install them.
14437 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14438 failing with ERROR_PIPE_NOT_CONNECTED.
14439
14440 2009-06-30 Doug Evans <dje@google.com>
14441 Pierre Muller <muller@ics.u-strasbg.fr>
14442
14443 Add h/w watchpoint support to x86-linux, win32-i386.
14444 * Makefile.in (SFILES): Add i386-low.c
14445 (i386_low_h): Define.
14446 (i386-low.o): Add dependencies.
14447 (linux-x86-low.o): Add i386-low.h dependency.
14448 (win32-i386-low.o): Ditto.
14449 * i386-low.c: New file.
14450 * i386-low.h: New file.
14451 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14452 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14453 * linux-low.c (linux_add_process): Initialize arch_private.
14454 (linux_remove_process): Free arch_private.
14455 (add_lwp): Initialize arch_private.
14456 (delete_lwp): Free arch_private.
14457 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14458 provided.
14459 * linux-low.h (process_info_private): New member arch_private.
14460 (lwp_info): New member arch_private.
14461 (linux_target_ops): New members new_process, new_thread,
14462 prepare_to_resume.
14463 (ptid_of): New macro.
14464 * linux-x86-low.c: Include stddef.h, i386-low.h.
14465 (arch_process_info): New struct.
14466 (arch_lwp_info): New struct.
14467 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14468 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14469 (i386_dr_low_get_status): New function.
14470 (x86_insert_point, x86_remove_point): New functions.
14471 (x86_stopped_by_watchpoint): New function.
14472 (x86_stopped_data_address): New function.
14473 (x86_linux_new_process, x86_linux_new_thread): New functions.
14474 (x86_linux_prepare_to_resume): New function.
14475 (the_low_target): Add entries for insert_point, remove_point,
14476 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14477 prepare_to_resume.
14478 * server.c (debug_hw_points): New global.
14479 (monitor_show_help): Document set debug-hw-points.
14480 (handle_query): Process "set debug-hw-points".
14481 * server.h (debug_hw_points): Declare.
14482 (paddress): Declare.
14483 * utils.c (NUMCELLS, CELLSIZE): New macros.
14484 (get_sell, xsnprintf, paddress): New functions.
14485 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14486 remove_point, stopped_by_watchpoint, stopped_data_address.
14487 * win32-i386-low.c: Include i386-low.h.
14488 (debug_reg_state): Replaces dr.
14489 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14490 (i386_dr_low_get_status): New function.
14491 (i386_insert_point, i386_remove_point): New functions.
14492 (i386_stopped_by_watchpoint): New function.
14493 (i386_stopped_data_address): New function.
14494 (i386_initial_stuff): Update.
14495 (get_thread_context,set_thread_context,i386_thread_added): Update.
14496 (the_low_target): Add entries for insert_point,
14497 remove_point, stopped_by_watchpoint, stopped_data_address.
14498 * win32-low.c (win32_insert_watchpoint): New function.
14499 (win32_remove_watchpoint): New function.
14500 (win32_stopped_by_watchpoint): New function.
14501 (win32_stopped_data_address): New function.
14502 (win32_target_ops): Add entries for insert_watchpoint,
14503 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14504 * win32-low.h (win32_target_ops): New members insert_point,
14505 remove_point, stopped_by_watchpoint, stopped_data_address.
14506
14507 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14508
14509 * server.c (process_serial_event): Re-return unsupported, not
14510 error, if the type isn't recognized. Re-allow supporting only
14511 insert or remove packets. Also call require_running for
14512 breakpoints. Add missing break statement to default case. Tidy.
14513 * target.h (struct target_ops): Rename insert_watchpoint to
14514 insert_point, and remove_watchpoint to remove_point.
14515
14516 * linux-low.h (struct linux_target_ops): Likewise.
14517 * linux-low.c (linux_insert_watchpoint): Rename to ...
14518 (linux_insert_point): ... this. Adjust.
14519 (linux_remove_watchpoint): Rename to ...
14520 (linux_remove_point): ... this. Adjust.
14521 (linux_target_ops): Adjust.
14522 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14523 (cris_insert_point): ... this.
14524 (cris_remove_watchpoint): Rename to ...
14525 (cris_remove_point): ... this.
14526 (the_low_target): Adjust.
14527
14528 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14529
14530 * server.c (handle_v_kill): Pass signal_pid to
14531 kill_inferior if multi_process is zero.
14532
14533 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14534
14535 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14536 * target.h (target_ops): Comment for *_watchpoint to make it clear
14537 the functions can get types '0' and '1'.
14538
14539 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14540
14541 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14542 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14543 * regcache.c (get_regcache): Likewise.
14544 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14545 * win32-low.c (child_fetch_inferior_registers): Remove check for
14546 regno 0.
14547
14548 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14549 Pedro Alves <pedro@codesourcery.com>
14550
14551 * target.h (struct target_ops) <supports_multi_process>: New
14552 callback.
14553 (target_supports_multi_process): New.
14554 * server.c (handle_query): Even if GDB reports support, only
14555 enable multi-process if the target also supports it. Report
14556 multi-process support only if the target backend supports it.
14557 * linux-low.c (linux_supports_multi_process): New function.
14558 (linux_target_ops): Install it as target_supports_multi_process
14559 callback.
14560
14561 2009-05-24 Doug Evans <dje@google.com>
14562
14563 Global renaming of find_thread_pid to find_thread_ptid.
14564 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14565 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14566 All callers updated.
14567
14568 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14569 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14570 directly.
14571
14572 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14573 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14574 (linux_resume_one_lwp): Ditto.
14575
14576 2009-05-23 Doug Evans <dje@google.com>
14577
14578 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14579 from struct inferior_list_entry * to struct lwp_info *.
14580 All callers updated.
14581
14582 2009-05-13 Doug Evans <dje@google.com>
14583
14584 * linux-x86-low.c: Don't include assert.h.
14585 (x86_siginfo_fixup): Use fatal, not assert.
14586 (x86_arch_setup): Fix comment.
14587
14588 2009-05-12 Doug Evans <dje@google.com>
14589
14590 Biarch support for i386/amd64 gdbserver.
14591 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14592 Add linux-x86-low.c.
14593 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14594 (linux-x86-low.o): Add.
14595 * linux-x86-64-low.c: Delete.
14596 * linux-i386-low.c: Delete.
14597 * linux-x86-low.c: New file.
14598 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14599 linux-x86-low.o.
14600 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14601 linux-x86-low.o.
14602 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14603 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14604 (linux_child_pid_to_exec_file): New function.
14605 (elf_64_header_p, elf_64_file_p): New functions.
14606 (siginfo_fixup): New function.
14607 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14608 give target a chance to convert layout.
14609 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14610 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14611
14612 2009-05-07 Doug Evans <dje@google.com>
14613
14614 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14615 (regsets_store_inferior_registers): Ditto.
14616
14617 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14618
14619 PR server/10048
14620
14621 * linux-low.c (must_set_ptrace_flags): Delete.
14622 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14623 of the global.
14624 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14625 `lwp->must_set_ptrace_flags' instead.
14626 (linux_wait_for_event_1): Set ptrace options here.
14627 (linux_wait_1): ... not here.
14628
14629 2009-04-30 Doug Evans <dje@google.com>
14630
14631 * inferiors.c (started_inferior_callback): New function.
14632 (attached_inferior_callback): New function.
14633 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14634 * server.c (print_started_pid, print_attached_pid): New functions.
14635 (detach_or_kill_for_exit): New function.
14636 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14637 * server.h (have_started_inferiors_p): Declare.
14638 (have_attached_inferiors_p): Declare.
14639
14640 * inferiors.c (remove_process): Fix memory leak, free process.
14641 * linux-low.c (linux_remove_process): New function.
14642 (linux_kill): Call it instead of remove_process.
14643 (linux_detach, linux_wait_1): Ditto.
14644
14645 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14646
14647 * configure.srv: Add x86 Windows CE target.
14648
14649 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14650
14651 * inferiors.c (get_thread_process): Make global.
14652 * server.h (get_thread_process): Add prototype.
14653 * thread-db.c (find_one_thread): Use get_thread_process
14654 instead of current_process.
14655 (thread_db_get_tls_address): Do not crash if called when
14656 thread layer is not yet initialized.
14657
14658 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14659
14660 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14661 * spu-low.c (current_tid): Rename to ...
14662 (current_ptid): ... this.
14663 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14664 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14665 ptid_get_lwp (current_ptid) instead of current_tid.
14666 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14667 instead of current_tid. Use find_process_pid to verify pid
14668 argument is valid. Pass proper argument to remove_process.
14669 (spu_thread_alive): Compare current_ptid instead of current_tid.
14670 (spu_resume): Likewise.
14671
14672 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14673
14674 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14675 variable.
14676
14677 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14678
14679 Implement the multiprocess extensions, and add linux multiprocess
14680 support.
14681
14682 * server.h (ULONGEST): Declare.
14683 (struct ptid, ptid_t): New.
14684 (minus_one_ptid, null_ptid): Declare.
14685 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14686 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14687 (struct inferior_list_entry): Change `id' type from unsigned from
14688 to ptid_t.
14689 (struct sym_cache, struct breakpoint, struct
14690 process_info_private): Forward declare.
14691 (struct process_info): Declare.
14692 (current_process): Declare.
14693 (all_processes): Declare.
14694 (initialize_inferiors): Declare.
14695 (add_thread): Adjust to use ptid_t.
14696 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14697 (add_process, remove_process, find_thread_pid): Declare.
14698 (find_inferior_id): Adjust to use ptid_t.
14699 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14700 (multi_process): Declare.
14701 (push_event): Adjust to use ptid_t.
14702 (read_ptid, write_ptid): Declare.
14703 (prepare_resume_reply): Adjust to use ptid_t.
14704 (clear_symbol_cache): Declare.
14705 * inferiors.c (all_processes): New.
14706 (null_ptid, minus_one_ptid): New.
14707 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14708 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14709 (add_thread): Change unsigned long to ptid. Remove gdb_id
14710 parameter. Adjust.
14711 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14712 (gdb_id_to_thread): Rename to ...
14713 (find_thread_pid): ... this. Change unsigned long to ptid.
14714 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14715 (loaded_dll, pull_pid_from_list): Adjust.
14716 (add_process, remove_process, find_process_pid)
14717 (get_thread_process, current_process, initialize_inferiors): New.
14718 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14719 (struct target_waitstatus) <related_pid>: Ditto.
14720 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14721 return type to int.
14722 (struct target_ops) <join>: Add `pid' argument.
14723 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14724 (struct target_ops) <wait>: Add `ptid' field. Change return type
14725 to ptid.
14726 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14727 (mywait): Add `ptid' argument. Change return type to ptid_t.
14728 (target_pid_to_str): Declare.
14729 * target.c (set_desired_inferior): Adjust to use ptids.
14730 (mywait): Add new `ptid' argument. Adjust.
14731 (target_pid_to_str): New.
14732 * mem-break.h (free_all_breakpoints): Declare.
14733 * mem-break.c (breakpoints): Delelete.
14734 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14735 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14736 to use per-process breakpoint list.
14737 (free_all_breakpoints): New.
14738 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14739 (symbol_cache, all_symbols_looked_up): Delete.
14740 (hexchars): New.
14741 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14742 read_ptid): New.
14743 (prepare_resume_reply): Change ptid argument's type from unsigned
14744 long to ptid_t. Adjust. Implement W;process and X;process.
14745 (free_sym_cache, clear_symbol_cache): New.
14746 (look_up_one_symbol): Adjust to per-process symbol cache. *
14747 * server.c (cont_thread, general_thread, step_thread): Change type
14748 to ptid_t.
14749 (attached): Delete.
14750 (multi_process): New.
14751 (last_ptid): Change type to ptid_t.
14752 (struct vstop_notif) <ptid>: Change type to ptid_t.
14753 (queue_stop_reply, push_event): Change `ptid' argument's type to
14754 ptid_t.
14755 (discard_queued_stop_replies): Add `pid' argument.
14756 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14757 changes. Don't reference the `attached' global.
14758 (attach_inferior): Adjust to mywait interface changes.
14759 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14760 features. Handle and report "multiprocess+". Handle
14761 "qAttached:PID".
14762 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14763 changes.
14764 (handle_v_kill): New.
14765 (handle_v_stopped): Adjust to use target_pid_to_str.
14766 (handle_v_requests): Allow multiple attaches and runs when
14767 multiprocess extensions are in effect. Handle "vKill".
14768 (myresume): Adjust to use ptids.
14769 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14770 (handle_status): Adjust to discard_queued_stop_replies interface
14771 change.
14772 (first_thread_of, kill_inferior_callback)
14773 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14774 (main): Call initialize_inferiors. Adjust to use ptids, killing
14775 and detaching from all inferiors. Handle multiprocess packet
14776 variants.
14777 * linux-low.h: Include gdb_proc_service.h.
14778 (struct process_info_private): New.
14779 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14780 <lwpid_of>: Use ptid_get_lwp.
14781 (get_lwp_thread): Adjust.
14782 (struct lwp_info): Add `dead' member.
14783 (find_lwp_pid): Declare.
14784 * linux-low.c (thread_db_active): Delete.
14785 (new_inferior): Adjust comment.
14786 (inferior_pid): Delete.
14787 (linux_add_process): New.
14788 (handle_extended_wait): Adjust.
14789 (add_lwp): Change unsigned long to ptid.
14790 (linux_create_inferior): Add process to processes table. Adjust
14791 to use ptids. Don't set new_inferior here.
14792 (linux_attach_lwp): Rename to ...
14793 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14794 it. Adjust to use ptids.
14795 (linux_attach_lwp): New.
14796 (linux_attach): Add process to processes table. Don't set
14797 new_inferior here.
14798 (struct counter): New.
14799 (second_thread_of_pid_p, last_thread_of_process_p): New.
14800 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14801 multiple processes.
14802 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14803 processes. Remove process from process table.
14804 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14805 to multiple processes.
14806 (any_thread_of): New.
14807 (linux_detach): Add `pid' argument, and handle it. Remove process
14808 from processes table.
14809 (linux_join): Add `pid' argument. Handle it.
14810 (linux_thread_alive): Change unsighed long argument to ptid_t.
14811 Consider dead lwps as not being alive.
14812 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14813 threads we're not interested in.
14814 (same_lwp, find_lwp_pid): New.
14815 (linux_wait_for_lwp): Change `pid' argument's type from int to
14816 ptid_t. Adjust.
14817 (linux_wait_for_event): Rename to ...
14818 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14819 from int to ptid_t. Adjust.
14820 (linux_wait_for_event): New.
14821 (linux_wait_1): Add `ptid' argument. Change return type to
14822 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14823 that exit from the process table.
14824 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14825 Adjust.
14826 (mark_lwp_dead): New.
14827 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14828 stopping all threads, mark its main lwp as dead.
14829 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14830 ptids.
14831 (fetch_register, usr_store_inferior_registers)
14832 (regsets_fetch_inferior_registers)
14833 (regsets_store_inferior_registers, linux_read_memory)
14834 (linux_write_memory): Inline `inferior_pid'.
14835 (linux_look_up_symbols): Adjust to use per-process
14836 `thread_db_active'.
14837 (linux_request_interrupt): Adjust to use ptids.
14838 (linux_read_auxv): Inline `inferior_pid'.
14839 (initialize_low): Don't reference thread_db_active.
14840 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14841 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14842 (ps_getpid): Return the pid of the current inferior.
14843 * thread-db.c (proc_handle, thread_agent): Delete.
14844 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14845 per-process data.
14846 (find_one_thread): Change argument type to ptid_t. Adjust to
14847 per-process data.
14848 (maybe_attach_thread): Adjust to per-process data and ptids.
14849 (thread_db_find_new_threads): Ditto.
14850 (thread_db_init): Ditto.
14851 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14852 processes table. Adjust to use ptids.
14853 (spu_kill, spu_detach): Adjust interface. Remove process from
14854 processes table.
14855 (spu_join, spu_thread_alive): Adjust interface.
14856 (spu_wait): Adjust interface. Remove process from processes
14857 table. Adjust to use ptids.
14858 * win32-low.c (current_inferior_tid): Delete.
14859 (current_inferior_ptid): New.
14860 (debug_event_ptid): New.
14861 (thread_rec): Take a ptid. Adjust.
14862 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14863 (child_delete_thread): Ditto.
14864 (do_initial_child_stuff): Add `attached' argument. Add process to
14865 processes table.
14866 (child_fetch_inferior_registers, child_store_inferior_registers):
14867 Adjust.
14868 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14869 (win32_attach): Pass 1 to do_initial_child_stuff.
14870 (win32_kill): Adjust interface. Remove process from processes
14871 table.
14872 (win32_detach): Ditto.
14873 (win32_join): Adjust interface.
14874 (win32_thread_alive): Take a ptid.
14875 (win32_resume): Adjust to use ptids.
14876 (get_child_debug_event): Ditto.
14877 (win32_wait): Adjust interface. Remove exiting process from
14878 processes table.
14879
14880 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14881
14882 Non-stop mode support.
14883
14884 * server.h (non_stop): Declare.
14885 (gdb_client_data, handler_func): Declare.
14886 (delete_file_handler, add_file_handler, start_event_loop):
14887 Declare.
14888 (handle_serial_event, handle_target_event, push_event)
14889 (putpkt_notif): Declare.
14890 * target.h (enum resume_kind): New.
14891 (struct thread_resume): Replace `step' field by `kind' field.
14892 (TARGET_WNOHANG): Define.
14893 (struct target_ops) <wait>: Add `options' argument.
14894 <supports_non_stop, async, start_non_stop>: New fields.
14895 (target_supports_non_stop, target_async): New.
14896 (start_non_stop): Declare.
14897 (mywait): Add `options' argument.
14898 * target.c (mywait): Add `options' argument. Print child exit
14899 notifications here.
14900 (start_non_stop): New.
14901 * server.c (non_stop, own_buf, mem_buf): New globals.
14902 (struct vstop_notif): New.
14903 (notif_queue): New global.
14904 (queue_stop_reply, push_event, discard_queued_stop_replies)
14905 (send_next_stop_reply): New.
14906 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14907 interface changes.
14908 (attach_inferior): In non-stop mode, don't wait for the target
14909 here.
14910 (handle_general_set): Handle QNonStop.
14911 (handle_query): When handling qC, return the current general
14912 thread, instead of the first thread of the list.
14913 (handle_query): If the backend supports non-stop mode, include
14914 QNonStop+ in the qSupported query response.
14915 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14916 and non-stop mode.
14917 (handle_v_attach, handle_v_run): Handle non-stop mode.
14918 (handle_v_stopped): New.
14919 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14920 (myresume): Adjust to use resume_kind. Handle non-stop.
14921 (queue_stop_reply_callback): New.
14922 (handle_status): Handle non-stop mode.
14923 (main): Clear non_stop flag on reconnection. Use the event-loop.
14924 Refactor serial protocol handling from here ...
14925 (process_serial_event): ... to this new function. When GDB
14926 selects any thread, select one here. In non-stop mode, wait until
14927 GDB acks all pending events before exiting.
14928 (handle_serial_event, handle_target_event): New.
14929 * remote-utils.c (remote_open): Install remote_desc in the event
14930 loop.
14931 (remote_close): Remove remote_desc from the event loop.
14932 (putpkt_binary): Rename to...
14933 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14934 (putpkt_binary): New as wrapper around putpkt_binary_1.
14935 (putpkt_notif): New.
14936 (prepare_resume_reply): In non-stop mode, don't change the
14937 general_thread.
14938 * event-loop.c: New.
14939 * Makefile.in (OBJ): Add event-loop.o.
14940 (event-loop.o): New rule.
14941
14942 * linux-low.h (pid_of): Moved here.
14943 (lwpid_of): New.
14944 (get_lwp_thread): Use lwpid_of.
14945 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14946 * linux-low.c (pid_of): Delete.
14947 (inferior_pid): Use lwpid_of.
14948 (linux_event_pipe): New.
14949 (target_is_async_p): New.
14950 (delete_lwp): New.
14951 (handle_extended_wait): Use lwpid_of.
14952 (add_lwp): Don't set lwpid field.
14953 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14954 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14955 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14956 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14957 first. Adjust to linux_wait_for_event interface changes. Use
14958 lwpid_of.
14959 (linux_detach): Don't delete the main lwp here.
14960 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14961 (status_pending_p): Don't consider explicitly suspended lwps.
14962 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14963 pointer. Add OPTIONS argument. Change return type to int. Use
14964 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14965 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14966 pointer. Add status pointer argument. Return a pid instead of a
14967 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14968 changes. In non-stop mode, don't switch to a random thread.
14969 (linux_wait): Rename to...
14970 (linux_wait_1): ... this. Add target_options argument, and handle
14971 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14972 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14973 clean exit and signal exit code. Don't stop all threads in
14974 non-stop mode. In all-stop mode, only stop all threads when
14975 reporting a stop to GDB. Handle explicit thread stop requests.
14976 (async_file_flush, async_file_mark): New.
14977 (linux_wait): New.
14978 (send_sigstop): Use lwpid_of.
14979 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14980 interface changes. In non-stop mode, don't switch to a random
14981 thread.
14982 (linux_resume_one_lwp): Use lwpid_of.
14983 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14984 (linux_resume_one_thread): ... this. Handle resume_stop. In
14985 non-stop mode, don't look for pending flag in all threads.
14986 (resume_status_pending_p): Don't consider explicitly suspended
14987 threads.
14988 (my_waitpid): Reimplement. Emulate __WALL.
14989 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14990 Use lwpid_of.
14991 (sigchld_handler, linux_supports_non_stop, linux_async)
14992 (linux_start_non_stop): New.
14993 (linux_target_ops): Register linux_supports_non_stop, linux_async
14994 and linux_start_non_stop.
14995 (initialize_low): Install SIGCHLD handler.
14996 * thread-db.c (thread_db_create_event, find_one_thread)
14997 (thread_db_get_tls_address): Use lwpid_of.
14998 * win32-low.c (win32_detach): Adjust to use resume_kind.
14999 (win32_wait): Add `options' argument.
15000 * spu-low.c (spu_resume): Adjust to use resume_kind.
15001 (spu_wait): Add `options' argument.
15002
15003 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15004
15005 Decouple target code from remote protocol.
15006
15007 * target.h (enum target_waitkind): New.
15008 (struct target_waitstatus): New.
15009 (struct target_ops) <wait>: Return an unsigned long. Take a
15010 target_waitstatus pointer instead of a char pointer.
15011 (mywait): Likewise.
15012 * target.c (mywait): Change prototype to return an unsigned long.
15013 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15014 * server.h (thread_from_wait, old_thread_from_wait): Delete
15015 declarations.
15016 (prepare_resume_reply): Change prototype to take a
15017 target_waitstatus.
15018 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15019 (last_status, last_ptid): New.
15020 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15021 pid instead of a signal.
15022 (attach_inferior): Remove "status" and "signal" parameters.
15023 Adjust.
15024 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15025 not as an address.
15026 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15027 (handle_v_requests, myresume): Remove "status" and "signal"
15028 parameters. Adjust.
15029 (handle_status): New.
15030 (main): Delete local `status'. Adjust.
15031 * remote-utils.c: Include target.h.
15032 (prepare_resume_reply): Change prototype to take a
15033 target_waitstatus. Adjust.
15034
15035 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15036 interface.
15037 * spu-low.c (spu_wait): Adjust.
15038 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15039 Delete.
15040 (win32_wait): Adjust.
15041
15042 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15043
15044 * target.h (struct thread_resume): Delete leave_stopped member.
15045 (struct target_ops): Add a `n' argument to the `resume' callback.
15046 * server.c (start_inferior): Adjust.
15047 (handle_v_cont, myresume): Adjust.
15048 * linux-low.c (check_removed_breakpoint): Adjust to resume
15049 interface change, and to removed leave_stopped field.
15050 (resume_ptr): Delete.
15051 (struct thread_resume_array): New.
15052 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15053 resume interface change.
15054 (linux_continue_one_thread, linux_queue_one_thread)
15055 (resume_status_pending_p): Check if the resume field is NULL
15056 instead of checking the leave_stopped member.
15057 (linux_resume): Adjust to the target resume interface change.
15058 * spu-low.c (spu_resume): Adjust to the target resume interface
15059 change.
15060 * win32-low.c (win32_detach, win32_resume): Ditto.
15061
15062 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15063
15064 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15065 flag.
15066 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15067 pending.
15068 (linux_continue_one_thread): Only preserve the stepping flag if
15069 there's a pending breakpoint.
15070
15071 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15072
15073 * server.c (main): After the inferior having exited, call
15074 remote_close before exiting gdbserver.
15075
15076 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15077
15078 Fix size of FPSCR in Power 7 processors.
15079 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15080 (PPC_FEATURE_HAS_DFP): New #define.
15081 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15082 size of the FPSCR.
15083
15084 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15085
15086 * server.c (handle_query) Whitespace and formatting.
15087
15088 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15089
15090 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15091 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15092 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15093 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15094 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15095 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15096 Makefile.in, configure.ac: Fix whitespace throughout.
15097 * configure: Regenerate.
15098
15099 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15100
15101 * inferiors.c (find_inferior): Make it safe for the callback
15102 function to delete the currently iterated inferior.
15103
15104 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15105
15106 * Makefile.in (linuw_low_h): Move higher.
15107 (thread-db.o): Depend on $(linux_low_h).
15108
15109 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15110
15111 Rename "process" to "lwp" throughout.
15112
15113 * linux-low.c (all_processes): Rename to...
15114 (all_lwps): ... this.
15115 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15116 (add_process): Rename to ...
15117 (add_lwp): ... this. Adjust.
15118 (linux_create_inferior): Adjust.
15119 (linux_attach_lwp): Adjust.
15120 (linux_attach): Adjust.
15121 (linux_kill_one_process): Rename to ...
15122 (linux_kill_one_lwp): ... this. Adjust.
15123 (linux_kill): Adjust.
15124 (linux_detach_one_process): Rename to ...
15125 (linux_detach_one_lwp): ... this. Adjust.
15126 (linux_detach): Adjust.
15127 (check_removed_breakpoint): Adjust.
15128 (status_pending_p): Adjust.
15129 (linux_wait_for_process): Rename to ...
15130 (linux_wait_for_lwp): ... this. Adjust.
15131 (linux_wait_for_event): Adjust.
15132 (send_sigstop): Adjust.
15133 (wait_for_sigstop): Adjust.
15134 (stop_all_processes): Rename to ...
15135 (stop_all_lwps): ... this.
15136 (linux_resume_one_process): Rename to ...
15137 (linux_resume_one_lwp): ... this. Adjust.
15138 (linux_set_resume_request, linux_continue_one_thread)
15139 (linux_queue_one_thread, resume_status_pending_p)
15140 (usr_store_inferior_registers, regsets_store_inferior_registers)
15141 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15142 Adjust.
15143 * linux-low.h (get_process): Rename to ...
15144 (get_lwp): ... this. Adjust.
15145 (get_thread_process): Rename to ...
15146 (get_thread_lwp): ... this. Adjust.
15147 (get_process_thread): Rename to ...
15148 (get_lwp_thread): ... this. Adjust.
15149 (struct process_info): Rename to ...
15150 (struct lwp_info): ... this.
15151 (all_processes): Rename to ...
15152 (all_lwps): ... this.
15153 * proc-service.c (ps_lgetregs): Adjust.
15154 * thread-db.c (thread_db_create_event, find_one_thread)
15155 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15156
15157 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15158
15159 * server.c (handle_query): Handle "qAttached".
15160
15161 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15162
15163 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15164 GPLv3, update license URL.
15165
15166 2009-03-01 Doug Evans <dje@google.com>
15167
15168 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15169 (server_h): Add gdb_signals.h.
15170 (signals.o): Update.
15171 * server.h (target_signal_from_host,target_signal_to_host_p)
15172 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15173
15174 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15175
15176 * remote-utils.c (getpkt): Also generate remote-debug
15177 information if noack_mode is set.
15178
15179 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15180
15181 * server.c (handle_query): Report qXfer:siginfo:read and
15182 qXfer:siginfo:write as supported and handle them.
15183 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15184 * linux-low.c (linux_xfer_siginfo): New.
15185 (linux_target_ops): Set it.
15186
15187 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15188
15189 * server.c (gdbserver_usage): Mention --remote-debug.
15190 (main): Accept '--remote-debug' switch.
15191
15192 2009-01-18 Doug Evans <dje@google.com>
15193
15194 * regcache.c (new_register_cache): No need to check result of xcalloc.
15195 * server.c (handle_search_memory): Back out calls to xmalloc,
15196 result is checked and error is returned to user upon failure.
15197 (handle_query): Ditto. Add more checks for result of malloc.
15198 (handle_v_cont): Check result of malloc, report error back to
15199 user upon failure.
15200 (handle_v_run): Ditto. Call freeargv.
15201 * server.h (freeargv): Declare.
15202 * utils.c (freeargv): New fn.
15203
15204 2009-01-15 Doug Evans <dje@google.com>
15205
15206 * gdbreplay.c (perror_with_name): Make arg const char *.
15207 * server.h (target_signal_to_name): Make return type const char *.
15208 * thread-db.c (thread_db_err_str): Make return type const char *.
15209 * utils.c (perror_with_name): Make arg const char *.
15210
15211 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15212
15213 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15214 when handling a EXIT_PROCESS_DEBUG_EVENT.
15215
15216 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15217
15218 * gdbreplay.c (gdbreplay_version): Update copyright year.
15219 * server.c (gdbserver_version): Likewise.
15220
15221 2009-01-05 Doug Evans <dje@google.com>
15222
15223 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15224 (handle_extended_wait): Improve comment.
15225
15226 2008-12-13 Doug Evans <dje@google.com>
15227
15228 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15229 * server.h (ATTR_MALLOC): New macro.
15230 (xmalloc,xcalloc,xstrdup): Declare.
15231 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15232 * inferiors.c: Ditto.
15233 * linux-low.c: Ditto.
15234 * mem-break.c: Ditto.
15235 * regcache.c: Ditto.
15236 * remote-utils.c: Ditto.
15237 * server.c: Ditto.
15238 * target.c: Ditto.
15239 * win32-low.c: Ditto.
15240
15241 2008-12-12 Doug Evans <dje@google.com>
15242
15243 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15244 in debugging printf.
15245
15246 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15247
15248 2008-12-09 Doug Evans <dje@google.com>
15249
15250 * linux-low.h (struct process_info): Delete member tid, unused.
15251 * thread-db.c (find_one_thread): Update.
15252 (maybe_attach_thread): Update.
15253
15254 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15255
15256 * target.h (struct target_ops): Add qxfer_osdata member.
15257 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15258 and dirent.h.
15259 (linux_qxfer_osdata): New functions.
15260 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15261 callback.
15262 * server.c (handle_query): Handle "qXfer:osdata:read:".
15263 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15264 (buffer_xml_printf): New functions.
15265 * server.h (struct buffer): New.
15266 (buffer_grow_str, buffer_grow_str0): New macros.
15267 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15268 (buffer_xml_printf): Declare.
15269
15270 2008-11-24 Doug Evans <dje@google.com>
15271
15272 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15273
15274 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15275
15276 * server.c (handle_v_run): Always use the supplied argument list.
15277
15278 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15279
15280 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15281 (xtensa_regmap_table): Add entry for scompare1.
15282
15283 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15284
15285 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15286 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15287 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15288 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15289 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15290 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15291 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15292 XML target descriptions.
15293 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15294 when inferior is running on an ISA 2.05 or later processor. Add
15295 special case to return offset for full 64-bit slot of FPSCR when
15296 in 32-bits.
15297
15298 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15299
15300 * Makefile.in (SFILES, clean): Added sparc64 files.
15301 (reg-sparc64.o, reg-sparc64.c): New.
15302 * configure.srv (sparc*-*-linux*): New configuration.
15303 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15304 syscall arguments for SPARC.
15305 (regsets_store_inferior_registers): Likewise.
15306 * linux-sparc-low.c: New file.
15307
15308 2008-10-21 Doug Evans <dje@google.com>
15309
15310 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15311 (READLINE_DIR,READLINE_DEP): Delete.
15312 (INTERNAL_CFLAGS): Update.
15313 (LINTFLAGS): Update.
15314
15315 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15316
15317 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15318 whole argv from the last run, not just argv[0].
15319
15320 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15321
15322 * regcache.c (new_register_cache): Return NULL if the register
15323 cache size isn't known yet.
15324 (free_register_cache): Avoid dereferencing a NULL regcache.
15325
15326 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15327
15328 * configure.srv: Merge MIPS and MIPS64.
15329
15330 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15331
15332 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15333
15334 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15335
15336 * Makefile.in: Add required vsx dependencies.
15337
15338 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15339 Declare init_registers_powerpc_vsx32l.
15340 Declare init_registers_powerpc_vsx64l.
15341 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15342 (ppc_arch_setup): Check for VSX in hwcap.
15343 (ppc_fill_vsxregset): New function.
15344 (ppc_store_vsxregset): New function.
15345 Add new VSX entry in regset_info target_regsets.
15346
15347 * configure.srv: Add new VSX dependencies.
15348
15349 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15350
15351 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15352 (remote_open): Set or clear transport_is_reliable.
15353 (putpkt_binary): Don't expect acks in noack mode.
15354 (getpkt): Don't send ack/nac in noack mode.
15355 * server.c (handle_general_set): Handle QStartNoAckMode.
15356 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15357 qSupported.
15358 (main): Reset noack_mode on every connection.
15359 * server.h (noack_mode): Declare.
15360
15361 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15362
15363 * Makefile.in (GDBREPLAY_OBS): New variable.
15364 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15365
15366 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15367 Daniel Jacobowitz <dan@codesourcery.com>
15368
15369 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15370 (usr_store_inferior_registers): Likewise.
15371 (regsets_store_inferior_registers): Likewise.
15372
15373 2008-07-31 Rolf Jansen <rj@surtec.com>
15374 Pedro Alves <pedro@codesourcery.com>
15375
15376 * configure.ac: Check for memmem declaration.
15377 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15378 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15379 (disable_packet_qfThreadInfo): Unconditionally compile.
15380 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15381 * configure, config.in: Regenerate.
15382
15383 2008-07-28 Doug Kwan <dougkwan@google.com>
15384
15385 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15386 (linux_write_memory): Remove declaration of errno.
15387
15388 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15389
15390 * linux-low.c (handle_extended_wait): Do not use "status"
15391 variable uninitialized.
15392
15393 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15394
15395 * server.c (handle_v_attach): Inhibit reporting dll changes.
15396
15397 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15398
15399 * remote-utils.c (prepare_resume_reply): If requested, don't
15400 output "thread:TID" in the T stop reply.
15401
15402 * server.c (disable_packet_vCont, disable_packet_Tthread)
15403 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15404 (handle_query): If requested, disable support for qC, qfThreadInfo
15405 and qsThreadInfo.
15406 (handle_v_requests): If requested, disable support for vCont.
15407 (gdbserver_show_disableable): New.
15408 (main): Handle --disable-packet and --disable-packet=LIST.
15409
15410 * server.h (disable_packet_vCont, disable_packet_Tthread)
15411 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15412
15413 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15414
15415 * server.c (gdbserver_usage): Mention --version.
15416
15417 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15418
15419 * Makefile.in (gdbreplay.o): New rule.
15420
15421 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15422
15423 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15424 message, not gdbserver.
15425
15426 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15427 Nathan Sidwell <nathan@codesourcery.com>
15428 Joseph Myers <joseph@codesourcery.com>
15429
15430 * acinclude.m4: Include ../../config/acx.m4.
15431 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15432 * configure, config.in: Regenerate.
15433 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15434 * server.c (gdbserver_version): Print PKGVERSION.
15435 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15436 (main): Adjust gdbserver_usage calls.
15437 * gdbreplay.c (version, host_name): Add declarations.
15438 (gdbreplay_version, gdbreplay_usage): New.
15439 (main): Accept --version and --help options.
15440
15441 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15442
15443 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15444 (arm_breakpoint_at): Handle Thumb.
15445 (the_low_target): Add comment.
15446
15447 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15448
15449 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15450
15451 2008-05-09 Doug Evans <dje@google.com>
15452
15453 * server.h (decode_search_memory_packet): Declare.
15454 * remote-utils.c (decode_search_memory_packet): New fn.
15455 * server.c (handle_search_memory_1): New fn.
15456 (handle_search_memory): New fn.
15457 (handle_query): Process qSearch:memory packets.
15458
15459 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15460
15461 * regcache.c (registers_length): Remove.
15462 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15463 full register packet.
15464 * regcache.h (registers_length): Remove prototype.
15465 * server.h (PBUFSIZ): Define to 16384.
15466
15467 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15468
15469 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15470 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15471 powerpc-64l.o, and powerpc-altivec64l.o.
15472 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15473 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15474 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15475 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15476 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15477 to srv_xmlfiles.
15478
15479 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15480 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15481 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15482 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15483 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15484 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15485 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15486 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15487 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15488 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15489 (clean): Update.
15490
15491 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15492 (init_registers_powerpc_32l): ... this new prototype.
15493 (init_registers_powerpc_32): Remove, replace by ...
15494 (init_registers_powerpc_altivec32l): ... this new prototype.
15495 (init_registers_powerpc_e500): Remove, replace by ...
15496 (init_registers_powerpc_e500l): ... this new prototype.
15497 (init_registers_ppc64): Remove, replace by ...
15498 (init_registers_powerpc_64l): ... this new prototype.
15499 (init_registers_powerpc_64): Remove, replace by ...
15500 (init_registers_powerpc_altivec64l): ... this new prototype.
15501 (ppc_num_regs): Set to 73.
15502 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15503 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15504 (ppc_cannot_store_register): Handle orig_r3 and trap.
15505 (ppc_arch_setup): Update init_registers_... calls.
15506 (ppc_fill_gregset): Handle orig_r3 and trap.
15507
15508 * inferiors.c (clear_inferiors): Reset current_inferior.
15509
15510 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15511
15512 * acinclude.m4: Add override.m4.
15513 * configure: Regenerate.
15514
15515 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15516
15517 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15518 initial call to init_register_ppc64.
15519
15520 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15521
15522 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15523 single powerpc*-*-linux* case.
15524 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15525
15526 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15527
15528 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15529 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15530 from reg_xmlfiles.
15531 * linux-ppc-low.c: Include <elf.h>.
15532 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15533 (ppc_hwcap): New global variable.
15534 (ppc_regmap): Remove __SPE__ #ifdef sections.
15535 (ppc_regmap_e500): New global variable.
15536 (ppc_cannot_store_register): Update __SPE__ special case.
15537 (ppc_get_hwcap): New function.
15538 (ppc_arch_setup): Use it to determine whether inferior supports
15539 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15540 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15541 Do not access registers if target does not support AltiVec.
15542 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15543 Do not access registers if target does not support SPE.
15544 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15545
15546 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * linux-low.c (disabled_regsets, num_regsets): New.
15549 (use_regsets_p): Delete.
15550 (linux_wait_for_process): Clear disabled_regsets.
15551 (regsets_fetch_inferior_registers): Check and set it.
15552 (regsets_store_inferior_registers): Likewise.
15553 (linux_fetch_registers, linux_store_registers): Do not use
15554 use_regsets_p.
15555 (initialize_low): Allocate disabled_regsets.
15556
15557 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15558
15559 * Makefile.in (LIBOBJS): New.
15560 (OBS): Use LIBOBJS.
15561 (memmem.o): New rule.
15562 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15563 * configure: Regenerated.
15564
15565 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15566
15567 * server.c (handle_query): Never return "unsupported" for
15568 qXfer:features:read queries.
15569
15570 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15571
15572 * server.c (get_features_xml): Fix inverted condition.
15573 (handle_query): Always support qXfer:feature:read.
15574
15575 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15576
15577 * server.c (wrapper_argv): New.
15578 (start_inferior): Handle wrapper_argv. If set, expect an extra
15579 trap.
15580 (gdbserver_usage): Document --wrapper.
15581 (main): Parse --wrapper.
15582
15583 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15584
15585 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15586 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15587 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15588 (ppc_set_pc): Likewise.
15589 (ppc_arch_setup): New function.
15590 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15591 of collect_register.
15592 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15593
15594 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15595
15596 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15597 instead of linux-ppc64-low.o.
15598 * linux-ppc64-low.c: Remove file.
15599 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15600 (linux-ppc64-low.o): Remove rule.
15601
15602 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15603 (init_registers_powerpc_64): Likewise.
15604 (ppc_regmap): Conditionally define depending on __powerpc64__.
15605 (ppc_cannot_store_register): Do not special-case "fpscr" when
15606 compiled on __powerpc64__.
15607 (ppc_collect_ptrace_register): New function.
15608 (ppc_supply_ptrace_register): New function.
15609 (ppc_breakpoint): Change type to "unsigned int".
15610 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15611 (the_low_target): Conditionally provide initializers for the
15612 arch_setup member depending on __powerpc64__. Install
15613 collect_ptrace_register and supply_ptrace_register members.
15614
15615 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15616
15617 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15618 * server.c (gdbserver_xmltarget): Define.
15619 (get_features_xml): Use it to replace "target.xml" and arch_string.
15620
15621 * configure.srv: Remove srv_xmltarget. Add XML files that were
15622 mentioned there to srv_xmlfiles instead. Remove conditional tests
15623 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15624 srv_xmlfiles and srv_regobj to include all possible choices.
15625 * configure.ac (srv_xmltarget): Remove.
15626 (srv_xmlfiles): Do not add "target.xml".
15627 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15628 checks for supplementary target information.
15629 * configure: Regenerate.
15630 * Makefile.in (XML_TARGET): Remove.
15631 (target.xml): Remove rule.
15632 (clean): Do not clean up target.xml.
15633 (.PRECIOUS): Do not mention target.xml.
15634
15635 * target.h (struct target_ops): Remove arch_string member.
15636 * linux-low.c (linux_arch_string): Remove.
15637 (linux_target_ops): Remove arch_string initializer.
15638 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15639 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15640 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15641 * spu-low.c (spu_arch_string): Remove.
15642 (spu_target_ops): Remove arch_string initializer.
15643 * win32-low.c (win32_arch_string): Remove.
15644 (win32_target_ops): Remove arch_string initializer.
15645 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15646 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15647 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15648
15649 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15650
15651 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15652 by collect_ptrace_register and supply_ptrace_register hooks.
15653 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15654 instead of checking for the_low_target.left_pad_xfer.
15655 (usr_store_inferior_registers): Use collect_ptrace_register callback
15656 instead of checking for the_low_target.left_pad_xfer.
15657
15658 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15659 (s390_supply_ptrace_register): Likewise.
15660 (s390_fill_gregset): Call s390_collect_ptrace_register.
15661 (the_low_target): Update.
15662
15663 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15664 (ppc_supply_ptrace_register): Likewise.
15665 (the_low_target): Update.
15666
15667 * linux-i386-low.c (the_low_target): Update.
15668 * linux-x86-64-low.c (the_low_target): Update.
15669
15670 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15671
15672 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15673 reg-s390.o and reg-s390x.o.
15674
15675 * linux-low.c (new_inferior): New global variable.
15676 (linux_create_inferior, linux_attach): Set it.
15677 (linux_wait_for_process): Call the_low_target.arch_setup after the
15678 target has stopped for the first time.
15679 (initialize_low): Do not call the_low_target.arch_setup.
15680
15681 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15682 (s390_set_pc): Likewise.
15683 (s390_arch_setup): New function.
15684 (the_low_target): Use s390_arch_setup as arch_setup routine.
15685
15686 * regcache.c (realloc_register_cache): New function.
15687 (set_register_cache): Call it for each existing regcache.
15688
15689 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15690
15691 * server.h (init_registers): Remove prototype.
15692
15693 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15694 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15695 instead of init_registers ().
15696 * linux-arm-low.c (init_registers_arm): Add prototype.
15697 (init_registers_arm_with_iwmmxt): Likewise.
15698 (the_low_target): Add initializer for arch_setup field.
15699 * linux-cris-low.c (init_registers_cris): Add prototype.
15700 (the_low_target): Add initializer for arch_setup field.
15701 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15702 (the_low_target): Add initializer for arch_setup field.
15703 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15704 (the_low_target): Add initializer for arch_setup field.
15705 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15706 (the_low_target): Add initializer for arch_setup field.
15707 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15708 (the_low_target): Add initializer for arch_setup field.
15709 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15710 (the_low_target): Add initializer for arch_setup field.
15711 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15712 (init_registers_mips64_linux): Likewise.
15713 (the_low_target): Add initializer for arch_setup field.
15714 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15715 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15716 (the_low_target): Add initializer for arch_setup field.
15717 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15718 (init_registers_powerpc_64): Likewise.
15719 (the_low_target): Add initializer for arch_setup field.
15720 * linux-s390-low.c (init_registers_s390): Add prototype.
15721 (init_registers_s390x): Likewise.
15722 (the_low_target): Add initializer for arch_setup field.
15723 * linux-sh-low.c (init_registers_sh): Add prototype.
15724 (the_low_target): Add initializer for arch_setup field.
15725 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15726 (the_low_target): Add initializer for arch_setup field.
15727 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15728 (the_low_target): Add initializer for arch_setup field.
15729
15730 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15731 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15732 instead of init_registers ().
15733 * win32-arm-low.c (init_registers_arm): Add prototype.
15734 (the_low_target): Add initializer for arch_setup field.
15735 * win32-i386-low.c (init_registers_i386): Add prototype.
15736 (the_low_target): Add initializer for arch_setup field.
15737
15738 * spu-low.c (init_registers_spu): Add prototype.
15739 (initialize_low): Call initialie_registers_spu () instead of
15740 initialize_registers ().
15741
15742 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15743
15744 * server.c (handle_v_requests): When handling the vRun and vAttach
15745 packets, if already debugging a process, don't kill it. Return an
15746 error instead.
15747
15748 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15749
15750 * server.c (handle_query): Correct length check.
15751
15752 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15753
15754 * win32-low.c (do_initial_child_stuff): Add process handle
15755 parameter. Set current_process_handle and current_process_id from the
15756 parameters. Clear globals.
15757 (win32_create_inferior): Don't set current_process_handle and
15758 current_process_id here. Instead pass them on the call to
15759 do_initial_child_stuff.
15760 (win32_attach): Likewise.
15761 (win32_clear_inferiors): New.
15762 (win32_kill): Don't close the current process handle or the
15763 current thread handle here. Instead call win32_clear_inferiors.
15764 (win32_detach): Don't open a new handle to the process. Call
15765 win32_clear_inferiors.
15766 (win32_join): Don't rely on current_process_handle; open a new
15767 handle using the process id.
15768 (win32_wait): Call win32_clear_inferiors when the inferior process
15769 has exited.
15770
15771 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * server.c (monitor_show_help): Add "exit".
15774
15775 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15776
15777 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15778 (clean): Add reg-xtensa.c.
15779 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15780 * configure.srv (xtensa*-*-linux*) New target.
15781 * linux-xtensa-low.c: New.
15782 * xtensa-xtregs.c: New.
15783
15784 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15785
15786 * hostio.c: Don't include errno.h.
15787 (errno_to_fileio_errno): Move to hostio-errno.
15788 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15789 error number outputting to the target->hostio_last_error callback.
15790 (hostio_packet_error): Use FILEIO_EINVAL directly.
15791 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15792 calls to hostio_error.
15793 * hostio-errno.c: New.
15794 * server.h (hostio_last_error_from_errno): Declare.
15795 * target.h (target_ops): Add hostio_last_error member.
15796 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15797 as hostio_last_error handler.
15798 * spu-low.c (spu_target_ops): Likewise.
15799 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15800 (wince_hostio_last_error): New functions.
15801 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15802 as hostio_last_error handler.
15803 (win32_target_ops) [!_WIN32_WCE]: Register
15804 hostio_last_error_from_errno as hostio_last_error handler.
15805 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15806 (hostio-errno.o): New rule.
15807 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15808 * configure.srv (srv_hostio_err_objs): New variable. Default to
15809 hostio-errno.o.
15810 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15811 * configure: Regenerate.
15812
15813 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15814
15815 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15816 (linux_kill, linux_detach): Clean up the process list.
15817 * remote-utils.c (remote_open): Improve port number parsing.
15818 (putpkt_binary, input_interrupt): Only send interrupts if the target
15819 is running.
15820 * server.c (extended_protocol): Make static.
15821 (attached): Define earlier.
15822 (exit_requested, response_needed, program_argv): New variables.
15823 (target_running): New.
15824 (start_inferior): Clear attached here.
15825 (attach_inferior): Set attached here.
15826 (require_running): Define.
15827 (handle_query): Use require_running and target_running. Implement
15828 "monitor exit".
15829 (handle_v_attach, handle_v_run): New.
15830 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15831 (gdbserver_usage): Update.
15832 (main): Redo argument parsing. Handle --debug and --multi. Handle
15833 --attach along with other options or after the port. Save
15834 program_argv. Support no initial program. Resynchronize
15835 communication with GDB after an error. Handle "monitor exit".
15836 Use require_running and target_running. Always allow the extended
15837 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15838 restart in extended mode.
15839 * README: Refer to the GDB manual. Update --attach usage.
15840
15841 2007-12-20 Andreas Schwab <schwab@suse.de>
15842
15843 * linux-low.c (STACK_SIZE): Define.
15844 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15845 (linux_test_for_tracefork): Likewise.
15846
15847 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * linux-low.c (linux_wait_for_event): Update messages. Do not
15850 reinsert auto-delete breakpoints.
15851 * mem-break.c (struct breakpoint): Change return type of handler to
15852 int.
15853 (set_breakpoint_at): Update handler type.
15854 (reinsert_breakpoint_handler): Return 1 instead of calling
15855 delete_breakpoint.
15856 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15857 setting a new one.
15858 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15859 * mem-break.h (set_breakpoint_at): Update handler type.
15860 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15861 * win32-low.c (auto_delete_breakpoint): New.
15862 (get_child_debug_event): Use it.
15863
15864 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * configure.ac: Check for pread and pwrite.
15867 * hostio.c (handle_pread): Fall back to lseek and read.
15868 (handle_pwrite): Fall back to lseek and write.
15869 * config.in, configure: Regenerated.
15870
15871 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15872
15873 * server.c (myresume): Add own_buf argument.
15874 (main): Update calls.
15875
15876 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15879 * remote-utils.c (remote_open): Do not call disable_async_io.
15880 (block_async_io): Delete.
15881 (unblock_async_io): Make static.
15882 (initialize_async_io): New.
15883 * server.c (handle_v_cont): Handle async I/O here.
15884 (myresume): Likewise. Move other common resume tasks here...
15885 (main): ... from here. Call initialize_async_io. Disable async
15886 I/O before the main loop.
15887 * server.h (initialize_async_io): Declare.
15888 (block_async_io, unblock_async_io): Delete prototypes.
15889 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15890
15891 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15892
15893 * remote-utils.c (readchar): Allow binary data in received messages.
15894
15895 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15896
15897 * win32-low.c (attaching): New global.
15898 (win32_create_inferior): Clear the `attaching' global.
15899 (win32_attach): Set the `attaching' global.
15900 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15901 attaching. Only set a breakpoint at the entry point if not
15902 attaching.
15903
15904 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15905
15906 * server.c (main): Don't report dll events on the initial
15907 connection on attaches.
15908
15909 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15910
15911 * server.c (main): Relax numerical bases supported for the pid of
15912 the --attach command line argument.
15913
15914 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15915
15916 * win32-low.c (win32_attach): Call OpenProcess before
15917 DebugActiveProcess, not after. Add last error output to error
15918 call.
15919
15920 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15921
15922 * win32-low.c (win32_get_thread_context)
15923 (win32_set_thread_context): New functions.
15924 (thread_rec): Use win32_get_thread_context.
15925 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15926 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15927 field.
15928
15929 2007-12-03 Leo Zayas
15930 Pedro Alves <pedro_alves@portugalmail.pt>
15931
15932 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15933 global variables.
15934 (child_add_thread): Minor cleanup.
15935 (child_continue): Resume artificially suspended threads before
15936 calling ContinueDebugEvent.
15937 (suspend_one_thread): New.
15938 (fake_breakpoint_event): New.
15939 (get_child_debug_event): Change return type to int. Check here if
15940 gdb sent an interrupt request. If a soft interrupt was requested,
15941 fake a breakpoint event. Return 0 if there is no event to handle,
15942 and 1 otherwise.
15943 (win32_wait): Don't check here if gdb sent an interrupt request.
15944 Ensure there is a valid event to handle.
15945 (win32_request_interrupt): Add soft interruption method as last
15946 resort.
15947
15948 2007-12-03 Leo Zayas
15949 Pedro Alves <pedro_alves@portugalmail.pt>
15950
15951 * win32-low.h (win32_thread_info): Add descriptions to the
15952 structure members. Replace `suspend_count' counter by a
15953 `suspended' flag.
15954 * win32-low.c (thread_rec): Update condition of when to get the
15955 context from the inferior. Rely on ContextFlags being set if it
15956 has already been retrieved. Only suspend the inferior thread if
15957 we haven't already. Warn if that fails.
15958 (continue_one_thread): s/suspend_count/suspended/. Only call
15959 ResumeThread once. Warn if that fails.
15960
15961 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15962
15963 * win32-low.c (win32_wait): Don't read from the inferior when it
15964 has already exited.
15965
15966 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * Makefile.in (win32_low_h): New variable.
15969 (win32-low.o): Add dependency on $(win32_low_h).
15970 (win32-arm-low.o, win32-i386-low.o): New rules.
15971
15972 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15973
15974 * hostio.c: Correct copyright year.
15975
15976 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15977
15978 * Makefile.in (OBS): Add hostio.o.
15979 (hostio.o): New rule.
15980 * server.h (handle_vFile): Declare.
15981 * hostio.c: New file.
15982 * server.c (handle_v_requests): Take packet_len and new_packet_len
15983 for binary packets. Call handle_vFile.
15984 (main): Update call to handle_v_requests.
15985
15986 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15987
15988 * linux-low.c: Include <sched.h>.
15989
15990 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15991
15992 * linux-low.c (linux_tracefork_grandchild): New.
15993 (linux_tracefork_child): Use clone.
15994 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15995
15996 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15997
15998 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15999
16000 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16001
16002 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16003
16004 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16005
16006 * inferiors.c (change_inferior_id): Delete.
16007 (add_pid_to_list, pull_pid_from_list): New.
16008 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16009 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16010 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16011 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16012 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16013 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16014 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16015 (using_threads): Always set to 1.
16016 (handle_extended_wait): New.
16017 (add_process): Do not set TID.
16018 (linux_create_inferior): Set must_set_ptrace_flags.
16019 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16020 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16021 (linux_thread_alive): Rename TID argument to LWPID.
16022 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16023 (linux_wait_for_event): Do not use TID or check using_threads. Update
16024 call to dead_thread_notify. Call handle_extended_wait.
16025 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16026 (send_sigstop): Delete sigstop_sent.
16027 (wait_for_sigstop): Avoid TID.
16028 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16029 (linux_test_for_tracefork): New.
16030 (linux_lookup_signals): Use thread_db_active and
16031 linux_supports_tracefork_flag.
16032 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16033 * linux-low.h (get_process_thread): Avoid TID.
16034 (struct process_ifo): Move thread_known and tid to the end. Remove
16035 sigstop_sent.
16036 (linux_attach_lwp, thread_db_init): Update prototypes.
16037 * server.h (change_inferior_id): Delete prototype.
16038 (add_pid_to_list, pull_pid_from_list): New prototypes.
16039 * thread-db.c (thread_db_use_events): New.
16040 (find_first_thread): Rename to...
16041 (find_one_thread): ...this. Update callers and messages. Do not
16042 call fatal. Check thread_db_use_events. Do not call
16043 change_inferior_id or new_thread_notify.
16044 (maybe_attach_thread): Update. Do not call new_thread_notify.
16045 (thread_db_init): Set thread_db_use_events. Check use_events.
16046 * utils.c (fatal, warning): Correct message prefix.
16047
16048 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16049
16050 * Makefile.in (clean): Remove new files.
16051 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16052 (powerpc-64.o, powerpc-64.c): New rules.
16053 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16054 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16055 with SPE.
16056 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16057 SPE targets.
16058 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16059 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16060 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16061 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16062 (target_regsets): Add AltiVec and SPE register sets.
16063 * configure.ac: Check for AltiVec and SPE.
16064 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16065 (ppc_fill_vrregset, ppc_store_vrregset): New.
16066 (target_regsets): Add AltiVec register set.
16067 * configure: Regenerated.
16068
16069 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16070
16071 * linux-low.c (O_LARGEFILE): Define.
16072 (linux_read_memory): Use /proc/PID/mem.
16073 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16074 * configure, config.in: Regenerated.
16075
16076 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16077
16078 * linux-low.c (linux_wait_for_event): Do not pass signals while
16079 single-stepping.
16080
16081 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16082
16083 * win32-low.c (create_process): New.
16084 (win32_create_inferior): Use create_process instead of
16085 CreateProcess. If create_process failed retry appending an ".exe"
16086 suffix. Store the GetLastError result immediatelly after
16087 create_process calls and use it on the call to error.
16088
16089 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16090
16091 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16092
16093 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16094
16095 * configure.ac: Switch license to GPLv3.
16096
16097 2007-08-01 Michael Snyder <msnyder@access-company.com>
16098
16099 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16100
16101 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16104 typedef.
16105 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16106 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16107 CloseToolhelp32Snapshot.
16108 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16109 CloseToolhelp32Snapshot.
16110
16111 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16112
16113 * server.c (main): Check for inferior exit before main loop.
16114
16115 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16116
16117 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16118 instead of on tmp_desc.
16119
16120 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16121 Daniel Jacobowitz <dan@codesourcery.com>
16122
16123 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16124 (add_thread): Minor cleanups.
16125 (clear_inferiors): Move lower in the file. Clear the DLL
16126 list.
16127 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16128 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16129 (xml_escape_text): New.
16130 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16131 for qSupported.
16132 (handle_v_cont): Report errors.
16133 (gdbserver_version): Update.
16134 (main): Correct size of own_buf. Do not report initial DLL events.
16135 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16136 (unloaded_dll, xml_escape_text): New.
16137 * win32-low.c (enum target_waitkind): Update comments.
16138 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16139 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16140 (win32_EnumProcessModules, win32_GetModuleInformation)
16141 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16142 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16143 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16144 (win32_Module32First, win32_Module32Next, load_toolhelp)
16145 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16146 (get_child_debug_event): Handle DLL events.
16147 (win32_wait): Likewise.
16148
16149 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16150
16151 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16152 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16153
16154 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16155
16156 * win32-low.c (handle_output_debug_string): Ignore event if not
16157 waiting.
16158
16159 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16160
16161 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16162
16163 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16164
16165 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16166
16167 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16168
16169 * inferiors.c (change_inferior_id): Add comment.
16170 * linux-low.c (check_removed_breakpoint): Add an early
16171 prototype. Improve debug output.
16172 (linux_attach): Doc update.
16173 (linux_detach_one_process, linux_detach): Clean up before releasing
16174 each process.
16175 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16176 * linux-low.h (struct process_info): Doc improvement.
16177 * mem-break.c (delete_all_breakpoints): New.
16178 * mem-break.h (delete_all_breakpoints): New prototype.
16179 * thread-db.c (find_first_thread): New.
16180 (thread_db_create_event): Call it instead of
16181 thread_db_find_new_threads. Clean up unused variables.
16182 (maybe_attach_thread): Remove first thread handling.
16183 (thread_db_find_new_threads): Use find_first_thread.
16184 (thread_db_get_tls_address): Likewise.
16185
16186 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16187
16188 * thread-db.c (thread_db_find_new_threads): Add prototype.
16189 (thread_db_create_event): Check for the main thread before adding
16190 a new thread.
16191 (maybe_attach_thread): Only enable event reporting if TID == 0.
16192 (thread_db_get_tls_address): Check for new threads.
16193
16194 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * linux-low.c (linux_create_inferior): Try execv before execvp.
16197 * spu-low.c (spu_create_inferior): Likewise.
16198
16199 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16200
16201 * linux-low.c (linux_create_inferior): Change execv to execvp.
16202 * spu-low.c (spu_create_inferior): Likewies.
16203
16204 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16205
16206 * Makefile.in (clean): Clean new files instead of deleted ones.
16207 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16208 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16209 rules.
16210 * configure.srv: Specify XML files and new regformats for MIPS and
16211 MIPS64 GNU/Linux.
16212 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16213 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16214 an entry for the restart register.
16215 (mips_cannot_fetch_register, mips_cannot_store_register)
16216 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16217 register names to match the XML descriptions.
16218 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16219 restart register instead of $0.
16220
16221 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16222 Markus Deuling <deuling@de.ibm.com>
16223
16224 * remote-utils.c (decode_xfer_write): New function.
16225 * server.h (decode_xfer_write): Add prototype.
16226 * server.c (handle_query): Add PACKET_LEN argument. Support
16227 qXfer:spu:read and qXfer:spu:write packets.
16228 (main): Pass packet_len to handle_query.
16229 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16230 * target.h (target_ops): Add qxfer_spu.
16231
16232 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16233
16234 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16235 accessing non-seekable spufs files.
16236
16237 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16238
16239 * server.c (handle_query): Add reply for qC packet.
16240
16241 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16242 Leo Zayas <lerele@champenstudios@com>
16243
16244 * server.h (check_remote_input_interrupt_request): New function.
16245 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16246 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16247 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16248 (check_remote_input_interrupt_request): New function.
16249 * server.h (check_remote_input_interrupt_request): Declare.
16250 * win32-low.c (winapi_DebugBreakProcess,
16251 winapi_GenerateConsoleCtrlEvent): New typedefs.
16252 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16253 to 250 ms.
16254 (win32_wait): Check for remote interrupt request
16255 with check_remote_input_interrupt_request.
16256 (win32_request_interrupt): New function.
16257 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16258
16259 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16260
16261 * win32-low.c (debug_registers_changed,
16262 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16263 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16264 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16265 (thread_rec): Get context using the low target.
16266 (child_add_thread): Call thread_added on the low target,
16267 which does the same thing.
16268 (regptr): Delete.
16269 (do_initial_child_stuff): Remove debug registers references.
16270 Set context using the low target. Resume threads after
16271 setting the contexts.
16272 (child_continue): Remove dead variable. Remove debug
16273 registers references.
16274 (child_fetch_inferior_registers): Go through the low target.
16275 (do_child_store_inferior_registers): Remove.
16276 (child_store_inferior_registers): Go through the low target.
16277 (win32_resume): Remove debug registers references.
16278 Set context using the low target.
16279 (handle_exception): Change return type to void. Don't record
16280 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16281 first chance exception.
16282 (get_child_debug_event): Change return type to void. Remove
16283 goto loop. Always return after waiting for debug event.
16284 (win32_wait): Convert to switch statement. Handle spurious
16285 events.
16286
16287 * win32-i386-low.c (debug_registers_changed,
16288 debug_registers_used): New.
16289 (initial_stuff): Rename to ...
16290 (i386_initial_stuff): ... this. Clear debug registers
16291 state variables.
16292 (store_debug_registers): Delete.
16293 (i386_get_thread_context): New.
16294 (load_debug_registers): Delete.
16295 (i386_set_thread_context): New.
16296 (i386_thread_added): New.
16297 (single_step): Rename to ...
16298 (i386_single_step): ... this.
16299 (do_fetch_inferior_registers): Rename to ...
16300 (i386_fetch_inferior_register): ... this.
16301 (i386_store_inferior_register): New.
16302 (the_low_target): Adapt to new interface.
16303
16304 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16305 (arm_get_thread_context): New.
16306 (arm_set_thread_context): New.
16307 (regptr): New.
16308 (do_fetch_inferior_registers): Rename to ...
16309 (arm_fetch_inferior_register): ... this.
16310 (arm_store_inferior_register): New.
16311 (arm_wince_breakpoint): Reimplement as unsigned long.
16312 (arm_wince_breakpoint_len): Define.
16313 (the_low_target): Adapt to new interface.
16314
16315 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16316 load_debug_registers. Add get_thread_context, set_thread_context,
16317 thread_added and store_inferior_register. Rename
16318 fetch_inferior_registers to fetch_inferior_register.
16319 (regptr): Remove declaration.
16320
16321 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16322
16323 * linux-low.c (linux_detach): Change return type to int. Return 0.
16324 * spu-low.c (spu_detach): Likewise.
16325
16326 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16327
16328 * target.h (target_ops): Change return type of detach to int.
16329 Add join.
16330 (join_inferior): New.
16331 * server.c (main): Don't skip detach support on mingw32.
16332 If the inferior doesn't support detaching return error.
16333 Call join_inferior instead of using waitpid.
16334 * linux-low.c (linux_join): New.
16335 (linux_target_op): Add linux_join.
16336 * spu-low.c (spu_join): New.
16337 (spu_target_ops): Add spu_join.
16338 * win32-low.c (win32_detach): Adapt to new interface.
16339 Reopen current_process_handle before detaching. Issue a child
16340 resume before detaching.
16341 (win32_join): New.
16342 (win32_target_op): Add win32_join.
16343
16344 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16345
16346 * win32-low.c (win32-attach): Fix return value.
16347 * target.h (target_ops): Describe ATTACH return values.
16348
16349 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16350
16351 * win32-low.c (GETPROCADDRESS): Define.
16352 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16353 (winapi_DebugSetProcessKillOnExit): Likewise.
16354 (win32_create_inferior): Force usage of ansi CreateProcessA.
16355 (win32_attach): Use GETPROCADDRESS.
16356 (win32_detach): Likewise.
16357
16358 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16359
16360 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16361
16362 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16363
16364 * win32-low.c: Commit leftover changes from 2007-03-29.
16365
16366 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16367
16368 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16369 fields short instead of int. Add explicit padding.
16370 (i387_cache_to_fsave): Remove unnecessary casts.
16371 (i387_fsave_to_cache): Doc fix.
16372 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16373
16374 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16375
16376 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16377 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16378
16379 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16380
16381 * configure.srv (arm*-*-mingw32ce*): Move near the other
16382 arm targets.
16383
16384 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16385
16386 * configure.ac: Add errno checking.
16387 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16388 sys/file.h and malloc.h.
16389 (AC_CHECK_DECLS): Add perror.
16390 (srv_mingwce): Handle.
16391 * configure.srv (i[34567]86-*-cygwin*): Add
16392 win32-i386-low.o to srv_tgtobj.
16393 (i[34567]86-*-mingw*): Likewise.
16394 (arm*-*-mingw32ce*): Add case.
16395 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16396 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16397 [__MINGW32CE__] (strerror): New function.
16398 [__MINGW32CE__] (errno): Define to GetLastError.
16399 [__MINGW32CE__] (COUNTOF): New macro.
16400 (remote_open): Remove extra close call.
16401 * mem-break.c (delete_breakpoint_at): New function.
16402 * mem-break.h (delete_breakpoint_at): Declare.
16403 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16404 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16405 [USE_WIN32API] (read, write): Add char* casts.
16406 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16407 * server.h: Include wincecompat.h on Windows CE.
16408 [HAVE_ERRNO_H]: Check.
16409 (perror): Declare if not declared.
16410 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16411 (perror_with_name): Remove errno declaration.
16412 * wincecompat.h: New.
16413 * wincecompat.c: New.
16414 * win32-low.h: New.
16415 * win32-arm-low.c: New.
16416 * win32-i386-low.c: New.
16417 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16418 (OUTMSG2): Make it safe.
16419 (_T): New macro.
16420 (COUNTOF): New macro.
16421 (NUM_REGS): Get it from the low target.
16422 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16423 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16424 (thread_rec): Let low target handle debug registers.
16425 (child_add_thread): Likewise.
16426 (child_init_thread_list): Likewise.
16427 (continue_one_thread): Likewise.
16428 (regptr): New.
16429 (do_child_fetch_inferior_registers): Move to ...
16430 * win32-i386-low.c: ... here, and rename to ...
16431 (do_fetch_inferior_registers): ... this.
16432 * win32-low.c (child_fetch_inferior_registers):
16433 Go through the low target.
16434 (do_child_store_inferior_registers): Use regptr.
16435 (strwinerror): New function.
16436 (win32_create_inferior): Handle Windows CE.
16437 Use strwinerror instead of strerror on Windows error
16438 codes. Add program to the error output.
16439 Don't close the main thread handle on Windows CE.
16440 (win32_attach): Use coredll.dll on Windows CE.
16441 (win32_kill): Close current process and current
16442 thread handles.
16443 (win32_detach): Use coredll.dll on Windows CE.
16444 (win32_resume): Let low target handle debug registers, and
16445 step request.
16446 (handle_exception): Add/Remove initial breakpoint. Avoid
16447 non-existant WSTOPSIG on Windows CE.
16448 (win32_read_inferior_memory): Cast to remove warning.
16449 (win32_arch_string): Go through the low target.
16450 (initialize_low): Call set_breakpoint_data with the low
16451 target's breakpoint.
16452 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16453 FOP_REGNUM, mappings): Move to ...
16454 * win32-i386-low.c: ... here.
16455 * win32-low.c (win32_thread_info): Move to ...
16456 * win32-low.h: ... here.
16457 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16458 win32-arm-low.c and wincecompat.c.
16459 (all:): Add $EXEEXT.
16460 (install-only:): Likewise.
16461 (gdbserver:): Likewise.
16462 (gdbreplay:): Likewise.
16463 * config.in: Regenerate.
16464 * configure: Regenerate.
16465
16466 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16467
16468 * win32-low.c: Rename typedef thread_info to
16469 win32_thread_info throughout.
16470
16471 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16472
16473 * win32-i386-low.c: Rename to ...
16474 * win32-low.c: ... this.
16475 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16476 * Makefile.in: Likewise.
16477
16478 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16479
16480 * remote-utils.c (monitor_output): Constify msg parameter.
16481 * server.h (monitor_output): Likewise.
16482 * win32-i386-low.c (handle_output_debug_string): New.
16483 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16484 handle_output_debug_string.
16485 (get_child_debug_event): Likewise.
16486
16487 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16488
16489 * server.c (main): Correct strtoul check.
16490
16491 2007-03-27 Jon Ringle <jon@ringle.org>
16492
16493 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16494
16495 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16496
16497 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16498
16499 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16500
16501 * terminal.h: Check HAVE_SGTTY_H.
16502
16503 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16504
16505 * remote-utils.c (remote_open): Print out the assigned port number.
16506
16507 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16508
16509 * remote-utils.c (monitor_output): New function.
16510 * server.c (debug_threads): Define here.
16511 (monitor_show_help): New function.
16512 (handle_query): Handle qRcmd.
16513 (main): Do not handle 'd' packet.
16514 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16515 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16516 of debug_threads.
16517
16518 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16519
16520 * Makefile.in (EXEEXT): New.
16521 (clean): Use $(EXEEXT).
16522
16523 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16524
16525 * target.h (target_ops): Rename send_signal to request_interrupt,
16526 and remove enum target_signal parameter.
16527 * linux-low.c (linux_request_interrupt): Rename from
16528 linux_send_signal, and always send SIGINT.
16529 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16530 and always send SIGINT.
16531 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16532 of send_signal.
16533 (input_interrupt): Likewise.
16534
16535 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16536
16537 * server.c (get_features_xml): Check if target implemented
16538 arch_string.
16539 * win32-i386-low.c (win32_arch_string): New.
16540 (win32_target_ops): Add win32_arch_string as arch_string member.
16541
16542 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16543
16544 * spu-low.c (spu_arch_string): New.
16545 (spu_target_ops): Add spu_arch_string.
16546
16547 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16548
16549 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16550 * configure.ac: Do not check for terminal.h.
16551 * configure, config.in: Regenerated.
16552
16553 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16554
16555 * Makefile.in (OBS): Add $(XML_BUILTIN).
16556 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16557 (clean): Update.
16558 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16559 (arm-with-iwmmxt.c): New.
16560 * config.in, configure: Regenerate.
16561 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16562 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16563 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16564 (arm*-*-linux*): Add iWMMXt and regset support.
16565 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16566 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16567 (arm_store_wmmxregset, target_regsets): New.
16568 * server.c (get_features_xml): Take annex argument. Check builtin
16569 XML documents.
16570 (handle_query): Handle multiple annexes.
16571
16572 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16573
16574 * remote-utils.c [USE_WIN32API] (read, write): Define.
16575 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16576 write.
16577
16578 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16579
16580 * linux-i386-low.c (the_low_target): Set arch_string.
16581 * linux-x86-64-low.c (the_low_target): Likewise.
16582 * linux-low.c (linux_arch_string): New.
16583 (linux_target_ops): Add it.
16584 * linux-low.h (struct linux_target_ops): Add arch_string.
16585 * server.c (write_qxfer_response): Use const void * for DATA.
16586 (get_features_xml): New.
16587 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16588 * target.h (struct target_ops): Add arch_string method.
16589
16590 2007-01-03 Denis Pilat <denis.pilat@st.com>
16591 Daniel Jacobowitz <dan@codesourcery.com>
16592
16593 * linux-low.c (linux_kill): Handle being called with no threads.
16594 * win32-i386-low.c (win32_kill): Likewise.
16595 (get_child_debug_event): Clear current_process_handle.
16596
16597 2006-12-30 Denis PILAT <denis.pilat@st.com>
16598 Daniel Jacobowitz <dan@codesourcery.com>
16599
16600 * remote-utils.c (remote_open): Check the type of specified
16601 serial port devices before opening them.
16602 * server.c (main): Kill the inferior if an error occurs during
16603 the first remote_open.
16604
16605 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16606
16607 * README: Update supported targets.
16608
16609 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16610
16611 * Makefile.in (clean): Remove reg-mips64.c.
16612 (reg-mips64.c, reg-mips64.o): New rules.
16613 * configure.srv: Handle mips64. Include regset support for mips.
16614 * linux-mips-low.c (union mips_register): New.
16615 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16616 (mips_breakpoint, mips_breakpoint_at): Use int.
16617 (mips_collect_register, mips_supply_register)
16618 (mips_collect_register_32bit, mips_supply_register_32bit)
16619 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16620 (mips_store_fpregset, target_regsets): New.
16621 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16622
16623 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16624
16625 * configure.srv: Add target "spu*-*-*".
16626 * Makefile.in (clean): Remove reg-spu.c.
16627 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16628 * spu-low.c: New file.
16629
16630 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16631
16632 * configure.ac: Correct td_thr_tls_get_addr test.
16633 * configure: Regenerated.
16634
16635 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * linux-low.c (linux_wait_for_event): Reformat. Use the
16638 pass_signals array.
16639 * remote-utils.c (decode_address_to_semicolon): New.
16640 * server.c (pass_signals, handle_general_set): New.
16641 (handle_query): Mention QPassSignals for qSupported.
16642 (main): Call handle_general_set.
16643 * server.h (pass_signals, decode_address_to_semicolon): New.
16644
16645 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16646
16647 * server.c (handle_query): Correct error handling for read_auxv.
16648
16649 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16650
16651 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16652 and srv_linux_thread_db to yes.
16653 * linux-s390-low.c (s390_fill_gregset): New function.
16654 (target_regsets): Define data structure.
16655
16656 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16659 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16660 * config.in, configure: Regenerated.
16661 * inferiors.c (gdb_id_to_thread): New function.
16662 (gdb_id_to_thread_id): Use it.
16663 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16664 * linux-low.h (struct process_info): Add th member.
16665 (thread_db_get_tls_address): New prototype.
16666 * remote-utils.c (decode_address): Make non-static.
16667 * server.c (handle_query): Handle qGetTLSAddr.
16668 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16669 * target.h (struct target_ops): Add get_tls_address.
16670 * thread-db.c (maybe_attach_thread): Save the thread handle.
16671 (thread_db_get_tls_address): New.
16672
16673 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16674
16675 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16676 (linux_resume_one_process): Take a siginfo_t *. Update all
16677 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16678 (struct pending_signals): Add a siginfo_t.
16679 (linux_wait_for_process): Always set last_status.
16680 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16681 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16682 * linux-low.h (struct process_info): Add last_status.
16683
16684 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16685
16686 * remote-utils.c (try_rle): New function.
16687 (putpkt_binary): Use it.
16688
16689 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16690
16691 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16692 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16693 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16694 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16695 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16696 point registers.
16697
16698 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16699
16700 * server.c (terminal_fd): New variable.
16701 (old_foreground_pgrp): Likewise.
16702 (restore_old_foreground_pgrp): New function.
16703 (start_inferior): Record the terminal file descriptor in terminal_fd
16704 and its original foreground group in old_foreground_pgrp. Register
16705 restore_old_foreground_pgrp with atexit().
16706
16707 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16708
16709 * server.c (handle_query): Correct qPart to qXfer.
16710
16711 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16712
16713 * configure.ac: Check for more headers which are missing on
16714 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16715 * configure.srv: Add Cygwin and mingw32.
16716 * remote-utils.c: Don't include headers unconditionally which
16717 are missing on mingw32. Include <winsock.h> for mingw32.
16718 (remote_open): Adjust for mingw32 support. Flush
16719 standard error after writing to it.
16720 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16721 (unblock_async_io, enable_async_io, disable_async_io)
16722 (readchar, getpkt): Update for Winsock support.
16723 (prepare_resume_reply): Expect a protocol signal number.
16724 * server.c: Disable <sys/wait.h> on mingw32.
16725 (start_inferior): Adjust for mingw32 support. Flush
16726 standard error after writing to it.
16727 (attach_inferior): Likewise. Use protocol signal
16728 numbers.
16729 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16730 and names.
16731 * win32-i386-low.c: New file.
16732 * Makefile.in (XM_CLIBS): Set.
16733 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16734 (win32-i386-low.o): New dependency rule.
16735 * linux-low.c (linux_wait): Use target signal numbers.
16736 * target.h (struct target_ops): Doc fix.
16737 * server.h (target_signal_to_name): New prototype.
16738 * gdbreplay.c: Don't include headers unconditionally which
16739 are missing on mingw32. Include <winsock.h> for mingw32.
16740 (remote_close, remote_open): Adjust for Winsock support.
16741 * configure, config.in: Regenerated.
16742
16743 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16744
16745 * server.c (decode_xfer_read, write_qxfer_response): New.
16746 (handle_query): Take a packet length argument. Handle
16747 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16748 the qSupported response.
16749 (main): Update call to handle_query.
16750
16751 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16752
16753 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16754 (putpkt_binary): Renamed from putpkt and adjusted for binary
16755 data.
16756 (putpkt): New wrapper for putpkt_binary.
16757 (readchar): Don't mask off the high bit.
16758 (decode_X_packet): New function.
16759 * server.c (main): Call putpkt_binary if a handler sets the packet
16760 length. Save the length of the incoming packet. Handle 'X'.
16761 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16762
16763 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16764
16765 * server.c (handle_query): Handle qSupported.
16766
16767 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16768
16769 * remote-utils.c (all_symbols_looked_up): New variable.
16770 (look_up_one_symbol): Check it.
16771 * server.h (look_up_one_symbol): New declaration.
16772 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16773
16774 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16775
16776 * Makefile.in (linux-arm-low.o): Update dependencies.
16777 * linux-arm-low.c: Include "gdb_proc_service.h".
16778 (PTRACE_GET_THREAD_AREA): Define.
16779 (ps_get_thread_area): New function.
16780
16781 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16782
16783 * configure.srv (m68k*-*-uclinux*): New target.
16784 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16785 (linux_resume_one_process): Remove extraneous cast.
16786 (linux_read_offsets): New.
16787 (linux_target_op): Add linux_read_offsets on mmuless systems.
16788 * server.c (handle_query): Add qOffsets logic.
16789 * target.h (struct target_ops): Add read_offsets.
16790
16791 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16792
16793 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16794 (PTRACE_GET_THREAD_AREA): Define.
16795 (ps_get_thread_area): New function.
16796 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16797 (linux-x86-64-low.o): Update.
16798
16799 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16800
16801 * configure.ac: Remove checks for prfpregset_t.
16802 * gdb_proc_service.h: New file.
16803 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16804 new "gdb_proc_service.h".
16805 * proc-service.c: Likewise.
16806 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16807 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16808 * Makefile.in (gdb_proc_service_h): Updated.
16809 * configure, config.in: Regenerated.
16810
16811 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16812
16813 * remote-utils.c (prepare_resume_reply): Move declaration
16814 of gdb_id_from_wait to the top of the block.
16815
16816 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * linux-low.c (regsets_store_inferior_registers): Read the regset
16819 from the target before filling it.
16820
16821 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16822
16823 * server.c (attach_inferior): Return SIGTRAP for a successful
16824 attach.
16825
16826 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16827
16828 * Makefile.in (OBS): Add version.o.
16829 (STAGESTUFF): Delete.
16830 (version.o): Add dependencies.
16831 (version.c): Replace rule.
16832 (clean): Remove version.c.
16833 * server.c (gdbserver_version): New.
16834 (gdbserver_usage): Use printf.
16835 (main): Handle --version and --help.
16836 * server.h (version, host_name): Add declarations.
16837
16838 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16839
16840 * linux-arm-low.c:
16841 * linux-arm-low.c:
16842 * inferiors.c:
16843 * i387-fp.h:
16844 * i387-fp.c:
16845 * gdbreplay.c:
16846 * regcache.c:
16847 * proc-service.c:
16848 * mem-break.h:
16849 * mem-break.c:
16850 * linux-x86-64-low.c:
16851 * linux-sh-low.c:
16852 * linux-s390-low.c:
16853 * linux-ppc64-low.c:
16854 * linux-ppc-low.c:
16855 * linux-mips-low.c:
16856 * linux-m68k-low.c:
16857 * linux-m32r-low.c:
16858 * linux-low.h:
16859 * linux-low.c:
16860 * linux-ia64-low.c:
16861 * linux-i386-low.c:
16862 * linux-crisv32-low.c:
16863 * thread-db.c:
16864 * terminal.h:
16865 * target.h:
16866 * target.c:
16867 * server.h:
16868 * server.c:
16869 * remote-utils.c:
16870 * regcache.h:
16871 * utils.c:
16872 * Makefile.in:
16873 * configure.ac:
16874 * gdbserver.1: Add (C) after Copyright. Update the FSF
16875 address.
16876
16877 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16878
16879 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16880 (arm_breakpoint_at): Recognize both breakpoints.
16881 (the_low_target): Use the correct breakpoint instruction.
16882
16883 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16886 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16887 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16888 (the_low_target): Update.
16889
16890 2005-10-25 Andreas Schwab <schwab@suse.de>
16891
16892 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16893
16894 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16895 (ia64_num_regs): Reduce to 462.
16896
16897 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16898
16899 * acinclude.m4: Correct quoting.
16900 * aclocal.m4: Regenerated.
16901
16902 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16903 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16904 (thread_db_init): Call thread_db_err_str.
16905 * configure.ac: Check for TD_VERSION.
16906 * config.in, configure: Regenerated.
16907
16908 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16909
16910 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16911
16912 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16913
16914 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16915 is not available. Define HAVE_PTRACE_GETREGS if it is.
16916 * config.in, configure: Regenerated.
16917 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16918 * linux-i386-low.c, linux-m68k-low.c: Update to use
16919 HAVE_PTRACE_GETREGS.
16920 * linux-low.c (regsets_fetch_inferior_registers)
16921 (regsets_store_inferior_registers): Only return 0 if we processed
16922 GENERAL_REGS.
16923 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16924 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16925
16926 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16927
16928 * inferiors.c (struct thread_info): Add gdb_id.
16929 (add_thread): Add gdb_id argument.
16930 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16931 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16932 calls to add_thread.
16933 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16934 * server.c (handle_query): Use thread_to_gdb_id.
16935 (handle_v_cont, main): Use gdb_id_to_thread_id.
16936 * server.h (add_thread): Update prototype.
16937 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16938 prototypes.
16939
16940 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16941
16942 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16943 left-padded registers.
16944 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16945 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16946
16947 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16948
16949 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16950 * configure: Regenerate.
16951 * config.in: Regenerate.
16952 * server.h (NEED_DECLARATION_STRERROR):
16953 Replace with !HAVE_DECL_STRERROR.
16954
16955 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16956
16957 * linux-low.c (linux_wait, linux_send_signal): Don't test
16958 an unsigned long variable for > 0 if it could be MAX_ULONG.
16959 * server.c (myresume): Likewise.
16960 * target.c (set_desired_inferior): Likewise.
16961
16962 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16963
16964 * configure.ac: Simplify and improve check for socklen_t.
16965 * configure, config.in: Regenerate.
16966
16967 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16968
16969 * acconfig.h: Remove.
16970 * configure.ac: Add a test for socklen_t. Use three-argument
16971 AC_DEFINE throughout.
16972 * config.in: Regenerated using autoheader 2.59.
16973 * configure: Regenerated.
16974
16975 * gdbreplay.c (socklen_t): Provide a default.
16976 (remote_open): Use socklen_t.
16977 * remote-utils.c (socklen_t): Provide a default.
16978 (remote_open): Use socklen_t.
16979 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16980 unsigned char.
16981
16982 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16983 char for buffers.
16984 * linux-low.c (linux_read_memory, linux_write_memory)
16985 (linux_read_auxv): Likewise.
16986 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16987 (check_mem_write): Likewise.
16988 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16989 Likewise.
16990 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16991 (registers_from_string, register_data): Likewise.
16992 * server.c (handle_query, main): Likewise.
16993 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16994 (decode_M_packet): Likewise.
16995 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16996 * target.h (struct target_ops): Update read_memory, write_memory,
16997 and read_auxv.
16998 (read_inferior_memory, write_inferior_memory): Update.
16999 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17000 to unsigned char *.
17001 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17002 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17003 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17004 linux-s390-low.c, linux-sh-low.c: Update for changes in
17005 read_inferior_memory and the_low_target->breakpoint.
17006
17007 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17008
17009 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17010 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17011 * configure.srv: Add powerpc64-*-linux*.
17012 * linux-ppc64-low.c: New file.
17013
17014 2005-05-23 Orjan Friberg <orjanf@axis.com>
17015
17016 * linux-cris-low.c: New file with support for CRIS.
17017 * linux-crisv32-low.c: Ditto for CRISv32.
17018 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17019 (clean): Add reg-cris.c and reg-crisv32.c.
17020 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17021 reg-crisv32.o, and reg-crisv32.c to make rules.
17022 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17023 recognized targets.
17024
17025 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17026
17027 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17028 of sizeof (PTRACE_XFER_TYPE).
17029 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17030
17031 2005-05-12 Orjan Friberg <orjanf@axis.com>
17032
17033 * target.h (struct target_ops): Add insert_watchpoint,
17034 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17035 pointers for hardware watchpoint support.
17036 * linux-low.h (struct linux_target_ops): Ditto.
17037 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17038 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17039 to linux_target_ops.
17040 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17041 reply packet.
17042 * server.c (main): Recognize 'Z' and 'z' packets.
17043
17044 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17045
17046 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17047 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17048 (the_low_target): Add new members.
17049
17050 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17051
17052 * proc-service.c (ps_lgetregs): Search all_processes instead of
17053 all_threads.
17054
17055 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17056
17057 * server.c (start_inferior): Change return type to int.
17058 (attach_inferior): Change sigptr to int *.
17059 (handle_v_cont, handle_v_requests): Change signal to int *.
17060 (main): Change signal to int.
17061
17062 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17063
17064 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17065 * configure.srv: Add m32r*-*-linux*.
17066 * linux-m32r-low.c: New file.
17067
17068 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17069
17070 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17071
17072 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17073
17074 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17075 Take unsigned long arguments for PIDs.
17076 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17077 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17078 (wait_for_sigstop, linux_resume_one_process)
17079 (regsets_fetch_inferior_registers, linux_send_signal)
17080 (linux_read_auxv): Likewise. Update the types of variables holding
17081 PIDs. Update format string specifiers.
17082 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17083 * remote-utils.c (prepare_resume_reply): Likewise.
17084 * server.c (cont_thread, general_thread, step_thread)
17085 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17086 unsigned long.
17087 (handle_query): Update format specifiers.
17088 (handle_v_cont, main): Use strtoul for thread IDs.
17089 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17090 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17091 (general_thread, step_thread, thread_from_wait)
17092 (old_thread_from_wait): Update.
17093 * target.h (struct thread_resume): Use unsigned long for THREAD.
17094 (struct target_ops): Use unsigned long for arguments to attach and
17095 thread_alive.
17096
17097 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17098
17099 * acinclude.m4: Include bfd/bfd.m4 directly.
17100 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17101 <agriffis@toolchain.org>.
17102 * aclocal.m4, configure: Regenerated.
17103
17104 2005-01-07 Andrew Cagney <cagney@gnu.org>
17105
17106 * configure.ac: Rename configure.in, require autoconf 2.59.
17107 * configure: Re-generate.
17108
17109 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17110
17111 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17112 LIBS when finished.
17113 * aclocal.m4: Regenerated.
17114 * configure: Regenerated.
17115
17116 2004-11-21 Andreas Schwab <schwab@suse.de>
17117
17118 * linux-m68k-low.c (m68k_num_gregs): Define.
17119 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17120 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17121 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17122 (m68k_breakpoint_at): New. Add to the_low_target.
17123
17124 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17125 srv_linux_thread_db to yes.
17126
17127 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17128
17129 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17130 (ARCH_SET_FS): Likewise.
17131 (ARCH_GET_FS): Likewise.
17132 (ARCH_GET_GS): Likewise.
17133
17134 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17135
17136 * linux-i386-low.c (ps_get_thread_area): New.
17137 * linux-x86-64-low.c (ps_get_thread_area): New.
17138 * linux-low.c: Include <sys/syscall.h>.
17139 (linux_kill_one_process): Don't kill the first thread here.
17140 (linux_kill): Kill the first thread here.
17141 (kill_lwp): New function.
17142 (send_sigstop, linux_send_signal): Use it.
17143 * proc-service.c: Clean up #ifdefs.
17144 (fpregset_info): Delete.
17145 (ps_lgetregs): Update and enable implementation.
17146 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17147 implementations.
17148 * remote-utils.c (struct sym_cache, symbol_cache): New.
17149 (input_interrupt): Print a clearer message.
17150 (async_io_enabled): New variable.
17151 (enable_async_io, disable_async_io): Use it. Update comments.
17152 (look_up_one_symbol): Use the symbol cache.
17153 * thread-db.c (thread_db_look_up_symbols): New function.
17154 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17155
17156 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17157
17158 * configure.in: Test for -rdynamic.
17159 * configure: Regenerated.
17160 * Makefile (INTERNAL_LDFLAGS): New.
17161 (gdbserver, gdbreplay): Use it.
17162
17163 2004-09-02 Andrew Cagney <cagney@gnu.org>
17164
17165 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17166
17167 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17168
17169 * linux-low.c (linux_wait): Clear all_processes list also.
17170
17171 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17172
17173 * linux-low.c: Include <errno.h>. Remove extern declaration of
17174 errno.
17175
17176 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17177
17178 * gdbreplay.c, server.h, utils.c: Update copyright years.
17179
17180 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17181
17182 * server.c (main): Print child status or termination signal from
17183 variable 'signal', not 'sig'.
17184
17185 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17186
17187 * linux-low.c (linux_read_memory): Change return type to
17188 int. Check for and return error from ptrace().
17189 * target.c (read_inferior_memory): Change return type to int. Pass
17190 back return status from the_target->read_memory().
17191 * target.h (struct target_ops): Adapt *read_memory() prototype.
17192 Update comment.
17193 (read_inferior_memory): Adapt prototype.
17194 * server.c (main): Return an error packet if
17195 read_inferior_memory() returns an error.
17196
17197 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17198
17199 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17200 Unify with other clean targets.
17201
17202 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17203
17204 * server.c (handle_v_cont): Call set_desired_inferior.
17205
17206 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17207
17208 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17209
17210 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17211
17212 * linux-low.c (linux_wait): Unblock async I/O.
17213 (linux_resume): Block and enable async I/O.
17214 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17215 * server.h (block_async_io, unblock_async_io): Add prototypes.
17216
17217 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17218
17219 * remote-utils.c (remote_open): Print a status notice after
17220 opening a TCP port.
17221 * server.c (attach_inferior): Print a status notice after
17222 attaching.
17223
17224 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17225
17226 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17227
17228 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17229
17230 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17231 error packet.
17232 * server.c, target.h: Update copyright years.
17233
17234 2004-02-25 Roland McGrath <roland@redhat.com>
17235
17236 * target.h (struct target_ops): New member `read_auxv'.
17237 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17238 * linux-low.c (linux_read_auxv): New function.
17239 (linux_target_ops): Initialize `read_auxv' member to that.
17240
17241 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17242
17243 Committed by Jim Blandy <jimb@redhat.com>.
17244
17245 * linux-s390-low.c (s390_num_regs): Update.
17246 (s390_regmap): Remove control registers. Use __s390x__ predefine
17247 instead of GPR_SIZE to distiguish s390 and s390x targets.
17248
17249 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17250
17251 * linux-low.c: Update copyright year.
17252 (check_removed_breakpoint): Clear pending_is_breakpoint.
17253 (linux_set_resume_request, linux_queue_one_thread)
17254 (resume_status_pending_p): New functions.
17255 (linux_continue_one_thread): Use process->resume.
17256 (linux_resume): Only resume threads if there are no pending events.
17257 * linux-low.h (struct process_info): Add resume request
17258 pointer.
17259
17260 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17261
17262 * regcache.c (new_register_cache): Clear the allocated register
17263 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17264
17265 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17266
17267 * linux-low.c (linux_resume): Take a struct thread_resume *
17268 argument.
17269 (linux_wait): Update call.
17270 (resume_ptr): New static variable.
17271 (linux_continue_one_thread): Renamed from
17272 linux_continue_one_process. Use resume_ptr.
17273 (linux_resume): Use linux_continue_one_thread.
17274 * server.c (handle_v_cont, handle_v_requests): New functions.
17275 (myresume): New function.
17276 (main): Handle 'v' case.
17277 * target.h (struct thread_resume): New type.
17278 (struct target_ops): Change argument of "resume" to struct
17279 thread_resume *.
17280 (myresume): Delete macro.
17281
17282 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17283
17284 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17285 (uninstall): Support DESTDIR.
17286
17287 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17288
17289 * configure.srv: Add xscale*linux copy of arm*linux entry.
17290
17291 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17292
17293 * linux-arm-low.c (arm_reinsert_addr): New function.
17294 (the_low_target): Add arm_reinsert_addr.
17295
17296 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17297
17298 * mem-break.c: Remove whitespace at end of file.
17299
17300 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17301
17302 * configure.in: Check whether we need to prototype strerror.
17303 * server.h: Optionally prototype strerror.
17304 * gdbreplay.c (perror_with_name): Use strerror.
17305 * linux-low.c (linux_attach_lwp): Use strerror.
17306 * utils.c (perror_with_name): Use strerror.
17307 * config.in, configure: Regenerated.
17308
17309 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17310
17311 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17312 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17313
17314 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17315
17316 * Makefile.in (SFILES): Update.
17317 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17318 low-sun3.c: Remove files.
17319
17320 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17321
17322 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17323 (linux_detach_one_process, linux_detach): New functions.
17324 (linux_target_ops): Add linux_detach.
17325 * server.c (main): Handle 'D' packet.
17326 * target.h (struct target_ops): Add "detach" member.
17327 (detach_inferior): Define.
17328
17329 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17330
17331 From Kelley Cook <kelleycook@wideopenwest.com>:
17332 * configure.srv: Accept i[34567]86 variants.
17333
17334 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17335
17336 * linux-low.c (linux_wait_for_event): Correct comment typos.
17337 (linux_resume_one_process): Call check_removed_breakpoint.
17338 (linux_send_signal): New function.
17339 (linux_target_ops): Add linux_send_signal.
17340 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17341 of kill.
17342 * target.h (struct target_ops): Add send_signal.
17343
17344 2003-05-29 Jim Blandy <jimb@redhat.com>
17345
17346 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17347 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17348 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17349 away part of the register's value.
17350
17351 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17352
17353 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17354 (linux_wait_for_event, linux_init_signals): Likewise.
17355
17356 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17357
17358 * configure.in: Check for stdlib.h.
17359 * configure: Regenerated.
17360 * config.in: Regenerated.
17361
17362 2003-01-04 Andreas Schwab <schwab@suse.de>
17363
17364 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17365
17366 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17367
17368 * Makefile.in: Remove obsolete code.
17369
17370 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17371
17372 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17373 defined(PT_FPR0_HI).
17374
17375 2002-11-17 Stuart Hughes <seh@zee2.com>
17376
17377 * linux-arm-low.c (arm_num_regs): Increase.
17378 (arm_regmap): Include status register.
17379
17380 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17381
17382 * linux-low.c (register_addr): Remove incorrect -1 check.
17383
17384 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17385
17386 * linux-low.c (linux_create_inferior): Call setpgid. Return
17387 the new PID.
17388 (unstopped_p, linux_signal_pid): Remove.
17389 (linux_target_ops): Remove linux_signal_pid.
17390 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17391 global instead of target method.
17392 * target.h (struct target_ops): Remove signal_pid. Update comment
17393 for create_inferior.
17394 * server.c (signal_pid): New variable.
17395 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17396 gdbserver. Set the child to be the foreground process group.
17397 (attach_inferior): Set signal_pid.
17398
17399 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17400
17401 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17402
17403 2002-08-20 Jim Blandy <jimb@redhat.com>
17404
17405 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17406 default for this.
17407
17408 2002-08-01 Andrew Cagney <cagney@redhat.com>
17409
17410 * Makefile.in: Make chill references obsolete.
17411
17412 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17413
17414 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17415 * configure: Regenerate.
17416 * config.in: Regenerate.
17417
17418 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17419
17420 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17421 (perror_with_name, remote_close, remote_open, expect, play): Static.
17422
17423 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17424
17425 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17426 byte offsets instead of an array of indexes.
17427 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17428
17429 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17430
17431 * regcache.c: Add comment.
17432
17433 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17434
17435 * thread-db.c: New file.
17436 * proc-service.c: New file.
17437 * acinclude.m4: New file.
17438 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17439 proc-service.o, and thread-db.o.
17440 (linux-low.o): Add USE_THREAD_DB.
17441 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17442 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17443 * aclocal.m4: Regenerated.
17444 * config.in: Regenerated.
17445 * configure: Regenerated.
17446 * configure.in: Check for proc_service.h, sys/procfs.h,
17447 thread_db.h, and linux/elf.h headrs.
17448 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17449 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17450 Check for -lthread_db and thread support.
17451 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17452 PowerPC, and SuperH.
17453 * i387-fp.c: Constify arguments.
17454 * i387-fp.h: Likewise.
17455 * inferiors.c: (struct thread_info): Renamed from
17456 `struct inferior_info'. Remove PID member. Use generic inferior
17457 list header. All uses updated.
17458 (inferiors, signal_pid): Removed.
17459 (all_threads): New variable.
17460 (get_thread): Define.
17461 (add_inferior_to_list): New function.
17462 (for_each_inferior): New function.
17463 (change_inferior_id): New function.
17464 (add_inferior): Removed.
17465 (remove_inferior): New function.
17466 (add_thread): New function.
17467 (free_one_thread): New function.
17468 (remove_thread): New function.
17469 (clear_inferiors): Use for_each_inferior and free_one_thread.
17470 (find_inferior): New function.
17471 (find_inferior_id): New function.
17472 (inferior_target_data): Update argument type.
17473 (set_inferior_target_data): Likewise.
17474 (inferior_regcache_data): Likewise.
17475 (set_inferior_regcache_data): Likewise.
17476 * linux-low.c (linux_bp_reinsert): Remove.
17477 (all_processes, stopping_threads, using_thrads)
17478 (struct pending_signals, debug_threads, pid_of): New.
17479 (inferior_pid): Replace with macro.
17480 (struct inferior_linux_data): Remove.
17481 (get_stop_pc, add_process): New functions.
17482 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17483 Use add_process and add_thread.
17484 (linux_attach_lwp): New function, based on old linux_attach. Use
17485 add_process and add_thread. Set stop_expected for new threads.
17486 (linux_attach): New function.
17487 (linux_kill_one_process): New function.
17488 (linux_kill): Kill all LWPs.
17489 (linux_thread_alive): Use find_inferior_id.
17490 (check_removed_breakpoints, status_pending_p): New functions.
17491 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17492 Update. Use WNOHANG. Wait for cloned processes also. Update process
17493 struct for the found process.
17494 (linux_wait_for_event): New function.
17495 (linux_wait): Use it. Support LWPs.
17496 (send_sigstop, wait_for_sigstop, stop_all_processes)
17497 (linux_resume_one_process, linux_continue_one_process): New functions.
17498 (linux_resume): Support LWPs.
17499 (REGISTER_RAW_SIZE): Remove.
17500 (fetch_register): Use register_size instead. Call supply_register.
17501 (usr_store_inferior_registers): Likewise. Call collect_register.
17502 Fix recursive case.
17503 (regsets_fetch_inferior_registers): Improve error message.
17504 (regsets_store_inferior_registers): Add debugging.
17505 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17506 (unstopped_p, linux_signal_pid): New functions.
17507 (linux_target_ops): Add linux_signal_pid.
17508 (linux_init_signals): New function.
17509 (initialize_low): Call it. Initialize using_threads.
17510 * regcache.c (inferior_regcache_data): Add valid
17511 flag.
17512 (get_regcache): Fetch registers lazily. Add fetch argument
17513 and update all callers.
17514 (regcache_invalidate_one, regcache_invalidate): New
17515 functions.
17516 (new_register_cache): Renamed from create_register_cache.
17517 Return the new regcache.
17518 (free_register_cache): Change argument to a void *.
17519 (registers_to_string, registers_from_string): Call get_regcache
17520 with fetch flag set.
17521 (register_data): Make static. Pass fetch flag to get_regcache.
17522 (supply_register): Call get_regcache with fetch flag clear.
17523 (collect_register): Call get_regcache with fetch flag set.
17524 (collect_register_as_string): New function.
17525 * regcache.h: Update.
17526 * remote-utils.c (putpkt): Flush after debug output and use
17527 stderr.
17528 Handle input interrupts while waiting for an ACK.
17529 (input_interrupt): Use signal_pid method.
17530 (getpkt): Flush after debug output and use stderr.
17531 (outreg): Use collect_register_as_string.
17532 (new_thread_notify, dead_thread_notify): New functions.
17533 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17534 and general_thread.
17535 (look_up_one_symbol): Flush after debug output.
17536 * server.c (step_thread, server_waiting): New variables.
17537 (start_inferior): Don't use signal_pid. Update call to mywait.
17538 (attach_inferior): Update call to mywait.
17539 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17540 (main): Don't fetch/store registers explicitly. Use
17541 set_desired_inferior. Support proposed ``Hs'' packet. Update
17542 calls to mywait.
17543 * server.h: Update.
17544 (struct inferior_list, struct_inferior_list_entry): New.
17545 * target.c (set_desired_inferior): New.
17546 (write_inferior_memory): Constify.
17547 (mywait): New function.
17548 * target.h: Update.
17549 (struct target_ops): New signal_pid method.
17550 (mywait): Removed macro, added prototype.
17551
17552 * linux-low.h (regset_func): Removed.
17553 (regset_fill_func, regset_store_func): New.
17554 (enum regset_type): New.
17555 (struct regset_info): Add type field. Use new operation types.
17556 (struct linux_target_ops): stop_pc renamed to get_pc.
17557 Add decr_pc_after_break and breakpoint_at.
17558 (get_process, get_thread_proess, get_process_thread)
17559 (strut process_info, all_processes, linux_attach_lwp)
17560 (thread_db_init): New.
17561
17562 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17563 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17564 (the_low_target): Add new members.
17565 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17566 (i386_store_fpxregset): Constify.
17567 (target_regsets): Add new kind identifier.
17568 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17569 (i386_set_pc): Add debugging.
17570 (i386_breakpoint_at): New function.
17571 (the_low_target): Add new members.
17572 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17573 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17574 (mips_breakpoint_at): New.
17575 (the_low_target): Add new members.
17576 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17577 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17578 (the_low_target): Add new members.
17579 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17580 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17581 (the_low_target): Add new members.
17582 * linux-x86-64-low.c (target_regsets): Add new kind
17583 identifier.
17584
17585 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17586
17587 From Martin Pool <mbp@samba.org>:
17588 * server.c (gdbserver_usage): New function.
17589 (main): Call it.
17590
17591 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17592
17593 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17594 stop_at -> stop_pc.
17595
17596 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17597
17598 * Makefile.in: Remove obsolete code.
17599
17600 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17601
17602 * linux-low.c (regsets_fetch_inferior_registers),
17603 (regsets_store_inferior_registers): Removed cast to int from
17604 ptrace() calls.
17605 * regcache.h: Added declaration of struct inferior_info.
17606
17607 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17608
17609 * inferiors.c (struct inferior_info): Add regcache_data.
17610 (add_inferior): Call create_register_cache.
17611 (clear_inferiors): Call free_register_cache.
17612 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17613 * regcache.c (struct inferior_regcache_data): New.
17614 (registers): Remove.
17615 (get_regcache): New function.
17616 (create_register_cache, free_register_cache): New functions.
17617 (set_register_cache): Don't initialize the register cache here.
17618 (registers_to_string, registers_from_string, register_data): Call
17619 get_regcache.
17620 * regcache.h: Add prototypes.
17621 * server.h: Likewise.
17622
17623 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17624
17625 * mem-break.c: New file.
17626 * mem-break.h: New file.
17627 * Makefile.in: Add mem-break.o rule; update server.h
17628 dependencies.
17629 * inferiors.c (struct inferior_info): Add target_data
17630 member.
17631 (clear_inferiors): Free target_data member if set.
17632 (inferior_target_data, set_inferior_target_data): New functions.
17633 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17634 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17635 * linux-low.c (linux_bp_reinsert): New variable.
17636 (struct inferior_linux_data): New.
17637 (linux_create_inferior): Use set_inferior_target_data.
17638 (linux_attach): Likewise. Call add_inferior.
17639 (linux_wait_for_one_inferior): New function.
17640 (linux_wait): Call it.
17641 (linux_write_memory): Add const.
17642 (initialize_low): Call set_breakpoint_data.
17643 * linux-low.h (struct linux_target_ops): Add breakpoint
17644 handling members.
17645 * server.c (attach_inferior): Remove extra add_inferior
17646 call.
17647 * server.h: Include mem-break.h. Update inferior.c
17648 prototypes.
17649 * target.c (read_inferior_memory)
17650 (write_inferior_memory): New functions.
17651 * target.h (read_inferior_memory)
17652 (write_inferior_memory): Change macros to prototypes.
17653 (struct target_ops): Update comments. Add const to write_memory
17654 definition.
17655
17656 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17657
17658 * linux-low.c (usr_store_inferior_registers): Support
17659 registers which are allowed to fail to store.
17660 * linux-low.h (linux_target_ops): Likewise.
17661 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17662 (ppc_cannot_store_register): FPSCR may not be storable.
17663
17664 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17665
17666 * server.h: Include <string.h> if HAVE_STRING_H.
17667 * ChangeLog: Correct paths in last ChangeLog entry.
17668
17669 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17670
17671 * linux-low.h: Remove obsolete prototypes.
17672 (struct linux_target_ops): New.
17673 (extern the_low_target): New.
17674 * linux-low.c (num_regs, regmap): Remove declarations.
17675 (register_addr): Use the_low_target explicitly.
17676 (fetch_register): Likewise.
17677 (usr_fetch_inferior_registers): Likewise.
17678 (usr_store_inferior_registers): Likewise.
17679 * linux-arm-low.c (num_regs): Remove.
17680 (arm_num_regs): Define.
17681 (arm_regmap): Renamed from regmap, made static.
17682 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17683 made static.
17684 (arm_cannot_store_register): Renamed from cannot_store_register,
17685 made static.
17686 (the_low_target): New.
17687 * linux-i386-low.c (num_regs): Remove.
17688 (i386_num_regs): Define.
17689 (i386_regmap): Renamed from regmap, made static.
17690 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17691 made static.
17692 (i386_cannot_store_register): Renamed from cannot_store_register,
17693 made static.
17694 (the_low_target): New.
17695 * linux-ia64-low.c (num_regs): Remove.
17696 (ia64_num_regs): Define.
17697 (ia64_regmap): Renamed from regmap, made static.
17698 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17699 made static.
17700 (ia64_cannot_store_register): Renamed from cannot_store_register,
17701 made static.
17702 (the_low_target): New.
17703 * linux-m68k-low.c (num_regs): Remove.
17704 (m68k_num_regs): Define.
17705 (m68k_regmap): Renamed from regmap, made static.
17706 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17707 made static.
17708 (m68k_cannot_store_register): Renamed from cannot_store_register,
17709 made static.
17710 (the_low_target): New.
17711 * linux-mips-low.c (num_regs): Remove.
17712 (mips_num_regs): Define.
17713 (mips_regmap): Renamed from regmap, made static.
17714 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17715 made static.
17716 (mips_cannot_store_register): Renamed from cannot_store_register,
17717 made static.
17718 (the_low_target): New.
17719 * linux-ppc-low.c (num_regs): Remove.
17720 (ppc_num_regs): Define.
17721 (ppc_regmap): Renamed from regmap, made static.
17722 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17723 made static.
17724 (ppc_cannot_store_register): Renamed from cannot_store_register,
17725 made static.
17726 (the_low_target): New.
17727 * linux-s390-low.c (num_regs): Remove.
17728 (s390_num_regs): Define.
17729 (s390_regmap): Renamed from regmap, made static.
17730 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17731 made static.
17732 (s390_cannot_store_register): Renamed from cannot_store_register,
17733 made static.
17734 (the_low_target): New.
17735 * linux-sh-low.c (num_regs): Remove.
17736 (sh_num_regs): Define.
17737 (sh_regmap): Renamed from regmap, made static.
17738 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17739 made static.
17740 (sh_cannot_store_register): Renamed from cannot_store_register,
17741 made static.
17742 (the_low_target): New.
17743 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17744 (the_low_target): New.
17745
17746 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17747
17748 * Makefile.in: Add stamp-h target.
17749 * configure.in: Create stamp-h.
17750 * configure: Regenerated.
17751
17752 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17753
17754 * inferiors.c: New file.
17755 * target.c: New file.
17756 * target.h: New file.
17757 * Makefile.in: Add target.o and inferiors.o. Update
17758 dependencies.
17759 * linux-low.c (inferior_pid): New static variable,
17760 moved from server.c.
17761 (linux_create_inferior): Renamed from create_inferior.
17762 Call add_inferior. Return 0 on success instead of a PID.
17763 (linux_attach): Renamed from myattach.
17764 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17765 (linux_thread_alive): Renamed from mythread_alive.
17766 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17767 child dies.
17768 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17769 (regsets_store_inferior_registers): Correct error message.
17770 Add missing ``return 0''.
17771 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17772 (linux_store_registers): Renamed from store_inferior_registers.
17773 (linux_read_memory): Renamed from read_inferior_memory.
17774 (linux_write_memory): Renamed from write_inferior_memory.
17775 (linux_target_ops): New structure.
17776 (initialize_low): Call set_target_ops ().
17777 * remote-utils.c (unhexify): New function.
17778 (hexify): New function.
17779 (input_interrupt): Send signals to ``signal_pid''.
17780 * server.c (inferior_pid): Remove.
17781 (start_inferior): Update create_inferior call.
17782 (attach_inferior): Call add_inferior.
17783 (handle_query): New function.
17784 (main): Call handle_query for `q' packets.
17785 * server.h: Include "target.h". Remove obsolete prototypes.
17786 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17787
17788 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17789
17790 * Makefile.in: Add WARN_CFLAGS. Update configury
17791 dependencies.
17792 * configure.in: Check for <string.h>
17793 * configure: Regenerate.
17794 * config.in: Regenerate.
17795 * gdbreplay.c: Include needed system headers.
17796 (remote_open): Remove strchr prototype.
17797 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17798 * regcache.c (supply_register): Change buf argument to const void *.
17799 (supply_register_by_name): Likewise.
17800 (collect_register): Change buf argument to void *.
17801 (collect_register_by_name): Likewise.
17802 * regcache.h: Add missing prototypes.
17803 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17804 * server.c (handle_query): New function.
17805 (attached): New static variable, moved out of main.
17806 (main): Quiet longjmp clobber warnings.
17807 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17808 * utils.c (error): Remove NORETURN.
17809 (fatal): Likewise.
This page took 0.470942 seconds and 3 git commands to generate.