63778e2d2a3581595ef5f3cf9a3baa57f29f28ba
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2 Pedro Alves <palves@redhat.com>
3
4 * win32-low.c (get_child_debug_event): Extract the fatal exception
5 from the exit status and convert to the equivalent Posix signal
6 number.
7 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
8 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
9
10 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11
12 * Makefile.in: Use INSTALL_PROGRAM_ENV.
13
14 2020-01-01 Joel Brobecker <brobecker@adacore.com>
15
16 * server.c (gdbserver_version): Change copyright year to 2020.
17 * gdbreplay.c (gdbreplay_version): Likewise.
18
19 2019-12-19 Christian Biesinger <cbiesinger@google.com>
20
21 * configure: Regenerate.
22 * configure.ac: Quote variable arguments of test.
23
24 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
25
26 * Makefile.in: Fix build with GNU Make 3.81
27
28 2019-12-16 Tom Tromey <tromey@adacore.com>
29
30 * server.c (get_exec_file): Constify result.
31
32 2019-12-10 Christian Biesinger <cbiesinger@google.com>
33
34 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
35 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
36 * config.in: Regenerate.
37 * configure: Regenerate.
38 * configure.ac: Don't check for strerror.
39 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
40 Call safe_strerror instead of strerror.
41 * server.h (strerror): Remove this now-unnecessary declaration.
42 * tracepoint.c (init_named_socket): Call safe_strerror instead of
43 strerror.
44 (gdb_agent_helper_thread): Likewise.
45 * utils.c (perror_with_name): Likewise.
46
47 2019-11-26 Tom Tromey <tom@tromey.com>
48
49 * configure, config.in: Rebuild.
50
51 2019-11-26 Tom Tromey <tom@tromey.com>
52
53 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
54 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
55 gdb_sigmask.
56 * configure, config.in: Rebuild.
57
58 2019-11-26 Tom Tromey <tom@tromey.com>
59
60 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
61 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
62 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
63 * acinclude.m4: Include ax_pthread.m4.
64 * config.in, configure: Rebuild.
65
66 2019-11-26 Christian Biesinger <cbiesinger@google.com>
67
68 * debug.c (debug_set_output): Call safe_strerror instead of
69 strerror.
70 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
71 (linux_kill_one_lwp): Likewise.
72 (linux_detach_one_lwp): Likewise.
73 (linux_wait_for_event_filtered): Likewise.
74 (store_register): Likewise.
75 * lynx-low.c (lynx_attach): Likewise.
76 * mem-break.c (insert_memory_breakpoint): Likewise.
77 (remove_memory_breakpoint): Likewise.
78 (delete_fast_tracepoint_jump): Likewise.
79 (set_fast_tracepoint_jump): Likewise.
80 (uninsert_fast_tracepoint_jumps_at): Likewise.
81 (reinsert_fast_tracepoint_jumps_at): Likewise.
82 * nto-low.c (nto_xfer_memory): Likewise.
83 (nto_resume): Likewise.
84
85 2019-11-20 Luis Machado <luis.machado@linaro.org>
86
87 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
88 instead of register count.
89 * tdesc.c (tdesc_contains_feature): New function.
90 * tdesc.h (tdesc_contains_feature): New prototype.
91
92 2019-11-15 Christian Biesinger <cbiesinger@google.com>
93
94 * Makefile.in: Add safe-strerror.c.
95 * configure: Regenerate.
96 * configure.ac: Don't source common.host.
97
98 2019-11-15 Christian Biesinger <cbiesinger@google.com>
99
100 * config.in: Regenerate.
101 * configure: Regenerate.
102
103 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
104
105 * ax.c (ax_printf): Handle size_t_arg.
106
107 2019-11-06 Christian Biesinger <cbiesinger@google.com>
108
109 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
110 * mi/mi-main.c (output_cores): Likewise.
111 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
112 (linux_xfer_osdata_modules): Likewise.
113 * remote.c (register_remote_support_xml): Likewise.
114 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
115 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
116
117 2019-11-01 Christian Biesinger <cbiesinger@google.com>
118
119 * configure: Regenerate.
120 * configure.ac: Remove check for strerror_r.
121
122 2019-10-31 Christian Biesinger <cbiesinger@google.com>
123
124 * config.in: Regenerate.
125 * configure: Regenerate.
126 * configure.ac: Also check for strerror_r.
127
128 2019-10-31 Christian Biesinger <cbiesinger@google.com>
129
130 * ax.h (debug_agent): Remove duplicate declaration.
131
132 2019-10-26 Tom de Vries <tdevries@suse.de>
133
134 * linux-aarch64-low.c: Fix typos in comments.
135 * linux-arm-low.c: Same.
136 * linux-low.c: Same.
137 * linux-ppc-low.c: Same.
138 * proc-service.c: Same.
139 * regcache.h: Same.
140 * server.c: Same.
141 * tracepoint.c: Same.
142 * win32-low.c: Same.
143
144 2019-10-25 Tom Tromey <tromey@adacore.com>
145
146 * utils.c (xstrdup): Remove.
147
148 2019-10-23 Tom Tromey <tom@tromey.com>
149
150 * configure, config.in: Rebuild.
151
152 2019-10-23 Tom Tromey <tom@tromey.com>
153
154 * configure: Rebuild.
155 * acinclude.m4: Use m4_include, not sinclude.
156
157 2019-10-17 Tom Tromey <tromey@adacore.com>
158
159 * configure: Rebuild.
160 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
161 in AC_CONFIG_FILES invocation.
162 * Makefile.in (stamp-h, Makefile): Use new-style config.status
163 invocation.
164
165 2019-10-16 Christian Biesinger <cbiesinger@google.com>
166
167 * server.c: Include xml-builtin.h.
168 (get_xml_features): Don't declare xml_builtins here.
169
170 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
171
172 * Makefile.in: Remove references to vec-ipa.o.
173
174 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
175
176 * Makefile.in: Remove references to vec.c.
177
178 2019-10-02 Christian Biesinger <cbiesinger@google.com>
179
180 * server.c (server_waiting): Change to bool.
181 (extended_protocol): Likewise.
182 (response_needed): Likewise.
183 (exit_requested): Likewise.
184 (run_once): Likewise.
185 (report_no_resumed): Likewise.
186 (non_stop): Likewise.
187 (disable_packet_vCont): Likewise.
188 (disable_packet_Tthread): Likewise.
189 (disable_packet_qC): Likewise.
190 (disable_packet_qfThreadInfo): Likewise.
191 (handle_general_set): Update.
192 (handle_detach): Update.
193 (handle_monitor_command): Update.
194 (handle_query): Update.
195 (captured_main): Update.
196 (process_serial_event): Update.
197 * server.h (server_waiting): Change to bool.
198 (disable_packet_vCont): Likewise.
199 (disable_packet_Tthread): Likewise.
200 (disable_packet_qC): Likewise.
201 (disable_packet_qfThreadInfo): Likewise.
202 (run_once): Likewise.
203 (non_stop): Likewise.
204 * target.c (target_stop_and_wait): Update.
205
206 2019-10-02 Tom Tromey <tromey@adacore.com>
207
208 * Makefile.in (SFILES): Add common-inferior.c.
209 (OBS): Add common-inferior.o.
210 * server.c (startup_with_shell): Don't define.
211
212 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
213
214 * linux-low.c (linux_low_read_btrace): Update for change to
215 std::vector.
216
217 2019-09-20 Christian Biesinger <cbiesinger@google.com>
218
219 * debug.c (debug_threads): Remove comment in favor of the header.
220 * debug.h (using_threads): Add declaration.
221 (debug_threads): Add comment.
222 * linux-aarch64-low.c: Include debug.h and remove declaration of
223 debug_threads.
224 * nto-low.c: Likewise.
225 * remote-utils.c: Likewise.
226 * thread-db.c: Likewise.
227
228 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
229
230 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
231 and powerpc-cell64l-ipa.o.
232 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
233 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
234 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
235 (spu*-*-*): Remove.
236
237 * spu-low.c: Remove file.
238
239 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
240 (parse_spufs_run): Remove.
241 (ppc_get_pc): Remove Cell/B.E. support.
242 (ppc_set_pc): Likewise.
243 (ppc_breakpoint_at): Likewise.
244 (ppc_arch_setup): Likewise.
245 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
246 tdesc_powerpc_cell32l.
247 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
248 or init_registers_powerpc_cell32l.
249 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
250 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
251 or init_registers_powerpc_cell32l.
252 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
253 (init_registers_powerpc_cell32l): Remove prototype.
254 (init_registers_powerpc_cell64l): Likewise.
255
256 * target.h (struct target_ops): Remove qxfer_spu member.
257 * server.c (handle_qxfer_spu): Remove.
258 (qxfer_packets): Remove entry for "spu".
259 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
260 * linux-low.c (SPUFS_MAGIC): Remove.
261 (spu_enumerate_spu_ids): Remove.
262 (linux_qxfer_spu): Remove.
263 (linux_target_ops): Remove qxfer_spu member.
264 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
265 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
266 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
267
268 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
269
270 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
271 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
272 * config.in: Regenerate.
273 * configure: Regenerate.
274
275 2019-08-15 Tom Tromey <tromey@adacore.com>
276
277 * target.c (target_write_memory): Use gdb::byte_vector.
278
279 2019-08-15 Tom Tromey <tromey@adacore.com>
280
281 * tracepoint.c (write_inferior_data_pointer)
282 (write_inferior_integer, write_inferior_int8)
283 (write_inferior_uinteger, m_tracepoint_action_download)
284 (r_tracepoint_action_download, x_tracepoint_action_download)
285 (l_tracepoint_action_download, clear_inferior_trace_buffer)
286 (download_agent_expr, download_tracepoint_1)
287 (download_trace_state_variables, upload_fast_traceframes): Update.
288 * server.c (gdb_write_memory): Update.
289 * remote-utils.c (relocate_instruction): Update.
290 * proc-service.c (ps_pdwrite): Update.
291 * mem-break.c (remove_memory_breakpoint)
292 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
293 (uninsert_fast_tracepoint_jumps_at)
294 (reinsert_fast_tracepoint_jumps_at): Update.
295 * linux-x86-low.c (append_insns)
296 (i386_install_fast_tracepoint_jump_pad)
297 (amd64_write_goto_address, i386_write_goto_address): Update.
298 * linux-s390-low.c (append_insns, s390_write_goto_address):
299 Update.
300 * linux-ppc-low.c (ppc_relocate_instruction)
301 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
302 (ppc_write_goto_address): Update.
303 * linux-aarch64-low.c (append_insns): Update.
304 * target.h (struct target_ops): Update.
305 (write_inferior_memory): Don't declare.
306 * target.c (target_write_memory): Rename from
307 write_inferior_memory. Remove old target_write_memory.
308
309 2019-08-15 Tom Tromey <tromey@adacore.com>
310
311 * target.c (write_inferior_memory): Use std::vector.
312
313 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
314
315 PR build/24886
316 * configure.ac: Drop enable-libmcheck support.
317 * configure, config.in: Rebuild.
318 * acinclude.m4: Don't include it.
319
320 2019-07-19 Alan Hayward <alan.hayward@arm.com>
321
322 * configure.srv: Remove Arm xml files.
323
324 2019-07-19 Alan Hayward <alan.hayward@arm.com>
325
326 * configure.srv: Add new files. Remove xml generated files.
327 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
328 registers.
329 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
330 * linux-aarch32-tdesc.c: New file.
331 * linux-aarch32-tdesc.h: New file.
332 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
333 * linux-arm-low.c (init_registers_arm, tdesc_arm)
334 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
335 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
336 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
337 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
338 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
339 (arm_read_description): Call arm_linux_read_description.
340 (initialize_low_arch): Don't init registers.
341 * linux-arm-tdesc.c: New file.
342 * linux-arm-tdesc.h: New file.
343
344 2019-07-10 Alan Hayward <alan.hayward@arm.com>
345
346 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
347 Move counter inside for.
348 (arm_read_description): Check ptrace earlier.
349 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
350
351 2019-07-09 Tom Tromey <tom@tromey.com>
352
353 * configure: Rebuild.
354 * configure.ac: Change common to gdbsupport.
355 * acinclude.m4: Change common to gdbsupport.
356 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
357 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
358 common to gdbsupport.
359 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
360 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
361 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
362 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
363 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
364 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
365 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
366 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
367 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
368 common to gdbsupport.
369
370 2019-07-04 Alan Hayward <alan.hayward@arm.com>
371
372 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
373 defines.
374 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
375
376 2019-07-04 Alan Hayward <alan.hayward@arm.com>
377
378 * configure.srv: Remove legacy xml.
379 * linux-aarch64-low.c (initialize_low_arch): Remove
380 initialize_low_tdesc call.
381 * linux-aarch64-tdesc-selftest.c: Remove file.
382 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
383 * linux-x86-low.c (initialize_low_arch): Remove
384 initialize_low_tdesc call.
385 * linux-x86-tdesc-selftest.c: Remove file.
386 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
387
388 2019-06-20 Tom de Vries <tdevries@suse.de>
389
390 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
391 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
392
393 2019-06-19 Tom de Vries <tdevries@suse.de>
394
395 * debug.h (debug_write): Change return type to ssize_t.
396 * debug.c (debug_write): Same.
397
398 2019-06-14 Tom Tromey <tom@tromey.com>
399
400 * configure.ac: Use new path to gnulib.
401 * configure: Rebuild.
402 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
403 to gnulib.
404
405 2019-06-11 Tom Tromey <tom@tromey.com>
406
407 * Makefile.in (SFILES): Add alloc.c.
408 (OBS): Add alloc.o.
409 (IPA_OBJS): Add alloc-ipa.o.
410 (alloc-ipa.o): New target.
411 (%.o: ../%.c): New pattern rule.
412
413 2019-06-10 Tom Tromey <tromey@adacore.com>
414
415 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
416 end warning with a newline.
417 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
418 newline.
419 * thread-db.c (attach_thread): Don't end warning with a newline.
420 (thread_db_notice_clone): Likewise.
421 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
422 newline.
423 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
424 end warning with a newline.
425
426 2019-06-04 Pedro Alves <palves@redhat.com>
427
428 * server.c (captured_main): Use make_unique_xstrdup.
429
430 2019-06-02 Tom Tromey <tom@tromey.com>
431
432 * gdbreplay.c (fromhex): Remove.
433 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
434
435 2019-05-29 Tom Tromey <tromey@adacore.com>
436
437 * configure: Rebuild.
438
439 2019-05-06 Kevin Buettner <kevinb@redhat.com>
440
441 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
442 sign extension code on 32-bit builds.
443
444 2019-05-03 Eli Zaretskii <eliz@gnu.org>
445
446 * remote-utils.c:
447 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
448
449 2019-04-19 Tom Tromey <tom@tromey.com>
450
451 * server.c (struct vstop_notif): Derive from notif_event.
452 <base>: Remove.
453 (queue_stop_reply): Update.
454 (remove_all_on_match_ptid): Change type. Rewrite.
455 (discard_queued_stop_replies): Rewrite.
456 (in_queued_stop_replies_ptid): Change type.
457 (in_queued_stop_replies): Rewrite.
458 (notif_stop): Update.
459 (queue_stop_reply_callback): Update.
460 (captured_main): Don't call initialize_notif.
461 (push_stop_notification): Update.
462 * notif.c (notif_write_event, handle_notif_ack)
463 (notif_event_enque, notif_push): Update.
464 (notif_event_xfree, initialize_notif): Remove.
465 * notif.h (struct notif_event): Include <list>, not
466 "common/queue.h".
467 (struct notif_server) <queue>: Now a std::list.
468 (notif_event_p): Remove typedef.
469 (initialize_notif): Don't declare.
470 (struct notif_event): Add virtual destructor.
471
472 2019-04-17 Alan Hayward <alan.hayward@arm.com>
473
474 * ax.c (ax_vdebug): Call debug_printf.
475 * debug.c (debug_write): New function.
476 * debug.h (debug_write): New declaration.
477 * linux-low.c (sigchld_handler): Call debug_write.
478
479 2019-04-17 Alan Hayward <alan.hayward@arm.com>
480
481 * debug.c (debug_set_output): New function.
482 (debug_vprintf): Send output to debug_file.
483 (debug_flush): Likewise.
484 * debug.h (debug_set_output): New declaration.
485 * server.c (handle_monitor_command): Add debug-file option.
486 (captured_main): Likewise.
487
488 2019-04-17 Alan Hayward <alan.hayward@arm.com>
489
490 * debug.c (remote_debug): Add definition.
491 * debug.h (remote_debug): Add declaration.
492 * hostio.c (remote_debug): Remove declaration.
493 * remote-utils.c (struct ui_file): Likewise.
494 (remote_debug): Likewise.
495 * remote-utils.h (remote_debug): Likewise,
496 * server.c (remote_debug): Remove definition.
497
498 2019-04-10 Kevin Buettner <kevinb@redhat.com>
499
500 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
501 when using a 64-bit gdbserver.
502
503 2019-04-09 Tom Tromey <tromey@adacore.com>
504
505 * linux-low.c (select_event_lwp): Use find_thread_in_random.
506
507 2019-04-08 Tom Tromey <tom@tromey.com>
508
509 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
510 throw.
511 (linux_resume_one_lwp): Likewise.
512
513 2019-04-08 Tom Tromey <tom@tromey.com>
514
515 * gdbreplay.c: Update.
516 * linux-low.c: Update.
517 * server.c: Update.
518
519 2019-04-08 Tom Tromey <tom@tromey.com>
520
521 * server.c: Use C++ exception handling.
522 * linux-low.c: Use C++ exception handling.
523 * gdbreplay.c: Use C++ exception handling.
524
525 2019-04-08 Tom Tromey <tom@tromey.com>
526
527 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
528 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
529 (captured_main, main): Update.
530 * gdbreplay.c (main): Update.
531
532 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
533
534 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
535 value in argument pointer, return 1 if the entry is found and 0
536 otherwise. Move comment.
537 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
538 * linux-low.h (linux_get_auxv): Declare.
539 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
540
541 2019-04-05 Tom Tromey <tromey@adacore.com>
542
543 * server.c (gdbserver_usage): Use upper-case for metasyntactic
544 variables.
545
546 2019-03-28 Alan Hayward <alan.hayward@arm.com>
547
548 * linux-low.c (AT_HWCAP2): Add define if not already included.
549
550 2019-03-26 Alan Hayward <alan.hayward@arm.com>
551
552 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
553 (aarch64_arch_setup): Call linux_get_hwcap.
554 * linux-arm-low.c (arm_get_hwcap): Remove function.
555 (arm_read_description): Call linux_get_hwcap.
556 * linux-low.c (linux_get_auxv): New function.
557 (linux_get_hwcap): Likewise.
558 (linux_get_hwcap2): Likewise.
559 * linux-low.h (linux_get_hwcap): New declaration.
560 (linux_get_hwcap2): Likewise.
561 * linux-ppc-low.c (ppc_get_auxv): Remove function.
562 (ppc_arch_setup): Call linux_get_hwcap.
563 * linux-s390-low.c (s390_get_hwcap): Remove function.
564 (s390_arch_setup): Call linux_get_hwcap.
565
566 2019-03-22 Alan Hayward <alan.hayward@arm.com>
567 Jiong Wang <jiong.wang@arm.com>
568
569 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
570 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
571 to fail.
572 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
573
574 2019-03-22 Alan Hayward <alan.hayward@arm.com>
575 Jiong Wang <jiong.wang@arm.com>
576
577 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
578 (aarch64_get_hwcap): New function.
579 (aarch64_arch_setup): Read APIA hwcap.
580
581 2019-03-22 Alan Hayward <alan.hayward@arm.com>
582 Jiong Wang <jiong.wang@arm.com>
583
584 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
585 (initialize_low_tracepoint): Likewise.
586 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
587 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
588 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
589 (aarch64_linux_read_description): Likewise.
590 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
591
592 2019-03-12 John Baldwin <jhb@FreeBSD.org>
593
594 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
595 i386_create_target_description for 'segments' parameter.
596 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
597 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
598 * win32-i386-low.c (i386_arch_setup): Likewise.
599
600 2019-03-12 Tom Tromey <tromey@adacore.com>
601
602 * linux-low.c (iterate_over_lwps): Update.
603
604 2019-03-06 Tom Tromey <tom@tromey.com>
605
606 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
607 (captured_main): Use SCOPE_EXIT.
608
609 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
610
611 * configure.srv: Use '$enable_unittest' instead of '$development'
612 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
613 case.
614
615 2019-02-27 Tom Tromey <tromey@adacore.com>
616
617 * gdbreplay.c (logchar): Handle \r\n.
618
619 2019-02-07 Alan Hayward <alan.hayward@arm.com>
620
621 * linux-low.c (linux_attach): Add process before lwp.
622 * server.c (attach_inferior): Check if already attached.
623
624 2019-02-07 Tom Tromey <tom@tromey.com>
625
626 * x86-tdesc.h: Rename include guard.
627 * x86-low.h: Add include guard.
628 * wincecompat.h: Rename include guard.
629 * win32-low.h: Add include guard.
630 * utils.h: Rename include guard.
631 * tracepoint.h: Rename include guard.
632 * tdesc.h: Rename include guard.
633 * target.h: Rename include guard.
634 * server.h: Rename include guard.
635 * remote-utils.h: Rename include guard.
636 * regcache.h: Rename include guard.
637 * nto-low.h: Rename include guard.
638 * notif.h: Add include guard.
639 * mem-break.h: Rename include guard.
640 * lynx-low.h: Add include guard.
641 * linux-x86-tdesc.h: Add include guard.
642 * linux-s390-tdesc.h: Add include guard.
643 * linux-ppc-tdesc-init.h: Add include guard.
644 * linux-low.h: Add include guard.
645 * linux-aarch64-tdesc.h: Add include guard.
646 * linux-aarch32-low.h: Add include guard.
647 * inferiors.h: Rename include guard.
648 * i387-fp.h: Rename include guard.
649 * hostio.h: Rename include guard.
650 * gdbthread.h: Rename include guard.
651 * gdb_proc_service.h: Rename include guard.
652 * event-loop.h: Rename include guard.
653 * dll.h: Rename include guard.
654 * debug.h: Rename include guard.
655 * ax.h: Rename include guard.
656
657 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
658
659 PR gdb/23985
660 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
661 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
662
663 2019-01-25 Tom Tromey <tom@tromey.com>
664
665 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
666
667 2019-01-25 Tom Tromey <tom@tromey.com>
668
669 * win32-low.c: Fix common/ includes.
670 * win32-i386-low.c: Fix common/ includes.
671 * tracepoint.c: Fix common/ includes.
672 * thread-db.c: Fix common/ includes.
673 * target.h: Fix common/ includes.
674 * symbol.c: Fix common/ includes.
675 * spu-low.c: Fix common/ includes.
676 * server.h: Fix common/ includes.
677 * server.c: Fix common/ includes.
678 * remote-utils.c: Fix common/ includes.
679 * regcache.h: Fix common/ includes.
680 * regcache.c: Fix common/ includes.
681 * nto-x86-low.c: Fix common/ includes.
682 * notif.h: Fix common/ includes.
683 * mem-break.h: Fix common/ includes.
684 * lynx-low.c: Fix common/ includes.
685 * lynx-i386-low.c: Fix common/ includes.
686 * linux-x86-tdesc-selftest.c: Fix common/ includes.
687 * linux-x86-low.c: Fix common/ includes.
688 * linux-low.c: Fix common/ includes.
689 * inferiors.h: Fix common/ includes.
690 * i387-fp.c: Fix common/ includes.
691 * hostio.c: Fix common/ includes.
692 * hostio-errno.c: Fix common/ includes.
693 * gdbthread.h: Fix common/ includes.
694 * gdbreplay.c: Fix common/ includes.
695 * fork-child.c: Fix common/ includes.
696 * event-loop.c: Fix common/ includes.
697 * ax.c:
698 (enum gdb_agent_op): Fix common/ includes.
699
700 2019-01-21 Tom Tromey <tom@tromey.com>
701
702 * tracepoint.c: Fix includes.
703 * remote-utils.c: Fix includes.
704 * linux-x86-low.c: Fix includes.
705
706 2019-01-01 Joel Brobecker <brobecker@adacore.com>
707
708 * gdbreplay.c (gdbreplay_version): Update copyright year in
709 version message.
710 * server.c (gdbserver_version): Likewise.
711
712 2018-12-05 Alan Hayward <alan.hayward@arm.com>
713
714 * linux-low.c (add_lwp): Switch ordering.
715
716 2018-11-29 Tom Tromey <tom@tromey.com>
717
718 * win32-low.c (win32_join): Take pid, not process.
719 * target.h (struct target_ops) <join>: Change argument type.
720 (join_inferior): Change argument name.
721 * spu-low.c (spu_join): Take pid, not process.
722 * server.c (handle_detach): Preserve pid before destroying
723 process.
724 * lynx-low.c (lynx_join): Take pid, not process.
725 * linux-low.c (linux_join): Take pid, not process.
726
727 2018-11-23 Alan Hayward <alan.hayward@arm.com>
728
729 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
730 (aarch64_cannot_fetch_register): Likewise.
731 (struct linux_target_ops): Update references.
732
733 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
734
735 * linux-ppc-low.c: Include nat/linux-ptrace.h.
736
737 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
738
739 * configure.srv (ipa_ppc_linux_regobj): Add
740 powerpc-isa207-htm-vsx32l-ipa.o and
741 powerpc-isa207-htm-vsx64l-ipa.o.
742 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
743 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
744 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
745 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
746 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
747 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
748 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
749 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
750 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
751 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
752 (init_registers_powerpc_isa207_htm_vsx32l)
753 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
754 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
755 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
756 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
757 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
758 (ppc_store_tm_ctarregset): New functions.
759 (ppc_regsets): Add entries for HTM regsets.
760 (ppc_arch_setup): Set htm in features struct when needed. Set
761 sizes for the HTM regsets.
762 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
763 (initialize_low_arch): Call
764 init_registers_powerpc_isa207_htm_vsx32l and
765 init_registers_powerpc_isa207_htm_vsx64l.
766 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
767 PPC_TDESC_ISA207_HTM_VSX.
768 (initialize_low_tracepoint): Call
769 init_registers_powerpc_isa207_htm_vsx32l and
770 init_registers_powerpc_isa207_htm_vsx64l.
771
772 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
773
774 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
775 rs6000/power-linux-pmu.xml to srv_xmlfiles.
776 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
777 (ppc_store_pmuregset): New functions.
778 (ppc_regsets): Add entries for ebb and pmu regsets.
779 (ppc_arch_setup): Set isa207 in features struct if the ebb and
780 pmu regsets are available. Set sizes for these regsets.
781
782 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
783
784 * configure.srv (ipa_ppc_linux_regobj): Add
785 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
786 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
787 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
788 rs6000/powerpc-isa207-vsx32l.xml, and
789 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
790 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
791 <PPC_TDESC_ISA207_VSX>: New enum value.
792 (init_registers_powerpc_isa207_vsx32l): Declare.
793 (init_registers_powerpc_isa207_vsx64l): Declare.
794 * linux-ppc-low.c (ppc_fill_tarregset): New function.
795 (ppc_store_tarregset): New function.
796 (ppc_regsets): Add entry for the TAR regset.
797 (ppc_arch_setup): Set isa207 in features struct when needed. Set
798 size for the TAR regsets.
799 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
800 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
801 and init_registers_powerpc_isa207_vsx64l.
802 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
803 (initialize_low_tracepoint): Call
804 init_registers_powerpc_isa207_vsx32l and
805 init_registers_powerpc_isa207_vsx64l.
806
807 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
808 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
809
810 * configure.srv (ipa_ppc_linux_regobj): Add
811 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
812 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
813 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
814 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
815 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
816 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
817 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
818 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
819 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
820 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
821 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
822 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
823 (ppc_hwcap): Add comment.
824 (ppc_hwcap2): New global.
825 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
826 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
827 (ppc_regsets): Add entries for the DSCR and PPR regsets.
828 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
829 when needed. Set sizes for the the DSCR and PPR regsets.
830 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
831 (initialize_low_arch): Call
832 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
833 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
834 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
835 PPC_TDESC_ISA205_PPR_DSCR_VSX.
836 (initialize_low_tracepoint): Call
837 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
838 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
839
840 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
841
842 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
843
844 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
845 Simon Marchi <simark@simark.ca>
846
847 * acinclude.m4: Include "../selftest.m4".
848 * configure: Regenerate.
849 * configure.ac: Use "GDB_AC_SELFTEST".
850 * configure.srv: Use "$enable_unittests" instead of
851 "$development" when checking whether unit tests have been
852 enabled.
853 * server.c (captured_main): Update message informing that
854 selftests have been disabled.
855
856 2018-10-04 Tom Tromey <tom@tromey.com>
857
858 * configure: Rebuild.
859
860 2018-10-04 Tom Tromey <tom@tromey.com>
861
862 * server.c (handle_status): Rename inner "thread".
863 (process_serial_event): Declare "res" in 'm' case.
864 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
865 (iterate_over_lwps): Rename inner "thread".
866 (linux_qxfer_libraries_svr4): Rename inner "len".
867 * gdbthread.h (find_thread_in_random): Rename inner "thread".
868
869 2018-10-01 Gary Benson <gbenson@redhat.com>
870
871 * gdb_proc_service.h: Moved common code to
872 common/gdb_proc_service.h.
873
874 2018-10-01 Gary Benson <gbenson@redhat.com>
875
876 * gdb_proc_service.h: Synchronize comments and whitespace with
877 GDB's version of this file.
878
879 2018-09-25 Tom Tromey <tom@tromey.com>
880
881 * configure: Rebuild.
882 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
883
884 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
885
886 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
887 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
888 ($(IPA_LIB)): Sort IPA_OBJS.
889
890 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
891
892 * Makefile.in: Remove references to $(ADD_DEPS).
893
894 2018-09-16 Tom Tromey <tom@tromey.com>
895
896 * remote-utils.c (remote_open): Use GNU style for metasyntactic
897 variables.
898 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
899 variables.
900
901 2018-09-05 Tom Tromey <tom@tromey.com>
902
903 * configure: Rebuild.
904
905 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
906
907 PR build/23399
908 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
909
910 2018-08-27 Tom Tromey <tom@tromey.com>
911
912 PR build/23087:
913 * configure: Rebuild.
914
915 2018-08-27 Tom Tromey <tom@tromey.com>
916
917 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
918 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
919 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
920 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
921 (s390x_emit_stack_adjust): Add casts to unsigned char.
922
923 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
924
925 PR gdb/23374
926 PR gdb/23375
927 * server.h (struct client_state) <disable_randomization>:
928 Initialize to 1.
929
930 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
931
932 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
933 variable.
934 (mips_supply_ptrace_register): Likewise.
935
936 2018-07-22 Tom Tromey <tom@tromey.com>
937
938 * configure: Rebuild.
939
940 2018-07-22 Tom Tromey <tom@tromey.com>
941
942 * win32-low.c (win32_create_inferior): Remove unused variables.
943 * gdbreplay.c (remote_open): Remove unused variable.
944 * remote-utils.c (remote_prepare): Remove unused variable.
945 * x86-tdesc.h (X86_TDESC_H): Define.
946 (amd64_expedite_regs): Define conditionally.
947 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
948 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
949 * remote-utils.c (readchar): Remove unused variable.
950
951 2018-07-13 Pedro Alves <palves@redhat.com>
952
953 * linux-low.c (linux_kill): Change parameter to process_info
954 pointer instead of pid. Adjust.
955 * lynx-low.c (lynx_kill): Likewise.
956 * nto-low.c (nto_kill): Likewise.
957 * spu-low.c (spu_kill): Likewise.
958 * win32-low.c (win32_kill): Likewise.
959 * server.c (handle_v_kill, kill_inferior_callback)
960 (detach_or_kill_for_exit): Adjust.
961 * target.c (kill_inferior): Change parameter to process_info
962 pointer instead of pid. Adjust.
963 * target.h (struct target_ops) <kill>: Change parameter to
964 process_info pointer instead of pid. Adjust all implementations
965 and callers.
966 (kill_inferior): Likewise.
967
968 2018-07-13 Pedro Alves <palves@redhat.com>
969
970 * linux-low.c (linux_detach, linux_join): Change parameter to
971 process_info pointer instead of pid. Adjust.
972 * lynx-low.c (lynx_detach, lynx_join): Likewise.
973 * nto-low.c (nto_detach): Likewise.
974 * spu-low.c (spu_detach, spu_join): Likewise.
975 * win32-low.c (win32_detach, win32_join): Likewise.
976 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
977 * target.h (struct target_ops) <detach, join>: Change parameter to
978 process_info pointer instead of pid. Adjust all implementations
979 and callers.
980 (detach_inferior, join_inferior): Rename 'pid' parameter to
981 'proc'.
982
983 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
984 Jan Kratochvil <jan.kratochvil@redhat.com>
985 Paul Fertser <fercerpav@gmail.com>
986 Tsutomu Seki <sekiriki@gmail.com>
987
988 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
989 (OBS): Add 'common/netstuff.o'.
990 (GDBREPLAY_OBS): Likewise.
991 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
992 (remote_open): Implement support for IPv6
993 connections.
994 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
995 and 'wspiapi.h'.
996 (handle_accept_event): Accept connections from IPv6 sources.
997 (remote_prepare): Handle IPv6-style hostnames; implement
998 support for IPv6 connections.
999 (remote_open): Implement support for printing connections from
1000 IPv6 sources.
1001
1002 2018-07-11 Pedro Alves <palves@redhat.com>
1003
1004 PR gdb/23377
1005 * mem-break.c (any_persistent_commands): Add process_info
1006 parameter and use it instead of relying on the current process.
1007 Change return type to bool.
1008 * mem-break.h (any_persistent_commands): Add process_info
1009 parameter and change return type to bool.
1010 * server.c (handle_detach): Remove require_running_or_return call.
1011 Look up the process_info for the process we're about to detach.
1012 If not found, return back error to GDB. Adjust
1013 any_persistent_commands call to pass down a process pointer.
1014
1015 2018-07-11 Pedro Alves <palves@redhat.com>
1016
1017 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1018 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1019 instead of collect_register_by_name.
1020 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1021 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1022
1023 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1024 Pedro Alves <palves@redhat.com>
1025
1026 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1027
1028 2018-07-03 Tom Tromey <tom@tromey.com>
1029
1030 * linux-low.c: Update.
1031 * lynx-low.c: Update.
1032 * mem-break.c: Update.
1033 * nto-low.c: Update.
1034 * remote-utils.c: Update.
1035 * server.c: Update.
1036 * spu-low.c: Update.
1037 * target.c: Update.
1038 * win32-low.c: Update.
1039
1040 2018-07-03 Tom Tromey <tom@tromey.com>
1041
1042 * server.c: Update.
1043
1044 2018-07-03 Tom Tromey <tom@tromey.com>
1045
1046 * linux-low.c: Update.
1047
1048 2018-07-03 Tom Tromey <tom@tromey.com>
1049
1050 * target.c: Update.
1051
1052 2018-07-03 Tom Tromey <tom@tromey.com>
1053
1054 * linux-low.c: Update.
1055 * linux-mips-low.c: Update.
1056 * lynx-low.c: Update.
1057 * nto-low.c: Update.
1058 * remote-utils.c: Update.
1059 * server.c: Update.
1060 * spu-low.c: Update.
1061 * target.c: Update.
1062 * thread-db.c: Update.
1063
1064 2018-07-03 Tom Tromey <tom@tromey.com>
1065
1066 * linux-low.c: Update.
1067 * linux-mips-low.c: Update.
1068 * lynx-low.c: Update.
1069 * mem-break.c: Update.
1070 * nto-low.c: Update.
1071 * remote-utils.c: Update.
1072 * server.c: Update.
1073 * spu-low.c: Update.
1074 * target.c: Update.
1075 * tracepoint.c: Update.
1076
1077 2018-07-03 Tom Tromey <tom@tromey.com>
1078
1079 * linux-low.c: Update.
1080 * linux-ppc-low.c: Update.
1081 * linux-x86-low.c: Update.
1082 * proc-service.c: Update.
1083 * server.c: Update.
1084 * spu-low.c: Update.
1085 * thread-db.c: Update.
1086 * win32-low.c: Update.
1087
1088 2018-07-03 Tom Tromey <tom@tromey.com>
1089
1090 * linux-low.c: Update.
1091 * lynx-low.c: Update.
1092 * nto-low.c: Update.
1093 * remote-utils.c: Update.
1094 * spu-low.c: Update.
1095 * thread-db.c: Update.
1096 * win32-low.c: Update.
1097
1098 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1099
1100 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1101 parameter in call to 'amd64_create_target_description'.
1102
1103 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1104
1105 * x86-tdesc.h: Remove executable permission flag.
1106
1107 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * configure.ac: Remove AC_PREREQ, add missing quoting.
1110 * configure: Re-generate.
1111 * config.in: Re-generate.
1112 * aclocal.m4: Re-generate.
1113
1114 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1115
1116 * tracepoint.h (current_traceframe): Remove declaration.
1117
1118 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1119
1120 * linux-aarch64-low.c (is_sve_tdesc): New function.
1121 (aarch64_sve_regs_copy_to_regcache): Likewise.
1122 (aarch64_sve_regs_copy_from_regcache): Likewise.
1123 (aarch64_regs_info): Add SVE checks.
1124 (initialize_low_arch): Initialize SVE.
1125
1126 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1127
1128 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1129
1130 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1131
1132 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1133 (initialize_low_tracepoint): Likewise
1134 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1135 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1136 param.
1137 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1138 checks.
1139 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1140
1141 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1142
1143 * server.h (PBUFSIZ): Increase size
1144
1145 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1146
1147 * regcache.c (regcache::raw_compare): New function.
1148 * regcache.h (regcache::raw_compare): New declaration.
1149
1150 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1151
1152 * regcache.c (new_register_cache): Use new.
1153 (free_register_cache): Use delete.
1154 (register_data): Use const.
1155 (supply_register): Move body inside regcache.
1156 (regcache::raw_supply): New override function.
1157 (collect_register): Move body inside regcache.
1158 (regcache::raw_collect): New override function.
1159 (regcache::get_register_status): New override function.
1160 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1161
1162 2018-06-09 Tom Tromey <tom@tromey.com>
1163
1164 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1165 declare queue.
1166 (event_queue): Use std::queue.
1167 (gdb_event_xfree): Remove.
1168 (initialize_event_loop, process_event, wait_for_event): Update.
1169
1170 2018-06-08 Stan Cox <scox@redhat.com>
1171
1172 * win32-low.c (win32_create_inferior): last_ptid and last_status
1173 moved to client_state.
1174
1175 2018-06-08 Pedro Alves <palves@redhat.com>
1176
1177 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1178 common/common-exceptions.o, common/common-utils.o,
1179 common/errors.o, common/print-utils.o and utils.o.
1180 * gdbreplay.c: Include "common-defs.h" instead of the two
1181 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1182 string.h or alloca.h.
1183 (perror_with_name): Delete.
1184 (remote_open): Use xstrdup instead of strdup.
1185 (main): Rename to ...
1186 (captured_main): ... this.
1187 (main): New.
1188
1189 2018-06-08 Tom Tromey <tom@tromey.com>
1190
1191 * linux-low.c (linux_low_read_btrace): Update.
1192
1193 2018-06-04 Stan Cox <scox@redhat.com>
1194
1195 * server.h (struct client_state): New.
1196 * server.c (cont_thread, general_thread, multi_process)
1197 (report_fork_events, report_vfork_events, report_exec_events)
1198 (report_thread_events, swbreak_feature, hwbreak_feature)
1199 (vCont_supported, disable_randomization, pass_signals)
1200 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1201 Moved to client_state.
1202 * remote-utils.c (remote_debug, noack_mode)
1203 (transport_is_reliable): Moved to client_state.
1204 * tracepoint.c (current_traceframe): Moved to client_state.
1205
1206 Update all callers.
1207 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1208 linux-low.c, remote-utils.h, target.c: Use client_state.
1209
1210 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1211
1212 * configure.srv: Add new c/h file.
1213
1214 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1215
1216 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1217 null VQ.
1218
1219 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1220
1221 * gdb.arch/mips-fpregset-core.exp: New test.
1222 * gdb.arch/mips-fpregset-core.c: New test source.
1223
1224 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1225
1226 PR server/23198
1227 * hostio.c (require_int): Do not report overflow for integers
1228 between 0xfffffff and 0x7fffffff.
1229
1230 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1231
1232 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1233 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1234 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1235 functions.
1236 (the_low_target): Wire them.
1237
1238 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1239
1240 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1241 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1242 mode. Call collect_register_by_name with vscr using
1243 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1244 (ppc_store_vrregset): Add and set vscr_offset variable as in
1245 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1246 vscr_offset.
1247
1248 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1249
1250 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1251 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1252 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1253
1254 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1255
1256 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1257 (ppc_store_vsxregset): Likewise.
1258 (ppc_fill_vrregset): Likewise.
1259 (ppc_store_vrregset): Likewise.
1260 (ppc_fill_evrregset): Likewise.
1261 (ppc_store_evrregset): Likewise.
1262 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1263 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1264 needed.
1265
1266 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1267
1268 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1269 wordsize of the inferior. Call ppc_linux_target_wordsize.
1270
1271 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1272
1273 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1274 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1275 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1276 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1277 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1278 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1279 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1280 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1281 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1282 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1283 (tdesc_powerpc_e500l): Remove.
1284 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1285 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1286 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1287 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1288 linux-ppc-tdesc.h.
1289 (ppc_arch_setup): Remove target description matching code. Fill a
1290 ppc_linux_features struct and call ppc_linux_match_description
1291 with it.
1292
1293 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1294
1295 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1296 width of the requested register exceeds the width of the
1297 `ptrace' data type.
1298 (mips_cannot_store_register): Likewise.
1299
1300 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1301
1302 * linux-mips-low.c (mips_fetch_register): New function. Update
1303 preceding comment.
1304 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1305 (the_low_target): Wire `mips_fetch_register'.
1306
1307 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1308
1309 * lynx-i386-low.c (LYNXOS_178): New macro.
1310 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1311 the layout on LynxOS-178.
1312 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1313 handle floating point registers that are not supported by
1314 LynxOS-178.
1315
1316 2018-05-10 Tom Tromey <tom@tromey.com>
1317
1318 * configure: Rebuild.
1319
1320 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1321
1322 PR server/23158:
1323 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1324 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1325 Use it to set the expedite_regs field in the given tdesc.
1326 * x86-tdesc.h: New file.
1327 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1328 Adjust following the addition of the new expedite_regs parameter
1329 to init_target_desc.
1330 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1331 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1332 (i386_linux_read_description, amd64_linux_read_description):
1333 Adjust following the addition of the new expedite_regs parameter
1334 to init_target_desc.
1335 * lynx-i386-low.c: #include "x86-tdesc.h".
1336 (lynx_i386_arch_setup): Adjust following the addition of the new
1337 expedite_regs parameter to init_target_desc.
1338 * nto-x86-low.c: #include "x86-tdesc.h".
1339 (nto_x86_arch_setup): Adjust following the addition of the new
1340 expedite_regs parameter to init_target_desc.
1341 * win32-i386-low.c: #include "x86-tdesc.h".
1342 (i386_arch_setup): Adjust following the addition of the new
1343 expedite_regs parameter to init_target_desc.
1344
1345 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1346
1347 PR server/23158:
1348 * win32-low.c (win32_create_inferior): Add call to my_wait
1349 setting last_status global.
1350
1351 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1352
1353 PR server/23158:
1354 * win32-low.c (create_process): Only call gdb_tilde_expand if
1355 inferior_cwd is not NULL.
1356
1357 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1358
1359 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1360 registers to the cache if their values have changed.
1361 (i387_xsave_to_cache): Provide default values for x87 control
1362 registers when these features are available, but disabled.
1363 * regcache.c (supply_register_by_name_zeroed): New function.
1364 * regcache.h (supply_register_by_name_zeroed): Declare new
1365 function.
1366
1367 2018-05-07 Tom Tromey <tom@tromey.com>
1368
1369 * configure: Rebuild.
1370
1371 2018-05-04 Tom Tromey <tom@tromey.com>
1372
1373 * configure: Rebuild.
1374
1375 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1376 Pedro Alves <palves@redhat.com>
1377
1378 * linux-aarch64-low.c (aarch64_stopped_data_address):
1379 Likewise.
1380
1381 2018-04-27 Tom Tromey <tom@tromey.com>
1382
1383 * configure: Rebuild.
1384
1385 2018-04-23 Tom Tromey <tom@tromey.com>
1386
1387 * configure: Rebuild.
1388
1389 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1390
1391 * Makefile.in (depcomp): Add "..".
1392 (all_deps_files): New and use it.
1393
1394 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1395
1396 * configure.srv (aarch64*-*-linux*): Don't include xml.
1397 (i[34567]86-*-cygwin*): Likewise.
1398 (i[34567]86-*-linux*): Likewise.
1399 (i[34567]86-*-lynxos*): Likewise.
1400 (i[34567]86-*-mingw32ce*): Likewise.
1401 (i[34567]86-*-mingw*): Likewise.
1402 (i[34567]86-*-nto*): Likewise.
1403 (tic6x-*-uclinux): Likewise.
1404 (x86_64-*-linux*): Likewise.
1405 (x86_64-*-mingw*): Likewise.
1406 (x86_64-*-cygwin*): Likewise.
1407
1408 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1409
1410 * tdesc.c: Remove xml parameter.
1411
1412 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1413
1414 * server.c (get_features_xml): Remove cast.
1415 * tdesc.c (void target_desc::accept): Fill in function.
1416 (tdesc_get_features_xml): Remove old xml creation.
1417 (print_xml_feature::visit_pre): Add xml vistor.
1418 * tdesc.h (struct target_desc): Make xmltarget mutable.
1419 (tdesc_get_features_xml): Remove declaration.
1420
1421 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1422
1423 * tdesc.c (tdesc_architecture_name): Add new function.
1424 (tdesc_osabi_name): Likewise.
1425 (tdesc_get_features_xml): Use new functions.
1426
1427 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1428
1429 * tdesc.c (tdesc_create_flags): Remove.
1430 (tdesc_add_flag): Likewise.
1431 (tdesc_named_type): Likewise.
1432 (tdesc_create_union): Likewise.
1433 (tdesc_create_struct): Likewise.
1434 (tdesc_create_vector): Likewise.
1435 (tdesc_add_bitfield): Likewise.
1436 (tdesc_add_field): Likewise.
1437 (tdesc_set_struct_size): Likewise.
1438
1439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1440
1441 * tdesc.c (~target_desc): Remove implictly deleted items.
1442 (init_target_desc): Iterate all features.
1443 (tdesc_get_features_xml): Use vector.
1444 (tdesc_create_feature): Create feature.
1445 * tdesc.h (tdesc_feature) Remove
1446 (target_desc): Add features.
1447
1448 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1449
1450 * Makefile.in: Add common/tdesc.c
1451 * tdesc.c (init_target_desc): init all reg_defs from register
1452 vector.
1453 (tdesc_create_reg): Create tdesc_reg.
1454 * tdesc.h (tdesc_feature): Add register vector.
1455
1456 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1457
1458 * tdesc.h (struct target_desc) <features>: Change type to
1459 std::vector<std::string>.
1460 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1461 changes.
1462 (tdesc_get_features_xml): Likewise.
1463 (tdesc_create_feature): Likewise.
1464
1465 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1466
1467 * regcache.c (find_register_by_number): Return a ref.
1468 (find_regno): Use references.
1469 (register_size): Likewise.
1470 (register_data): Likewise.
1471 * tdesc.c (target_desc::~target_desc): Remove free calls.
1472 (target_desc::operator==): Use std::vector compare.
1473 (init_target_desc): Use reference.
1474 (tdesc_create_reg): Use reg constructors.
1475 * tdesc.h (struct target_desc): Replace pointer with object.
1476
1477 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1478
1479 * regcache.c (find_register_by_number): Make static.
1480 (find_regno): Use find_register_by_number
1481 * regcache.h (struct reg): Remove declaration.
1482
1483 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1484
1485 * tdesc.c (target_desc::~target_desc): Move to here.
1486 (target_desc::operator==): Likewise.
1487 * tdesc.h (target_desc::~target_desc): Move from here.
1488 (target_desc::operator==): Likewise.
1489
1490 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1491
1492 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1493
1494 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1495
1496 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1497 S390_TDESC_GS.
1498 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1499 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1500 and init_registers_s390_gs_linux64.
1501
1502 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1503
1504 * linux-s390-low.c (s390_fill_gs): Remove function.
1505 (s390_fill_gsbc): Remove function.
1506 (s390_regsets): Set fill functions for the guarded storage regsets
1507 to NULL.
1508
1509 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1510
1511 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1512 the word size. Add comment.
1513 (s390_get_wordsize): New function.
1514 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1515 pswm with it. Instead, use s390_get_wordsize to determine the
1516 word size first and derive the correct tdesc from that directly.
1517
1518 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1519
1520 * Makefile.in: Include silent-rules.mk.
1521 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1522 (COMPILE): Add ECHO_CXX.
1523 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1524 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1525 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1526 (version-generated.c): Add ECHO_GEN.
1527 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1528 (IPAGENT_COMPILE): Add ECHO_CXX.
1529 (%-generated.c): Add ECHO_REGDAT.
1530
1531 2018-03-14 Tom Tromey <tom@tromey.com>
1532
1533 PR cli/14977:
1534 * ax.c (ax_printf): Special case for NULL.
1535
1536 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1537
1538 * linux-low.c (linux_qxfer_libraries_svr4): Use
1539 xml_escape_text_append.
1540
1541 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1542
1543 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1544
1545 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1546
1547 * server.c (handle_general_set): Remove unnecessary xstrdup.
1548
1549 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1550
1551 * server.c (parse_debug_format_options): Adjust to
1552 delim_string_to_char_ptr_vec changes.
1553 * thread-db.c (thread_db_load_search): Adjust to
1554 dirnames_to_char_ptr_vec changes.
1555
1556 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1557
1558 * target.h (target_enable_btrace, target_disable_btrace)
1559 (target_read_btrace, target_read_btrace_conf): Turn macro into
1560 inline function. Throw error if target method is not defined.
1561 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1562 check for btrace target method. Be prepared to handle exceptions
1563 from btrace target methods.
1564
1565 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1566
1567 * server.c (captured_main): Change order of error message printed
1568 when the current working directory cannot be found.
1569
1570 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1571
1572 * server.c: Include "filenames.h" and "pathstuff.h".
1573 (program_name): Delete variable.
1574 (program_path): New anonymous class.
1575 (get_exec_wrapper): Use "program_path" instead of
1576 "program_name".
1577 (handle_v_run): Likewise.
1578 (captured_main): Likewise.
1579 (process_serial_event): Likewise.
1580
1581 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1582
1583 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1584 (OBJS): Add "pathstuff.o".
1585 * server.c (current_directory): New global variable.
1586 (captured_main): Initialize "current_directory".
1587
1588 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1589
1590 * tdesc.c: Use common/tdesc.h.
1591 * tdesc.h: Likewise.
1592
1593 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1594 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * Makefile.in: Switch order of make rules.
1597
1598 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1599
1600 * Makefile.in: Add common directory in build.
1601 * configure.ac: Add common reference.
1602 * configure: Regenerate.
1603
1604 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1605
1606 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1607 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1608 * spu-low.c (spu_target_ops): Likewise.
1609 * win32-low.c (win32_target_ops): Likewise.
1610 * server.c (supported_btrace_packets): Report packets unconditionally.
1611 * target.h (target_ops) <supports_btrace>: Remove.
1612 (target_supports_btrace): Remove.
1613
1614 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1615
1616 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1617 (handle_btrace_disable): Change return type to void. Use exceptions
1618 to report errors.
1619 (handle_btrace_general_set): Catch exception and copy message to
1620 return message.
1621
1622 2018-02-08 Tom Tromey <tom@tromey.com>
1623
1624 * linux-low.c (install_software_single_step_breakpoints): Use
1625 make_scoped_restore.
1626 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1627 (do_restore_current_thread_cleanup): Remove.
1628 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1629 declare.
1630
1631 2018-02-08 Tom Tromey <tom@tromey.com>
1632
1633 * mem-break.c (set_raw_breakpoint_at): Use
1634 gdb::unique_xmalloc_ptr.
1635
1636 2018-01-30 Pedro Alves <palves@redhat.com>
1637
1638 PR gdb/13211
1639 * target.c (target_terminal::terminal_state): Rename to ...
1640 (target_terminal::m_terminal_state): ... this.
1641
1642 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1643
1644 * linux-low.c (handle_extended_wait): Surround call to
1645 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1646
1647 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1648
1649 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1650 linux_ptrace_attach_fail_reason_string now returning an
1651 std::string.
1652 (linux_attach): Likewise.
1653 * thread-db.c (attach_thread): Likewise.
1654
1655 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1656
1657 PR gdb/21559
1658 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1659 checking for fs_base/gs_base fields in struct user_regs_struct.
1660 * configure: Regenerate.
1661
1662 2018-01-16 Yao Qi <yao.qi@linaro.org>
1663
1664 PR gdb/18749
1665 * linux-low.c (fetch_register): Call supply_register instead of
1666 error.
1667
1668 2018-01-08 Yao Qi <yao.qi@linaro.org>
1669 Simon Marchi <simon.marchi@ericsson.com>
1670
1671 * Makefile.in (OBS): Remove selftest.o.
1672 * configure.ac: Set srv_selftest_objs if $development is true.
1673 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1674 * configure: Re-generated.
1675 * server.c (captured_main): Wrap variable selftest_filter with
1676 GDB_SELF_TEST.
1677
1678 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1679
1680 * server.c (parse_debug_format_options): Return std::string.
1681 (handle_monitor_command, captured_main): Adjust.
1682
1683 2018-01-05 Pedro Alves <palves@redhat.com>
1684
1685 PR gdb/18653
1686 * server.c (captured_main): Pass quiet=false to
1687 save_original_signals_state.
1688
1689 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1690
1691 * gdbreplay.c (gdbreplay_version): Update copyright year in
1692 version message.
1693 * server.c (gdbserver_version): Likewise.
1694
1695 2017-12-08 Tom Tromey <tom@tromey.com>
1696
1697 * ax.c (ax_printf): Update.
1698
1699 2017-12-07 Yao Qi <yao.qi@linaro.org>
1700
1701 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1702 aarch64_linux_read_description.
1703 * linux-amd64-ipa.c (idx2mask): New array.
1704 (get_ipa_tdesc): Move idx2mask out.
1705 (initialize_low_tracepoint): Initialize target descriptions.
1706 * linux-i386-ipa.c (idx2mask): New array.
1707 (get_ipa_tdesc): Move idx2mask out.
1708 (initialize_low_tracepoint): Initialize target descriptions.
1709
1710 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 * tdesc.c (struct tdesc_type): Change return type.
1713 (tdesc_add_flag): Change parameter type.
1714 (tdesc_add_bitfield): Likewise.
1715 (tdesc_add_field): Likewise.
1716 (tdesc_set_struct_size): Likewise.
1717
1718 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1719
1720 * regcache.c (registers_to_string): Remove unused variable.
1721
1722 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1723
1724 * inferiors.c (for_each_inferior_with_data): Remove.
1725 * inferiors.h (for_each_inferior_with_data): Remove.
1726 * server.c (handle_qxfer_threads_worker): Change parameter type.
1727 (handle_qxfer_threads_proper): Use for_each_thread.
1728
1729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1730
1731 * inferiors.c (for_each_inferior): Remove.
1732 (clear_inferiors): Use for_each_thread.
1733 * inferiors.h (for_each_inferior): Remove.
1734 * linux-low.c (linux_wait_for_event_filtered): Use
1735 for_each_thread.
1736 (linux_stabilize_threads): Likewise.
1737 * regcache.c (regcache_release): Likewise.
1738 * server.c (gdb_wants_all_threads_stopped): Likewise.
1739 (clear_pending_status_callback): Remove.
1740 (handle_status): Use for_each_thread.
1741 (captured_main): Likewise.
1742 * win32-low.c (child_init_thread_list): Likewise.
1743 (win32_clear_inferiors): Likewise.
1744 (fake_breakpoint_event): Likewise.
1745
1746 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1747
1748 * inferiors.h (find_inferior): Remove.
1749 * inferiors.c (find_inferior): Remove.
1750
1751 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1752
1753 * linux-low.c (resume_status_pending_p): Update comment.
1754 (need_step_over_p): Update comment.
1755
1756 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1757
1758 * linux-low.c (proceed_one_lwp): Return void, change parameter
1759 type.
1760 (unsuspend_and_proceed_one_lwp): Likewise.
1761 (proceed_all_lwps): Use for_each_thread.
1762 (unstop_all_lwps): Likewise.
1763
1764 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * linux-low.c (linux_resume_one_thread): Return void, take
1767 parameter directly.
1768 (linux_resume): Use for_each_thread.
1769
1770 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1771
1772 * linux-low.c (send_sigstop_callback): Return void, change
1773 parameter type. Rename to...
1774 (send_sigstop): ... this.
1775 (suspend_and_send_sigstop_callback): Return void, change parameter
1776 type. Rename to...
1777 (suspend_and_send_sigstop): ... this.
1778 (stop_all_lwps): Use for_each_thread.
1779
1780 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1781
1782 * linux-low.c (lwp_running): Return bool, remove unused
1783 argument.
1784 (linux_stabilize_threads): Use find_thread.
1785
1786 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1787
1788 * linux-low.c (select_singlestep_lwp_callback): Remove.
1789 (count_events_callback): Remove.
1790 (select_event_lwp_callback): Remove.
1791 (select_event_lwp): Use find_thread/for_each_thread.
1792
1793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1794
1795 * linux-low.c (not_stopped_callback): Return bool, take filter
1796 argument directly.
1797 (linux_wait_for_event_filtered): Use find_thread.
1798 (linux_wait_1): Likewise.
1799
1800 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * linux-low.c (same_lwp): Remove.
1803 (find_lwp_pid): Use find_thread.
1804
1805 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 * linux-low.c (delete_lwp_callback): Remove.
1808 (linux_mourn): Use for_each_thread.
1809
1810 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1811
1812 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1813 args parameter, don't check for pid.
1814 (linux_detach): Use for_each_thread.
1815
1816 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1817
1818 * linux-low.c (struct counter): Remove.
1819 (second_thread_of_pid_p): Remove.
1820 (last_thread_of_process_p): Use find_thread.
1821
1822 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * inferiors.c (find_inferior_in_random): Remove.
1825 * inferiors.h (find_inferior_in_random): Remove.
1826 * linux-low.c (status_pending_p_callback): Return bool, accept
1827 parameter ptid directly.
1828 (linux_wait_for_event_filtered): Use find_thread_in_random.
1829 (linux_wait_1): Likewise.
1830
1831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * inferiors.c (find_inferior_id): Remove.
1834 (find_thread_ptid): Move implemention from find_inferior_id to
1835 here.
1836 * inferiors.h (find_inferior_id): Remove.
1837 * server.c (handle_status): Use find_thread_ptid.
1838 (process_serial_event): Likewise.
1839 * thread-db.c (find_one_thread): Likewise.
1840 (thread_db_thread_handle): Likewise.
1841 * win32-low.c (thread_rec): Likewise.
1842 (child_delete_thread): Likewise.
1843 (win32_thread_alive): Likewise.
1844 (get_child_debug_event): Likewise.
1845
1846 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1847
1848 * linux-mips-low.c (update_watch_registers_callback): Return
1849 void, remove pid_p parameter, don't check for pid.
1850 (mips_insert_point, mips_remove_point): Use for_each_thread.
1851
1852 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1853
1854 * lynx.low (lynx_delete_thread_callback): Remove.
1855 (lynx_mourn): Use for_each_thread.
1856
1857 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1858
1859 * regcache.c (regcache_invalidate_one): Remove.
1860 (regcache_invalidate_pid): use for_each_thread.
1861
1862 2017-11-26 Tom Tromey <tom@tromey.com>
1863
1864 * linux-low.c (linux_create_inferior): Update.
1865
1866 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1867
1868 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1869
1870 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1871
1872 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1873 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1874 * linux-aarch64-tdesc-selftest.c: New file.
1875 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1876
1877 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1878
1879 * configure.srv: Add new file.
1880 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1881 * linux-aarch64-tdesc-selftest.c: New file.
1882 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1883
1884 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1885
1886 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1887 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1888 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1889
1890 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1891
1892 * configure.srv: Add new files.
1893 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1894 aarch64_linux_read_description.
1895 * linux-aarch64-low.c (aarch64_linux_read_description):
1896 Merge with aarch64_arch_setup.
1897 (aarch64_arch_setup): Call aarch64_linux_read_description.
1898 * linux-aarch64-tdesc.c: New file.
1899 * linux-aarch64-tdesc.h: New file.
1900
1901 2017-11-24 Yao Qi <yao.qi@linaro.org>
1902
1903 * configure.srv: Set $srv_regobj for tic6x-linux.
1904 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1905 (tic6x_read_description): Move some code to tic6x_arch_setup.
1906 (tic6x_tdesc_test): New function.
1907 (initialize_low_arch): Call selftests::register_test.
1908
1909 2017-11-22 Yao Qi <yao.qi@linaro.org>
1910
1911 * remote-utils.c (prepare_resume_reply): Use memcpy.
1912
1913 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1914
1915 * linux-low.c (kill_one_lwp_callback): Return void, take
1916 argument directly, don't filter on pid.
1917 (linux_kill): Use for_each_thread.
1918
1919 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1920
1921 * linux-low.c (need_step_over_p): Return bool, remove dummy
1922 argument.
1923 (linux_resume, proceed_all_lwps): Use find_thread.
1924
1925 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1926
1927 * linux-low.c (resume_status_pending_p): Return bool, remove
1928 flag_p argument.
1929 (linux_resume): Use find_thread.
1930
1931 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1932
1933 * linux-low.c (struct thread_resume_array): Remove.
1934 (linux_set_resume_request): Return void, take arguments
1935 directly.
1936 (linux_resume): Use for_each_thread.
1937
1938 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1939
1940 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1941 return bool, remove data argument.
1942 (linux_stabilize_threads): Use find_thread.
1943
1944 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * linux-low.c (unsuspend_one_lwp): Remove.
1947 (unsuspend_all_lwps): Use for_each_thread, inline code from
1948 unsuspend_one_lwp.
1949
1950 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1951
1952 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1953 * linux-low.c (struct iterate_over_lwps_args): Remove.
1954 (iterate_over_lwps_filter): Remove.
1955 (iterate_over_lwps): Use find_thread.
1956
1957 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1960 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1961 code from reset_lwp_ptrace_options_callback.
1962
1963 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1964
1965 * linux-arm-low.c (struct update_registers_data): Remove.
1966 (update_registers_callback): Return void, take arguments
1967 directly, don't check thread's pid.
1968 (arm_insert_point, arm_remove_point): Use for_each_thread.
1969
1970 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1971
1972 * win32-low.c (continue_one_thread): Return void, take argument
1973 directly.
1974 (child_continue): Use for_each_thread.
1975
1976 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1977
1978 * win32-i386-low.c (update_debug_registers_callback): Rename
1979 to ...
1980 (update_debug_registers): ... this, return void, remove pid_p arg.
1981 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1982
1983 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1984
1985 * inferiors.h (struct process_info): Add constructor, initialize
1986 fields..
1987 <syscalls_to_catch>: Change type to std::vector<int>.
1988 * inferiors.c (add_process): Allocate process_info with new.
1989 (remove_process): Free process_info with delete.
1990 * linux-low.c (handle_extended_wait): Adjust.
1991 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1992 * server.c (handle_general_set): Adjust.
1993
1994 2017-11-16 Pedro Alves <palves@redhat.com>
1995
1996 * remote-utils.c (remote_close): Block SIGIO signals instead of
1997 uninstalling the SIGIO handler.
1998
1999 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2000
2001 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2002
2003 2017-11-16 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2006 (tic6x_store_gregset): Likewise.
2007 (tic6x_usrregs_info): Move it up.
2008
2009 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2010
2011 * Makefile.in: Update arch rules.
2012 * configure.srv: Explicitly mark arch/ files.
2013
2014 2017-11-13 Andreas Schwab <schwab@suse.de>
2015
2016 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2017 function.
2018 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2019
2020 2017-11-06 Pedro Alves <palves@redhat.com>
2021
2022 * config.in, configure: Regenerate.
2023
2024 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2025
2026 * target.c (struct thread_search): Remove.
2027 (thread_search_callback): Remove.
2028 (prepare_to_access_memory): Use for_each_thread instead of
2029 find_inferior. Inline code from thread_search_callback.
2030
2031 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2032
2033 * server.c (struct visit_actioned_threads_data): Remove.
2034 (visit_actioned_threads): Change prototype to take arguments
2035 directly.
2036 (resume): Use find_thread instead of find_inferior.
2037
2038 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2039
2040 * server.c (queue_stop_reply_callback): Change prototype, return
2041 void.
2042 (find_status_pending_thread_callback): Remove.
2043 (handle_status): Replace find_inferior with find_thread and
2044 for_each_thread.
2045
2046 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2047
2048 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2049 with REGNO.
2050 (aarch64_store_gregset): Likewise.
2051 (aarch64_fill_fpregset): Likewise.
2052 (aarch64_store_fpregset): Likewise.
2053
2054 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2055
2056 * gdbthread.h (find_thread, for_each_thread): New functions.
2057 * inferiors.c (thread_of_pid): Remove.
2058 (find_any_thread_of_pid): Use find_thread.
2059 * linux-low.c (num_lwps): Use for_each_thread.
2060
2061 2017-10-17 Yao Qi <yao.qi@linaro.org>
2062
2063 * Makefile.in: Remove one rule.
2064 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2065
2066 2017-10-17 Yao Qi <yao.qi@linaro.org>
2067
2068 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2069 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2070
2071 2017-10-17 Yao Qi <yao.qi@linaro.org>
2072
2073 * configure.srv: Rename arm.o with arch/arm.o.
2074
2075 2017-10-17 Yao Qi <yao.qi@linaro.org>
2076
2077 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2078 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2079 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2080 (arch-i386.o, arch-amd64.o): Remove rules.
2081 (arch/%.o): New rule.
2082 Update POSTCOMPILE and COMPILE.pre.
2083 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2084 * configure: Re-generated.
2085 * configure.srv: Replace arch-i386.o with arch/i386.o.
2086 Replace arch-amd64.o with arch/amd64.o.
2087
2088 2017-10-16 Yao Qi <yao.qi@linaro.org>
2089
2090 * configure: Regenerated.
2091
2092 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2093
2094 * inferiors.h: (struct inferior_list): Remove.
2095 (struct inferior_list_entry); Remove.
2096 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2097 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2098 get_first_inferior): Remove.
2099 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2100 find_inferior_id, find_inferior_in_random): Change signature.
2101 * inferiors.c (all_threads): Change type to
2102 std::list<thread_info *>.
2103 (get_thread): Remove macro.
2104 (find_inferior, find_inferior_id): Change signature, implement
2105 using find_thread.
2106 (find_inferior_in_random): Change signature, implement using
2107 find_thread_in_random.
2108 (for_each_inferior, for_each_inferior_with_data): Change
2109 signature, implement using for_each_thread.
2110 (add_inferior_to_list, remove_inferior): Remove.
2111 (add_thread, get_first_thread, thread_of_pid,
2112 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2113 (get_first_inferior, one_inferior_p, clear_inferior_list):
2114 Remove.
2115 (clear_inferiors, get_thread_process): Update.
2116 * gdbthread.h: Include <list>.
2117 (struct thread_info) <entry>: Remove field.
2118 <id>: New field.
2119 (all_threads): Change type to std::list<thread_info *>.
2120 (get_first_inferior): Add doc.
2121 (find_thread, for_each_thread, find_thread_in_random): New
2122 functions.
2123 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2124 * linux-arm-low.c (update_registers_callback): Update.
2125 * linux-low.c (second_thread_of_pid_p): Update.
2126 (kill_one_lwp_callback, linux_detach_lwp_callback,
2127 delete_lwp_callback, status_pending_p_callback, same_lwp,
2128 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2129 iterate_over_lwps, not_stopped_callback,
2130 resume_stopped_resumed_lwps, count_events_callback,
2131 select_singlestep_lwp_callback, select_event_lwp_callback,
2132 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2133 suspend_and_send_sigstop_callback, wait_for_sigstop,
2134 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2135 lwp_running, linux_set_resume_request, resume_status_pending_p,
2136 need_step_over_p, start_step_over, linux_resume_one_thread,
2137 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2138 reset_lwp_ptrace_options_callback): Update.
2139 * linux-mips-low.c (update_watch_registers_callback): Update.
2140 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2141 Update.
2142 (free_register_cache_thread_one): Remove.
2143 (regcache_release): Update.
2144 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2145 handle_qxfer_threads_worker): Update.
2146 (handle_query): Update, use list iterator.
2147 (visit_actioned_threads, handle_pending_status,
2148 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2149 clear_pending_status_callback, set_pending_status_callback,
2150 find_status_pending_thread_callback, handle_status,
2151 process_serial_event): Update.
2152 * target.c (thread_search_callback): Update.
2153 * thread-db.c (thread_db_get_tls_address): Update.
2154 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2155 Update.
2156 * win32-i386-low.c (update_debug_registers_callback): Update.
2157 * win32-low.c (delete_thread_info, child_delete_thread,
2158 continue_one_thread, suspend_one_thread,
2159 get_child_debug_event): Adjust.
2160
2161 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2162
2163 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2164 * inferiors.h: Include <list>.
2165 (struct process_info) <entry>: Remove field.
2166 <pid>: New field.
2167 (pid_of): Change macro to function.
2168 (ptid_of, lwpid_of): Remove macro.
2169 (all_processes): Change type to std::list<process_info *>.
2170 (ALL_PROCESSES): Remove macro.
2171 (for_each_process, find_process): New function.
2172 * inferiors.c (all_processes): Change type to
2173 std::list<process_info *>.
2174 (find_thread_process): Adjust.
2175 (add_process): Likewise.
2176 (remove_process): Likewise.
2177 (find_process_pid): Likewise.
2178 (get_first_process): Likewise.
2179 (started_inferior_callback): Remove.
2180 (have_started_inferiors_p): Adjust.
2181 (attached_inferior_callback): Remove.
2182 (have_attached_inferiors_p): Adjust.
2183 * linux-low.c (check_zombie_leaders): Likewise.
2184 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2185 (x86_linux_update_xmltarget): Adjust.
2186 * server.c (handle_query): Likewise.
2187 (gdb_reattached_process): Remove.
2188 (handle_status): Adjust.
2189 (kill_inferior_callback): Likewise.
2190 (detach_or_kill_inferior): Remove.
2191 (print_started_pid): Likewise.
2192 (print_attached_pid): Likewise.
2193 (detach_or_kill_for_exit): Update.
2194 (process_serial_event): Likewise.
2195 * linux-arm-low.c (arm_new_fork): Likewise.
2196
2197 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2198
2199 * dll.h: Include <list>.
2200 (struct dll_info): Add constructor.
2201 <entry>: Remove field.
2202 (all_dlls): Change type to std::list<dll_info>.
2203 * dll.c: Include <algorithm>.
2204 (get_dll): Remove macro.
2205 (all_dlls): Change type to std::list<dll_info *>.
2206 (free_one_dll): Remove.
2207 (match_dll): Likewise.
2208 (loaded_dll): Adjust.
2209 (unloaded_dll): Adjust to all_dlls type change, use
2210 std::find_if. Inline code from match_dll.
2211 (clear_dlls): Adjust to all_dlls type change.
2212 * server.c (emit_dll_description): Remove.
2213 (handle_qxfer_libraries): Adjust to all_dlls type change,
2214 integrate emit_dll_description's functionality.
2215
2216 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2217
2218 * linux-low.h (struct linux_target_ops) <delete_process>: New
2219 field.
2220 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2221 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2222 (struct linux_target_ops): Add delete_process callback.
2223 * linux-arm-low.c (arm_delete_process): New.
2224 (struct linux_target_ops): Add delete_process callback.
2225 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2226 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2227 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2228 * linux-mips-low.c (mips_linux_delete_process): New.
2229 (struct linux_target_ops): Add delete_process callback.
2230 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2231 * linux-s390-low.c (struct linux_target_ops): Likewise.
2232 * linux-sh-low.c (struct linux_target_ops): Likewise.
2233 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2234 * linux-tile-low.c (struct linux_target_ops): Likewise.
2235 * linux-x86-low.c (x86_linux_delete_process): New.
2236 (struct linux_target_ops): Add delete_process callback.
2237 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2238
2239 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * linux-aarch64-low.c (the_low_target): Add thread delete
2242 callback.
2243 * linux-arm-low.c (arm_delete_thread): New function.
2244 (the_low_target): Add thread delete callback.
2245 * linux-bfin-low.c (the_low_target): Likewise.
2246 * linux-crisv32-low.c (the_low_target): Likewise.
2247 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2248 set.
2249 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2250 field.
2251 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2252 * linux-mips-low.c (mips_linux_delete_thread): New function.
2253 (the_low_target): Add thread delete callback.
2254 * linux-ppc-low.c (the_low_target): Likewise.
2255 * linux-s390-low.c (the_low_target): Likewise.
2256 * linux-sh-low.c (the_low_target): Likewise.
2257 * linux-tic6x-low.c (the_low_target): Likewise.
2258 * linux-tile-low.c (the_low_target): Likewise.
2259 * linux-x86-low.c (the_low_target): Likewise.
2260 * linux-xtensa-low.c (the_low_target): Likewise.
2261
2262 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2263
2264 * win32-low.c: Include "common-inferior.h".
2265
2266 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2267
2268 * inferiors.c (set_inferior_cwd): New function.
2269 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2270 (handle_query): Inform that QSetWorkingDir is supported.
2271 * win32-low.c (create_process): Pass the inferior's cwd to
2272 CreateProcess.
2273
2274 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2275
2276 * inferiors.c (current_inferior_cwd): New global variable.
2277 (get_inferior_cwd): New function.
2278 * inferiors.h (struct process_info) <cwd>: New field.
2279
2280 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2281
2282 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2283 (OBS): Add gdb_tilde_expand.o.
2284
2285 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2286
2287 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2288 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2289
2290 2017-09-29 Pedro Alves <palves@redhat.com>
2291
2292 * ax.c (gdb_parse_agent_expr): Constify.
2293 * ax.h (gdb_parse_agent_expr): Constify.
2294 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2295 Constify.
2296 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2297 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2298 * remote-utils.h (read_ptid): Constify.
2299 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2300 (process_point_options, process_serial_event): Constify.
2301 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2302 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2303 (cmd_qtbuffer): Constify.
2304
2305 2017-09-29 Pedro Alves <palves@redhat.com>
2306
2307 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2308 fails.
2309
2310 2017-09-29 Pedro Alves <palves@redhat.com>
2311
2312 * linux-low.c (handle_extended_wait): Pass parent thread instead
2313 of process to thread_db_notice_clone.
2314 * linux-low.h (thread_db_notice_clone): Replace parent process
2315 parameter with parent thread parameter.
2316 * thread-db.c (find_one_thread): Add comment.
2317 (thread_db_notice_clone): Replace parent process parameter with
2318 parent thread parameter. Temporarily switch to the parent thread.
2319
2320 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2321
2322 * gdbthread.h: Include "common-gdbthread.h".
2323 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2324 "if" when validating the ptid.
2325 * remote-utils.c: Include "gdbthread.h".
2326 (prepare_resume_reply): Use "switch_to_thread".
2327 * target.c (done_accessing_memory): Likewise.
2328
2329 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2330
2331 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2332 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2333 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2334 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2335 s390x-gs-linux64-ipa.o to ipa_obj.
2336 * linux-s390-low.c (HWCAP_S390_GS): New define.
2337 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2338 New functions.
2339 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2340 (s390_arch_setup): Check for guarded-storage support and choose
2341 appropriate tdesc.
2342 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2343 init_registers_s390x_gs_linux64.
2344 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2345 enum value.
2346 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2347 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2348
2349 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2350
2351 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2352
2353 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2354
2355 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2356 (thread_db_thread_handle): Declare.
2357 * linux-low.c (linux_target_ops): Initialize thread_handle.
2358 * server.c (handle_qxfer_threads_worker): Add support for
2359 "handle" attribute.
2360 * target.h (struct target_ops): Add new function pointer,
2361 thread_handle.
2362 (target_thread_handle): Define.
2363 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2364 field in lwp.
2365 (thread_db_thread_handle): New function.
2366
2367 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2368
2369 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2370 * linux-low.h (thread_db_notice_clone): Declare.
2371 * thread-db.c (thread_db_notice_clone): New function.
2372
2373 2017-09-21 Pedro Alves <palves@redhat.com>
2374
2375 * server.c (gdb_read_memory, handle_status, process_serial_event)
2376 (handle_serial_event, handle_target_event): Adjust to
2377 set_desired_thread prototype change.
2378 * target.c (set_desired_thread): Remove 'use_general' parameter
2379 and adjust.
2380 * target.h (set_desired_thread): Remove 'use_general' parameter.
2381
2382 2017-09-20 Tom Tromey <tom@tromey.com>
2383
2384 * target.c (target_terminal::terminal_state): Define.
2385 (target_terminal::init): Rename from target_terminal_init.
2386 (target_terminal::inferior): Rename from
2387 target_terminal_inferior.
2388 (target_terminal::ours): Rename from target_terminal_ours.
2389 (target_terminal::ours_for_output, target_terminal::info): New.
2390
2391 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2392
2393 * server.c (accumulate_file_name_length): Remove.
2394 (emit_dll_description): Adjust to std::string change.
2395 (handle_qxfer_libraries): Use std::string to hold document.
2396
2397 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2398
2399 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2400 return type of xml_escape_text.
2401 * server.c (emit_dll_description): Likewise.
2402
2403 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2404
2405 * server.c (captured_main): Accept argument for --selftest.
2406 Update run_tests call.
2407 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2408 when registering selftests.
2409
2410 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2411
2412 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2413 instead of "VEC" for "target_desc.reg_defs".
2414 (regcache_cpy): Likewise.
2415 (registers_to_string): Likewise.
2416 (registers_from_string): Likewise.
2417 (find_regno): Likewise.
2418 (supply_regblock): Likewise.
2419 (regcache_raw_read_unsigned): Likewise.
2420 * tdesc.c (init_target_desc): Likewise.
2421 (tdesc_create_reg): Likewise.
2422 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2423 (struct target_desc) <reg_defs>: Convert to "std::vector".
2424 (target_desc): Do not initialize "reg_defs".
2425 (~target_desc): Update code to use "std::vector" instead of "VEC"
2426 for "target_desc.reg_defs".
2427 (operator==): Likewise.
2428
2429 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2430
2431 * inferiors.h (thread_to_gdb_id): Remove.
2432 * inferiors.c (thread_to_gdb_id): Remove.
2433 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2434 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2435 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2436 Likewise.
2437 * nto-low.c (nto_fetch_registers, nto_store_registers,
2438 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2439
2440 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2441
2442 * inferiors.h (gdb_id_to_thread_id): Remove.
2443 * inferiors.c (gdb_id_to_thread_id): Remove.
2444 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2445 removal. Move pid declaration closer to where it's used.
2446
2447 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2448
2449 * server.c (handle_detach): New function.
2450 (process_serial_event): Move code out, call handle_detach.
2451
2452 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2453
2454 * server.c (require_running): Rename to ...
2455 (require_running_or_return): ... this ...
2456 (require_running_or_break): ... and this.
2457 (handle_query, process_serial_event): Adjust.
2458
2459 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2460
2461 * linux-low.c (linux_set_resume_request): Remove unused
2462 variables.
2463
2464 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2465
2466 * server.c (first_thread_of): Remove.
2467 (process_serial_event): Replace usage of first_thread_of with
2468 find_any_thread_of_pid.
2469 * tracepoint.c (same_process_p): Remove.
2470 (gdb_agent_about_to_close): Replace usage of same_process_p with
2471 find_any_thread_of_pid.
2472 * linux-x86-low.c (same_process_callback): Remove.
2473 (x86_arch_setup_process_callback): Replace usage of
2474 same_process_callback with find_any_thread_of_pid.
2475 * thread-db.c (any_thread_of): Remove.
2476 (switch_to_process): Replace usage of any_thread_of with
2477 find_any_thread_of_pid.
2478 * inferiors.c (thread_pid_matches_callback): Remove.
2479 (find_thread_process): Adjust to use find_any_thread_of_pid.
2480
2481 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2482
2483 * regcache.c (get_thread_regcache): Guard calls to "memset"
2484 with "!VEC_empty".
2485
2486 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2487
2488 * linux-low.c (handle_extended_wait): Use
2489 "allocate_target_description" instead of "XNEW".
2490 * linux-x86-low.c (initialize_low_arch): Likewise.
2491
2492 2017-09-05 Yao Qi <yao.qi@linaro.org>
2493
2494 * configure.srv (srv_i386_regobj): Remove.
2495 (srv_amd64_regobj): Remove.
2496 (srv_regobj): Set it to "" for x86 non-linux targets.
2497 * linux-x86-tdesc.c (i386_linux_read_description):
2498 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2499 (init_registers_i386): Remove the declaration.
2500 (tdesc_i386): Remove the declaration.
2501 (lynx_i386_arch_setup): Call i386_create_target_description.
2502 * nto-x86-low.c: Likewise.
2503 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2504 [!__x86_64__]: include arch/i386.h.
2505 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2506
2507 2017-09-05 Yao Qi <yao.qi@linaro.org>
2508
2509 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2510 i386/amd64-XXX-linux from it.
2511
2512 2017-09-05 Yao Qi <yao.qi@linaro.org>
2513
2514 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2515 false.
2516 (ipa_amd64_linux_regobj): Remove.
2517 (ipa_x32_linux_regobj): Remove.
2518
2519 2017-09-05 Yao Qi <yao.qi@linaro.org>
2520
2521 * Makefile.in (arch-amd64.o): New rule.
2522 * configure.srv: Append arch-amd64.o.
2523 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2524 (get_ipa_tdesc): Call amd64_linux_read_description.
2525 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2526 and init_registers_amd64_XXX.
2527 * linux-x86-low.c (x86_linux_read_description): Call
2528 amd64_linux_read_description.
2529 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2530 (initialize_low_arch): Don't call init_registers_x32_XXX and
2531 init_registers_amd64_XXX.
2532 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2533 and tdesc_amd64_XXX.
2534 [__x86_64__] (amd64_tdesc_test): New function.
2535 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2536 and init_registers_amd64_XXX.
2537 * linux-x86-tdesc.c: Include arch/amd64.h.
2538 (xcr0_to_tdesc_idx): New function.
2539 (i386_linux_read_description): New function.
2540 (amd64_get_ipa_tdesc_idx): New function.
2541 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2542 (amd64_get_ipa_tdesc): Declare.
2543
2544 2017-09-05 Yao Qi <yao.qi@linaro.org>
2545
2546 * configure.srv (srv_i386_linux_xmlfiles): Remove
2547 i386/i386-XXX-linux.xml from it.
2548
2549 2017-09-05 Yao Qi <yao.qi@linaro.org>
2550
2551 * configure.srv: Set srv_i386_linux_regobj empty if $development
2552 is false.
2553 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2554 initialize_low_tdesc.
2555 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2556 with #if initialize_low_tdesc.
2557 * linux-x86-tdesc-selftest.c: New file.
2558 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2559
2560 2017-09-05 Yao Qi <yao.qi@linaro.org>
2561
2562 * Makefile.in (arch-i386.o): New rule.
2563 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2564 (x86_64-*-linux*): Likewise.
2565 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2566 include arch/i386.h.
2567 (i386_linux_read_description): Remove code and call
2568 i386_create_target_description.
2569 * tdesc.c (allocate_target_description): New function.
2570 * tdesc.h (set_tdesc_architecture): Remove declaration.
2571 (set_tdesc_osabi): Likewise.
2572
2573 2017-09-05 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2576 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2577 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2578 .xmltarget.
2579 * server.c (get_features_xml): Call tdesc_get_features_xml.
2580 * tdesc.c (set_tdesc_architecture): New function.
2581 (set_tdesc_osabi): New function.
2582 (tdesc_get_features_xml): New function.
2583 (tdesc_create_feature): Add an argument.
2584 * tdesc.h (struct target_desc) <features>: New field.
2585 <arch, osabi>: New field.
2586 (~target_desc): xfree features, arch, and osabi.
2587 (target_desc::oerator==): Don't compare .xmltarget.
2588 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2589 (set_tdesc_osabi): Likewise.
2590 (tdesc_get_features_xml): Likewise.
2591
2592 2017-09-05 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-x86-tdesc.c: Include selftest.h.
2595 (i386_tdesc_test): New function.
2596 (initialize_low_tdesc): Call selftests::register_test.
2597 * tdesc.h: Include regdef.h.
2598 (target_desc): Override operator == and !=.
2599
2600 2017-09-05 Yao Qi <yao.qi@linaro.org>
2601
2602 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2603 (ipa_obj): Likewise.
2604 * linux-i386-ipa.c: Include common/x86-xstate.h
2605 (get_ipa_tdesc): Call i386_linux_read_description.
2606 (initialize_low_tracepoint): Don't call init_registers_XXX
2607 functions, call initialize_low_tdesc instead.
2608 * linux-x86-low.c (x86_linux_read_description): Call
2609 i386_linux_read_description.
2610 (initialize_low_arch): Don't call init_registers_i386_XXX
2611 functions, call initialize_low_tdesc.
2612 * linux-x86-tdesc.c: New file.
2613 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2614 (i386_get_ipa_tdesc_idx): Declare.
2615 (i386_get_ipa_tdesc): Declare.
2616 (initialize_low_tdesc): Declare.
2617
2618 2017-09-05 Yao Qi <yao.qi@linaro.org>
2619
2620 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2621 instead of 0.
2622
2623 2017-09-05 Yao Qi <yao.qi@linaro.org>
2624
2625 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2626 * regcache.c (get_thread_regcache): Use VEC_length.
2627 (init_register_cache): Likewise.
2628 (regcache_cpy): Likewise.
2629 (registers_to_string): Iterate reg_defs via VEC_iterate.
2630 (find_regno): Likewise.
2631 (find_register_by_number): Use VEC_index.
2632 (register_size): Call find_register_by_number.
2633 (register_data): Call find_register_by_number.
2634 (supply_regblock): Use VEC_length.
2635 (regcache_raw_read_unsigned): Likewise.
2636 * tdesc.c (init_target_desc): Iterate reg_defs via
2637 VEC_iterate.
2638 (default_description): Update initializer.
2639 (copy_target_description): Don't update field num_registers.
2640 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2641 <num_registers>: Remove.
2642
2643 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2644
2645 * Makefile.in (.SECONDARY): Define target.
2646
2647 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2648
2649 * linux-low.c (linux_wait_1): Adjust.
2650 * server.c (queue_stop_reply_callback): Adjust.
2651
2652 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2653
2654 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2655 QEnvironmentUnset and QEnvironmentReset packets.
2656 (handle_query): Inform remote that QEnvironmentHexEncoded,
2657 QEnvironmentUnset and QEnvironmentReset are supported.
2658
2659 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * inferiors.h (inferior_target_data): Rename to ...
2662 (thread_target_data): ... this.
2663 (inferior_regcache_data): Rename to ...
2664 (thread_regcache_data): ... this.
2665 (set_inferior_regcache_data): Rename to ...
2666 (set_thread_regcache_data): ... this.
2667 * inferiors.c (inferior_target_data): Rename to ...
2668 (thread_target_data): ... this.
2669 (inferior_regcache_data): Rename to ...
2670 (thread_regcache_data): ... this.
2671 (set_inferior_regcache_data): Rename to ...
2672 (set_thread_regcache_data): ... this.
2673 (free_one_thread): Update.
2674 * linux-low.h (get_thread_lwp): Update.
2675 * regcache.c (get_thread_regcache): Update.
2676 (regcache_invalidate_thread): Update.
2677 (free_register_cache_thread): Update.
2678 * win32-i386-low.c (update_debug_registers_callback): Update.
2679 (win32_get_current_dr): Update.
2680 * win32-low.c (thread_rec): Update.
2681 (delete_thread_info): Update.
2682 (continue_one_thread): Update.
2683 (suspend_one_thread): Update.
2684
2685 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2686
2687 * inferiors.c (set_inferior_target_data): Remove.
2688 * inferiors.h (set_inferior_target_data): Remove.
2689
2690 2017-08-18 Yao Qi <yao.qi@linaro.org>
2691
2692 * Makefile.in (OBS): Add selftest.o.
2693 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2694 * configure, config.in: Re-generated.
2695 * server.c: Include common/sefltest.h.
2696 (captured_main): Handle option --selftest.
2697
2698 2017-08-09 Yao Qi <yao.qi@linaro.org>
2699
2700 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2701 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2702 i386-avx-mpx.o and i386-mmx.o.
2703 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2704 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2705 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2706 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2707 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2708 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2709 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2710 i386/amd64-avx-mpx.xml.
2711
2712 2017-08-09 Yao Qi <yao.qi@linaro.org>
2713
2714 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2715 and x32-avx-avx512.o.
2716 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2717 i386/x32-avx-avx512.xml.
2718
2719 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2720
2721 * tracepoint.h (enum class fast_tpoint_collect_result): New
2722 enumeration.
2723 (fast_tracepoint_collecting): Change return type to
2724 fast_tpoint_collect_result.
2725 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2726 * linux-low.h: Include tracepoint.h.
2727 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2728 fast_tpoint_collect_result.
2729 * linux-low.c (handle_tracepoints): Adjust.
2730 (linux_fast_tracepoint_collecting): Change return type to
2731 fast_tpoint_collect_result.
2732 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2733 linux_wait_1, stuck_in_jump_pad_callback,
2734 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2735 proceed_one_lwp): Adjust to type change.
2736
2737 2017-07-10 Yao Qi <yao.qi@linaro.org>
2738
2739 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2740
2741 2017-06-29 Yao Qi <yao.qi@linaro.org>
2742
2743 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2744 Remove.
2745 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2746
2747 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2750
2751 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2752
2753 * linux-low.c (linux_create_inferior): Adjust code to access the
2754 environment information via 'gdb_environ' class.
2755 * lynx-low.c (lynx_create_inferior): Likewise.
2756 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2757 (get_environ): Return a pointer to 'our_environ'.
2758 (captured_main): Initialize 'our_environ'.
2759 * server.h (get_environ): Adjust prototype.
2760 * spu-low.c (spu_create_inferior): Adjust code to access the
2761 environment information via 'gdb_environ' class.
2762
2763 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2764
2765 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2766 usage of "register" keyword.
2767
2768 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * configure: Re-generate.
2771
2772 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2773
2774 * configure: Re-generate.
2775
2776 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2777
2778 * Makefile.in (COMPILE.pre): Add "-x c++".
2779
2780 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2781
2782 * fork-child.c: Conditionally include <signal.h>.
2783
2784 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2785
2786 * server.c (handle_general_set): Handle new packet
2787 "QStartupWithShell".
2788 (handle_query): Add "QStartupWithShell" to the list of supported
2789 packets.
2790 (gdbserver_usage): Add help text explaining the
2791 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2792 options.
2793 (captured_main): Recognize and act upon the presence of the new
2794 CLI options.
2795
2796 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2797 Pedro Alves <palves@redhat.com>
2798
2799 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2800 * configure: Regenerate.
2801 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2802 "fork-inferior.o".
2803 (i[34567]86-*-lynxos*): Likewise.
2804 (spu*-*-*): Likewise.
2805 * fork-child.c: New file.
2806 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2807 and "environ.h".
2808 (linux_ptrace_fun): New function.
2809 (linux_create_inferior): Adjust function prototype to reflect
2810 change on "target.h". Adjust function code to use
2811 "fork_inferior".
2812 (linux_request_interrupt): Delete "signal_pid".
2813 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2814 (lynx_ptrace_fun): New function.
2815 (lynx_create_inferior): Adjust function prototype to reflect
2816 change on "target.h". Adjust function code to use
2817 "fork_inferior".
2818 * nto-low.c (nto_create_inferior): Adjust function prototype and
2819 code to reflect change on "target.h". Update comments.
2820 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2821 "common-terminal.h" and "environ.h".
2822 (terminal_fd): Moved to fork-child.c.
2823 (old_foreground_pgrp): Likewise.
2824 (restore_old_foreground_pgrp): Likewise.
2825 (last_status): Make it global.
2826 (last_ptid): Likewise.
2827 (our_environ): New variable.
2828 (startup_with_shell): Likewise.
2829 (program_name): Likewise.
2830 (program_argv): Rename to...
2831 (program_args): ...this.
2832 (wrapper_argv): New variable.
2833 (start_inferior): Delete function.
2834 (get_exec_wrapper): New function.
2835 (get_exec_file): Likewise.
2836 (get_environ): Likewise.
2837 (prefork_hook): Likewise.
2838 (post_fork_inferior): Likewise.
2839 (postfork_hook): Likewise.
2840 (postfork_child_hook): Likewise.
2841 (handle_v_run): Update code to deal with arguments coming from the
2842 remote host. Update calls from "start_inferior" to
2843 "create_inferior".
2844 (captured_main): Likewise. Initialize environment variable. Call
2845 "have_job_control".
2846 * server.h (post_fork_inferior): New prototype.
2847 (get_environ): Likewise.
2848 (last_status): Declare.
2849 (last_ptid): Likewise.
2850 (signal_pid): Likewise.
2851 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2852 (spu_ptrace_fun): New function.
2853 (spu_create_inferior): Adjust function prototype to reflect change
2854 on "target.h". Adjust function code to use "fork_inferior".
2855 * target.c (target_terminal_init): New function.
2856 (target_terminal_inferior): Likewise.
2857 (target_terminal_ours): Likewise.
2858 * target.h: Include <vector>.
2859 (struct target_ops) <create_inferior>: Update prototype.
2860 (create_inferior): Update macro.
2861 * utils.c (gdb_flush_out_err): New function.
2862 * win32-low.c (win32_create_inferior): Adjust function prototype
2863 and code to reflect change on "target.h".
2864
2865 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2866
2867 * inferiors.c (switch_to_thread): New function.
2868
2869 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2870
2871 * Makefile.in (SFILE): Add "common/job-control.c".
2872 (OBS): Add "job-control.o".
2873
2874 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2875
2876 * Makefile: Remove "@host_makefile_frag@".
2877
2878 2017-05-05 Pedro Alves <palves@redhat.com>
2879
2880 * configure: Regenerate.
2881
2882 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2883
2884 * configure: Regenerate.
2885
2886 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2887
2888 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2889 software_single_step change of return type to
2890 std::vector<CORE_ADDR>.
2891 * linux-low.c (install_software_single_step_breakpoints):
2892 Likewise.
2893 * linux-low.h (install_software_single_step_breakpoints):
2894 Likewise.
2895
2896 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2897
2898 * remote-utils.c: Include "gdb_termios.h" instead of
2899 "terminal.h".
2900 * terminal.h: Delete file.
2901
2902 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2903
2904 * server.c: Include <vector>.
2905 <program_argv, wrapper_argv>: Convert to std::vector.
2906 (start_inferior): Rewrite function to use C++.
2907 (handle_v_run): Likewise. Update code that calculates the argv
2908 based on the vRun packet; use C++.
2909 (captured_main): Likewise.
2910
2911 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2912
2913 * server.c (handle_v_cont): Initialize thread_resume::thread
2914 with null_ptid.
2915
2916 2017-04-05 Pedro Alves <palves@redhat.com>
2917
2918 * configure: Regenerate.
2919
2920 2017-04-05 Pedro Alves <palves@redhat.com>
2921
2922 * gdbreplay.c (sync_error): Constify.
2923 * linux-x86-low.c (push_opcode): Constify.
2924
2925 2017-04-05 Pedro Alves <palves@redhat.com>
2926
2927 * win32-low.c (get_child_debug_event)
2928 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2929 Report TARGET_WAITKIND_SPURIOUS instead.
2930
2931 2017-04-05 Pedro Alves <palves@redhat.com>
2932
2933 * remote-utils.c (remote_prepare, remote_open): Constify.
2934 * remote-utils.h (remote_prepare, remote_open): Constify.
2935 * server.c (captured_main): Constify 'port' handling.
2936
2937 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * Makefile.in (clean): Clear .deps.
2940
2941 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * .gitignore: Remove generated files, replace with wildcard.
2944 * (clean): Replace removal of generated files with wildcard.
2945 (version.c): Replace with...
2946 (version-generated.c): ...this.
2947 (xml-builtin.c): Replace with...
2948 (xml-builtin-generated.c): ...this.
2949 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2950 (%.c: *regformats*): Replace with...
2951 (%-generated.c: *regformats*): ...this.
2952
2953 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2954
2955 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2956 (xtensa_fill_gregset): Call collect_register_by_name for
2957 threadptr register.
2958 (xtensa_store_gregset): Call supply_register_by_name for
2959 threadptr register.
2960
2961 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2962
2963 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2964 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2965 (xtensa_store_gregset): Call supply_register for all registers in
2966 a0_regnum..a0_regnum + C0_NREGS range.
2967
2968 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2969
2970 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2971 (ax-ipa.o: ax.c): Remove.
2972 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2973 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2974 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2975 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2976 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2977
2978 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2979
2980 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2981 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2982 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2983 (errors-ipa.o: ../common/errors.c): Remove.
2984 (format-ipa.o: ../common/format.c): Remove.
2985 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2986
2987 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2988
2989 * Makefile.in (%-ipa.o: %.c): New rule.
2990 (tracepoint-ipa.o: tracepoint.c): Remove.
2991 (utils-ipa.o: utils.c): Remove.
2992 (remote-utils-ipa.o: remote-utils.c): Remove.
2993 (regcache-ipa.o: regcache.c): Remove.
2994 (i386-linux-ipa.o: i386-linux.c): Remove.
2995 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2996 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2997 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2998 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2999 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3000 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3001 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3002 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3003 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3004 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3005 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3006 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3007 (aarch64-ipa.o: aarch64.c): Remove.
3008 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3009 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3010 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3011 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3012 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3013 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3014 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3015 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3016 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3017 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3018 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3019 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3020 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3021 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3022 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3023 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3024 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3025 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3026 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3027 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3028 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3029 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3030 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3031 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3032 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3033 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3034 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3035 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3036 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3037 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3038 (tdesc-ipa.o: tdesc.c): Remove.
3039 (x32-linux-ipa.o: x32-linux.c): Remove.
3040 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3041 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3042
3043 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3044
3045 * Makefile.in (%.o: ../arch/%.c): New rule.
3046 (arm.o: ../arch/arm.c): Remove.
3047 (arm-linux.o: ../arch/arm-linux.c): Remove.
3048 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3049 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3050
3051 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3052
3053 * Makefile.in (%.o: ../nat/%.c): New rule.
3054 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3055 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3056 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3057 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3058 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3059 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3060 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3061 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3062 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3063 (linux-personality.o: ../nat/linux-personality.c): Remove.
3064 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3065 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3066 (x86-linux.o: ../nat/x86-linux.c): Remove.
3067 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3068 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3069
3070 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3071
3072 * Makefile.in (%.o: ../common/%.c): New rule.
3073 (signals.o: ../common/signals.c): Remove.
3074 (print-utils.o: ../common/print-utils.c): Remove.
3075 (rsp-low.o: ../common/rsp-low.c): Remove.
3076 (common-utils.o: ../common/common-utils.c): Remove.
3077 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3078 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3079 (vec.o: ../common/vec.c): Remove.
3080 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3081 (xml-utils.o: ../common/xml-utils.c): Remove.
3082 (ptid.o: ../common/ptid.c): Remove.
3083 (buffer.o: ../common/buffer.c): Remove.
3084 (format.o: ../common/format.c): Remove.
3085 (filestuff.o: ../common/filestuff.c): Remove.
3086 (agent.o: ../common/agent.c): Remove.
3087 (errors.o: ../common/errors.c): Remove.
3088 (environ.o: ../common/environ.c): Remove.
3089 (common-debug.o: ../common/common-debug.c): Remove.
3090 (cleanups.o: ../common/cleanups.c): Remove.
3091 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3092 (fileio.o: ../common/fileio.c): Remove.
3093 (common-regcache.o: ../common/common-regcache.c): Remove.
3094 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3095 (new-op.o: ../common/new-op.c): Remove.
3096 (btrace-common.o: ../common/btrace-common.c): Remove.
3097
3098 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3099
3100 * Makefile.in (%.o: ../target/%.c): New rule.
3101 (waitstatus.o: ../target/waitstatus.c): Remove.
3102
3103 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3104
3105 * Makefile.in
3106 (%.c: ../regformats/%.dat,
3107 (%.c: ../regformats/arm/%.dat,
3108 (%.c: ../regformats/i386/%.dat,
3109 (%.c: ../regformats/rs6000/%.dat): New rules.
3110 (aarch64.c): Remove.
3111 (reg-arm.c): Remove.
3112 (arm-with-iwmmxt.c): Remove.
3113 (arm-with-vfpv2.c): Remove.
3114 (arm-with-vfpv3.c): Remove.
3115 (arm-with-neon.c): Remove.
3116 (reg-bfin.c): Remove.
3117 (reg-cris.c): Remove.
3118 (reg-crisv32.c): Remove.
3119 (i386.c): Remove.
3120 (i386-linux.c): Remove.
3121 (i386-avx.c): Remove.
3122 (i386-avx-linux.c): Remove.
3123 (i386-avx-avx512.c): Remove.
3124 (i386-avx-avx512-linux.c): Remove.
3125 (i386-mpx.c): Remove.
3126 (i386-mpx-linux.c): Remove.
3127 (i386-avx-mpx-avx512-pku.c): Remove.
3128 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3129 (i386-avx-mpx.c): Remove.
3130 (i386-avx-mpx-linux.c): Remove.
3131 (i386-mmx.c): Remove.
3132 (i386-mmx-linux.c): Remove.
3133 (reg-ia64.c): Remove.
3134 (reg-m32r.c): Remove.
3135 (reg-m68k.c): Remove.
3136 (reg-cf.c): Remove.
3137 (mips-linux.c): Remove.
3138 (mips-dsp-linux.c): Remove.
3139 (mips64-linux.c): Remove.
3140 (mips64-dsp-linux.c): Remove.
3141 (nios2-linux.c): Remove.
3142 (powerpc-32.c): Remove.
3143 (powerpc-32l.c): Remove.
3144 (powerpc-altivec32l.c): Remove.
3145 (powerpc-cell32l.c): Remove.
3146 (powerpc-vsx32l.c): Remove.
3147 (powerpc-isa205-32l.c): Remove.
3148 (powerpc-isa205-altivec32l.c): Remove.
3149 (powerpc-isa205-vsx32l.c): Remove.
3150 (powerpc-e500l.c): Remove.
3151 (powerpc-64l.c): Remove.
3152 (powerpc-altivec64l.c): Remove.
3153 (powerpc-cell64l.c): Remove.
3154 (powerpc-vsx64l.c): Remove.
3155 (powerpc-isa205-64l.c): Remove.
3156 (powerpc-isa205-altivec64l.c): Remove.
3157 (powerpc-isa205-vsx64l.c): Remove.
3158 (s390-linux32.c): Remove.
3159 (s390-linux32v1.c): Remove.
3160 (s390-linux32v2.c): Remove.
3161 (s390-linux64.c): Remove.
3162 (s390-linux64v1.c): Remove.
3163 (s390-linux64v2.c): Remove.
3164 (s390-te-linux64.c): Remove.
3165 (s390-vx-linux64.c): Remove.
3166 (s390-tevx-linux64.c): Remove.
3167 (s390x-linux64.c): Remove.
3168 (s390x-linux64v1.c): Remove.
3169 (s390x-linux64v2.c): Remove.
3170 (s390x-te-linux64.c): Remove.
3171 (s390x-vx-linux64.c): Remove.
3172 (s390x-tevx-linux64.c): Remove.
3173 (tic6x-c64xp-linux.c): Remove.
3174 (tic6x-c64x-linux.c): Remove.
3175 (tic6x-c62x-linux.c): Remove.
3176 (reg-sh.c): Remove.
3177 (reg-sparc64.c): Remove.
3178 (reg-spu.c): Remove.
3179 (amd64.c): Remove.
3180 (amd64-linux.c): Remove.
3181 (amd64-avx.c): Remove.
3182 (amd64-avx-linux.c): Remove.
3183 (amd64-avx-avx512.c): Remove.
3184 (amd64-avx-avx512-linux.c): Remove.
3185 (amd64-mpx.c): Remove.
3186 (amd64-mpx-linux.c): Remove.
3187 (amd64-avx-mpx-avx512-pku.c): Remove.
3188 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3189 (amd64-avx-mpx.c): Remove.
3190 (amd64-avx-mpx-linux.c): Remove.
3191 (x32.c): Remove.
3192 (x32-linux.c): Remove.
3193 (x32-avx.c): Remove.
3194 (x32-avx-linux.c): Remove.
3195 (x32-avx-avx512.c): Remove.
3196 (x32-avx-avx512-linux.c): Remove.
3197 (reg-xtensa.c): Remove.
3198 (reg-tilegx.c): Remove.
3199 (reg-tilegx32.c): Remove.
3200
3201 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3202
3203 * Makefile.in (SFILES): Add "common/environ.c".
3204 (OBJS): Add "common/environ.h".
3205
3206 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3207
3208 * configure.ac: Check if the fs_base and gs_base members of
3209 `struct user_regs_struct' exist.
3210 * config.in: Regenerated.
3211 * configure: Likewise.
3212
3213 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3214
3215 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3216 target_read_memory.
3217 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3218 (get_next_pcs_syscall_next_pc): Likewise.
3219
3220 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3221
3222 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3223 * nto-x86-low.c: Likewise.
3224
3225 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3226
3227 * Makefile.in: Include disable-implicit-rules.mk.
3228
3229 2016-11-23 Pedro Alves <palves@redhat.com>
3230
3231 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3232 (debug_vprintf): Use std::chrono::steady_clock instead of
3233 gettimeofday. Use '.' instead of ':'.
3234 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3235 (get_timestamp): Use std::chrono::steady_clock instead of
3236 gettimeofday.
3237
3238 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3239
3240 * Makefile.in: Fix whitespace formatting.
3241
3242 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3243
3244 * Makefile.in (SFILES, OBS): Flatten list and order
3245 alphabetically.
3246
3247 2016-11-23 Pedro Alves <palves@redhat.com>
3248
3249 * event-loop.c (handle_file_event): Use warning.
3250 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3251 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3252 Use warning.
3253
3254 2016-11-23 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3257 output.
3258 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3259 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3260 debug_printf and debug_flush for debug output.
3261 * server.c (handle_general_set): Likewise.
3262 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3263 output.
3264
3265 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3266
3267 * Makefile.in (.c.o): Replace rule with ...
3268 (%.o: %.c): ... this one.
3269
3270 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3271
3272 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3273 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3274 make.
3275 * configure.ac: Remove checks for the make program.
3276 * configure: Re-generate.
3277
3278 2016-10-28 Pedro Alves <palves@redhat.com>
3279
3280 * Makefile.in (CXX_DIALECT): Get from configure.
3281 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3282 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3283 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3284 * config.in: Regenerate.
3285 * configure: Regenerate.
3286
3287 2016-10-27 Yao Qi <yao.qi@linaro.org>
3288
3289 * linux-low.c (linux_supports_range_stepping): Return true if
3290 can_software_single_step return true.
3291
3292 2016-10-27 Yao Qi <yao.qi@linaro.org>
3293
3294 * inferiors.c (find_inferior_in_random): New function.
3295 * inferiors.h (find_inferior_in_random): Declare.
3296 * linux-low.c (linux_wait_for_event_filtered): Call
3297 find_inferior_in_random instead of find_inferior.
3298
3299 2016-10-27 Yao Qi <yao.qi@linaro.org>
3300
3301 * linux-low.c (linux_wait_1): If single-step breakpoints are
3302 inserted, remove them.
3303
3304 2016-10-26 Pedro Alves <palves@redhat.com>
3305
3306 * linux-low.c (handle_extended_wait): Link parent/child fork
3307 threads.
3308 (linux_wait_1): Unlink them.
3309 (linux_set_resume_request): Ignore resume requests for
3310 already-resumed and unhandled fork child threads.
3311 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3312 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3313 New functions.
3314 (handle_v_requests) <vCont>: Don't call require_running.
3315 * server.h (in_queued_stop_replies): New declaration.
3316
3317 2016-10-24 Yao Qi <yao.qi@linaro.org>
3318
3319 PR server/20733
3320 * linux-aarch64-low.c (append_insns): Cast the return value to
3321 'uint32_t *'.
3322
3323 2016-10-10 Yao Qi <yao.qi@linaro.org>
3324
3325 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3326
3327 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3328
3329 * target.c (target_supports_multi_process): New function, moved
3330 from...
3331 * target.h (target_supports_multi_process): ... here. Remove
3332 macro.
3333
3334 2016-10-05 Tom Tromey <tom@tromey.com>
3335
3336 PR remote/20655:
3337 * tracepoint.c (handle_tracepoint_bkpts): Check
3338 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3339
3340 2016-10-05 Yao Qi <yao.qi@linaro.org>
3341
3342 * configure.srv: Update the path of arm-*.xml files.
3343
3344 2016-10-05 Terry Guo <terry.guo@arm.com>
3345 Yao Qi <yao.qi@linaro.org>
3346
3347 * Makefile.in: Adjust the path of rules.
3348 * configure.srv: Update the path of xml files.
3349 * regformats/arm-with-iwmmxt.dat: Regenerated.
3350 * regformats/arm-with-neon.dat: Likewise.
3351 * regformats/arm-with-vfpv2.dat: Likewise.
3352 * regformats/arm-with-vfpv3.dat Likewise.
3353
3354 2016-09-30 Yao Qi <yao.qi@linaro.org>
3355
3356 PR gdbserver/20627
3357 * target.c (target_stop_and_wait): Don't call
3358 target_continue_no_signal, use resume_stop instead.
3359
3360 2016-09-26 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-low.c (linux_wait_1): Call debug_exit.
3363
3364 2016-09-23 Pedro Alves <palves@redhat.com>
3365
3366 * Makefile.in (SFILES): Add common/new-op.c.
3367 (OBS): Add common/new-op.o.
3368 (new-op.o): New rule.
3369
3370 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3371
3372 * .gitinore: Ignore more files.
3373
3374 2016-09-21 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3377 23.
3378
3379 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3380
3381 * server.c (start_inferior): Call target_mourn_inferior instead of
3382 mourn_inferior; pass ptid_t argument to it.
3383 (resume): Likewise.
3384 (handle_target_event): Likewise.
3385 * target.c (target_mourn_inferior): New function.
3386 * target.h (mourn_inferior): Delete macro.
3387
3388 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3389
3390 * linux-low.c (lwp_is_stepping): New function.
3391
3392 2016-09-06 Carl Love <cel@us.ibm.com>
3393
3394 * server.c (start_inferior): Fixed comment, requested comment change
3395 didn't get updated correctly. Removed reference to ptrace () call as
3396 it is only true on Linux systems.
3397
3398 2016-09-06 Carl Love <cel@us.ibm.com>
3399
3400 * server.c (start_inferior): Do not call
3401 function target_post_create_inferior () if the
3402 inferior process has already exited.
3403
3404 2016-09-05 Pedro Alves <palves@redhat.com>
3405
3406 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3407 (COMPILE.pre, CC_LD): Use CXX directly.
3408 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3409 * acinclude.m4: Don't include build-with-cxx.m4.
3410 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3411 * configure: Regenerate.
3412
3413 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3414
3415 PR gdb/19495
3416 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3417 call writing data to own_buf.
3418
3419 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3420
3421 * target.c (mywait): Call target_wait instead of
3422 the_target->wait.
3423 (target_wait): New function.
3424
3425 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3426
3427 * server.c (start_inferior): New variable 'ptid'. Replace calls
3428 to the_target->resume by target_continue{,_no_signal}, depending
3429 on the case.
3430 * target.c (target_stop_and_wait): Call target_continue_no_signal
3431 instead of the_target->resume.
3432 (target_continue): New function.
3433
3434 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3435
3436 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3437
3438 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3439
3440 PR server/20491
3441 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3442 ps_prochandle.
3443 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3444 * linux-arm-low.c (ps_get_thread_area): Likewise.
3445 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3446 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3447 * linux-mips-low.c (ps_get_thread_area): Likewise.
3448 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3449 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3450 * linux-x86-low.c (ps_get_thread_area): Likewise.
3451 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3452
3453 2016-08-19 Pedro Alves <palves@redhat.com>
3454
3455 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3456
3457 2016-08-19 Pedro Alves <palves@redhat.com>
3458
3459 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3460 comment. Use memcpy instead of casting through unsigned long.
3461
3462 2016-08-19 Pedro Alves <palves@redhat.com>
3463
3464 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3465 allocating around 0x80000000.
3466
3467 2016-08-19 Pedro Alves <palves@redhat.com>
3468
3469 PR gdb/20415
3470 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3471 (x32-avx512-linux-ipa.o): New rules.
3472 * configure.ac (x86_64-*-linux*): New x32 check.
3473 * configure.srv (ipa_x32_linux_regobj): New.
3474 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3475 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3476 descriptions.
3477 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3478 descriptions.
3479 * configure: Regenerate.
3480
3481 2016-08-09 Pedro Alves <palves@redhat.com>
3482
3483 PR gdb/18653
3484 * Makefile.in (OBS): Add signals-state-save-restore.o.
3485 (signals-state-save-restore.o): New rule.
3486 * config.in: Regenerate.
3487 * configure: Regenerate.
3488 * linux-low.c: Include "signals-state-save-restore.h".
3489 (linux_create_inferior): Call
3490 restore_original_signals_state.
3491 * server.c: Include "dispositions-save-restore.h".
3492 (captured_main): Call save_original_signals_state.
3493
3494 2016-08-05 Pedro Alves <palves@redhat.com>
3495
3496 * configure: Regenerate.
3497
3498 2016-08-04 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-low.c (regsets_fetch_inferior_registers): Check
3501 errno is ESRCH or not.
3502
3503 2016-08-02 Yao Qi <yao.qi@linaro.org>
3504
3505 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3506 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3507 (thread_db_load_search): Update.
3508 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3509 td_ta_set_event and td_ta_event_getmsg.
3510
3511 2016-07-26 Pedro Alves <palves@redhat.com>
3512
3513 PR server/20414
3514 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3515 of unsigned long for 64-bit registers and use uint32_t instead of
3516 unsigned int for 32-bit registers.
3517
3518 2016-07-26 Pedro Alves <palves@redhat.com>
3519
3520 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3521 to 'ptrace'.
3522
3523 2016-07-21 Tom Tromey <tom@tromey.com>
3524
3525 * configure: Rebuild.
3526
3527 2016-07-21 Yao Qi <yao.qi@linaro.org>
3528
3529 * mem-break.c (find_gdb_breakpoint): Cast bp to
3530 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3531
3532 2016-07-21 Yao Qi <yao.qi@linaro.org>
3533
3534 * server.c (handle_v_requests): Support s and S actions
3535 if target_supports_software_single_step return true.
3536
3537 2016-07-21 Yao Qi <yao.qi@linaro.org>
3538
3539 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3540 is resume_step, call maybe_hw_step.
3541 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3542 and unstop them.
3543 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3544 breakpoints or not.
3545 (proceed_one_lwp): If resume request is resume_step, install
3546 reinsert breakpoints and call maybe_hw_step.
3547
3548 2016-07-21 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-low.c (proceed_one_lwp): Declare.
3551 (linux_resume_one_thread): Remove local variable 'step'.
3552 Lift code enqueue signal. Call proceed_one_lwp instead of
3553 linux_resume_one_lwp.
3554
3555 2016-07-21 Yao Qi <yao.qi@linaro.org>
3556
3557 * linux-low.c (linux_resume_one_thread): Call
3558 enqueue_pending_signal.
3559
3560 2016-07-21 Yao Qi <yao.qi@linaro.org>
3561
3562 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3563 * inferiors.c (do_restore_current_thread_cleanup): New function.
3564 (make_cleanup_restore_current_thread): Likewise.
3565 * linux-low.c (install_software_single_step_breakpoints): Call
3566 make_cleanup_restore_current_thread. Switch current_thread to
3567 thread.
3568
3569 2016-07-21 Yao Qi <yao.qi@linaro.org>
3570
3571 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3572 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3573 (clone_one_breakpoint): Likewise.
3574 (delete_reinsert_breakpoints): Change parameter to thread.
3575 Callers updated.
3576 (has_reinsert_breakpoints): Likewise.
3577 (uninsert_reinsert_breakpoints): Likewise.
3578 (reinsert_reinsert_breakpoints): Likewise.
3579 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3580 (delete_reinsert_breakpoints): Likewise.
3581 (reinsert_reinsert_breakpoints): Likewise.
3582 (uninsert_reinsert_breakpoints): Likewise.
3583 (has_reinsert_breakpoints): Likewise.
3584
3585 2016-07-21 Yao Qi <yao.qi@linaro.org>
3586
3587 * inferiors.c (get_thread_process): Make parameter const.
3588 * inferiors.h (get_thread_process): Update declaration.
3589 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3590 Add new parameters child_thread and parent_thread. Callers
3591 updated.
3592 * mem-break.h (clone_all_breakpoints): Update declaration.
3593
3594 2016-07-21 Yao Qi <yao.qi@linaro.org>
3595
3596 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3597 <command_list, handler>: Remove.
3598 (struct gdb_breakpoint): New.
3599 (struct other_breakpoint): New.
3600 (struct reinsert_breakpoint): New.
3601 (is_gdb_breakpoint): New function.
3602 (any_persistent_commands): Update command_list if
3603 is_gdb_breakpoint returns true.
3604 (set_breakpoint): Create breakpoints according to their types.
3605 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3606 (set_gdb_breakpoint_1): Likewise.
3607 (set_gdb_breakpoint): Likewise.
3608 (clear_breakpoint_conditions): Change parameter type to
3609 'struct gdb_breakpoint *'.
3610 (clear_breakpoint_commands): Likewise.
3611 (clear_breakpoint_conditions_and_commands): Likewise.
3612 (add_condition_to_breakpoint): Likewise.
3613 (add_breakpoint_condition): Likewise.
3614 (add_commands_to_breakpoint): Likewise.
3615 (check_breakpoints): Check other_breakpoint.
3616 (clone_one_breakpoint): Clone breakpopint according to its type.
3617 * mem-break.h (struct gdb_breakpoint): Declare.
3618 (set_gdb_breakpoint): Update declaration.
3619 (clear_breakpoint_conditions_and_commands): Likewise.
3620 (add_breakpoint_condition): Likewise.
3621 (add_breakpoint_commands): Likewise.
3622 * server.c (process_point_options): Change parameter type to
3623 'struct gdb_breakpoint *'.
3624
3625 2016-07-21 Yao Qi <yao.qi@linaro.org>
3626
3627 * mem-break.c (set_breakpoint_at): Rename it to ...
3628 (set_breakpoint_type_at): ... it.
3629 (set_breakpoint_at): Call set_breakpoint_type_at.
3630 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3631 * mem-break.h (set_breakpoint_at): Update comments.
3632
3633 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3634
3635 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3636 to buf parameter.
3637 (nios2_store_gregset): Likewise.
3638
3639 2016-07-01 Pedro Alves <palves@redhat.com>
3640 Antoine Tremblay <antoine.tremblay@ericsson.com>
3641
3642 * linux-low.c: Change interface to take the target lwp_info
3643 pointer directly and return void. Handle detaching from a zombie
3644 thread.
3645 (linux_detach_lwp_callback): New function.
3646 (linux_detach): Detach from the leader thread after detaching from
3647 the clone threads.
3648
3649 2016-06-28 Yao Qi <yao.qi@linaro.org>
3650
3651 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3652 for variable new_offset.
3653 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3654 (aarch64_ftrace_insn_reloc_cb): Likewise.
3655 (aarch64_ftrace_insn_reloc_tb): Likewise.
3656 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3657 PRIx64 instead of PRIx32.
3658
3659 2016-06-28 Yao Qi <yao.qi@linaro.org>
3660
3661 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3662 (the_low_target): Install arm_get_syscall_trapinfo.
3663
3664 2016-06-28 Yao Qi <yao.qi@linaro.org>
3665
3666 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3667 function.
3668 (the_low_target): Install aarch64_get_syscall_trapinfo.
3669
3670 2016-06-28 Yao Qi <yao.qi@linaro.org>
3671
3672 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3673 Callers updated.
3674 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3675 Remove parameter sysno.
3676 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3677 sysret.
3678
3679 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3680
3681 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3682 (s390_emit_ne_goto): Likewise.
3683 (s390_emit_lt_goto): Likewise.
3684 (s390_emit_le_goto): Likewise.
3685 (s390_emit_gt_goto): Likewise.
3686 (s390_emit_ge_goto): Likewise.
3687 (s390x_emit_eq_goto): Likewise.
3688 (s390x_emit_ne_goto): Likewise.
3689 (s390x_emit_lt_goto): Likewise.
3690 (s390x_emit_le_goto): Likewise.
3691 (s390x_emit_gt_goto): Likewise.
3692 (s390x_emit_ge_goto): Likewise.
3693 (s390_emit_ops_impl): Mark variable static.
3694 (s390x_emit_ops): Likewise.
3695
3696 2016-06-17 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-low.c (handle_extended_wait): Call
3699 uninsert_reinsert_breakpoints for the parent process. Remove
3700 reinsert breakpoints from the child process. Reinsert them to
3701 the parent process when vfork is done.
3702 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3703 (reinsert_reinsert_breakpoints): New function.
3704 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3705 (reinsert_reinsert_breakpoints): Declare.
3706
3707 2016-06-17 Yao Qi <yao.qi@linaro.org>
3708
3709 * linux-low.c (handle_extended_wait): If the parent is doing
3710 step-over, remove the reinsert breakpoints from the forked child.
3711
3712 2016-06-17 Yao Qi <yao.qi@linaro.org>
3713
3714 * linux-low.c (unsuspend_all_lwps): Declare.
3715 (linux_low_filter_event): If thread exited, call finish_step_over.
3716 If step-over is finished, unsuspend other threads.
3717
3718 2016-06-17 Yao Qi <yao.qi@linaro.org>
3719
3720 * linux-low.c (linux_resume_one_lwp_throw): Assert
3721 has_reinsert_breakpoints returns false.
3722 * mem-break.c (delete_disabled_breakpoints): Assert
3723 bp type isn't reinsert_breakpoint.
3724
3725 2016-06-17 Yao Qi <yao.qi@linaro.org>
3726
3727 * linux-low.c (maybe_hw_step): New function.
3728 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3729 (finish_step_over): Switch current_thread to lwp temporarily,
3730 and assert has_reinsert_breakpoints returns true.
3731 (proceed_one_lwp): Call maybe_hw_step.
3732 * mem-break.c (has_reinsert_breakpoints): New function.
3733 * mem-break.h (has_reinsert_breakpoints): Declare.
3734
3735 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3736
3737 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3738
3739 2016-05-17 Yao Qi <yao.qi@linaro.org>
3740
3741 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3742 instead of find_inferior.
3743
3744 2016-05-05 Yao Qi <yao.qi@linaro.org>
3745
3746 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3747 Initialize res to zero.
3748
3749 2016-05-05 Yao Qi <yao.qi@linaro.org>
3750
3751 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3752 to uint32_t.
3753
3754 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3755
3756 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3757 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3758 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3759
3760 2016-04-28 Par Olsson <par.olsson@windriver.com>
3761 Simon Marchi <simon.marchi@ericsson.com>
3762
3763 * tracepoint.c (write_inferior_int8): New function.
3764 (cmd_qtenable_disable): Write enable flag using
3765 write_inferior_int8.
3766
3767 2016-04-25 Yao Qi <yao.qi@linaro.org>
3768
3769 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3770 (need_step_over_p): Return zero if the LWP has pending signals
3771 can be delivered on software single step target.
3772
3773 2016-04-25 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3776 return instead of error.
3777
3778 2016-04-22 Yao Qi <yao.qi@linaro.org>
3779
3780 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3781 to 23.
3782
3783 2016-04-22 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3786 signal when stepping over breakpoint with software single
3787 step.
3788
3789 2016-04-21 Pedro Alves <palves@redhat.com>
3790
3791 * linux-s390-low.c (s390_collect_ptrace_register)
3792 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3793 add casts.
3794 (s390_check_regset): Use void * instead of gdb_byte *.
3795
3796 2016-04-20 Pedro Alves <palves@redhat.com>
3797
3798 * configure: Renegerate.
3799
3800 2016-04-20 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3803 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3804 number 16.
3805 (arm_store_gregset): Likewise.
3806
3807 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3808
3809 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3810 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3811 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3812 (amd64-avx-mpx-linux.c): New rules.
3813 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3814 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3815 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3816 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3817 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3818 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3819 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3820 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3821 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3822 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3823 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3824 * linux-x86-low.c (x86_linux_read_description): Add case for
3825 X86_XSTATE_AVX_MPX_MASK.
3826 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3827 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3828 init_registers_i386_avx_mpx_linux.
3829 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3830 (initialize_low_tracepoint): Call
3831 init_registers_i386_avx_mpx_linux.
3832 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3833 (initialize_low_tracepoint): Call
3834 init_registers_amd64_avx_mpx_linux.
3835 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3836 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3837 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3838 declarations.
3839
3840 2016-04-18 Pedro Alves <palves@redhat.com>
3841
3842 * configure: Regenerate.
3843
3844 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3845
3846 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3847 (aarch64_emit_sub): Likewise.
3848
3849 2016-04-12 Pedro Alves <palves@redhat.com>
3850
3851 * utils.c (prepare_to_throw_exception): Delete.
3852
3853 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3854
3855 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3856
3857 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3858
3859 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3860
3861 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3862
3863 * linux-aarch64-ipa.c: Add <elf.h> include.
3864 * linux-ppc-ipa.c: Add <elf.h> include.
3865 * linux-s390-ipa.c: Add <elf.h> include.
3866
3867 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3868
3869 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3870 (get_raw_reg_ptr): Likewise.
3871 (get_trace_state_variable_value_ptr): Likewise.
3872 (set_trace_state_variable_value_ptr): Likewise.
3873 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3874 char *.
3875
3876 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3877 Marcin Kościelnicki <koriakin@0x04.net>
3878
3879 PR/17221
3880 * linux-ppc-low.c (emit_insns): New function.
3881 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3882 (ppc_emit_prologue): New function.
3883 (ppc_emit_epilogue): New function.
3884 (ppc_emit_add): New function.
3885 (ppc_emit_sub): New function.
3886 (ppc_emit_mul): New function.
3887 (ppc_emit_lsh): New function.
3888 (ppc_emit_rsh_signed): New function.
3889 (ppc_emit_rsh_unsigned): New function.
3890 (ppc_emit_ext): New function.
3891 (ppc_emit_zero_ext): New function.
3892 (ppc_emit_log_not): New function.
3893 (ppc_emit_bit_and): New function.
3894 (ppc_emit_bit_or): New function.
3895 (ppc_emit_bit_xor): New function.
3896 (ppc_emit_bit_not): New function.
3897 (ppc_emit_equal): New function.
3898 (ppc_emit_less_signed): New function.
3899 (ppc_emit_less_unsigned): New function.
3900 (ppc_emit_ref): New function.
3901 (ppc_emit_const): New function.
3902 (ppc_emit_reg): New function.
3903 (ppc_emit_pop): New function.
3904 (ppc_emit_stack_flush): New function.
3905 (ppc_emit_swap): New function.
3906 (ppc_emit_stack_adjust): New function.
3907 (ppc_emit_call): New function.
3908 (ppc_emit_int_call_1): New function.
3909 (ppc_emit_void_call_2): New function.
3910 (ppc_emit_if_goto): New function.
3911 (ppc_emit_goto): New function.
3912 (ppc_emit_eq_goto): New function.
3913 (ppc_emit_ne_goto): New function.
3914 (ppc_emit_lt_goto): New function.
3915 (ppc_emit_le_goto): New function.
3916 (ppc_emit_gt_goto): New function.
3917 (ppc_emit_ge_goto): New function.
3918 (ppc_write_goto_address): New function.
3919 (ppc_emit_ops_impl): New static variable.
3920 (ppc64v1_emit_prologue): New function.
3921 (ppc64v2_emit_prologue): New function.
3922 (ppc64_emit_epilogue): New function.
3923 (ppc64_emit_add): New function.
3924 (ppc64_emit_sub): New function.
3925 (ppc64_emit_mul): New function.
3926 (ppc64_emit_lsh): New function.
3927 (ppc64_emit_rsh_signed): New function.
3928 (ppc64_emit_rsh_unsigned): New function.
3929 (ppc64_emit_ext): New function.
3930 (ppc64_emit_zero_ext): New function.
3931 (ppc64_emit_log_not): New function.
3932 (ppc64_emit_bit_and): New function.
3933 (ppc64_emit_bit_or): New function.
3934 (ppc64_emit_bit_xor): New function.
3935 (ppc64_emit_bit_not): New function.
3936 (ppc64_emit_equal): New function.
3937 (ppc64_emit_less_signed): New function.
3938 (ppc64_emit_less_unsigned): New function.
3939 (ppc64_emit_ref): New function.
3940 (ppc64_emit_const): New function.
3941 (ppc64v1_emit_reg): New function.
3942 (ppc64v2_emit_reg): New function.
3943 (ppc64_emit_pop): New function.
3944 (ppc64_emit_stack_flush): New function.
3945 (ppc64_emit_swap): New function.
3946 (ppc64v1_emit_call): New function.
3947 (ppc64v2_emit_call): New function.
3948 (ppc64v1_emit_int_call_1): New function.
3949 (ppc64v2_emit_int_call_1): New function.
3950 (ppc64v1_emit_void_call_2): New function.
3951 (ppc64v2_emit_void_call_2): New function.
3952 (ppc64_emit_if_goto): New function.
3953 (ppc64_emit_eq_goto): New function.
3954 (ppc64_emit_ne_goto): New function.
3955 (ppc64_emit_lt_goto): New function.
3956 (ppc64_emit_le_goto): New function.
3957 (ppc64_emit_gt_goto): New function.
3958 (ppc64_emit_ge_goto): New function.
3959 (ppc64v1_emit_ops_impl): New static variable.
3960 (ppc64v2_emit_ops_impl): New static variable.
3961 (ppc_emit_ops): New function.
3962 (linux_low_target): Wire in ppc_emit_ops.
3963
3964 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3965 Marcin Kościelnicki <koriakin@0x04.net>
3966
3967 PR/17221
3968 * Makefile.in: Add powerpc-*-ipa.o
3969 * configure.srv: Add ipa_obj for powerpc*-linux.
3970 * linux-ppc-ipa.c: New file.
3971 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3972 includes.
3973 (PPC_FIELD): New macro.
3974 (PPC_SEXT): New macro.
3975 (PPC_OP6): New macro.
3976 (PPC_BO): New macro.
3977 (PPC_LI): New macro.
3978 (PPC_BD): New macro.
3979 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3980 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3981 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3982 (ppc_get_thread_area): New function.
3983 (is_elfv2_inferior): New function.
3984 (gen_ds_form): New function.
3985 (GEN_STD): New macro.
3986 (GEN_STDU): New macro.
3987 (GEN_LD): New macro.
3988 (GEN_LDU): New macro.
3989 (gen_d_form): New function.
3990 (GEN_ADDI): New macro.
3991 (GEN_ADDIS): New macro.
3992 (GEN_LI): New macro.
3993 (GEN_LIS): New macro.
3994 (GEN_ORI): New macro.
3995 (GEN_ORIS): New macro.
3996 (GEN_LWZ): New macro.
3997 (GEN_STW): New macro.
3998 (GEN_STWU): New macro.
3999 (gen_xfx_form): New function.
4000 (GEN_MFSPR): New macro.
4001 (GEN_MTSPR): New macro.
4002 (GEN_MFCR): New macro.
4003 (GEN_MTCR): New macro.
4004 (GEN_SYNC): New macro.
4005 (GEN_LWSYNC): New macro.
4006 (gen_x_form): New function.
4007 (GEN_OR): New macro.
4008 (GEN_MR): New macro.
4009 (GEN_LWARX): New macro.
4010 (GEN_STWCX): New macro.
4011 (GEN_CMPW): New macro.
4012 (gen_md_form): New function.
4013 (GEN_RLDICL): New macro.
4014 (GEN_RLDICR): New macro.
4015 (gen_i_form): New function.
4016 (GEN_B): New macro.
4017 (GEN_BL): New macro.
4018 (gen_b_form): New function.
4019 (GEN_BNE): New macro.
4020 (GEN_LOAD): New macro.
4021 (GEN_STORE): New macro.
4022 (gen_limm): New function.
4023 (gen_atomic_xchg): New function.
4024 (gen_call): New function.
4025 (ppc_relocate_instruction): New function.
4026 (ppc_install_fast_tracepoint_jump_pad): New function.
4027 (ppc_get_min_fast_tracepoint_insn_len): New function.
4028 (ppc_get_ipa_tdesc_idx): New function.
4029 (the_low_target): Wire in the new functions.
4030 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4031 tdescs.
4032 * linux-ppc-tdesc.h: New file.
4033
4034 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4035
4036 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4037 (alloc_jump_pad_buffer): New function.
4038 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4039 (alloc_jump_pad_buffer): New function.
4040 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4041 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4042 (alloc_jump_pad_buffer): New function.
4043 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4044 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4045 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4046 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4047
4048 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4049
4050 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4051 * linux-amd64-ipa.c: Likewise.
4052 * linux-i386-ipa.c: Likewise.
4053 * linux-s390-ipa.c: Likewise.
4054 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4055 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4056 set_trace_state_variable_value_ptr.
4057 (struct ipa_sym_addresses): Likewise.
4058 (symbol_list): Likewise.
4059 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4060 accessing gdb_collect directly.
4061 (gdb_collect_ptr_type): New typedef.
4062 (get_raw_reg_ptr_type): New typedef.
4063 (get_trace_state_variable_value_ptr_type): New typedef.
4064 (set_trace_state_variable_value_ptr_type): New typedef.
4065 (gdb_collect_ptr): New global.
4066 (get_raw_reg_ptr): New global.
4067 (get_trace_state_variable_value_ptr): New global.
4068 (set_trace_state_variable_value_ptr): New global.
4069 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4070 accessing get_raw_reg directly.
4071 (get_get_tsv_func_addr): Likewise for
4072 get_trace_state_variable_value_ptr.
4073 (get_set_tsv_func_addr): Likewise for
4074 set_trace_state_variable_value_ptr.
4075 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4076
4077 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4078
4079 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4080
4081 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4082
4083 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4084 packets.
4085 (relocate_instruction): Remove own_buf.
4086 * server.c (own_buf): Make global.
4087 (handle_v_requests): Make global.
4088 * server.h (own_buf): New declaration.
4089 (handle_v_requests): New prototype.
4090
4091 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4092
4093 PR 18377
4094 * linux-s390-low.c (add_insns): New function.
4095 (s390_emit_prologue): New function.
4096 (s390_emit_epilogue): New function.
4097 (s390_emit_add): New function.
4098 (s390_emit_sub): New function.
4099 (s390_emit_mul): New function.
4100 (s390_emit_lsh): New function.
4101 (s390_emit_rsh_signed): New function.
4102 (s390_emit_rsh_unsigned): New function.
4103 (s390_emit_ext): New function.
4104 (s390_emit_log_not): New function.
4105 (s390_emit_bit_and): New function.
4106 (s390_emit_bit_or): New function.
4107 (s390_emit_bit_xor): New function.
4108 (s390_emit_bit_not): New function.
4109 (s390_emit_equal): New function.
4110 (s390_emit_less_signed): New function.
4111 (s390_emit_less_unsigned): New function.
4112 (s390_emit_ref): New function.
4113 (s390_emit_if_goto): New function.
4114 (s390_emit_goto): New function.
4115 (s390_write_goto_address): New function.
4116 (s390_emit_litpool): New function.
4117 (s390_emit_const): New function.
4118 (s390_emit_call): New function.
4119 (s390_emit_reg): New function.
4120 (s390_emit_pop): New function.
4121 (s390_emit_stack_flush): New function.
4122 (s390_emit_zero_ext): New function.
4123 (s390_emit_swap): New function.
4124 (s390_emit_stack_adjust): New function.
4125 (s390_emit_set_r2): New function.
4126 (s390_emit_int_call_1): New function.
4127 (s390_emit_void_call_2): New function.
4128 (s390_emit_eq_goto): New function.
4129 (s390_emit_ne_goto): New function.
4130 (s390_emit_lt_goto): New function.
4131 (s390_emit_le_goto): New function.
4132 (s390_emit_gt_goto): New function.
4133 (s390_emit_ge_goto): New function.
4134 (s390x_emit_prologue): New function.
4135 (s390x_emit_epilogue): New function.
4136 (s390x_emit_add): New function.
4137 (s390x_emit_sub): New function.
4138 (s390x_emit_mul): New function.
4139 (s390x_emit_lsh): New function.
4140 (s390x_emit_rsh_signed): New function.
4141 (s390x_emit_rsh_unsigned): New function.
4142 (s390x_emit_ext): New function.
4143 (s390x_emit_log_not): New function.
4144 (s390x_emit_bit_and): New function.
4145 (s390x_emit_bit_or): New function.
4146 (s390x_emit_bit_xor): New function.
4147 (s390x_emit_bit_not): New function.
4148 (s390x_emit_equal): New function.
4149 (s390x_emit_less_signed): New function.
4150 (s390x_emit_less_unsigned): New function.
4151 (s390x_emit_ref): New function.
4152 (s390x_emit_if_goto): New function.
4153 (s390x_emit_const): New function.
4154 (s390x_emit_call): New function.
4155 (s390x_emit_reg): New function.
4156 (s390x_emit_pop): New function.
4157 (s390x_emit_stack_flush): New function.
4158 (s390x_emit_zero_ext): New function.
4159 (s390x_emit_swap): New function.
4160 (s390x_emit_stack_adjust): New function.
4161 (s390x_emit_int_call_1): New function.
4162 (s390x_emit_void_call_2): New function.
4163 (s390x_emit_eq_goto): New function.
4164 (s390x_emit_ne_goto): New function.
4165 (s390x_emit_lt_goto): New function.
4166 (s390x_emit_le_goto): New function.
4167 (s390x_emit_gt_goto): New function.
4168 (s390x_emit_ge_goto): New function.
4169 (s390_emit_ops): New function.
4170 (struct linux_target_ops): Fill in emit_ops hook.
4171
4172 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4173
4174 PR 18377
4175 * Makefile.in: Add s390 IPA files.
4176 * configure.srv: Build IPA for s390.
4177 * linux-s390-ipa.c: New file.
4178 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4179 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4180 (tdesc_s390_linux32): Likewise.
4181 (init_registers_s390_linux32v1): Likewise.
4182 (tdesc_s390_linux32v1): Likewise.
4183 (init_registers_s390_linux32v2): Likewise.
4184 (tdesc_s390_linux32v2): Likewise.
4185 (init_registers_s390_linux64): Likewise.
4186 (tdesc_s390_linux64): Likewise.
4187 (init_registers_s390_linux64v1): Likewise.
4188 (tdesc_s390_linux64v1): Likewise.
4189 (init_registers_s390_linux64v2): Likewise.
4190 (tdesc_s390_linux64v2): Likewise.
4191 (init_registers_s390_te_linux64): Likewise.
4192 (tdesc_s390_te_linux64): Likewise.
4193 (init_registers_s390_vx_linux64): Likewise.
4194 (tdesc_s390_vx_linux64): Likewise.
4195 (init_registers_s390_tevx_linux64): Likewise.
4196 (tdesc_s390_tevx_linux64): Likewise.
4197 (init_registers_s390x_linux64): Likewise.
4198 (tdesc_s390x_linux64): Likewise.
4199 (init_registers_s390x_linux64v1): Likewise.
4200 (tdesc_s390x_linux64v1): Likewise.
4201 (init_registers_s390x_linux64v2): Likewise.
4202 (tdesc_s390x_linux64v2): Likewise.
4203 (init_registers_s390x_te_linux64): Likewise.
4204 (tdesc_s390x_te_linux64): Likewise.
4205 (init_registers_s390x_vx_linux64): Likewise.
4206 (tdesc_s390x_vx_linux64): Likewise.
4207 (init_registers_s390x_tevx_linux64): Likewise.
4208 (tdesc_s390x_tevx_linux64): Likewise.
4209 (have_hwcap_s390_vx): New static variable.
4210 (s390_arch_setup): Fill have_hwcap_s390_vx.
4211 (s390_get_thread_area): New function.
4212 (s390_ft_entry_gpr_esa): New const.
4213 (s390_ft_entry_gpr_zarch): New const.
4214 (s390_ft_entry_misc): New const.
4215 (s390_ft_entry_fr): New const.
4216 (s390_ft_entry_vr): New const.
4217 (s390_ft_main_31): New const.
4218 (s390_ft_main_64): New const.
4219 (s390_ft_exit_fr): New const.
4220 (s390_ft_exit_vr): New const.
4221 (s390_ft_exit_misc): New const.
4222 (s390_ft_exit_gpr_esa): New const.
4223 (s390_ft_exit_gpr_zarch): New const.
4224 (append_insns): New function.
4225 (s390_relocate_instruction): New function.
4226 (s390_install_fast_tracepoint_jump_pad): New function.
4227 (s390_get_min_fast_tracepoint_insn_len): New function.
4228 (s390_get_ipa_tdesc_idx): New function.
4229 (struct linux_target_ops): Wire in the above functions.
4230 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4231 * linux-s390-tdesc.h: New file.
4232
4233 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4234
4235 * linux-s390-low.c (s390_supports_tracepoints): New function.
4236 (struct linux_target_ops): Fill supports_tracepoints hook.
4237
4238 2016-03-18 Yao Qi <yao.qi@linaro.org>
4239
4240 * linux-low.c (lwp_signal_can_be_delivered): New function.
4241 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4242
4243 2016-03-18 Yao Qi <yao.qi@linaro.org>
4244
4245 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4246 0 if signal is enqueued. Remove 'signal' from one debugging
4247 message. Move one debugging message to some lines below.
4248 Remove code setting 'signal' to 0.
4249
4250 2016-03-18 Yao Qi <yao.qi@linaro.org>
4251
4252 * linux-low.c (linux_low_filter_event): Remove redundant
4253 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4254
4255 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4256
4257 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4258 (struct linux_target_ops): Wire in the above.
4259
4260 2016-03-03 Yao Qi <yao.qi@linaro.org>
4261
4262 * linux-low.c: Update comments to start_step_over.
4263
4264 2016-03-03 Yao Qi <yao.qi@linaro.org>
4265
4266 PR server/19736
4267 * linux-low.c (handle_extended_wait): Set child suspended
4268 if event_lwp->bp_reinsert isn't zero.
4269
4270 2016-03-02 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4273 enqueue_pending_signal.
4274
4275 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4276
4277 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4278 is actually loaded.
4279
4280 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4281
4282 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4283 (s390_regmap_3264) [!__s390x__]: New global.
4284 (s390_collect_ptrace_register): Skip map entries containing -1.
4285 (s390_supply_ptrace_register): Ditto.
4286 (s390_fill_gprs_high): New function.
4287 (s390_store_gprs_high): New function.
4288 (s390_regsets): Add NT_S390_HIGH_GPRS.
4289 (s390_get_hwcap): Enable on 31-bit.
4290 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4291 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4292 Detect NT_S390_HIGH_GPRS.
4293 (s390_usrregs_info_3264): Enable on 31-bit.
4294 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4295 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4296
4297 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4298
4299 PR gdb/13808
4300 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4301 * configure.srv: Ditto.
4302 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4303 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4304 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4305 (init_registers_amd64_linux): Remove prototype.
4306 (tdesc_amd64_linux): Remove declaration.
4307 (get_ipa_tdesc): New function.
4308 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4309 initialize remaining tdescs.
4310 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4311 (init_registers_i386_linux): Remove prototype.
4312 (tdesc_i386_linux): Remove declaration.
4313 (get_ipa_tdesc): New function.
4314 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4315 initialize remaining tdescs.
4316 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4317 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4318 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4319 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4320 (x86_get_ipa_tdesc_idx): New function.
4321 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4322 * linux-x86-tdesc.h: New file.
4323 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4324 (target_get_ipa_tdesc_idx): New macro.
4325 * tracepoint.c (ipa_tdesc_idx): New macro.
4326 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4327 (symbol_list): Add ipa_tdesc_idx.
4328 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4329 (ipa_tdesc): Remove.
4330 (ipa_tdesc_idx): New variable.
4331 (get_context_regcache): Use get_ipa_tdesc.
4332 (gdb_collect): Ditto.
4333 (gdb_probe): Ditto.
4334 * tracepoint.h (get_ipa_tdesc): New prototype.
4335 (ipa_tdesc): Remove.
4336
4337 2016-02-24 Pedro Alves <palves@redhat.com>
4338
4339 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4340 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4341 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4342 Factor out common code between the USE_SIGTRAP_SIGINFO and
4343 !USE_SIGTRAP_SIGINFO blocks.
4344 (linux_low_filter_event): Call save_stop_reason instead of
4345 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4346 Update comments.
4347 (linux_wait_1): Update comments.
4348
4349 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4350
4351 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4352 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4353 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4354 ppc_insert_point, ppc_remove_point.
4355
4356 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4357
4358 * linux-s390-low.c (s390_supports_z_point_type): New function.
4359 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4360
4361 2016-02-16 Yao Qi <yao.qi@linaro.org>
4362
4363 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4364 PC. Get pc from regcache_read_pc.
4365
4366 2016-02-12 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4369 or linux_get_pc_32bit.
4370 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4371
4372 2016-02-12 Yao Qi <yao.qi@linaro.org>
4373
4374 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4375 arm_linux_get_next_pcs_fixup.
4376
4377 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4378
4379 * tracepoint.c (x_tracepoint_action_download): Change
4380 write_inferior_data_ptr to write_inferior_data_pointer.
4381 (cmd_qtstart): Likewise.
4382 (write_inferior_data_ptr): Remove.
4383 (download_agent_expr): Change write_inferior_data_ptr to
4384 write_inferior_data_pointer.
4385 (download_tracepoint_1): Likewise.
4386 (download_tracepoint): Likewise.
4387 (download_trace_state_variables): Likewise.
4388
4389 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4390 Marcin Kościelnicki <koriakin@0x04.net>
4391
4392 * tracepoint.c (struct tracepoint_action_ops): Remove.
4393 (struct tracepoint_action): Remove ops.
4394 (m_tracepoint_action_download, r_tracepoint_action_download)
4395 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4396 size and offset accordingly.
4397 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4398 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4399 (tracepoint_action_send, tracepoint_action_download): New functions.
4400 Helpers for trace action handlers.
4401 (add_tracepoint_action): Remove setup actions ops.
4402 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4403
4404 2016-02-10 Yao Qi <yao.qi@linaro.org>
4405
4406 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4407
4408 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4409
4410 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4411 to AC_OUTPUT.
4412 * configure: Regenerate.
4413
4414 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4415
4416 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4417 void * to gdb_byte *.
4418 * linux-low.c (siginfo_fixup): Likewise.
4419 (linux_xfer_siginfo): Likewise.
4420 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4421 Likewise.
4422 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4423
4424 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4425
4426 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4427 to srv_tgtobj.
4428 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4429 to srv_tgtobj.
4430 * linux-x86-low.c [__x86_64__]: Include
4431 "nat/amd64-linux-siginfo.h".
4432 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4433 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4434 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4435 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4436 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4437 (cpt_si_fd, si_timerid, si_overrun): Move from
4438 nat/amd64-linux-siginfo.c.
4439 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4440
4441 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4442
4443 * server.c (skip_to_semicolon): Remove.
4444 (process_point_options): Use strchrnul instead of
4445 skip_to_semicolon.
4446
4447 2016-01-26 Yao Qi <yao.qi@linaro.org>
4448
4449 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4450 * linux-low.c (install_software_single_step_breakpoints): Don't
4451 call regcache_read_pc.
4452 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4453 argument pc.
4454
4455 2016-01-26 Yao Qi <yao.qi@linaro.org>
4456
4457 * linux-low.c (install_software_single_step_breakpoints): Call
4458 regcache_read_pc instead of get_pc.
4459
4460 2016-01-26 Yao Qi <yao.qi@linaro.org>
4461
4462 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4463 (unblock_async_io): Rename to ...
4464 (block_unblock_async_io): ... it. New function.
4465 (enable_async_io): Don't install SIGIO handler. Unblock it
4466 instead.
4467 (disable_async_io): Don't ignore SIGIO. Block it instead.
4468 (initialize_async_io): Install SIGIO handler. Don't call
4469 unblock_async_io.
4470
4471 2016-01-26 Yao Qi <yao.qi@linaro.org>
4472
4473 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4474 first character is '\003', call *the_target->request_interrupt.
4475
4476 2016-01-25 Yao Qi <yao.qi@linaro.org>
4477
4478 * remote-utils.c (new_thread_notify): Remove.
4479 (dead_thread_notify): Likewise.
4480 * remote-utils.h (new_thread_notify): Remove declaration.
4481 (dead_thread_notify): Likewise.
4482
4483 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4484
4485 * gdb.trace/pending.exp: Fix expected message on continue.
4486
4487 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4488
4489 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4490 it works properly on big-endian machines where sizeof (CORE_ADDR)
4491 != sizeof (void *).
4492
4493 2016-01-21 Pedro Alves <palves@redhat.com>
4494
4495 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4496 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4497 * configure: Regenerate.
4498
4499 2016-01-21 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4502 is_thumb and set it according to CPSR saved on the stack.
4503 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4504 arm_sigreturn_next_pc.
4505
4506 2016-01-18 Yao Qi <yao.qi@linaro.org>
4507
4508 * linux-low.c (linux_set_pc_64bit): New function.
4509 (linux_get_pc_64bit): New function.
4510 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4511 Declare.
4512 * linux-sparc-low.c (debug_threads): Remove declaration.
4513 (sparc_get_pc): Remove.
4514 (the_low_target): Use linux_get_pc_64bit instead of
4515 sparc_get_pc.
4516 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4517 (the_low_target): Use linux_get_pc_64bit and
4518 linux_set_pc_64bit.
4519
4520 2016-01-18 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-arm-low.c (debug_threads): Remove declaration.
4523 (arm_get_pc, arm_set_pc): Remove.
4524 (the_low_target): Use linux_get_pc_32bit and
4525 linux_set_pc_32bit.
4526 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4527 (the_low_target): Use linux_get_pc_32bit and
4528 linux_set_pc_32bit.
4529 * linux-cris-low.c (debug_threads): Remove declaration.
4530 (cris_get_pc, cris_set_pc,): Remove.
4531 (the_low_target): Use linux_get_pc_32bit and
4532 linux_set_pc_32bit.
4533 * linux-crisv32-low.c (debug_threads): Remove declaration.
4534 (cris_get_pc, cris_set_pc): Remove.
4535 (the_low_target): Use linux_get_pc_32bit and
4536 linux_set_pc_32bit.
4537 * linux-low.c: Include inttypes.h.
4538 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4539 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4540 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4541 (the_low_target): Use linux_get_pc_32bit and
4542 linux_set_pc_32bit.
4543 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4544 (the_low_target): Use linux_get_pc_32bit and
4545 linux_set_pc_32bit.
4546 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4547 (the_low_target): Use linux_get_pc_32bit and
4548 linux_set_pc_32bit.
4549 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4550 (the_low_target): Use linux_get_pc_32bit and
4551 linux_set_pc_32bit.
4552 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4553 (the_low_target): Use linux_get_pc_32bit and
4554 linux_set_pc_32bit.
4555
4556 2016-01-18 Gary Benson <gbenson@redhat.com>
4557
4558 * configure.ac (AC_FUNC_FORK): New check.
4559 * config.in: Regenerate.
4560 * configure: Likewise.
4561
4562 2016-01-14 Yao Qi <yao.qi@linaro.org>
4563
4564 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4565 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4566 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4567 arm_get_next_pcs_ctor.
4568
4569 2016-01-12 Josh Stone <jistone@redhat.com>
4570 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4571
4572 * inferiors.h: Include "gdb_vecs.h".
4573 (struct process_info): Add syscalls_to_catch.
4574 * inferiors.c (remove_process): Free syscalls_to_catch.
4575 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4576 syscall_return stops.
4577 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4578 * server.c (handle_general_set): Handle QCatchSyscalls.
4579 (handle_query): Report support for QCatchSyscalls.
4580 * target.h (struct target_ops): Add supports_catch_syscall.
4581 (target_supports_catch_syscall): New macro.
4582 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4583 (struct lwp_info): Add syscall_state.
4584 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4585 Maintain syscall_state and syscalls_to_catch across exec.
4586 (get_syscall_trapinfo): New function, proxy to the_low_target.
4587 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4588 (linux_low_filter_event): Toggle syscall_state entry/return for
4589 syscall traps, and set it ignored for all others.
4590 (gdb_catching_syscalls_p): New function.
4591 (gdb_catch_this_syscall_p): New function.
4592 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4593 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4594 (linux_supports_catch_syscall): New function.
4595 (linux_target_ops): Install it.
4596 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4597 (the_low_target): Install it.
4598
4599 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4600
4601 * acinclude.m4: Include new ../warning.m4 file.
4602 * configure: Regenerated.
4603 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4604
4605 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4606
4607 * ax.c (is_goto_target): Mark static.
4608 * linux-low.c (register_addr): Likewise.
4609 (linux_fetch_registers, linux_store_registers): Likewise.
4610 * mem-break.c (any_persistent_commands): Fix old prototype.
4611 (add_commands_to_breakpoint): Mark static.
4612 * regcache.c (find_register_by_name): Delete unused func.
4613 * remote-utils.c (hex_or_minus_one): Mark static.
4614 * server.c (monitor_show_help): Mark static.
4615 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4616 handle_v_requests): Likewise.
4617
4618 2016-01-12 Pedro Alves <palves@redhat.com>
4619
4620 Remove use of the registered trademark symbol throughout.
4621
4622 2016-01-08 Yao Qi <yao.qi@linaro.org>
4623
4624 * remote-utils.c (getpkt): If c is '\003', call target hook
4625 request_interrupt.
4626
4627 2016-01-06 Yao Qi <yao.qi@linaro.org>
4628
4629 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4630 linux-aarch32-low.c.
4631 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4632 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4633 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4634 (thumb2_breakpoint): Declare.
4635 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4636 linux-aarch32-low.h.
4637 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4638 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4639 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4640
4641 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4642
4643 * gdbreplay.c (gdbreplay_version): Change copyright year in
4644 version message.
4645 * server.c (gdbserver_version): Likewise.
4646
4647 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4648
4649 * server.c (crc32_table): Delete.
4650 (crc32): Use libiberty's xcrc32 function.
4651
4652 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4653
4654 * lynx-low.c (lynx_delete_thread_callback): New function.
4655 (lynx_mourn): Properly delete our process and all of its
4656 threads. Remove call to clear_inferiors.
4657
4658 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4659
4660 * target.c (thread_search_callback): Add check that
4661 the thread_stopped target callback is not NULL before
4662 calling it.
4663
4664 2015-12-21 Yao Qi <yao.qi@linaro.org>
4665
4666 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4667 arm breakpoint.
4668
4669 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4670
4671 * server.c (handle_query): Call target_supports_software_single_step.
4672
4673 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4674
4675 * linux-low.c (single_step): New function.
4676 (linux_resume_one_lwp_throw): Call single_step.
4677 (start_step_over): Likewise.
4678
4679 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4680
4681 * Makefile.in (SFILES): Append arch/arm-linux.c,
4682 arch/arm-get-next-pcs.c.
4683 (arm-linux.o): New rule.
4684 (arm-get-next-pcs.o): New rule.
4685 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4686 arm-linux.o.
4687 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4688 to linux-aarch32-low.c.
4689 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4690 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4691 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4692 (thumb2_breakpoint_len): Likewise.
4693 (arm_is_thumb_mode): Make non-static.
4694 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4695 from linux-aarch32-low.c.
4696 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4697 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4698 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4699 (thumb2_breakpoint_len): Likewise.
4700 (arm_is_thumb_mode): New declaration.
4701 * linux-arm-low.c: Include arch/arm-linux.h
4702 aarch/arm-get-next-pcs.h, sys/syscall.h.
4703 (get_next_pcs_ops): New struct.
4704 (get_next_pcs_addr_bits_remove): New function.
4705 (get_next_pcs_is_thumb): New function.
4706 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4707 (arm_sigreturn_next_pc): Likewise.
4708 (get_next_pcs_syscall_next_pc): Likewise.
4709 (arm_gdbserver_get_next_pcs): Likewise.
4710 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4711 Initialize.
4712 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4713 * server.h: Include gdb_vecs.h.
4714
4715 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4716
4717 * Makefile.in (SFILES): Append common/common-regcache.c.
4718 (OBS): Append common-regcache.o.
4719 (common-regcache.o): New rule.
4720 * regcache.c (init_register_cache): Initialize cache to
4721 REG_UNAVAILABLE.
4722 (regcache_raw_read_unsigned): New function.
4723 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4724 register_status enum.
4725
4726 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4727
4728 * linux-aarch64-low.c (the_low_targets): Rename
4729 breakpoint_reinsert_addr to get_next_pcs.
4730 * linux-arm-low.c (the_low_targets): Likewise.
4731 * linux-bfin-low.c (the_low_targets): Likewise.
4732 * linux-cris-low.c (the_low_targets): Likewise.
4733 * linux-crisv32-low.c (the_low_targets): Likewise.
4734 * linux-low.c (can_software_single_step): Likewise.
4735 (install_software_single_step_breakpoints): New function.
4736 (start_step_over): Use install_software_single_step_breakpoints.
4737 * linux-low.h: New CORE_ADDR vector.
4738 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4739 get_next_pcs.
4740 * linux-mips-low.c (the_low_targets): Likewise.
4741 * linux-nios2-low.c (the_low_targets): Likewise.
4742 * linux-sparc-low.c (the_low_targets): Likewise.
4743
4744 2015-12-17 Pedro Alves <palves@redhat.com>
4745
4746 * linux-low.c (linux_kill_one_lwp): Remove references to
4747 LinuxThreads.
4748 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4749 to 'kill'.
4750 (linux_init_signals): Delete.
4751 (initialize_low): Adjust.
4752 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4753
4754 2015-12-16 Pedro Alves <palves@redhat.com>
4755
4756 * configure.ac (compiler warning flags): When testing a
4757 -Wno-foo option, check whether -Wfoo works instead.
4758 * configure: Regenerate.
4759
4760 2015-12-11 Don Breazeal <donb@codesourcery.com>
4761
4762 * server.c (process_serial_event): Don't exit from gdbserver
4763 in remote mode if there are still active inferiors.
4764
4765 2015-12-11 Yao Qi <yao.qi@linaro.org>
4766
4767 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4768 arm_breakpoint_at if the process is 32-bit.
4769
4770 2015-12-11 Yao Qi <yao.qi@linaro.org>
4771
4772 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4773 arm breakpoint.
4774
4775 2015-12-07 Yao Qi <yao.qi@linaro.org>
4776
4777 * configure.srv: Append arm.o to srv_tgtobj for
4778 aarch64*-*-linux* target.
4779 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4780 from linux-arm-low.c.
4781 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4782 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4783 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4784 (thumb2_breakpoint_len): Likewise.
4785 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4786 (arm_breakpoint_kinds): Likewise.
4787 (arm_breakpoint_kind_from_pc): Likewise.
4788 (arm_sw_breakpoint_from_kind): Likewise.
4789 (arm_breakpoint_kind_from_current_state): Likewise.
4790 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4791 (arm_sw_breakpoint_from_kind): Declare.
4792 (arm_breakpoint_kind_from_current_state): Declare.
4793 (arm_breakpoint_at): Declare.
4794 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4795 arm_sw_breakpoint_from_kind if process is 32-bit.
4796 (aarch64_breakpoint_kind_from_pc): New function.
4797 (aarch64_breakpoint_kind_from_current_state): New function.
4798 (the_low_target): Initialize fields breakpoint_kind_from_pc
4799 and breakpoint_kind_from_current_state.
4800 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4801 linux-aarch32-low.c.
4802 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4803 (arm_breakpoint, arm_breakpoint_len): Likewise.
4804 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4805 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4806 (arm_is_thumb_mode): Likewise.
4807 (arm_breakpoint_at): Likewise.
4808 (arm_breakpoint_kind_from_pc): Likewise.
4809 (arm_sw_breakpoint_from_kind): Likewise.
4810 (arm_breakpoint_kind_from_current_state): Likewise.
4811
4812 Revert:
4813 2015-08-04 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4816 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4817 * server.c (extended_protocol): Remove "static".
4818 * server.h (extended_protocol): Declare it.
4819
4820 2015-12-04 Josh Stone <jistone@redhat.com>
4821
4822 * target.h (struct target_ops) <arch_setup>: Rename to ...
4823 (struct target_ops) <post_create_inferior>: ... this.
4824 (target_arch_setup): Rename to ...
4825 (target_post_create_inferior): ... this, calling post_create_inferior.
4826 * server.c (start_inferior): Update target_arch_setup calls to
4827 target_post_create_inferior.
4828 * linux-low.c (linux_low_ptrace_options): Forward declare.
4829 (linux_arch_setup): Update its comment for general use.
4830 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4831 (struct linux_target_ops): Use linux_post_create_inferior.
4832 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4833 to post_create_inferior.
4834 * nto-low.c (struct nto_target_ops): Likewise.
4835 * spu-low.c (struct spu_target_ops): Likewise.
4836 * win32-low.c (struct win32_target_ops): Likewise.
4837
4838 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4839
4840 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4841
4842 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843
4844 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4845 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4846 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4847 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4848 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4849 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4850 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4851 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4852 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4853 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4854 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4855 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4856
4857 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4858
4859 * linux-low.c (linux_look_up_symbols): Don't call
4860 linux_supports_traceclone.
4861 * linux-low.h (thread_db_init): Remove use_events argument.
4862 * thread-db.c (thread_db_use_event): Remove global variable.
4863 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4864 (struct thread_db) <td_create_bp>: Remove field.
4865 (thread_db_create_event): Remove function.
4866 (thread_db_enable_reporting): Likewise.
4867 (find_one_thread): Don't check for thread_db_use_events.
4868 (attach_thread): Likewise.
4869 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4870 (try_thread_db_load_1): Don't check for thread_db_use_events.
4871 (thread_db_init): Remove use_events argument and thread events
4872 handling.
4873 (remove_thread_event_breakpoints): Remove function.
4874 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4875
4876 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4877
4878 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4879 New function.
4880 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4881 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4882 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4883 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4884 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4885 Initialize.
4886 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4887 New function.
4888 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4889 * linux-low.c (can_hardware_single_step): Use
4890 supports_hardware_single_step.
4891 (can_software_single_step): New function.
4892 (start_step_over): Call can_software_single_step.
4893 (linux_supports_hardware_single_step): New function.
4894 (struct target_ops) <supports_software_single_step>: Initialize.
4895 * linux-low.h (struct linux_target_ops)
4896 <supports_hardware_single_step>: Initialize.
4897 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4898 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4899 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4900 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4901 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4903 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4904 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4905 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4906 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4907 Initialize.
4908 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4909 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4910 Initialize.
4911 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4912 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4913 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4914 New function.
4915 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4916 * target.h (struct target_ops): <supports_software_single_step>:
4917 New field.
4918 (target_supports_software_single_step): New macro.
4919
4920 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4921
4922 * linux-low.c (linux_wait_1): Fix pc advance condition.
4923 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4924 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4925
4926 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4927
4928 * linux-arm-low.c (arm_is_thumb_mode): New function.
4929 (arm_breakpoint_at): Use arm_is_thumb_mode.
4930 (arm_breakpoint_kind_from_current_state): New function.
4931 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4932 Initialize.
4933 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4934 (linux_breakpoint_kind_from_current_state): New function.
4935 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4936 * linux-low.h (struct linux_target_ops)
4937 <breakpoint_kind_from_current_state>: New field.
4938 * target.h (struct target_ops): Likewise.
4939 (target_breakpoint_kind_from_current_state): New macro.
4940
4941 2015-11-30 Pedro Alves <palves@redhat.com>
4942
4943 * linux-low.c (linux_resume): Wake up the event loop before
4944 returning.
4945
4946 2015-11-30 Pedro Alves <palves@redhat.com>
4947
4948 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4949 check.
4950 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4951 to -1.
4952 * target.c (struct thread_search): New structure.
4953 (thread_search_callback): New function.
4954 (prev_general_thread): New global.
4955 (prepare_to_access_memory, done_accessing_memory): New functions.
4956 * target.h (prepare_to_access_memory, done_accessing_memory):
4957 Replace macros with function declarations.
4958
4959 2015-11-30 Pedro Alves <palves@redhat.com>
4960
4961 PR 14618
4962 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4963 report TARGET_WAITKIND_NO_RESUMED.
4964 * remote-utils.c (prepare_resume_reply): Handle
4965 TARGET_WAITKIND_NO_RESUMED.
4966 * server.c (report_no_resumed): New global.
4967 (handle_query) <qSupported>: Handle "no-resumed+". Report
4968 "no-resumed+" support.
4969 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4970 return error if the client doesn't support no-resumed events.
4971 (push_stop_notification): New function.
4972 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4973 events if the client supports them.
4974
4975 2015-11-30 Pedro Alves <palves@redhat.com>
4976
4977 * linux-low.c (thread_still_has_status_pending_p): Don't check
4978 vCont;t here.
4979 (lwp_resumed): New function.
4980 (status_pending_p_callback): Return early if the LWP is not
4981 supposed to be resumed.
4982
4983 2015-11-30 Pedro Alves <palves@redhat.com>
4984
4985 * linux-low.c (handle_extended_wait): Assert that the LWP's
4986 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4987 thread create events, leave the new child's status pending.
4988 (linux_low_filter_event): If GDB wants to hear about thread exit
4989 events, leave the LWP marked dead and don't delete it.
4990 (linux_wait_for_event_filtered): Don't check for thread exit.
4991 (filter_exit_event): New function.
4992 (linux_wait_1): Use it, when returning an exit event.
4993 (linux_resume_one_lwp_throw): Assert that the LWP's
4994 waitstatus is TARGET_WAITKIND_IGNORE.
4995 * remote-utils.c (prepare_resume_reply): Handle
4996 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4997 * server.c (report_thread_events): New global.
4998 (handle_general_set): Handle QThreadEvents.
4999 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5000 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5001 TARGET_WAITKIND_THREAD_EXITED.
5002 * server.h (report_thread_events): Declare.
5003
5004 2015-11-30 Pedro Alves <palves@redhat.com>
5005
5006 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5007 the thread's last_resume_kind was resume_stop.
5008
5009 2015-11-30 Pedro Alves <palves@redhat.com>
5010
5011 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5012 before returning.
5013
5014 2015-11-30 Pedro Alves <palves@redhat.com>
5015
5016 * server.c (handle_v_requests): Handle vCtrlC.
5017
5018 2015-11-30 Pedro Alves <palves@redhat.com>
5019
5020 * gdbthread.h (find_any_thread_of_pid): Declare.
5021 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5022 functions.
5023 * server.c (handle_query): If current_thread is NULL, look for
5024 another thread of the selected process.
5025
5026 2015-11-26 Daniel Colascione <dancol@dancol.org>
5027 Simon Marchi <simon.marchi@ericsson.com>
5028
5029 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5030 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5031 name in reply.
5032 * target.h (struct target_ops) <thread_name>: New field.
5033 (target_thread_name): New macro.
5034
5035 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5036
5037 * regcache.h (regcache_invalidate_pid): Add declaration.
5038 * regcache.c (regcache_invalidate_pid): New function, extracted
5039 from regcache_invalidate.
5040 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5041 Add trivial documentation comment.
5042 * lynx-low.c: Use regcache_invalidate_pid instead of
5043 regcache_invalidate.
5044
5045 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5046
5047 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5048 and Elf64_auxv_t if the target is Android.
5049
5050 2015-11-22 Doug Evans <xdje42@gmail.com>
5051
5052 * target.h: #include <sys/types.h>.
5053
5054 2015-11-19 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.c (linux_process_qsupported): Change prototype.
5057 Adjust.
5058 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5059 Change prototype.
5060 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5061 and adjust to loop over all features.
5062 * server.c (handle_query) <qSupported>: Adjust to call
5063 target_process_qsupported once, passing it a vector of unprocessed
5064 features.
5065 * target.h (struct target_ops) <process_qsupported>: Change
5066 prototype.
5067 (target_process_qsupported): Adjust.
5068
5069 2015-11-19 Pedro Alves <palves@redhat.com>
5070
5071 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5072 mode.
5073 * configure: Regenerate.
5074
5075 2015-11-19 Pedro Alves <palves@redhat.com>
5076
5077 * configure: Regenerate.
5078
5079 2015-11-19 Yao Qi <yao.qi@linaro.org>
5080
5081 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5082 type to uint32_t.
5083
5084 2015-11-19 Yao Qi <yao.qi@linaro.org>
5085
5086 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5087 (struct aarch64_operand): Move enum out.
5088
5089 2015-11-19 Yao Qi <yao.qi@linaro.org>
5090
5091 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5092 struct user_fpsimd_state *.
5093 (aarch64_store_fpregset): Likewise.
5094
5095 2015-11-19 Yao Qi <yao.qi@linaro.org>
5096
5097 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5098 struct user_pt_regs *.
5099 (aarch64_store_gregset): Likewise.
5100
5101 2015-11-18 Pedro Alves <palves@redhat.com>
5102
5103 * Makefile.in (all_object_files): Add $IPA_OBJS.
5104
5105 2015-11-17 Pedro Alves <palves@redhat.com>
5106
5107 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5108 GDB_SIGNAL_0 and gdb_signal_to_string.
5109
5110 2015-11-17 Pedro Alves <palves@redhat.com>
5111
5112 * win32-low.c (handle_output_debug_string): Remove parameter.
5113 (win32_kill): Remove our_status local and adjust call to
5114 handle_output_debug_string.
5115 (get_child_debug_event): Adjust call to
5116 handle_output_debug_string.
5117
5118 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5119
5120 * linux-mips-low.c (mips_fill_gregset): Add cast.
5121 (mips_store_gregset): Likewise.
5122 (mips_fill_fpregset): Likewise.
5123 (mips_store_fpregset): Likewise.
5124
5125 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5126
5127 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5128 priv.
5129
5130 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5131
5132 * linux-mips-low.c (mips_linux_new_thread): Change type of
5133 watch_type to enum target_hw_bp_type.
5134
5135 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5136
5137 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5138 Change return type to arm_hwbp_type.
5139
5140 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5141
5142 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5143 (arm_store_gregset): Likewise.
5144 * linux-arm-low.c (arm_get_hwcap): Likewise.
5145 (arm_read_description): Likewise.
5146
5147 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5148
5149 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5150
5151 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5152
5153 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5154 (ppc_fill_vsxregset): Likewise.
5155 (ppc_store_vsxregset): Likewise.
5156 (ppc_fill_vrregset): Likewise.
5157 (ppc_store_vrregset): Likewise.
5158 (ppc_fill_evrregset): Likewise.
5159 (ppc_store_evrregset): Likewise.
5160
5161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5162
5163 * linux-ppc-low.c (ppc_usrregs_info): Remove
5164 forward-declaration.
5165 (ppc_arch_setup): Move lower in file.
5166
5167 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5168
5169 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5170 (ps_pdwrite): Likewise.
5171
5172 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5173
5174 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5175 to after assert checks.
5176
5177 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5178
5179 * proc-service.c (ps_pdread): Add/adjust casts.
5180 (ps_pdwrite): Add/adjust casts.
5181
5182 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5183
5184 * server.c (handle_search_memory_1): Cast return value of
5185 memmem.
5186
5187 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5188
5189 * server.c (write_qxfer_response): Change type of data to
5190 gdb_byte *.
5191
5192 2015-10-29 Pedro Alves <palves@redhat.com>
5193
5194 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5195
5196 2015-10-29 Pedro Alves <palves@redhat.com>
5197
5198 * tracepoint.c (clear_installed_tracepoints): Add casts.
5199
5200 2015-10-29 Pedro Alves <palves@redhat.com>
5201
5202 * server.c (handle_v_cont, process_serial_event): Add enum
5203 gdb_signal casts to signal parsing code.
5204
5205 2015-10-29 Pedro Alves <palves@redhat.com>
5206
5207 * linux-low.h (NULL_REGSET): Define.
5208 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5209 * linux-arm-low.c (arm_regsets): Likewise.
5210 * linux-crisv32-low.c (cris_regsets): Likewise.
5211 * linux-m68k-low.c (m68k_regsets): Likewise.
5212 * linux-mips-low.c (mips_regsets): Likewise.
5213 * linux-nios2-low.c (nios2_regsets): Likewise.
5214 * linux-ppc-low.c (ppc_regsets): Likewise.
5215 * linux-s390-low.c (s390_regsets): Likewise.
5216 * linux-sh-low.c (sh_regsets): Likewise.
5217 * linux-sparc-low.c (sparc_regsets): Likewise.
5218 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5219 * linux-tile-low.c (tile_regsets): Likewise.
5220 * linux-x86-low.c (x86_regsets): Likewise.
5221 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5222
5223 2015-10-29 Pedro Alves <palves@redhat.com>
5224
5225 * linux-low.h (NULL_REGSET): Define.
5226 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5227 * linux-arm-low.c (arm_regsets): Likewise.
5228 * linux-crisv32-low.c (cris_regsets): Likewise.
5229 * linux-m68k-low.c (m68k_regsets): Likewise.
5230 * linux-mips-low.c (mips_regsets): Likewise.
5231 * linux-nios2-low.c (nios2_regsets): Likewise.
5232 * linux-ppc-low.c (ppc_regsets): Likewise.
5233 * linux-s390-low.c (s390_regsets): Likewise.
5234 * linux-sh-low.c (sh_regsets): Likewise.
5235 * linux-sparc-low.c (sparc_regsets): Likewise.
5236 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5237 * linux-tile-low.c (tile_regsets): Likewise.
5238 * linux-x86-low.c (x86_regsets): Likewise.
5239 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5240
5241 2015-10-26 Doug Evans <dje@google.com>
5242
5243 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5244
5245 2015-10-26 Doug Evans <dje@google.com>
5246
5247 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5248
5249 2015-10-26 Doug Evans <dje@google.com>
5250
5251 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5252 for debug_printf.
5253 (attach_thread, find_new_threads_callback): Ditto.
5254
5255 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5256
5257 * mem-break.h (set_breakpoint_data): Remove.
5258
5259 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5260
5261 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5262 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5263 (initialize_low): Remove set_breakpoint_data call.
5264 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5265 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5266 (initialize_low): Remove set_breakpoint_data call.
5267 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5268 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5269 (initialize_low): Remove set_breakpoint_data call.
5270
5271 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5272
5273 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5274 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5275 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5276 * target.h (target_breakpoint_kind_from_pc): New macro.
5277
5278 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5279
5280 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5281 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5282 the default breakpoint kind.
5283
5284 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5285
5286 * linux-arm-low.c (arm_supports_z_point_type): Add software
5287 breakpoint support.
5288
5289 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5290
5291 * linux-arm-low.c: Refactor breakpoint definitions.
5292 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5293 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5294
5295 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5296
5297 * Makefile.in: Add arm.c/o.
5298 * configure.srv: Likewise.
5299 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5300 (arm_breakpoint_kind_from_pc): New function.
5301 (arm_sw_breakpoint_from_kind): Return proper kind.
5302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5303
5304 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5305
5306 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5307 removal.
5308 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5309 (struct raw_breakpoint) <size>: Remove.
5310 (struct raw_breakpoint) <kind>: Add.
5311 (bp_size): New function.
5312 (bp_opcode): Likewise.
5313 (find_raw_breakpoint_at): Adjust for kind.
5314 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5315 (remove_memory_breakpoint): Adjust for kind call bp_size.
5316 (set_raw_breakpoint_at): Adjust for kind.
5317 (set_breakpoint): Likewise.
5318 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5319 (delete_raw_breakpoint): Adjust for kind.
5320 (delete_breakpoint): Likewise.
5321 (find_gdb_breakpoint): Likewise.
5322 (set_gdb_breakpoint_1): Likewise.
5323 (set_gdb_breakpoint): Likewise.
5324 (delete_gdb_breakpoint_1): Likewise.
5325 (delete_gdb_breakpoint): Likewise.
5326 (uninsert_raw_breakpoint): Likewise.
5327 (reinsert_raw_breakpoint): Likewise.
5328 (set_breakpoint_data): Remove.
5329 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5330 (check_mem_read): Adjust for kind call bp_size.
5331 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5332 (clone_one_breakpoint): Adjust for kind.
5333 * mem-break.h (set_gdb_breakpoint): Likewise.
5334 (delete_gdb_breakpoint): Likewise.
5335 * server.c (process_serial_event): Likewise.
5336
5337 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5338
5339 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5340 (struct linux_target_ops) <breakpoint>: Remove.
5341 (struct linux_target_ops) <breakpoint_len>: Remove.
5342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5344 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5345 (arm_sw_breakpoint_from_kind): New function.
5346 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5347 (struct linux_target_ops) <breakpoint>: Remove.
5348 (struct linux_target_ops) <breakpoint_len>: Remove.
5349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5351 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5352 (struct linux_target_ops) <breakpoint>: Remove.
5353 (struct linux_target_ops) <breakpoint_len>: Remove.
5354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5356 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5357 (struct linux_target_ops) <breakpoint>: Remove.
5358 (struct linux_target_ops) <breakpoint_len>: Remove.
5359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5361 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5362 and sw_breakpoint_from_kind to increment the pc.
5363 (linux_breakpoint_kind_from_pc): New function.
5364 (linux_sw_breakpoint_from_kind): New function.
5365 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5366 (initialize_low): Call breakpoint_kind_from_pc and
5367 sw_breakpoint_from_kind to replace breakpoint_data/len.
5368 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5369 New field.
5370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5371 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5372 (struct linux_target_ops) <breakpoint>: Remove.
5373 (struct linux_target_ops) <breakpoint_len>: Remove.
5374 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5375 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5376 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5377 (struct linux_target_ops) <breakpoint>: Remove.
5378 (struct linux_target_ops) <breakpoint_len>: Remove.
5379 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5380 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5381 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5382 (struct linux_target_ops) <breakpoint>: Remove.
5383 (struct linux_target_ops) <breakpoint_len>: Remove.
5384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5386 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5387 (struct linux_target_ops) <breakpoint>: Remove.
5388 (struct linux_target_ops) <breakpoint_len>: Remove.
5389 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5390 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5391 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5402 (struct linux_target_ops) <breakpoint>: Remove.
5403 (struct linux_target_ops) <breakpoint_len>: Remove.
5404 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5405 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5406 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5407 (struct linux_target_ops) <breakpoint>: Remove.
5408 (struct linux_target_ops) <breakpoint_len>: Remove.
5409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5411 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5412 (struct linux_target_ops) <breakpoint>: Remove.
5413 (struct linux_target_ops) <breakpoint_len>: Remove.
5414 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5415 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5416 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5417 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5418 (struct linux_target_ops) <breakpoint>: Remove.
5419 (struct linux_target_ops) <breakpoint_len>: Remove.
5420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5422 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5423 (struct linux_target_ops) <breakpoint>: Remove.
5424 (struct linux_target_ops) <breakpoint_len>: Remove.
5425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5427
5428 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5429
5430 * linux-cris-low.c (cris_get_pc): Remove void arg.
5431
5432 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5433
5434 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5435 variable name.
5436
5437 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5438
5439 * inferiors.c (thread_pid_matches_callback): New function.
5440 (find_thread_process): New function.
5441 (remove_thread): Reset current_thread.
5442 (remove_process): Assert threads have been removed first.
5443
5444 2015-10-15 Yao Qi <yao.qi@linaro.org>
5445
5446 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5447 if it is 3.
5448 (aarch64_remove_point): Likewise.
5449 * regcache.c (regcache_register_size): New function.
5450
5451 2015-10-12 Yao Qi <yao.qi@linaro.org>
5452
5453 * linux-aarch64-low.c: Update all callers as emit_load_store
5454 is renamed to aarch64_emit_load_store.
5455
5456 2015-10-12 Yao Qi <yao.qi@linaro.org>
5457
5458 * linux-aarch64-low.c: Update all callers of function renaming
5459 from emit_insn to aarch64_emit_insn.
5460
5461 2015-10-12 Yao Qi <yao.qi@linaro.org>
5462
5463 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5464 arch/aarch64-insn.h.
5465 (struct aarch64_memory_operand): Likewise.
5466 (ENCODE): Likewise.
5467 (emit_insn): Move to arch/aarch64-insn.c.
5468 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5469 (emit_load_store): Move to arch/aarch64-insn.c.
5470 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5471 (can_encode_int32): Remove.
5472
5473 2015-10-12 Yao Qi <yao.qi@linaro.org>
5474
5475 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5476 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5477 (aarch64_relocate_instruction): Likewise.
5478 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5479 (struct aarch64_insn_visitor): Likewise.
5480
5481 2015-10-12 Yao Qi <yao.qi@linaro.org>
5482
5483 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5484 (struct aarch64_insn_visitor): New.
5485 (struct aarch64_insn_relocation_data): New.
5486 (aarch64_ftrace_insn_reloc_b): New function.
5487 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5488 (aarch64_ftrace_insn_reloc_cb): Likewise.
5489 (aarch64_ftrace_insn_reloc_tb): Likewise.
5490 (aarch64_ftrace_insn_reloc_adr): Likewise.
5491 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5492 (aarch64_ftrace_insn_reloc_others): Likewise.
5493 (visitor): New.
5494 (aarch64_relocate_instruction): Use visitor.
5495
5496 2015-10-12 Yao Qi <yao.qi@linaro.org>
5497
5498 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5499 int. Add argument buf.
5500 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5501 aarch64_relocate_instruction.
5502
5503 2015-10-12 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5506 argument insn. Remove local variable insn. Don't call
5507 target_read_uint32.
5508 (aarch64_install_fast_tracepoint_jump_pad): Call
5509 target_read_uint32.
5510
5511 2015-09-30 Yao Qi <yao.qi@linaro.org>
5512
5513 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5514 (emit_load_store_pair): Likewise.
5515
5516 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5517
5518 * dll.c (match_dll): Add cast(s).
5519 (unloaded_dll): Likewise.
5520 * linux-low.c (second_thread_of_pid_p): Likewise.
5521 (delete_lwp_callback): Likewise.
5522 (count_events_callback): Likewise.
5523 (select_event_lwp_callback): Likewise.
5524 (linux_set_resume_request): Likewise.
5525 * server.c (accumulate_file_name_length): Likewise.
5526 (emit_dll_description): Likewise.
5527 (handle_qxfer_threads_worker): Likewise.
5528 (visit_actioned_threads): Likewise.
5529 * thread-db.c (any_thread_of): Likewise.
5530 * tracepoint.c (same_process_p): Likewise.
5531 (match_blocktype): Likewise.
5532 (build_traceframe_info_xml): Likewise.
5533
5534 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5535
5536 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5537 assignment.
5538 (gdb_unparse_agent_expr): Likewise.
5539 * hostio.c (require_data): Likewise.
5540 (handle_pread): Likewise.
5541 * linux-low.c (disable_regset): Likewise.
5542 (fetch_register): Likewise.
5543 (store_register): Likewise.
5544 (get_dynamic): Likewise.
5545 (linux_qxfer_libraries_svr4): Likewise.
5546 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5547 (set_fast_tracepoint_jump): Likewise.
5548 (uninsert_fast_tracepoint_jumps_at): Likewise.
5549 (reinsert_fast_tracepoint_jumps_at): Likewise.
5550 (validate_inserted_breakpoint): Likewise.
5551 (clone_agent_expr): Likewise.
5552 * regcache.c (init_register_cache): Likewise.
5553 * remote-utils.c (putpkt_binary_1): Likewise.
5554 (decode_M_packet): Likewise.
5555 (decode_X_packet): Likewise.
5556 (look_up_one_symbol): Likewise.
5557 (relocate_instruction): Likewise.
5558 (monitor_output): Likewise.
5559 * server.c (handle_search_memory): Likewise.
5560 (handle_qxfer_exec_file): Likewise.
5561 (handle_qxfer_libraries): Likewise.
5562 (handle_qxfer): Likewise.
5563 (handle_query): Likewise.
5564 (handle_v_cont): Likewise.
5565 (handle_v_run): Likewise.
5566 (captured_main): Likewise.
5567 * target.c (write_inferior_memory): Likewise.
5568 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5569 * tracepoint.c (init_trace_buffer): Likewise.
5570 (add_tracepoint_action): Likewise.
5571 (add_traceframe): Likewise.
5572 (add_traceframe_block): Likewise.
5573 (cmd_qtdpsrc): Likewise.
5574 (cmd_qtdv): Likewise.
5575 (cmd_qtstatus): Likewise.
5576 (response_source): Likewise.
5577 (response_tsv): Likewise.
5578 (cmd_qtnotes): Likewise.
5579 (gdb_collect): Likewise.
5580 (initialize_tracepoint): Likewise.
5581
5582 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5583
5584 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5585 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5586 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5587 <NOP>: New.
5588 (enum aarch64_condition_codes): New enum.
5589 (w0): New static global.
5590 (fp): Likewise.
5591 (lr): Likewise.
5592 (struct aarch64_memory_operand) <type>: New
5593 MEMORY_OPERAND_POSTINDEX type.
5594 (postindex_memory_operand): New helper function.
5595 (emit_ret): New function.
5596 (emit_load_store_pair): New function, factored out of emit_stp
5597 with support for MEMORY_OPERAND_POSTINDEX.
5598 (emit_stp): Rewrite using emit_load_store_pair.
5599 (emit_ldp): New function.
5600 (emit_load_store): Likewise.
5601 (emit_ldr): Mention post-index instruction in comment.
5602 (emit_ldrh): New function.
5603 (emit_ldrb): New function.
5604 (emit_ldrsw): Mention post-index instruction in comment.
5605 (emit_str): Likewise.
5606 (emit_subs): New function.
5607 (emit_cmp): Likewise.
5608 (emit_and): Likewise.
5609 (emit_orr): Likewise.
5610 (emit_orn): Likewise.
5611 (emit_eor): Likewise.
5612 (emit_mvn): Likewise.
5613 (emit_lslv): Likewise.
5614 (emit_lsrv): Likewise.
5615 (emit_asrv): Likewise.
5616 (emit_mul): Likewise.
5617 (emit_sbfm): Likewise.
5618 (emit_sbfx): Likewise.
5619 (emit_ubfm): Likewise.
5620 (emit_ubfx): Likewise.
5621 (emit_csinc): Likewise.
5622 (emit_cset): Likewise.
5623 (emit_nop): Likewise.
5624 (emit_ops_insns): New helper function.
5625 (emit_pop): Likewise.
5626 (emit_push): Likewise.
5627 (aarch64_emit_prologue): New function.
5628 (aarch64_emit_epilogue): Likewise.
5629 (aarch64_emit_add): Likewise.
5630 (aarch64_emit_sub): Likewise.
5631 (aarch64_emit_mul): Likewise.
5632 (aarch64_emit_lsh): Likewise.
5633 (aarch64_emit_rsh_signed): Likewise.
5634 (aarch64_emit_rsh_unsigned): Likewise.
5635 (aarch64_emit_ext): Likewise.
5636 (aarch64_emit_log_not): Likewise.
5637 (aarch64_emit_bit_and): Likewise.
5638 (aarch64_emit_bit_or): Likewise.
5639 (aarch64_emit_bit_xor): Likewise.
5640 (aarch64_emit_bit_not): Likewise.
5641 (aarch64_emit_equal): Likewise.
5642 (aarch64_emit_less_signed): Likewise.
5643 (aarch64_emit_less_unsigned): Likewise.
5644 (aarch64_emit_ref): Likewise.
5645 (aarch64_emit_if_goto): Likewise.
5646 (aarch64_emit_goto): Likewise.
5647 (aarch64_write_goto_address): Likewise.
5648 (aarch64_emit_const): Likewise.
5649 (aarch64_emit_call): Likewise.
5650 (aarch64_emit_reg): Likewise.
5651 (aarch64_emit_pop): Likewise.
5652 (aarch64_emit_stack_flush): Likewise.
5653 (aarch64_emit_zero_ext): Likewise.
5654 (aarch64_emit_swap): Likewise.
5655 (aarch64_emit_stack_adjust): Likewise.
5656 (aarch64_emit_int_call_1): Likewise.
5657 (aarch64_emit_void_call_2): Likewise.
5658 (aarch64_emit_eq_goto): Likewise.
5659 (aarch64_emit_ne_goto): Likewise.
5660 (aarch64_emit_lt_goto): Likewise.
5661 (aarch64_emit_le_goto): Likewise.
5662 (aarch64_emit_gt_goto): Likewise.
5663 (aarch64_emit_ge_got): Likewise.
5664 (aarch64_emit_ops_impl): New static global variable.
5665 (aarch64_emit_ops): New target function, return
5666 &aarch64_emit_ops_impl.
5667 (struct linux_target_ops): Install it.
5668
5669 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5670
5671 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5672 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5673 aarch64-ipa.o.
5674 * linux-aarch64-ipa.c: New file.
5675 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5676 and endian.h.
5677 (aarch64_get_thread_area): New target method.
5678 (extract_signed_bitfield): New helper function.
5679 (aarch64_decode_ldr_literal): New function.
5680 (enum aarch64_opcodes): New enum.
5681 (struct aarch64_register): New struct.
5682 (struct aarch64_operand): New struct.
5683 (x0): New static global.
5684 (x1): Likewise.
5685 (x2): Likewise.
5686 (x3): Likewise.
5687 (x4): Likewise.
5688 (w2): Likewise.
5689 (ip0): Likewise.
5690 (sp): Likewise.
5691 (xzr): Likewise.
5692 (aarch64_register): New helper function.
5693 (register_operand): Likewise.
5694 (immediate_operand): Likewise.
5695 (struct aarch64_memory_operand): New struct.
5696 (offset_memory_operand): New helper function.
5697 (preindex_memory_operand): Likewise.
5698 (enum aarch64_system_control_registers): New enum.
5699 (ENCODE): New macro.
5700 (emit_insn): New helper function.
5701 (emit_b): New function.
5702 (emit_bcond): Likewise.
5703 (emit_cb): Likewise.
5704 (emit_tb): Likewise.
5705 (emit_blr): Likewise.
5706 (emit_stp): Likewise.
5707 (emit_ldp_q_offset): Likewise.
5708 (emit_stp_q_offset): Likewise.
5709 (emit_load_store): Likewise.
5710 (emit_ldr): Likewise.
5711 (emit_ldrsw): Likewise.
5712 (emit_str): Likewise.
5713 (emit_ldaxr): Likewise.
5714 (emit_stxr): Likewise.
5715 (emit_stlr): Likewise.
5716 (emit_data_processing_reg): Likewise.
5717 (emit_data_processing): Likewise.
5718 (emit_add): Likewise.
5719 (emit_sub): Likewise.
5720 (emit_mov): Likewise.
5721 (emit_movk): Likewise.
5722 (emit_mov_addr): Likewise.
5723 (emit_mrs): Likewise.
5724 (emit_msr): Likewise.
5725 (emit_sevl): Likewise.
5726 (emit_wfe): Likewise.
5727 (append_insns): Likewise.
5728 (can_encode_int32_in): New helper function.
5729 (aarch64_relocate_instruction): New function.
5730 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5731 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5732 (struct linux_target_ops): Install aarch64_get_thread_area,
5733 aarch64_install_fast_tracepoint_jump_pad and
5734 aarch64_get_min_fast_tracepoint_insn_len.
5735
5736 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5737
5738 * Makefile.in (aarch64-insn.o): New rule.
5739 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5740
5741 2015-09-21 Yao Qi <yao.qi@linaro.org>
5742
5743 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5744
5745 2015-09-21 Yao Qi <yao.qi@linaro.org>
5746
5747 * tracepoint.c (max_jump_pad_size): Remove.
5748
5749 2015-09-18 Yao Qi <yao.qi@linaro.org>
5750
5751 * linux-aarch64-low.c: Don't include sys/uio.h.
5752 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5753
5754 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5755
5756 * tracepoint.c (eval_result_type): Change prototype.
5757 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5758
5759 2015-09-15 Pedro Alves <palves@redhat.com>
5760
5761 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5762 Check whether to report exec events instead of checking whether
5763 multiprocess is enabled.
5764
5765 2015-09-15 Pedro Alves <palves@redhat.com>
5766
5767 PR remote/18965
5768 * remote-utils.c (prepare_resume_reply): Merge
5769 TARGET_WAITKIND_VFORK_DONE switch case with the
5770 TARGET_WAITKIND_FORKED case.
5771
5772 2015-09-15 Yao Qi <yao.qi@linaro.org>
5773
5774 * server.c (handle_query): Check string comparison using
5775 "else if" instead of "if".
5776
5777 2015-09-15 Yao Qi <yao.qi@linaro.org>
5778
5779 * server.c (vCont_supported): New global variable.
5780 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5781 matches. Append ";vContSupported+" to own_buf.
5782 (handle_v_requests): Append ";s;S" to own_buf if target supports
5783 hardware single step or vCont_supported is false.
5784 (capture_main): Set vCont_supported to zero.
5785
5786 2015-09-15 Yao Qi <yao.qi@linaro.org>
5787
5788 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5789 it to ...
5790 (linux_supports_hardware_single_step): ... New function.
5791 (linux_target_ops): Update.
5792 * lynx-low.c (lynx_target_ops): Set field
5793 supports_hardware_single_step to target_can_do_hardware_single_step.
5794 * nto-low.c (nto_target_ops): Likewise.
5795 * spu-low.c (spu_target_ops): Likewise.
5796 * win32-low.c (win32_target_ops): Likewise.
5797 * target.c (target_can_do_hardware_single_step): New function.
5798 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5799 Remove. <supports_hardware_single_step>: New field.
5800 (target_supports_conditional_breakpoints): Remove.
5801 (target_supports_hardware_single_step): New macro.
5802 (target_can_do_hardware_single_step): Declare.
5803 * server.c (handle_query): Use target_supports_hardware_single_step
5804 instead of target_supports_conditional_breakpoints.
5805
5806 2015-09-15 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5809 function.
5810 (struct linux_target_ops the_low_target): Install
5811 aarch64_linux_siginfo_fixup.
5812
5813 2015-09-11 Don Breazeal <donb@codesourcery.com>
5814 Luis Machado <lgustavo@codesourcery.com>
5815
5816 * linux-low.c (linux_mourn): Static declaration.
5817 (linux_arch_setup): Move in front of
5818 handle_extended_wait.
5819 (linux_arch_setup_thread): New function.
5820 (handle_extended_wait): Handle exec events. Call
5821 linux_arch_setup_thread. Make event_lwp argument a
5822 pointer-to-a-pointer.
5823 (check_zombie_leaders): Do not check stopped threads.
5824 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5825 (linux_low_filter_event): Add lwp and thread for exec'ing
5826 non-leader thread if leader thread has been deleted.
5827 Refactor code into linux_arch_setup_thread and call it.
5828 Pass child lwp pointer by reference to handle_extended_wait.
5829 (linux_wait_for_event_filtered): Update comment.
5830 (linux_wait_1): Prevent clobbering exec event status.
5831 (linux_supports_exec_events): New function.
5832 (linux_target_ops) <supports_exec_events>: Initialize new member.
5833 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5834 new member.
5835 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5836 * server.c (report_exec_events): New global variable.
5837 (handle_query): Handle qSupported query for exec-events feature.
5838 (captured_main): Initialize report_exec_events.
5839 * server.h (report_exec_events): Declare new global variable.
5840 * target.h (struct target_ops) <supports_exec_events>: New
5841 member.
5842 (target_supports_exec_events): New macro.
5843 * win32-low.c (win32_target_ops) <supports_exec_events>:
5844 Initialize new member.
5845
5846 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5847
5848 * linux-low.c (linux_low_enable_btrace): Remove.
5849 (linux_target_ops): Replace linux_low_enable_btrace with
5850 linux_enable_btrace.
5851
5852 2015-09-03 Yao Qi <yao.qi@linaro.org>
5853
5854 * linux-aarch64-low.c (aarch64_insert_point): Call
5855 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5856 returns true.
5857
5858 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5859
5860 * linux-low.c (check_stopped_by_breakpoint): Use
5861 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5862
5863 2015-08-27 Pedro Alves <palves@redhat.com>
5864
5865 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5866
5867 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5868
5869 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5870 the XNEW-family equivalent.
5871 (compile_bytecodes): Likewise.
5872 * dll.c (loaded_dll): Likewise.
5873 * event-loop.c (append_callback_event): Likewise.
5874 (create_file_handler): Likewise.
5875 (create_file_event): Likewise.
5876 * hostio.c (handle_open): Likewise.
5877 * inferiors.c (add_thread): Likewise.
5878 (add_process): Likewise.
5879 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5880 * linux-arm-low.c (arm_new_process): Likewise.
5881 (arm_new_thread): Likewise.
5882 * linux-low.c (add_to_pid_list): Likewise.
5883 (linux_add_process): Likewise.
5884 (handle_extended_wait): Likewise.
5885 (add_lwp): Likewise.
5886 (enqueue_one_deferred_signal): Likewise.
5887 (enqueue_pending_signal): Likewise.
5888 (linux_resume_one_lwp_throw): Likewise.
5889 (linux_resume_one_thread): Likewise.
5890 (linux_read_memory): Likewise.
5891 (linux_write_memory): Likewise.
5892 * linux-mips-low.c (mips_linux_new_process): Likewise.
5893 (mips_linux_new_thread): Likewise.
5894 (mips_add_watchpoint): Likewise.
5895 * linux-x86-low.c (initialize_low_arch): Likewise.
5896 * lynx-low.c (lynx_add_process): Likewise.
5897 * mem-break.c (set_raw_breakpoint_at): Likewise.
5898 (set_breakpoint): Likewise.
5899 (add_condition_to_breakpoint): Likewise.
5900 (add_commands_to_breakpoint): Likewise.
5901 (clone_agent_expr): Likewise.
5902 (clone_one_breakpoint): Likewise.
5903 * regcache.c (new_register_cache): Likewise.
5904 * remote-utils.c (look_up_one_symbol): Likewise.
5905 * server.c (queue_stop_reply): Likewise.
5906 (start_inferior): Likewise.
5907 (queue_stop_reply_callback): Likewise.
5908 (handle_target_event): Likewise.
5909 * spu-low.c (fetch_ppc_memory): Likewise.
5910 (store_ppc_memory): Likewise.
5911 * target.c (set_target_ops): Likewise.
5912 * thread-db.c (thread_db_load_search): Likewise.
5913 (try_thread_db_load_1): Likewise.
5914 * tracepoint.c (add_tracepoint): Likewise.
5915 (add_tracepoint_action): Likewise.
5916 (create_trace_state_variable): Likewise.
5917 (cmd_qtdpsrc): Likewise.
5918 (cmd_qtro): Likewise.
5919 (add_while_stepping_state): Likewise.
5920 * win32-low.c (child_add_thread): Likewise.
5921 (get_image_name): Likewise.
5922
5923 2015-08-25 Yao Qi <yao.qi@linaro.org>
5924
5925 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5926
5927 2015-08-25 Yao Qi <yao.qi@linaro.org>
5928
5929 * Makefile.in (aarch64-linux.o): New rule.
5930 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5931 srv_tgtobj.
5932 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5933 (aarch64_init_debug_reg_state): Make it extern.
5934 (aarch64_linux_prepare_to_resume): Remove.
5935
5936 2015-08-25 Yao Qi <yao.qi@linaro.org>
5937
5938 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5939 lwp_arch_private_info and ptid_of_lwp.
5940
5941 2015-08-25 Yao Qi <yao.qi@linaro.org>
5942
5943 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5944 Find proc_info by find_process_pid. All callers updated.
5945
5946 2015-08-25 Yao Qi <yao.qi@linaro.org>
5947
5948 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5949 Remove.
5950 (debug_reg_change_callback): Remove.
5951 (aarch64_notify_debug_reg_change): Remove.
5952
5953 2015-08-25 Yao Qi <yao.qi@linaro.org>
5954
5955 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5956 Call current_lwp_ptid.
5957
5958 2015-08-25 Yao Qi <yao.qi@linaro.org>
5959
5960 * linux-aarch64-low.c (debug_reg_change_callback): Use
5961 debug_printf.
5962
5963 2015-08-25 Yao Qi <yao.qi@linaro.org>
5964
5965 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5966
5967 2015-08-25 Yao Qi <yao.qi@linaro.org>
5968
5969 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5970
5971 2015-08-25 Yao Qi <yao.qi@linaro.org>
5972
5973 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5974 the code.
5975
5976 2015-08-25 Yao Qi <yao.qi@linaro.org>
5977
5978 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5979 Remove.
5980 (debug_reg_change_callback): Remove argument entry and add argument
5981 lwp. Remove local variable thread. Don't print thread id in the
5982 debugging output. Don't check whether pid of thread equals to pid.
5983 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5984 iterate_over_lwps instead find_inferior.
5985
5986 2015-08-24 Pedro Alves <palves@redhat.com>
5987
5988 * inferiors.c (get_first_process): New function.
5989 * inferiors.h (get_first_process): New declaration.
5990 * remote-utils.c (read_ptid): Default to the first process in the
5991 list, instead of to the current thread's process.
5992
5993 2015-08-24 Pedro Alves <palves@redhat.com>
5994
5995 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5996 * event-loop.c: Likewise.
5997 * remote-utils.c: Likewise.
5998 * tracepoint.c: Likewise.
5999
6000 2015-08-24 Pedro Alves <palves@redhat.com>
6001
6002 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6003 ptid_get_lwp.
6004
6005 2015-08-21 Pedro Alves <palves@redhat.com>
6006
6007 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6008 instead of literal 1.
6009
6010 2015-08-21 Pedro Alves <palves@redhat.com>
6011
6012 * tdesc.c (default_description): Explicitly zero-initialize.
6013
6014 2015-08-21 Pedro Alves <palves@redhat.com>
6015
6016 PR gdb/18749
6017 * inferiors.c (remove_thread): Discard any pending stop reply for
6018 this thread.
6019 * server.c (remove_all_on_match_pid): Rename to ...
6020 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6021 instead of a pid.
6022 (discard_queued_stop_replies): Change parameter to a ptid. Now
6023 extern.
6024 (handle_v_kill, kill_inferior_callback, captured_main)
6025 (process_serial_event): Adjust.
6026 * server.h (discard_queued_stop_replies): Declare.
6027
6028 2015-08-21 Pedro Alves <palves@redhat.com>
6029
6030 * linux-low.c (wait_for_sigstop): Always switch to no thread
6031 selected if the previously current thread dies.
6032 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6033 process instead of the current thread's.
6034 * remote-utils.c (input_interrupt): Don't check if there's no
6035 current thread.
6036 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6037 current thread to the general thread fails, error out.
6038 (handle_qxfer_auxv, handle_qxfer_libraries)
6039 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6040 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6041 (handle_query): Check if there's a thread selected instead of
6042 checking whether there's any thread in the thread list.
6043 (handle_qxfer_threads, handle_qxfer_btrace)
6044 (handle_qxfer_btrace_conf): Don't error out early if there's no
6045 thread in the thread list.
6046 (handle_v_cont, myresume): Don't set the current thread to the
6047 continue thread.
6048 (process_serial_event) <Hg handling>: Also set thread_id if the
6049 previous general thread is still alive.
6050 (process_serial_event) <g/G handling>: If setting the current
6051 thread to the general thread fails, error out.
6052 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6053 thread's lwp instead of the current thread's.
6054 * target.c (set_desired_thread): If the desired thread was not
6055 found, leave the current thread pointing to NULL. Return an int
6056 (boolean) indicating success.
6057 * target.h (set_desired_thread): Change return type to int.
6058
6059 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6060
6061 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6062 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6063 #includes.
6064 (ps_get_thread_area): New function.
6065
6066 2015-08-19 Gary Benson <gbenson@redhat.com>
6067
6068 * hostio.c (handle_pread): Do not attempt to read more data
6069 than hostio_reply_with_data can fit in a packet.
6070
6071 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6072
6073 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6074
6075 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6076
6077 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6078
6079 2015-08-06 Pedro Alves <palves@redhat.com>
6080
6081 * tracepoint.c (expr_eval_result): Now an int.
6082
6083 2015-08-06 Pedro Alves <palves@redhat.com>
6084
6085 * gdbthread.h (struct regcache): Forward declare.
6086 (struct thread_info) <regcache_data>: Now a struct regcache
6087 pointer.
6088 * inferiors.c (inferior_regcache_data)
6089 (set_inferior_regcache_data): Now work with struct regcache
6090 pointers.
6091 * inferiors.h (struct regcache): Forward declare.
6092 (inferior_regcache_data, set_inferior_regcache_data): Now work
6093 with struct regcache pointers.
6094 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6095 (free_register_cache_thread): Remove struct regcache pointer
6096 casts.
6097
6098 2015-08-06 Pedro Alves <palves@redhat.com>
6099
6100 * server.c (captured_main): On error, print the exception message
6101 to stderr, and if run_once is set, throw a quit.
6102
6103 2015-08-06 Pedro Alves <palves@redhat.com>
6104
6105 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6106 the current thread.
6107
6108 2015-08-06 Pedro Alves <palves@redhat.com>
6109
6110 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6111 reading beyond the passed in buffer length.
6112
6113 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6114
6115 * tracepoint.c (symbol_list) <required>: Remove.
6116
6117 2015-08-06 Pedro Alves <palves@redhat.com>
6118
6119 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6120 count if stopping and suspending threads.
6121 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6122 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6123 (linux_detach): Complete an ongoing step-over.
6124 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6125 throughout.
6126 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6127 (linux_wait_1): If passing a signal to the inferior after
6128 finishing a step-over, unsuspend and re-resume all lwps. If we
6129 see a single-step event but the thread should be continuing, don't
6130 pass the trap to gdb.
6131 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6132 internal_error instead of gdb_assert.
6133 (enqueue_pending_signal): New function.
6134 (check_ptrace_stopped_lwp_gone): Add debug output.
6135 (start_step_over): Use internal_error instead of gdb_assert.
6136 (complete_ongoing_step_over): New function.
6137 (linux_resume_one_thread): Don't resume a suspended thread.
6138 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6139 it stepping.
6140
6141 2015-08-06 Pedro Alves <palves@redhat.com>
6142
6143 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6144 (linux_thread_alive): Use lwp_is_marked_dead.
6145 (extended_event_reported): Delete.
6146 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6147 instead of extended_event_reported.
6148 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6149 as well.
6150 (lwp_is_marked_dead): New function.
6151 (lwp_running): Use lwp_is_marked_dead.
6152 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6153 comment.
6154
6155 2015-08-06 Pedro Alves <palves@redhat.com>
6156
6157 * linux-low.c (linux_wait_1): Move fork event output out of the
6158 !report_to_gdb check. Pass event_child->waitstatus to
6159 target_waitstatus_to_string instead of ourstatus.
6160
6161 2015-08-04 Yao Qi <yao.qi@linaro.org>
6162
6163 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6164 if current_thread is 32 bit.
6165
6166 2015-08-04 Yao Qi <yao.qi@linaro.org>
6167
6168 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6169 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6170 * server.c (extended_protocol): Remove "static".
6171 * server.h (extended_protocol): Declare it.
6172
6173 2015-08-04 Yao Qi <yao.qi@linaro.org>
6174
6175 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6176 both aarch64 and aarch32.
6177 (aarch64_set_pc): Likewise.
6178
6179 2015-08-04 Yao Qi <yao.qi@linaro.org>
6180
6181 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6182 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6183 arm-with-neon.xml to srv_xmlfiles.
6184 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6185 (is_64bit_tdesc): New function.
6186 (aarch64_linux_read_description): New function.
6187 (aarch64_arch_setup): Call aarch64_linux_read_description.
6188 (regs_info): Rename to regs_info_aarch64.
6189 (aarch64_regs_info): Return right regs_info.
6190 (initialize_low_arch): Call initialize_low_arch_aarch32.
6191
6192 2015-08-04 Yao Qi <yao.qi@linaro.org>
6193
6194 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6195 * linux-aarch32-low.c: New file.
6196 * linux-aarch32-low.h: New file.
6197 * linux-arm-low.c (arm_fill_gregset): Move it to
6198 linux-aarch32-low.c.
6199 (arm_store_gregset): Likewise.
6200 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6201 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6202 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6203 (regs_info): Rename to regs_info_arm.
6204 (arm_regs_info): Return regs_info_aarch32 if
6205 have_ptrace_getregset is 1 and target description is
6206 arm_with_neon or arm_with_vfpv3.
6207 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6208 Call initialize_low_arch_aarch32 instead.
6209
6210 2015-08-04 Yao Qi <yao.qi@linaro.org>
6211
6212 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6213 * linux-low.c: ... here.
6214 * linux-low.h (have_ptrace_getregset): Declare it.
6215
6216 2015-08-04 Pedro Alves <palves@redhat.com>
6217
6218 * thread-db.c (struct thread_db): Use new typedefs.
6219 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6220 CHK calls.
6221 (disable_thread_event_reporting): Cast result of dlsym to
6222 destination function pointer type.
6223 (thread_db_mourn): Use td_ta_delete_ftype.
6224
6225 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6226
6227 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6228 arch variant.
6229 (CDX_BREAKPOINT): Define for R2.
6230 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6231 (the_low_target): Add comments.
6232
6233 2015-07-30 Yao Qi <yao.qi@linaro.org>
6234
6235 * linux-arm-low.c (arm_hwcap): Remove it.
6236 (arm_read_description): New local variable arm_hwcap. Don't
6237 set arm_hwcap to zero.
6238
6239 2015-07-30 Yao Qi <yao.qi@linaro.org>
6240
6241 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6242 Use regcache->tdesc instead.
6243 (arm_store_wmmxregset): Likewise.
6244 (arm_fill_vfpregset): Likewise.
6245 (arm_store_vfpregset): Likewise.
6246
6247 2015-07-30 Yao Qi <yao.qi@linaro.org>
6248
6249 * linux-arm-low.c: Include arch/arm.h.
6250 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6251 (arm_store_gregset): Likewise.
6252
6253 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6254
6255 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6256 ptrace's 4th parameter.
6257
6258 2015-07-27 Yao Qi <yao.qi@linaro.org>
6259
6260 * configure.srv (case aarch64*-*-linux*): Don't set
6261 srv_linux_usrregs.
6262
6263 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6264
6265 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6266 sys/ptrace.h.
6267 * linux-arm-low.c: Likewise.
6268 * linux-cris-low.c: Likewise.
6269 * linux-crisv32-low.c: Likewise.
6270 * linux-low.c: Likewise.
6271 * linux-m68k-low.c: Likewise.
6272 * linux-mips-low.c: Likewise.
6273 * linux-nios2-low.c: Likewise.
6274 * linux-s390-low.c: Likewise.
6275 * linux-sparc-low.c: Likewise.
6276 * linux-tic6x-low.c: Likewise.
6277 * linux-tile-low.c: Likewise.
6278 * linux-x86-low.c: Likewise.
6279
6280 2015-07-24 Pedro Alves <palves@redhat.com>
6281
6282 * config.in: Regenerate.
6283 * configure: Regenerate.
6284
6285 2015-07-24 Pedro Alves <palves@redhat.com>
6286
6287 * acinclude.m4: Include ../ptrace.m4.
6288 * configure.ac: Call GDB_AC_PTRACE.
6289 * config.in, configure: Regenerate.
6290
6291 2015-07-24 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-low.c (linux_create_inferior): Remove setting to
6294 proc->priv->new_inferior.
6295 (linux_attach): Likewise.
6296 (linux_low_filter_event): Likewise.
6297 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6298
6299 2015-07-24 Yao Qi <yao.qi@linaro.org>
6300
6301 * linux-low.c (linux_arch_setup): New function.
6302 (linux_low_filter_event): If proc->tdesc is NULL and
6303 proc->attached is true, call the_low_target.arch_setup.
6304 Otherwise, keep status pending, and return.
6305 (linux_resume_one_lwp_throw): Don't call get_pc if
6306 thread->while_stepping isn't NULL. Don't call
6307 get_thread_regcache if proc->tdesc is NULL.
6308 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6309 (linux_target_ops): Install arch_setup.
6310 * server.c (start_inferior): Call the_target->arch_setup.
6311 * target.h (struct target_ops) <arch_setup>: New field.
6312 (target_arch_setup): New marco.
6313 * lynx-low.c (lynx_target_ops): Update.
6314 * nto-low.c (nto_target_ops): Update.
6315 * spu-low.c (spu_target_ops): Update.
6316 * win32-low.c (win32_target_ops): Update.
6317
6318 2015-07-24 Yao Qi <yao.qi@linaro.org>
6319
6320 * linux-low.c (linux_add_process): Don't set
6321 proc->priv->new_inferior.
6322 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6323 (linux_attach): Likewise.
6324
6325 2015-07-24 Yao Qi <yao.qi@linaro.org>
6326
6327 * server.c (start_inferior): Code refactor.
6328
6329 2015-07-24 Yao Qi <yao.qi@linaro.org>
6330
6331 * server.c (process_serial_event): Set general_thread.
6332
6333 2015-07-21 Yao Qi <yao.qi@linaro.org>
6334
6335 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6336 aarch64_linux_get_debug_reg_capacity.
6337
6338 2015-07-17 Yao Qi <yao.qi@linaro.org>
6339
6340 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6341 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6342 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6343 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6344 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6345 (AARCH64_HWP_ALIGNMENT): Likewise.
6346 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6347 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6348 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6349 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6350 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6351 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6352 (struct aarch64_debug_reg_state): Likewise.
6353 (struct arch_lwp_info): Likewise.
6354 (aarch64_align_watchpoint): Likewise.
6355 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6356 (aarch64_watchpoint_length): Likewise.
6357 (aarch64_point_encode_ctrl_reg): Likewise
6358 (aarch64_point_is_aligned): Likewise.
6359 (aarch64_align_watchpoint): Likewise.
6360 (aarch64_linux_set_debug_regs):
6361 (aarch64_dr_state_insert_one_point): Likewise.
6362 (aarch64_dr_state_remove_one_point): Likewise.
6363 (aarch64_handle_breakpoint): Likewise.
6364 (aarch64_handle_aligned_watchpoint): Likewise.
6365 (aarch64_handle_unaligned_watchpoint): Likewise.
6366 (aarch64_handle_watchpoint): Likewise.
6367
6368 2015-07-17 Yao Qi <yao.qi@linaro.org>
6369
6370 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6371 and don't aarch64_get_debug_reg_state. All callers update.
6372 (aarch64_handle_aligned_watchpoint): Likewise.
6373 (aarch64_handle_unaligned_watchpoint): Likewise.
6374 (aarch64_handle_watchpoint): Likewise.
6375 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6376 (aarch64_remove_point): Likewise.
6377
6378 2015-07-17 Yao Qi <yao.qi@linaro.org>
6379
6380 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6381 debug_printf.
6382 (aarch64_handle_unaligned_watchpoint): Likewise.
6383
6384 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6385
6386 Revert the previous 3 commits:
6387 Move gdb_regex* to common/
6388 Move linux_find_memory_regions_full & co.
6389 gdbserver build-id attribute generator
6390
6391 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6392 Jan Kratochvil <jan.kratochvil@redhat.com>
6393
6394 gdbserver build-id attribute generator.
6395 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6396 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6397 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6398 (find_phdr): New.
6399 (get_dynamic): Use find_pdhr to traverse program headers.
6400 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6401 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6402 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6403 (get_hex_build_id): New.
6404 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6405 to reply XML document.
6406
6407 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6408 Jan Kratochvil <jan.kratochvil@redhat.com>
6409
6410 * target.c: Include target/target-utils.h and fcntl.h.
6411 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6412 (target_fileio_read_stralloc): New functions.
6413
6414 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6415
6416 * Makefile.in (OBS): Add gdb_regex.o.
6417 (gdb_regex.o): New.
6418 * config.in: Rebuilt.
6419 * configure: Rebuilt.
6420
6421 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6422 Jan Kratochvil <jan.kratochvil@redhat.com>
6423
6424 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6425 * Makefile.in (OBS): Add target-utils.o.
6426 (linux-maps.o, target-utils.o): New.
6427 * configure.srv (srv_linux_obj): Add linux-maps.o.
6428
6429 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6430
6431 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6432 function, return 1.
6433 (the_low_target): Install it.
6434
6435 2015-07-14 Pedro Alves <palves@redhat.com>
6436
6437 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6438 Instead, ignore ECHILD, and throw an error for other errnos.
6439
6440 2015-07-10 Pedro Alves <palves@redhat.com>
6441
6442 * event-loop.c (struct callback_event) <data>: Change type to
6443 gdb_client_data instance instead of gdb_client_data pointer.
6444 (append_callback_event): Adjust.
6445
6446 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6447
6448 * linux-aarch64-low.c: Add comments for each linux_target_ops
6449 method. Remove comments already covered in target_ops and
6450 linux_target_ops definitions.
6451 (the_low_target): Add comments for each unimplemented method.
6452
6453 2015-07-09 Yao Qi <yao.qi@linaro.org>
6454
6455 * linux-aarch64-low.c (aarch64_regmap): Remove.
6456 (aarch64_usrregs_info): Remove.
6457 (regs_info): Set field usrregs to NULL.
6458
6459 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6460
6461 * linux-low.c: Include "rsp-low.h"
6462 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6463 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6464 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6465 (handle_btrace_enable_pt): New.
6466 (handle_btrace_general_set): Support "pt".
6467 (handle_btrace_conf_general_set): Support "pt:size".
6468
6469 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6470
6471 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6472 Z_PACKET_SW_BP.
6473
6474 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6475
6476 * linux-aarch64-low.c: Remove comment about endianness.
6477 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6478 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6479 memcmp.
6480
6481 2015-06-24 Gary Benson <gbenson@redhat.com>
6482
6483 * linux-i386-ipa.c (stdint.h): Do not include.
6484 * lynx-i386-low.c (stdint.h): Likewise.
6485 * lynx-ppc-low.c (stdint.h): Likewise.
6486 * mem-break.c (stdint.h): Likewise.
6487 * thread-db.c (stdint.h): Likewise.
6488 * tracepoint.c (stdint.h): Likewise.
6489 * win32-low.c (stdint.h): Likewise.
6490
6491 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6492
6493 * server.c (write_qxfer_response): Update call to
6494 remote_escape_output.
6495
6496 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6497 Jan Kratochvil <jan.kratochvil@redhat.com>
6498
6499 Merge multiple hex conversions.
6500 * gdbreplay.c (tohex): Rename to 'fromhex'.
6501 (logchar): Use fromhex.
6502
6503 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6504
6505 * server.c (handle_qxfer_libraries): Set `version' attribute for
6506 <library-list>.
6507
6508 2015-06-10 Gary Benson <gbenson@redhat.com>
6509
6510 * target.h (struct target_ops) <multifs_open>: New field.
6511 <multifs_unlink>: Likewise.
6512 <multifs_readlink>: Likewise.
6513 * linux-low.c (nat/linux-namespaces.h): New include.
6514 (linux_target_ops): Initialize the_target->multifs_open,
6515 the_target->multifs_unlink and the_target->multifs_readlink.
6516 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6517 * hostio.c (hostio_fs_pid): New static variable.
6518 (hostio_handle_new_gdb_connection): New function.
6519 (handle_setfs): Likewise.
6520 (handle_open): Use the_target->multifs_open as appropriate.
6521 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6522 (handle_readlink): Use the_target->multifs_readlink as
6523 appropriate.
6524 (handle_vFile): Handle vFile:setfs packets.
6525 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6526 after target_handle_new_gdb_connection.
6527
6528 2015-06-10 Gary Benson <gbenson@redhat.com>
6529
6530 * configure.ac (AC_CHECK_FUNCS): Add setns.
6531 * config.in: Regenerate.
6532 * configure: Likewise.
6533 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6534 (linux-namespaces.o): New rule.
6535 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6536
6537 2015-06-09 Gary Benson <gbenson@redhat.com>
6538
6539 * hostio.c (handle_open): Process mode argument with
6540 fileio_to_host_mode.
6541
6542 2015-06-01 Yao Qi <yao.qi@linaro.org>
6543
6544 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6545 * linux-x86-low.c: Likewise.
6546
6547 2015-05-28 Don Breazeal <donb@codesourcery.com>
6548
6549 * linux-low.c (handle_extended_wait): Initialize
6550 thread_info.last_resume_kind for new fork children.
6551
6552 2015-05-15 Pedro Alves <palves@redhat.com>
6553
6554 * target.h (target_handle_new_gdb_connection): Rewrite using if
6555 wrapped in do/while.
6556
6557 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6558
6559 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6560 * configure, config.in: Regenerate.
6561 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6562 Declare typedef.
6563
6564 2015-05-12 Don Breazeal <donb@codesourcery.com>
6565
6566 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6567 PTRACE_EVENT_VFORK_DONE.
6568 (linux_low_ptrace_options, extended_event_reported): Add vfork
6569 events.
6570 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6571 and "vforkdone" for RSP 'T' Stop Reply Packet.
6572 * server.h (report_vfork_events): Declare
6573 global variable.
6574
6575 2015-05-12 Don Breazeal <donb@codesourcery.com>
6576
6577 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6578 (the_low_target) <new_fork>: Initialize new member.
6579 * linux-arm-low.c (arm_new_fork): New function.
6580 (the_low_target) <new_fork>: Initialize new member.
6581 * linux-low.c (handle_extended_wait): Call new target function
6582 new_fork.
6583 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6584 * linux-mips-low.c (mips_add_watchpoint): New function
6585 extracted from mips_insert_point.
6586 (the_low_target) <new_fork>: Initialize new member.
6587 (mips_linux_new_fork): New function.
6588 (mips_insert_point): Call mips_add_watchpoint.
6589 * linux-x86-low.c (x86_linux_new_fork): New function.
6590 (the_low_target) <new_fork>: Initialize new member.
6591
6592 2015-05-12 Don Breazeal <donb@codesourcery.com>
6593
6594 * linux-low.c (handle_extended_wait): Implement return value,
6595 rename argument 'event_child' to 'event_lwp', handle
6596 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6597 (linux_low_ptrace_options): New function.
6598 (linux_low_filter_event): Call linux_low_ptrace_options,
6599 use different argument fo linux_enable_event_reporting,
6600 use return value from handle_extended_wait.
6601 (extended_event_reported): New function.
6602 (linux_wait_1): Call extended_event_reported and set
6603 status to report fork events.
6604 (linux_write_memory): Add pid to debug message.
6605 (reset_lwp_ptrace_options_callback): New function.
6606 (linux_handle_new_gdb_connection): New function.
6607 (linux_target_ops): Initialize new structure member.
6608 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6609 * lynx-low.c: Initialize new structure member.
6610 * remote-utils.c (prepare_resume_reply): Implement stop reason
6611 "fork" for "T" stop message.
6612 * server.c (handle_query): Call handle_new_gdb_connection.
6613 * server.h (report_fork_events): Declare global flag.
6614 * target.h (struct target_ops) <handle_new_gdb_connection>:
6615 New member.
6616 (target_handle_new_gdb_connection): New macro.
6617 * win32-low.c: Initialize new structure member.
6618
6619 2015-05-12 Don Breazeal <donb@codesourcery.com>
6620
6621 * mem-break.c (APPEND_TO_LIST): Define macro.
6622 (clone_agent_expr): New function.
6623 (clone_one_breakpoint): New function.
6624 (clone_all_breakpoints): New function.
6625 * mem-break.h: Declare new functions.
6626
6627 2015-05-12 Don Breazeal <donb@codesourcery.com>
6628
6629 * linux-low.c (linux_supports_fork_events): New function.
6630 (linux_supports_vfork_events): New function.
6631 (linux_target_ops): Initialize new structure members.
6632 (initialize_low): Call linux_check_ptrace_features.
6633 * lynx-low.c (lynx_target_ops): Initialize new structure
6634 members.
6635 * server.c (report_fork_events, report_vfork_events):
6636 New global flags.
6637 (handle_query): Add new features to qSupported packet and
6638 response.
6639 (captured_main): Initialize new global variables.
6640 * target.h (struct target_ops) <supports_fork_events>:
6641 New member.
6642 <supports_vfork_events>: New member.
6643 (target_supports_fork_events): New macro.
6644 (target_supports_vfork_events): New macro.
6645 * win32-low.c (win32_target_ops): Initialize new structure
6646 members.
6647
6648 2015-05-12 Gary Benson <gbenson@redhat.com>
6649
6650 * server.c (handle_qxfer_exec_file): Use current process
6651 if annex is empty.
6652
6653 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6654
6655 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6656 Remove HAVE_PTRACE_GETREGS conditionals.
6657 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6658 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6659
6660 2015-05-08 Yao Qi <yao.qi@linaro.org>
6661
6662 * linux-low.c (linux_supports_conditional_breakpoints): New
6663 function.
6664 (linux_target_ops): Install new target method.
6665 * lynx-low.c (lynx_target_ops): Install NULL hook for
6666 supports_conditional_breakpoints.
6667 * nto-low.c (nto_target_ops): Likewise.
6668 * spu-low.c (spu_target_ops): Likewise.
6669 * win32-low.c (win32_target_ops): Likewise.
6670 * server.c (handle_query): Check
6671 target_supports_conditional_breakpoints.
6672 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6673 New field.
6674 (target_supports_conditional_breakpoints): New macro.
6675
6676 2015-05-06 Pedro Alves <palves@redhat.com>
6677
6678 PR server/18081
6679 * server.c (start_inferior): If the process exits, mourn it.
6680
6681 2015-04-21 Gary Benson <gbenson@redhat.com>
6682
6683 * hostio.c (fileio_open_flags_to_host): Factored out to
6684 fileio_to_host_openflags in common/fileio.c. Single use
6685 updated.
6686
6687 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6688
6689 * linux-xtensa-low.c (xtensa_fill_gregset)
6690 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6691 XCHAL_HAVE_LOOP.
6692
6693 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6694
6695 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6696 (regs_info): Replace usrregs pointer with NULL.
6697
6698 2015-04-17 Gary Benson <gbenson@redhat.com>
6699
6700 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6701 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6702 * server.c (handle_qxfer_exec_file): New function.
6703 (qxfer_packets): Add exec-file entry.
6704 (handle_query): Report qXfer:exec-file:read as supported packet.
6705
6706 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6707
6708 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6709
6710 2015-04-09 Gary Benson <gbenson@redhat.com>
6711
6712 * hostio-errno.c (errno_to_fileio_error): Remove function.
6713 Update caller to use remote_fileio_to_fio_error.
6714
6715 2015-04-09 Yao Qi <yao.qi@linaro.org>
6716
6717 * linux-low.c (linux_insert_point): Call
6718 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6719 (linux_remove_point): Call remove_memory_breakpoint if type is
6720 raw_bkpt_type_sw.
6721 * linux-x86-low.c (x86_insert_point): Don't call
6722 insert_memory_breakpoint.
6723 (x86_remove_point): Don't call remove_memory_breakpoint.
6724
6725 2015-04-01 Pedro Alves <palves@redhat.com>
6726 Cleber Rosa <crosa@redhat.com>
6727
6728 * server.c (gdbserver_usage): Reorganize and extend the usage
6729 message.
6730
6731 2015-03-24 Pedro Alves <palves@redhat.com>
6732
6733 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6734 output. Also dump TRAP_TRACE.
6735 (linux_low_filter_event): In debug output, distinguish a
6736 resume_stop SIGSTOP from a delayed SIGSTOP.
6737
6738 2015-03-24 Gary Benson <gbenson@redhat.com>
6739
6740 * linux-x86-low.c (x86_linux_new_thread): Moved to
6741 nat/x86-linux.c.
6742 (x86_linux_prepare_to_resume): Likewise.
6743
6744 2015-03-24 Gary Benson <gbenson@redhat.com>
6745
6746 * Makefile.in (x86-linux-dregs.o): New rule.
6747 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6748 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6749 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6750 (x86_linux_dr_get): Likewise.
6751 (x86_linux_dr_set): Likewise.
6752 (update_debug_registers_callback): Likewise.
6753 (x86_linux_dr_set_addr): Likewise.
6754 (x86_linux_dr_get_addr): Likewise.
6755 (x86_linux_dr_set_control): Likewise.
6756 (x86_linux_dr_get_control): Likewise.
6757 (x86_linux_dr_get_status): Likewise.
6758 (x86_linux_update_debug_registers): Likewise.
6759
6760 2015-03-24 Gary Benson <gbenson@redhat.com>
6761
6762 * linux-x86-low.c (x86_linux_update_debug_registers):
6763 New function, factored out from...
6764 (x86_linux_prepare_to_resume): ...this.
6765
6766 2015-03-24 Gary Benson <gbenson@redhat.com>
6767
6768 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6769 (x86_linux_dr_set): Likewise.
6770 (update_debug_registers_callback): Likewise.
6771 (x86_linux_dr_set_addr): Likewise.
6772 (x86_linux_dr_get_addr): Likewise.
6773 (x86_linux_dr_set_control): Likewise.
6774 (x86_linux_dr_get_control): Likewise.
6775 (x86_linux_dr_get_status): Likewise.
6776 (x86_linux_prepare_to_resume): Likewise.
6777
6778 2015-03-24 Gary Benson <gbenson@redhat.com>
6779
6780 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6781 Use perror_with_name. Pass string through gettext.
6782 (x86_linux_dr_set): Likewise.
6783
6784 2015-03-24 Gary Benson <gbenson@redhat.com>
6785
6786 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6787 (x86_linux_dr_set_addr): ...this.
6788 (x86_dr_low_get_addr): Rename to...
6789 (x86_linux_dr_get_addr): ...this.
6790 (x86_dr_low_set_control): Rename to...
6791 (x86_linux_dr_set_control): ...this.
6792 (x86_dr_low_get_control): Rename to...
6793 (x86_linux_dr_get_control): ...this.
6794 (x86_dr_low_get_status): Rename to...
6795 (x86_linux_dr_get_status): ...this.
6796 (x86_dr_low): Update with new function names.
6797
6798 2015-03-24 Gary Benson <gbenson@redhat.com>
6799
6800 * Makefile.in (x86-linux.o): New rule.
6801 * configure.srv: Add x86-linux.o to relevant targets.
6802 * linux-low.c (lwp_set_arch_private_info): New function.
6803 (lwp_arch_private_info): Likewise.
6804 * linux-x86-low.c: Include nat/x86-linux.h.
6805 (arch_lwp_info): Removed structure.
6806 (update_debug_registers_callback):
6807 Use lwp_set_debug_registers_changed.
6808 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6809 and lwp_set_debug_registers_changed.
6810 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6811
6812 2015-03-24 Gary Benson <gbenson@redhat.com>
6813
6814 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6815 * linux-arm-low.c (arm_new_thread): Likewise.
6816 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6817 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6818 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6819 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6820
6821 2015-03-24 Gary Benson <gbenson@redhat.com>
6822
6823 * linux-low.c (ptid_of_lwp): New function.
6824 (lwp_is_stopped): Likewise.
6825 (lwp_stop_reason): Likewise.
6826 * linux-x86-low.c (update_debug_registers_callback):
6827 Use lwp_is_stopped.
6828 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6829 lwp_stop_reason.
6830
6831 2015-03-24 Gary Benson <gbenson@redhat.com>
6832
6833 * linux-low.h (linux_stop_lwp): Remove declaration.
6834
6835 2015-03-24 Gary Benson <gbenson@redhat.com>
6836
6837 * linux-low.h: Include nat/linux-nat.h.
6838 * linux-low.c (iterate_over_lwps_args): New structure.
6839 (iterate_over_lwps_filter): New function.
6840 (iterate_over_lwps): Likewise.
6841 * linux-x86-low.c (update_debug_registers_callback):
6842 Update signature to what iterate_over_lwps expects.
6843 Remove PID check that iterate_over_lwps now performs.
6844 (x86_dr_low_set_addr): Use iterate_over_lwps.
6845 (x86_dr_low_set_control): Likewise.
6846
6847 2015-03-24 Gary Benson <gbenson@redhat.com>
6848
6849 * linux-x86-low.c (x86_debug_reg_state): New function.
6850 (x86_linux_prepare_to_resume): Use the above.
6851
6852 2015-03-24 Gary Benson <gbenson@redhat.com>
6853
6854 * linux-low.c (current_lwp_ptid): New function.
6855 * linux-x86-low.c: Include nat/linux-nat.h.
6856 (x86_dr_low_get_addr): Use current_lwp_ptid.
6857 (x86_dr_low_get_control): Likewise.
6858 (x86_dr_low_get_status): Likewise.
6859
6860 2015-03-20 Pedro Alves <palves@redhat.com>
6861
6862 * tracepoint.c (cmd_qtstatus): Make "str" const.
6863
6864 2015-03-20 Pedro Alves <palves@redhat.com>
6865
6866 * server.c (handle_general_set): Make "req_str" const.
6867
6868 2015-03-19 Pedro Alves <palves@redhat.com>
6869
6870 * linux-low.c (linux_resume_one_lwp): Rename to ...
6871 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6872 instead call perror_with_name.
6873 (check_ptrace_stopped_lwp_gone): New function.
6874 (linux_resume_one_lwp): Reimplement as wrapper around
6875 linux_resume_one_lwp_throw that swallows errors if the LWP is
6876 gone.
6877
6878 2015-03-19 Pedro Alves <palves@redhat.com>
6879
6880 * linux-low.c (count_events_callback, select_event_lwp_callback):
6881 No longer check whether the thread has resume_stop as last resume
6882 kind.
6883
6884 2015-03-19 Pedro Alves <palves@redhat.com>
6885
6886 * linux-low.c (count_events_callback, select_event_lwp_callback):
6887 Use the lwp's status_pending_p field, not the thread's.
6888
6889 2015-03-19 Pedro Alves <palves@redhat.com>
6890
6891 * linux-low.c (select_event_lwp_callback): Update comments to
6892 no longer mention SIGTRAP.
6893
6894 2015-03-18 Gary Benson <gbenson@redhat.com>
6895
6896 * server.c (handle_query): Do not report vFile:fstat as supported.
6897
6898 2015-03-11 Gary Benson <gbenson@redhat.com>
6899
6900 * hostio.c (sys/types.h): New include.
6901 (sys/stat.h): Likewise.
6902 (common-remote-fileio.h): Likewise.
6903 (handle_fstat): New function.
6904 (handle_vFile): Handle vFile:fstat packets.
6905
6906 2015-03-11 Gary Benson <gbenson@redhat.com>
6907
6908 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6909 struct stat.st_blocks and struct stat.st_blksize.
6910 * configure: Regenerate.
6911 * config.in: Likewise.
6912 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6913 (OBS): Add common-remote-fileio.o.
6914 (common-remote-fileio.o): New rule.
6915
6916 2015-03-09 Pedro Alves <palves@redhat.com>
6917
6918 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6919 'struct sockaddr' pointer in 'accept' call.
6920
6921 2015-03-09 Pedro Alves <palves@redhat.com>
6922
6923 Revert:
6924 2015-03-07 Pedro Alves <palves@redhat.com>
6925 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6926 or <winsock2.h> here. Instead include "gdb_socket.h".
6927 (remote_open): Use union gdb_sockaddr_u.
6928 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6929 or <winsock2.h> here. Instead include "gdb_socket.h".
6930 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6931 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6932 or <sys/un.h>.
6933 (init_named_socket, gdb_agent_helper_thread): Use union
6934 gdb_sockaddr_u.
6935
6936 2015-03-07 Pedro Alves <palves@redhat.com>
6937
6938 * configure.ac (build_warnings): Move
6939 -Wdeclaration-after-statement to the C-specific set.
6940 * configure: Regenerate.
6941
6942 2015-03-07 Pedro Alves <palves@redhat.com>
6943
6944 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6945 or <winsock2.h> here. Instead include "gdb_socket.h".
6946 (remote_open): Use union gdb_sockaddr_u.
6947 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6948 or <winsock2.h> here. Instead include "gdb_socket.h".
6949 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6950 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6951 or <sys/un.h>.
6952 (init_named_socket, gdb_agent_helper_thread): Use union
6953 gdb_sockaddr_u.
6954
6955 2015-03-07 Pedro Alves <palves@redhat.com>
6956
6957 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6958 instead.
6959
6960 2015-03-06 Yao Qi <yao.qi@linaro.org>
6961
6962 * linux-aarch64-low.c (aarch64_insert_point): Use
6963 show_debug_regs as a boolean.
6964 (aarch64_remove_point): Likewise.
6965
6966 2015-03-05 Pedro Alves <palves@redhat.com>
6967
6968 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6969 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6970 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6971 * nto-low.c (nto_target_ops): Likewise.
6972 * spu-low.c (spu_target_ops): Likewise.
6973 * win32-low.c (win32_target_ops): Likewise.
6974
6975 2015-03-04 Pedro Alves <palves@redhat.com>
6976
6977 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6978 Decide whether a breakpoint triggered based on the SIGTRAP's
6979 siginfo.si_code.
6980 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6981 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6982 (linux_low_filter_event): Check for breakpoints before checking
6983 watchpoints.
6984 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6985 siginfo.si_code.
6986 (linux_stopped_by_sw_breakpoint)
6987 (linux_supports_stopped_by_sw_breakpoint)
6988 (linux_stopped_by_hw_breakpoint)
6989 (linux_supports_stopped_by_hw_breakpoint): New functions.
6990 (linux_target_ops): Install new target methods.
6991
6992 2015-03-04 Pedro Alves <palves@redhat.com>
6993
6994 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6995 * server.c (swbreak_feature, hwbreak_feature): New globals.
6996 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6997 (captured_main): Clear swbreak_feature and hwbreak_feature.
6998 * server.h (swbreak_feature, hwbreak_feature): Declare.
6999 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7000 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7001 supports_stopped_by_hw_breakpoint>: New fields.
7002 (target_supports_stopped_by_sw_breakpoint)
7003 (target_stopped_by_sw_breakpoint)
7004 (target_supports_stopped_by_hw_breakpoint)
7005 (target_stopped_by_hw_breakpoint): Declare.
7006
7007 2015-03-04 Pedro Alves <palves@redhat.com>
7008
7009 enum lwp_stop_reason -> enum target_stop_reason
7010 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7011 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7012 (linux_wait_1, stuck_in_jump_pad_callback)
7013 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7014 (linux_stopped_by_watchpoint):
7015 * linux-low.h (enum lwp_stop_reason): Delete.
7016 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7017 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7018
7019 2015-03-04 Yao Qi <yao.qi@linaro.org>
7020
7021 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7022
7023 2015-03-03 Gary Benson <gbenson@redhat.com>
7024
7025 * hostio.c (handle_vFile): Fix prefix lengths.
7026
7027 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7028
7029 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7030 ptr_bits.
7031
7032 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7033
7034 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7035 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7036 (clean): Add "rm -f" for above C files.
7037 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7038 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7039 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7040 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7041 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7042 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7043 (init_registers_s390x_vx_linux64)
7044 (init_registers_s390x_tevx_linux64)
7045 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7046 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7047 declarations.
7048 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7049 (s390_store_vxrs_high): New functions.
7050 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7051 NT_S390_VXRS_HIGH.
7052 (s390_arch_setup): Add logic for selecting one of the new target
7053 descriptions. Activate the new vector regsets if applicable.
7054 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7055 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7056 and init_registers_s390x_tevx_linux64.
7057
7058 2015-03-01 Pedro Alves <palves@redhat.com>
7059
7060 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7061 parameter.
7062
7063 2015-02-27 Pedro Alves <palves@redhat.com>
7064
7065 * linux-x86-low.c (u_debugreg_offset): New function.
7066 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7067
7068 2015-02-27 Pedro Alves <palves@redhat.com>
7069
7070 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7071 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7072 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7073 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7074 (ps_lsetfpregs, ps_getpid)
7075 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7076 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7077 (ps_lsetxregs, ps_plog): Declare.
7078
7079 2015-02-27 Pedro Alves <palves@redhat.com>
7080
7081 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7082 IP_AGENT_EXPORT_FUNC.
7083 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7084 IP_AGENT_EXPORT_FUNC.
7085 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7086 (IP_AGENT_EXPORT): Delete.
7087 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7088 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7089 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7090 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7091 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7092 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7093 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7094 (traceframe_read_count, traceframe_write_count)
7095 (traceframes_created, trace_state_variables, get_raw_reg)
7096 (get_trace_state_variable_value, set_trace_state_variable_value)
7097 (ust_loaded, helper_thread_id, cmd_buf): Use
7098 IPA_SYM_EXPORTED_NAME.
7099 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7100 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7101 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7102 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7103 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7104 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7105 EXTERN_C_PUSH/EXTERN_C_POP.
7106 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7107 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7108 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7109 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7110 (traceframe_write_count, traceframe_read_count)
7111 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7112 (about_to_request_buffer_space, get_trace_state_variable_value)
7113 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7114 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7115 EXTERN_C_PUSH/EXTERN_C_POP.
7116 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7117 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7118 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7119 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7120 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7121 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7122 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7123 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7124 Define.
7125 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7126 (IP_AGENT_EXPORT_VAR_DECL): Define.
7127 (tracing): Declare.
7128 (gdb_agent_get_raw_reg): Declare.
7129
7130 2015-02-27 Tom Tromey <tromey@redhat.com>
7131 Pedro Alves <palves@redhat.com>
7132
7133 Rename symbols whose names are reserved C++ keywords throughout.
7134
7135 2015-02-27 Pedro Alves <palves@redhat.com>
7136
7137 * Makefile.in (COMPILER): New, get it from autoconf.
7138 (CXX): Get from autoconf instead.
7139 (COMPILE.pre): Use COMPILER.
7140 (CC-LD): Rename to ...
7141 (CC_LD): ... this. Use COMPILER.
7142 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7143 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7144 * acinclude.m4: Include build-with-cxx.m4.
7145 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7146 Disable -Werror by default if building in C++ mode.
7147 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7148 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7149 the C++ compiler. Save/restore CXXFLAGS too.
7150 * configure: Regenerate.
7151
7152 2015-02-27 Pedro Alves <palves@redhat.com>
7153
7154 * acinclude.m4: Include libiberty.m4.
7155 * configure.ac: Call libiberty_INIT.
7156 * config.in, configure: Regenerate.
7157
7158 2015-02-26 Pedro Alves <palves@redhat.com>
7159
7160 * linux-low.c (linux_wait_1): When incrementing the PC past a
7161 program breakpoint always use the_low_target.breakpoint_len as
7162 increment, rather than the maximum between that and
7163 the_low_target.decr_pc_after_break.
7164
7165 2015-02-23 Pedro Alves <palves@redhat.com>
7166
7167 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7168 thread was doing a step-over; always adjust the PC if
7169 we stepped over a permanent breakpoint.
7170 (linux_wait_1): If we stepped over breakpoint that was on top of a
7171 permanent breakpoint, manually advance the PC past it.
7172
7173 2015-02-23 Pedro Alves <palves@redhat.com>
7174
7175 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7176 modes.
7177 (x86_fill_gregset, x86_store_gregset): Use it when handling
7178 $orig_eax.
7179
7180 2015-02-20 Pedro Alves <palves@redhat.com>
7181
7182 * thread-db.c: Include "nat/linux-procfs.h".
7183 (thread_db_init): Skip listing new threads if the kernel supports
7184 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7185
7186 2015-02-20 Pedro Alves <palves@redhat.com>
7187
7188 * linux-low.c (status_pending_p_callback): Use ptid_match.
7189
7190 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7191
7192 PR breakpoints/16812
7193 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7194 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7195 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7196
7197 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7198
7199 PR breakpoints/15956
7200 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7201
7202 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7203
7204 * linux-low.c (linux_low_btrace_conf): Print size.
7205 * server.c (handle_btrace_conf_general_set): New.
7206 (hanle_general_set): Call handle_btrace_conf_general_set.
7207 (handle_query): Report Qbtrace-conf:bts:size as supported.
7208
7209 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7210
7211 * linux-low.c (linux_low_enable_btrace): Update parameters.
7212 (linux_low_btrace_conf): New.
7213 (linux_target_ops)<to_btrace_conf>: Initialize.
7214 * server.c (current_btrace_conf): New.
7215 (handle_btrace_enable): Rename to ...
7216 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7217 to target_enable_btrace. Update comment. Update users.
7218 (handle_qxfer_btrace_conf): New.
7219 (qxfer_packets): Add btrace-conf entry.
7220 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7221 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7222 (target_ops)<read_btrace_conf>: New.
7223 (target_enable_btrace): Update parameters.
7224 (target_read_btrace_conf): New.
7225
7226 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7227
7228 * server.c (handle_btrace_general_set): Remove call to
7229 target_supports_btrace.
7230 (supported_btrace_packets): New.
7231 (handle_query): Call supported_btrace_packets.
7232 * target.h: include btrace-common.h.
7233 (btrace_target_info): Removed.
7234 (supports_btrace, target_supports_btrace): Update parameters.
7235
7236 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7237
7238 * Makefile.in (SFILES): Add common/btrace-common.c.
7239 (OBS): Add common/btrace-common.o.
7240 (btrace-common.o): Add build rules.
7241 * linux-low: Include btrace-common.h.
7242 (linux_low_read_btrace): Use struct btrace_data. Call
7243 btrace_data_init and btrace_data_fini.
7244
7245 2015-02-06 Pedro Alves <palves@redhat.com>
7246
7247 * thread-db.c (find_new_threads_callback): Add debug output.
7248
7249 2015-02-04 Pedro Alves <palves@redhat.com>
7250
7251 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7252 (resume_stopped_resumed_lwps): New function.
7253 (linux_wait_for_event_filtered): Use it.
7254
7255 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7256
7257 * Makefile.in (SFILES): Add linux-personality.c.
7258 (linux-personality.o): New rule.
7259 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7260 list of objects to be built.
7261 * linux-low.c: Include nat/linux-personality.h.
7262 (linux_create_inferior): Remove code to disable address space
7263 randomization (moved to ../nat/linux-personality.c). Create
7264 cleanup to disable address space randomization.
7265
7266 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7267
7268 * Makefile.in (posix-strerror.o): New rule.
7269 (mingw-strerror.o): Likewise.
7270 * configure: Regenerated.
7271 * configure.ac: Source file ../common/common.host. Initialize new
7272 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7273
7274 2015-01-14 Yao Qi <yao@codesourcery.com>
7275
7276 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7277 (ppc-linux.o): New rule.
7278 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7279 * configure.ac: AC_CHECK_FUNCS(getauxval).
7280 * config.in: Re-generated.
7281 * configure: Re-generated.
7282 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7283 ppc64_64bit_inferior_p
7284
7285 2015-01-14 Yao Qi <yao@codesourcery.com>
7286
7287 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7288 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7289 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7290 (PT_ORIG_R3, PT_TRAP): Likewise.
7291 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7292 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7293 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7294
7295 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7296
7297 * i387-fp.c (i387_cache_to_xsave): In look over
7298 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7299 zmmh_low_space field by use of zmmh_high_space.
7300
7301 2015-01-09 Pedro Alves <palves@redhat.com>
7302
7303 * linux-low.c (step_over_bkpt): Move higher up in the file.
7304 (handle_extended_wait): Don't store the stop_pc here.
7305 (get_stop_pc): Adjust comments and rename to ...
7306 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7307 stopped for a software breakpoint or hardware breakpoint.
7308 (thread_still_has_status_pending_p): New function.
7309 (status_pending_p_callback): Use
7310 thread_still_has_status_pending_p. If the event is no longer
7311 interesting, resume the LWP.
7312 (handle_tracepoints): Add assert.
7313 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7314 (wstatus_maybe_breakpoint): New function.
7315 (cancel_breakpoint): Delete function.
7316 (check_stopped_by_watchpoint): New function, factored out from
7317 linux_low_filter_event.
7318 (lp_status_maybe_breakpoint): Delete function.
7319 (linux_low_filter_event): Remove filter_ptid argument.
7320 Leave thread group exits pending here. Store the LWP's stop PC.
7321 Always leave events pending.
7322 (linux_wait_for_event_filtered): Pull all events out of the
7323 kernel, and leave them all pending.
7324 (count_events_callback, select_event_lwp_callback): Consider all
7325 events.
7326 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7327 (select_event_lwp): Only give preference to the stepping LWP in
7328 all-stop mode. Adjust comments.
7329 (ignore_event): New function.
7330 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7331 references to cancel_breakpoints. Adjust to renames. Also give
7332 equal priority to all LWPs that have had events in non-stop mode.
7333 If reporting a software breakpoint event, unadjust the LWP's PC.
7334 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7335 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7336 Adjust.
7337 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7338 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7339 (linux_stopped_by_watchpoint): Adjust.
7340 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7341 * linux-low.h (enum lwp_stop_reason): New.
7342 (struct lwp_info) <stop_pc>: Adjust comment.
7343 <stopped_by_watchpoint>: Delete field.
7344 <stop_reason>: New field.
7345 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7346 * mem-break.c (software_breakpoint_inserted_here)
7347 (hardware_breakpoint_inserted_here): New function.
7348 * mem-break.h (software_breakpoint_inserted_here)
7349 (hardware_breakpoint_inserted_here): Declare.
7350 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7351 (cancel_breakpoints): Delete.
7352 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7353 (upload_fast_traceframes): Remove references to
7354 cancel_breakpoints.
7355
7356 2015-01-09 Pedro Alves <palves@redhat.com>
7357
7358 * thread-db.c (find_new_threads_callback): Ignore thread if the
7359 kernel thread ID is -1.
7360
7361 2015-01-09 Pedro Alves <palves@redhat.com>
7362
7363 * linux-low.c (linux_attach_fail_reason_string): Move to
7364 nat/linux-ptrace.c, and rename.
7365 (linux_attach_lwp): Update comment.
7366 (attach_proc_task_lwp_callback): New function.
7367 (linux_attach): Adjust to rename and use
7368 linux_proc_attach_tgid_threads.
7369 (linux_attach_fail_reason_string): Delete declaration.
7370
7371 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7372
7373 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7374 * server.c (gdbserver_version): Likewise.
7375
7376 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7377
7378 * remote-utils.c: Include ctype.h.
7379 (input_interrupt): Explicitly handle the case when the char
7380 received is the NUL byte. Improve the printing of non-ASCII
7381 characters.
7382
7383 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7384
7385 * linux-low.c (linux_low_filter_event): Update call to
7386 linux_enable_event_reporting following the addition of
7387 a new parameter to that function.
7388
7389 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7390
7391 PR server/17457
7392 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7393 (AARCH64_FPCR_REGNO): Likewise.
7394 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7395 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7396 (aarch64_store_fpregset): Likewise.
7397
7398 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7399
7400 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7401 Remove FIXME comment about assumption about N.
7402
7403 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7404
7405 * configure.ac: If large-file support is disabled in GDBserver,
7406 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7407 * configure: Regenerate.
7408
7409 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7410
7411 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7412 warning upon ENODATA from ptrace.
7413 * linux-s390-low.c (s390_store_tdb): New.
7414 (s390_regsets): Add regset for NT_S390_TDB.
7415
7416 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7417
7418 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7419 without a fill_function.
7420 * linux-s390-low.c (s390_fill_last_break): Remove.
7421 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7422 (s390_arch_setup): Use regset's size instead of fill_function for
7423 loop end condition.
7424
7425 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7426
7427 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7428 the regset's store function when ptrace returned an error.
7429 * regcache.c (get_thread_regcache): Invalidate register cache
7430 before fetching inferior's registers.
7431
7432 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7433
7434 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7435 while-loop as for-loop.
7436 (regsets_store_inferior_registers): Likewise.
7437
7438 2014-11-28 Yao Qi <yao@codesourcery.com>
7439
7440 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7441 * config.in, configure: Re-generate.
7442 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7443 is defined.
7444
7445 2014-11-21 Yao Qi <yao@codesourcery.com>
7446
7447 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7448 (AC_CHECK_HEADERS): Remove malloc.h.
7449 * configure: Re-generated.
7450 * config.in: Re-generated.
7451 * server.h: Don't include alloca.h and malloc.h.
7452 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7453 Don't include malloc.h.
7454
7455 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7456
7457 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7458 corresponding ERRNO check in same block.
7459
7460 2014-11-12 Pedro Alves <palves@redhat.com>
7461
7462 * server.c (cont_thread): Update comment.
7463 (start_inferior, attach_inferior): No longer clear cont_thread.
7464 (handle_v_cont): No longer set cont_thread.
7465 (captured_main): Clear cont_thread each time a GDB connects.
7466
7467 2014-11-12 Pedro Alves <palves@redhat.com>
7468
7469 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7470 thread, and don't resume all threads if the Hc thread has exited.
7471
7472 2014-11-12 Pedro Alves <palves@redhat.com>
7473
7474 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7475 the process group instead of to a specific LWP.
7476
7477 2014-10-15 Pedro Alves <palves@redhat.com>
7478
7479 PR server/17487
7480 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7481 parameter.
7482 (arm_set_thread_context): Delete.
7483 (the_low_target): Adjust.
7484 * win32-i386-low.c (debug_registers_changed)
7485 (debug_registers_used): Delete.
7486 (update_debug_registers_callback): New function.
7487 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7488 needing to update their debug registers.
7489 (win32_get_current_dr): New function.
7490 (x86_dr_low_get_addr, x86_dr_low_get_control)
7491 (x86_dr_low_get_status): Fetch the debug register from the thread
7492 record's context.
7493 (i386_initial_stuff): Adjust.
7494 (i386_get_thread_context): Remove current_event parameter. Don't
7495 clear debug_registers_changed nor copy DR values to
7496 debug_reg_state.
7497 (i386_set_thread_context): Delete.
7498 (i386_prepare_to_resume): New function.
7499 (i386_thread_added): Mark the thread as needing to update irs
7500 debug registers.
7501 (the_low_target): Remove i386_set_thread_context and install
7502 i386_prepare_to_resume.
7503 * win32-low.c (win32_get_thread_context): Adjust.
7504 (win32_set_thread_context): Use SetThreadContext
7505 directly.
7506 (win32_prepare_to_resume): New function.
7507 (win32_require_context): New function, factored out from ...
7508 (thread_rec): ... this.
7509 (continue_one_thread): Call win32_prepare_to_resume on each thread
7510 we're about to continue.
7511 (win32_resume): Call win32_prepare_to_resume on the event thread.
7512 * win32-low.h (struct win32_thread_info)
7513 <debug_registers_changed>: New field.
7514 (struct win32_target_ops): Change prototype of set_thread_context,
7515 delete set_thread_context and add prepare_to_resume.
7516 (win32_require_context): New declaration.
7517
7518 2014-10-08 Gary Benson <gbenson@redhat.com>
7519
7520 * server.h: Do not include common-exceptions.h.
7521
7522 2014-10-08 Gary Benson <gbenson@redhat.com>
7523
7524 * server.h: Do not include cleanups.h.
7525
7526 2014-09-30 James Hogan <james.hogan@imgtec.com>
7527
7528 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7529 mips64-dsp-linux.c.
7530
7531 2014-09-23 Yao Qi <yao@codesourcery.com>
7532
7533 * linux-low.c (lp_status_maybe_breakpoint): New function.
7534 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7535 (count_events_callback): Likewise.
7536 (select_event_lwp_callback): Likewise.
7537 (cancel_breakpoints_callback): Likewise.
7538
7539 2014-09-19 Don Breazeal <donb@codesourcery.com>
7540
7541 * linux-low.c (handle_extended_wait): Call
7542 linux_ptrace_get_extended_event.
7543 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7544 linux_is_extended_waitstatus.
7545
7546 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7547
7548 * Makefile.in (CPPFLAGS): Define.
7549 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7550 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7551
7552 2014-09-16 Gary Benson <gbenson@redhat.com>
7553
7554 * inferiors.h (current_inferior): Renamed as...
7555 (current_thread): New variable. All uses updated.
7556 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7557 (maybe_move_out_of_jump_pad): Likewise.
7558 (cancel_breakpoint): Likewise.
7559 (linux_low_filter_event): Likewise.
7560 (wait_for_sigstop): Likewise.
7561 (linux_resume_one_lwp): Likewise.
7562 (need_step_over_p): Likewise.
7563 (start_step_over): Likewise.
7564 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7565 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7566 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7567 and save_inferior as saved_thread.
7568 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7569 saved_thread.
7570 (regcache_invalidate_thread): Likewise.
7571 * remote-utils.c (prepare_resume_reply): Likewise.
7572 * thread-db.c (thread_db_get_tls_address): Likewise.
7573 (disable_thread_event_reporting): Likewise.
7574 (remove_thread_event_breakpoints): Likewise.
7575 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7576 as saved_thread.
7577 * target.h (set_desired_inferior): Renamed as...
7578 (set_desired_thread): New declaration. All uses updated.
7579 * server.c (myresume): Updated comment to reference thread instead
7580 of inferior.
7581 (handle_serial_event): Likewise.
7582 (handle_target_event): Likewise.
7583
7584 2014-09-12 Tom Tromey <tromey@redhat.com>
7585 Gary Benson <gbenson@redhat.com>
7586
7587 * regcache.h: Include common-regcache.h.
7588 (regcache_read_pc): Don't declare.
7589 * regcache.c (get_thread_regcache_for_ptid): New function.
7590
7591 2014-09-11 Tom Tromey <tromey@redhat.com>
7592 Gary Benson <gbenson@redhat.com>
7593
7594 * symbol.c: New file.
7595 * Makefile.in (SFILES): Add symbol.c.
7596 (OBS): Add symbol.o.
7597
7598 2014-09-11 Gary Benson <gbenson@redhat.com>
7599
7600 * target.c (target_stop_ptid, target_continue_ptid): New
7601 functions.
7602
7603 2014-09-11 Tom Tromey <tromey@redhat.com>
7604 Gary Benson <gbenson@redhat.com>
7605
7606 * target.h: Include target/target.h.
7607 * target.c (target_read_memory, target_read_uint32)
7608 (target_write_memory): New functions.
7609
7610 2014-09-11 Gary Benson <gbenson@redhat.com>
7611
7612 * server.h (debug_hw_points): Don't declare.
7613 * server.c (debug_hw_points): Don't define. Replace all uses
7614 with show_debug_regs.
7615 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7616 all uses with show_debug_regs.
7617
7618 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7619
7620 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7621 endianness into account.
7622 (ppc_supply_ptrace_register): Likewise.
7623
7624 2014-09-03 James Hogan <james.hogan@imgtec.com>
7625
7626 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7627 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7628
7629 2014-09-03 Gary Benson <gbenson@redhat.com>
7630
7631 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7632 ALL_DEBUG_ADDRESS_REGISTERS.
7633
7634 2014-09-02 Gary Benson <gbenson@redhat.com>
7635
7636 * i386-low.h: Renamed as...
7637 * x86-low.h: New file. All type, function and variable name
7638 prefixes changed from "i386_" to "x86_". All references updated.
7639 * i386-low.c: Renamed as...
7640 * x86-low.c: New file. All type, function and variable name
7641 prefixes changed from "i386_" to "x86_". All references updated.
7642
7643 2014-09-02 Gary Benson <gbenson@redhat.com>
7644
7645 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7646 (x86_linux_new_thread): Likewise.
7647
7648 2014-08-29 Gary Benson <gbenson@redhat.com>
7649
7650 * server.h (setjmp.h): Do not include.
7651 (toplevel): Do not declare.
7652 (common-exceptions.h): Include.
7653 (cleanups.h): Likewise.
7654 * server.c (toplevel): Do not define.
7655 (exit_code): New static global.
7656 (detach_or_kill_for_exit_cleanup): New function.
7657 (main): New function. Original main renamed to...
7658 (captured_main): New function.
7659 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7660
7661 2014-08-29 Gary Benson <gbenson@redhat.com>
7662
7663 * Makefile.in (SFILES): Add common/common-exceptions.c.
7664 (OBS): Add common-exceptions.o.
7665 (common-exceptions.o): New rule.
7666 * utils.c (prepare_to_throw_exception): New function.
7667
7668 2014-08-29 Gary Benson <gbenson@redhat.com>
7669
7670 * config.in: Regenerate.
7671 * configure: Likewise.
7672
7673 2014-08-29 Gary Benson <gbenson@redhat.com>
7674
7675 * Makefile.in (SFILES): Add common/cleanups.c.
7676 (OBS): cleanups.o.
7677 (cleanups.o): New rule.
7678
7679 2014-08-29 Gary Benson <gbenson@redhat.com>
7680
7681 * utils.c (internal_vwarning): New function.
7682
7683 2014-08-28 Gary Benson <gbenson@redhat.com>
7684
7685 * utils.h (fatal): Remove declaration.
7686 * utils.c (fatal): Remove function.
7687
7688 2014-08-28 Gary Benson <gbenson@redhat.com>
7689
7690 * tracepoint.c (gdb_agent_init): Replace fatal with
7691 perror_with_name.
7692 (initialize_tracepoint): Likewise.
7693
7694 2014-08-28 Gary Benson <gbenson@redhat.com>
7695
7696 * remote-utils.c (remote_prepare): Replace fatal with error.
7697
7698 2014-08-28 Gary Benson <gbenson@redhat.com>
7699
7700 * linux-low.c (linux_async): Replace fatal with warning.
7701 Tidy up and return.
7702 (linux_start_non_stop): Return -1 if linux_async failed.
7703
7704 2014-08-28 Gary Benson <gbenson@redhat.com>
7705
7706 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7707 gdb_assert.
7708 (i386_dr_low_get_addr): Remove vague comment.
7709 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7710 gdb_assert.
7711
7712 2014-08-28 Gary Benson <gbenson@redhat.com>
7713
7714 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7715 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7716 internal_error.
7717 (linux_resume_one_lwp): Likewise.
7718 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7719 gdb_assert.
7720 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7721 with internal_error.
7722 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7723 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7724 (find_register_by_name): Replace fatal with internal_error.
7725 (find_regno): Likewise.
7726 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7727 * thread-db.c (thread_db_create_event): Likewise.
7728 (thread_db_load_search): Likewise.
7729 (try_thread_db_load_1): Likewise.
7730 * tracepoint.c (get_jump_space_head): Replace fatal with
7731 internal_error.
7732 (claim_trampoline_space): Likewise.
7733 (have_fast_tracepoint_trampoline_buffer): Likewise.
7734 (cmd_qtstart): Likewise.
7735 (stop_tracing): Likewise.
7736 (fast_tracepoint_collecting): Likewise.
7737 (target_malloc): Likewise.
7738 (download_tracepoint): Likewise.
7739 (download_trace_state_variables): Replace check with gdb_assert.
7740 (upload_fast_traceframes): Replace fatal with internal_error.
7741
7742 2014-08-19 Tom Tromey <tromey@redhat.com>
7743 Gary Benson <gbenson@redhat.com>
7744
7745 * Makefile.in (SFILES): Add common/common-debug.c.
7746 (OBS): Add common-debug.o.
7747 (common-debug.o): New rule.
7748 * debug.h (debug_printf): Don't declare.
7749 * debug.c (debug_printf): Renamed and rewritten as...
7750 (debug_vprintf): New function.
7751
7752 2014-08-19 Gary Benson <gbenson@redhat.com>
7753
7754 * utils.h: Do not include print-utils.h.
7755
7756 2014-08-19 Tom Tromey <tromey@redhat.com>
7757 Gary Benson <gbenson@redhat.com>
7758
7759 * server.h: Add static assertion.
7760 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7761
7762 2014-08-19 Tom Tromey <tromey@redhat.com>
7763 Gary Benson <gbenson@redhat.com>
7764
7765 * Makefile.in (SFILES): Add common/errors.c.
7766 (OBS): Add errors.o.
7767 (IPA_OBS): Add errors-ipa.o.
7768 (errors.o): New rule.
7769 (errors-ipa.o): Likewise.
7770 * utils.h (perror_with_name, error, warning): Don't declare.
7771 * utils.c (warning): Renamed and rewritten as...
7772 (vwarning): New function.
7773 (error): Renamed and rewritten as...
7774 (verror): New function.
7775 (internal_error): Renamed and rewritten as...
7776 (internal_verror): New function.
7777
7778 2014-08-07 Gary Benson <gbenson@redhat.com>
7779
7780 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7781 * configure: Regenerate.
7782 * config.in: Likewise.
7783 * server.h: Do not include errno.h.
7784 * event-loop.c: Likewise.
7785 * hostio-errno.c: Likewise.
7786 * linux-low.c: Likewise.
7787 * remote-utils.c: Likewise.
7788 * spu-low.c: Likewise.
7789 * utils.c: Likewise.
7790 * gdbreplay.c: Unconditionally include errno.h.
7791
7792 2014-08-07 Gary Benson <gbenson@redhat.com>
7793
7794 * server.h: Do not include string.h.
7795 * event-loop.c: Likewise.
7796 * linux-low.c: Likewise.
7797 * regcache.c: Likewise.
7798 * remote-utils.c: Likewise.
7799 * spu-low.c: Likewise.
7800 * utils.c: Likewise.
7801
7802 2014-08-07 Gary Benson <gbenson@redhat.com>
7803
7804 * server.h: Do not include gdb_assert.h.
7805
7806 2014-08-07 Gary Benson <gbenson@redhat.com>
7807
7808 * server.h: Do not include common-utils.h.
7809
7810 2014-08-07 Gary Benson <gbenson@redhat.com>
7811
7812 * server.h: Do not include ptid.h.
7813 * notif.h: Likewise.
7814
7815 2014-08-07 Gary Benson <gbenson@redhat.com>
7816
7817 * server.h: Do not include gdb_locale.h.
7818
7819 2014-08-07 Gary Benson <gbenson@redhat.com>
7820
7821 * server.h: Do not include gdb/signals.h.
7822 * win32-low.c: Likewise.
7823
7824 2014-08-07 Gary Benson <gbenson@redhat.com>
7825
7826 * server.h: Do not include pathmax.h.
7827
7828 2014-08-07 Gary Benson <gbenson@redhat.com>
7829
7830 * server.h: Do not include libiberty.h.
7831 * linux-bfin-low.c: Likewise.
7832
7833 2014-08-07 Gary Benson <gbenson@redhat.com>
7834
7835 * server.h: Do not include ansidecl.h.
7836
7837 2014-08-07 Gary Benson <gbenson@redhat.com>
7838
7839 * linux-x86-low.c: Do not include stddef.h.
7840 * lynx-ppc-low.c: Likewise.
7841 * tracepoint.c: Likewise.
7842
7843 2014-08-07 Gary Benson <gbenson@redhat.com>
7844
7845 * server.h: Do not include stdarg.h.
7846 * nto-low.c: Likewise.
7847
7848 2014-08-07 Gary Benson <gbenson@redhat.com>
7849
7850 * server.h: Do not include stdlib.h.
7851 * inferiors.c: Likewise.
7852 * linux-low.c: Likewise.
7853 * regcache.c: Likewise.
7854 * spu-low.c: Likewise.
7855 * tracepoint.c: Likewise.
7856 * utils.c: Likewise.
7857
7858 2014-08-07 Gary Benson <gbenson@redhat.com>
7859
7860 * server.h: Do not include stdio.h.
7861 * linux-low.c: Likewise.
7862 * remote-utils.c: Likewise.
7863 * spu-low.c: Likewise.
7864 * utils.c: Likewise.
7865 * wincecompat.c: Likewise.
7866
7867 2014-08-06 Gary Benson <gbenson@redhat.com>
7868
7869 * regcache.c (init_register_cache): Move conditionals inside if.
7870
7871 2014-08-06 Gary Benson <gbenson@redhat.com>
7872
7873 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7874
7875 2014-07-31 Gary Benson <gbenson@redhat.com>
7876
7877 * ax.h: Do not include server.h.
7878 * gdbthread.h: Likewise.
7879 * lynx-low.h: Likewise.
7880 * notif.h: Likewise.
7881
7882 2014-07-30 Gary Benson <gbenson@redhat.com>
7883
7884 * server.h: Include common-defs.h.
7885 Do not include config.h or build-gnulib-gdbserver/config.h.
7886
7887 2014-07-30 Gary Benson <gbenson@redhat.com>
7888
7889 * hostio-errno.c: Move server.h to top of includes list.
7890 * inferiors.c: Likewise.
7891 * linux-x86-low.c: Likewise.
7892 * notif.c: Include server.h.
7893
7894 2014-07-24 Tom Tromey <tromey@redhat.com>
7895 Gary Benson <gbenson@redhat.com>
7896
7897 * server.h (CORE_ADDR): Now unsigned.
7898
7899 2014-07-16 Pedro Alves <palves@redhat.com>
7900
7901 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7902
7903 2014-07-15 Pedro Alves <palves@redhat.com>
7904
7905 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7906 copy.
7907
7908 2014-07-11 Pedro Alves <palves@redhat.com>
7909
7910 * linux-low.c (kill_wait_lwp): New function, based on
7911 kill_one_lwp_callback, but use my_waitpid directly.
7912 (kill_one_lwp_callback, linux_kill): Use it.
7913
7914 2014-06-23 Pedro Alves <palves@redhat.com>
7915
7916 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7917 before setting DR0..DR3.
7918
7919 2014-06-20 Gary Benson <gbenson@redhat.com>
7920
7921 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7922 * configure: Regenerated.
7923 * config.in: Likewise.
7924
7925 2014-06-20 Gary Benson <gbenson@redhat.com>
7926
7927 * Makefile.in (SFILES): Update locations for files moved
7928 from common to nat.
7929 (object file files): Reordered.
7930
7931 2014-06-20 Gary Benson <gbenson@redhat.com>
7932
7933 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7934 (i386_dr_low_set_addr): Likewise.
7935 (i386_dr_low_get_addr): Likewise.
7936 (i386_dr_low_can_set_control): Likewise.
7937 (i386_dr_low_set_control): Likewise.
7938 (i386_dr_low_get_control): Likewise.
7939 (i386_dr_low_get_status): Likewise.
7940 (i386_get_debug_register_length): Likewise.
7941 * linux-x86-low.c (i386_dr_low_set_addr):
7942 Changed signature. Made static.
7943 (i386_dr_low_get_addr): Likewise.
7944 (i386_dr_low_set_control): Likewise.
7945 (i386_dr_low_get_control): Likewise.
7946 (i386_dr_low_get_status): Likewise.
7947 (i386_dr_low): New global variable.
7948 * win32-i386-low.c (i386_dr_low_set_addr):
7949 Changed signature. Made static.
7950 (i386_dr_low_get_addr): Likewise.
7951 (i386_dr_low_set_control): Likewise.
7952 (i386_dr_low_get_control): Likewise.
7953 (i386_dr_low_get_status): Likewise.
7954 (i386_dr_low): New global variable.
7955
7956 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7957
7958 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7959 * Makefile.in (AR, AR_FLAGS): Define.
7960 * configure: Regenerate.
7961
7962 2014-06-19 Gary Benson <gbenson@redhat.com>
7963
7964 * Makefile.in (i386-dregs.o): New rule.
7965 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7966 * i386-low.c (target.h): Remove include.
7967 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7968 (DR_CONTROL_SHIFT): Likewise.
7969 (DR_CONTROL_SIZE): Likewise.
7970 (DR_RW_EXECUTE): Likewise.
7971 (DR_RW_WRITE): Likewise.
7972 (DR_RW_READ): Likewise.
7973 (DR_RW_IORW): Likewise.
7974 (DR_LEN_1): Likewise.
7975 (DR_LEN_2): Likewise.
7976 (DR_LEN_4): Likewise.
7977 (DR_LEN_8): Likewise.
7978 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7979 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7980 (DR_ENABLE_SIZE): Likewise.
7981 (DR_LOCAL_SLOWDOWN): Likewise.
7982 (DR_GLOBAL_SLOWDOWN): Likewise.
7983 (DR_CONTROL_RESERVED): Likewise.
7984 (I386_DR_CONTROL_MASK): Likewise.
7985 (I386_DR_VACANT): Likewise.
7986 (I386_DR_LOCAL_ENABLE): Likewise.
7987 (I386_DR_GLOBAL_ENABLE): Likewise.
7988 (I386_DR_DISABLE): Likewise.
7989 (I386_DR_SET_RW_LEN): Likewise.
7990 (I386_DR_GET_RW_LEN): Likewise.
7991 (I386_DR_WATCH_HIT): Likewise.
7992 (i386_wp_op_t): Likewise.
7993 (i386_show_dr): Likewise.
7994 (i386_length_and_rw_bits): Likewise.
7995 (i386_insert_aligned_watchpoint): Likewise.
7996 (i386_remove_aligned_watchpoint): Likewise.
7997 (i386_handle_nonaligned_watchpoint): Likewise.
7998 i386_update_inferior_debug_regs(): Likewise.
7999 (i386_dr_insert_watchpoint): Likewise.
8000 (i386_dr_remove_watchpoint): Likewise.
8001 (i386_dr_region_ok_for_watchpoint): Likewise.
8002 (i386_dr_stopped_data_address): Likewise.
8003 (i386_dr_stopped_by_watchpoint): Likewise.
8004
8005 2014-06-19 Gary Benson <gbenson@redhat.com>
8006
8007 * i386-low.c (i386_dr_show): Renamed to
8008 i386_show_dr and made static. All uses updated.
8009 (i386_dr_length_and_rw_bits): Renamed to
8010 i386_length_and_rw_bits and made static.
8011 All uses updated.
8012 (i386_dr_insert_aligned_watchpoint): Renamed to
8013 i386_insert_aligned_watchpoint and made static.
8014 All uses updated.
8015 (i386_dr_remove_aligned_watchpoint): Renamed to
8016 i386_remove_aligned_watchpoint and made static.
8017 All uses updated.
8018 (i386_dr_update_inferior_debug_regs): Renamed to
8019 i386_update_inferior_debug_regs and made static.
8020 All uses updated.
8021
8022 2014-06-18 Gary Benson <gbenson@redhat.com>
8023
8024 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8025 (i386_dr_low_can_set_control): Likewise.
8026 (i386_get_debug_register_length): Likewise.
8027 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8028 (i386_dr_low_can_set_control): Likewise.
8029 (i386_get_debug_register_length): Likewise.
8030
8031 2014-06-17 Gary Benson <gbenson@redhat.com>
8032
8033 * i386-low.h (i386-dregs.h): New include.
8034 (DR_FIRSTADDR): Now in i386-dregs.h.
8035 (DR_LASTADDR): Likewise.
8036 (DR_NADDR): Likewise.
8037 (DR_STATUS): Likewise.
8038 (DR_CONTROL): Likewise.
8039 (i386_debug_reg_state): Likewise.
8040 (i386_dr_insert_watchpoint): Likewise.
8041 (i386_dr_remove_watchpoint): Likewise.
8042 (i386_dr_region_ok_for_watchpoint): Likewise.
8043 (i386_dr_stopped_data_address): Likewise.
8044 (i386_dr_stopped_by_watchpoint): Likewise.
8045 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8046
8047 2014-06-18 Gary Benson <gbenson@redhat.com>
8048
8049 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8050 i386_dr_insert_watchpoint.
8051 (i386_low_remove_watchpoint): Renamed to
8052 i386_dr_remove_watchpoint.
8053 (i386_low_region_ok_for_watchpoint): Renamed to
8054 i386_dr_region_ok_for_watchpoint.
8055 (i386_low_stopped_data_address): Renamed to
8056 i386_dr_stopped_data_address.
8057 (i386_low_stopped_by_watchpoint): Renamed to
8058 i386_dr_stopped_by_watchpoint.
8059 * i386-low.c (i386_show_dr): Renamed to
8060 i386_dr_show and made nonstatic. All uses updated.
8061 (i386_length_and_rw_bits): Renamed to
8062 i386_dr_length_and_rw_bits and made nonstatic.
8063 All uses updated.
8064 (i386_insert_aligned_watchpoint): Renamed to
8065 i386_dr_insert_aligned_watchpoint and made nonstatic.
8066 All uses updated.
8067 (i386_remove_aligned_watchpoint): Renamed to
8068 i386_dr_remove_aligned_watchpoint and made nonstatic.
8069 All uses updated.
8070 (i386_update_inferior_debug_regs): Renamed to
8071 i386_dr_update_inferior_debug_regs and made nonstatic.
8072 All uses updated.
8073 (i386_low_insert_watchpoint): Renamed to
8074 i386_dr_insert_watchpoint. All uses updated.
8075 (i386_low_remove_watchpoint): Renamed to
8076 i386_dr_remove_watchpoint. All uses updated.
8077 (i386_low_region_ok_for_watchpoint): Renamed to
8078 i386_dr_region_ok_for_watchpoint. All uses updated.
8079 (i386_low_stopped_data_address): Renamed to
8080 i386_dr_stopped_data_address. All uses updated.
8081 (i386_low_stopped_by_watchpoint): Renamed to
8082 i386_dr_stopped_by_watchpoint. All uses updated.
8083
8084 2014-06-18 Gary Benson <gbenson@redhat.com>
8085
8086 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8087 (i386_dr_low_can_set_control): Likewise.
8088 (i386_insert_aligned_watchpoint): New check.
8089
8090 2014-06-18 Gary Benson <gbenson@redhat.com>
8091
8092 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8093 Renamed to state.
8094
8095 2014-06-18 Gary Benson <gbenson@redhat.com>
8096
8097 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8098 instead of fatal and error.
8099 (i386_handle_nonaligned_watchpoint): Likewise.
8100
8101 2014-06-18 Gary Benson <gbenson@redhat.com>
8102
8103 * i386-low.c (i386_get_debug_register_length): New macro.
8104 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8105 (i386_show_dr): Use debug_printf instead of fprintf. Use
8106 phex to format values.
8107
8108 2014-06-18 Gary Benson <gbenson@redhat.com>
8109
8110 * i386-low.h: Comment changes.
8111 * i386-low.c: Likewise.
8112
8113 2014-06-18 Gary Benson <gbenson@redhat.com>
8114
8115 * i386-low.c: Whitespace changes.
8116
8117 2014-06-12 Tom Tromey <tromey@redhat.com>
8118
8119 * utils.c (freeargv): Remove.
8120
8121 2014-06-12 Tom Tromey <tromey@redhat.com>
8122
8123 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8124 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8125 (parse_debug_format_options): Likewise.
8126 (gdbserver_usage): Likewise.
8127 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8128 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8129 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8130 against libiberty.
8131 ($(LIBGNU)): Depend on libiberty.
8132 (all-lib): Recurse into all subdirs.
8133 (install-only): Invoke "install" target in subdirs.
8134 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8135 targets.
8136 * configure: Rebuild.
8137 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8138 for vasprintf, vsnprintf, or gettimeofday.
8139 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8140 srv_tgtobj.
8141
8142 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8143
8144 * development.sh: Delete.
8145 * Makefile.in (config.status): Adjust dependency on development.sh.
8146 * configure.ac: Adjust development.sh source call.
8147 * configure: Regenerate.
8148
8149 2014-06-02 Pedro Alves <palves@redhat.com>
8150
8151 * ax.c (gdb_free_agent_expr): New function.
8152 * ax.h (gdb_free_agent_expr): New declaration.
8153 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8154 list.
8155 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8156 static.
8157 (clear_breakpoint_conditions_and_commands): New function.
8158 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8159 (clear_breakpoint_conditions_and_commands): New declaration.
8160
8161 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8162
8163 * linux-aarch64-low.c (asm/ptrace.h): Include.
8164
8165 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8166
8167 Fix TLS access for -static -pthread.
8168 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8169 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8170 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8171
8172 2014-05-20 Pedro Alves <palves@redhat.com>
8173
8174 * linux-aarch64-low.c (aarch64_insert_point)
8175 (aarch64_remove_point): No longer check whether the type is
8176 supported here. Adjust to new interface.
8177 (the_low_target): Install aarch64_supports_z_point_type as
8178 supports_z_point_type method.
8179 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8180 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8181 instead of a Z packet char. Adjust.
8182 (arm_supports_z_point_type): New function.
8183 (arm_insert_point, arm_remove_point): Adjust to new interface.
8184 (the_low_target): Install arm_supports_z_point_type.
8185 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8186 (cris_insert_point, cris_remove_point): Adjust to new interface.
8187 Don't check whether the type is supported here.
8188 (the_low_target): Install cris_supports_z_point_type.
8189 * linux-low.c (linux_supports_z_point_type): New function.
8190 (linux_insert_point, linux_remove_point): Adjust to new interface.
8191 * linux-low.h (struct linux_target_ops) <insert_point,
8192 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8193 raw_breakpoint pointer parameter.
8194 <supports_z_point_type>: New method.
8195 * linux-mips-low.c (mips_supports_z_point_type): New function.
8196 (mips_insert_point, mips_remove_point): Adjust to new interface.
8197 Use mips_supports_z_point_type.
8198 (the_low_target): Install mips_supports_z_point_type.
8199 * linux-ppc-low.c (the_low_target): Install NULL as
8200 supports_z_point_type method.
8201 * linux-s390-low.c (the_low_target): Install NULL as
8202 supports_z_point_type method.
8203 * linux-sparc-low.c (the_low_target): Install NULL as
8204 supports_z_point_type method.
8205 * linux-x86-low.c (x86_supports_z_point_type): New function.
8206 (x86_insert_point): Adjust to new insert_point interface. Use
8207 insert_memory_breakpoint. Adjust to new
8208 i386_low_insert_watchpoint interface.
8209 (x86_remove_point): Adjust to remove_point interface. Use
8210 remove_memory_breakpoint. Adjust to new
8211 i386_low_remove_watchpoint interface.
8212 (the_low_target): Install x86_supports_z_point_type.
8213 * lynx-low.c (lynx_target_ops): Install NULL as
8214 supports_z_point_type callback.
8215 * nto-low.c (nto_supports_z_point_type): New.
8216 (nto_insert_point, nto_remove_point): Adjust to new interface.
8217 (nto_target_ops): Install nto_supports_z_point_type.
8218 * mem-break.c: Adjust intro comment.
8219 (struct raw_breakpoint) <raw_type, size>: New fields.
8220 <inserted>: Update comment.
8221 <shlib_disabled>: Delete field.
8222 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8223 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8224 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8225 (raw_bkpt_type_to_target_hw_bp_type): New function.
8226 (find_enabled_raw_code_breakpoint_at): New function.
8227 (find_raw_breakpoint_at): New type and size parameters. Use them.
8228 (insert_memory_breakpoint): New function, based off
8229 set_raw_breakpoint_at.
8230 (remove_memory_breakpoint): New function.
8231 (set_raw_breakpoint_at): Reimplement.
8232 (set_breakpoint): New, based on set_breakpoint_at.
8233 (set_breakpoint_at): Reimplement.
8234 (delete_raw_breakpoint): Go through the_target->remove_point
8235 instead of assuming memory breakpoints.
8236 (find_gdb_breakpoint_at): Delete.
8237 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8238 (find_gdb_breakpoint): New function.
8239 (set_gdb_breakpoint_at): Delete.
8240 (z_type_supported): New function.
8241 (set_gdb_breakpoint_1): New function, loosely based off
8242 set_gdb_breakpoint_at.
8243 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8244 (delete_gdb_breakpoint_at): Delete.
8245 (delete_gdb_breakpoint_1): New function, loosely based off
8246 delete_gdb_breakpoint_at.
8247 (delete_gdb_breakpoint): New function.
8248 (clear_gdb_breakpoint_conditions): Rename to ...
8249 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8250 breakpoint.
8251 (add_condition_to_breakpoint): Make static.
8252 (add_breakpoint_condition): Take a struct breakpoint pointer
8253 instead of an address. Adjust.
8254 (gdb_condition_true_at_breakpoint): Rename to ...
8255 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8256 z_type parameter.
8257 (gdb_condition_true_at_breakpoint): Reimplement.
8258 (add_breakpoint_commands): Take a struct breakpoint pointer
8259 instead of an address. Adjust.
8260 (gdb_no_commands_at_breakpoint): Rename to ...
8261 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8262 parameter. Return true if no breakpoint was found. Change debug
8263 output.
8264 (gdb_no_commands_at_breakpoint): Reimplement.
8265 (run_breakpoint_commands): Rename to ...
8266 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8267 and change return type to boolean.
8268 (run_breakpoint_commands): New function.
8269 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8270 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8271 breakpoint. Go through the_target->remove_point instead of
8272 assuming memory breakpoint.
8273 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8274 software and hardware breakpoints.
8275 (reinsert_raw_breakpoint): Go through the_target->insert_point
8276 instead of assuming memory breakpoint.
8277 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8278 software and hardware breakpoints.
8279 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8280 Check both software and hardware breakpoints.
8281 (validate_inserted_breakpoint): Assert the breakpoint is a
8282 software breakpoint. Set the inserted flag to -1 instead of
8283 setting shlib_disabled.
8284 (delete_disabled_breakpoints): Adjust.
8285 (validate_breakpoints): Only validate software breakpoints.
8286 Adjust to inserted flag change.
8287 (check_mem_read, check_mem_write): Skip breakpoint types other
8288 than software breakpoints. Adjust to inserted flag change.
8289 * mem-break.h (enum raw_bkpt_type): New enum.
8290 (raw_breakpoint, struct process_info): Forward declare.
8291 (Z_packet_to_target_hw_bp_type): Delete declaration.
8292 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8293 (set_gdb_breakpoint, delete_gdb_breakpoint)
8294 (clear_breakpoint_conditions): New declarations.
8295 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8296 (breakpoint_inserted_here): Update comment.
8297 (add_breakpoint_condition, add_breakpoint_commands): Replace
8298 address parameter with a breakpoint pointer parameter.
8299 (gdb_breakpoint_here): Update comment.
8300 (delete_gdb_breakpoint_at): Delete.
8301 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8302 * server.c (process_point_options): Take a struct breakpoint
8303 pointer instead of an address. Adjust.
8304 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8305 delete_gdb_breakpoint.
8306 * spu-low.c (spu_target_ops): Install NULL as
8307 supports_z_point_type method.
8308 * target.h: Include mem-break.h.
8309 (struct target_ops) <prepare_to_access_memory>: Update comment.
8310 <supports_z_point_type>: New field.
8311 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8312 instead of a char. Also take a raw breakpoint pointer.
8313 * win32-arm-low.c (the_low_target): Install NULL as
8314 supports_z_point_type.
8315 * win32-i386-low.c (i386_supports_z_point_type): New function.
8316 (i386_insert_point, i386_remove_point): Adjust to new interface.
8317 (the_low_target): Install i386_supports_z_point_type.
8318 * win32-low.c (win32_supports_z_point_type): New function.
8319 (win32_insert_point, win32_remove_point): Adjust to new interface.
8320 (win32_target_ops): Install win32_supports_z_point_type.
8321 * win32-low.h (struct win32_target_ops):
8322 <supports_z_point_type>: New method.
8323 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8324 instead of a char. Also take a raw breakpoint pointer.
8325
8326 2014-05-20 Pedro Alves <palves@redhat.com>
8327
8328 * mem-break.h: Include break-common.h.
8329 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8330 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8331 (Z_packet_to_target_hw_bp_type): New declaration.
8332 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8333 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8334 (Z_PACKET_ACCESS_WP): Delete macros.
8335 (Z_packet_to_hw_type): Delete function.
8336 * i386-low.h: Don't include break-common.h here.
8337 (Z_packet_to_hw_type): Delete declaration.
8338 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8339 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8340 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8341 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8342 * linux-aarch64-low.c: Don't include break-common.h here.
8343 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8344 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8345 (Z_packet_to_target_hw_bp_type): Delete function.
8346 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8347 function.
8348 (mips_insert_point, mips_remove_point): Use
8349 Z_packet_to_target_hw_bp_type.
8350
8351 2014-05-20 Pedro Alves <palves@redhat.com>
8352
8353 * linux-aarch64-low.c: Include break-common.h.
8354 (enum target_point_type): Delete.
8355 (Z_packet_to_point_type): Rename to ...
8356 (Z_packet_to_target_hw_bp_type): ... this, and return a
8357 target_hw_bp_type instead.
8358 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8359 instead of an enum target_point_type.
8360 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8361 breakpoint type.
8362 (aarch64_dr_state_insert_one_point)
8363 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8364 (aarch64_handle_aligned_watchpoint)
8365 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8366 Take an enum target_hw_bp_type instead of an enum
8367 target_point_type.
8368 (aarch64_supports_z_point_type): New function.
8369 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8370 use Z_packet_to_target_hw_bp_type.
8371
8372 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8373
8374 * configure.ac: Only use -Werror by default when DEVELOPMENT
8375 is true.
8376 * configure: Regenerate.
8377
8378 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8379
8380 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8381 * linux-x86-low.c (X86_64_USER_REGS): New.
8382 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8383
8384 2014-04-28 Yao Qi <yao@codesourcery.com>
8385
8386 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8387 name.
8388
8389 2014-04-25 Pedro Alves <palves@redhat.com>
8390
8391 PR server/16255
8392 * linux-low.c (linux_attach_fail_reason_string): New function.
8393 (linux_attach_lwp): Delete.
8394 (linux_attach_lwp_1): Rename to ...
8395 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8396 argument. Remove "initial" parameter. Return int instead of
8397 void. Don't error or warn here.
8398 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8399 failure to attach to the tgid. Call warning when failing to
8400 attach to an lwp.
8401 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8402 argument. Remove "initial" parameter. Return int instead of
8403 void. Don't error or warn here.
8404 (linux_attach_fail_reason_string): New declaration.
8405 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8406 interface change. Use linux_attach_fail_reason_string.
8407
8408 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8409 Walfred Tedeschi <walfred.tedeschi@intel.com>
8410
8411 * Makefile.in: Added rules to handle new files
8412 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8413 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8414 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8415 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8416 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8417 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8418 x32-avx512-linux.o.
8419 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8420 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8421 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8422 i386/x32-avx512.xml.
8423 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8424 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8425 i386/x32-avx512-linux.xml.
8426 * i387-fp.c (num_avx512_k_registers): New constant for number
8427 of K registers.
8428 (num_avx512_zmmh_low_registers): New constant for number of
8429 lower ZMM registers (0-15).
8430 (num_avx512_zmmh_high_registers): New constant for number of
8431 higher ZMM registers (16-31).
8432 (num_avx512_ymmh_registers): New contant for number of higher
8433 YMM registers (ymm16-31 added by avx521 on x86_64).
8434 (num_avx512_xmm_registers): New constant for number of higher
8435 XMM registers (xmm16-31 added by AVX512 on x86_64).
8436 (struct i387_xsave): Add space for AVX512 registers.
8437 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8438 Add code to handle AVX512 registers.
8439 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8440 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8441 prototypei from generated file.
8442 (tdesc_amd64_avx512_linux): Likewise.
8443 (init_registers_x32_avx512_linux): Likewise.
8444 (tdesc_x32_avx512_linux): Likewise.
8445 (init_registers_i386_avx512_linux): Likewise.
8446 (tdesc_i386_avx512_linux): Likewise.
8447 (x86_64_regmap): Add AVX512 registers.
8448 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8449 mask.
8450 (initialize_low_arch): Add code to initialize AVX512 registers.
8451
8452 2014-04-23 Pedro Alves <palves@redhat.com>
8453
8454 * mem-break.c (find_gdb_breakpoint_at): Make static.
8455 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8456
8457 2014-04-23 Pedro Alves <palves@redhat.com>
8458
8459 * i386-low.c: Don't include break-common.h here.
8460 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8461 prototype to take target_hw_bp_type as argument instead of a Z
8462 packet char.
8463 * i386-low.h: Include break-common.h here.
8464 (Z_packet_to_hw_type): Declare.
8465 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8466 prototypes.
8467 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8468 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8469 (x86_remove_point): Convert the packet number to a
8470 target_hw_bp_type before calling i386_low_remove_watchpoint.
8471 * win32-i386-low.c (i386_insert_point): Convert the packet number
8472 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8473 (i386_remove_point): Convert the packet number to a
8474 target_hw_bp_type before calling i386_low_remove_watchpoint.
8475
8476 2014-04-23 Pedro Alves <palves@redhat.com>
8477
8478 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8479
8480 2014-04-10 Pedro Alves <palves@redhat.com>
8481
8482 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8483 Check if the condition or command is NULL before checking if the
8484 breakpoint is known. On success, return true.
8485 * mem-break.h (add_breakpoint_condition): Document return.
8486 (add_breakpoint_commands): Add describing comment.
8487 * server.c (skip_to_semicolon): New function.
8488 (process_point_options): Use it.
8489
8490 2014-04-09 Pedro Alves <palves@redhat.com>
8491
8492 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8493 to lwpid_of.
8494
8495 2014-02-27 Pedro Alves <palves@redhat.com>
8496
8497 PR 12702
8498 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8499 macros.
8500 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8501 output.
8502 (last_thread_of_process_p): Take a PID argument instead of a
8503 thread pointer.
8504 (linux_wait_for_lwp): Delete.
8505 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8506 functions.
8507 (linux_low_filter_event): New function, party factored out from
8508 linux_wait_for_event.
8509 (linux_wait_for_event): Rename to ...
8510 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8511 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8512 sigsuspend. Check for zombie leaders.
8513 (linux_wait_for_event): Reimplement as wrapper around
8514 linux_wait_for_event_filtered.
8515 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8516 a normal or signal exit is seen, it's the whole process exiting.
8517 (wait_for_sigstop): No longer a for_each_inferior callback.
8518 Rewrite on top of linux_wait_for_event_filtered.
8519 (stop_all_lwps): Call wait_for_sigstop directly.
8520 * server.c (resume, handle_target_event): Handle
8521 TARGET_WAITKIND_NO_RESUMED.
8522
8523 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8524
8525 * win32-low.c (psapi_get_dll_name,
8526 * win32_CreateToolhelp32Snapshot): Delete.
8527 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8528 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8529 Delete.
8530 (handle_load_dll): Add function description.
8531 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8532
8533 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8534
8535 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8536 Add comment.
8537 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8538 base address when calling win32_add_one_solib.
8539 (handle_load_dll): Delete local variable load_addr.
8540 Remove 0x1000 offset applied to DLL base address when calling
8541 win32_add_one_solib.
8542 (handle_unload_dll): Add comment.
8543
8544 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8545
8546 * win32-low.c (win32_add_all_dlls): Renames
8547 win32_ensure_ntdll_loaded. Rewrite function documentation.
8548 Adjust implementation to always load all DLLs.
8549 Add 0x1000 offset to DLL base address when calling
8550 win32_add_one_solib.
8551 (child_initialization_done): New static global.
8552 (do_initial_child_stuff): Set child_initialization_done to
8553 zero during child initialization, and 1 after. Replace call
8554 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8555 Add comment.
8556 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8557 (handle_unload_dll): Add function documentation.
8558 (get_child_debug_event): Ignore load and unload DLL events
8559 during child initialization.
8560
8561 2014-02-20 Doug Evans <dje@google.com>
8562
8563 Remove global all_lwps.
8564 * inferiors.h (ptid_of): Move here from linux-low.h.
8565 (pid_of, lwpid_of): Ditto.
8566 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8567 parameter is a struct thread_info * now.
8568 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8569 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8570 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8571 directly.
8572 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8573 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8574 * linux-arm-low.c (update_registers_callback): Update, "entry"
8575 parameter is a struct thread_info * now.
8576 Fetch lwpid from current_inferior directly.
8577 (arm_insert_point): Pass &all_threads to find_inferior instead of
8578 &all_lwps.
8579 (arm_remove_point): Ditto.
8580 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8581 (arm_prepare_to_resume): Fetch pid from thread.
8582 (arm_read_description): Fetch lwpid from current_inferior directly.
8583 * linux-low.c (all_lwps): Delete.
8584 (delete_lwp): Delete call to remove_inferior.
8585 (handle_extended_wait): Fetch lwpid from thread.
8586 (add_lwp): Don't set lwp->entry.id. Remove call to
8587 add_inferior_to_list.
8588 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8589 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8590 (kill_one_lwp_callback): Ditto.
8591 (linux_kill): Don't dereference NULL pointer.
8592 Fetch ptid,lwpid from thread.
8593 (get_detach_signal): Fetch ptid from thread.
8594 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8595 Simplify call to regcache_invalidate_thread.
8596 (delete_lwp_callback): Update, "entry" parameter is a
8597 struct thread_info * now. Fetch pid from thread.
8598 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8599 (status_pending_p_callback): Update, "entry" parameter is a
8600 struct thread_info * now. Fetch ptid from thread.
8601 (find_lwp_pid): Update, "entry" parameter is a
8602 struct thread_info * now.
8603 (linux_wait_for_lwp): Fetch pid from thread.
8604 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8605 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8606 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8607 (dequeue_one_deferred_signal): Ditto.
8608 (cancel_breakpoint): Fetch ptid from current_inferior.
8609 (linux_wait_for_event): Pass &all_threads to find_inferior,
8610 not &all_lwps. Fetch ptid, lwpid from thread.
8611 (count_events_callback): Update, "entry" parameter is a
8612 struct thread_info * now.
8613 (select_singlestep_lwp_callback): Ditto.
8614 (select_event_lwp_callback): Ditto.
8615 (cancel_breakpoints_callback): Ditto.
8616 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8617 not &all_lwps.
8618 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8619 (unsuspend_one_lwp): Update, "entry" parameter is a
8620 struct thread_info * now.
8621 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8622 not &all_lwps.
8623 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8624 Fetch lwpid from thread, not lwp.
8625 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8626 Pass &all_threads to find_inferior, not &all_lwps.
8627 (send_sigstop): Fetch lwpid from thread, not lwp.
8628 (send_sigstop_callback): Update, "entry" parameter is a
8629 struct thread_info * now.
8630 (suspend_and_send_sigstop_callback): Ditto.
8631 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8632 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8633 struct thread_info * now.
8634 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8635 from thread, lwp.
8636 (lwp_running): Update, "entry" parameter is a
8637 struct thread_info * now.
8638 (stop_all_lwps): Fetch ptid from thread.
8639 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8640 (linux_resume_one_lwp): Fetch lwpid from thread.
8641 (linux_set_resume_request): Update, "entry" parameter is a
8642 struct thread_info * now. Fetch pid, lwpid from thread.
8643 (resume_status_pending_p): Update, "entry" parameter is a
8644 struct thread_info * now.
8645 (need_step_over_p): Ditto. Fetch lwpid from thread.
8646 (start_step_over): Fetch lwpid from thread.
8647 (linux_resume_one_thread): Update, "entry" parameter is a
8648 struct thread_info * now. Fetch lwpid from thread.
8649 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8650 (proceed_one_lwp): Update, "entry" parameter is a
8651 struct thread_info * now. Fetch lwpid from thread.
8652 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8653 struct thread_info * now.
8654 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8655 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8656 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8657 directly.
8658 (regsets_store_inferior_registers): Ditto.
8659 (fetch_register, store_register): Ditto.
8660 (linux_read_memory, linux_write_memory): Ditto.
8661 (linux_request_interrupt): Ditto.
8662 (linux_read_auxv): Ditto.
8663 (linux_xfer_siginfo): Ditto.
8664 (linux_qxfer_spu): Ditto.
8665 (linux_qxfer_libraries_svr4): Ditto.
8666 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8667 moved to inferiors.h.
8668 (get_lwp): Delete.
8669 (get_thread_lwp): Update.
8670 (struct lwp_info): Delete member "entry". Simplify comment for
8671 member "thread".
8672 (all_lwps): Delete.
8673 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8674 current_inferior directly.
8675 (update_watch_registers_callback): Update, "entry" parameter is a
8676 struct thread_info * now. Fetch pid from thread.
8677 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8678 (mips_insert_point): Fetch lwpid from current_inferior.
8679 Pass &all_threads to find_inferior, not &all_lwps.
8680 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8681 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8682 directly.
8683 (mips_stopped_data_address): Ditto.
8684 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8685 directly.
8686 * linux-tile-low.c (tile_arch_setup): Ditto.
8687 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8688 (update_debug_registers_callback): Update, "entry" parameter is a
8689 struct thread_info * now. Fetch pid from thread.
8690 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8691 Pass &all_threads to find_inferior, not &all_lwps.
8692 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8693 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8694 Pass &all_threads to find_inferior, not &all_lwps.
8695 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8696 (i386_dr_low_get_status): Ditto.
8697 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8698 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8699 (x86_linux_read_description): Ditto.
8700 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8701
8702 2014-02-20 Doug Evans <dje@google.com>
8703
8704 * inferiors.c (get_first_inferior): Fix buglet.
8705
8706 2014-02-19 Doug Evans <dje@google.com>
8707
8708 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8709 * inferiors.c (add_thread): Change result type to struct thread_info *.
8710 All callers updated.
8711 (add_lwp): Call add_thread here instead of in callers.
8712 All callers updated.
8713 * linux-low.h (get_lwp_thread): Rewrite.
8714 (struct lwp_info): New member "thread".
8715
8716 2014-02-19 Doug Evans <dje@google.com>
8717
8718 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8719 All callers updated.
8720
8721 2014-02-19 Doug Evans <dje@google.com>
8722
8723 * inferiors.c (add_thread): Fix whitespace.
8724
8725 2014-02-19 Doug Evans <dje@google.com>
8726
8727 * dll.c (clear_dlls): Replace accessing list implemention details
8728 with API function.
8729 * gdbthread.h (get_first_thread): Declare.
8730 * inferiors.c (for_each_inferior_with_data): New function.
8731 (get_first_thread): New function.
8732 (find_thread_ptid): Simplify.
8733 (get_first_inferior): New function.
8734 (clear_list): Delete.
8735 (one_inferior_p): New function.
8736 (clear_inferior_list): New function.
8737 (clear_inferiors): Update.
8738 * inferiors.h (for_each_inferior_with_data): Declare.
8739 (clear_inferior_list): Declare.
8740 (one_inferior_p): Declare.
8741 (get_first_inferior): Declare.
8742 * linux-low.c (linux_wait_for_event): Replace accessing list
8743 implemention details with API function.
8744 * server.c (target_running): Ditto.
8745 (accumulate_file_name_length): New function.
8746 (emit_dll_description): New function.
8747 (handle_qxfer_libraries): Replace accessing list implemention
8748 details with API function.
8749 (handle_qxfer_threads_worker): New function.
8750 (handle_qxfer_threads_proper): Replace accessing list implemention
8751 details with API function.
8752 (handle_query): Ditto.
8753 (visit_actioned_threads_callback_ftype): New typedef.
8754 (visit_actioned_threads_data): New struct.
8755 (visit_actioned_threads): Rewrite to be find_inferior callback.
8756 (resume): Call find_inferior.
8757 (handle_status): Replace accessing list implemention
8758 details with API function.
8759 (process_serial_event): Replace accessing list implemention details
8760 with API function.
8761 * target.c (set_desired_inferior): Replace accessing list implemention
8762 details with API function.
8763 * tracepoint.c (same_process_p): New function.
8764 (gdb_agent_about_to_close): Replace accessing list implemention
8765 details with API function.
8766 * win32-low.c (child_delete_thread): Replace accessing list
8767 implemention details with API function.
8768 (match_dll_by_basename): New function.
8769 (dll_is_loaded_by_basename): New function.
8770 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8771 details call to dll_is_loaded_by_basename.
8772
8773 2014-02-19 Doug Evans <dje@google.com>
8774
8775 * dll.h (struct dll_info): Add comment.
8776 * gdbthread.h (struct thread_info): Add comment.
8777 (current_ptid): Simplify.
8778 * inferiors.c (add_process): Update.
8779 (remove_process): Update.
8780 * inferiors.h (struct process_info): Rename member "head" to "entry".
8781 * linux-low.c (delete_lwp): Update.
8782 (add_lwp): Update.
8783 (last_thread_of_process_p): Update.
8784 (kill_one_lwp_callback, linux_kill): Update.
8785 (status_pending_p_callback): Update.
8786 (wait_for_sigstop): Update. Simplify read of ptid.
8787 (start_step_over): Update.
8788 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8789 (get_lwp_thread): Update.
8790 (struct lwp_info): Rename member "head" to "entry".
8791 * regcache.h (inferior_list_entry): Delete.
8792 * server.c (kill_inferior_callback): Update.
8793 (detach_or_kill_inferior_callback): Update.
8794 (print_started_pid): Update.
8795 (print_attached_pid): Update.
8796 (process_serial_event): Simplify read of ptid.
8797 * thread-db.c (thread_db_create_event): Update.
8798 (thread_db_get_tls_address): Update.
8799 * win32-low.c (current_inferior_ptid): Simplify.
8800
8801 2014-02-19 Tom Tromey <tromey@redhat.com>
8802
8803 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8804 argument.
8805 (target_supports_btrace): Update.
8806
8807 2014-02-14 Yao Qi <yao@codesourcery.com>
8808
8809 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8810 (rsp-low-ipa.o): New target.
8811
8812 2014-02-12 Tom Tromey <tromey@redhat.com>
8813
8814 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8815 convert_ascii_to_int.
8816 * regcache.c (registers_to_string): Likewise.
8817 * remote-utils.c (decode_M_packet): Likewise.
8818 * server.c (process_serial_event): Likewise.
8819
8820 2014-02-12 Tom Tromey <tromey@redhat.com>
8821
8822 * server.c (handle_query, handle_v_run): Use hex2bin, not
8823 unhexify.
8824 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8825
8826 2014-02-12 Tom Tromey <tromey@redhat.com>
8827
8828 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8829 convert_int_to_ascii.
8830 * regcache.c (registers_to_string, collect_register_as_string):
8831 Likewise.
8832 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8833 Likewise.
8834 * server.c (process_serial_event): Likewise.
8835 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8836 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8837
8838 2014-02-12 Tom Tromey <tromey@redhat.com>
8839
8840 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8841 bin2hex, not hexify.
8842 * tracepoint.c (cmd_qtstatus): Likewise.
8843
8844 2014-02-12 Tom Tromey <tromey@redhat.com>
8845
8846 * remote-utils.c (monitor_output): Pass explicit length to
8847 hexify.
8848
8849 2014-02-12 Tom Tromey <tromey@redhat.com>
8850
8851 * tracepoint.c: Include rsp-low.h.
8852 * server.c: Include rsp-low.h.
8853 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8854 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8855 declare.
8856 * remote-utils.c: Include rsp-low.h.
8857 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8858 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8859 (convert_int_to_ascii, convert_ascii_to_int): Move to
8860 common/rsp-low.c.
8861 * regcache.c: Include rsp-low.h.
8862 * ax.c: Include rsp-low.h.
8863 * Makefile.in (SFILES): Add common/rsp-low.c.
8864 (OBS): Add rsp-low.o.
8865 (rsp-low.o): New target.
8866
8867 2014-02-12 Tom Tromey <tromey@redhat.com>
8868
8869 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8870 Include print-utils.h.
8871 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8872 (plongest, thirty_two, phex_nz): Remove.
8873 * Makefile.in (SFILES): Add common/print-utils.c.
8874 (OBS): Add print-utils.o.
8875 (print-utils-ipa.o): New target.
8876 (print-utils.o): New target.
8877 (IPA_OBJS): Add print-utils-ipa.o.
8878
8879 2014-02-06 Tom Tromey <tromey@redhat.com>
8880
8881 * Makefile.in (SFILES): Fix indentation.
8882
8883 2014-02-05 Doug Evans <dje@google.com>
8884
8885 * linux-low.c (linux_wait_for_event): Improve comment.
8886 (linux_wait_1): Keep current_inferior in sync with event_child.
8887
8888 2014-01-22 Doug Evans <dje@google.com>
8889
8890 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8891
8892 2014-01-22 Doug Evans <dje@google.com>
8893
8894 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8895 * configure: Regenerate.
8896 * config.in: Regenerate.
8897 * Makefile.in (SFILES): Add debug.c.
8898 (OBS): Add debug.o.
8899 * debug.c: New file.
8900 * debug.h: New file.
8901 * linux-aarch64-low.c (*): Update all debugging printfs to use
8902 debug_printf instead of fprintf.
8903 * linux-arm-low.c (*): Ditto.
8904 * linux-cris-low.c (*): Ditto.
8905 * linux-crisv32-low.c (*): Ditto.
8906 * linux-m32r-low.c (*): Ditto.
8907 * linux-sparc-low.c (*): Ditto.
8908 * linux-x86.c (*): Ditto.
8909 * linux-low.c (*): Ditto.
8910 (linux_wait_1): Add calls to debug_enter, debug_exit.
8911 (linux_wait): Remove redundant debugging printf.
8912 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8913 (linux_resume, unstop_all_lwps): Ditto.
8914 * mem-break.c (*): Update all debugging printfs to use
8915 debug_printf instead of fprintf.
8916 * remote-utils.c (*): Ditto.
8917 * thread-db.c (*): Ditto.
8918 * server.c #include <ctype.h>, "gdb_vecs.h".
8919 (debug_threads): Moved to debug.c.
8920 (*): Update all debugging printfs to use debug_printf instead of
8921 fprintf.
8922 (start_inferior): Replace call to fflush with call to debug_flush.
8923 (monitor_show_help): Mention set debug-format.
8924 (parse_debug_format_options): New function.
8925 (handle_monitor_command): Handle "monitor set debug-format".
8926 (gdbserver_usage): Mention --debug-format.
8927 (main): Parse --debug-format.
8928 * server.h (debug_threads): Declaration moved to debug.h.
8929 #include "debug.h".
8930 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8931 trace_debug_1 that uses debug_printf.
8932 (tracepoint_look_up_symbols): Update all debugging printfs to use
8933 debug_printf instead of fprintf.
8934
8935 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8936
8937 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8938 sys/ptrace.h.
8939
8940 2014-01-17 Pedro Alves <palves@redhat.com>
8941
8942 PR build/16445
8943 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8944 defined after including gdb_proc_service.h.
8945
8946 2014-01-16 Doug Evans <dje@google.com>
8947
8948 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8949 (match_dll): Use it.
8950
8951 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8952
8953 * target.h (target_ops) <read_btrace>: Change parameters and
8954 return type to allow error reporting.
8955 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8956 trace reading errors on.
8957 * linux-low.c (linux_low_read_btrace): Pass trace reading
8958 errors on.
8959 (linux_low_disable_btrace): New.
8960
8961 2014-01-15 Doug Evans <dje@google.com>
8962
8963 * inferiors.c (thread_id_to_gdb_id): Delete.
8964 * inferiors.h (thread_id_to_gdb_id): Delete.
8965
8966 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8967
8968 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8969 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8970 versions.
8971
8972 2014-01-08 Pedro Alves <palves@redhat.com>
8973
8974 * server.c (handle_status): Don't discard previous queued stop
8975 replies or thread's pending status here.
8976 (main) <disconnection>: Do it here instead.
8977
8978 2014-01-08 Pedro Alves <palves@redhat.com>
8979
8980 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8981 * server.c (visit_actioned_threads, handle_pending_status): New
8982 function.
8983 (handle_v_cont): Factor out parts to ...
8984 (resume): ... this new function. If in all-stop, and a thread
8985 being resumed has a pending status, report it without actually
8986 resuming.
8987 (myresume): Adjust to use the new 'resume' function.
8988 (clear_pending_status_callback, set_pending_status_callback)
8989 (find_status_pending_thread_callback): New functions.
8990 (handle_status): Handle the case of multiple threads having
8991 interesting statuses to report. Report threads' real last signal
8992 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8993 with an interesting thread to report the status for, instead of
8994 always reporting the status of the first thread.
8995
8996 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8997
8998 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8999 * gdbreplay.c (gdbreplay_version): Likewise.
9000
9001 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9002
9003 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9004 iov.iov_len with the real length in use.
9005
9006 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9007
9008 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9009 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9010 for all targets that use win32-low.c.
9011 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9012 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9013
9014 2013-12-13 Pedro Alves <palves@redhat.com>
9015
9016 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9017 if equal to TARGET_WAITKIND_LOADED.
9018 * win32-low.c (cached_status): New static global.
9019 (win32_wait): Add declaration.
9020 (do_initial_child_stuff): Flush all initial pending debug events
9021 up to the initial breakpoint.
9022 (win32_wait): If CACHED_STATUS was set, return that instead
9023 of doing a real wait. Remove the code resuming the execution
9024 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9025 during the initial phase. Also remove the code changing
9026 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9027 TARGET_WAITKIND_STOPPED.
9028
9029 2013-12-11 Yao Qi <yao@codesourcery.com>
9030
9031 * notif.c (handle_notif_ack): Return 0 if no notification
9032 matches.
9033
9034 2013-11-20 Doug Evans <dje@google.com>
9035
9036 * linux-low.c (linux_set_resume_request): Fix comment.
9037
9038 2013-11-20 Doug Evans <dje@google.com>
9039
9040 * linux-low.c (resume_status_pending_p): Tweak comment.
9041
9042 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9043
9044 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9045 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9046 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9047 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9048 (srv_amd64_regobj): Add amd64-mpx.o.
9049 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9050 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9051 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9052 * i387-fp.c (num_pl_bnd_register) Added constant.
9053 (num_pl_bnd_cfg_registers) Added constant.
9054 (struct i387_xsave) Added reserved area and MPX fields.
9055 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9056 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9057 function.
9058 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9059 (init_registers_amd64_mpx_linux): Declare new function.
9060 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9061 (x86_64_regmap): Add MPX registers.
9062 (x86_linux_read_description): Add MPX case.
9063 (initialize_low_arch): Initialize MPX targets.
9064
9065 2013-11-18 Tom Tromey <tromey@redhat.com>
9066
9067 * configure: Rebuild.
9068 * configure.ac: Don't check for stdlib.h.
9069 * gdbreplay.c: Unconditionally include stdlib.h.
9070
9071 2013-11-18 Tom Tromey <tromey@redhat.com>
9072
9073 * config.in: Rebuild.
9074 * configure: Rebuild.
9075 * configure.ac: Don't use AC_HEADER_DIRENT.
9076
9077 2013-11-18 Tom Tromey <tromey@redhat.com>
9078
9079 * server.h: Don't check HAVE_STRING_H.
9080 * gdbreplay.c: Don't check HAVE_STRING_H.
9081 * configure: Rebuild.
9082
9083 2013-11-18 Tom Tromey <tromey@redhat.com>
9084
9085 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9086 LIBGNU.
9087
9088 2013-11-08 Tom Tromey <tromey@redhat.com>
9089
9090 * configure, config.in: Rebuild.
9091 * configure.ac: Remove unused configury.
9092
9093 2013-11-08 Tom Tromey <tromey@redhat.com>
9094
9095 * acinclude.m4: Include common.m4, codeset.m4.
9096 * configure, config.in: Rebuild.
9097 * configure.ac: Use GDB_AC_COMMON.
9098
9099 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9100
9101 * linux-s390-low.c (HWCAP_S390_TE): New define.
9102 (s390_arch_setup): Consider the TE field in the HWCAP for
9103 determining 'have_regset_tdb'.
9104
9105 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9106
9107 PR gdb/16014
9108 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9109 call to sizeof.
9110
9111 2013-10-02 Pedro Alves <palves@redhat.com>
9112
9113 * server.c (process_serial_event): Don't output "GDBserver
9114 exiting" if GDB is connected through stdio.
9115 * target.c (mywait): Likewise, be silent if GDB is connected
9116 through stdio.
9117
9118 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9119
9120 * lynx-low.c (lynx_add_threads_after_attach): New function.
9121 (lynx_attach): Remove call to add_thread. Add call to
9122 lynx_add_threads_after_attach instead.
9123
9124 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9125
9126 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9127 * config.in, configure: Regenerated.
9128
9129 2013-09-18 Yao Qi <yao@codesourcery.com>
9130
9131 PR server/15959
9132 * server.c (start_inferior): Clear 'resume_info'.
9133
9134 2013-09-16 Jiong Wang <jiwang@tilera.com>
9135
9136 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9137 for each register.
9138
9139 2013-09-16 Jiong Wang <jiwang@tilera.com>
9140
9141 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9142 linux-tile-low.o to srv_tgtobj.
9143
9144 2013-09-16 Will Newton <will.newton@linaro.org>
9145
9146 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9147 out regs.
9148
9149 2013-09-06 Pedro Alves <palves@redhat.com>
9150
9151 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9152 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9153 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9154 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9155 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9156 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9157
9158 2013-09-06 Pedro Alves <palves@redhat.com>
9159
9160 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9161 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9162
9163 2013-09-06 Pedro Alves <palves@redhat.com>
9164
9165 * linux-amd64-ipa.c: Include tracepoint.h.
9166 * linux-i386-ipa.c: Include tracepoint.h.
9167
9168 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9169
9170 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9171 (ps_get_thread_area): New function.
9172
9173 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9174
9175 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9176 (initialize_low_arch): Call init_registers_crisv32 rather than
9177 init_register_crisv32.
9178
9179 2013-09-05 Pedro Alves <palves@redhat.com>
9180
9181 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9182 to ...
9183 * hostio.h: ... this new file.
9184 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9185 win32-low.c: Include hostio.h.
9186
9187 2013-09-05 Pedro Alves <palves@redhat.com>
9188
9189 * server.h (gdb_client_data, handler_func, callback_handler_func)
9190 (delete_file_handler, add_file_handler, append_callback_event)
9191 (delete_callback_event, start_event_loop, initialize_event_loop):
9192 Move to event-loop.h and include it.
9193 * event-loop.h: New file.
9194
9195 2013-09-05 Pedro Alves <palves@redhat.com>
9196
9197 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9198 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9199 (loaded_dll, unloaded_dll): Move to ...
9200 * dll.h: ... this new file.
9201 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9202
9203 2013-09-05 Pedro Alves <palves@redhat.com>
9204
9205 * server.h (current_process, get_thread_process, all_processes)
9206 (add_inferior_to_list, for_each_inferior, current_inferior)
9207 (remove_inferior, add_process, remove_process, find_process_pid)
9208 (have_started_inferiors_p, have_attached_inferiors_p)
9209 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9210 (clear_inferiors, find_inferior, find_inferior_id)
9211 (inferior_target_data, set_inferior_target_data)
9212 (inferior_regcache_data, set_inferior_regcache_data): Move to
9213 inferiors.h, and include it.
9214 * inferiors.h: New file.
9215
9216 2013-09-05 Pedro Alves <palves@redhat.com>
9217
9218 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9219 Move ...
9220 * ax.h: ... here.
9221
9222 2013-09-05 Pedro Alves <palves@redhat.com>
9223
9224 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9225 tracepoint.h.
9226 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9227 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9228 (handle_tracepoint_general_set, handle_tracepoint_query)
9229 (tracepoint_finished_step, tracepoint_was_hit)
9230 (release_while_stepping_state_list, current_traceframe)
9231 (in_readonly_region, traceframe_read_mem)
9232 (fetch_traceframe_registers, traceframe_read_sdata)
9233 (traceframe_read_info, struct fast_tpoint_collect_status)
9234 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9235 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9236 (supply_fast_tracepoint_registers)
9237 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9238 (ipa_tdesc, claim_trampoline_space)
9239 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9240 (agent_mem_read, agent_get_trace_state_variable_value)
9241 (agent_set_trace_state_variable_value, agent_tsv_read)
9242 (agent_mem_read_string, get_raw_reg_func_addr)
9243 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9244 * tracepoint.h: ... this new file.
9245
9246 2013-09-05 Pedro Alves <palves@redhat.com>
9247
9248 * server.h (perror_with_name, error, fatal, warning, paddress)
9249 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9250 include it.
9251 * utils.h: New file.
9252
9253 2013-09-05 Pedro Alves <palves@redhat.com>
9254
9255 * server.h (remote_debug, noack_mode, transport_is_reliable)
9256 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9257 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9258 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9259 (write_enn, initialize_async_io, enable_async_io)
9260 (disable_async_io, check_remote_input_interrupt_request)
9261 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9262 (dead_thread_notify, prepare_resume_reply)
9263 (decode_address_to_semicolon, decode_address, decode_m_packet)
9264 (decode_M_packet, decode_X_packet, decode_xfer_write)
9265 (decode_search_memory_packet, unhexify, hexify)
9266 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9267 (look_up_one_symbol, relocate_instruction)
9268 (monitor_output): Move to remote-utils.h, and include it.
9269 * remote-utils.h: New file.
9270
9271 2013-09-05 Pedro Alves <palves@redhat.com>
9272
9273 * server.h (_): Delete.
9274
9275 2013-09-02 Pedro Alves <palves@redhat.com>
9276
9277 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9278 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9279 allocated.
9280 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9281
9282 2013-09-02 Pierre Muller <muller@sourceware.org>
9283
9284 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9285 or WriteProcessMemory complete successfully and handle
9286 ERROR_PARTIAL_COPY error.
9287
9288 2013-09-02 Pedro Alves <palves@redhat.com>
9289
9290 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9291 error instead of EIO.
9292
9293 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9294
9295 PR server/15604
9296 * linux-low.c: Include filestuff.h.
9297 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9298 * lynx-low.c: Include filestuff.h.
9299 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9300 * server.c: Include filestuff.h.
9301 (main): Call notice_open_fds.
9302 * spu-low.c: Include filestuff.h.
9303 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9304
9305 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9306
9307 * Makefile.in: Explain why ../target and ../nat are not
9308 listed as include file search paths.
9309 (linux-waitpid.o): New object file rule.
9310 * configure.srv (srv_native_linux_obj): New variable.
9311 Replace all occurrences of linux native object files with
9312 $srv_native_linux_obj.
9313 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9314 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9315 (linux_enable_event_reporting): Remove declaration.
9316 (my_waitpid): Moved to common/linux-waitpid.c.
9317 (linux_wait_for_event): Pass ptid when calling
9318 linux_enable_event_reporting.
9319 (linux_supports_tracefork_flag): Remove.
9320 (linux_enable_event_reporting): Likewise.
9321 (linux_tracefork_grandchild): Remove.
9322 (STACK_SIZE): Moved to common/linux-ptrace.c.
9323 (linux_tracefork_child): Remove.
9324 (linux_test_for_tracefork): Remove.
9325 (linux_look_up_symbols): Call linux_supports_traceclone.
9326 (initialize_low): Remove call to linux_test_for_tracefork.
9327 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9328 common/linux-ptrace.h.
9329 (PTRACE_TYPE_ARG4): Likewise.
9330 Include linux-ptrace.h.
9331
9332 2013-08-21 Pedro Alves <palves@redhat.com>
9333
9334 * config.in: Renegerate.
9335
9336 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9337
9338 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9339 (SFILES): Remove $(srcdir)/common/target-common.c and
9340 add $(srcdir)/target/waitstatus.c.
9341 (OBS): Remove target-common.o and add waitstatus.o.
9342 (server_h): Remove $(srcdir)/../common/target-common.h and
9343 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9344 and $(srcdir)/../target/waitstatus.h.
9345 (target-common.o): Remove.
9346 (waitstatus.o): New target object file.
9347 * target.h: Do not include target-common.h and
9348 include target/resume.h, target/wait.h and
9349 target/waitstatus.h.
9350
9351 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9352
9353 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9354 to PTRACE_TYPE_ARG3.
9355 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9356 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9357 PTRACE_TYPE_ARG4.
9358 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9359 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9360
9361 2013-07-27 Jie Zhang <jie@codesourcery.com>
9362 Daniel Jacobowitz <dan@codesourcery.com>
9363 Yao Qi <yao@codesourcery.com>
9364
9365 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9366 (mips-linux-watch.o): New rule.
9367 (mips_linux_watch_h): New variable.
9368 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9369 srv_tgtobj.
9370 * linux-mips-low.c: Include mips-linux-watch.h.
9371 (struct arch_process_info, struct arch_lwp_info): New.
9372 (update_watch_registers_callback): New function.
9373 (mips_linux_new_process, mips_linux_new_thread) New functions.
9374 (mips_linux_prepare_to_resume, mips_insert_point): New
9375 functions.
9376 (mips_remove_point, mips_stopped_by_watchpoint): New
9377 functions.
9378 (rsp_bp_type_to_target_hw_bp_type): New function.
9379 (mips_stopped_data_address): New function.
9380 (the_low_target): Add watchpoint support functions.
9381
9382 2013-07-27 Yao Qi <yao@codesourcery.com>
9383
9384 * i386-low.c: Include break-common.h.
9385 (enum target_hw_bp_type): Remove.
9386
9387 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9388
9389 * Makefile.in (SFILES): /common/target-common.c.
9390 (OBS): Add target-common.o.
9391 (server_h): Add $(srcdir)/../common/target-common.h.
9392 (target-common.o): New target.
9393 * server.c (queue_stop_reply_callback): Free
9394 status string after use.
9395 * target.c (target_waitstatus_to_string): Remove.
9396 * target.h: Include target-common.h.
9397 (resume_kind): Likewise.
9398 (target_waitkind): Likewise.
9399 (target_waitstatus): Likewise.
9400 (TARGET_WNOHANG): Likewise.
9401
9402 2013-07-04 Yao Qi <yao@codesourcery.com>
9403
9404 * Makefile.in (host_alias): Use @host_noncanonical@.
9405 (target_alias): Use @target_noncanonical@.
9406 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9407 ACX_NONCANONICAL_HOST.
9408 * configure: Regenerated.
9409
9410 Revert:
9411 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9412
9413 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9414 * configure: Rebuild.
9415 * Makefile.in (version_host, version_target): Get from configure.
9416 (version.c): Use $(version_host) and $(version_target).
9417
9418 2013-07-03 Pedro Alves <palves@redhat.com>
9419
9420 * Makefile.in (config.status): Depend on development.sh.
9421 * acinclude.m4: Include libmcheck.m4.
9422 * configure: Regenerate.
9423
9424 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9425
9426 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9427 attribute inside the parentheses.
9428 (winapi_DebugSetProcessKillOnExit): Ditto.
9429 (winapi_DebugBreakProcess): Ditto.
9430 (winapi_GenerateConsoleCtrlEvent): Ditto.
9431
9432 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9433
9434 * notif.h (notif_event): Add a dummy member to avoid compiler
9435 errors.
9436
9437 2013-07-01 Pedro Alves <palves@redhat.com>
9438
9439 * hostio.c (HOSTIO_PATH_MAX): Define.
9440 (require_filename, handle_open, handle_unlink, handle_readlink):
9441 Use it.
9442
9443 2013-07-01 Pedro Alves <palves@redhat.com>
9444
9445 * server.h: Include "pathmax.h".
9446 * linux-low.c: Don't include sys/param.h.
9447 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9448 MAXPATHLEN.
9449 * win32-low.c: Don't include sys/param.h.
9450 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9451
9452 2013-07-01 Pedro Alves <palves@redhat.com>
9453
9454 * event-loop.c: Don't check HAVE_UNISTD_H before including
9455 <unistd.h>.
9456 * gdbreplay.c: Likewise.
9457 * remote-utils.c: Likewise.
9458 * server.c: Likewise.
9459 * configure.ac: Don't check for unistd.h.
9460 * configure: Regenerate.
9461
9462 2013-06-28 Tom Tromey <tromey@redhat.com>
9463
9464 * Makefile.in (version.c): Use version.in, not
9465 common/version.in.
9466
9467 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9468
9469 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9470 * configure: Rebuild.
9471 * Makefile.in (version_host, version_target): Get from configure.
9472 (version.c): Use $(version_host) and $(version_target).
9473
9474 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9475
9476 Fix trace-status to output user name without trailing colon.
9477 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9478
9479 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9480
9481 Fix trace-status to output proper start-time and stop-time.
9482 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9483 output start time and stop time in hex as gdb expects.
9484
9485 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9486
9487 * tracepoint.c (build_traceframe_info_xml): Output trace state
9488 variables present in the trace buffer.
9489
9490 2013-06-24 Tom Tromey <tromey@redhat.com>
9491
9492 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9493 create-version.sh.
9494 (version.o): Remove.
9495 * gdbreplay.c: Include version.h.
9496 (version, host_name): Don't declare.
9497 * server.h: Include version.h.
9498 (version, host_name): Don't declare.
9499
9500 2013-06-12 Pedro Alves <palves@redhat.com>
9501
9502 * linux-x86-low.c (linux_is_elf64): Delete global.
9503 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9504 with local linux_pid_exe_is_elf_64_file use.
9505
9506 2013-06-11 Pedro Alves <palves@redhat.com>
9507
9508 * linux-low.c (regset_disabled, disable_regset): New functions.
9509 (regsets_fetch_inferior_registers)
9510 (regsets_store_inferior_registers): Use them.
9511 (initialize_regsets_info); Don't allocate the disabled_regsets
9512 array here.
9513 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9514 comment.
9515
9516 2013-06-11 Pedro Alves <palves@redhat.com>
9517
9518 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9519 xmalloc.
9520
9521 2013-06-11 Pedro Alves <palves@redhat.com>
9522
9523 * linux-x86-low.c (initialize_low_arch): Call
9524 init_registers_x32_avx_linux.
9525
9526 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9527
9528 Fix compatibility with Android Bionic.
9529 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9530 it is not empty.
9531
9532 2013-06-07 Pedro Alves <palves@redhat.com>
9533
9534 PR server/14823
9535 * Makefile.in (OBS): Add tdesc.o.
9536 (IPA_OBJS): Add tdesc-ipa.o.
9537 (tdesc-ipa.o): New rule.
9538 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9539 interface.
9540 * linux-low.c (new_inferior): Delete.
9541 (disabled_regsets, num_regsets): Delete.
9542 (linux_add_process): Adjust to set the new per-process
9543 new_inferior flag.
9544 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9545 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9546 was a stop. When calling arch_setup, switch the current inferior
9547 to the thread that got an event.
9548 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9549 (regsets_fetch_inferior_registers)
9550 (regsets_store_inferior_registers): New regsets_info parameter.
9551 Adjust to use it.
9552 (linux_register_in_regsets): New regs_info parameter. Adjust to
9553 use it.
9554 (register_addr, fetch_register, store_register): New usrregs_info
9555 parameter. Adjust to use it.
9556 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9557 parameter regs_info. Adjust to use it.
9558 (linux_fetch_registers): Get the current inferior's regs_info, and
9559 adjust to use it.
9560 (linux_store_registers): Ditto.
9561 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9562 (initialize_low): Don't initialize the target_regsets here. Call
9563 initialize_low_arch.
9564 * linux-low.h (target_regsets): Delete declaration.
9565 (struct regsets_info): New.
9566 (struct usrregs_info): New.
9567 (struct regs_info): New.
9568 (struct process_info_private) <new_inferior>: New field.
9569 (struct linux_target_ops): Delete the num_regs, regmap, and
9570 regset_bitmap fields. New field regs_info.
9571 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9572 * i387-fp.c (num_xmm_registers): Delete.
9573 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9574 calls to new interface.
9575 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9576 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9577 Infer the number of xmm registers from the regcache's target
9578 description.
9579 * i387-fp.h (num_xmm_registers): Delete.
9580 * inferiors.c (add_thread): Don't install the thread's regcache
9581 here.
9582 * proc-service.c (gregset_info): Fetch the current inferior's
9583 regs_info. Adjust to use it.
9584 * regcache.c: Include tdesc.h.
9585 (register_bytes, reg_defs, num_registers)
9586 (gdbserver_expedite_regs): Delete.
9587 (get_thread_regcache): If the thread doesn't have a regcache yet,
9588 create one, instead of aborting gdbserver.
9589 (regcache_invalidate_one): Rename to ...
9590 (regcache_invalidate_thread): ... this.
9591 (regcache_invalidate_one): New.
9592 (regcache_invalidate): Only invalidate registers of the current
9593 process.
9594 (init_register_cache): Add target_desc parameter, and use it.
9595 (new_register_cache): Ditto. Assert the target description has a
9596 non zero registers_size.
9597 (regcache_cpy): Add assertions. Adjust.
9598 (realloc_register_cache, set_register_cache): Delete.
9599 (registers_to_string, registers_from_string): Adjust.
9600 (find_register_by_name, find_regno, find_register_by_number)
9601 (register_cache_size): Add target_desc parameter, and use it.
9602 (free_register_cache_thread, free_register_cache_thread_one)
9603 (regcache_release, register_cache_size): New.
9604 (register_size): Add target_desc parameter, and use it.
9605 (register_data, supply_register, supply_register_zeroed)
9606 (supply_regblock, supply_register_by_name, collect_register)
9607 (collect_register_as_string, collect_register_by_name): Adjust.
9608 * regcache.h (struct target_desc): Forward declare.
9609 (struct regcache) <tdesc>: New field.
9610 (init_register_cache, new_register_cache): Add target_desc
9611 parameter.
9612 (regcache_invalidate_thread): Declare.
9613 (regcache_invalidate_one): Delete declaration.
9614 (regcache_release): Declare.
9615 (find_register_by_number, register_cache_size, register_size)
9616 (find_regno): Add target_desc parameter.
9617 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9618 declarations.
9619 * remote-utils.c: Include tdesc.h.
9620 (outreg, prepare_resume_reply): Adjust.
9621 * server.c: Include tdesc.h.
9622 (gdbserver_xmltarget): Delete declaration.
9623 (get_features_xml, process_serial_event): Adjust.
9624 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9625 declare.
9626 (struct process_info) <tdesc>: New field.
9627 (ipa_tdesc): Declare.
9628 * tdesc.c: New file.
9629 * tdesc.h: New file.
9630 * tracepoint.c: Include tdesc.h.
9631 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9632 (get_context_regcache): Adjust to pass ipa_tdesc down.
9633 (do_action_at_tracepoint): Adjust to get the register cache size
9634 from the context regcache's description.
9635 (traceframe_walk_blocks): Adjust to get the register cache size
9636 from the current trace frame's description.
9637 (traceframe_get_pc): Adjust to get current trace frame's
9638 description and pass it down.
9639 (gdb_collect): Adjust to get the register cache size from the
9640 IPA's description.
9641 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9642 (gdbserver_xmltarget): Delete.
9643 (initialize_low_tracepoint): Set the ipa's target description.
9644 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9645 (initialize_low_tracepoint): Set the ipa's target description.
9646 * linux-x86-low.c: Include tdesc.h.
9647 [__x86_64__] (is_64bit_tdesc): New.
9648 (ps_get_thread_area, x86_get_thread_area): Use it.
9649 (i386_cannot_store_register): Rename to ...
9650 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9651 (i386_cannot_fetch_register): Rename to ...
9652 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9653 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9654 to new interface.
9655 (target_regsets): Rename to ...
9656 (x86_regsets): ... this.
9657 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9658 interface.
9659 (x86_siginfo_fixup): Use is_64bit_tdesc.
9660 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9661 (tdesc_x32_avx_linux, tdesc_x32_linux)
9662 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9663 Declare.
9664 (x86_linux_update_xmltarget): Delete.
9665 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9666 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9667 (AMD64_LINUX_USER64_CS): New.
9668 (x86_linux_read_description): New, based on
9669 x86_linux_update_xmltarget.
9670 (same_process_callback): New.
9671 (x86_arch_setup_process_callback): New.
9672 (x86_linux_update_xmltarget): New.
9673 (x86_regsets_info): New.
9674 (amd64_linux_regs_info): New.
9675 (i386_linux_usrregs_info): New.
9676 (i386_linux_regs_info): New.
9677 (x86_linux_regs_info): New.
9678 (x86_arch_setup): Reimplement.
9679 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9680 (x86_emit_ops): Ditto.
9681 (the_low_target): Adjust. Install x86_linux_regs_info,
9682 x86_cannot_fetch_register, and x86_cannot_store_register.
9683 (initialize_low_arch): New.
9684 * linux-ia64-low.c (tdesc_ia64): Declare.
9685 (ia64_fetch_register): Adjust.
9686 (ia64_usrregs_info, regs_info): New globals.
9687 (ia64_regs_info): New function.
9688 (the_low_target): Adjust.
9689 (initialize_low_arch): New function.
9690 * linux-sparc-low.c (tdesc_sparc64): Declare.
9691 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9692 Adjust.
9693 (sparc_arch_setup): New function.
9694 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9695 (the_low_target): Adjust.
9696 (initialize_low_arch): New function.
9697 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9698 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9699 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9700 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9701 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9702 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9703 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9704 (tdesc_powerpc_isa205_vsx64l): Declare.
9705 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9706 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9707 (ppc_set_pc, ppc_get_hwcap): Adjust.
9708 (ppc_usrregs_info): Forward declare.
9709 (!__powerpc64__) ppc_regmap_adjusted: New global.
9710 (ppc_arch_setup): Adjust to the current process'es target
9711 description.
9712 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9713 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9714 (ppc_store_evrregset): Adjust.
9715 (target_regsets): Rename to ...
9716 (ppc_regsets): ... this, and make static.
9717 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9718 (ppc_regs_info): New function.
9719 (the_low_target): Adjust.
9720 (initialize_low_arch): New function.
9721 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9722 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9723 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9724 (tdesc_s390x_linux64v2): Declare.
9725 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9726 (s390_fill_gregset, s390_store_last_break): Adjust.
9727 (target_regsets): Rename to ...
9728 (s390_regsets): ... this, and make static.
9729 (s390_get_pc, s390_set_pc): Adjust.
9730 (s390_get_hwcap): New target_desc parameter, and use it.
9731 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9732 (s390_arch_setup): Adjust to set the current process'es target
9733 description. Don't adjust the regmap.
9734 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9735 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9736 (regs_info_3264): New globals.
9737 (s390_regs_info): New function.
9738 (the_low_target): Adjust.
9739 (initialize_low_arch): New function.
9740 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9741 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9742 [__mips64] (init_registers_mips_linux)
9743 (init_registers_mips_dsp_linux): Delete defines.
9744 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9745 (have_dsp): New global.
9746 (mips_read_description): New, based on mips_arch_setup.
9747 (mips_arch_setup): Reimplement.
9748 (get_usrregs_info): New function.
9749 (mips_cannot_fetch_register, mips_cannot_store_register)
9750 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9751 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9752 (target_regsets): Rename to ...
9753 (mips_regsets): ... this, and make static.
9754 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9755 (dsp_regs_info, regs_info): New globals.
9756 (mips_regs_info): New function.
9757 (the_low_target): Adjust.
9758 (initialize_low_arch): New function.
9759 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9760 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9761 Declare.
9762 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9763 (arm_read_description): New, with bits factored from
9764 arm_arch_setup.
9765 (arm_arch_setup): Reimplement.
9766 (target_regsets): Rename to ...
9767 (arm_regsets): ... this, and make static.
9768 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9769 (arm_regs_info): New function.
9770 (the_low_target): Adjust.
9771 (initialize_low_arch): New function.
9772 * linux-m68k-low.c (tdesc_m68k): Declare.
9773 (target_regsets): Rename to ...
9774 (m68k_regsets): ... this, and make static.
9775 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9776 (m68k_regs_info): New function.
9777 (m68k_arch_setup): New function.
9778 (the_low_target): Adjust.
9779 (initialize_low_arch): New function.
9780 * linux-sh-low.c (tdesc_sharch): Declare.
9781 (target_regsets): Rename to ...
9782 (sh_regsets): ... this, and make static.
9783 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9784 (sh_regs_info, sh_arch_setup): New functions.
9785 (the_low_target): Adjust.
9786 (initialize_low_arch): New function.
9787 * linux-bfin-low.c (tdesc_bfin): Declare.
9788 (bfin_arch_setup): New function.
9789 (bfin_usrregs_info, regs_info): New globals.
9790 (bfin_regs_info): New function.
9791 (the_low_target): Adjust.
9792 (initialize_low_arch): New function.
9793 * linux-cris-low.c (tdesc_cris): Declare.
9794 (cris_arch_setup): New function.
9795 (cris_usrregs_info, regs_info): New globals.
9796 (cris_regs_info): New function.
9797 (the_low_target): Adjust.
9798 (initialize_low_arch): New function.
9799 * linux-cris-low.c (tdesc_crisv32): Declare.
9800 (cris_arch_setup): New function.
9801 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9802 (cris_regs_info): New function.
9803 (the_low_target): Adjust.
9804 (initialize_low_arch): New function.
9805 * linux-m32r-low.c (tdesc_m32r): Declare.
9806 (m32r_arch_setup): New function.
9807 (m32r_usrregs_info, regs_info): New globals.
9808 (m32r_regs_info): Adjust.
9809 (initialize_low_arch): New function.
9810 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9811 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9812 (tic6x_usrregs_info): Forward declare.
9813 (tic6x_read_description): New function, based on ...
9814 (tic6x_arch_setup): ... this. Reimplement.
9815 (target_regsets): Rename to ...
9816 (tic6x_regsets): ... this, and make static.
9817 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9818 (tic6x_regs_info): New function.
9819 (the_low_target): Adjust.
9820 (initialize_low_arch): New function.
9821 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9822 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9823 (target_regsets): Rename to ...
9824 (xtensa_regsets): ... this, and make static.
9825 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9826 globals.
9827 (xtensa_arch_setup, xtensa_regs_info): New functions.
9828 (the_low_target): Adjust.
9829 (initialize_low_arch): New function.
9830 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9831 (nios2_arch_setup): Set the current process'es tdesc.
9832 (target_regsets): Rename to ...
9833 (nios2_regsets): ... this.
9834 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9835 (nios2_regs_info): New function.
9836 (the_low_target): Adjust.
9837 (initialize_low_arch): New function.
9838 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9839 (aarch64_arch_setup): Set the current process'es tdesc.
9840 (target_regsets): Rename to ...
9841 (aarch64_regsets): ... this.
9842 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9843 (aarch64_regs_info): New function.
9844 (the_low_target): Adjust.
9845 (initialize_low_arch): New function.
9846 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9847 globals.
9848 (target_regsets): Rename to ...
9849 (tile_regsets): ... this.
9850 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9851 (tile_regs_info): New function.
9852 (tile_arch_setup): Set the current process'es tdesc.
9853 (the_low_target): Adjust.
9854 (initialize_low_arch): New function.
9855 * spu-low.c (tdesc_spu): Declare.
9856 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9857 * win32-arm-low.c (tdesc_arm): Declare.
9858 (arm_arch_setup): New function.
9859 (the_low_target): Install arm_arch_setup instead of
9860 init_registers_arm.
9861 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9862 (init_windows_x86): Rename to ...
9863 (i386_arch_setup): ... this. Set `win32_tdesc'.
9864 (the_low_target): Adjust.
9865 * win32-low.c (win32_tdesc): New global.
9866 (child_add_thread): Don't create the thread cache here.
9867 (do_initial_child_stuff): Set the new process'es tdesc.
9868 * win32-low.h (struct target_desc): Forward declare.
9869 (win32_tdesc): Declare.
9870 * lynx-i386-low.c (tdesc_i386): Declare global.
9871 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9872 * lynx-low.c (lynx_tdesc): New global.
9873 (lynx_add_process): Set the new process'es tdesc.
9874 * lynx-low.h (struct target_desc): Forward declare.
9875 (lynx_tdesc): Declare global.
9876 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9877 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9878 * nto-low.c (nto_tdesc): New global.
9879 (do_attach): Set the new process'es tdesc.
9880 * nto-low.h (struct target_desc): Forward declare.
9881 (nto_tdesc): Declare.
9882 * nto-x86-low.c (tdesc_i386): Declare.
9883 (nto_x86_arch_setup): Set `nto_tdesc'.
9884
9885 2013-06-04 Gary Benson <gbenson@redhat.com>
9886
9887 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9888 to qSupported response when appropriate.
9889 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9890 with nonzero-length annex.
9891 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9892 arguments supplied in annex.
9893
9894 2013-05-31 Doug Evans <dje@google.com>
9895
9896 PR server/15594
9897 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9898 64 bits in 64-cross-32 environment.
9899
9900 2013-05-28 Pedro Alves <palves@redhat.com>
9901
9902 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9903 (aarch64-without-fpu.c): Delete rule.
9904 * configure.srv (aarch64*-*-linux*): Remove references to
9905 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9906 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9907 declaration.
9908
9909 2013-05-24 Pedro Alves <palves@redhat.com>
9910
9911 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9912 instead of strchr/decode_address. Error if the range isn't split
9913 with a ','. Don't assume there's be a ':' in the action.
9914
9915 2013-05-23 Yao Qi <yao@codesourcery.com>
9916 Pedro Alves <palves@redhat.com>
9917
9918 * linux-low.c (lwp_in_step_range): New function.
9919 (linux_wait_1): If the thread was range stepping and stopped
9920 outside the stepping range, report the stop to GDB. Otherwise,
9921 continue stepping. Add range stepping debug output.
9922 (linux_set_resume_request): Copy the step range from the resume
9923 request to the lwp.
9924 (linux_supports_range_stepping): New.
9925 (linux_target_ops) <supports_range_stepping>: Set to
9926 linux_supports_range_stepping.
9927 * linux-low.h (struct linux_target_ops)
9928 <supports_range_stepping>: New field.
9929 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9930 * linux-x86-low.c (x86_supports_range_stepping): New.
9931 (the_low_target) <supports_range_stepping>: Set to
9932 x86_supports_range_stepping.
9933 * server.c (handle_v_cont): Handle 'r' action.
9934 (handle_v_requests): Append ";r" if the target supports range
9935 stepping.
9936 * target.h (struct thread_resume) <step_range_start,
9937 step_range_end>: New fields.
9938 (struct target_ops) <supports_range_stepping>:
9939 New field.
9940 (target_supports_range_stepping): New macro.
9941
9942 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9943
9944 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9945 confusion in comment.
9946
9947 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9948
9949 * lynx-low.c (struct process_info_private): New type.
9950 (lynx_add_process): New function.
9951 (lynx_create_inferior, lynx_attach): Replace calls to
9952 add_process by calls to lynx_add_process.
9953 (lynx_resume): If PTID is null, then try using
9954 current_process()->private->last_wait_event_ptid.
9955 Add comments.
9956 (lynx_clear_inferiors): Delete. The contents of that function
9957 has been inlined in lynx_mourn;
9958 (lynx_wait_1): Save the ptid in the process's private data.
9959 (lynx_mourn): Free the process' private data. Replace call
9960 to lynx_clear_inferiors by call to clear_inferiors.
9961
9962 2013-05-17 Yao Qi <yao@codesourcery.com>
9963
9964 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9965 the right place.
9966
9967 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9968
9969 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9970 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9971 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9972 PT_TEXT_END_ADDR guards. Update comments.
9973 (linux_target_op) <read_offsets>: Conditionally define to
9974 linux_read_offsets if the target is UCLIBC and if it defines
9975 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9976
9977 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9978 Andrew Jenner <andrew@codesourcery.com>
9979
9980 * Makefile.in (SFILES): Add linux-nios2-low.c.
9981 (clean): Add action to delete nios2-linux.c.
9982 (nios2-linux.c): New rule.
9983 * configure.srv: Add nios2*-*-linux*.
9984 * linux-nios2-low.c: New.
9985
9986 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9987
9988 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9989
9990 2013-04-25 Hui Zhu <hui@codesourcery.com>
9991
9992 PR gdb/15186
9993 * ax.c (ax_printf): Add fflush.
9994
9995 2013-04-22 Tom Tromey <tromey@redhat.com>
9996
9997 * Makefile.in (SFILES): Add filestuff.c.
9998 (OBS): Add filestuff.o.
9999 (filestuff.o): New target.
10000 * config.in, configure: Rebuild.
10001 * configure.ac: Check for fdwalk, pipe2.
10002
10003 2013-04-17 Pedro Alves <palves@redhat.com>
10004
10005 * configure.ac (USE_THREAD_DB): Delete variable.
10006 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10007 Don't AC_SUBST USE_THREAD_DB.
10008 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10009 * config.in, configure: Regenerate.
10010
10011 2013-04-16 Pedro Alves <palves@redhat.com>
10012
10013 * linux-low.h (struct lwp_info) <thread_known>: Move under
10014 the USE_THREAD_DB #ifdef.
10015
10016 2013-04-16 Pedro Alves <palves@redhat.com>
10017
10018 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10019 (linux-low.o): Delete rule.
10020 * linux-low.h: Always include "gdb_thread_db.h" instead of
10021 conditionally including thread_db.h.
10022 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10023 HAVE_THREAD_DB_H.
10024
10025 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10026
10027 * Makefile.in (install-only): Fix make install regression.
10028
10029 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10030
10031 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10032 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10033 installation.
10034 * gdbserver.1: Remove.
10035
10036 2013-03-22 Pedro Alves <palves@redhat.com>
10037
10038 * linux-low.c (handle_extended_wait): Don't call
10039 linux_enable_event_reporting.
10040
10041 2013-03-15 Tony Theodore <tonyt@logyst.com>
10042
10043 PR build/9098:
10044 * Makefile.in (SHELL): Use @SHELL@.
10045
10046 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10047
10048 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10049 compiler warning.
10050
10051 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10052
10053 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10054 Remove extraneous NULL element.
10055
10056 2013-03-13 Yao Qi <yao@codesourcery.com>
10057
10058 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10059 'V' block in trace frame.
10060
10061 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10062
10063 * target.h (struct target_ops): Add btrace ops.
10064 (target_supports_btrace): New macro.
10065 (target_enable_btrace): New macro.
10066 (target_disable_btrace): New macro.
10067 (target_read_btrace): New macro.
10068 * gdbthread.h (struct thread_info): Add btrace field.
10069 * server.c: Include btrace-common.h.
10070 (handle_btrace_general_set): New function.
10071 (handle_btrace_enable): New function.
10072 (handle_btrace_disable): New function.
10073 (handle_general_set): Call handle_btrace_general_set.
10074 (handle_qxfer_btrace): New function.
10075 (struct qxfer qxfer_packets[]): Add btrace entry.
10076 * inferiors.c (remove_thread): Disable btrace.
10077 * linux-low: Include linux-btrace.h.
10078 (linux_low_enable_btrace): New function.
10079 (linux_low_read_btrace): New function.
10080 (linux_target_ops): Add btrace ops.
10081 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10082 Add srv_linux_btrace=yes.
10083 (x86_64-*-linux*): Add linux-btrace.o.
10084 Add srv_linux_btrace=yes.
10085 * configure.ac: Define HAVE_LINUX_BTRACE.
10086 * config.in: Regenerated.
10087 * configure: Regenerated.
10088
10089 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10090
10091 * server.c (handle_qxfer): Preserve error message if -3 is
10092 returned.
10093 (qxfer): Document the -3 return value.
10094
10095 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10096
10097 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10098 (linux_btrace_h): New variable.
10099 (linux-btrace.o): New rule.
10100
10101 2013-03-08 Stan Shebs <stan@codesourcery.com>
10102 Hafiz Abid Qadeer <abidh@codesourcery.com>
10103
10104 * tracepoint.c (trace_buffer_size): New global.
10105 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10106 (init_trace_buffer): Change to one-argument function. Allocate
10107 trace buffer memory.
10108 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10109 handle QTBuffer:size packet.
10110 (cmd_bigqtbuffer_size): New function.
10111 (initialize_tracepoint): Call init_trace_buffer with
10112 DEFAULT_TRACE_BUFFER_SIZE.
10113 * server.c (handle_query): Add QTBuffer:size in the
10114 supported packets.
10115
10116 2013-03-07 Yao Qi <yao@codesourcery.com>
10117
10118 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10119 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10120 of -1.
10121 (cmd_qtsp): Adjust condition. Do post increment.
10122 Set cur_action and cur_step_action back to 0.
10123
10124 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10125
10126 PR server/15236
10127 * linux-low.c (linux_write_memory): Return early success if LEN is
10128 zero.
10129
10130 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10131
10132 * configure.srv: Add x86_64-*-cygwin* as target.
10133
10134 2013-02-28 Tom Tromey <tromey@redhat.com>
10135
10136 * configure.ac: Invoke AC_SYS_LARGEFILE.
10137 * configure, config.in: Rebuild.
10138
10139 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10140
10141 * win32-low.c: Throughout, fix format strings and casts of
10142 printf-like functions to avoid type related warnings on all
10143 platforms.
10144 (get_child_debug_event): Print dwDebugEventCode as hex since
10145 that's how it's usually documented.
10146
10147 2013-02-28 Yao Qi <yao@codesourcery.com>
10148
10149 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10150 pulongest.
10151
10152 2013-02-27 Jiong Wang <jiwang@tilera.com>
10153
10154 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10155 (reg-tilegx32.c): New rule.
10156 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10157 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10158 different register info initializer according to elf class.
10159 (init_registers_tilgx32): New function. The tilegx32 register info
10160 initializer.
10161 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10162 (tile_store_gregset): Likewise.
10163
10164 2013-02-27 Yao Qi <yao@codesourcery.com>
10165
10166 * server.c (process_point_options): Print debug message when
10167 debug_threads is true.
10168
10169 2013-02-26 Yao Qi <yao@codesourcery.com>
10170
10171 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10172
10173 2013-02-19 Pedro Alves <palves@redhat.com>
10174 Kai Tietz <ktietz@redhat.com>
10175
10176 PR gdb/15161
10177
10178 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10179 instead of strtoul to extract address from packet.
10180 (process_serial_event) <'z'>: Likewise.
10181
10182 2013-02-18 Yao Qi <yao@codesourcery.com>
10183
10184 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10185
10186 2013-02-14 Pedro Alves <palves@redhat.com>
10187
10188 Plug memory leak.
10189
10190 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10191 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10192
10193 2013-02-14 Pedro Alves <palves@redhat.com>
10194
10195 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10196
10197 2013-02-14 Pedro Alves <palves@redhat.com>
10198
10199 * tracepoint.c (save_string): Delete.
10200 (add_tracepoint_action): Use savestring instead of save_string.
10201
10202 2013-02-12 Pedro Alves <palves@redhat.com>
10203
10204 * linux-xtensa-low.c: Ditto.
10205 * xtensa-xtregs.c: Ditto.
10206
10207 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10208
10209 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10210 thread_db.
10211
10212 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10213
10214 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10215 aarch64_num_wp_regs and aarch64_num_bp_regs to
10216 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10217
10218 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10219
10220 * linux-aarch64-low.c (ps_get_thread_area): Replace
10221 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10222
10223 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10224 Marcus Shawcroft <marcus.shawcroft@arm.com>
10225 Nigel Stephens <nigel.stephens@arm.com>
10226 Yufeng Zhang <yufeng.zhang@arm.com>
10227
10228 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10229 (aarch64.c, aarch64-without-fpu.c): New targets.
10230 * configure.srv (aarch64*-*-linux*): New.
10231 * linux-aarch64-low.c: New file.
10232
10233 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10234
10235 * linux-low.c (handle_extended_wait, linux_create_inferior)
10236 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10237 (dequeue_one_deferred_signal, linux_resume_one_thread)
10238 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10239 (linux_tracefork_grandchild, linux_test_for_tracefork)
10240 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10241 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10242 where the argument is 0.
10243
10244 2013-01-25 Yao Qi <yao@codesourcery.com>
10245
10246 * event-loop.c: Include "queue.h".
10247 (gdb_event_p): New typedef.
10248 (struct gdb_event) <next_event>: Remove.
10249 (event_queue): Change to QUEUE(gdb_event_p).
10250 (async_queue_event): Remove.
10251 (gdb_event_xfree): New.
10252 (initialize_event_loop): New.
10253 (process_event): Use API from QUEUE.
10254 (wait_for_event): Likewise.
10255 * server.c (main): Call initialize_event_loop.
10256 * server.h (initialize_event_loop): Declare.
10257
10258 2013-01-18 Yao Qi <yao@codesourcery.com>
10259
10260 * ax.h (struct eval_agent_expr_context): New.
10261 (gdb_eval_agent_expr): Update declaration.
10262 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10263 TFRAME. Add new argument CTX.
10264 * server.h (struct eval_agent_expr_context): Declare.
10265 (agent_mem_read, agent_tsv_read): Update declaration.
10266 (agent_mem_read_string): Likewise.
10267 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10268 (add_traceframe_block): Add new argument TPOINT.
10269 Increase TPOINT->traceframe_usage.
10270 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10271 eval_tracepoint_agent_expr.
10272 (condition_true_at_tracepoint): Likewise.
10273 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10274 (agent_mem_read_string, agent_tsv_read): Likewise.
10275
10276 2013-01-16 Yao Qi <yao@codesourcery.com>
10277
10278 * linux-low.c (linux_resume_one_lwp): Don't check
10279 'lwp->bp_reinsert != 0'.
10280
10281 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10282 Pedro Alves <palves@redhat.com>
10283
10284 * lynx-low.c (ptrace_request_to_str): Define a temporary
10285 macro and use it to simplify this function's implementation.
10286
10287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10288
10289 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10290 sets errno.
10291
10292 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10293
10294 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10295
10296 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10297
10298 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10299
10300 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10301
10302 * lynx-low.c (lynx_resume): Use the resume_info parameter
10303 to determine the ptid for the lynx_ptrace call, unless
10304 it is equal to minus_one_ptid, in which case we use the
10305 ptid of the current_inferior.
10306 (lynx_wait_1): After having received a thread create/exit
10307 event, resume the inferior's execution using the signaling
10308 thread's ptid, rather than the old ptid.
10309
10310 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10311
10312 * lynx-low.c (lynx_resume): Delete variable ret.
10313
10314 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10315
10316 * gdbreplay.c (gdbreplay_version): Update copyright year.
10317 * server.c (gdbserver_version): Likewise.
10318
10319 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10320
10321 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10322 new thread.
10323
10324 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10325
10326 * lynx-low.c (ptrace_request_to_str): Add handling for
10327 PTRACE_GETTRACESIG.
10328
10329 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10330
10331 * lynx-low.c (lynx_attach): Delete variable new_process.
10332
10333 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10334
10335 * lynx-low.c (lynx_create_inferior): Delete variable
10336 new_process.
10337
10338 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10339
10340 * lynx-low.c (ptrace_request_to_str): Do not handle
10341 PTRACE_GETTHREADLIST if this macro does not exist.
10342
10343 2012-12-15 Yao Qi <yao@codesourcery.com>
10344
10345 * Makefile.in (OBS): Add notif.o.
10346 * notif.c, notif.h: New.
10347 * server.c: Include "notif.h".
10348 (struct vstop_notif) <next>: Remove.
10349 <base>: New field.
10350 (queue_stop_reply): Update.
10351 (push_event, send_next_stop_reply): Remove.
10352 (discard_queued_stop_replies): Update.
10353 (notif_stop): New variable.
10354 (handle_v_stopped): Remove.
10355 (handle_v_requests): Don't call handle_v_stopped. Call
10356 handle_ack_notif instead.
10357 (queue_stop_reply_callback): Call notif_event_enque instead
10358 of queue_stop_reply.
10359 (handle_status): Don't call send_next_stop_reply, call
10360 notif_write_event instead.
10361 (kill_inferior_callback): Likewise.
10362 (detach_or_kill_inferior_callback): Likewise.
10363 (main): Call initialize_notif.
10364 (process_serial_event): Call QUEUE_is_empty.
10365 (handle_target_event): Call notif_push instead of push event.
10366 * server.h (push_event): Remove declaration.
10367
10368 2012-12-10 Tom Tromey <tromey@redhat.com>
10369
10370 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10371 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10372 macros.
10373 (.c.o): Rewrite.
10374 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10375 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10376 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10377 (amd64-linux-ipa.o, ax.o): Rewrite.
10378 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10379 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10380 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10381 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10382 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10383 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10384 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10385 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10386 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10387 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10388 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10389 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10390 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10391 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10392 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10393 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10394 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10395 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10396 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10397 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10398 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10399 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10400 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10401 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10402 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10403 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10404 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10405 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10406 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10407 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10408 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10409 (reg-tilegx.o): Remove.
10410 (all_object_files): New macro.
10411 Include .deps files.
10412 * aclocal.m4, configure: Rebuild.
10413 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10414 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10415 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10416
10417 2012-12-05 Tom Tromey <tromey@redhat.com>
10418
10419 PR gdb/14917:
10420 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10421
10422 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10423
10424 * configure.ac: Check for linux/perf_event.h.
10425 * config.in: Regenerated.
10426 * configure: Regenerated.
10427
10428 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10429
10430 * hostio.c (handle_readlink): Decrease buffer size
10431 parameter passed to readlink by one byte.
10432
10433 2012-11-26 Yao Qi <yao@codesourcery.com>
10434
10435 * configure.ac (build_warnings): Append '-Wempty-body'.
10436 * configure: Regenerated.
10437 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10438 body.
10439
10440 2012-11-15 Pierre Muller <muller@sourceware.org>
10441
10442 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10443 * config.in: Regenerate.
10444 * configure: Regenerate.
10445 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10446 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10447 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10448 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10449 header.
10450 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10451 instead of <sys/wait.h> header.
10452 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10453
10454 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10455
10456 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10457 (various make rules): Remove -DGDBSERVER
10458
10459 2012-11-09 Yao Qi <yao@codesourcery.com>
10460
10461 * spu-low.c (current_ptid): Move it to ..
10462 * gdbthread.h: ... here. New.
10463 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10464 * server.c (myresume, process_serial_event): Likewise.
10465 * thread-db.c (thread_db_find_new_threads): Likewise.
10466 * tracepoint.c (run_inferior_command): Likewise.
10467
10468 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10469
10470 * server.c (handle_search_memory_1): Include access length in
10471 warning message.
10472
10473 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10474
10475 * linux-crisv32-low.c: Fix compile errors.
10476
10477 2012-09-04 Yao Qi <yao@codesourcery.com>
10478
10479 * tracepoint.c (cmd_qtsv): Adjust debug message.
10480 Don't check CUR_TPOINT.
10481
10482 2012-08-28 Yao Qi <yao@codesourcery.com>
10483
10484 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10485 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10486 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10487 Remove declarations of xmalloc, xreallloc, xstrdup and
10488 freeargv.
10489 * Makefile.in (libiberty_h): New.
10490 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10491 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10492
10493 2012-08-23 Yao Qi <yao@codesourcery.com>
10494
10495 * server.h: Remove declaration of 'xsnprintf'.
10496
10497 2012-08-22 Keith Seitz <keiths@redhat.com>
10498
10499 * server.h: Include build-gnulib-gbserver/config.h.
10500 * gdbreplay.c: Likewise.
10501
10502 2012-08-08 Doug Evans <dje@google.com>
10503
10504 * Makefile.in (SFILES): Add gdb_vecs.c.
10505 (OBS): Add gdb_vecs.o.
10506 (gdb_vecs_h, host_defs_h): New variables.
10507 (thread-db.o): Add $(gdb_vecs_h) dependency.
10508 (gdb_vecs.o): New rule.
10509 * thread-db.c: #include "gdb_vecs.h".
10510 (thread_db_load_search): Use a vector to iterate over path elements.
10511 Handle text appearing after "$pdir".
10512
10513 * configure.ac: Add check for strstr.
10514 * config.in: Regenerate.
10515 * configure: Regenerate.
10516
10517 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10518
10519 * hostio.c (handle_pread): If pread fails, fall back to attempting
10520 lseek/read.
10521 (handle_pwrite): Likewise for pwrite.
10522
10523 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10524
10525 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10526 between unsupported TYPE and unimplementable ADDR/LEN combination.
10527 (arm_insert_point): Act on new return value.
10528
10529 2012-07-31 Pedro Alves <palves@redhat.com>
10530
10531 * server.c (process_point_options): Only skip tokens if we find
10532 one that is unrecognized. Don't treat 'X' specially while
10533 skipping unrecognized tokens.
10534
10535 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10536
10537 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10538 to 4-byte-align HW breakpoint addresses for Thumb.
10539
10540 2012-07-27 Yao Qi <yao@codesourcery.com>
10541
10542 PR remote/14161.
10543
10544 * server.h: Declare gdb_agent_about_to_close.
10545 * target.c (kill_inferior): Include "agent.h".
10546 New. Send command 'kill'.
10547 * target.h (kill_inferior): Removed macro.
10548 * tracepoint.c (gdb_agent_about_to_close): New.
10549 (gdb_agent_helper_thread): Handle command 'close'.
10550 Wait endlessly until the inferior stops.
10551 Install gdb_agent_remove_socket to atexit hook.
10552 (agent_socket_name): New static variable.
10553 (gdb_agent_socket_init): Replace local variable 'name' with
10554 'agent_socket_name'.
10555 (gdb_agent_remove_socket): New.
10556
10557 2012-07-27 Yao Qi <yao@codesourcery.com>
10558
10559 * server.c (process_point_options): Stop at 'X' when parsing.
10560
10561 2012-07-19 Michael Eager <eager@eagercon.com>
10562
10563 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10564 to hw_execute.
10565 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10566 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10567 hardware breakpoint.
10568
10569 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10570
10571 * gdbserver/linux-low.c (initialize_low): Call
10572 linux_ptrace_init_warnings.
10573
10574 2012-07-02 Doug Evans <dje@google.com>
10575
10576 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10577 pointer to int.
10578
10579 2012-07-02 Stan Shebs <stan@codesourcery.com>
10580
10581 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10582 (ax.o): Add it to build rule.
10583 (ax-ipa.o): Ditto.
10584 (OBS): Add format.o.
10585 (IPA_OBS): Add format.o.
10586 * server.c (handle_query): Claim support for breakpoint commands.
10587 (process_point_options): Add command case.
10588 (process_serial_event): Leave running if there are printfs in
10589 effect.
10590 * mem-break.h (any_persistent_commands): Declare.
10591 (add_breakpoint_commands): Declare.
10592 (gdb_no_commands_at_breakpoint): Declare.
10593 (run_breakpoint_commands): Declare.
10594 * mem-break.c (struct point_command_list): New struct.
10595 (struct breakpoint): New field command_list.
10596 (any_persistent_commands): New function.
10597 (add_commands_to_breakpoint): New function.
10598 (add_breakpoint_commands): New function.
10599 (gdb_no_commands_at_breakpoint): New function.
10600 (run_breakpoint_commands): New function.
10601 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10602 locally.
10603 * ax.c: Include format.h.
10604 (ax_printf): New function.
10605 (gdb_eval_agent_expr): Add printf opcode.
10606
10607 2012-06-13 Yao Qi <yao@codesourcery.com>
10608
10609 * server.c (start_inferior): Remove duplicated writes to fields
10610 'last_resume_kind' and 'last_status' of 'current_inferior'.
10611
10612 2012-06-12 Yao Qi <yao@codesourcery.com>
10613 Pedro Alves <palves@redhat.com>
10614
10615 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10616 comment.
10617 * server.c (handle_v_cont): Extend comment.
10618
10619 2012-06-11 Yao Qi <yao@codesourcery.com>
10620
10621 * linux-low.c (linux_attach): Add 'static'.
10622
10623 2012-06-06 Yao Qi <yao@codesourcery.com>
10624
10625 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10626
10627 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10628
10629 Fix gcc -flto compilation warning.
10630 * server.c (main): Make variable multi_mode and attach volatile.
10631
10632 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10633
10634 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10635 if the platform doesn't know about it.
10636
10637 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10638
10639 * Makefile.in (SFILES): Add linux-tile-low.c.
10640 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10641 * configure.srv: Handle tilegx-*-linux*.
10642 * linux-tile-low.c: New file.
10643
10644 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10645
10646 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10647
10648 2012-05-24 Pedro Alves <palves@redhat.com>
10649
10650 PR gdb/7205
10651
10652 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10653
10654 2012-05-24 Pedro Alves <palves@redhat.com>
10655
10656 PR gdb/7205
10657
10658 Replace target_signal with gdb_signal throughout.
10659
10660 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10661
10662 * linux-low.c (linux_store_registers): Avoid the copying sequence
10663 when no data has been retrieved by ptrace.
10664
10665 2012-05-22 Will Deacon <will.deacon@arm.com>
10666
10667 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10668 Include asm/ptrace.h.
10669 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10670 already defined.
10671
10672 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10673
10674 * linux-low.c (linux_store_registers): Don't re-retrieve data
10675 with ptrace that has already been obtained from /proc. Always
10676 copy any data retrieved with ptrace to the buffer supplied.
10677
10678 2012-05-11 Yao Qi <yao@codesourcery.com>
10679 Pedro Alves <palves@redhat.com>
10680
10681 * linux-low.c (enum stopping_threads_kind): New.
10682 (stopping_threads): Change type to `enum stopping_threads_kind'.
10683 (handle_extended_wait): If stopping and suspending threads, leave
10684 the new_lwp suspended too.
10685 (linux_wait_for_event): Adjust.
10686 (stop_all_lwps): Set `stopping_threads' to
10687 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10688 whether we're suspending threads or just stopping them. Assert no
10689 recursion happens.
10690
10691 2012-04-29 Yao Qi <yao@codesourcery.com>
10692
10693 * server.h: Move some code to ...
10694 * gdbthread.h: ... here. New.
10695 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10696 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10697 (nto-low.o, win32-low.o): Likewise.
10698 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10699 * regcache.c, remote-utils.c, server.c: Likewise.
10700 * target.c, tracepoint.c, win32-low.c: Likewise.
10701
10702 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10703
10704 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10705 (PTRACE_ARG4_TYPE): Likewise.
10706 (PTRACE_XFER_TYPE): Likewise.
10707 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10708 ptrace to PTRACE_ARG3_TYPE.
10709 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10710 (PTRACE_ARG4_TYPE): Likewise.
10711 (PTRACE_XFER_TYPE): Likewise.
10712 (linux_detach_one_lwp): Cast fourth argument of
10713 ptrace to long then PTRACE_ARG4_TYPE.
10714 (regsets_fetch_inferior_registers): Cast third argument of
10715 ptrace to long then PTRACE_ARG3_TYPE.
10716 (regsets_store_inferior_registers): Likewise.
10717
10718 2012-04-20 Pedro Alves <palves@redhat.com>
10719
10720 * configure: Regenerate.
10721
10722 2012-04-19 Pedro Alves <palves@redhat.com>
10723
10724 * Makefile.in (GNULIB_BUILDDIR): New.
10725 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10726 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10727 (all, install-only, uninstall, clean-info, all-lib, clean): No
10728 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10729 (maintainer-clean realclean distclean): Use subdir_do.
10730 (subdir_do): New.
10731 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10732 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10733 * acinclude.m4: Include acx_configure_dir.m4.
10734 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10735 calls. Call AC_PROG_RANLIB. Configure gnulib using
10736 ACX_CONFIGURE_DIR.
10737 (GNULIB): New.
10738 (GNULIB_STDINT_H): Adjust.
10739 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10740 * gdbreplay.c: Include build-gnulib/config.h.
10741 * server.h: Likewise.
10742 * aclocal.m4: Regenerate.
10743 * config.in: Regenerate.
10744 * configure: Regenerate.
10745
10746 2012-04-19 Pedro Alves <palves@redhat.com>
10747
10748 * Makefile.in (LIBGNU, INCGNU): Adjust.
10749 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10750 (all, install-only, uninstall, clean-info, all-lib, clean)
10751 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10752 * configure.ac: Adjust AC_OUTPUT output.
10753 * aclocal.m4: Regenerate.
10754 * configure: Regenerate.
10755
10756 2012-04-19 Pedro Alves <palves@redhat.com>
10757
10758 * Makefile.in (generated_files): New.
10759 (server_h): Remove the explicit dependency on config.h, and depend
10760 on $generated_files.
10761
10762 2012-04-19 Pedro Alves <palves@redhat.com>
10763
10764 * Makefile.in (INCGNU): Add -Ignulib.
10765
10766 2012-04-19 Pedro Alves <palves@redhat.com>
10767
10768 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10769 (INCGNU): ... this, and spell out -I here.
10770 (GNULIB_LIB): Rename to ...
10771 (LIBGNU): ... this.
10772 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10773
10774 2012-04-19 Pedro Alves <palves@redhat.com>
10775
10776 * config.in: Regenerate.
10777
10778 2012-04-19 Pedro Alves <palves@redhat.com>
10779
10780 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10781 * server.h (memmem): Remove declaration.
10782 * config.in: Regenerate.
10783 * configure: Regenerate.
10784
10785 2012-04-19 Yao Qi <yao@codesourcery.com>
10786
10787 * Makefile.in (SFILES): Add common/vec.c.
10788 (OBS): Add vec.o.
10789 (vec.o): New rule.
10790
10791 2012-04-19 Yao Qi <yao@codesourcery.com>
10792
10793 * remote-utils.c (prepare_resume_reply): Replace with macro
10794 target_core_of_thread.
10795 * server.c (handle_qxfer_threads_proper): Likewise.
10796 * target.h (traget_core_of_thread): New macro.
10797
10798 2012-04-18 Pedro Alves <palves@redhat.com>
10799
10800 * aclocal.m4: Regenerate.
10801 * configure: Regenerate.
10802
10803 2012-04-16 Yao Qi <yao@codesourcery.com>
10804
10805 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10806 duplicated on address.
10807
10808 2012-04-16 Yao Qi <yao@codesourcery.com>
10809
10810 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10811 (struct tracepoint_action_ops) <send>: New field.
10812 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10813 (agent_expr_send, x_tracepoint_action_send): New.
10814 (l_tracepoint_action_send): New.
10815 (cmd_qtdp): Download and install tracepoint
10816 according to `use_agent'.
10817 (run_inferior_command): Add one more parameter `len'.
10818 Update callers.
10819 (tracepoint_send_agent): New.
10820 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10821
10822 2012-04-16 Yao Qi <yao@codesourcery.com>
10823
10824 * tracepoint.c (download_tracepoints): Moved to ...
10825 (cmd_qtstart): ... here.
10826
10827 2012-04-14 Yao Qi <yao@codesourcery.com>
10828
10829 * tracepoint.c: Include inttypes.h.
10830 (struct collect_memory_action): Use sized types.
10831 (struct tracepoint): Likewise.
10832 (cmd_qtdp, stop_tracing): Update print specifiers.
10833 (cmd_qtp, response_tracepoint): Likewise.
10834 (collect_data_at_tracepoint): Likewise.
10835 (collect_data_at_step): Likewise.
10836
10837 2012-04-14 Yao Qi <yao@codesourcery.com>
10838
10839 Import gnulib module inttypes.
10840 * aclocal.m4, config.in, configure: Regenerated.
10841
10842 2012-04-14 Yao Qi <yao@codesourcery.com>
10843
10844 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10845 Makefile and config.status at last.
10846
10847 2012-04-13 Yao Qi <yao@codesourcery.com>
10848
10849 * tracepoint.c: Include stdint.h unconditionally.
10850
10851 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10852
10853 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10854 on BFD_HAVE_SYS_PROCFS_TYPE.
10855 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10856 * configure: Regenerate.
10857 * config.in: Likewise.
10858
10859 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10860
10861 * Makefile.in (clean): Also remove x32.c x32-linux.c
10862 x32-avx.c x32-avx-linux.c.
10863 (x32.o): New target.
10864 (x32.c): Likewise.
10865 (x32-linux.o): Likewise.
10866 (x32-linux.c): Likewise.
10867 (x32-avx.o): Likewise.
10868 (x32-avx.c): Likewise.
10869 (x32-avx-linux.o): Likewise.
10870 (x32-avx-linux.c): Likewise.
10871
10872 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10873 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10874 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10875 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10876 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10877 i386/x32-avx-linux.xml.
10878
10879 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10880 (init_registers_x32_avx_linux): Likwise.
10881 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10882 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10883
10884 2012-04-13 Pedro Alves <palves@redhat.com>
10885
10886 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10887 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10888 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10889 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10890 the sub-make.
10891
10892 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10893
10894 * linux-x86-low.c (compat_x32_clock_t): New.
10895 (compat_x32_siginfo_t): Likewise.
10896 (compat_x32_siginfo_from_siginfo): Likewise.
10897 (siginfo_from_compat_x32_siginfo): Likewise.
10898 (linux_is_elf64): Likewise.
10899 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10900 and siginfo_from_compat_x32_siginfo for x32.
10901 (x86_arch_setup): Set linux_is_elf64.
10902
10903 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10904
10905 PR gdb/13969
10906 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10907 e_machine field.
10908 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10909 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10910 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10911 compatible with process.
10912
10913 2012-04-12 Yao Qi <yao@codesourcery.com>
10914
10915 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10916 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10917 (install-only, install-info, clean): Handle sub dir gnulib.
10918 (all-lib, am--refresh): New targets.
10919 (memmem.o): Remove target.
10920 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10921 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10922 (AC_REPLACE_FUNCS): Remove memmem.
10923 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10924 (AC_OUTPUT): Generate Makefile in gnulib/.
10925 * aclocal.m4, config.in, configure: Regenerated.
10926
10927 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10928
10929 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10930
10931 2012-04-05 Pedro Alves <palves@redhat.com>
10932
10933 -Werror=strict-aliasing
10934
10935 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10936 pointer.
10937
10938 2012-04-04 Pedro Alves <palves@redhat.com>
10939
10940 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10941 (sparc_store_gregset_from_stack, sparc_store_gregset)
10942 (sparc_breakpoint_at): Fix formatting.
10943
10944 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10945
10946 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10947 are available.
10948 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10949 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10950 * config.in: Regenerate.
10951 * configure: Likewise.
10952
10953 2012-03-29 Pedro Alves <palves@redhat.com>
10954
10955 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10956 Correct ptrace arguments.
10957
10958 2012-03-28 Pedro Alves <palves@redhat.com>
10959
10960 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10961 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10962 (IA64_FR1_REGNUM): New defines.
10963 (ia64_fetch_register): New.
10964 (the_low_target): Install it.
10965 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10966 field.
10967 * linux-low.c (linux_fetch_registers): Try the
10968 the_low_target.fetch_register hook first.
10969
10970 * linux-arm-low.c (the_low_target): Adjust.
10971 * linux-bfin-low.c (the_low_target): Adjust.
10972 * linux-cris-low.c (the_low_target): Adjust.
10973 * linux-crisv32-low.c (the_low_target): Adjust.
10974 * linux-m32r-low.c (the_low_target): Adjust.
10975 * linux-m68k-low.c (the_low_target): Adjust.
10976 * linux-mips-low.c (the_low_target): Adjust.
10977 * linux-ppc-low.c (the_low_target): Adjust.
10978 * linux-s390-low.c (the_low_target): Adjust.
10979 * linux-sh-low.c (the_low_target): Adjust.
10980 * linux-sparc-low.c (the_low_target): Adjust.
10981 * linux-tic6x-low.c (the_low_target): Adjust.
10982 * linux-x86-low.c (the_low_target): Adjust.
10983 * linux-xtensa-low.c (the_low_target): Adjust.
10984
10985 2012-03-26 Pedro Alves <palves@redhat.com>
10986
10987 * server.c (handle_qxfer_libraries): Don't bail early if
10988 the_target->qxfer_libraries_svr4 is not NULL.
10989
10990 2012-03-26 Pedro Alves <palves@redhat.com>
10991
10992 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10993
10994 2012-03-23 Pedro Alves <palves@redhat.com>
10995
10996 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10997 "library-list-svr4" element's start tag when the the DSO list is
10998 empty.
10999
11000 2012-03-23 Pedro Alves <palves@redhat.com>
11001
11002 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11003 a variable whose type size is the same as the inferior's pointer
11004 size.
11005
11006 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11007
11008 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11009 struct siginfo.
11010 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11011 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11012 * linux-low.h: Include <signal.h>.
11013 (struct siginfo): Remove forward declaration.
11014 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11015 struct siginfo.
11016
11017 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11018
11019 * .gitignore: Ignore more files.
11020
11021 2012-03-19 Pedro Alves <palves@redhat.com>
11022 Jan Kratochvil <jan.kratochvil@redhat.com>
11023
11024 * server.c (cont_thread, general_thread): Add describing comments.
11025 (start_inferior): Clear `cont_thread'.
11026 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11027 of a process.
11028
11029 2012-03-15 Yao Qi <yao@codesourcery.com>
11030
11031 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11032 handling to ...
11033 (cmd_qtdp): ... here.
11034
11035 2012-03-15 Yao Qi <yao@codesourcery.com>
11036
11037 * tracepoint.c (struct tracepoint_action_ops): New.
11038 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11039 (m_tracepoint_action_download): New.
11040 (r_tracepoint_action_download): New.
11041 (x_tracepoint_action_download): New.
11042 (l_tracepoint_action_download): New.
11043 (add_tracepoint_action): Install `action->ops' according type.
11044 (download_tracepoint_1): Move code `download' function pointer
11045 of various tracepoint_action_ops.
11046
11047 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11048
11049 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11050 linux_ptrace_attach_warnings.
11051
11052 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11053
11054 * Makefile.in (linux-ptrace.o): New.
11055 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11056 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11057 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11058 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11059 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11060 of these targets.
11061 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11062
11063 2012-03-08 Yao Qi <yao@codesourcery.com>
11064 Pedro Alves <palves@redhat.com>
11065
11066 Fix PR server/13392.
11067 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11068 offset of JMP insn.
11069 * tracepoint.c (remove_tracepoint): New.
11070 (cmd_qtdp): Call remove_tracepoint when failed to install.
11071
11072 2012-03-07 Pedro Alves <palves@redhat.com>
11073
11074 * linux-low.c (get_detach_signal): New.
11075 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11076 Pass on pending signals to PTRACE_DETACH. Check the result of the
11077 ptrace call.
11078 * server.c (program_signals, program_signals_p): New.
11079 (handle_general_set): Handle QProgramSignals.
11080 * server.h (program_signals, program_signals_p): Declare.
11081
11082 2012-03-05 Pedro Alves <palves@redhat.com>
11083 Jan Kratochvil <jan.kratochvil@redhat.com>
11084
11085 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11086 New comment why.
11087
11088 2012-03-03 Yao Qi <yao@codesourcery.com>
11089
11090 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11091 agent_look_up_symbols.
11092
11093 2012-03-03 Yao Qi <yao@codesourcery.com>
11094
11095 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11096 (linux-x86-low.o): Likewise.
11097 * server.h: Remove in_process_agent_loaded.
11098 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11099 common/agent.c.
11100 Update callers.
11101
11102 2012-03-03 Yao Qi <yao@codesourcery.com>
11103
11104 * tracepoint.c (gdb_agent_capability): New global.
11105 (in_process_agent_loaded_ust): Renamed to
11106 `in_process_agent_supports_ust'.
11107 Update callers.
11108 (in_process_agent_supports_ust): Call agent_capability_check.
11109 (clear_installed_tracepoints): Assert that agent supports
11110 agent.
11111
11112 2012-03-03 Yao Qi <yao@codesourcery.com>
11113
11114 * linux-low.c (linux_supports_agent): New.
11115 (linux_target_ops): Initialize field `supports_agent' with
11116 linux_supports_agent.
11117 * target.h (struct target_ops) <supports_agent>: New.
11118 (target_supports_agent): New macro.
11119 * server.c (handle_general_set): Handle packet 'QAgent'.
11120 (handle_query): Send `QAgent+'.
11121 * Makefile.in (server.o): Depends on agent.h.
11122
11123 2012-03-03 Yao Qi <yao@codesourcery.com>
11124
11125 * Makefile.in (OBS): Add agent.o.
11126 Add new rule for agent.o.
11127 Track dependence of tracepoint.c on agent.h.
11128 * tracepoint.c (run_inferior_command_1):
11129 (run_inferior_command): Call agent_run_command.
11130 (gdb_ust_connect_sync_socket): Deleted. Move it to
11131 common/agent.c.
11132 (resume_thread, stop_thread): Likewise.
11133 (gdb_ust_socket_init): Renamed to ...
11134 (gdb_agent_socket_init): ... New.
11135 (gdb_ust_thread): Renamed to ...
11136 (gdb_agent_helper_thread): ... New.
11137 (gdb_ust_init): Move some code to ...
11138 (gdb_agent_init): ... here. New.
11139 [HAVE_UST]: Call gdb_ust_init.
11140 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11141 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11142 * config.in, configure: Regenerated.
11143
11144 2012-03-02 Pedro Alves <palves@redhat.com>
11145
11146 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11147 * linux-low.c (struct simple_pid_list): New.
11148 (stopped_pids): New a struct simple_pid_list pointer.
11149 (add_to_pid_list, pull_pid_from_list): New.
11150 (handle_extended_wait): Don't assume the first signal new children
11151 report is SIGSTOP. Adjust call to pull_pid_from_list.
11152 (linux_wait_for_lwp): Adjust.
11153
11154 2012-03-02 Yao Qi <yao@codesourcery.com>
11155
11156 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11157 debug log.
11158
11159 2012-03-02 Yao Qi <yao@codesourcery.com>
11160
11161 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11162 `stop_pc' and `tpoint'. Update caller.
11163
11164 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11165
11166 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11167 * linux-low.c (use_linux_regsets): New macro.
11168 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11169 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11170 (linux_register_in_regsets): New function.
11171 (usr_fetch_inferior_registers): Skip registers covered by
11172 regsets.
11173 (usr_store_inferior_registers): Likewise.
11174 (usr_fetch_inferior_registers): New macro.
11175 (usr_store_inferior_registers): Likewise.
11176 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11177 (linux_store_registers): Likewise.
11178 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11179 prototype.
11180 (init_registers_mips64_dsp_linux): Likewise.
11181 (init_registers_mips_linux): New macro.
11182 (init_registers_mips_dsp_linux): Likewise.
11183 (mips_dsp_num_regs): Likewise.
11184 (DSP_BASE, DSP_CONTROL): New fallback macros.
11185 (mips_base_regs): New macro.
11186 (mips_regmap): Use it. Fix the size.
11187 (mips_dsp_regmap): New variable.
11188 (mips_dsp_regset_bitmap): Likewise.
11189 (mips_arch_setup): New function.
11190 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11191 than mips_regmap.
11192 (mips_cannot_store_register): Likewise.
11193 (the_low_target): Update .arch_setup, .num_regs and .regmap
11194 initializers. Add .regset_bitmap initializer.
11195 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11196 initializer.
11197 * linux-bfin-low.c (the_low_target): Likewise.
11198 * linux-cris-low.c (the_low_target): Likewise.
11199 * linux-crisv32-low.c (the_low_target): Likewise.
11200 * linux-ia64-low.c (the_low_target): Likewise.
11201 * linux-m32r-low.c (the_low_target): Likewise.
11202 * linux-m68k-low.c (the_low_target): Likewise.
11203 * linux-ppc-low.c (the_low_target): Likewise.
11204 * linux-s390-low.c (the_low_target): Likewise.
11205 * linux-sh-low.c (the_low_target): Likewise.
11206 * linux-sparc-low.c (the_low_target): Likewise.
11207 * linux-tic6x-low.c (the_low_target): Likewise.
11208 * linux-x86-low.c (the_low_target): Likewise.
11209 * linux-xtensa-low.c (the_low_target): Likewise.
11210 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11211 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11212 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11213 srv_xmlfiles.
11214 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11215 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11216
11217 2012-02-29 Yao Qi <yao@codesourcery.com>
11218 Pedro Alves <palves@redhat.com>
11219
11220 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11221 `step_over_finished' is true.
11222
11223 2012-02-27 Pedro Alves <palves@redhat.com>
11224
11225 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11226 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11227
11228 2012-02-27 Pedro Alves <palves@redhat.com>
11229
11230 PR server/9684
11231 * linux-low.c (pid_is_stopped): New.
11232 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11233
11234 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11235
11236 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11237 of conditions.
11238
11239 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11240
11241 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11242
11243 2012-02-24 Luis Machado <lgustavo@codesourcery>
11244
11245 * server.c (handle_query): Advertise support for target-side
11246 breakpoint condition evaluation.
11247 (process_point_options): New function.
11248 (process_serial_event): When inserting a breakpoint, check for
11249 a target-side condition that should be evaluated.
11250
11251 * mem-break.c: Include regcache.h and ax.h.
11252 (point_cond_list_t): New data structure.
11253 (breakpoint) <cond_list>: New field.
11254 (find_gdb_breakpoint_at): Make non-static.
11255 (delete_gdb_breakpoint_at): Clear any target-side
11256 conditions.
11257 (clear_gdb_breakpoint_conditions): New function.
11258 (add_condition_to_breakpoint): Likewise.
11259 (add_breakpoint_condition): Likewise.
11260 (gdb_condition_true_at_breakpoint): Likewise.
11261 (gdb_breakpoint_here): Return result directly instead
11262 of going through a local variable.
11263
11264 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11265 (clear_gdb_breakpoint_conditions): Likewise.
11266 (add_breakpoint_condition): Likewise.
11267 (gdb_condition_true_at_breakpoint): Likewise.
11268
11269 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11270 (need_step_over_p): Take target-side breakpoint condition into
11271 consideration.
11272
11273 2012-02-24 Luis Machado <lgustavo@codesourcery>
11274
11275 * server.h: Include tracepoint.h.
11276 (agent_mem_read, agent_get_trace_state_variable_value,
11277 agent_set_trace_state_variable_value,
11278 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11279 get_set_tsv_func_addr): New prototypes.
11280
11281 * ax.h: New include file.
11282 * ax.c: New source file.
11283
11284 * tracepoint.c: Include ax.h.
11285 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11286 agent_expr, eval_result_type): Move to ax.h.
11287 (parse_agent_expr): Rename to ...
11288 (gdb_parse_agent_expr): ... this, make it non-static and move
11289 to ax.h.
11290 (unparse_agent_expr) Rename to ...
11291 (gdb_unparse_agent_expr): ... this, make it non-static and move
11292 to ax.h.
11293 (eval_agent_expr): Rename to ...
11294 (eval_tracepoint_agent_expr): ... this.
11295 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11296 forward declarations.
11297 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11298 (agent_get_trace_state_variable_value): New function.
11299 (agent_set_trace_state_variable_value): New function.
11300 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11301 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11302 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11303 (condition_true_at_tracepoint): Likewise.
11304 (parse_agent_expr): Rename to ...
11305 (gdb_parse_agent_expr): ... this and move to ax.c.
11306 (unparse_agent_expr): Rename to ...
11307 (gdb_unparse_agent_expr): ... this and move to ax.c.
11308 (gdb_agent_op_name): Move to ax.c.
11309 (eval_agent_expr): Rename to ...
11310 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11311 and move to ax.c.
11312 (eval_tracepoint_agent_expr): New function.
11313 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11314 non-static.
11315 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11316 ax.c.
11317 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11318 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11319 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11320 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11321 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11322 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11323 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11324 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11325 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11326 (compile_bytecodes): Remove forward declaration.
11327 (is_goto_target): Move to ax.c.
11328 (compile_bytecodes): Move to ax.c and call
11329 agent_get_trace_state_variable_value (...) and
11330 agent_set_trace_state_variable_value (...).
11331
11332 * Makefile.in: Update ax.c and IPA dependencies.
11333
11334 2012-02-24 Pedro Alves <palves@redhat.com>
11335
11336 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11337 (cmd_bigqtbuffer_circular): ... this. Only handle
11338 'QTBuffer:circular:'.
11339 (handle_tracepoint_general_set): Adjust.
11340
11341 2012-02-16 Yao Qi <yao@codesourcery.com>
11342
11343 * inferiors.c: Move code to ...
11344 * dll.c: .... here. New.
11345 * server.h: Declare clear_dlls.
11346 * Makefile.in (SFILES): Add dll.c.
11347 (OBS): Add dll.o
11348 (dll.o): New rule.
11349
11350 2012-02-11 Yao Qi <yao@codesourcery.com>
11351
11352 * server.c: (handle_monitor_command): Add a new parameter
11353 `own_buf'.
11354 (handle_query): Update caller.
11355
11356 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11357
11358 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11359 * configure, config.in: Regenerate.
11360 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11361 is not defined.
11362
11363 2012-02-02 Pedro Alves <palves@redhat.com>
11364
11365 Try SIGKILL first, then PTRACE_KILL.
11366 * linux-low.c (linux_kill_one_lwp): New.
11367 (linux_kill_one_lwp): Rename to ...
11368 (kill_one_lwp_callback): ... this. Use the new
11369 linux_kill_one_lwp.
11370
11371 2012-02-02 Pedro Alves <palves@redhat.com>
11372
11373 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11374 inferior.
11375
11376 2012-01-27 Pedro Alves <palves@redhat.com>
11377
11378 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11379 (elf_64_file_p): Make static.
11380 (linux_pid_exe_is_elf_64_file): New.
11381 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11382 Delete declarations.
11383 (linux_pid_exe_is_elf_64_file): Declare.
11384 * linux-x86-low.c (x86_arch_setup): Use
11385 linux_pid_exe_is_elf_64_file.
11386
11387 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11388
11389 * linux-low.c (linux_wait_for_event_1): Rename to ...
11390 (linux_wait_for_event): ... here and merge it with former
11391 linux_wait_for_event - new variable wait_ptid, use it.
11392 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11393
11394 2012-01-23 Pedro Alves <palves@redhat.com>
11395
11396 * server.c (main): Avoid yet another case of infinite loop while
11397 detaching/killing after a longjmp.
11398
11399 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11400
11401 Code cleanup.
11402 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11403
11404 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11405
11406 * hostio.c (handle_readlink): New function.
11407 (handle_vFile): Call it to handle "vFile:readlink" packets.
11408
11409 2012-01-20 Pedro Alves <palves@redhat.com>
11410 Ulrich Weigand <ulrich.weigand@linaro.org>
11411
11412 * server.c (handle_v_requests): Only support vAttach and vRun to
11413 start multiple processes when in extended protocol mode.
11414
11415 2012-01-17 Pedro Alves <palves@redhat.com>
11416
11417 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11418 memalign plus mprotect to allocate the scratch buffer.
11419
11420 2012-01-13 Pedro Alves <palves@redhat.com>
11421
11422 * server.c (attach_inferior): Clear `cont_thread'.
11423
11424 2012-01-13 Pedro Alves <palves@redhat.com>
11425
11426 * server.c (main): Avoid infinite loop while detaching/killing
11427 after a longjmp.
11428
11429 2012-01-09 Doug Evans <dje@google.com>
11430
11431 * server.c (start_inferior): Set last_ptid in --wrapper case.
11432
11433 2012-01-06 Yao Qi <yao@codesourcery.com>
11434
11435 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11436 defined.
11437 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11438
11439 2012-01-04 Yao Qi <yao@codesourcery.com>
11440
11441 * tracepoint.c (cmd_qtdp): Print debug message
11442 for static tracepoint.
11443
11444 2012-01-04 Yao Qi <yao@codesourcery.com>
11445
11446 * tracepoint.c (trace_vdebug): Differentiate debug message
11447 between gdbserver and IPA.
11448
11449 2012-01-03 Yao Qi <yao@codesourcery.com>
11450
11451 * tracepoint.c (tracepoint_was_hit): Don't collect for
11452 static tracepoint.
11453
11454 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11455
11456 * terminal.h: Reformat copyright header.
11457
11458 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11459
11460 * server.c (gdbserver_version): Update copyright year.
11461 * gdbreplay.c (gdbreplay_version): Likewise.
11462
11463 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11464
11465 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11466
11467 Revert:
11468 2011-12-18 Hui Zhu <teawater@gmail.com>
11469 * linux-low.c (linux_create_inferior): Save return value to ret.
11470
11471 2011-12-18 Hui Zhu <teawater@gmail.com>
11472
11473 * linux-low.c (linux_create_inferior): Save return value to ret.
11474
11475 2011-12-16 Doug Evans <dje@google.com>
11476
11477 * linux-low.c (linux_create_inferior): If stdio connection,
11478 redirect stdin from /dev/null, stdout to stderr.
11479 * remote-utils.c (remote_is_stdio): New static global.
11480 (remote_connection_is_stdio): New function.
11481 (remote_prepare): Handle stdio connection.
11482 (remote_open): Ditto.
11483 (remote_close): Don't close stdin for stdio connections.
11484 (read_prim,write_prim): New functions. Replace all calls to
11485 read/write to these.
11486 * server.c (main): Watch for "-" argument. Move call to
11487 remote_prepare before start_inferior.
11488 * server.h (STDIO_CONNECTION_NAME): New macro.
11489 (remote_connection_is_stdio): Declare.
11490
11491 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11492 in debugging output.
11493
11494 2011-12-15 Yao Qi <yao@codesourcery.com>
11495
11496 * tracepoint.c: Include sys/syscall.h.
11497 (gdb_ust_thread): Remove preprocessor conditional.
11498
11499 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11500
11501 * linux-low.c (linux_detach_one_lwp): Call
11502 the_low_target.prepare_to_resume before detaching.
11503
11504 2011-12-14 Yao Qi <yao@codesourcery.com>
11505
11506 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11507 of write.
11508
11509 2011-12-14 Yao Qi <yao@codesourcery.com>
11510
11511 * i386-low.c (i386_low_stopped_data_address): Initialize local
11512 variable `control'.
11513
11514 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11515
11516 PR remote/13492
11517
11518 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11519 DR_CONTROL unless necessary. Extend comments.
11520 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11521 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11522
11523 2011-12-13 Yao Qi <yao@codesourcery.com>
11524
11525 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11526 macros.
11527 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11528
11529 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11530
11531 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11532 Print new debug message for such case.
11533
11534 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11535
11536 Fix overlapping memcpy.
11537 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11538 the read_inferior_memory transfer.
11539 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11540 write_inferior_memory transfer.
11541 (set_fast_tracepoint_jump): New variable buf. Use it for the
11542 read_inferior_memory and write_inferior_memory transfers.
11543 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11544 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11545 Use it for the write_inferior_memory transfer.
11546 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11547 buffers.
11548
11549 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11550
11551 * linux-low.c (fetch_register, store_register): Make code
11552 consistent, fix formatting.
11553
11554 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11555
11556 * linux-low.c (usr_store_inferior_registers): Factor out code
11557 to handle individual registers into...
11558 (store_register): ... this new function.
11559
11560 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11561
11562 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11563 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11564 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11565 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11566 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11567 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11568 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11569 (srv_xmlfiles): Add new XML files.
11570
11571 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11572 and <sys/uio.h>.
11573 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11574 (init_registers_s390_linux32v1): Add prototype.
11575 (init_registers_s390_linux32v2): Likewise.
11576 (init_registers_s390_linux64v1): Likewise.
11577 (init_registers_s390_linux64v2): Likewise.
11578 (init_registers_s390x_linux64v1): Likewise.
11579 (init_registers_s390x_linux64v2): Likewise.
11580 (s390_num_regs): Increment to 52.
11581 (s390_regmap): Add orig_r2 register.
11582 (s390_num_regs_3264): Increment to 68.
11583 (s390_regmap_3264): Add orig_r2 register.
11584 (s390_collect_ptrace_register): Handle orig_r2 register.
11585 (s390_supply_ptrace_register): Likewise.
11586 (s390_fill_last_break): New function.
11587 (s390_store_last_break): Likewise.
11588 (s390_fill_system_call): New function.
11589 (s390_store_system_call): Likewise.
11590 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11591 register sets.
11592 (s390_check_regset): New function.
11593 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11594 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11595 Update target_regsets for available register sets.
11596
11597 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11598 Jan Kratochvil <jan.kratochvil@redhat.com>
11599
11600 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11601 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11602 New.
11603 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11604 * linux-low.h (struct process_info_private): New member r_debug.
11605 * server.c (handle_qxfer_libraries): Call
11606 the_target->qxfer_libraries_svr4.
11607 (handle_qxfer_libraries_svr4): New function.
11608 (qxfer_packets): New entry "libraries-svr4".
11609 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11610 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11611 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11612 PACKET_qXfer_libraries_svr4.
11613
11614 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11615
11616 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11617 PSW address/mask between 8-byte and 16-byte formats.
11618 (s390_supply_ptrace_register): Likewise.
11619 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11620 basic addressing mode bit.
11621
11622 2011-11-24 Stan Shebs <stan@codesourcery.com>
11623
11624 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11625
11626 2011-11-17 Stan Shebs <stan@codesourcery.com>
11627
11628 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11629 (tracing_start_time): New global.
11630 (tracing_stop_time): New global.
11631 (tracing_user_name): New global.
11632 (tracing_notes): New global.
11633 (tracing_stop_note): New global.
11634 (cmd_qtstart): Set traceframe_usage, start_time.
11635 (stop_tracing): Set stop_time.
11636 (cmd_qtstatus): Report additional status.
11637 (cmd_qtp): New function.
11638 (handle_tracepoint_query): Call it.
11639 (cmd_qtnotes): New function.
11640 (handle_tracepoint_general_set): Call it.
11641 (get_timestamp): Rename from tsv_get_timestamp.
11642
11643 2011-11-14 Stan Shebs <stan@codesourcery.com>
11644 Kwok Cheung Yeung <kcy@codesourcery.com>
11645
11646 * linux-x86-low.c (small_jump_insn): New.
11647 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11648 trampoline and error message, build a trampoline and issue a small
11649 jump instruction to it.
11650 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11651 trampoline and error message.
11652 (x86_get_min_fast_tracepoint_insn_len): New.
11653 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11654 * linux-low.h (struct linux_target_ops): Add arguments to
11655 install_fast_tracepoint_jump_pad operation, add new operation.
11656 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11657 arguments.
11658 (linux_get_min_fast_tracepoint_insn_len): New function.
11659 (linux_target_op): Add new operation.
11660 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11661 (gdb_trampoline_buffer_end): Ditto.
11662 (gdb_trampoline_buffer_error): Ditto.
11663 (struct ipa_sym_addresses): Add fields for new IPA variables.
11664 (symbol_list): Add entries for new IPA variables.
11665 (struct tracepoint): Add fields to hold the address range of the
11666 trampoline used by the tracepoint.
11667 (trampoline_buffer_head): New static variable.
11668 (trampoline_buffer_tail): Ditto.
11669 (claim_trampoline_space): New function.
11670 (have_fast_tracepoint_trampoline_buffer): New function.
11671 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11672 structure.
11673 (install_fast_tracepoint): Ditto, also add error buffer argument.
11674 (cmd_qtminftpilen): New function.
11675 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11676 (fast_tracepoint_from_trampoline_address): New function.
11677 (fast_tracepoint_collecting): Handle trampoline as part of jump
11678 pad space.
11679 (set_trampoline_buffer_space): New function.
11680 (initialize_tracepoint): Initialize new IPA variables.
11681 * target.h (struct target_ops): Add arguments to
11682 install_fast_tracepoint_jump_pad operation, add new
11683 get_min_fast_tracepoint_insn_len operation.
11684 (target_get_min_fast_tracepoint_insn_len): New.
11685 (install_fast_tracepoint_jump_pad): Add arguments.
11686 * server.h (IPA_BUFSIZ): Define.
11687 * linux-i386-ipa.c: Include extra header files.
11688 (initialize_fast_tracepoint_trampoline_buffer): New function.
11689 (initialize_low_tracepoint): Call it.
11690 * server.h (set_trampoline_buffer_space): Declare.
11691 (claim_trampoline_space): Ditto.
11692 (have_fast_tracepoint_trampoline_buffer): Ditto.
11693
11694 2011-11-14 Yao Qi <yao@codesourcery.com>
11695
11696 * server.c (handle_query): Handle InstallInTrace for qSupported.
11697 * tracepoint.c (add_tracepoint): Sort list.
11698 (install_tracepoint, download_tracepoint): New.
11699 (cmd_qtdp): Call them to install and download tracepoints.
11700 (sort_tracepoints): Removed.
11701 (cmd_qtstart): Update.
11702
11703 2011-11-14 Yao Qi <yao@codesourcery.com>
11704
11705 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11706 * mem-break.h: Declare.
11707 * tracepoint.c (cmd_qtstart): Move some code to ...
11708 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11709 New.
11710 (download_tracepoints): Move some code to ...
11711 (download_tracepoint_1): ... here. New.
11712
11713 2011-11-08 Yao Qi <yao@codesourcery.com>
11714
11715 * remote-utils.c (relocate_instruction): A comment fix.
11716
11717 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11718
11719 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11720 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11721 dr_status_mirror and dr_control_mirror from debug_reg_state.
11722 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11723 (i386_initial_stuff): Remove use of deleted globals.
11724 (i386_get_thread_context, i386_set_thread_context,
11725 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11726 from debug_reg_state.
11727
11728 2011-11-05 Yao Qi <yao@codesourcery.com>
11729
11730 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11731 address as TPOINT's.
11732
11733 2011-11-02 Stan Shebs <stan@codesourcery.com>
11734
11735 * tracepoint.c (agent_mem_read_string): New function.
11736 (eval_agent_expr): Call it for tracenz.
11737 * server.c (handle_query): Report support for tracenz.
11738
11739 2011-11-02 Yao Qi <yao@codesourcery.com>
11740
11741 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11742
11743 2011-11-02 Yao Qi <yao@codesourcery.com>
11744
11745 * target.h: Fix a typo in comment.
11746
11747 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11748
11749 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11750 clobber the breakpoints' shadows with fast tracepoint jumps.
11751 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11752 * target.c (write_inferior_memory): Also pass MYADDR down to
11753 check_mem_write.
11754
11755 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11756
11757 * configure.ac: Check support for personality routine.
11758 * configure: Regenerate.
11759 * config.in: Likewise.
11760 * linux-low.c: Include <sys/personality.h>.
11761 Define ADDR_NO_RANDOMIZE if necessary.
11762 (linux_create_inferior): Disable address space randomization when
11763 forking inferior, if requested.
11764 (linux_supports_disable_randomization): New function.
11765 (linux_target_ops): Install it.
11766 * server.h (disable_randomization): Declare.
11767 * server.c (disable_randomization): New global variable.
11768 (handle_general_set): Handle QDisableRandomization.
11769 (handle_query): Likewise for qSupported.
11770 (main): Support --disable-randomization and --no-disable-randomization
11771 command line arguments.
11772 * target.h (struct target_ops): Add supports_disable_randomization.
11773 (target_supports_disable_randomization): New macro.
11774
11775 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11776
11777 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11778 ifdef check.
11779 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11780 [!PT_GETDSBT] (target_loadmap): New definition.
11781 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11782 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11783 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11784 and PT_GETDSBT to LINUX_LOADMAP.
11785 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11786 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11787
11788 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11789
11790 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11791 (arm_linux_hwbp_cap): New static variable.
11792 (arm_linux_get_hwbp_cap): Replace by ...
11793 (arm_linux_init_hwbp_cap): ... this new function.
11794 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11795 (arm_linux_get_hw_watchpoint_count): Likewise.
11796 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11797 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11798 (arm_prepare_to_resume): Use perror_with_name instead of error.
11799
11800 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11801
11802 * linux-arm-low.c: Include <signal.h>.
11803 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11804 (struct arm_linux_hwbp_cap): New data type.
11805 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11806 (struct arm_linux_hw_breakpoint): New data type.
11807 (MAX_BPTS, MAX_WPTS): Define.
11808 (struct arch_process_info, struct arch_lwp_info): New data types.
11809 (arm_linux_get_hwbp_cap): New function.
11810 (arm_linux_get_hw_breakpoint_count): Likewise.
11811 (arm_linux_get_hw_watchpoint_count): Likewise.
11812 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11813 (arm_hwbp_control_initialize): Likewise.
11814 (arm_hwbp_control_is_enabled): Likewise.
11815 (arm_hwbp_control_is_initialized): Likewise.
11816 (arm_hwbp_control_disable): Likewise.
11817 (arm_linux_hw_breakpoint_equal): Likewise.
11818 (arm_linux_hw_point_initialize): Likewise.
11819 (struct update_registers_data): New data structure.
11820 (update_registers_callback: New function.
11821 (arm_insert_point): Likewise.
11822 (arm_remove_point): Likewise.
11823 (arm_stopped_by_watchpoint): Likewise.
11824 (arm_stopped_data_address): Likewise.
11825 (arm_new_process): Likewise.
11826 (arm_new_thread): Likewise.
11827 (arm_prepare_to_resume): Likewise.
11828 (the_low_target): Register arm_insert_point, arm_remove_point,
11829 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11830 arm_new_thread, and arm_prepare_to_resume.
11831
11832 2011-09-15 Stan Shebs <stan@codesourcery.com>
11833
11834 * server.h (struct emit_ops): Add compare-goto fields.
11835 * tracepoint.c (gdb_agent_op_sizes): New table.
11836 (emit_eq_goto): New function.
11837 (emit_ne_goto): New function.
11838 (emit_lt_goto): New function.
11839 (emit_le_goto): New function.
11840 (emit_gt_goto): New function.
11841 (emit_ge_goto): New function.
11842 (is_goto_target): New function.
11843 (compile_bytecodes): Recognize special cases of compare-goto
11844 combinations and call specialized emitters for them.
11845 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11846 (amd64_emit_ne_goto): New function.
11847 (amd64_emit_lt_goto): New function.
11848 (amd64_emit_le_goto): New function.
11849 (amd64_emit_gt_goto): New function.
11850 (amd64_emit_ge_goto): New function.
11851 (amd64_emit_ops): Add the new functions.
11852 (i386_emit_eq_goto): New function.
11853 (i386_emit_ne_goto): New function.
11854 (i386_emit_lt_goto): New function.
11855 (i386_emit_le_goto): New function.
11856 (i386_emit_gt_goto): New function.
11857 (i386_emit_ge_goto): New function.
11858 (i386_emit_ops): Add the new functions.
11859
11860 2011-09-08 Stan Shebs <stan@codesourcery.com>
11861
11862 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11863 (i386_emit_epilogue): Restore %ebx.
11864
11865 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11866
11867 * server.c (step_thread): Remove definition.
11868 (process_serial_event): Don't handle Hs.
11869 * server.h (step_thread): Remove declaration.
11870 * target.c (set_desired_inferior): Remove use of step_thread.
11871
11872 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11873
11874 * linux-low.c: Include linux-procfs.h.
11875 (linux_attach_lwp_1): Update comments.
11876 (linux_attach): Scan for existing threads when attaching to a
11877 process that is the tgid.
11878 * Makefile.in: Update dependencies.
11879
11880 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11881
11882 * configure.srv: Add linux-procfs.o dependencies.
11883
11884 2011-08-14 Yao Qi <yao@codesourcery.com>
11885
11886 * target.h (struct target_ops): Fix indent.
11887 * win32-low.c (win32_target_ops): Fix comment.
11888
11889 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11890 Yao Qi <yao@codesourcery.com>
11891
11892 * Makefile.in (clean): Remove tic6x-*.c files.
11893 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11894 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11895 (tic6x-c64xp-linux.c): Likewise.
11896 * configure.srv: Add support for tic6x-*-uclinux.
11897 * linux-tic6x-low.c: New.
11898 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11899
11900 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11901 Yao Qi <yao@codesourcery.com>
11902
11903 * target.h (struct target_ops): Add read_loadmap.
11904 * linux-low.c (struct target_loadseg): New type.
11905 (struct target_loadmap): New type.
11906 (linux_read_loadmap): New function.
11907 (linux_target_ops): Add linux_read_loadmap.
11908 * server.c (handle_query): Support qXfer:fdpic:read packet.
11909 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11910 to NULL.
11911
11912 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11913
11914 * win32-low.c: Include <stdint.h>.
11915
11916 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11917
11918 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11919 to the inferior here.
11920 (i386_remove_aligned_watchpoint): Ditto.
11921 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11922 fit part of the watchpoint in the debug registers.
11923 (i386_update_inferior_debug_regs): New.
11924 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11925 registers, and only update the inferior on success.
11926 (i386_low_remove_watchpoint): Ditto.
11927
11928 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11929
11930 * linux-low.c (compare_ints, unique, list_threads, show_process,
11931 linux_core_of_thread): Delete.
11932 (linux_target_ops): Change linux_core_of_thread to
11933 linux_common_core_of_thread.
11934 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11935 * utils.c (malloc_failure): Change type of argument.
11936 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11937 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11938 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11939 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11940 (IPA_OBJS): Add common-utils-ipa.o.
11941 (ptid_h, linux_osdata_h): New macros.
11942 (server_h): Add common/common-utils.h, common/xml-utils.h,
11943 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11944 common/ptid.h.
11945 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11946 ptid.o, buffer.o): New rules.
11947 (linux-low.o): Add common/linux-osdata.h as a dependency.
11948 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11949 * configure.ac: Add AC_HEADER_DIRENT check.
11950 * config.in: Regenerate.
11951 * configure: Regenerate.
11952 * remote-utils.c (xml_escape_text): Delete.
11953 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11954 buffer_xml_printf): Move to common/buffer.c.
11955 * server.c (main): Remove call to initialize_inferiors.
11956 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11957 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11958 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11959 internal_error, gdb_assert, gdb_assert_fail): Delete.
11960 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11961 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11962 common/buffer.h.
11963 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11964 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11965 initialize_inferiors): Delete.
11966
11967 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11968
11969 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11970 symbol error.
11971
11972 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11973
11974 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11975 assertion.
11976 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11977
11978 2011-05-26 Yao Qi <yao@codesourcery.com>
11979
11980 * Makefile.in (thread-db.o): Track dependence to
11981 common/gdb_thread_db.h.
11982 * thread-db.c: include gdb_thread_db.h from right place.
11983
11984 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11985
11986 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11987 __FILE__ and __LINE__ to internal_error.
11988
11989 2011-05-13 Doug Evans <dje@google.com>
11990
11991 * thread-db.c (try_thread_db_load_from_sdir): New function.
11992 (try_thread_db_load_from_dir): New function.
11993 (thread_db_load_search): Handle $sdir, ignore $pdir.
11994 Remove trying of system directories if search of
11995 libthread-db-search-path fails, that is now done via $sdir.
11996
11997 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11998
11999 * server.c (handle_query): Add EnableDisableTracepoints to the list
12000 of supported features.
12001 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12002 tracepoints.
12003 (cmd_qtenable_disable): New.
12004 (cmd_qtstart): Install tracepoints even if disabled.
12005 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12006 receiving a QTEnable or QTDisable packet.
12007 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12008 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12009 tracepoints.
12010 (gdb_probe): Skip data collection if static tracepoint is disabled.
12011
12012 2011-05-10 Doug Evans <dje@google.com>
12013
12014 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12015
12016 2011-05-04 Doug Evans <dje@google.com>
12017
12018 * linux-low.c (linux_join): Skip process lookup.
12019 * spu-low.c (spu_join): Ditto.
12020 * server.c (join_inferiors_callback): Delete.
12021 (process_serial_event): For 'D' packet (detach) call join_inferior
12022 directly.
12023
12024 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12025
12026 * README: Don't mention xscale*-*-linux*.
12027 * configure.srv (xscale*-*-linux*): Don't handle target.
12028
12029 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12030
12031 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12032 casting pointers.
12033 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12034 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12035 (i386_emit_void_call_2): Likewise.
12036
12037 2011-04-26 Yao Qi <yao@codesourcery.com>
12038
12039 * linux-low.c: Move common macros to linux-ptrace.h.
12040 Include linux-ptrace.h.
12041 * Makefile.in (linux_ptrace_h): New.
12042 (linux-low.o): Depends on linux-ptrace.h.
12043
12044 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12045
12046 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12047 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12048 (remote_prepare): New function with most of the TCP code from ...
12049 (remote_open): ... here. Detect PORT here unconditionally. Move also
12050 setting transport_is_reliable.
12051 * server.c (run_once): New variable.
12052 (gdbserver_usage): Document it.
12053 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12054 the first run if RUN_ONCE.
12055 * server.h (run_once, remote_prepare): New declarations.
12056
12057 2011-04-19 Tom Tromey <tromey@redhat.com>
12058
12059 * win32-low.c (handle_load_dll): Remove duplicate "the".
12060
12061 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12062
12063 Remove support for old Cygwin 1.5 versions.
12064 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12065 function to avoid warning.
12066 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12067 warning.
12068
12069 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12070
12071 * gdbserver/server.h (Macro _): Define it if not available.
12072
12073 2011-03-14 Michael Snyder <msnyder@vmware.com>
12074
12075 * hostio.c (handle_close): Remove unnecessary null test.
12076
12077 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12078
12079 * Makefile.in (maintainer-clean realclean distclean): Remove
12080 "make ... subdir_do" command.
12081
12082 2011-03-10 Michael Snyder <msnyder@vmware.com>
12083
12084 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12085
12086 * server.c (handle_v_run): Free alloced buffer on early return.
12087
12088 2011-03-09 Yao Qi <yao@codesourcery.com>
12089
12090 Revert:
12091 2011-03-04 Yao Qi <yao@codesourcery.com>
12092
12093 * Makefile.in: Remove GNU make feature --directory.
12094
12095 2011-03-05 Yao Qi <yao@codesourcery.com>
12096
12097 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12098 (subdir_do): New make target. Copied from gdb/Makefile.
12099 (maintainer-clean, realclean, distclean, clean): Call corresponding
12100 make targets in common/Makefile.
12101
12102 2011-02-11 Yao Qi <yao@codesourcery.com>
12103
12104 * configure.ac: Call AC_PROG_RANLIB.
12105 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12106 * configure: Regenerate.
12107
12108 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12109
12110 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12111
12112 2011-03-06 Yao Qi <yao@codesourcery.com>
12113
12114 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12115
12116 2011-03-05 Yao Qi <yao@codesourcery.com>
12117
12118 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12119 (subdir_do): New make target. Copied from gdb/Makefile.
12120 (maintainer-clean, realclean, distclean, clean): Call corresponding
12121 make targets in common/Makefile.
12122
12123 2011-03-04 Yao Qi <yao@codesourcery.com>
12124
12125 * Makefile.in: Remove GNU make feature --directory.
12126
12127 2011-03-04 Michael Snyder <msnyder@vmware.com>
12128
12129 * server.c (queue_stop_reply): Call xmalloc not malloc.
12130
12131 2011-03-02 Michael Snyder <msnyder@vmware.com>
12132
12133 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12134
12135 2011-02-28 Michael Snyder <msnyder@vmware.com>
12136
12137 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12138 (cmd_qtframe): Ditto.
12139 (cmd_qtbuffer): Ditto.
12140 (cmd_bigqtbuffer): Ditto.
12141
12142 * utils.c (decimal2str): Initialize 'width' to nine, then
12143 don't mess with it.
12144
12145 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12146
12147 * hostio.c (require_data): Free *data, not data.
12148
12149 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12150
12151 * hostio.c (require_data): Use free, not xfree.
12152
12153 2011-02-27 Michael Snyder <msnyder@vmware.com>
12154
12155 * server.c (handle_query): Discard unused value.
12156
12157 * hostio.c (require_data): Free malloc memory before returning
12158 error.
12159
12160 2011-02-26 Michael Snyder <msnyder@vmware.com>
12161
12162 * linux-low.c (list_threads): Call closedir for dirent.
12163
12164 2011-02-27 Michael Snyder <msnyder@vmware.com>
12165
12166 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12167 a case statement falls through.
12168
12169 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12170
12171 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12172 in comparison.
12173
12174 2011-02-26 Michael Snyder <msnyder@vmware.com>
12175
12176 * utils.c (decimal2str): Eliminate dead code and dead param.
12177 (pulongest): Drop dead param from call to decimal2str.
12178 (plongest): Ditto.
12179
12180 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12181
12182 Revert the following patch (not approved yet):
12183 2011-02-21 Hui Zhu <teawater@gmail.com>
12184 * tracepoint.c (tp_printf): New function.
12185 (eval_agent_expr): Handle gdb_agent_op_printf.
12186
12187 2011-02-21 Hui Zhu <teawater@gmail.com>
12188
12189 * tracepoint.c (tp_printf): New function.
12190 (eval_agent_expr): Handle gdb_agent_op_printf.
12191
12192 2011-02-18 Tom Tromey <tromey@redhat.com>
12193
12194 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12195 (tracepoint.o): Likewise.
12196 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12197 (gdb_agent_op_names): Likewise.
12198
12199 2011-02-18 Tom Tromey <tromey@redhat.com>
12200
12201 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12202 gdb_agent_op_rot>: New constants.
12203 (gdb_agent_op_names): Add pick and roll.
12204 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12205 cases.
12206
12207 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12208
12209 * aclocal.m4: Regenerated with aclocal-1.11.1.
12210
12211 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12212
12213 * server.c (handle_qxfer_traceframe_info): New.
12214 (qxfer_packets): Register "traceframe-info".
12215 (handle_query): Report support for qXfer:traceframe-info:read+.
12216 * tracepoint.c (match_blocktype): New.
12217 (traceframe_find_block_type): Rename to ...
12218 (traceframe_walk_blocks): ... this. Add callback filter argument,
12219 and use it.
12220 (traceframe_find_block_type): New, reimplemented on top of
12221 traceframe_walk_blocks.
12222 (build_traceframe_info_xml): New.
12223 (traceframe_read_info): New.
12224 * server.h (traceframe_read_info): Declare.
12225
12226 2011-02-11 Yao Qi <yao@codesourcery.com>
12227
12228 * configure.ac: Call AC_PROG_RANLIB.
12229 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12230 * configure: Regenerate.
12231
12232 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12233
12234 * server.c (gdb_read_memory): Change return semantics to allow
12235 partial transfers.
12236 (handle_search_memory_1): Adjust.
12237 (process_serial_event) <'m' packet>: Handle partial transfers.
12238 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12239
12240 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12241
12242 * regcache.c (init_register_cache): Initialize
12243 regcache->register_status.
12244 (free_register_cache): Release regcache->register_status.
12245 (regcache_cpy): Copy register_status.
12246 (registers_to_string): Print 'x's for unavailable registers.
12247 (supply_register): Mark the register's status valid or
12248 unavailable, depending on whether a buffer was passed in or not.
12249 (supply_register_zeroed): New.
12250 (supply_regblock): Mark the registers' status valid or
12251 unavailable, depending on whether a buffer was passed in or not.
12252 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12253 (struct regcache): New `register_status' field.
12254 (supply_register_zeroed): Declare.
12255 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12256 supply_register_zeroed, rather than passing a NULL buffer to
12257 supply_register.
12258 * tracepoint.c (fetch_traceframe_registers): Update comment.
12259
12260 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12261
12262 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12263 buffer explicit.
12264
12265 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12266
12267 * server.h (decode_xfer_write): Change prototype.
12268 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12269 and don't extract the annex here.
12270 * server.c (decode_xfer_read): Remove `annex' parameter,
12271 and don't extract the annex here.
12272 (decode_xfer): New.
12273 (struct qxfer): New.
12274 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12275 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12276 (handle_qxfer_statictrace): New functions, abstracted out from
12277 handle_query, and made to use the struct qxfer interface.
12278 (handle_threads_qxfer_proper): Rename to ...
12279 (handle_qxfer_threads_proper): ... this.
12280 (handle_threads_qxfer): Rename to ...
12281 (handle_qxfer_threads): ... this. Adjust.
12282 (qxfer_packets): New array.
12283 (handle_qxfer): New function.
12284 (handle_query): Use handle_qxfer.
12285
12286 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12287
12288 * gdbreplay.c: Shorten lines of >= 80 columns.
12289 * linux-low.c: Ditto.
12290 * linux-ppc-low.c: Ditto.
12291 * linux-s390-low.c: Ditto.
12292 * linux-sparc-low.c: Ditto.
12293 * linux-x86-low.c: Ditto.
12294 * linux-xtensa-low.c: Ditto.
12295 * mem-break.c: Ditto.
12296 * nto-low.c: Ditto.
12297 * regcache.h: Ditto.
12298 * remote-utils.c: Ditto.
12299 * server.c: Ditto.
12300 * server.h: Ditto.
12301 * thread-db.c: Ditto.
12302 * tracepoint.c: Ditto.
12303 * utils.c: Ditto.
12304 * win32-low.h: Ditto.
12305
12306 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12307
12308 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12309 update.
12310
12311 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12312
12313 * server.c (gdbserver_version): Update copyright year in version
12314 output.
12315 * gdbreplay.c (gdbreplay_version): Ditto.
12316
12317 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12318
12319 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12320 * linux-bfin-low.c: New file.
12321 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12322 PT_DATA_ADDR for BFIN targets.
12323 * Makefile.in (SFILES): Add linux-bfin-low.c.
12324 (clean): Remove reg-bfin.c.
12325 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12326 * README: Mention supported Blackfin targets.
12327
12328 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12329
12330 * .gitignore: New file.
12331
12332 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12333
12334 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12335
12336 2010-10-22 Jie Zhang <jie@codesourcery.com>
12337
12338 * Makefile.in: Add FLAGS_TO_PASS variable.
12339 (install): Remove dependency of install-only and recursively
12340 invoke make for install-only.
12341
12342 2010-10-04 Doug Evans <dje@google.com>
12343
12344 * Makefile.in (uninstall): Use $(DESTDIR).
12345
12346 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12347
12348 PR gdb/11842
12349
12350 * linux-x86-low.c (compat_siginfo_from_siginfo)
12351 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12352 si_code is < 0. Check for si_code == SI_TIMER before checking for
12353 si_code < 0.
12354
12355 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12356
12357 * lynx-i386-low.c: New file.
12358 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12359
12360 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12361
12362 * lynx-low.c (ptrace_request_to_str): Remove handling for
12363 request values that have been removed in LynxOS 5.x.
12364
12365 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12366
12367 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12368 <ptrace.h>
12369
12370 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12371
12372 * configure.ac: Add --enable-inprocess-agent option.
12373 * configure: Rebuilt.
12374
12375 2010-09-06 Yao Qi <yao@codesourcery.com>
12376
12377 * linux-low.c (linux_kill): Remove unused variable.
12378 (linux_stabilize_threads): Likewise.
12379 * server.c (start_inferior): Likewise.
12380 (queue_stop_reply_callback): Likewise.
12381 * tracepoint.c (do_action_at_tracepoint): Likewise.
12382
12383 2010-09-06 Yao Qi <yao@codesourcery.com>
12384
12385 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12386 on return.
12387
12388 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12389
12390 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12391
12392 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12393
12394 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12395 "$(IPA_DEPFILES)".
12396
12397 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12398
12399 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12400 gdbserver/lynx-ppc-low.c: New files.
12401 * Makefile.in (lynx_low_h): New variable.
12402 (lynx-low.o, lynx-ppc-low.o): New rules.
12403 * configure.ac: On LynxOS, link with -lnetinet.
12404 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12405 * configure: regenerate.
12406
12407 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12408
12409 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12410 * configure.ac: Add check for vasprintf and vsnprintf.
12411 * configure, config.in: Regenerate.
12412 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12413
12414 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12415
12416 * gdbreplay.c: Move include of alloca.h up, next to include of
12417 malloc.h.
12418 * server.h: Add include of malloc.h.
12419 * mem-break.c: Remove include of malloc.h.
12420 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12421
12422 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12423
12424 * Makefile.in (memmem.o): Build with -Wno-error.
12425
12426 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12427
12428 * utils.c (xsnprintf): Make non-static.
12429 * server.h: Add xsnprintf declaration.
12430 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12431 replace calls to snprintf by calls to xsnprintf throughout.
12432
12433 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12434
12435 * configure.ac: Add configure check for alloca.
12436 * configure, config.in: Regenerate.
12437 * server.h: Include alloca.h if it exists.
12438 * gdbreplay.c: Include alloca.h if it exists.
12439
12440 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12441
12442 * linux-low.c (__SIGRTMIN): Define if not already defined.
12443 (linux_create_inferior): Check for __ANDROID__ rather than
12444 __SIGRTMIN.
12445 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12446 are already deferred.
12447 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12448 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12449 stopped and already has a pending signal to report.
12450 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12451 a pending signal to report or is moving out of a jump pad.
12452 (linux_init_signals): Check for __ANDROID__ rather than
12453 __SIGRTMIN.
12454
12455 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12456
12457 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12458 debug_threads check. Avoid a linear search when not doing debug
12459 output.
12460
12461 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12462
12463 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12464 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12465 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12466 (process_event): Change local fd's type to gdb_fildes_t.
12467 (create_file_handler): Adjust prototype.
12468 (delete_file_handler): Adjust prototype.
12469 (handle_file_event): Adjust prototype. Use pfildes.
12470 (create_file_event): Adjsut prototype.
12471 * remote-utils.c (remote_desc, listen_desc): Change type to
12472 gdb_fildes_t.
12473 * server.h: New gdb_fildes_t typedef.
12474 [USE_WIN32API]: Include winsock2.h.
12475 (delete_file_handler, add_file_handler): Adjust prototypes.
12476 (pfildes): Declare.
12477 * utils.c (pfildes): New.
12478
12479 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12480
12481 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12482 * configure: Regenerate.
12483
12484 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12485
12486 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12487 (linux_done_accessing_memory): ... this.
12488 (linux_target_ops): Adjust.
12489 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12490 * nto-low.c (nto_target_ops): Adjust comment.
12491 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12492 * spu-low.c (spu_target_ops): Adjust comment.
12493 * target.h (target_ops): Rename unprepare_to_access_memory field
12494 to done_accessing_memory.
12495 (unprepare_to_access_memory): Rename to ...
12496 (done_accessing_memory): ... this.
12497
12498 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12499
12500 * linux-low.c (linux_prepare_to_access_memory): New.
12501 (linux_unprepare_to_access_memory): New.
12502 (linux_target_ops): Install them.
12503 * server.c (read_memory): Rename to ...
12504 (gdb_read_memory): ... this. Use
12505 prepare_to_access_memory/prepare_to_access_memory.
12506 (write_memory): Rename to ...
12507 (gdb_write_memory): ... this. Use
12508 prepare_to_access_memory/prepare_to_access_memory.
12509 (handle_search_memory_1): Adjust.
12510 (process_serial_event): Adjust.
12511 * target.h (struct target_ops): New fields
12512 prepare_to_access_memory and unprepare_to_access_memory.
12513 (prepare_to_access_memory, unprepare_to_access_memory): New.
12514 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12515 prepare_to_access_memory/prepare_to_access_memory.
12516 * nto-low.c (nto_target_ops): Adjust.
12517 * spu-low.c (spu_target_ops): Adjust.
12518 * win32-low.c (win32_target_ops): Adjust.
12519
12520 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12521
12522 * Makefile.in (WARN_CFLAGS): Get it from configure.
12523 (WERROR_CFLAGS): New.
12524 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12525 * configure.ac: Introduce --enable-werror, which adds -Werror to
12526 the compiler command line. Enabled by default. Disable with
12527 --disable-werror. Add -Wdeclaration-after-statement
12528 Wpointer-arith and -Wformat-nonliteral to warning flags.
12529 * configure: Regenerate.
12530
12531 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12532
12533 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12534
12535 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12536
12537 * gdbreplay.c (remote_error): New.
12538 (gdbchar): New.
12539 (expect): Use gdbchar. Check for error reading from GDB.
12540 Clarify sync error output.
12541 (play): Check for errors writing to GDB.
12542 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12543 * remote-utils.c (getpkt): Check for errors writing to the remote
12544 descriptor.
12545
12546 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12547
12548 * linux-low.c (linux_wait_1): Move non-debugging code out of
12549 `debug_threads' control.
12550
12551 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12552
12553 * linux-low.c (linux_wait_1): Don't set last_status here.
12554 * server.c (push_event, queue_stop_reply_callback): Assert we're
12555 not pushing a TARGET_WAITKIND_IGNORE event.
12556 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12557 (myresume, handle_target_event): Set the thread's last_resume_kind
12558 and last_status from the target returned status.
12559
12560 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12561
12562 PR threads/10729
12563
12564 * linux-x86-low.c (update_debug_registers_callback): New.
12565 (i386_dr_low_set_addr): Use it.
12566 (i386_dr_low_get_addr): New.
12567 (i386_dr_low_set_control): Use update_debug_registers_callback.
12568 (i386_dr_low_get_control): New.
12569 (i386_dr_low_get_status): Adjust.
12570 * linux-low.c (linux_stop_lwp): New.
12571 * linux-low.h (linux_stop_lwp): Declare.
12572
12573 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12574 argument instead of a i386_debug_reg_state.
12575 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12576 a i386_debug_reg_state.
12577 (i386_insert_aligned_watchpoint): Adjust.
12578 (i386_remove_aligned_watchpoint): Adjust.
12579 (i386_low_stopped_data_address): Read the debug registers from the
12580 inferior instead of from the mirrors.
12581 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12582 (i386_dr_low_get_addr): Declare.
12583 (i386_dr_low_get_control): Declare.
12584 (i386_dr_low_get_status): Change prototype.
12585
12586 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12587 (i386_dr_low_get_addr): New.
12588 (i386_dr_low_get_control): New.
12589 (i386_dr_low_get_status): Adjust prototype. Return
12590 dr_status_mirror.
12591 (i386_initial_stuff): Clear dr_status_mirror and
12592 dr_control_mirror.
12593 (i386_get_thread_context): Adjust.
12594 (i386_set_thread_context): Adjust.
12595 (i386_thread_added): Adjust.
12596
12597 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12598
12599 * linux-low.h (linux_thread_area): Delete declaration.
12600
12601 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12602
12603 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12604 after its termination.
12605
12606 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12607
12608 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12609 (gdb_wants_all_stopped): Delete.
12610 (linux_wait_1): Don't call them.
12611 * server.c (handle_v_cont): Tag all threads as want-stopped.
12612 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12613 stopped as "client-wants-stopped".
12614
12615 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12616
12617 * Makefile.in (signals_h): New.
12618 (server_h): Depend on it.
12619 (server.o): Don't depend on $(signals_def).
12620 (signals.o): Depend on $(signals_def).
12621
12622 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12623
12624 * Makefile.in (signals_def): New.
12625 (server_h): Append include/gdb/signals.h and signals_def.
12626 (server.o): Append signals_def.
12627
12628 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12629
12630 * server.c (handle_target_event): Use target_signal_to_host for
12631 resume_info.sig initialization.
12632 * target.h (struct thread_resume) <sig>: New comment.
12633
12634 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12635
12636 * server.c (handle_query): strcpy() the returned string from paddress()
12637 instead of sprintf().
12638 * utils.c (paddress): Return phex_nz().
12639
12640 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12641
12642 * server.c (handle_v_cont): Call mourn_inferior if process
12643 just exited.
12644 (myresume): Likewise.
12645
12646 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12647
12648 Static tracepoints, and integration with UST.
12649
12650 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12651 * mem-break.c (uninsert_all_breakpoints)
12652 (reinsert_all_breakpoints): New.
12653 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12654 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12655 (gdb_agent_ust_loaded, helper_thread_id)
12656 (gdb_agent_helper_thread_id): New macros.
12657 (struct ipa_sym_addresses): Add addr_ust_loaded,
12658 addr_helper_thread_id, addr_cmd_buf.
12659 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12660 (in_process_agent_loaded_ust): New.
12661 (write_e_ust_not_loaded): New.
12662 (maybe_write_ipa_ust_not_loaded): New.
12663 (struct collect_static_trace_data_action): New.
12664 (enum tracepoint_type) <static_tracepoint>: New.
12665 (struct tracepoint) <handle>: Mention static tracepoints.
12666 (struct static_tracepoint_ctx): New.
12667 (CMD_BUF_SIZE): New.
12668 (add_tracepoint_action): Handle static tracepoint actions.
12669 (unprobe_marker_at): New.
12670 (clear_installed_tracepoints): Handle static tracepoints.
12671 (cmd_qtdp): Handle static tracepoints.
12672 (probe_marker_at): New.
12673 (cmd_qtstart): Handle static tracepoints.
12674 (response_tracepoint): Handle static tracepoints.
12675 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12676 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12677 (get_context_regcache): Handle static tracepoints.
12678 (do_action_at_tracepoint): Handle static tracepoint actions.
12679 (traceframe_find_block_type): Handle static trace data blocks.
12680 (traceframe_read_sdata): New.
12681 (download_tracepoints): Download static tracepoint actions.
12682 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12683 (GDB_PROBE_NAME): New.
12684 (ust_ops): New.
12685 (GET_UST_SYM): New.
12686 (USTF): New.
12687 (dlsym_ust): New.
12688 (ust_marker_to_static_tracepoint): New.
12689 (gdb_probe): New.
12690 (collect_ust_data_at_tracepoint): New.
12691 (gdb_ust_probe): New.
12692 (UNIX_PATH_MAX, SOCK_DIR): New.
12693 (gdb_ust_connect_sync_socket): New.
12694 (resume_thread, stop_thread): New.
12695 (run_inferior_command): New.
12696 (init_named_socket): New.
12697 (gdb_ust_socket_init): New.
12698 (cstr_to_hexstr): New.
12699 (next_st): New.
12700 (first_marker, next_marker): New.
12701 (response_ust_marker): New.
12702 (cmd_qtfstm, cmd_qtsstm): New.
12703 (unprobe_marker_at, probe_marker_at): New.
12704 (cmd_qtstmat, gdb_ust_thread): New.
12705 (gdb_ust_init): New.
12706 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12707 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12708 (ST_REGENTRY): New.
12709 (x86_64_st_collect_regmap): New.
12710 (X86_64_NUM_ST_COLLECT_GREGS): New.
12711 (AMD64_RIP_REGNUM): New.
12712 (supply_static_tracepoint_registers): New.
12713 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12714 (ST_REGENTRY): New.
12715 (i386_st_collect_regmap): New.
12716 (i386_NUM_ST_COLLECT_GREGS): New.
12717 (supply_static_tracepoint_registers): New.
12718 * server.c (handle_query): Handle qXfer:statictrace:read.
12719 <qSupported>: Report support for StaticTracepoints, and
12720 qXfer:statictrace:read features.
12721 * server.h (traceframe_read_sdata)
12722 (supply_static_tracepoint_registers): Declare.
12723 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12724 (unpack_varlen_hex): Include in IPA build.
12725 * Makefile.in (ustlibs, ustinc): New.
12726 (IPA_OBJS): Add remote-utils-ipa.o.
12727 ($(IPA_LIB)): Link -ldl and -lpthread.
12728 (UST_CFLAGS): New.
12729 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12730 * config.in, configure: Regenerate.
12731
12732 2010-06-20 Ian Lance Taylor <iant@google.com>
12733 Pedro Alves <pedro@codesourcery.com>
12734
12735 * linux-x86-low.c (always_true): Delete.
12736 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12737 trying to fool the compiler with always_true.
12738
12739 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12740
12741 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12742 conditions in gdbserver.
12743
12744 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12745
12746 * spu-low.c (spu_read_memory): Wrap around local store limit.
12747 (spu_write_memory): Likewise.
12748
12749 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12750
12751 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12752 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12753 LONGEST uses.
12754 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12755 uses.
12756 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12757 uses with LONGEST uses.
12758
12759 2010-06-14 Stan Shebs <stan@codesourcery.com>
12760 Pedro Alves <pedro@codesourcery.com>
12761
12762 Bytecode compiler.
12763
12764 * linux-x86-low.c: Include limits.h.
12765 (add_insns): New.
12766 (always_true): New.
12767 (EMIT_ASM): New.
12768 (EMIT_ASM32): New.
12769 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12770 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12771 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12772 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12773 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12774 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12775 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12776 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12777 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12778 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12779 (amd64_emit_void_call_2): New.
12780 (amd64_emit_ops): New.
12781 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12782 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12783 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12784 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12785 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12786 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12787 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12788 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12789 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12790 (i386_emit_stack_adjust, i386_emit_int_call_1)
12791 (i386_emit_void_call_2): New.
12792 (i386_emit_ops): New.
12793 (x86_emit_ops): New.
12794 (the_low_target): Install x86_emit_ops.
12795 * server.h (struct emit_ops): New.
12796 (get_raw_reg_func_addr): Declare.
12797 (current_insn_ptr, emit_error): Declare.
12798 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12799 (set_trace_state_variable_value): New defines.
12800 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12801 addr_get_trace_state_variable_value and
12802 addr_set_trace_state_variable_value.
12803 (symbol_list): New fields for get_raw_reg,
12804 get_trace_state_variable_value and set_trace_state_variable_value.
12805 (condfn): New typedef.
12806 (struct tracepoint): New field `compiled_cond'.
12807 (do_action_at_tracepoint): Clear compiled_cond.
12808 (get_trace_state_variable_value, set_trace_state_variable_value):
12809 Export in the IPA.
12810 (condition_true_at_tracepoint): If there's a compiled condition,
12811 run that.
12812 (current_insn_ptr, emit_error): New globals.
12813 (struct bytecode_address): New.
12814 (get_raw_reg_func_addr): New.
12815 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12816 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12817 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12818 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12819 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12820 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12821 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12822 (compile_tracepoint_condition, compile_bytecodes): New.
12823 * target.h (emit_ops): Forward declare.
12824 (struct target_ops): New field emit_ops.
12825 (target_emit_ops): New.
12826 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12827 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12828 * linux-low.c (linux_emit_ops): New.
12829 (linux_target_ops): Install it.
12830 * linux-low.h (struct linux_target_ops): New field emit_ops.
12831
12832 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12833
12834 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12835 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12836
12837 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12838 Stan Shebs <stan@codesourcery.com>
12839
12840 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12841 (all): Depend on $(extra_libraries).
12842 (install-only): Install the IPA.
12843 (IPA_OBJS, IPA_LIB): New.
12844 (clean): Remove the IPA lib.
12845 (IPAGENT_CFLAGS): New.
12846 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12847 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12848 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12849 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12850 * configure.ac: Check for atomic builtins support in the compiler.
12851 (IPA_DEPFILES, extra_libraries): Define.
12852 * configure.srv (ipa_obj): Add description.
12853 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12854 (i[34567]86-*-linux*): Set ipa_obj.
12855 (x86_64-*-linux*): Set ipa_obj.
12856 * linux-low.c (stabilizing_threads): New.
12857 (supports_fast_tracepoints): New.
12858 (linux_detach): Stabilize threads before detaching.
12859 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12860 the lwp is either not stabilizing, or is moving out of a jump pad.
12861 (linux_fast_tracepoint_collecting): New.
12862 (maybe_move_out_of_jump_pad): New.
12863 (enqueue_one_deferred_signal): New.
12864 (dequeue_one_deferred_signal): New.
12865 (linux_wait_for_event_1): If moving out of a jump pad, defer
12866 pending signals to later.
12867 (linux_stabilize_threads): New.
12868 (linux_wait_1): Check if threads need moving out of jump pads, and
12869 do it if so.
12870 (stuck_in_jump_pad_callback): New.
12871 (move_out_of_jump_pad_callback): New.
12872 (lwp_running): New.
12873 (linux_resume_one_lwp): Handle moving out of jump pads.
12874 (linux_set_resume_request): Dequeue deferred signals.
12875 (need_step_over_p): Also step over fast tracepoint jumps.
12876 (start_step_over): Also uninsert fast tracepoint jumps.
12877 (finish_step_over): Also reinsert fast tracepoint jumps.
12878 (linux_install_fast_tracepoint_jump): New.
12879 (linux_target_ops): Install linux_stabilize_threads and
12880 linux_install_fast_tracepoint_jump_pad.
12881 * linux-low.h (linux_target_ops) <get_thread_area,
12882 install_fast_tracepoint_jump_pad>: New fields.
12883 (struct lwp_info) <collecting_fast_tracepoint,
12884 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12885 (linux_get_thread_area): Declare.
12886 * linux-x86-low.c (jump_insn): New.
12887 (x86_get_thread_area): New.
12888 (append_insns): New.
12889 (push_opcode): New.
12890 (amd64_install_fast_tracepoint_jump_pad): New.
12891 (i386_install_fast_tracepoint_jump_pad): New.
12892 (x86_install_fast_tracepoint_jump_pad): New.
12893 (the_low_target): Install x86_get_thread_area and
12894 x86_install_fast_tracepoint_jump_pad.
12895 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12896 (struct fast_tracepoint_jump): New.
12897 (fast_tracepoint_jump_insn): New.
12898 (fast_tracepoint_jump_shadow): New.
12899 (find_fast_tracepoint_jump_at): New.
12900 (fast_tracepoint_jump_here): New.
12901 (delete_fast_tracepoint_jump): New.
12902 (set_fast_tracepoint_jump): New.
12903 (uninsert_fast_tracepoint_jumps_at): New.
12904 (reinsert_fast_tracepoint_jumps_at): New.
12905 (set_breakpoint_at): Use write_inferior_memory.
12906 (uninsert_raw_breakpoint): Use write_inferior_memory.
12907 (check_mem_read): Mask out fast tracepoint jumps.
12908 (check_mem_write): Mask out fast tracepoint jumps.
12909 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12910 (set_fast_tracepoint_jump): Declare.
12911 (delete_fast_tracepoint_jump)
12912 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12913 (reinsert_fast_tracepoint_jumps_at): Declare.
12914 * regcache.c: Don't compile many functions when building the
12915 in-process agent library.
12916 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12917 the register buffer in the heap.
12918 (free_register_cache): If the register buffer isn't owned by the
12919 regcache, don't free it.
12920 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12921 pre-existing register caches.
12922 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12923 type.
12924 (convert_ascii_to_int): : Constify `from' parameter type.
12925 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12926 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12927 the needed buffer in-place.
12928 (relocate_instruction): New.
12929 * server.c (handle_query) <qSymbols>: If the target supports
12930 tracepoints, give it a chance of looking up symbols. Report
12931 support for fast tracepoints.
12932 (handle_status): Stabilize threads.
12933 (process_serial_event): Adjust.
12934 * server.h (struct fast_tracepoint_jump): Forward declare.
12935 (struct process_info) <fast_tracepoint_jumps>: New field.
12936 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12937 (decode_X_packet, decode_M_packet): Adjust.
12938 (relocate_instruction): Declare.
12939 (in_process_agent_loaded): Declare.
12940 (tracepoint_look_up_symbols): Declare.
12941 (struct fast_tpoint_collect_status): Declare.
12942 (fast_tracepoint_collecting): Declare.
12943 (force_unlock_trace_buffer): Declare.
12944 (handle_tracepoint_bkpts): Declare.
12945 (initialize_low_tracepoint)
12946 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12947 * target.h (struct target_ops) <stabilize_threads,
12948 install_fast_tracepoint_jump_pad>: New fields.
12949 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12950 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12951 [HAVE_STDINT_H]: Include stdint.h.
12952 (trace_debug_1): Rename to ...
12953 (trace_vdebug): ... this.
12954 (trace_debug): Rename to ...
12955 (trace_debug_1): ... this. Add `level' parameter.
12956 (trace_debug): New.
12957 (ATTR_USED, ATTR_NOINLINE): New.
12958 (IP_AGENT_EXPORT): New.
12959 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12960 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12961 (about_to_request_buffer_space, trace_buffer_is_full)
12962 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12963 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12964 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12965 (traceframe_write_count, traceframes_created)
12966 (trace_state_variables)
12967 New renaming defines.
12968 (struct ipa_sym_addresses): New.
12969 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12970 (symbol_list): New.
12971 (ipa_sym_addrs): New.
12972 (all_tracepoint_symbols_looked_up): New.
12973 (in_process_agent_loaded): New.
12974 (write_e_ipa_not_loaded): New.
12975 (maybe_write_ipa_not_loaded): New.
12976 (tracepoint_look_up_symbols): New.
12977 (debug_threads) [IN_PROCESS_AGENT]: New.
12978 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12979 (UNKNOWN_SIDE_EFFECTS): New.
12980 (stop_tracing): New.
12981 (flush_trace_buffer): New.
12982 (stop_tracing_bkpt): New.
12983 (flush_trace_buffer_bkpt): New.
12984 (read_inferior_integer): New.
12985 (read_inferior_uinteger): New.
12986 (read_inferior_data_pointer): New.
12987 (write_inferior_data_pointer): New.
12988 (write_inferior_integer): New.
12989 (write_inferior_uinteger): New.
12990 (struct collect_static_trace_data_action): Delete.
12991 (enum tracepoint_type): New.
12992 (struct tracepoint) <type>: New field `type'.
12993 <actions_str, step_actions, step_actions_str>: Only include in
12994 GDBserver.
12995 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12996 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12997 (tracepoints): Use IP_AGENT_EXPORT.
12998 (last_tracepoint): Don't include in the IPA.
12999 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13000 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13001 (alloced_trace_state_variables): New.
13002 (trace_state_variables): Use IP_AGENT_EXPORT.
13003 (traceframe_t): Delete unused variable.
13004 (circular_trace_buffer): Don't include in the IPA.
13005 (trace_buffer_start): Delete.
13006 (struct trace_buffer_control): New.
13007 (trace_buffer_free): Delete.
13008 (struct ipa_trace_buffer_control): New.
13009 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13010 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13011 New.
13012 (trace_buffer_ctrl): New.
13013 (TRACE_BUFFER_CTRL_CURR): New.
13014 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13015 Reimplement as macros.
13016 (trace_buffer_wrap): Delete.
13017 (traceframe_write_count, traceframe_read_count)
13018 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13019 (struct tracepoint_hit_ctx) <type>: New field.
13020 (struct fast_tracepoint_ctx): New.
13021 (memory_barrier): New.
13022 (cmpxchg): New.
13023 (record_tracepoint_error): Update atomically in the IPA.
13024 (clear_inferior_trace_buffer): New.
13025 (about_to_request_buffer_space): New.
13026 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13027 updating the same buffer.
13028 (add_tracepoint): Default the tracepoint's type to trap
13029 tracepoint, and orig_size to -1.
13030 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13031 internal variables.
13032 (create_trace_state_variable): New parameter `gdb'. Handle it.
13033 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13034 (cmd_qtdp): Handle fast tracepoints.
13035 (cmd_qtdv): Adjust.
13036 (max_jump_pad_size): New.
13037 (gdb_jump_pad_head): New.
13038 (get_jump_space_head): New.
13039 (claim_jump_space): New.
13040 (sort_tracepoints): New.
13041 (MAX_JUMP_SIZE): New.
13042 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13043 IPA.
13044 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13045 support. Upload fast traceframes, and delete internal IPA
13046 breakpoints.
13047 (stop_tracing_handler): New.
13048 (flush_trace_buffer_handler): New.
13049 (cmd_qtstop): Upload fast tracepoints.
13050 (response_tracepoint): Handle fast tracepoints.
13051 (tracepoint_finished_step): Upload fast traceframes. Set the
13052 tracepoint hit context's tracepoint type.
13053 (handle_tracepoint_bkpts): New.
13054 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13055 type. Add comment about fast tracepoints.
13056 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13057 non-existing action_str field.
13058 (get_context_regcache): Handle fast tracepoints.
13059 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13060 to the regcache.
13061 (fast_tracepoint_from_jump_pad_address): New.
13062 (fast_tracepoint_from_ipa_tpoint_address): New.
13063 (collecting_t): New.
13064 (force_unlock_trace_buffer): New.
13065 (fast_tracepoint_collecting): New.
13066 (collecting): New.
13067 (gdb_collect): New.
13068 (write_inferior_data_ptr): New.
13069 (target_tp_heap): New.
13070 (target_malloc): New.
13071 (download_agent_expr): New.
13072 (UALIGN): New.
13073 (download_tracepoints): New.
13074 (download_trace_state_variables): New.
13075 (upload_fast_traceframes): New.
13076 (IPA_FIRST_TRACEFRAME): New.
13077 (IPA_NEXT_TRACEFRAME_1): New.
13078 (IPA_NEXT_TRACEFRAME): New.
13079 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13080 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13081 (gdb_jump_pad_buffer_end): New.
13082 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13083 (initialize_tracepoint): Adjust.
13084 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13085 buffer. Initialize the low module.
13086 * utils.c (PREFIX, TOOLNAME): New.
13087 (malloc_failure): Use PREFIX.
13088 (error): In the IPA, an error causes an exit.
13089 (fatal, warning): Use PREFIX.
13090 (internal_error): Use TOOLNAME.
13091 (NUMCELLS): Increase to 10.
13092 * configure, config.in: Regenerate.
13093
13094 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13095
13096 * server.c (handle_query) <qSupported>: Do two passes over the
13097 qSupported string to avoid nesting strtok.
13098
13099 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13100
13101 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13102 (CDEPS): New.
13103 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13104 -Wl,--dynamic-list.
13105 * configure: Regenerate.
13106 * proc-service.list: New.
13107
13108 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13109
13110 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13111 New comment.
13112
13113 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13114
13115 * gdbreplay.c (remote_open): Check error return from socket() call by
13116 its equality to -1 not by it being negative.
13117 * remote-utils.c (remote_open): Likewise.
13118
13119 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13120
13121 * config.h: Regenerate.
13122
13123 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13124
13125 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13126 doesn't provide PTRACE_GET_THREAD_AREA.
13127
13128 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13129
13130 * linux-m68k-low.c: Include <asm/ptrace.h>
13131 (ps_get_thread_area): Implement.
13132
13133 2010-05-03 Doug Evans <dje@google.com>
13134
13135 * event-loop.c (struct callback_event): New struct.
13136 (callback_list): New global.
13137 (append_callback_event, delete_callback_event): New functions.
13138 (process_callback): New function.
13139 (start_event_loop): Call it.
13140 * remote-utils.c (NOT_SCHEDULED): Define.
13141 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13142 moved out of readchar.
13143 (readchar): Rewrite. Call reschedule before returning.
13144 (reset_readchar): New function.
13145 (remote_close): Call it.
13146 (process_remaining, reschedule): New functions.
13147 * server.h (callback_handler_func): New typedef.
13148 (append_callback_event, delete_callback_event): Declare.
13149
13150 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13151
13152 * proc-service.c (ps_pglobal_lookup): Use
13153 thread_db_look_up_one_symbol.
13154 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13155 parameter. Use it instead of all_symbols_looked_up.
13156 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13157 field.
13158 (all_symbols_looked_up): Don't declare.
13159 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13160 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13161 field.
13162 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13163 Set all_symbols_looked_up here.
13164 (thread_db_look_up_one_symbol): New.
13165 (thread_db_get_tls_address): Adjust.
13166 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13167 thread_db object on the heap, and tentatively set it in the
13168 process structure.
13169 (thread_db_init): Don't set all_symbols_looked_up here.
13170 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13171
13172 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13173
13174 * linux-low.c (linux_kill, linux_detach): Adjust.
13175 (status_pending_p_callback): Remove redundant statement. Check
13176 for !TARGET_WAITIKIND_IGNORE, instead of
13177 TARGET_WAITKIND_STOPPED.
13178 (handle_tracepoints): Make sure LWP is locked. Adjust.
13179 (linux_wait_for_event_1): Adjust.
13180 (linux_cancel_breakpoints): New.
13181 (unsuspend_one_lwp): New.
13182 (unsuspend_all_lwps): New.
13183 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13184 (send_sigstop_callback): Change return type to int, add new
13185 `except' parameter and handle it.
13186 (suspend_and_send_sigstop_callback): New.
13187 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13188 pass them down. If SUSPEND, also increment the lwp's suspend
13189 count.
13190 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13191 (need_step_over_p): Don't consider suspended LWPs.
13192 (start_step_over): Adjust.
13193 (proceed_one_lwp): Change return type to int, add new `except'
13194 parameter and handle it.
13195 (unsuspend_and_proceed_one_lwp): New.
13196 (proceed_all_lwps): Use find_inferior instead of
13197 for_each_inferior.
13198 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13199 also decrement the suspend count of LWPs. Pass `except' down,
13200 instead of hacking its suspend count.
13201 (linux_pause_all): Add `freeze' parameter. Adjust.
13202 (linux_unpause_all): New.
13203 (linux_target_ops): Install linux_unpause_all.
13204 * server.c (handle_status): Adjust.
13205 * target.h (struct target_ops): New fields `unpause_all' and
13206 `cancel_breakpoints'. Add new parameter to `pause_all'.
13207 (pause_all): Add new `freeze' parameter.
13208 (unpause_all): New.
13209 (cancel_breakpoints): New.
13210 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13211 cancel breakpoints.
13212 (cmd_qtstart): Pause threads.
13213 (stop_tracing): Pause threads, and cancel breakpoints.
13214 * win32-low.c (win32_target_ops): Adjust.
13215
13216 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13217
13218 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13219 the inferior right away from here...
13220 (linux_wait_1): ... to here, and adjust to check the thread's
13221 last_resume_kind instead of the lwp's step or stop_expected flags.
13222
13223 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13224
13225 * README: Use consistent `GDB' and `GDBserver' spellings.
13226
13227 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13228
13229 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13230 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13231 (linux_detach_one_lwp): Assume the lwp is stopped.
13232 (any_thread_of): Delete.
13233 (linux_detach): Stop all lwps here. Don't blindly delete all
13234 breakpoints.
13235 (delete_lwp_callback): New.
13236 (linux_mourn): Delete all lwps of the process that is gone.
13237 (linux_wait_1): Don't delete the last lwp of the process here.
13238 * mem-break.h (mark_breakpoints_out): Declare.
13239 * mem-break.c (mark_breakpoints_out): New.
13240 (free_all_breakpoints): Use it.
13241 * server.c (handle_target_event): If the process is gone, mark
13242 breakpoints out.
13243 * thread-db.c (struct thread_db) <create_bp>: New field.
13244 (thread_db_enable_reporting): Fix prototype. Store a thread event
13245 breakpoint reference in the thread_db struct.
13246 (thread_db_load_search): Clear the thread_db object.
13247 (try_thread_db_load_1): Ditto.
13248 (switch_to_process): New.
13249 (disable_thread_event_reporting): Use it.
13250 (remove_thread_event_breakpoints): New.
13251 (thread_db_detach, thread_db_mourn): Use it.
13252
13253 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13254
13255 * linux-low.c (linux_enable_event_reporting): New.
13256 (linux_wait_for_event_1, handle_extended_wait): Use it.
13257
13258 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13259
13260 * linux-low.c (linux_kill_one_lwp, linux_kill)
13261 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13262 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13263 SIGSTOP even if the LWP is stopped.
13264 (send_sigstop_callback): New.
13265 (stop_all_lwps): Use send_sigstop_callback instead.
13266 (linux_resume_one_thread): Adjust.
13267 (proceed_one_lwp): Still proceed an LWP that the client has
13268 requested to stop, if we haven't reported it as stopped yet. Make
13269 sure that LWPs the client want stopped, have a pending SIGSTOP.
13270
13271 2010-04-26 Doug Evans <dje@google.com>
13272
13273 * server.c (handle_general_set): Make static.
13274
13275 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13276 Print received char after testing for error/eof instead of before.
13277 (input_interrupt): Tweak comment.
13278
13279 2010-04-23 Doug Evans <dje@google.com>
13280
13281 * server.c (start_inferior): Print inferior argv if --debug.
13282
13283 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13284
13285 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13286 * nto-x86-low.c: Include server.h
13287
13288 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13289
13290 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13291 be consistent with other sources of this directory.
13292 (init_registers_amd64): Correct name of source file of this function
13293 in the comment.
13294
13295 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13296
13297 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13298 64-bit executables.
13299
13300 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13301
13302 * win32-i386-low.c: Add 64-bit support.
13303 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13304 (init_registers_amd64): Declare.
13305 (mappings): Add 64-bit version of array.
13306 (init_windows_x86): New function.
13307 (the_low_target): Change init_arch field to init_windows_x86.
13308
13309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13310
13311 * win32-low.c: Adapt to support also 64-bit architecture.
13312 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13313 (get_image_name): Use SIZE_T type for local variable `done'.
13314 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13315 (toolhelp_get_dll_name): Idem.
13316 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13317 Use uintptr_t typecast to avoid warning.
13318 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13319 (handle_exception): Use phex_nz to avoid warning.
13320 (win32_wait): Remove unused local variable `process'.
13321
13322 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13323
13324 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13325 `amd64-avx.o'.
13326
13327 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13328
13329 * configure.ac: Use `ws2_32' library for srv_mingw.
13330 * configure: Regenerate.
13331 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13332 * remote-utils.c: Likewise.
13333
13334 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13335
13336 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13337 if __x86_64__ is defined.
13338
13339 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13340
13341 * configure: Regenerate.
13342
13343 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13344
13345 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13346 * target.h (target_ops): New get_tib_address field.
13347 * win32-low.h (win32_thread_info): Add thread_local_base field.
13348 * win32-low.c (child_add_thread): Add tlb argument.
13349 Set thread_local_base field to TLB.
13350 (get_child_debug_event): Adapt to child_add_thread change.
13351 (win32_get_tib_address): New function.
13352 (win32_target_ops): Set get_tib_address field to
13353 win32_get_tib_address.
13354 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13355
13356 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13357
13358 * linux-low.c (linux_mourn): Also remove the process.
13359 * server.c (handle_target_event): Don't remove the process here.
13360 * nto-low.c (nto_mourn): New.
13361 (nto_target_ops): Install it.
13362 * spu-low.c (spu_mourn): New.
13363 (spu_target_ops): Install it.
13364 * win32-low.c (win32_mourn): New.
13365 (win32_target_ops): Install it.
13366
13367 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13368
13369 * server.h (buffer_xml_printf): Remove redundant `;'.
13370
13371 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13372
13373 * regcache.c (set_register_cache): Invalidate regcaches before
13374 changing the register cache layout.
13375 (regcache_invalidate_one): Allow a NULL regcache.
13376 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13377 regcaches before changing the register cache layout or the target
13378 regsets.
13379
13380 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13381
13382 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13383 variable warning on Linux/x86-64.
13384
13385 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13386
13387 GDBserver disconnected tracing support.
13388
13389 * linux-low.c (linux_remove_process): Delete.
13390 (add_lwp): Don't set last_resume_kind here.
13391 (linux_kill): Use `mourn'.
13392 (linux_detach): Use `thread_db_detach', and `mourn'.
13393 (linux_mourn): New.
13394 (linux_attach_lwp_1): Adjust comment.
13395 (linux_attach): last_resume_kind moved the thread_info; adjust.
13396 (status_pending_p_callback): Adjust.
13397 (linux_wait_for_event_1): Adjust.
13398 (count_events_callback, select_singlestep_lwp_callback)
13399 (select_event_lwp_callback, cancel_breakpoints_callback)
13400 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13401 (proceed_one_lwp): Adjust.
13402 (linux_async): Add debug output.
13403 (linux_thread_stopped): New.
13404 (linux_pause_all): New.
13405 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13406 linux_pause_all.
13407 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13408 (thread_db_free): Delete declaration.
13409 (thread_db_detach, thread_db_mourn): Declare.
13410 * thread-db.c (thread_db_init): Use thread_db_mourn.
13411 (thread_db_free): Delete, split in two.
13412 (disable_thread_event_reporting): New.
13413 (thread_db_detach): New.
13414 (thread_db_mourn): New.
13415
13416 * server.h (struct thread_info) <last_resume_kind>: New field.
13417 <attached>: Add comment.
13418 <gdb_detached>: New field.
13419 (handler_func): Change return type to int.
13420 (handle_serial_event, handle_target_event): Ditto.
13421 (gdb_connected): Declare.
13422 (tracing): Delete.
13423 (disconnected_tracing): Declare.
13424 (stop_tracing): Declare.
13425
13426 * server.c (handle_query) <qSupported>: Report support for
13427 disconnected tracing.
13428 (queue_stop_reply_callback): Account for running threads.
13429 (gdb_wants_thread_stopped): New.
13430 (gdb_wants_all_threads_stopped): New.
13431 (gdb_reattached_process): New.
13432 (handle_status): Clear the `gdb_detached' flag of all processes.
13433 In all-stop, stop all threads.
13434 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13435 (process_serial_event): If the remote connection breaks, or if an
13436 exit was forced with "monitor exit", force an event loop exit.
13437 Handle disconnected tracing on detach.
13438 (handle_serial_event): Adjust.
13439 (handle_target_event): If GDB isn't connected, forward events back
13440 to the inferior, unless the last process exited, in which case,
13441 exit gdbserver. Adjust interface.
13442
13443 * remote-utils.c (remote_open): Don't block in accept. Instead
13444 register an event loop source on the listen socket file
13445 descriptor. Refactor bits into ...
13446 (listen_desc): ... this new global.
13447 (gdb_connected): ... this new function.
13448 (enable_async_notification): ... this new function.
13449 (handle_accept_event): ... this new function.
13450 (remote_close): Clear remote_desc.
13451
13452 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13453
13454 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13455 New fields.
13456 (mourn_inferior): Define.
13457 (target_process_qsupported): Avoid the dangling else problem.
13458 (thread_stopped): Define.
13459 (pause_all): Define.
13460 (target_waitstatus_to_string): Declare.
13461 * target.c (target_waitstatus_to_string): New.
13462
13463 * tracepoint.c (tracing): Make extern.
13464 (disconnected_tracing): New.
13465 (stop_tracing): Make extern. Handle tracing stops due to GDB
13466 disconnecting.
13467 (cmd_qtdisconnected): New.
13468 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13469 (handle_tracepoint_general_set): Handle QTDisconnected.
13470
13471 * event-loop.c (event_handler_func): Change return type to int.
13472 (process_event): Bail out if the event handler wants the event
13473 loop to stop.
13474 (handle_file_event): Ditto.
13475 (start_event_loop): Bail out if the event handler wants the event
13476 loop to stop.
13477
13478 * nto-low.c (nto_target_ops): Adjust.
13479 * spu-low.c (spu_wait): Don't remove the process here.
13480 (spu_target_ops): Adjust.
13481 * win32-low.c (win32_wait): Don't remove the process here.
13482 (win32_target_ops): Adjust.
13483
13484 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13485
13486 * regcache.c (realloc_register_cache): Invalidate inferior's
13487 regcache before recreating it.
13488
13489 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13490
13491 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13492
13493 2010-04-09 Stan Shebs <stan@codesourcery.com>
13494 Pedro Alves <pedro@codesourcery.com>
13495
13496 * server.h (LONGEST): New.
13497 (struct thread_info) <while_stepping>: New field.
13498 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13499 Declare.
13500 (initialize_tracepoint, handle_tracepoint_general_set)
13501 (handle_tracepoint_query, tracepoint_finished_step)
13502 (tracepoint_was_hit, release_while_stepping_state_list):
13503 (current_traceframe): Declare.
13504 * server.c (handle_general_set): Handle tracepoint packets.
13505 (read_memory): New.
13506 (write_memory): New.
13507 (handle_search_memory_1): Use read_memory.
13508 (handle_query): Report support for conditional tracepoints, trace
13509 state variables, and tracepoint sources. Handle tracepoint
13510 queries.
13511 (main): Initialize the tracepoints module.
13512 (process_serial_event): Handle traceframe reads/writes.
13513
13514 * linux-low.c (handle_tracepoints): New.
13515 (linux_wait_1): Call it.
13516 (linux_resume_one_lwp): Handle while-stepping.
13517 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13518 (linux_target_ops): Install them.
13519 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13520 New field.
13521 * linux-x86-low.c (x86_supports_tracepoints): New.
13522 (the_low_target). Install it.
13523
13524 * mem-break.h (delete_breakpoint): Declare.
13525 * mem-break.c (delete_breakpoint): Make external.
13526
13527 * target.h (struct target_ops): Add `supports_tracepoints',
13528 `read_pc', and `write_pc' fields.
13529 (target_supports_tracepoints): Define.
13530 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13531 (phex_nz): New.
13532
13533 * regcache.h (struct regcache) <registers_owned>: New field.
13534 (init_register_cache, regcache_cpy): Declare.
13535 (regcache_read_pc, regcache_write_pc): Declare.
13536 (register_cache_size): Declare.
13537 (supply_regblock): Declare.
13538 * regcache.c (init_register_cache): New.
13539 (new_register_cache): Use it.
13540 (regcache_cpy): New.
13541 (register_cache_size): New.
13542 (supply_regblock): New.
13543 (regcache_read_pc, regcache_write_pc): New.
13544
13545 * tracepoint.c: New.
13546
13547 * Makefile.in (OBS): Add tracepoint.o.
13548 (tracepoint.o): New rule.
13549
13550 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13551
13552 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13553 (i386-mmx.o): New.
13554 (i386-mmx.c): Likewise.
13555 (i386-mmx-linux.o): Likewise.
13556 (i386-mmx-linux.c): Likewise.
13557
13558 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13559 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13560 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13561 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13562
13563 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13564 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13565 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13566
13567 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13568
13569 * Makefile.in (clean): Updated.
13570 (i386-avx.o): New.
13571 (i386-avx.c): Likewise.
13572 (i386-avx-linux.o): Likewise.
13573 (i386-avx-linux.c): Likewise.
13574 (amd64-avx.o): Likewise.
13575 (amd64-avx.c): Likewise.
13576 (amd64-avx-linux.o): Likewise.
13577 (amd64-avx-linux.c): Likewise.
13578
13579 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13580 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13581 (srv_amd64_regobj): Add amd64-avx.o.
13582 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13583 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13584 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13585 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13586 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13587 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13588 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13589
13590 * i387-fp.c: Include "i386-xstate.h".
13591 (i387_xsave): New.
13592 (i387_cache_to_xsave): Likewise.
13593 (i387_xsave_to_cache): Likewise.
13594 (x86_xcr0): Likewise.
13595
13596 * i387-fp.h (i387_cache_to_xsave): Likewise.
13597 (i387_xsave_to_cache): Likewise.
13598 (x86_xcr0): Likewise.
13599
13600 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13601 * linux-crisv32-low.c (target_regsets): Likewise.
13602 * linux-m68k-low.c (target_regsets): Likewise.
13603 * linux-mips-low.c (target_regsets): Likewise.
13604 * linux-ppc-low.c (target_regsets): Likewise.
13605 * linux-s390-low.c (target_regsets): Likewise.
13606 * linux-sh-low.c (target_regsets): Likewise.
13607 * linux-sparc-low.c (target_regsets): Likewise.
13608 * linux-xtensa-low.c (target_regsets): Likewise.
13609
13610 * linux-low.c: Include <sys/uio.h>.
13611 (regsets_fetch_inferior_registers): Support nt_type.
13612 (regsets_store_inferior_registers): Likewise.
13613 (linux_process_qsupported): New.
13614 (linux_target_ops): Add linux_process_qsupported.
13615
13616 * linux-low.h (regset_info): Add nt_type.
13617 (linux_target_ops): Add process_qsupported.
13618
13619 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13620 and <sys/uio.h>.
13621 (init_registers_i386_avx_linux): New.
13622 (init_registers_amd64_avx_linux): Likewise.
13623 (xmltarget_i386_linux_no_xml): Likewise.
13624 (xmltarget_amd64_linux_no_xml): Likewise.
13625 (PTRACE_GETREGSET): Likewise.
13626 (PTRACE_SETREGSET): Likewise.
13627 (x86_fill_xstateregset): Likewise.
13628 (x86_store_xstateregset): Likewise.
13629 (use_xml): Likewise.
13630 (x86_linux_update_xmltarget): Likewise.
13631 (x86_linux_process_qsupported): Likewise.
13632 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13633 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13634 init_registers_i386_linux here. Call
13635 x86_linux_update_xmltarget.
13636 (the_low_target): Add x86_linux_process_qsupported.
13637
13638 * server.c (handle_query): Call target_process_qsupported.
13639
13640 * target.h (target_ops): Add process_qsupported.
13641 (target_process_qsupported): New.
13642
13643 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13644
13645 * inferiors.c (add_thread): Set last_status kind to
13646 TARGET_WAITKIND_IGNORE.
13647 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13648 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13649 (linux_wait_1): Move `thread' local definition to block that uses
13650 it. Don't NULL initialize `event_child'.
13651 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13652 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13653 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13654
13655 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13656
13657 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13658 an extended waitstatus, or by a watchpoint.
13659 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13660 thread was stepping or has been stopped by a watchpoint.
13661
13662 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13663
13664 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13665 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13666 of another, then delete the previous, and validate all
13667 breakpoints.
13668 (validate_inserted_breakpoint): New.
13669 (delete_disabled_breakpoints): New.
13670 (validate_breakpoints): New.
13671 (check_mem_read): Validate breakpoints before trusting their
13672 shadow. Delete disabled breakpoints.
13673 (check_mem_write): Validate breakpoints before trusting they
13674 should be inserted. Delete disabled breakpoints.
13675 * mem-break.h (validate_breakpoints):
13676 * server.c (handle_query): Validate breakpoints when we see a
13677 qSymbol query.
13678
13679 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13680
13681 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13682 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13683 if we could tell there's a GDB breakpoint at stop_pc.
13684 (need_step_over_p): Don't do a step over if we find a GDB
13685 breakpoint at the resume PC.
13686
13687 * mem-break.c (struct raw_breakpoint): New.
13688 (enum bkpt_type): New type `gdb_breakpoint'.
13689 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13690 fields. New field `raw'.
13691 (find_raw_breakpoint_at): New.
13692 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13693 breakpoint instead.
13694 (set_breakpoint_at): Adjust.
13695 (delete_raw_breakpoint): New.
13696 (release_breakpoint): New.
13697 (delete_breakpoint): Rename to...
13698 (delete_breakpoint_1): ... this. Add proc parameter. Use
13699 release_breakpoint. Return ENOENT.
13700 (delete_breakpoint): Reimplement.
13701 (find_breakpoint_at): Delete.
13702 (find_gdb_breakpoint_at): New.
13703 (delete_breakpoint_at): Delete.
13704 (set_gdb_breakpoint_at): New.
13705 (delete_gdb_breakpoint_at): New.
13706 (gdb_breakpoint_here): New.
13707 (set_reinsert_breakpoint): Use release_breakpoint.
13708 (uninsert_breakpoint): Rename to ...
13709 (uninsert_raw_breakpoint): ... this.
13710 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13711 (reinsert_raw_breakpoint): Change parameter type to
13712 raw_breakpoint.
13713 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13714 instead.
13715 (check_breakpoints): Adjust. Use release_breakpoint.
13716 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13717 (breakpoint_inserted_here): Ditto.
13718 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13719 Don't trust the breakpoint's shadow if it is not inserted.
13720 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13721 (delete_all_breakpoints): Adjust.
13722 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13723 use delete_breakpoint_1.
13724
13725 * mem-break.h (breakpoints_supported): Delete declaration.
13726 (set_gdb_breakpoint_at): Declare.
13727 (gdb_breakpoint_here): Declare.
13728 (delete_breakpoint_at): Delete.
13729 (delete_gdb_breakpoint_at): Declare.
13730
13731 * server.h (struct raw_breakpoint): Forward declare.
13732 (struct process_info): New field `raw_breakpoints'.
13733
13734 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13735 breakpoints.
13736
13737 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13738
13739 * linux-low.c (status_pending_p_callback): Fix comment.
13740 (linux_wait_for_event_1): Move most of the internal breakpoint
13741 handling from here...
13742 (linux_wait_1): ... to here.
13743 (count_events_callback): New.
13744 (select_singlestep_lwp_callback): New.
13745 (select_event_lwp_callback): New.
13746 (cancel_breakpoints_callback): New.
13747 (select_event_lwp): New.
13748 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13749 priority to all LWPs that have had events that should be reported
13750 to the client. Cancel breakpoints when about to reporting the
13751 event to the client, not while stopping lwps. No longer cancel
13752 finished single-steps here.
13753 (cancel_finished_single_step): Delete.
13754 (cancel_finished_single_steps): Delete.
13755
13756 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13757
13758 * mem-break.c (enum bkpt_type): New.
13759 (struct breakpoint): New field `type'.
13760 (set_breakpoint_at): Change return type to struct breakpoint
13761 pointer. Set type to `other_breakpoint' by default.
13762 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13763 in the breakpoint list.
13764 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13765 (reinsert_breakpoint): Rename to ...
13766 (reinsert_raw_breakpoint): ... this.
13767 (reinsert_breakpoints_at): Adjust.
13768 * mem-break.h (struct breakpoint): Declare.
13769 (set_breakpoint_at): Change return type to struct breakpoint
13770 pointer.
13771
13772 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13773
13774 * server.c (handle_query): Assign, not compare.
13775
13776 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13777
13778 Teach linux gdbserver to step-over-breakpoints.
13779
13780 * linux-low.c (can_hardware_single_step): New.
13781 (supports_breakpoints): New.
13782 (handle_extended_wait): If stopping threads, read the stop pc of
13783 the new cloned LWP.
13784 (get_pc): New.
13785 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13786 low target doesn't support retrieving the PC.
13787 (add_lwp): Set last_resume_kind to resume_continue.
13788 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13789 (linux_attach): Don't clear stop_expected. Set the lwp's
13790 last_resume_kind to resume_stop.
13791 (linux_detach_one_lwp): Don't check for removed breakpoints.
13792 (check_removed_breakpoint): Delete.
13793 (status_pending_p): Rename to ...
13794 (status_pending_p_callback): ... this. Don't check for removed
13795 breakpoints. Don't consider threads that are stopped from GDB's
13796 perspective.
13797 (linux_wait_for_lwp): Always read the stop_pc here.
13798 (cancel_breakpoint): New.
13799 (step_over_bkpt): New global.
13800 (linux_wait_for_event_1): Implement stepping over breakpoints.
13801 (gdb_wants_lwp_stopped): New.
13802 (gdb_wants_all_stopped): New.
13803 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13804 single-step traps here. Store the thread's last reported target
13805 wait status.
13806 (send_sigstop): Don't clear stop_expected. Always set it,
13807 instead.
13808 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13809 (cancel_finished_single_step): New.
13810 (cancel_finished_single_steps): New.
13811 (wait_for_sigstop): Don't cancel finished single-step traps here.
13812 (linux_resume_one_lwp): Don't check for removed breakpoints.
13813 Don't set `step' on non-hardware step archs.
13814 (linux_set_resume_request): Ignore resume_stop requests if already
13815 stopping or stopped. Set the lwp's last_resume_kind.
13816 (resume_status_pending_p): Don't check for removed breakpoints.
13817 (need_step_over_p): New.
13818 (start_step_over): New.
13819 (finish_step_over): New.
13820 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13821 requests. Clear the thread's last reported target waitstatus.
13822 Don't use the `suspended' flag. Don't consider pending breakpoints.
13823 (linux_resume): Start a step-over if necessary.
13824 (proceed_one_lwp): New.
13825 (proceed_all_lwps): New.
13826 (unstop_all_lwps): New.
13827 * linux-low.h (struct lwp_info): Rewrite comment for the
13828 `suspended' flag. Add the `stop_pc' field. Delete the
13829 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13830 Add `'last_resume_kind' and `need_step_over' fields.
13831 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13832 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13833 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13834 (set_raw_breakpoint_at): New.
13835 (set_breakpoint_at): Rewrite to use it.
13836 (reinsert_breakpoint_handler): Delete.
13837 (set_reinsert_breakpoint): New.
13838 (reinsert_breakpoint_by_bp): Delete.
13839 (delete_reinsert_breakpoints): New.
13840 (uninsert_breakpoint): Rewrite.
13841 (uninsert_breakpoints_at): New.
13842 (reinsert_breakpoint): Rewrite.
13843 (reinsert_breakpoints_at): New.
13844 (check_breakpoints): Rewrite.
13845 (breakpoint_here): New.
13846 (breakpoint_inserted_here): New.
13847 (check_mem_read): Adjust.
13848 * mem-break.h (breakpoints_supported, breakpoint_here)
13849 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13850 (reinsert_breakpoint_by_bp): Delete declaration.
13851 (delete_reinsert_breakpoints): Declare.
13852 (reinsert_breakpoint): Delete declaration.
13853 (reinsert_breakpoints_at): Declare.
13854 (uninsert_breakpoint): Delete declaration.
13855 (uninsert_breakpoints_at): Declare.
13856 (check_breakpoints): Adjust prototype.
13857 * server.h: Adjust include order.
13858 (struct thread_info): Declare here. Add a `last_status' field.
13859
13860 2010-03-23 Michael Snyder <msnyder@vmware.com>
13861
13862 * server.c (crc32): New function.
13863 (handle_query): Add handling for 'qCRC:' request.
13864
13865 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13866
13867 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13868 lwp had been stopped by a watchpoint.
13869
13870 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13871
13872 * server.h (internal_error): Declare.
13873 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13874 * utils.c (internal_error): New function.
13875
13876 2010-03-15 Andreas Schwab <schwab@redhat.com>
13877
13878 * configure.srv: Fix typo setting srv_regobj.
13879
13880 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13881
13882 * linux-low.c (fetch_register): Avoid passing a non string literal
13883 format to `error'.
13884 (usr_store_inferior_registers): Ditto.
13885
13886 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13887
13888 * linux-low.c (linux_write_memory): Bail out early if peeking
13889 memory failed.
13890
13891 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13892
13893 * linux-low.h (struct lwp_info): New fields
13894 `stopped_by_watchpoint' and `stopped_data_address'.
13895 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13896 here, and cache them in the lwp object.
13897 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13898 directly.
13899 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13900 field.
13901 (linux_stopped_by_watchpoint): Rewrite.
13902 (linux_stopped_data_address): Rewrite.
13903
13904 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13905
13906 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13907 switching the current inferior, not before.
13908
13909 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13910
13911 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13912 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13913 i386-linux.c and amd64-linux.c.
13914 (reg-i386.o): Removed.
13915 (reg-i386.c): Likewise.
13916 (reg-i386-linux.o): Likewise.
13917 (reg-i386-linux.c): Likewise.
13918 (reg-x86-64.o): Likewise.
13919 (reg-x86-64.c): Likewise.
13920 (reg-x86-64-linux.o): Likewise.
13921 (reg-x86-64-linux.c): Likewise.
13922 (i386.o): New.
13923 (i386.c): Likewise.
13924 (i386-linux.o): Likewise.
13925 (i386-linux.c): Likewise.
13926 (amd64.o): Likewise.
13927 (amd64.c): Likewise.
13928 (amd64-linux.o): Likewise.
13929 (amd64-linux.c): Likewise.
13930
13931 * configure.srv (srv_i386_regobj): New.
13932 (srv_i386_linux_regobj): Likewise.
13933 (srv_amd64_regobj): Likewise.
13934 (srv_amd64_linux_regobj): Likewise.
13935 (srv_i386_32bit_xmlfiles): Likewise.
13936 (srv_i386_64bit_xmlfiles): Likewise.
13937 (srv_i386_xmlfiles): Likewise.
13938 (srv_amd64_xmlfiles): Likewise.
13939 (srv_i386_linux_xmlfiles): Likewise.
13940 (srv_amd64_linux_xmlfiles): Likewise.
13941 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13942 srv_xmlfiles to $srv_i386_xmlfiles.
13943 (i[34567]86-*-mingw32ce*): Likewise.
13944 (i[34567]86-*-mingw*): Likewise.
13945 (i[34567]86-*-nto*): Likewise.
13946 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13947 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13948 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13949 (x86_64-*-linux*): Likewise.
13950
13951 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13952 (init_registers_amd64_linux): New.
13953 (x86_arch_setup): Replace init_registers_x86_64_linux with
13954 init_registers_amd64_linux.
13955
13956 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13957
13958 * configure.ac: Check for libdl. If it is not available link against
13959 static libthread_db.
13960 * configure: Regenerate.
13961
13962 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13963
13964 PR9605
13965
13966 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13967 handing a read watchpoint.
13968 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13969
13970 2010-02-12 Doug Evans <dje@google.com>
13971
13972 * linux-low.c (linux_supports_tracefork_flag): Document.
13973 (linux_look_up_symbols): Add comment.
13974
13975 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13976
13977 * regcache.c (supply_register): Clear regcache if buf is NULL.
13978
13979 2010-02-02 Nicolas Roche <roche@sourceware.org>
13980 Joel Brobecker <brobecker@adacore.com>
13981
13982 * inferiors.c (find_inferior): Add function documentation.
13983 (unloaded_dll): Handle the case where the unloaded dll has not
13984 been previously registered in the dll list.
13985
13986 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13987
13988 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13989 (thumb2_breakpoint): New.
13990 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13991
13992 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13993
13994 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13995 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13996 breakpoints.
13997
13998 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13999
14000 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14001
14002 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14003
14004 * linux-s390-low.c (s390_collect_ptrace_register)
14005 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14006
14007 2010-01-21 Doug Evans <dje@google.com>
14008
14009 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14010 (PTRACE_ARG4_TYPE): New macro.
14011 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14012 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14013 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14014 (usr_store_inferior_registers): Ditto.
14015 (linux_read_memory, linux_write_memory): Ditto.
14016 (linux_test_for_tracefork): Ditto.
14017
14018 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14019 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14020
14021 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14022
14023 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14024 target.
14025
14026 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14027
14028 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14029 prototype to take a regcache. Adjust.
14030
14031 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14032
14033 * regcache.h (struct thread_info): Forward declare.
14034 (struct regcache): New.
14035 (new_register_cache): Adjust prototype.
14036 (get_thread_regcache): Declare.
14037 (free_register_cache): Adjust prototype.
14038 (registers_to_string, registers_from_string): Ditto.
14039 (supply_register, supply_register_by_name, collect_register)
14040 (collect_register_as_string, collect_register_by_name): Ditto.
14041 * regcache.c (struct inferior_regcache_data): Delete.
14042 (get_regcache): Rename to ...
14043 (get_thread_regcache): ... this. Adjust. Switch inferior before
14044 fetching registers.
14045 (regcache_invalidate_one): Adjust.
14046 (regcache_invalidate): Fix prototype.
14047 (new_register_cache): Return the new register cache.
14048 (free_register_cache): Change prototype.
14049 (realloc_register_cache): Adjust.
14050 (registers_to_string): Change prototype to take a regcache. Adjust.
14051 (registers_from_string): Ditto.
14052 (register_data): Ditto.
14053 (supply_register): Ditto.
14054 (supply_register_by_name): Ditto.
14055 (collect_register): Ditto.
14056 (collect_register_as_string): Ditto.
14057 (collect_register_by_name): Ditto.
14058 * server.c (process_serial_event): Adjust.
14059 * linux-low.h (regset_fill_func, regset_store_func): Change
14060 prototype.
14061 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14062 Change prototype.
14063 * linux-low.c (get_stop_pc): Adjust.
14064 (check_removed_breakpoint): Adjust.
14065 (linux_wait_for_event): Adjust.
14066 (linux_resume_one_lwp): Adjust.
14067 (fetch_register): Add regcache parameter. Adjust.
14068 (usr_store_inferior_registers): Ditto.
14069 (regsets_fetch_inferior_registers): Ditto.
14070 (regsets_store_inferior_registers): Ditto.
14071 (linux_fetch_registers, linux_store_registers): Ditto.
14072 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14073 regcache. Adjust.
14074 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14075 Ditto.
14076 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14077 prototype to take a regcache.
14078 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14079 * remote-utils.c (convert_ascii_to_int, outreg)
14080 (prepare_resume_reply): Change prototype to take a regcache.
14081 Adjust.
14082 * target.h (struct target_ops) <fetch_registers, store_registers>:
14083 Change prototype to take a regcache.
14084 (fetch_inferior_registers, store_inferior_registers): Change
14085 prototype to take a regcache. Adjust.
14086 * proc-service.c (ps_lgetregs): Adjust.
14087 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14088 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14089 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14090 take a regcache. Adjust.
14091 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14092 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14093 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14094 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14095 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14096 (cris_cannot_fetch_register):
14097 (cris_breakpoint_at): Change prototype to take a regcache.
14098 Adjust.
14099 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14100 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14101 to take a regcache. Adjust.
14102 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14103 Adjust.
14104 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14105 take a regcache. Adjust.
14106 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14107 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14108 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14109 * linux-mips-low.c (mips_get_pc):
14110 (mips_set_pc): Change prototype to take a regcache. Adjust.
14111 (mips_reinsert_addr): Adjust.
14112 (mips_collect_register): Change prototype to take a regcache.
14113 Adjust.
14114 (mips_supply_register):
14115 (mips_collect_register_32bit, mips_supply_register_32bit)
14116 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14117 (mips_store_fpregset): Ditto.
14118 * linux-ppc-low.c (ppc_supply_ptrace_register)
14119 (ppc_supply_ptrace_register): Ditto.
14120 (parse_spufs_run): Adjust.
14121 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14122 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14123 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14124 take a regcache. Adjust.
14125 * linux-s390-low.c (s390_collect_ptrace_register)
14126 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14127 (s390_set_pc): Change prototype to take a regcache. Adjust.
14128 (s390_arch_setup): Adjust.
14129 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14130 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14131 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14132 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14133 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14134 regcache. Adjust.
14135 (sparc_breakpoint_at): Adjust.
14136 * linux-xtensa-low.c (xtensa_fill_gregset):
14137 (xtensa_store_gregset):
14138 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14139 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14140 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14141 prototype to take a regcache. Adjust.
14142 * win32-arm-low.c (arm_fetch_inferior_register)
14143 (arm_store_inferior_register): Change prototype to take a
14144 regcache. Adjust.
14145 * win32-i386-low.c (i386_fetch_inferior_register)
14146 (i386_store_inferior_register): Change prototype to take a
14147 regcache. Adjust.
14148 * win32-low.c (child_fetch_inferior_registers)
14149 (child_store_inferior_registers): Change prototype to take a
14150 regcache. Adjust.
14151 (win32_wait): Adjust.
14152 (win32_fetch_inferior_registers): Change prototype to take a
14153 regcache. Adjust.
14154 (win32_store_inferior_registers): Adjust.
14155 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14156 store_inferior_register>: Change prototype to take a regcache.
14157
14158 2010-01-20 Doug Evans <dje@google.com>
14159
14160 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14161 #ifdef.
14162 (linux_wait_for_event1, linux_init_signals): Ditto.
14163 (W_STOPCODE): Provide definition if missing.
14164
14165 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14166
14167 * linux-low.c (linux_core_of_thread): New.
14168 (compare_ints, show_process, list_threads): New.
14169 (linux_qxfer_osdata): Report threads and cores.
14170 (linux_target_op): Register linux_core_of_thread.
14171 * remote-utils.c (prepare_resume_reply): Report the core.
14172 (buffer_xml_printf): Support %d specifier.
14173 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14174 New.
14175 (handle_query): Handle qXfer:threads. Announce availability
14176 thereof.
14177 * target.h (struct target_ops): New field core_of_thread.
14178
14179 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14180
14181 * Makefile.in (clean): Remove new generated files.
14182 (reg-s390.o, reg-s390.c): Remove rules.
14183 (reg-s390x.o, reg-s390x.c): Likewise.
14184 (s390-linux32.o, s390-linux32.c): Add rules.
14185 (s390-linux64.o, s390-linux64.c): Likewise.
14186 (s390x-linux64.o, s390x-linux64.c): Likewise.
14187 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14188 * linux-s390-low.c: Include <elf.h>.
14189 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14190 (init_registers_s390): Remove prototype.
14191 (init_registers_s390x): Likewise.
14192 (init_registers_s390_linux32): Add prototype.
14193 (init_registers_s390_linux64): Likewise.
14194 (init_registers_s390x_linux64): Likewise.
14195 (s390_num_regs_3264): New define.
14196 (s390_regmap_3264): New global variable.
14197 (s390_cannot_fetch_register): Remove obsolete check.
14198 (s390_cannot_store_register): Likewise.
14199 (s390_collect_ptrace_register): Handle upper/lower register halves.
14200 (s390_supply_ptrace_register): Likewise.
14201 (s390_fill_gregset): Update to register number changes.
14202 (s390_get_hwcap): New routine.
14203 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14204 Install appropriate regmap and register set.
14205
14206 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14207
14208 * server.c (gdbserver_version): Update copyright year to 2010.
14209 * gdbreplay.c (gdbreplay_version): Likewise.
14210
14211 2009-12-28 Doug Evans <dje@google.com>
14212
14213 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14214 elf/external.h. Include <elf.h> instead but only if necessary.
14215
14216 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14217
14218 * linux-low.c (linux_remove_process): Remove `detaching'
14219 parameter. Don't release/detach from thread_db here.
14220 (linux_kill): Release/detach from thread_db here, ...
14221 (linux_detach): ... and here, before actually detaching.
14222 (linux_wait_1): ... and here, when a process exits.
14223 * thread-db.c (any_thread_of): New.
14224 (thread_db_free): Switch the current inferior to a thread of the
14225 passed in process.
14226
14227 2009-12-21 Doug Evans <dje@google.com>
14228
14229 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14230
14231 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14232 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14233 warning ifndef __NR_tkill. Move setting of errno there too.
14234 Delete unnecessary resetting of errno after syscall.
14235 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14236
14237 * configure.ac: Check for dladdr.
14238 * config.in: Regenerate.
14239 * configure: Regenerate.
14240 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14241 (try_thread_db_load): Update.
14242
14243 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14244
14245 2009-12-18 Doug Evans <dje@google.com>
14246
14247 * event-loop.c: Include unistd.h if it exists.
14248
14249 * linux-low.c (my_waitpid): Move definition away from being in
14250 between linux_tracefork_child/linux_test_for_tracefork.
14251
14252 * gdb_proc_service.h (psaddr_t): Fix type.
14253 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14254 signature to match glibc.
14255
14256 2009-12-16 Doug Evans <dje@google.com>
14257
14258 * linux-low.c (linux_read_memory): Fix argument to read.
14259
14260 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14261
14262 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14263 events, don't leave current_inferior pointing at null.
14264
14265 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14266
14267 * win32-low.c (LOG): Delete.
14268 (OUTMSG): Output to stderr.
14269 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14270 on compile time LOG macro.
14271 (win32_wait): Fix debug output.
14272
14273 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14274
14275 * win32-low.c (win32_add_one_solib): If the dll name is
14276 "ntdll.dll", prepend the system directory to the dll path.
14277
14278 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14279
14280 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14281
14282 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14283 Vladimir Prus <vladimir@codesourcery.com>
14284
14285 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14286 * configure.ac: Check for __mcoldfire__ and set
14287 gdb_cv_m68k_is_coldfire.
14288 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14289 reg-cf.o and reg-m68k.o.
14290 * configure: Regenerated.
14291
14292 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14293
14294 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14295 Pass it to thread_db_free.
14296 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14297 proper `detaching' argument to linux_remove_process.
14298 * linux-low.h (thread_db_free): Add `detaching' parameter.
14299 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14300 to thread_db_free.
14301 (thread_db_free): Add `detaching' parameter. Only
14302 call td_ta_clear_event if detaching from process.
14303
14304 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14305
14306 * thread-db.c (thread_db_free): Fix typo.
14307
14308 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14309
14310 PR gdb/10838
14311 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14312
14313 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14314
14315 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14316 with an i686 compiler.
14317 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14318 needed.
14319 * configure: Rebuilt.
14320
14321 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14322
14323 PR gdb/10783
14324
14325 * server.c (handle_search_memory_1): Correct read_addr initialization
14326 in loop for searching subsequent chunks.
14327
14328 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14329
14330 * configure.ac: New --with-libthread-db option.
14331 * thread-db.c: Allow direct dependence on libthread_db.
14332 (thread_db_free): Adjust.
14333 * config.in: Regenerate.
14334 * configure: Likewise.
14335
14336 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14337
14338 PR gdb/10757
14339 * thread-db.c (attach_thread): New function.
14340 (maybe_attach_thread): Return success/failure.
14341 (find_new_threads_callback): Adjust.
14342 (thread_db_find_new_threads): Loop until no new threads.
14343
14344 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14345
14346 * proc-service.c (ps_lgetregs): Formatting.
14347
14348 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14349
14350 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14351 * configure.ac: Adjust.
14352 * linux-low.h (struct process_info_private): Move members to struct
14353 thread_db.
14354 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14355 * linux-low.c (linux_remove_process): Adjust.
14356 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14357 * server.c (handle_query): Move code ...
14358 (handle_monitor_command): ... here. New function.
14359 * target.h (struct target_ops): New member.
14360 * thread-db.c (struct thread_db): New.
14361 (libthread_db_search_path): New variable.
14362 (thread_db_create_event, thread_db_enable_reporting)
14363 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14364 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14365 (try_thread_db_load_1, dladdr_to_soname): New functions.
14366 (try_thread_db_load, thread_db_load_search): New functions.
14367 (thread_db_init): Search for libthread_db.
14368 (thread_db_free): New function.
14369 (thread_db_handle_monitor_command): Likewise.
14370 * config.in: Regenerate.
14371 * configure: Regenerate.
14372
14373 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14374
14375 * spu-low.c (spu_kill): Wait for inferior to terminate.
14376 Call clear_inferiors.
14377 (spu_detach): Call clear_inferiors.
14378
14379 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14380
14381 * aclocal.m4: Regenerate.
14382 * config.in: Likewise.
14383 * configure: Likewise.
14384
14385 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14386
14387 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14388 (parse_spufs_run): New function.
14389 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14390 (ppc_breakpoint_at): Handle SPU breakpoints.
14391
14392 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14393
14394 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14395 (SPUFS_MAGIC): Define.
14396 (spu_enumerate_spu_ids): New function.
14397 (linux_qxfer_spu): New function.
14398 (linux_target_ops): Install linux_qxfer_spu.
14399
14400 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14401
14402 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14403 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14404 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14405 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14406 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14407 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14408 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14409 (init_registers_powerpc_cell32l): Add prototype.
14410 (init_registers_powerpc_cell64l): Likewise.
14411 (ppc_arch_setup): Detect Cell/B.E. architecture.
14412
14413 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14414
14415 * Makefile.in (datarootdir): New variable.
14416
14417 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * linux-low.c (linux_write_memory): Update debugging output.
14420 * Makefile.in (clean): Add new descriptions.
14421 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14422 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14423 * configure.srv: Add new files for arm*-*-linux*.
14424 * linux-arm-low.c: Add new declarations.
14425 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14426 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14427 (HWCAP_VFPv3D16): New.
14428 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14429 instead of __IWMMXT__.
14430 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14431 (arm_arch_setup): New.
14432 (target_regsets): Remove #ifdef. Add VFP regset.
14433 (the_low_target): Use arm_arch_setup.
14434
14435 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14436
14437 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14438 the main thread again.
14439
14440 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14441
14442 Adding Neutrino gdbserver.
14443 * configure: Regenerated.
14444 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14445 * configure.srv (i[34567]86-*-nto*): New target.
14446 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14447 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14448 (nto_comctrl) [__QNX__]: New function.
14449 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14450
14451 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14452
14453 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14454 srv_tgtobj.
14455
14456 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14457 Pedro Alves <pedro@codesourcery.com>
14458
14459 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14460 don't support CONTEXT_EXTENDED_REGISTERS.
14461 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14462 (the_low_target): Install them.
14463 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14464 failing with ERROR_PIPE_NOT_CONNECTED.
14465
14466 2009-06-30 Doug Evans <dje@google.com>
14467 Pierre Muller <muller@ics.u-strasbg.fr>
14468
14469 Add h/w watchpoint support to x86-linux, win32-i386.
14470 * Makefile.in (SFILES): Add i386-low.c
14471 (i386_low_h): Define.
14472 (i386-low.o): Add dependencies.
14473 (linux-x86-low.o): Add i386-low.h dependency.
14474 (win32-i386-low.o): Ditto.
14475 * i386-low.c: New file.
14476 * i386-low.h: New file.
14477 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14478 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14479 * linux-low.c (linux_add_process): Initialize arch_private.
14480 (linux_remove_process): Free arch_private.
14481 (add_lwp): Initialize arch_private.
14482 (delete_lwp): Free arch_private.
14483 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14484 provided.
14485 * linux-low.h (process_info_private): New member arch_private.
14486 (lwp_info): New member arch_private.
14487 (linux_target_ops): New members new_process, new_thread,
14488 prepare_to_resume.
14489 (ptid_of): New macro.
14490 * linux-x86-low.c: Include stddef.h, i386-low.h.
14491 (arch_process_info): New struct.
14492 (arch_lwp_info): New struct.
14493 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14494 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14495 (i386_dr_low_get_status): New function.
14496 (x86_insert_point, x86_remove_point): New functions.
14497 (x86_stopped_by_watchpoint): New function.
14498 (x86_stopped_data_address): New function.
14499 (x86_linux_new_process, x86_linux_new_thread): New functions.
14500 (x86_linux_prepare_to_resume): New function.
14501 (the_low_target): Add entries for insert_point, remove_point,
14502 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14503 prepare_to_resume.
14504 * server.c (debug_hw_points): New global.
14505 (monitor_show_help): Document set debug-hw-points.
14506 (handle_query): Process "set debug-hw-points".
14507 * server.h (debug_hw_points): Declare.
14508 (paddress): Declare.
14509 * utils.c (NUMCELLS, CELLSIZE): New macros.
14510 (get_sell, xsnprintf, paddress): New functions.
14511 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14512 remove_point, stopped_by_watchpoint, stopped_data_address.
14513 * win32-i386-low.c: Include i386-low.h.
14514 (debug_reg_state): Replaces dr.
14515 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14516 (i386_dr_low_get_status): New function.
14517 (i386_insert_point, i386_remove_point): New functions.
14518 (i386_stopped_by_watchpoint): New function.
14519 (i386_stopped_data_address): New function.
14520 (i386_initial_stuff): Update.
14521 (get_thread_context,set_thread_context,i386_thread_added): Update.
14522 (the_low_target): Add entries for insert_point,
14523 remove_point, stopped_by_watchpoint, stopped_data_address.
14524 * win32-low.c (win32_insert_watchpoint): New function.
14525 (win32_remove_watchpoint): New function.
14526 (win32_stopped_by_watchpoint): New function.
14527 (win32_stopped_data_address): New function.
14528 (win32_target_ops): Add entries for insert_watchpoint,
14529 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14530 * win32-low.h (win32_target_ops): New members insert_point,
14531 remove_point, stopped_by_watchpoint, stopped_data_address.
14532
14533 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14534
14535 * server.c (process_serial_event): Re-return unsupported, not
14536 error, if the type isn't recognized. Re-allow supporting only
14537 insert or remove packets. Also call require_running for
14538 breakpoints. Add missing break statement to default case. Tidy.
14539 * target.h (struct target_ops): Rename insert_watchpoint to
14540 insert_point, and remove_watchpoint to remove_point.
14541
14542 * linux-low.h (struct linux_target_ops): Likewise.
14543 * linux-low.c (linux_insert_watchpoint): Rename to ...
14544 (linux_insert_point): ... this. Adjust.
14545 (linux_remove_watchpoint): Rename to ...
14546 (linux_remove_point): ... this. Adjust.
14547 (linux_target_ops): Adjust.
14548 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14549 (cris_insert_point): ... this.
14550 (cris_remove_watchpoint): Rename to ...
14551 (cris_remove_point): ... this.
14552 (the_low_target): Adjust.
14553
14554 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14555
14556 * server.c (handle_v_kill): Pass signal_pid to
14557 kill_inferior if multi_process is zero.
14558
14559 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14560
14561 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14562 * target.h (target_ops): Comment for *_watchpoint to make it clear
14563 the functions can get types '0' and '1'.
14564
14565 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14566
14567 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14568 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14569 * regcache.c (get_regcache): Likewise.
14570 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14571 * win32-low.c (child_fetch_inferior_registers): Remove check for
14572 regno 0.
14573
14574 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14575 Pedro Alves <pedro@codesourcery.com>
14576
14577 * target.h (struct target_ops) <supports_multi_process>: New
14578 callback.
14579 (target_supports_multi_process): New.
14580 * server.c (handle_query): Even if GDB reports support, only
14581 enable multi-process if the target also supports it. Report
14582 multi-process support only if the target backend supports it.
14583 * linux-low.c (linux_supports_multi_process): New function.
14584 (linux_target_ops): Install it as target_supports_multi_process
14585 callback.
14586
14587 2009-05-24 Doug Evans <dje@google.com>
14588
14589 Global renaming of find_thread_pid to find_thread_ptid.
14590 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14591 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14592 All callers updated.
14593
14594 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14595 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14596 directly.
14597
14598 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14599 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14600 (linux_resume_one_lwp): Ditto.
14601
14602 2009-05-23 Doug Evans <dje@google.com>
14603
14604 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14605 from struct inferior_list_entry * to struct lwp_info *.
14606 All callers updated.
14607
14608 2009-05-13 Doug Evans <dje@google.com>
14609
14610 * linux-x86-low.c: Don't include assert.h.
14611 (x86_siginfo_fixup): Use fatal, not assert.
14612 (x86_arch_setup): Fix comment.
14613
14614 2009-05-12 Doug Evans <dje@google.com>
14615
14616 Biarch support for i386/amd64 gdbserver.
14617 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14618 Add linux-x86-low.c.
14619 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14620 (linux-x86-low.o): Add.
14621 * linux-x86-64-low.c: Delete.
14622 * linux-i386-low.c: Delete.
14623 * linux-x86-low.c: New file.
14624 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14625 linux-x86-low.o.
14626 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14627 linux-x86-low.o.
14628 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14629 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14630 (linux_child_pid_to_exec_file): New function.
14631 (elf_64_header_p, elf_64_file_p): New functions.
14632 (siginfo_fixup): New function.
14633 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14634 give target a chance to convert layout.
14635 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14636 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14637
14638 2009-05-07 Doug Evans <dje@google.com>
14639
14640 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14641 (regsets_store_inferior_registers): Ditto.
14642
14643 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14644
14645 PR server/10048
14646
14647 * linux-low.c (must_set_ptrace_flags): Delete.
14648 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14649 of the global.
14650 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14651 `lwp->must_set_ptrace_flags' instead.
14652 (linux_wait_for_event_1): Set ptrace options here.
14653 (linux_wait_1): ... not here.
14654
14655 2009-04-30 Doug Evans <dje@google.com>
14656
14657 * inferiors.c (started_inferior_callback): New function.
14658 (attached_inferior_callback): New function.
14659 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14660 * server.c (print_started_pid, print_attached_pid): New functions.
14661 (detach_or_kill_for_exit): New function.
14662 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14663 * server.h (have_started_inferiors_p): Declare.
14664 (have_attached_inferiors_p): Declare.
14665
14666 * inferiors.c (remove_process): Fix memory leak, free process.
14667 * linux-low.c (linux_remove_process): New function.
14668 (linux_kill): Call it instead of remove_process.
14669 (linux_detach, linux_wait_1): Ditto.
14670
14671 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14672
14673 * configure.srv: Add x86 Windows CE target.
14674
14675 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14676
14677 * inferiors.c (get_thread_process): Make global.
14678 * server.h (get_thread_process): Add prototype.
14679 * thread-db.c (find_one_thread): Use get_thread_process
14680 instead of current_process.
14681 (thread_db_get_tls_address): Do not crash if called when
14682 thread layer is not yet initialized.
14683
14684 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14685
14686 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14687 * spu-low.c (current_tid): Rename to ...
14688 (current_ptid): ... this.
14689 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14690 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14691 ptid_get_lwp (current_ptid) instead of current_tid.
14692 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14693 instead of current_tid. Use find_process_pid to verify pid
14694 argument is valid. Pass proper argument to remove_process.
14695 (spu_thread_alive): Compare current_ptid instead of current_tid.
14696 (spu_resume): Likewise.
14697
14698 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14699
14700 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14701 variable.
14702
14703 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14704
14705 Implement the multiprocess extensions, and add linux multiprocess
14706 support.
14707
14708 * server.h (ULONGEST): Declare.
14709 (struct ptid, ptid_t): New.
14710 (minus_one_ptid, null_ptid): Declare.
14711 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14712 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14713 (struct inferior_list_entry): Change `id' type from unsigned from
14714 to ptid_t.
14715 (struct sym_cache, struct breakpoint, struct
14716 process_info_private): Forward declare.
14717 (struct process_info): Declare.
14718 (current_process): Declare.
14719 (all_processes): Declare.
14720 (initialize_inferiors): Declare.
14721 (add_thread): Adjust to use ptid_t.
14722 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14723 (add_process, remove_process, find_thread_pid): Declare.
14724 (find_inferior_id): Adjust to use ptid_t.
14725 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14726 (multi_process): Declare.
14727 (push_event): Adjust to use ptid_t.
14728 (read_ptid, write_ptid): Declare.
14729 (prepare_resume_reply): Adjust to use ptid_t.
14730 (clear_symbol_cache): Declare.
14731 * inferiors.c (all_processes): New.
14732 (null_ptid, minus_one_ptid): New.
14733 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14734 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14735 (add_thread): Change unsigned long to ptid. Remove gdb_id
14736 parameter. Adjust.
14737 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14738 (gdb_id_to_thread): Rename to ...
14739 (find_thread_pid): ... this. Change unsigned long to ptid.
14740 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14741 (loaded_dll, pull_pid_from_list): Adjust.
14742 (add_process, remove_process, find_process_pid)
14743 (get_thread_process, current_process, initialize_inferiors): New.
14744 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14745 (struct target_waitstatus) <related_pid>: Ditto.
14746 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14747 return type to int.
14748 (struct target_ops) <join>: Add `pid' argument.
14749 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14750 (struct target_ops) <wait>: Add `ptid' field. Change return type
14751 to ptid.
14752 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14753 (mywait): Add `ptid' argument. Change return type to ptid_t.
14754 (target_pid_to_str): Declare.
14755 * target.c (set_desired_inferior): Adjust to use ptids.
14756 (mywait): Add new `ptid' argument. Adjust.
14757 (target_pid_to_str): New.
14758 * mem-break.h (free_all_breakpoints): Declare.
14759 * mem-break.c (breakpoints): Delelete.
14760 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14761 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14762 to use per-process breakpoint list.
14763 (free_all_breakpoints): New.
14764 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14765 (symbol_cache, all_symbols_looked_up): Delete.
14766 (hexchars): New.
14767 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14768 read_ptid): New.
14769 (prepare_resume_reply): Change ptid argument's type from unsigned
14770 long to ptid_t. Adjust. Implement W;process and X;process.
14771 (free_sym_cache, clear_symbol_cache): New.
14772 (look_up_one_symbol): Adjust to per-process symbol cache. *
14773 * server.c (cont_thread, general_thread, step_thread): Change type
14774 to ptid_t.
14775 (attached): Delete.
14776 (multi_process): New.
14777 (last_ptid): Change type to ptid_t.
14778 (struct vstop_notif) <ptid>: Change type to ptid_t.
14779 (queue_stop_reply, push_event): Change `ptid' argument's type to
14780 ptid_t.
14781 (discard_queued_stop_replies): Add `pid' argument.
14782 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14783 changes. Don't reference the `attached' global.
14784 (attach_inferior): Adjust to mywait interface changes.
14785 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14786 features. Handle and report "multiprocess+". Handle
14787 "qAttached:PID".
14788 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14789 changes.
14790 (handle_v_kill): New.
14791 (handle_v_stopped): Adjust to use target_pid_to_str.
14792 (handle_v_requests): Allow multiple attaches and runs when
14793 multiprocess extensions are in effect. Handle "vKill".
14794 (myresume): Adjust to use ptids.
14795 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14796 (handle_status): Adjust to discard_queued_stop_replies interface
14797 change.
14798 (first_thread_of, kill_inferior_callback)
14799 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14800 (main): Call initialize_inferiors. Adjust to use ptids, killing
14801 and detaching from all inferiors. Handle multiprocess packet
14802 variants.
14803 * linux-low.h: Include gdb_proc_service.h.
14804 (struct process_info_private): New.
14805 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14806 <lwpid_of>: Use ptid_get_lwp.
14807 (get_lwp_thread): Adjust.
14808 (struct lwp_info): Add `dead' member.
14809 (find_lwp_pid): Declare.
14810 * linux-low.c (thread_db_active): Delete.
14811 (new_inferior): Adjust comment.
14812 (inferior_pid): Delete.
14813 (linux_add_process): New.
14814 (handle_extended_wait): Adjust.
14815 (add_lwp): Change unsigned long to ptid.
14816 (linux_create_inferior): Add process to processes table. Adjust
14817 to use ptids. Don't set new_inferior here.
14818 (linux_attach_lwp): Rename to ...
14819 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14820 it. Adjust to use ptids.
14821 (linux_attach_lwp): New.
14822 (linux_attach): Add process to processes table. Don't set
14823 new_inferior here.
14824 (struct counter): New.
14825 (second_thread_of_pid_p, last_thread_of_process_p): New.
14826 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14827 multiple processes.
14828 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14829 processes. Remove process from process table.
14830 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14831 to multiple processes.
14832 (any_thread_of): New.
14833 (linux_detach): Add `pid' argument, and handle it. Remove process
14834 from processes table.
14835 (linux_join): Add `pid' argument. Handle it.
14836 (linux_thread_alive): Change unsighed long argument to ptid_t.
14837 Consider dead lwps as not being alive.
14838 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14839 threads we're not interested in.
14840 (same_lwp, find_lwp_pid): New.
14841 (linux_wait_for_lwp): Change `pid' argument's type from int to
14842 ptid_t. Adjust.
14843 (linux_wait_for_event): Rename to ...
14844 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14845 from int to ptid_t. Adjust.
14846 (linux_wait_for_event): New.
14847 (linux_wait_1): Add `ptid' argument. Change return type to
14848 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14849 that exit from the process table.
14850 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14851 Adjust.
14852 (mark_lwp_dead): New.
14853 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14854 stopping all threads, mark its main lwp as dead.
14855 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14856 ptids.
14857 (fetch_register, usr_store_inferior_registers)
14858 (regsets_fetch_inferior_registers)
14859 (regsets_store_inferior_registers, linux_read_memory)
14860 (linux_write_memory): Inline `inferior_pid'.
14861 (linux_look_up_symbols): Adjust to use per-process
14862 `thread_db_active'.
14863 (linux_request_interrupt): Adjust to use ptids.
14864 (linux_read_auxv): Inline `inferior_pid'.
14865 (initialize_low): Don't reference thread_db_active.
14866 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14867 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14868 (ps_getpid): Return the pid of the current inferior.
14869 * thread-db.c (proc_handle, thread_agent): Delete.
14870 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14871 per-process data.
14872 (find_one_thread): Change argument type to ptid_t. Adjust to
14873 per-process data.
14874 (maybe_attach_thread): Adjust to per-process data and ptids.
14875 (thread_db_find_new_threads): Ditto.
14876 (thread_db_init): Ditto.
14877 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14878 processes table. Adjust to use ptids.
14879 (spu_kill, spu_detach): Adjust interface. Remove process from
14880 processes table.
14881 (spu_join, spu_thread_alive): Adjust interface.
14882 (spu_wait): Adjust interface. Remove process from processes
14883 table. Adjust to use ptids.
14884 * win32-low.c (current_inferior_tid): Delete.
14885 (current_inferior_ptid): New.
14886 (debug_event_ptid): New.
14887 (thread_rec): Take a ptid. Adjust.
14888 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14889 (child_delete_thread): Ditto.
14890 (do_initial_child_stuff): Add `attached' argument. Add process to
14891 processes table.
14892 (child_fetch_inferior_registers, child_store_inferior_registers):
14893 Adjust.
14894 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14895 (win32_attach): Pass 1 to do_initial_child_stuff.
14896 (win32_kill): Adjust interface. Remove process from processes
14897 table.
14898 (win32_detach): Ditto.
14899 (win32_join): Adjust interface.
14900 (win32_thread_alive): Take a ptid.
14901 (win32_resume): Adjust to use ptids.
14902 (get_child_debug_event): Ditto.
14903 (win32_wait): Adjust interface. Remove exiting process from
14904 processes table.
14905
14906 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14907
14908 Non-stop mode support.
14909
14910 * server.h (non_stop): Declare.
14911 (gdb_client_data, handler_func): Declare.
14912 (delete_file_handler, add_file_handler, start_event_loop):
14913 Declare.
14914 (handle_serial_event, handle_target_event, push_event)
14915 (putpkt_notif): Declare.
14916 * target.h (enum resume_kind): New.
14917 (struct thread_resume): Replace `step' field by `kind' field.
14918 (TARGET_WNOHANG): Define.
14919 (struct target_ops) <wait>: Add `options' argument.
14920 <supports_non_stop, async, start_non_stop>: New fields.
14921 (target_supports_non_stop, target_async): New.
14922 (start_non_stop): Declare.
14923 (mywait): Add `options' argument.
14924 * target.c (mywait): Add `options' argument. Print child exit
14925 notifications here.
14926 (start_non_stop): New.
14927 * server.c (non_stop, own_buf, mem_buf): New globals.
14928 (struct vstop_notif): New.
14929 (notif_queue): New global.
14930 (queue_stop_reply, push_event, discard_queued_stop_replies)
14931 (send_next_stop_reply): New.
14932 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14933 interface changes.
14934 (attach_inferior): In non-stop mode, don't wait for the target
14935 here.
14936 (handle_general_set): Handle QNonStop.
14937 (handle_query): When handling qC, return the current general
14938 thread, instead of the first thread of the list.
14939 (handle_query): If the backend supports non-stop mode, include
14940 QNonStop+ in the qSupported query response.
14941 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14942 and non-stop mode.
14943 (handle_v_attach, handle_v_run): Handle non-stop mode.
14944 (handle_v_stopped): New.
14945 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14946 (myresume): Adjust to use resume_kind. Handle non-stop.
14947 (queue_stop_reply_callback): New.
14948 (handle_status): Handle non-stop mode.
14949 (main): Clear non_stop flag on reconnection. Use the event-loop.
14950 Refactor serial protocol handling from here ...
14951 (process_serial_event): ... to this new function. When GDB
14952 selects any thread, select one here. In non-stop mode, wait until
14953 GDB acks all pending events before exiting.
14954 (handle_serial_event, handle_target_event): New.
14955 * remote-utils.c (remote_open): Install remote_desc in the event
14956 loop.
14957 (remote_close): Remove remote_desc from the event loop.
14958 (putpkt_binary): Rename to...
14959 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14960 (putpkt_binary): New as wrapper around putpkt_binary_1.
14961 (putpkt_notif): New.
14962 (prepare_resume_reply): In non-stop mode, don't change the
14963 general_thread.
14964 * event-loop.c: New.
14965 * Makefile.in (OBJ): Add event-loop.o.
14966 (event-loop.o): New rule.
14967
14968 * linux-low.h (pid_of): Moved here.
14969 (lwpid_of): New.
14970 (get_lwp_thread): Use lwpid_of.
14971 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14972 * linux-low.c (pid_of): Delete.
14973 (inferior_pid): Use lwpid_of.
14974 (linux_event_pipe): New.
14975 (target_is_async_p): New.
14976 (delete_lwp): New.
14977 (handle_extended_wait): Use lwpid_of.
14978 (add_lwp): Don't set lwpid field.
14979 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14980 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14981 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14982 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14983 first. Adjust to linux_wait_for_event interface changes. Use
14984 lwpid_of.
14985 (linux_detach): Don't delete the main lwp here.
14986 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14987 (status_pending_p): Don't consider explicitly suspended lwps.
14988 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14989 pointer. Add OPTIONS argument. Change return type to int. Use
14990 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14991 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14992 pointer. Add status pointer argument. Return a pid instead of a
14993 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14994 changes. In non-stop mode, don't switch to a random thread.
14995 (linux_wait): Rename to...
14996 (linux_wait_1): ... this. Add target_options argument, and handle
14997 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14998 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14999 clean exit and signal exit code. Don't stop all threads in
15000 non-stop mode. In all-stop mode, only stop all threads when
15001 reporting a stop to GDB. Handle explicit thread stop requests.
15002 (async_file_flush, async_file_mark): New.
15003 (linux_wait): New.
15004 (send_sigstop): Use lwpid_of.
15005 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15006 interface changes. In non-stop mode, don't switch to a random
15007 thread.
15008 (linux_resume_one_lwp): Use lwpid_of.
15009 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15010 (linux_resume_one_thread): ... this. Handle resume_stop. In
15011 non-stop mode, don't look for pending flag in all threads.
15012 (resume_status_pending_p): Don't consider explicitly suspended
15013 threads.
15014 (my_waitpid): Reimplement. Emulate __WALL.
15015 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15016 Use lwpid_of.
15017 (sigchld_handler, linux_supports_non_stop, linux_async)
15018 (linux_start_non_stop): New.
15019 (linux_target_ops): Register linux_supports_non_stop, linux_async
15020 and linux_start_non_stop.
15021 (initialize_low): Install SIGCHLD handler.
15022 * thread-db.c (thread_db_create_event, find_one_thread)
15023 (thread_db_get_tls_address): Use lwpid_of.
15024 * win32-low.c (win32_detach): Adjust to use resume_kind.
15025 (win32_wait): Add `options' argument.
15026 * spu-low.c (spu_resume): Adjust to use resume_kind.
15027 (spu_wait): Add `options' argument.
15028
15029 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15030
15031 Decouple target code from remote protocol.
15032
15033 * target.h (enum target_waitkind): New.
15034 (struct target_waitstatus): New.
15035 (struct target_ops) <wait>: Return an unsigned long. Take a
15036 target_waitstatus pointer instead of a char pointer.
15037 (mywait): Likewise.
15038 * target.c (mywait): Change prototype to return an unsigned long.
15039 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15040 * server.h (thread_from_wait, old_thread_from_wait): Delete
15041 declarations.
15042 (prepare_resume_reply): Change prototype to take a
15043 target_waitstatus.
15044 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15045 (last_status, last_ptid): New.
15046 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15047 pid instead of a signal.
15048 (attach_inferior): Remove "status" and "signal" parameters.
15049 Adjust.
15050 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15051 not as an address.
15052 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15053 (handle_v_requests, myresume): Remove "status" and "signal"
15054 parameters. Adjust.
15055 (handle_status): New.
15056 (main): Delete local `status'. Adjust.
15057 * remote-utils.c: Include target.h.
15058 (prepare_resume_reply): Change prototype to take a
15059 target_waitstatus. Adjust.
15060
15061 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15062 interface.
15063 * spu-low.c (spu_wait): Adjust.
15064 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15065 Delete.
15066 (win32_wait): Adjust.
15067
15068 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15069
15070 * target.h (struct thread_resume): Delete leave_stopped member.
15071 (struct target_ops): Add a `n' argument to the `resume' callback.
15072 * server.c (start_inferior): Adjust.
15073 (handle_v_cont, myresume): Adjust.
15074 * linux-low.c (check_removed_breakpoint): Adjust to resume
15075 interface change, and to removed leave_stopped field.
15076 (resume_ptr): Delete.
15077 (struct thread_resume_array): New.
15078 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15079 resume interface change.
15080 (linux_continue_one_thread, linux_queue_one_thread)
15081 (resume_status_pending_p): Check if the resume field is NULL
15082 instead of checking the leave_stopped member.
15083 (linux_resume): Adjust to the target resume interface change.
15084 * spu-low.c (spu_resume): Adjust to the target resume interface
15085 change.
15086 * win32-low.c (win32_detach, win32_resume): Ditto.
15087
15088 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15089
15090 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15091 flag.
15092 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15093 pending.
15094 (linux_continue_one_thread): Only preserve the stepping flag if
15095 there's a pending breakpoint.
15096
15097 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15098
15099 * server.c (main): After the inferior having exited, call
15100 remote_close before exiting gdbserver.
15101
15102 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15103
15104 Fix size of FPSCR in Power 7 processors.
15105 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15106 (PPC_FEATURE_HAS_DFP): New #define.
15107 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15108 size of the FPSCR.
15109
15110 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15111
15112 * server.c (handle_query) Whitespace and formatting.
15113
15114 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15115
15116 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15117 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15118 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15119 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15120 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15121 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15122 Makefile.in, configure.ac: Fix whitespace throughout.
15123 * configure: Regenerate.
15124
15125 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15126
15127 * inferiors.c (find_inferior): Make it safe for the callback
15128 function to delete the currently iterated inferior.
15129
15130 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15131
15132 * Makefile.in (linuw_low_h): Move higher.
15133 (thread-db.o): Depend on $(linux_low_h).
15134
15135 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15136
15137 Rename "process" to "lwp" throughout.
15138
15139 * linux-low.c (all_processes): Rename to...
15140 (all_lwps): ... this.
15141 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15142 (add_process): Rename to ...
15143 (add_lwp): ... this. Adjust.
15144 (linux_create_inferior): Adjust.
15145 (linux_attach_lwp): Adjust.
15146 (linux_attach): Adjust.
15147 (linux_kill_one_process): Rename to ...
15148 (linux_kill_one_lwp): ... this. Adjust.
15149 (linux_kill): Adjust.
15150 (linux_detach_one_process): Rename to ...
15151 (linux_detach_one_lwp): ... this. Adjust.
15152 (linux_detach): Adjust.
15153 (check_removed_breakpoint): Adjust.
15154 (status_pending_p): Adjust.
15155 (linux_wait_for_process): Rename to ...
15156 (linux_wait_for_lwp): ... this. Adjust.
15157 (linux_wait_for_event): Adjust.
15158 (send_sigstop): Adjust.
15159 (wait_for_sigstop): Adjust.
15160 (stop_all_processes): Rename to ...
15161 (stop_all_lwps): ... this.
15162 (linux_resume_one_process): Rename to ...
15163 (linux_resume_one_lwp): ... this. Adjust.
15164 (linux_set_resume_request, linux_continue_one_thread)
15165 (linux_queue_one_thread, resume_status_pending_p)
15166 (usr_store_inferior_registers, regsets_store_inferior_registers)
15167 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15168 Adjust.
15169 * linux-low.h (get_process): Rename to ...
15170 (get_lwp): ... this. Adjust.
15171 (get_thread_process): Rename to ...
15172 (get_thread_lwp): ... this. Adjust.
15173 (get_process_thread): Rename to ...
15174 (get_lwp_thread): ... this. Adjust.
15175 (struct process_info): Rename to ...
15176 (struct lwp_info): ... this.
15177 (all_processes): Rename to ...
15178 (all_lwps): ... this.
15179 * proc-service.c (ps_lgetregs): Adjust.
15180 * thread-db.c (thread_db_create_event, find_one_thread)
15181 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15182
15183 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15184
15185 * server.c (handle_query): Handle "qAttached".
15186
15187 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15188
15189 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15190 GPLv3, update license URL.
15191
15192 2009-03-01 Doug Evans <dje@google.com>
15193
15194 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15195 (server_h): Add gdb_signals.h.
15196 (signals.o): Update.
15197 * server.h (target_signal_from_host,target_signal_to_host_p)
15198 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15199
15200 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15201
15202 * remote-utils.c (getpkt): Also generate remote-debug
15203 information if noack_mode is set.
15204
15205 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15206
15207 * server.c (handle_query): Report qXfer:siginfo:read and
15208 qXfer:siginfo:write as supported and handle them.
15209 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15210 * linux-low.c (linux_xfer_siginfo): New.
15211 (linux_target_ops): Set it.
15212
15213 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15214
15215 * server.c (gdbserver_usage): Mention --remote-debug.
15216 (main): Accept '--remote-debug' switch.
15217
15218 2009-01-18 Doug Evans <dje@google.com>
15219
15220 * regcache.c (new_register_cache): No need to check result of xcalloc.
15221 * server.c (handle_search_memory): Back out calls to xmalloc,
15222 result is checked and error is returned to user upon failure.
15223 (handle_query): Ditto. Add more checks for result of malloc.
15224 (handle_v_cont): Check result of malloc, report error back to
15225 user upon failure.
15226 (handle_v_run): Ditto. Call freeargv.
15227 * server.h (freeargv): Declare.
15228 * utils.c (freeargv): New fn.
15229
15230 2009-01-15 Doug Evans <dje@google.com>
15231
15232 * gdbreplay.c (perror_with_name): Make arg const char *.
15233 * server.h (target_signal_to_name): Make return type const char *.
15234 * thread-db.c (thread_db_err_str): Make return type const char *.
15235 * utils.c (perror_with_name): Make arg const char *.
15236
15237 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15238
15239 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15240 when handling a EXIT_PROCESS_DEBUG_EVENT.
15241
15242 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15243
15244 * gdbreplay.c (gdbreplay_version): Update copyright year.
15245 * server.c (gdbserver_version): Likewise.
15246
15247 2009-01-05 Doug Evans <dje@google.com>
15248
15249 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15250 (handle_extended_wait): Improve comment.
15251
15252 2008-12-13 Doug Evans <dje@google.com>
15253
15254 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15255 * server.h (ATTR_MALLOC): New macro.
15256 (xmalloc,xcalloc,xstrdup): Declare.
15257 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15258 * inferiors.c: Ditto.
15259 * linux-low.c: Ditto.
15260 * mem-break.c: Ditto.
15261 * regcache.c: Ditto.
15262 * remote-utils.c: Ditto.
15263 * server.c: Ditto.
15264 * target.c: Ditto.
15265 * win32-low.c: Ditto.
15266
15267 2008-12-12 Doug Evans <dje@google.com>
15268
15269 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15270 in debugging printf.
15271
15272 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15273
15274 2008-12-09 Doug Evans <dje@google.com>
15275
15276 * linux-low.h (struct process_info): Delete member tid, unused.
15277 * thread-db.c (find_one_thread): Update.
15278 (maybe_attach_thread): Update.
15279
15280 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15281
15282 * target.h (struct target_ops): Add qxfer_osdata member.
15283 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15284 and dirent.h.
15285 (linux_qxfer_osdata): New functions.
15286 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15287 callback.
15288 * server.c (handle_query): Handle "qXfer:osdata:read:".
15289 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15290 (buffer_xml_printf): New functions.
15291 * server.h (struct buffer): New.
15292 (buffer_grow_str, buffer_grow_str0): New macros.
15293 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15294 (buffer_xml_printf): Declare.
15295
15296 2008-11-24 Doug Evans <dje@google.com>
15297
15298 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15299
15300 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15301
15302 * server.c (handle_v_run): Always use the supplied argument list.
15303
15304 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15305
15306 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15307 (xtensa_regmap_table): Add entry for scompare1.
15308
15309 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15310
15311 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15312 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15313 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15314 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15315 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15316 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15317 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15318 XML target descriptions.
15319 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15320 when inferior is running on an ISA 2.05 or later processor. Add
15321 special case to return offset for full 64-bit slot of FPSCR when
15322 in 32-bits.
15323
15324 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15325
15326 * Makefile.in (SFILES, clean): Added sparc64 files.
15327 (reg-sparc64.o, reg-sparc64.c): New.
15328 * configure.srv (sparc*-*-linux*): New configuration.
15329 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15330 syscall arguments for SPARC.
15331 (regsets_store_inferior_registers): Likewise.
15332 * linux-sparc-low.c: New file.
15333
15334 2008-10-21 Doug Evans <dje@google.com>
15335
15336 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15337 (READLINE_DIR,READLINE_DEP): Delete.
15338 (INTERNAL_CFLAGS): Update.
15339 (LINTFLAGS): Update.
15340
15341 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15342
15343 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15344 whole argv from the last run, not just argv[0].
15345
15346 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15347
15348 * regcache.c (new_register_cache): Return NULL if the register
15349 cache size isn't known yet.
15350 (free_register_cache): Avoid dereferencing a NULL regcache.
15351
15352 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15353
15354 * configure.srv: Merge MIPS and MIPS64.
15355
15356 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15357
15358 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15359
15360 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15361
15362 * Makefile.in: Add required vsx dependencies.
15363
15364 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15365 Declare init_registers_powerpc_vsx32l.
15366 Declare init_registers_powerpc_vsx64l.
15367 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15368 (ppc_arch_setup): Check for VSX in hwcap.
15369 (ppc_fill_vsxregset): New function.
15370 (ppc_store_vsxregset): New function.
15371 Add new VSX entry in regset_info target_regsets.
15372
15373 * configure.srv: Add new VSX dependencies.
15374
15375 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15376
15377 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15378 (remote_open): Set or clear transport_is_reliable.
15379 (putpkt_binary): Don't expect acks in noack mode.
15380 (getpkt): Don't send ack/nac in noack mode.
15381 * server.c (handle_general_set): Handle QStartNoAckMode.
15382 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15383 qSupported.
15384 (main): Reset noack_mode on every connection.
15385 * server.h (noack_mode): Declare.
15386
15387 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15388
15389 * Makefile.in (GDBREPLAY_OBS): New variable.
15390 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15391
15392 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15393 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15396 (usr_store_inferior_registers): Likewise.
15397 (regsets_store_inferior_registers): Likewise.
15398
15399 2008-07-31 Rolf Jansen <rj@surtec.com>
15400 Pedro Alves <pedro@codesourcery.com>
15401
15402 * configure.ac: Check for memmem declaration.
15403 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15404 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15405 (disable_packet_qfThreadInfo): Unconditionally compile.
15406 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15407 * configure, config.in: Regenerate.
15408
15409 2008-07-28 Doug Kwan <dougkwan@google.com>
15410
15411 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15412 (linux_write_memory): Remove declaration of errno.
15413
15414 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15415
15416 * linux-low.c (handle_extended_wait): Do not use "status"
15417 variable uninitialized.
15418
15419 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15420
15421 * server.c (handle_v_attach): Inhibit reporting dll changes.
15422
15423 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15424
15425 * remote-utils.c (prepare_resume_reply): If requested, don't
15426 output "thread:TID" in the T stop reply.
15427
15428 * server.c (disable_packet_vCont, disable_packet_Tthread)
15429 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15430 (handle_query): If requested, disable support for qC, qfThreadInfo
15431 and qsThreadInfo.
15432 (handle_v_requests): If requested, disable support for vCont.
15433 (gdbserver_show_disableable): New.
15434 (main): Handle --disable-packet and --disable-packet=LIST.
15435
15436 * server.h (disable_packet_vCont, disable_packet_Tthread)
15437 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15438
15439 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15440
15441 * server.c (gdbserver_usage): Mention --version.
15442
15443 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15444
15445 * Makefile.in (gdbreplay.o): New rule.
15446
15447 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15448
15449 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15450 message, not gdbserver.
15451
15452 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15453 Nathan Sidwell <nathan@codesourcery.com>
15454 Joseph Myers <joseph@codesourcery.com>
15455
15456 * acinclude.m4: Include ../../config/acx.m4.
15457 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15458 * configure, config.in: Regenerate.
15459 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15460 * server.c (gdbserver_version): Print PKGVERSION.
15461 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15462 (main): Adjust gdbserver_usage calls.
15463 * gdbreplay.c (version, host_name): Add declarations.
15464 (gdbreplay_version, gdbreplay_usage): New.
15465 (main): Accept --version and --help options.
15466
15467 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15468
15469 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15470 (arm_breakpoint_at): Handle Thumb.
15471 (the_low_target): Add comment.
15472
15473 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15474
15475 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15476
15477 2008-05-09 Doug Evans <dje@google.com>
15478
15479 * server.h (decode_search_memory_packet): Declare.
15480 * remote-utils.c (decode_search_memory_packet): New fn.
15481 * server.c (handle_search_memory_1): New fn.
15482 (handle_search_memory): New fn.
15483 (handle_query): Process qSearch:memory packets.
15484
15485 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15486
15487 * regcache.c (registers_length): Remove.
15488 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15489 full register packet.
15490 * regcache.h (registers_length): Remove prototype.
15491 * server.h (PBUFSIZ): Define to 16384.
15492
15493 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15494
15495 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15496 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15497 powerpc-64l.o, and powerpc-altivec64l.o.
15498 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15499 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15500 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15501 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15502 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15503 to srv_xmlfiles.
15504
15505 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15506 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15507 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15508 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15509 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15510 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15511 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15512 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15513 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15514 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15515 (clean): Update.
15516
15517 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15518 (init_registers_powerpc_32l): ... this new prototype.
15519 (init_registers_powerpc_32): Remove, replace by ...
15520 (init_registers_powerpc_altivec32l): ... this new prototype.
15521 (init_registers_powerpc_e500): Remove, replace by ...
15522 (init_registers_powerpc_e500l): ... this new prototype.
15523 (init_registers_ppc64): Remove, replace by ...
15524 (init_registers_powerpc_64l): ... this new prototype.
15525 (init_registers_powerpc_64): Remove, replace by ...
15526 (init_registers_powerpc_altivec64l): ... this new prototype.
15527 (ppc_num_regs): Set to 73.
15528 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15529 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15530 (ppc_cannot_store_register): Handle orig_r3 and trap.
15531 (ppc_arch_setup): Update init_registers_... calls.
15532 (ppc_fill_gregset): Handle orig_r3 and trap.
15533
15534 * inferiors.c (clear_inferiors): Reset current_inferior.
15535
15536 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15537
15538 * acinclude.m4: Add override.m4.
15539 * configure: Regenerate.
15540
15541 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15542
15543 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15544 initial call to init_register_ppc64.
15545
15546 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15547
15548 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15549 single powerpc*-*-linux* case.
15550 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15551
15552 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15553
15554 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15555 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15556 from reg_xmlfiles.
15557 * linux-ppc-low.c: Include <elf.h>.
15558 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15559 (ppc_hwcap): New global variable.
15560 (ppc_regmap): Remove __SPE__ #ifdef sections.
15561 (ppc_regmap_e500): New global variable.
15562 (ppc_cannot_store_register): Update __SPE__ special case.
15563 (ppc_get_hwcap): New function.
15564 (ppc_arch_setup): Use it to determine whether inferior supports
15565 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15566 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15567 Do not access registers if target does not support AltiVec.
15568 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15569 Do not access registers if target does not support SPE.
15570 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15571
15572 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15573
15574 * linux-low.c (disabled_regsets, num_regsets): New.
15575 (use_regsets_p): Delete.
15576 (linux_wait_for_process): Clear disabled_regsets.
15577 (regsets_fetch_inferior_registers): Check and set it.
15578 (regsets_store_inferior_registers): Likewise.
15579 (linux_fetch_registers, linux_store_registers): Do not use
15580 use_regsets_p.
15581 (initialize_low): Allocate disabled_regsets.
15582
15583 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * Makefile.in (LIBOBJS): New.
15586 (OBS): Use LIBOBJS.
15587 (memmem.o): New rule.
15588 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15589 * configure: Regenerated.
15590
15591 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15592
15593 * server.c (handle_query): Never return "unsupported" for
15594 qXfer:features:read queries.
15595
15596 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * server.c (get_features_xml): Fix inverted condition.
15599 (handle_query): Always support qXfer:feature:read.
15600
15601 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15602
15603 * server.c (wrapper_argv): New.
15604 (start_inferior): Handle wrapper_argv. If set, expect an extra
15605 trap.
15606 (gdbserver_usage): Document --wrapper.
15607 (main): Parse --wrapper.
15608
15609 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15610
15611 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15612 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15613 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15614 (ppc_set_pc): Likewise.
15615 (ppc_arch_setup): New function.
15616 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15617 of collect_register.
15618 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15619
15620 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15621
15622 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15623 instead of linux-ppc64-low.o.
15624 * linux-ppc64-low.c: Remove file.
15625 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15626 (linux-ppc64-low.o): Remove rule.
15627
15628 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15629 (init_registers_powerpc_64): Likewise.
15630 (ppc_regmap): Conditionally define depending on __powerpc64__.
15631 (ppc_cannot_store_register): Do not special-case "fpscr" when
15632 compiled on __powerpc64__.
15633 (ppc_collect_ptrace_register): New function.
15634 (ppc_supply_ptrace_register): New function.
15635 (ppc_breakpoint): Change type to "unsigned int".
15636 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15637 (the_low_target): Conditionally provide initializers for the
15638 arch_setup member depending on __powerpc64__. Install
15639 collect_ptrace_register and supply_ptrace_register members.
15640
15641 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15642
15643 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15644 * server.c (gdbserver_xmltarget): Define.
15645 (get_features_xml): Use it to replace "target.xml" and arch_string.
15646
15647 * configure.srv: Remove srv_xmltarget. Add XML files that were
15648 mentioned there to srv_xmlfiles instead. Remove conditional tests
15649 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15650 srv_xmlfiles and srv_regobj to include all possible choices.
15651 * configure.ac (srv_xmltarget): Remove.
15652 (srv_xmlfiles): Do not add "target.xml".
15653 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15654 checks for supplementary target information.
15655 * configure: Regenerate.
15656 * Makefile.in (XML_TARGET): Remove.
15657 (target.xml): Remove rule.
15658 (clean): Do not clean up target.xml.
15659 (.PRECIOUS): Do not mention target.xml.
15660
15661 * target.h (struct target_ops): Remove arch_string member.
15662 * linux-low.c (linux_arch_string): Remove.
15663 (linux_target_ops): Remove arch_string initializer.
15664 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15665 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15666 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15667 * spu-low.c (spu_arch_string): Remove.
15668 (spu_target_ops): Remove arch_string initializer.
15669 * win32-low.c (win32_arch_string): Remove.
15670 (win32_target_ops): Remove arch_string initializer.
15671 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15672 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15673 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15674
15675 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15676
15677 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15678 by collect_ptrace_register and supply_ptrace_register hooks.
15679 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15680 instead of checking for the_low_target.left_pad_xfer.
15681 (usr_store_inferior_registers): Use collect_ptrace_register callback
15682 instead of checking for the_low_target.left_pad_xfer.
15683
15684 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15685 (s390_supply_ptrace_register): Likewise.
15686 (s390_fill_gregset): Call s390_collect_ptrace_register.
15687 (the_low_target): Update.
15688
15689 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15690 (ppc_supply_ptrace_register): Likewise.
15691 (the_low_target): Update.
15692
15693 * linux-i386-low.c (the_low_target): Update.
15694 * linux-x86-64-low.c (the_low_target): Update.
15695
15696 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15697
15698 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15699 reg-s390.o and reg-s390x.o.
15700
15701 * linux-low.c (new_inferior): New global variable.
15702 (linux_create_inferior, linux_attach): Set it.
15703 (linux_wait_for_process): Call the_low_target.arch_setup after the
15704 target has stopped for the first time.
15705 (initialize_low): Do not call the_low_target.arch_setup.
15706
15707 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15708 (s390_set_pc): Likewise.
15709 (s390_arch_setup): New function.
15710 (the_low_target): Use s390_arch_setup as arch_setup routine.
15711
15712 * regcache.c (realloc_register_cache): New function.
15713 (set_register_cache): Call it for each existing regcache.
15714
15715 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15716
15717 * server.h (init_registers): Remove prototype.
15718
15719 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15720 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15721 instead of init_registers ().
15722 * linux-arm-low.c (init_registers_arm): Add prototype.
15723 (init_registers_arm_with_iwmmxt): Likewise.
15724 (the_low_target): Add initializer for arch_setup field.
15725 * linux-cris-low.c (init_registers_cris): Add prototype.
15726 (the_low_target): Add initializer for arch_setup field.
15727 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15728 (the_low_target): Add initializer for arch_setup field.
15729 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15730 (the_low_target): Add initializer for arch_setup field.
15731 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15732 (the_low_target): Add initializer for arch_setup field.
15733 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15734 (the_low_target): Add initializer for arch_setup field.
15735 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15736 (the_low_target): Add initializer for arch_setup field.
15737 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15738 (init_registers_mips64_linux): Likewise.
15739 (the_low_target): Add initializer for arch_setup field.
15740 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15741 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15742 (the_low_target): Add initializer for arch_setup field.
15743 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15744 (init_registers_powerpc_64): Likewise.
15745 (the_low_target): Add initializer for arch_setup field.
15746 * linux-s390-low.c (init_registers_s390): Add prototype.
15747 (init_registers_s390x): Likewise.
15748 (the_low_target): Add initializer for arch_setup field.
15749 * linux-sh-low.c (init_registers_sh): Add prototype.
15750 (the_low_target): Add initializer for arch_setup field.
15751 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15752 (the_low_target): Add initializer for arch_setup field.
15753 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15754 (the_low_target): Add initializer for arch_setup field.
15755
15756 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15757 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15758 instead of init_registers ().
15759 * win32-arm-low.c (init_registers_arm): Add prototype.
15760 (the_low_target): Add initializer for arch_setup field.
15761 * win32-i386-low.c (init_registers_i386): Add prototype.
15762 (the_low_target): Add initializer for arch_setup field.
15763
15764 * spu-low.c (init_registers_spu): Add prototype.
15765 (initialize_low): Call initialie_registers_spu () instead of
15766 initialize_registers ().
15767
15768 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15769
15770 * server.c (handle_v_requests): When handling the vRun and vAttach
15771 packets, if already debugging a process, don't kill it. Return an
15772 error instead.
15773
15774 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15775
15776 * server.c (handle_query): Correct length check.
15777
15778 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15779
15780 * win32-low.c (do_initial_child_stuff): Add process handle
15781 parameter. Set current_process_handle and current_process_id from the
15782 parameters. Clear globals.
15783 (win32_create_inferior): Don't set current_process_handle and
15784 current_process_id here. Instead pass them on the call to
15785 do_initial_child_stuff.
15786 (win32_attach): Likewise.
15787 (win32_clear_inferiors): New.
15788 (win32_kill): Don't close the current process handle or the
15789 current thread handle here. Instead call win32_clear_inferiors.
15790 (win32_detach): Don't open a new handle to the process. Call
15791 win32_clear_inferiors.
15792 (win32_join): Don't rely on current_process_handle; open a new
15793 handle using the process id.
15794 (win32_wait): Call win32_clear_inferiors when the inferior process
15795 has exited.
15796
15797 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15798
15799 * server.c (monitor_show_help): Add "exit".
15800
15801 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15802
15803 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15804 (clean): Add reg-xtensa.c.
15805 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15806 * configure.srv (xtensa*-*-linux*) New target.
15807 * linux-xtensa-low.c: New.
15808 * xtensa-xtregs.c: New.
15809
15810 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15811
15812 * hostio.c: Don't include errno.h.
15813 (errno_to_fileio_errno): Move to hostio-errno.
15814 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15815 error number outputting to the target->hostio_last_error callback.
15816 (hostio_packet_error): Use FILEIO_EINVAL directly.
15817 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15818 calls to hostio_error.
15819 * hostio-errno.c: New.
15820 * server.h (hostio_last_error_from_errno): Declare.
15821 * target.h (target_ops): Add hostio_last_error member.
15822 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15823 as hostio_last_error handler.
15824 * spu-low.c (spu_target_ops): Likewise.
15825 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15826 (wince_hostio_last_error): New functions.
15827 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15828 as hostio_last_error handler.
15829 (win32_target_ops) [!_WIN32_WCE]: Register
15830 hostio_last_error_from_errno as hostio_last_error handler.
15831 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15832 (hostio-errno.o): New rule.
15833 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15834 * configure.srv (srv_hostio_err_objs): New variable. Default to
15835 hostio-errno.o.
15836 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15837 * configure: Regenerate.
15838
15839 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15840
15841 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15842 (linux_kill, linux_detach): Clean up the process list.
15843 * remote-utils.c (remote_open): Improve port number parsing.
15844 (putpkt_binary, input_interrupt): Only send interrupts if the target
15845 is running.
15846 * server.c (extended_protocol): Make static.
15847 (attached): Define earlier.
15848 (exit_requested, response_needed, program_argv): New variables.
15849 (target_running): New.
15850 (start_inferior): Clear attached here.
15851 (attach_inferior): Set attached here.
15852 (require_running): Define.
15853 (handle_query): Use require_running and target_running. Implement
15854 "monitor exit".
15855 (handle_v_attach, handle_v_run): New.
15856 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15857 (gdbserver_usage): Update.
15858 (main): Redo argument parsing. Handle --debug and --multi. Handle
15859 --attach along with other options or after the port. Save
15860 program_argv. Support no initial program. Resynchronize
15861 communication with GDB after an error. Handle "monitor exit".
15862 Use require_running and target_running. Always allow the extended
15863 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15864 restart in extended mode.
15865 * README: Refer to the GDB manual. Update --attach usage.
15866
15867 2007-12-20 Andreas Schwab <schwab@suse.de>
15868
15869 * linux-low.c (STACK_SIZE): Define.
15870 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15871 (linux_test_for_tracefork): Likewise.
15872
15873 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15874
15875 * linux-low.c (linux_wait_for_event): Update messages. Do not
15876 reinsert auto-delete breakpoints.
15877 * mem-break.c (struct breakpoint): Change return type of handler to
15878 int.
15879 (set_breakpoint_at): Update handler type.
15880 (reinsert_breakpoint_handler): Return 1 instead of calling
15881 delete_breakpoint.
15882 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15883 setting a new one.
15884 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15885 * mem-break.h (set_breakpoint_at): Update handler type.
15886 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15887 * win32-low.c (auto_delete_breakpoint): New.
15888 (get_child_debug_event): Use it.
15889
15890 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15891
15892 * configure.ac: Check for pread and pwrite.
15893 * hostio.c (handle_pread): Fall back to lseek and read.
15894 (handle_pwrite): Fall back to lseek and write.
15895 * config.in, configure: Regenerated.
15896
15897 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * server.c (myresume): Add own_buf argument.
15900 (main): Update calls.
15901
15902 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15903
15904 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15905 * remote-utils.c (remote_open): Do not call disable_async_io.
15906 (block_async_io): Delete.
15907 (unblock_async_io): Make static.
15908 (initialize_async_io): New.
15909 * server.c (handle_v_cont): Handle async I/O here.
15910 (myresume): Likewise. Move other common resume tasks here...
15911 (main): ... from here. Call initialize_async_io. Disable async
15912 I/O before the main loop.
15913 * server.h (initialize_async_io): Declare.
15914 (block_async_io, unblock_async_io): Delete prototypes.
15915 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15916
15917 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15918
15919 * remote-utils.c (readchar): Allow binary data in received messages.
15920
15921 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15922
15923 * win32-low.c (attaching): New global.
15924 (win32_create_inferior): Clear the `attaching' global.
15925 (win32_attach): Set the `attaching' global.
15926 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15927 attaching. Only set a breakpoint at the entry point if not
15928 attaching.
15929
15930 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15931
15932 * server.c (main): Don't report dll events on the initial
15933 connection on attaches.
15934
15935 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15936
15937 * server.c (main): Relax numerical bases supported for the pid of
15938 the --attach command line argument.
15939
15940 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15941
15942 * win32-low.c (win32_attach): Call OpenProcess before
15943 DebugActiveProcess, not after. Add last error output to error
15944 call.
15945
15946 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * win32-low.c (win32_get_thread_context)
15949 (win32_set_thread_context): New functions.
15950 (thread_rec): Use win32_get_thread_context.
15951 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15952 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15953 field.
15954
15955 2007-12-03 Leo Zayas
15956 Pedro Alves <pedro_alves@portugalmail.pt>
15957
15958 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15959 global variables.
15960 (child_add_thread): Minor cleanup.
15961 (child_continue): Resume artificially suspended threads before
15962 calling ContinueDebugEvent.
15963 (suspend_one_thread): New.
15964 (fake_breakpoint_event): New.
15965 (get_child_debug_event): Change return type to int. Check here if
15966 gdb sent an interrupt request. If a soft interrupt was requested,
15967 fake a breakpoint event. Return 0 if there is no event to handle,
15968 and 1 otherwise.
15969 (win32_wait): Don't check here if gdb sent an interrupt request.
15970 Ensure there is a valid event to handle.
15971 (win32_request_interrupt): Add soft interruption method as last
15972 resort.
15973
15974 2007-12-03 Leo Zayas
15975 Pedro Alves <pedro_alves@portugalmail.pt>
15976
15977 * win32-low.h (win32_thread_info): Add descriptions to the
15978 structure members. Replace `suspend_count' counter by a
15979 `suspended' flag.
15980 * win32-low.c (thread_rec): Update condition of when to get the
15981 context from the inferior. Rely on ContextFlags being set if it
15982 has already been retrieved. Only suspend the inferior thread if
15983 we haven't already. Warn if that fails.
15984 (continue_one_thread): s/suspend_count/suspended/. Only call
15985 ResumeThread once. Warn if that fails.
15986
15987 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15988
15989 * win32-low.c (win32_wait): Don't read from the inferior when it
15990 has already exited.
15991
15992 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15993
15994 * Makefile.in (win32_low_h): New variable.
15995 (win32-low.o): Add dependency on $(win32_low_h).
15996 (win32-arm-low.o, win32-i386-low.o): New rules.
15997
15998 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15999
16000 * hostio.c: Correct copyright year.
16001
16002 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16003
16004 * Makefile.in (OBS): Add hostio.o.
16005 (hostio.o): New rule.
16006 * server.h (handle_vFile): Declare.
16007 * hostio.c: New file.
16008 * server.c (handle_v_requests): Take packet_len and new_packet_len
16009 for binary packets. Call handle_vFile.
16010 (main): Update call to handle_v_requests.
16011
16012 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16013
16014 * linux-low.c: Include <sched.h>.
16015
16016 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16017
16018 * linux-low.c (linux_tracefork_grandchild): New.
16019 (linux_tracefork_child): Use clone.
16020 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16021
16022 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16023
16024 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16025
16026 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16029
16030 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16031
16032 * inferiors.c (change_inferior_id): Delete.
16033 (add_pid_to_list, pull_pid_from_list): New.
16034 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16035 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16036 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16037 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16038 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16039 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16040 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16041 (using_threads): Always set to 1.
16042 (handle_extended_wait): New.
16043 (add_process): Do not set TID.
16044 (linux_create_inferior): Set must_set_ptrace_flags.
16045 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16046 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16047 (linux_thread_alive): Rename TID argument to LWPID.
16048 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16049 (linux_wait_for_event): Do not use TID or check using_threads. Update
16050 call to dead_thread_notify. Call handle_extended_wait.
16051 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16052 (send_sigstop): Delete sigstop_sent.
16053 (wait_for_sigstop): Avoid TID.
16054 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16055 (linux_test_for_tracefork): New.
16056 (linux_lookup_signals): Use thread_db_active and
16057 linux_supports_tracefork_flag.
16058 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16059 * linux-low.h (get_process_thread): Avoid TID.
16060 (struct process_ifo): Move thread_known and tid to the end. Remove
16061 sigstop_sent.
16062 (linux_attach_lwp, thread_db_init): Update prototypes.
16063 * server.h (change_inferior_id): Delete prototype.
16064 (add_pid_to_list, pull_pid_from_list): New prototypes.
16065 * thread-db.c (thread_db_use_events): New.
16066 (find_first_thread): Rename to...
16067 (find_one_thread): ...this. Update callers and messages. Do not
16068 call fatal. Check thread_db_use_events. Do not call
16069 change_inferior_id or new_thread_notify.
16070 (maybe_attach_thread): Update. Do not call new_thread_notify.
16071 (thread_db_init): Set thread_db_use_events. Check use_events.
16072 * utils.c (fatal, warning): Correct message prefix.
16073
16074 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16075
16076 * Makefile.in (clean): Remove new files.
16077 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16078 (powerpc-64.o, powerpc-64.c): New rules.
16079 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16080 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16081 with SPE.
16082 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16083 SPE targets.
16084 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16085 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16086 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16087 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16088 (target_regsets): Add AltiVec and SPE register sets.
16089 * configure.ac: Check for AltiVec and SPE.
16090 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16091 (ppc_fill_vrregset, ppc_store_vrregset): New.
16092 (target_regsets): Add AltiVec register set.
16093 * configure: Regenerated.
16094
16095 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16096
16097 * linux-low.c (O_LARGEFILE): Define.
16098 (linux_read_memory): Use /proc/PID/mem.
16099 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16100 * configure, config.in: Regenerated.
16101
16102 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16103
16104 * linux-low.c (linux_wait_for_event): Do not pass signals while
16105 single-stepping.
16106
16107 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16108
16109 * win32-low.c (create_process): New.
16110 (win32_create_inferior): Use create_process instead of
16111 CreateProcess. If create_process failed retry appending an ".exe"
16112 suffix. Store the GetLastError result immediatelly after
16113 create_process calls and use it on the call to error.
16114
16115 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16116
16117 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16118
16119 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16120
16121 * configure.ac: Switch license to GPLv3.
16122
16123 2007-08-01 Michael Snyder <msnyder@access-company.com>
16124
16125 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16126
16127 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16128
16129 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16130 typedef.
16131 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16132 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16133 CloseToolhelp32Snapshot.
16134 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16135 CloseToolhelp32Snapshot.
16136
16137 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16138
16139 * server.c (main): Check for inferior exit before main loop.
16140
16141 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16142
16143 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16144 instead of on tmp_desc.
16145
16146 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16147 Daniel Jacobowitz <dan@codesourcery.com>
16148
16149 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16150 (add_thread): Minor cleanups.
16151 (clear_inferiors): Move lower in the file. Clear the DLL
16152 list.
16153 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16154 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16155 (xml_escape_text): New.
16156 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16157 for qSupported.
16158 (handle_v_cont): Report errors.
16159 (gdbserver_version): Update.
16160 (main): Correct size of own_buf. Do not report initial DLL events.
16161 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16162 (unloaded_dll, xml_escape_text): New.
16163 * win32-low.c (enum target_waitkind): Update comments.
16164 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16165 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16166 (win32_EnumProcessModules, win32_GetModuleInformation)
16167 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16168 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16169 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16170 (win32_Module32First, win32_Module32Next, load_toolhelp)
16171 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16172 (get_child_debug_event): Handle DLL events.
16173 (win32_wait): Likewise.
16174
16175 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16178 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16179
16180 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16181
16182 * win32-low.c (handle_output_debug_string): Ignore event if not
16183 waiting.
16184
16185 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16186
16187 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16188
16189 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16190
16191 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16192
16193 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16194
16195 * inferiors.c (change_inferior_id): Add comment.
16196 * linux-low.c (check_removed_breakpoint): Add an early
16197 prototype. Improve debug output.
16198 (linux_attach): Doc update.
16199 (linux_detach_one_process, linux_detach): Clean up before releasing
16200 each process.
16201 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16202 * linux-low.h (struct process_info): Doc improvement.
16203 * mem-break.c (delete_all_breakpoints): New.
16204 * mem-break.h (delete_all_breakpoints): New prototype.
16205 * thread-db.c (find_first_thread): New.
16206 (thread_db_create_event): Call it instead of
16207 thread_db_find_new_threads. Clean up unused variables.
16208 (maybe_attach_thread): Remove first thread handling.
16209 (thread_db_find_new_threads): Use find_first_thread.
16210 (thread_db_get_tls_address): Likewise.
16211
16212 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16213
16214 * thread-db.c (thread_db_find_new_threads): Add prototype.
16215 (thread_db_create_event): Check for the main thread before adding
16216 a new thread.
16217 (maybe_attach_thread): Only enable event reporting if TID == 0.
16218 (thread_db_get_tls_address): Check for new threads.
16219
16220 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16221
16222 * linux-low.c (linux_create_inferior): Try execv before execvp.
16223 * spu-low.c (spu_create_inferior): Likewise.
16224
16225 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16226
16227 * linux-low.c (linux_create_inferior): Change execv to execvp.
16228 * spu-low.c (spu_create_inferior): Likewies.
16229
16230 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16231
16232 * Makefile.in (clean): Clean new files instead of deleted ones.
16233 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16234 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16235 rules.
16236 * configure.srv: Specify XML files and new regformats for MIPS and
16237 MIPS64 GNU/Linux.
16238 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16239 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16240 an entry for the restart register.
16241 (mips_cannot_fetch_register, mips_cannot_store_register)
16242 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16243 register names to match the XML descriptions.
16244 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16245 restart register instead of $0.
16246
16247 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16248 Markus Deuling <deuling@de.ibm.com>
16249
16250 * remote-utils.c (decode_xfer_write): New function.
16251 * server.h (decode_xfer_write): Add prototype.
16252 * server.c (handle_query): Add PACKET_LEN argument. Support
16253 qXfer:spu:read and qXfer:spu:write packets.
16254 (main): Pass packet_len to handle_query.
16255 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16256 * target.h (target_ops): Add qxfer_spu.
16257
16258 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16259
16260 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16261 accessing non-seekable spufs files.
16262
16263 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16264
16265 * server.c (handle_query): Add reply for qC packet.
16266
16267 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16268 Leo Zayas <lerele@champenstudios@com>
16269
16270 * server.h (check_remote_input_interrupt_request): New function.
16271 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16272 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16273 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16274 (check_remote_input_interrupt_request): New function.
16275 * server.h (check_remote_input_interrupt_request): Declare.
16276 * win32-low.c (winapi_DebugBreakProcess,
16277 winapi_GenerateConsoleCtrlEvent): New typedefs.
16278 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16279 to 250 ms.
16280 (win32_wait): Check for remote interrupt request
16281 with check_remote_input_interrupt_request.
16282 (win32_request_interrupt): New function.
16283 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16284
16285 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16286
16287 * win32-low.c (debug_registers_changed,
16288 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16289 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16290 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16291 (thread_rec): Get context using the low target.
16292 (child_add_thread): Call thread_added on the low target,
16293 which does the same thing.
16294 (regptr): Delete.
16295 (do_initial_child_stuff): Remove debug registers references.
16296 Set context using the low target. Resume threads after
16297 setting the contexts.
16298 (child_continue): Remove dead variable. Remove debug
16299 registers references.
16300 (child_fetch_inferior_registers): Go through the low target.
16301 (do_child_store_inferior_registers): Remove.
16302 (child_store_inferior_registers): Go through the low target.
16303 (win32_resume): Remove debug registers references.
16304 Set context using the low target.
16305 (handle_exception): Change return type to void. Don't record
16306 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16307 first chance exception.
16308 (get_child_debug_event): Change return type to void. Remove
16309 goto loop. Always return after waiting for debug event.
16310 (win32_wait): Convert to switch statement. Handle spurious
16311 events.
16312
16313 * win32-i386-low.c (debug_registers_changed,
16314 debug_registers_used): New.
16315 (initial_stuff): Rename to ...
16316 (i386_initial_stuff): ... this. Clear debug registers
16317 state variables.
16318 (store_debug_registers): Delete.
16319 (i386_get_thread_context): New.
16320 (load_debug_registers): Delete.
16321 (i386_set_thread_context): New.
16322 (i386_thread_added): New.
16323 (single_step): Rename to ...
16324 (i386_single_step): ... this.
16325 (do_fetch_inferior_registers): Rename to ...
16326 (i386_fetch_inferior_register): ... this.
16327 (i386_store_inferior_register): New.
16328 (the_low_target): Adapt to new interface.
16329
16330 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16331 (arm_get_thread_context): New.
16332 (arm_set_thread_context): New.
16333 (regptr): New.
16334 (do_fetch_inferior_registers): Rename to ...
16335 (arm_fetch_inferior_register): ... this.
16336 (arm_store_inferior_register): New.
16337 (arm_wince_breakpoint): Reimplement as unsigned long.
16338 (arm_wince_breakpoint_len): Define.
16339 (the_low_target): Adapt to new interface.
16340
16341 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16342 load_debug_registers. Add get_thread_context, set_thread_context,
16343 thread_added and store_inferior_register. Rename
16344 fetch_inferior_registers to fetch_inferior_register.
16345 (regptr): Remove declaration.
16346
16347 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16348
16349 * linux-low.c (linux_detach): Change return type to int. Return 0.
16350 * spu-low.c (spu_detach): Likewise.
16351
16352 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16353
16354 * target.h (target_ops): Change return type of detach to int.
16355 Add join.
16356 (join_inferior): New.
16357 * server.c (main): Don't skip detach support on mingw32.
16358 If the inferior doesn't support detaching return error.
16359 Call join_inferior instead of using waitpid.
16360 * linux-low.c (linux_join): New.
16361 (linux_target_op): Add linux_join.
16362 * spu-low.c (spu_join): New.
16363 (spu_target_ops): Add spu_join.
16364 * win32-low.c (win32_detach): Adapt to new interface.
16365 Reopen current_process_handle before detaching. Issue a child
16366 resume before detaching.
16367 (win32_join): New.
16368 (win32_target_op): Add win32_join.
16369
16370 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16371
16372 * win32-low.c (win32-attach): Fix return value.
16373 * target.h (target_ops): Describe ATTACH return values.
16374
16375 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16376
16377 * win32-low.c (GETPROCADDRESS): Define.
16378 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16379 (winapi_DebugSetProcessKillOnExit): Likewise.
16380 (win32_create_inferior): Force usage of ansi CreateProcessA.
16381 (win32_attach): Use GETPROCADDRESS.
16382 (win32_detach): Likewise.
16383
16384 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16385
16386 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16387
16388 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16389
16390 * win32-low.c: Commit leftover changes from 2007-03-29.
16391
16392 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16393
16394 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16395 fields short instead of int. Add explicit padding.
16396 (i387_cache_to_fsave): Remove unnecessary casts.
16397 (i387_fsave_to_cache): Doc fix.
16398 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16399
16400 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16401
16402 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16403 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16404
16405 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16406
16407 * configure.srv (arm*-*-mingw32ce*): Move near the other
16408 arm targets.
16409
16410 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16411
16412 * configure.ac: Add errno checking.
16413 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16414 sys/file.h and malloc.h.
16415 (AC_CHECK_DECLS): Add perror.
16416 (srv_mingwce): Handle.
16417 * configure.srv (i[34567]86-*-cygwin*): Add
16418 win32-i386-low.o to srv_tgtobj.
16419 (i[34567]86-*-mingw*): Likewise.
16420 (arm*-*-mingw32ce*): Add case.
16421 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16422 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16423 [__MINGW32CE__] (strerror): New function.
16424 [__MINGW32CE__] (errno): Define to GetLastError.
16425 [__MINGW32CE__] (COUNTOF): New macro.
16426 (remote_open): Remove extra close call.
16427 * mem-break.c (delete_breakpoint_at): New function.
16428 * mem-break.h (delete_breakpoint_at): Declare.
16429 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16430 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16431 [USE_WIN32API] (read, write): Add char* casts.
16432 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16433 * server.h: Include wincecompat.h on Windows CE.
16434 [HAVE_ERRNO_H]: Check.
16435 (perror): Declare if not declared.
16436 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16437 (perror_with_name): Remove errno declaration.
16438 * wincecompat.h: New.
16439 * wincecompat.c: New.
16440 * win32-low.h: New.
16441 * win32-arm-low.c: New.
16442 * win32-i386-low.c: New.
16443 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16444 (OUTMSG2): Make it safe.
16445 (_T): New macro.
16446 (COUNTOF): New macro.
16447 (NUM_REGS): Get it from the low target.
16448 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16449 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16450 (thread_rec): Let low target handle debug registers.
16451 (child_add_thread): Likewise.
16452 (child_init_thread_list): Likewise.
16453 (continue_one_thread): Likewise.
16454 (regptr): New.
16455 (do_child_fetch_inferior_registers): Move to ...
16456 * win32-i386-low.c: ... here, and rename to ...
16457 (do_fetch_inferior_registers): ... this.
16458 * win32-low.c (child_fetch_inferior_registers):
16459 Go through the low target.
16460 (do_child_store_inferior_registers): Use regptr.
16461 (strwinerror): New function.
16462 (win32_create_inferior): Handle Windows CE.
16463 Use strwinerror instead of strerror on Windows error
16464 codes. Add program to the error output.
16465 Don't close the main thread handle on Windows CE.
16466 (win32_attach): Use coredll.dll on Windows CE.
16467 (win32_kill): Close current process and current
16468 thread handles.
16469 (win32_detach): Use coredll.dll on Windows CE.
16470 (win32_resume): Let low target handle debug registers, and
16471 step request.
16472 (handle_exception): Add/Remove initial breakpoint. Avoid
16473 non-existant WSTOPSIG on Windows CE.
16474 (win32_read_inferior_memory): Cast to remove warning.
16475 (win32_arch_string): Go through the low target.
16476 (initialize_low): Call set_breakpoint_data with the low
16477 target's breakpoint.
16478 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16479 FOP_REGNUM, mappings): Move to ...
16480 * win32-i386-low.c: ... here.
16481 * win32-low.c (win32_thread_info): Move to ...
16482 * win32-low.h: ... here.
16483 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16484 win32-arm-low.c and wincecompat.c.
16485 (all:): Add $EXEEXT.
16486 (install-only:): Likewise.
16487 (gdbserver:): Likewise.
16488 (gdbreplay:): Likewise.
16489 * config.in: Regenerate.
16490 * configure: Regenerate.
16491
16492 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16493
16494 * win32-low.c: Rename typedef thread_info to
16495 win32_thread_info throughout.
16496
16497 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16498
16499 * win32-i386-low.c: Rename to ...
16500 * win32-low.c: ... this.
16501 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16502 * Makefile.in: Likewise.
16503
16504 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16505
16506 * remote-utils.c (monitor_output): Constify msg parameter.
16507 * server.h (monitor_output): Likewise.
16508 * win32-i386-low.c (handle_output_debug_string): New.
16509 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16510 handle_output_debug_string.
16511 (get_child_debug_event): Likewise.
16512
16513 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16514
16515 * server.c (main): Correct strtoul check.
16516
16517 2007-03-27 Jon Ringle <jon@ringle.org>
16518
16519 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16520
16521 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16522
16523 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16524
16525 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16526
16527 * terminal.h: Check HAVE_SGTTY_H.
16528
16529 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16530
16531 * remote-utils.c (remote_open): Print out the assigned port number.
16532
16533 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * remote-utils.c (monitor_output): New function.
16536 * server.c (debug_threads): Define here.
16537 (monitor_show_help): New function.
16538 (handle_query): Handle qRcmd.
16539 (main): Do not handle 'd' packet.
16540 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16541 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16542 of debug_threads.
16543
16544 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16545
16546 * Makefile.in (EXEEXT): New.
16547 (clean): Use $(EXEEXT).
16548
16549 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16550
16551 * target.h (target_ops): Rename send_signal to request_interrupt,
16552 and remove enum target_signal parameter.
16553 * linux-low.c (linux_request_interrupt): Rename from
16554 linux_send_signal, and always send SIGINT.
16555 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16556 and always send SIGINT.
16557 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16558 of send_signal.
16559 (input_interrupt): Likewise.
16560
16561 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16562
16563 * server.c (get_features_xml): Check if target implemented
16564 arch_string.
16565 * win32-i386-low.c (win32_arch_string): New.
16566 (win32_target_ops): Add win32_arch_string as arch_string member.
16567
16568 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16569
16570 * spu-low.c (spu_arch_string): New.
16571 (spu_target_ops): Add spu_arch_string.
16572
16573 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16574
16575 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16576 * configure.ac: Do not check for terminal.h.
16577 * configure, config.in: Regenerated.
16578
16579 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16580
16581 * Makefile.in (OBS): Add $(XML_BUILTIN).
16582 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16583 (clean): Update.
16584 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16585 (arm-with-iwmmxt.c): New.
16586 * config.in, configure: Regenerate.
16587 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16588 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16589 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16590 (arm*-*-linux*): Add iWMMXt and regset support.
16591 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16592 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16593 (arm_store_wmmxregset, target_regsets): New.
16594 * server.c (get_features_xml): Take annex argument. Check builtin
16595 XML documents.
16596 (handle_query): Handle multiple annexes.
16597
16598 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16599
16600 * remote-utils.c [USE_WIN32API] (read, write): Define.
16601 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16602 write.
16603
16604 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * linux-i386-low.c (the_low_target): Set arch_string.
16607 * linux-x86-64-low.c (the_low_target): Likewise.
16608 * linux-low.c (linux_arch_string): New.
16609 (linux_target_ops): Add it.
16610 * linux-low.h (struct linux_target_ops): Add arch_string.
16611 * server.c (write_qxfer_response): Use const void * for DATA.
16612 (get_features_xml): New.
16613 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16614 * target.h (struct target_ops): Add arch_string method.
16615
16616 2007-01-03 Denis Pilat <denis.pilat@st.com>
16617 Daniel Jacobowitz <dan@codesourcery.com>
16618
16619 * linux-low.c (linux_kill): Handle being called with no threads.
16620 * win32-i386-low.c (win32_kill): Likewise.
16621 (get_child_debug_event): Clear current_process_handle.
16622
16623 2006-12-30 Denis PILAT <denis.pilat@st.com>
16624 Daniel Jacobowitz <dan@codesourcery.com>
16625
16626 * remote-utils.c (remote_open): Check the type of specified
16627 serial port devices before opening them.
16628 * server.c (main): Kill the inferior if an error occurs during
16629 the first remote_open.
16630
16631 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16632
16633 * README: Update supported targets.
16634
16635 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * Makefile.in (clean): Remove reg-mips64.c.
16638 (reg-mips64.c, reg-mips64.o): New rules.
16639 * configure.srv: Handle mips64. Include regset support for mips.
16640 * linux-mips-low.c (union mips_register): New.
16641 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16642 (mips_breakpoint, mips_breakpoint_at): Use int.
16643 (mips_collect_register, mips_supply_register)
16644 (mips_collect_register_32bit, mips_supply_register_32bit)
16645 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16646 (mips_store_fpregset, target_regsets): New.
16647 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16648
16649 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16650
16651 * configure.srv: Add target "spu*-*-*".
16652 * Makefile.in (clean): Remove reg-spu.c.
16653 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16654 * spu-low.c: New file.
16655
16656 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * configure.ac: Correct td_thr_tls_get_addr test.
16659 * configure: Regenerated.
16660
16661 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16662
16663 * linux-low.c (linux_wait_for_event): Reformat. Use the
16664 pass_signals array.
16665 * remote-utils.c (decode_address_to_semicolon): New.
16666 * server.c (pass_signals, handle_general_set): New.
16667 (handle_query): Mention QPassSignals for qSupported.
16668 (main): Call handle_general_set.
16669 * server.h (pass_signals, decode_address_to_semicolon): New.
16670
16671 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16672
16673 * server.c (handle_query): Correct error handling for read_auxv.
16674
16675 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16676
16677 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16678 and srv_linux_thread_db to yes.
16679 * linux-s390-low.c (s390_fill_gregset): New function.
16680 (target_regsets): Define data structure.
16681
16682 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16683
16684 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16685 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16686 * config.in, configure: Regenerated.
16687 * inferiors.c (gdb_id_to_thread): New function.
16688 (gdb_id_to_thread_id): Use it.
16689 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16690 * linux-low.h (struct process_info): Add th member.
16691 (thread_db_get_tls_address): New prototype.
16692 * remote-utils.c (decode_address): Make non-static.
16693 * server.c (handle_query): Handle qGetTLSAddr.
16694 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16695 * target.h (struct target_ops): Add get_tls_address.
16696 * thread-db.c (maybe_attach_thread): Save the thread handle.
16697 (thread_db_get_tls_address): New.
16698
16699 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16700
16701 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16702 (linux_resume_one_process): Take a siginfo_t *. Update all
16703 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16704 (struct pending_signals): Add a siginfo_t.
16705 (linux_wait_for_process): Always set last_status.
16706 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16707 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16708 * linux-low.h (struct process_info): Add last_status.
16709
16710 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16711
16712 * remote-utils.c (try_rle): New function.
16713 (putpkt_binary): Use it.
16714
16715 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16716
16717 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16718 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16719 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16720 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16721 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16722 point registers.
16723
16724 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16725
16726 * server.c (terminal_fd): New variable.
16727 (old_foreground_pgrp): Likewise.
16728 (restore_old_foreground_pgrp): New function.
16729 (start_inferior): Record the terminal file descriptor in terminal_fd
16730 and its original foreground group in old_foreground_pgrp. Register
16731 restore_old_foreground_pgrp with atexit().
16732
16733 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16734
16735 * server.c (handle_query): Correct qPart to qXfer.
16736
16737 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16738
16739 * configure.ac: Check for more headers which are missing on
16740 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16741 * configure.srv: Add Cygwin and mingw32.
16742 * remote-utils.c: Don't include headers unconditionally which
16743 are missing on mingw32. Include <winsock.h> for mingw32.
16744 (remote_open): Adjust for mingw32 support. Flush
16745 standard error after writing to it.
16746 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16747 (unblock_async_io, enable_async_io, disable_async_io)
16748 (readchar, getpkt): Update for Winsock support.
16749 (prepare_resume_reply): Expect a protocol signal number.
16750 * server.c: Disable <sys/wait.h> on mingw32.
16751 (start_inferior): Adjust for mingw32 support. Flush
16752 standard error after writing to it.
16753 (attach_inferior): Likewise. Use protocol signal
16754 numbers.
16755 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16756 and names.
16757 * win32-i386-low.c: New file.
16758 * Makefile.in (XM_CLIBS): Set.
16759 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16760 (win32-i386-low.o): New dependency rule.
16761 * linux-low.c (linux_wait): Use target signal numbers.
16762 * target.h (struct target_ops): Doc fix.
16763 * server.h (target_signal_to_name): New prototype.
16764 * gdbreplay.c: Don't include headers unconditionally which
16765 are missing on mingw32. Include <winsock.h> for mingw32.
16766 (remote_close, remote_open): Adjust for Winsock support.
16767 * configure, config.in: Regenerated.
16768
16769 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16770
16771 * server.c (decode_xfer_read, write_qxfer_response): New.
16772 (handle_query): Take a packet length argument. Handle
16773 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16774 the qSupported response.
16775 (main): Update call to handle_query.
16776
16777 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16778
16779 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16780 (putpkt_binary): Renamed from putpkt and adjusted for binary
16781 data.
16782 (putpkt): New wrapper for putpkt_binary.
16783 (readchar): Don't mask off the high bit.
16784 (decode_X_packet): New function.
16785 * server.c (main): Call putpkt_binary if a handler sets the packet
16786 length. Save the length of the incoming packet. Handle 'X'.
16787 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16788
16789 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16790
16791 * server.c (handle_query): Handle qSupported.
16792
16793 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16794
16795 * remote-utils.c (all_symbols_looked_up): New variable.
16796 (look_up_one_symbol): Check it.
16797 * server.h (look_up_one_symbol): New declaration.
16798 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16799
16800 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16801
16802 * Makefile.in (linux-arm-low.o): Update dependencies.
16803 * linux-arm-low.c: Include "gdb_proc_service.h".
16804 (PTRACE_GET_THREAD_AREA): Define.
16805 (ps_get_thread_area): New function.
16806
16807 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16808
16809 * configure.srv (m68k*-*-uclinux*): New target.
16810 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16811 (linux_resume_one_process): Remove extraneous cast.
16812 (linux_read_offsets): New.
16813 (linux_target_op): Add linux_read_offsets on mmuless systems.
16814 * server.c (handle_query): Add qOffsets logic.
16815 * target.h (struct target_ops): Add read_offsets.
16816
16817 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16818
16819 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16820 (PTRACE_GET_THREAD_AREA): Define.
16821 (ps_get_thread_area): New function.
16822 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16823 (linux-x86-64-low.o): Update.
16824
16825 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16826
16827 * configure.ac: Remove checks for prfpregset_t.
16828 * gdb_proc_service.h: New file.
16829 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16830 new "gdb_proc_service.h".
16831 * proc-service.c: Likewise.
16832 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16833 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16834 * Makefile.in (gdb_proc_service_h): Updated.
16835 * configure, config.in: Regenerated.
16836
16837 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16838
16839 * remote-utils.c (prepare_resume_reply): Move declaration
16840 of gdb_id_from_wait to the top of the block.
16841
16842 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16843
16844 * linux-low.c (regsets_store_inferior_registers): Read the regset
16845 from the target before filling it.
16846
16847 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16848
16849 * server.c (attach_inferior): Return SIGTRAP for a successful
16850 attach.
16851
16852 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16853
16854 * Makefile.in (OBS): Add version.o.
16855 (STAGESTUFF): Delete.
16856 (version.o): Add dependencies.
16857 (version.c): Replace rule.
16858 (clean): Remove version.c.
16859 * server.c (gdbserver_version): New.
16860 (gdbserver_usage): Use printf.
16861 (main): Handle --version and --help.
16862 * server.h (version, host_name): Add declarations.
16863
16864 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16865
16866 * linux-arm-low.c:
16867 * linux-arm-low.c:
16868 * inferiors.c:
16869 * i387-fp.h:
16870 * i387-fp.c:
16871 * gdbreplay.c:
16872 * regcache.c:
16873 * proc-service.c:
16874 * mem-break.h:
16875 * mem-break.c:
16876 * linux-x86-64-low.c:
16877 * linux-sh-low.c:
16878 * linux-s390-low.c:
16879 * linux-ppc64-low.c:
16880 * linux-ppc-low.c:
16881 * linux-mips-low.c:
16882 * linux-m68k-low.c:
16883 * linux-m32r-low.c:
16884 * linux-low.h:
16885 * linux-low.c:
16886 * linux-ia64-low.c:
16887 * linux-i386-low.c:
16888 * linux-crisv32-low.c:
16889 * thread-db.c:
16890 * terminal.h:
16891 * target.h:
16892 * target.c:
16893 * server.h:
16894 * server.c:
16895 * remote-utils.c:
16896 * regcache.h:
16897 * utils.c:
16898 * Makefile.in:
16899 * configure.ac:
16900 * gdbserver.1: Add (C) after Copyright. Update the FSF
16901 address.
16902
16903 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16904
16905 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16906 (arm_breakpoint_at): Recognize both breakpoints.
16907 (the_low_target): Use the correct breakpoint instruction.
16908
16909 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16910
16911 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16912 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16913 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16914 (the_low_target): Update.
16915
16916 2005-10-25 Andreas Schwab <schwab@suse.de>
16917
16918 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16919
16920 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16921 (ia64_num_regs): Reduce to 462.
16922
16923 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16924
16925 * acinclude.m4: Correct quoting.
16926 * aclocal.m4: Regenerated.
16927
16928 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16929 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16930 (thread_db_init): Call thread_db_err_str.
16931 * configure.ac: Check for TD_VERSION.
16932 * config.in, configure: Regenerated.
16933
16934 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16935
16936 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16937
16938 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16939
16940 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16941 is not available. Define HAVE_PTRACE_GETREGS if it is.
16942 * config.in, configure: Regenerated.
16943 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16944 * linux-i386-low.c, linux-m68k-low.c: Update to use
16945 HAVE_PTRACE_GETREGS.
16946 * linux-low.c (regsets_fetch_inferior_registers)
16947 (regsets_store_inferior_registers): Only return 0 if we processed
16948 GENERAL_REGS.
16949 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16950 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16951
16952 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16953
16954 * inferiors.c (struct thread_info): Add gdb_id.
16955 (add_thread): Add gdb_id argument.
16956 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16957 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16958 calls to add_thread.
16959 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16960 * server.c (handle_query): Use thread_to_gdb_id.
16961 (handle_v_cont, main): Use gdb_id_to_thread_id.
16962 * server.h (add_thread): Update prototype.
16963 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16964 prototypes.
16965
16966 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16967
16968 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16969 left-padded registers.
16970 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16971 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16972
16973 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16974
16975 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16976 * configure: Regenerate.
16977 * config.in: Regenerate.
16978 * server.h (NEED_DECLARATION_STRERROR):
16979 Replace with !HAVE_DECL_STRERROR.
16980
16981 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16982
16983 * linux-low.c (linux_wait, linux_send_signal): Don't test
16984 an unsigned long variable for > 0 if it could be MAX_ULONG.
16985 * server.c (myresume): Likewise.
16986 * target.c (set_desired_inferior): Likewise.
16987
16988 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16989
16990 * configure.ac: Simplify and improve check for socklen_t.
16991 * configure, config.in: Regenerate.
16992
16993 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16994
16995 * acconfig.h: Remove.
16996 * configure.ac: Add a test for socklen_t. Use three-argument
16997 AC_DEFINE throughout.
16998 * config.in: Regenerated using autoheader 2.59.
16999 * configure: Regenerated.
17000
17001 * gdbreplay.c (socklen_t): Provide a default.
17002 (remote_open): Use socklen_t.
17003 * remote-utils.c (socklen_t): Provide a default.
17004 (remote_open): Use socklen_t.
17005 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17006 unsigned char.
17007
17008 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17009 char for buffers.
17010 * linux-low.c (linux_read_memory, linux_write_memory)
17011 (linux_read_auxv): Likewise.
17012 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17013 (check_mem_write): Likewise.
17014 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17015 Likewise.
17016 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17017 (registers_from_string, register_data): Likewise.
17018 * server.c (handle_query, main): Likewise.
17019 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17020 (decode_M_packet): Likewise.
17021 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17022 * target.h (struct target_ops): Update read_memory, write_memory,
17023 and read_auxv.
17024 (read_inferior_memory, write_inferior_memory): Update.
17025 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17026 to unsigned char *.
17027 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17028 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17029 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17030 linux-s390-low.c, linux-sh-low.c: Update for changes in
17031 read_inferior_memory and the_low_target->breakpoint.
17032
17033 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17034
17035 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17036 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17037 * configure.srv: Add powerpc64-*-linux*.
17038 * linux-ppc64-low.c: New file.
17039
17040 2005-05-23 Orjan Friberg <orjanf@axis.com>
17041
17042 * linux-cris-low.c: New file with support for CRIS.
17043 * linux-crisv32-low.c: Ditto for CRISv32.
17044 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17045 (clean): Add reg-cris.c and reg-crisv32.c.
17046 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17047 reg-crisv32.o, and reg-crisv32.c to make rules.
17048 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17049 recognized targets.
17050
17051 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17052
17053 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17054 of sizeof (PTRACE_XFER_TYPE).
17055 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17056
17057 2005-05-12 Orjan Friberg <orjanf@axis.com>
17058
17059 * target.h (struct target_ops): Add insert_watchpoint,
17060 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17061 pointers for hardware watchpoint support.
17062 * linux-low.h (struct linux_target_ops): Ditto.
17063 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17064 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17065 to linux_target_ops.
17066 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17067 reply packet.
17068 * server.c (main): Recognize 'Z' and 'z' packets.
17069
17070 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17071
17072 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17073 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17074 (the_low_target): Add new members.
17075
17076 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17077
17078 * proc-service.c (ps_lgetregs): Search all_processes instead of
17079 all_threads.
17080
17081 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17082
17083 * server.c (start_inferior): Change return type to int.
17084 (attach_inferior): Change sigptr to int *.
17085 (handle_v_cont, handle_v_requests): Change signal to int *.
17086 (main): Change signal to int.
17087
17088 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17089
17090 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17091 * configure.srv: Add m32r*-*-linux*.
17092 * linux-m32r-low.c: New file.
17093
17094 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17095
17096 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17097
17098 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17099
17100 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17101 Take unsigned long arguments for PIDs.
17102 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17103 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17104 (wait_for_sigstop, linux_resume_one_process)
17105 (regsets_fetch_inferior_registers, linux_send_signal)
17106 (linux_read_auxv): Likewise. Update the types of variables holding
17107 PIDs. Update format string specifiers.
17108 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17109 * remote-utils.c (prepare_resume_reply): Likewise.
17110 * server.c (cont_thread, general_thread, step_thread)
17111 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17112 unsigned long.
17113 (handle_query): Update format specifiers.
17114 (handle_v_cont, main): Use strtoul for thread IDs.
17115 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17116 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17117 (general_thread, step_thread, thread_from_wait)
17118 (old_thread_from_wait): Update.
17119 * target.h (struct thread_resume): Use unsigned long for THREAD.
17120 (struct target_ops): Use unsigned long for arguments to attach and
17121 thread_alive.
17122
17123 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17124
17125 * acinclude.m4: Include bfd/bfd.m4 directly.
17126 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17127 <agriffis@toolchain.org>.
17128 * aclocal.m4, configure: Regenerated.
17129
17130 2005-01-07 Andrew Cagney <cagney@gnu.org>
17131
17132 * configure.ac: Rename configure.in, require autoconf 2.59.
17133 * configure: Re-generate.
17134
17135 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17136
17137 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17138 LIBS when finished.
17139 * aclocal.m4: Regenerated.
17140 * configure: Regenerated.
17141
17142 2004-11-21 Andreas Schwab <schwab@suse.de>
17143
17144 * linux-m68k-low.c (m68k_num_gregs): Define.
17145 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17146 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17147 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17148 (m68k_breakpoint_at): New. Add to the_low_target.
17149
17150 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17151 srv_linux_thread_db to yes.
17152
17153 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17154
17155 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17156 (ARCH_SET_FS): Likewise.
17157 (ARCH_GET_FS): Likewise.
17158 (ARCH_GET_GS): Likewise.
17159
17160 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17161
17162 * linux-i386-low.c (ps_get_thread_area): New.
17163 * linux-x86-64-low.c (ps_get_thread_area): New.
17164 * linux-low.c: Include <sys/syscall.h>.
17165 (linux_kill_one_process): Don't kill the first thread here.
17166 (linux_kill): Kill the first thread here.
17167 (kill_lwp): New function.
17168 (send_sigstop, linux_send_signal): Use it.
17169 * proc-service.c: Clean up #ifdefs.
17170 (fpregset_info): Delete.
17171 (ps_lgetregs): Update and enable implementation.
17172 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17173 implementations.
17174 * remote-utils.c (struct sym_cache, symbol_cache): New.
17175 (input_interrupt): Print a clearer message.
17176 (async_io_enabled): New variable.
17177 (enable_async_io, disable_async_io): Use it. Update comments.
17178 (look_up_one_symbol): Use the symbol cache.
17179 * thread-db.c (thread_db_look_up_symbols): New function.
17180 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17181
17182 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17183
17184 * configure.in: Test for -rdynamic.
17185 * configure: Regenerated.
17186 * Makefile (INTERNAL_LDFLAGS): New.
17187 (gdbserver, gdbreplay): Use it.
17188
17189 2004-09-02 Andrew Cagney <cagney@gnu.org>
17190
17191 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17192
17193 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17194
17195 * linux-low.c (linux_wait): Clear all_processes list also.
17196
17197 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17198
17199 * linux-low.c: Include <errno.h>. Remove extern declaration of
17200 errno.
17201
17202 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17203
17204 * gdbreplay.c, server.h, utils.c: Update copyright years.
17205
17206 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17207
17208 * server.c (main): Print child status or termination signal from
17209 variable 'signal', not 'sig'.
17210
17211 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17212
17213 * linux-low.c (linux_read_memory): Change return type to
17214 int. Check for and return error from ptrace().
17215 * target.c (read_inferior_memory): Change return type to int. Pass
17216 back return status from the_target->read_memory().
17217 * target.h (struct target_ops): Adapt *read_memory() prototype.
17218 Update comment.
17219 (read_inferior_memory): Adapt prototype.
17220 * server.c (main): Return an error packet if
17221 read_inferior_memory() returns an error.
17222
17223 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17224
17225 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17226 Unify with other clean targets.
17227
17228 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17229
17230 * server.c (handle_v_cont): Call set_desired_inferior.
17231
17232 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17233
17234 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17235
17236 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17237
17238 * linux-low.c (linux_wait): Unblock async I/O.
17239 (linux_resume): Block and enable async I/O.
17240 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17241 * server.h (block_async_io, unblock_async_io): Add prototypes.
17242
17243 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17244
17245 * remote-utils.c (remote_open): Print a status notice after
17246 opening a TCP port.
17247 * server.c (attach_inferior): Print a status notice after
17248 attaching.
17249
17250 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17251
17252 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17253
17254 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17255
17256 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17257 error packet.
17258 * server.c, target.h: Update copyright years.
17259
17260 2004-02-25 Roland McGrath <roland@redhat.com>
17261
17262 * target.h (struct target_ops): New member `read_auxv'.
17263 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17264 * linux-low.c (linux_read_auxv): New function.
17265 (linux_target_ops): Initialize `read_auxv' member to that.
17266
17267 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17268
17269 Committed by Jim Blandy <jimb@redhat.com>.
17270
17271 * linux-s390-low.c (s390_num_regs): Update.
17272 (s390_regmap): Remove control registers. Use __s390x__ predefine
17273 instead of GPR_SIZE to distiguish s390 and s390x targets.
17274
17275 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17276
17277 * linux-low.c: Update copyright year.
17278 (check_removed_breakpoint): Clear pending_is_breakpoint.
17279 (linux_set_resume_request, linux_queue_one_thread)
17280 (resume_status_pending_p): New functions.
17281 (linux_continue_one_thread): Use process->resume.
17282 (linux_resume): Only resume threads if there are no pending events.
17283 * linux-low.h (struct process_info): Add resume request
17284 pointer.
17285
17286 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17287
17288 * regcache.c (new_register_cache): Clear the allocated register
17289 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17290
17291 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17292
17293 * linux-low.c (linux_resume): Take a struct thread_resume *
17294 argument.
17295 (linux_wait): Update call.
17296 (resume_ptr): New static variable.
17297 (linux_continue_one_thread): Renamed from
17298 linux_continue_one_process. Use resume_ptr.
17299 (linux_resume): Use linux_continue_one_thread.
17300 * server.c (handle_v_cont, handle_v_requests): New functions.
17301 (myresume): New function.
17302 (main): Handle 'v' case.
17303 * target.h (struct thread_resume): New type.
17304 (struct target_ops): Change argument of "resume" to struct
17305 thread_resume *.
17306 (myresume): Delete macro.
17307
17308 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17309
17310 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17311 (uninstall): Support DESTDIR.
17312
17313 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17314
17315 * configure.srv: Add xscale*linux copy of arm*linux entry.
17316
17317 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17318
17319 * linux-arm-low.c (arm_reinsert_addr): New function.
17320 (the_low_target): Add arm_reinsert_addr.
17321
17322 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17323
17324 * mem-break.c: Remove whitespace at end of file.
17325
17326 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17327
17328 * configure.in: Check whether we need to prototype strerror.
17329 * server.h: Optionally prototype strerror.
17330 * gdbreplay.c (perror_with_name): Use strerror.
17331 * linux-low.c (linux_attach_lwp): Use strerror.
17332 * utils.c (perror_with_name): Use strerror.
17333 * config.in, configure: Regenerated.
17334
17335 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17336
17337 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17338 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17339
17340 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17341
17342 * Makefile.in (SFILES): Update.
17343 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17344 low-sun3.c: Remove files.
17345
17346 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17347
17348 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17349 (linux_detach_one_process, linux_detach): New functions.
17350 (linux_target_ops): Add linux_detach.
17351 * server.c (main): Handle 'D' packet.
17352 * target.h (struct target_ops): Add "detach" member.
17353 (detach_inferior): Define.
17354
17355 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17356
17357 From Kelley Cook <kelleycook@wideopenwest.com>:
17358 * configure.srv: Accept i[34567]86 variants.
17359
17360 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17361
17362 * linux-low.c (linux_wait_for_event): Correct comment typos.
17363 (linux_resume_one_process): Call check_removed_breakpoint.
17364 (linux_send_signal): New function.
17365 (linux_target_ops): Add linux_send_signal.
17366 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17367 of kill.
17368 * target.h (struct target_ops): Add send_signal.
17369
17370 2003-05-29 Jim Blandy <jimb@redhat.com>
17371
17372 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17373 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17374 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17375 away part of the register's value.
17376
17377 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17378
17379 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17380 (linux_wait_for_event, linux_init_signals): Likewise.
17381
17382 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17383
17384 * configure.in: Check for stdlib.h.
17385 * configure: Regenerated.
17386 * config.in: Regenerated.
17387
17388 2003-01-04 Andreas Schwab <schwab@suse.de>
17389
17390 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17391
17392 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17393
17394 * Makefile.in: Remove obsolete code.
17395
17396 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17397
17398 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17399 defined(PT_FPR0_HI).
17400
17401 2002-11-17 Stuart Hughes <seh@zee2.com>
17402
17403 * linux-arm-low.c (arm_num_regs): Increase.
17404 (arm_regmap): Include status register.
17405
17406 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17407
17408 * linux-low.c (register_addr): Remove incorrect -1 check.
17409
17410 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17411
17412 * linux-low.c (linux_create_inferior): Call setpgid. Return
17413 the new PID.
17414 (unstopped_p, linux_signal_pid): Remove.
17415 (linux_target_ops): Remove linux_signal_pid.
17416 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17417 global instead of target method.
17418 * target.h (struct target_ops): Remove signal_pid. Update comment
17419 for create_inferior.
17420 * server.c (signal_pid): New variable.
17421 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17422 gdbserver. Set the child to be the foreground process group.
17423 (attach_inferior): Set signal_pid.
17424
17425 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17426
17427 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17428
17429 2002-08-20 Jim Blandy <jimb@redhat.com>
17430
17431 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17432 default for this.
17433
17434 2002-08-01 Andrew Cagney <cagney@redhat.com>
17435
17436 * Makefile.in: Make chill references obsolete.
17437
17438 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17439
17440 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17441 * configure: Regenerate.
17442 * config.in: Regenerate.
17443
17444 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17445
17446 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17447 (perror_with_name, remote_close, remote_open, expect, play): Static.
17448
17449 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17450
17451 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17452 byte offsets instead of an array of indexes.
17453 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17454
17455 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17456
17457 * regcache.c: Add comment.
17458
17459 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17460
17461 * thread-db.c: New file.
17462 * proc-service.c: New file.
17463 * acinclude.m4: New file.
17464 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17465 proc-service.o, and thread-db.o.
17466 (linux-low.o): Add USE_THREAD_DB.
17467 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17468 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17469 * aclocal.m4: Regenerated.
17470 * config.in: Regenerated.
17471 * configure: Regenerated.
17472 * configure.in: Check for proc_service.h, sys/procfs.h,
17473 thread_db.h, and linux/elf.h headrs.
17474 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17475 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17476 Check for -lthread_db and thread support.
17477 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17478 PowerPC, and SuperH.
17479 * i387-fp.c: Constify arguments.
17480 * i387-fp.h: Likewise.
17481 * inferiors.c: (struct thread_info): Renamed from
17482 `struct inferior_info'. Remove PID member. Use generic inferior
17483 list header. All uses updated.
17484 (inferiors, signal_pid): Removed.
17485 (all_threads): New variable.
17486 (get_thread): Define.
17487 (add_inferior_to_list): New function.
17488 (for_each_inferior): New function.
17489 (change_inferior_id): New function.
17490 (add_inferior): Removed.
17491 (remove_inferior): New function.
17492 (add_thread): New function.
17493 (free_one_thread): New function.
17494 (remove_thread): New function.
17495 (clear_inferiors): Use for_each_inferior and free_one_thread.
17496 (find_inferior): New function.
17497 (find_inferior_id): New function.
17498 (inferior_target_data): Update argument type.
17499 (set_inferior_target_data): Likewise.
17500 (inferior_regcache_data): Likewise.
17501 (set_inferior_regcache_data): Likewise.
17502 * linux-low.c (linux_bp_reinsert): Remove.
17503 (all_processes, stopping_threads, using_thrads)
17504 (struct pending_signals, debug_threads, pid_of): New.
17505 (inferior_pid): Replace with macro.
17506 (struct inferior_linux_data): Remove.
17507 (get_stop_pc, add_process): New functions.
17508 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17509 Use add_process and add_thread.
17510 (linux_attach_lwp): New function, based on old linux_attach. Use
17511 add_process and add_thread. Set stop_expected for new threads.
17512 (linux_attach): New function.
17513 (linux_kill_one_process): New function.
17514 (linux_kill): Kill all LWPs.
17515 (linux_thread_alive): Use find_inferior_id.
17516 (check_removed_breakpoints, status_pending_p): New functions.
17517 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17518 Update. Use WNOHANG. Wait for cloned processes also. Update process
17519 struct for the found process.
17520 (linux_wait_for_event): New function.
17521 (linux_wait): Use it. Support LWPs.
17522 (send_sigstop, wait_for_sigstop, stop_all_processes)
17523 (linux_resume_one_process, linux_continue_one_process): New functions.
17524 (linux_resume): Support LWPs.
17525 (REGISTER_RAW_SIZE): Remove.
17526 (fetch_register): Use register_size instead. Call supply_register.
17527 (usr_store_inferior_registers): Likewise. Call collect_register.
17528 Fix recursive case.
17529 (regsets_fetch_inferior_registers): Improve error message.
17530 (regsets_store_inferior_registers): Add debugging.
17531 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17532 (unstopped_p, linux_signal_pid): New functions.
17533 (linux_target_ops): Add linux_signal_pid.
17534 (linux_init_signals): New function.
17535 (initialize_low): Call it. Initialize using_threads.
17536 * regcache.c (inferior_regcache_data): Add valid
17537 flag.
17538 (get_regcache): Fetch registers lazily. Add fetch argument
17539 and update all callers.
17540 (regcache_invalidate_one, regcache_invalidate): New
17541 functions.
17542 (new_register_cache): Renamed from create_register_cache.
17543 Return the new regcache.
17544 (free_register_cache): Change argument to a void *.
17545 (registers_to_string, registers_from_string): Call get_regcache
17546 with fetch flag set.
17547 (register_data): Make static. Pass fetch flag to get_regcache.
17548 (supply_register): Call get_regcache with fetch flag clear.
17549 (collect_register): Call get_regcache with fetch flag set.
17550 (collect_register_as_string): New function.
17551 * regcache.h: Update.
17552 * remote-utils.c (putpkt): Flush after debug output and use
17553 stderr.
17554 Handle input interrupts while waiting for an ACK.
17555 (input_interrupt): Use signal_pid method.
17556 (getpkt): Flush after debug output and use stderr.
17557 (outreg): Use collect_register_as_string.
17558 (new_thread_notify, dead_thread_notify): New functions.
17559 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17560 and general_thread.
17561 (look_up_one_symbol): Flush after debug output.
17562 * server.c (step_thread, server_waiting): New variables.
17563 (start_inferior): Don't use signal_pid. Update call to mywait.
17564 (attach_inferior): Update call to mywait.
17565 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17566 (main): Don't fetch/store registers explicitly. Use
17567 set_desired_inferior. Support proposed ``Hs'' packet. Update
17568 calls to mywait.
17569 * server.h: Update.
17570 (struct inferior_list, struct_inferior_list_entry): New.
17571 * target.c (set_desired_inferior): New.
17572 (write_inferior_memory): Constify.
17573 (mywait): New function.
17574 * target.h: Update.
17575 (struct target_ops): New signal_pid method.
17576 (mywait): Removed macro, added prototype.
17577
17578 * linux-low.h (regset_func): Removed.
17579 (regset_fill_func, regset_store_func): New.
17580 (enum regset_type): New.
17581 (struct regset_info): Add type field. Use new operation types.
17582 (struct linux_target_ops): stop_pc renamed to get_pc.
17583 Add decr_pc_after_break and breakpoint_at.
17584 (get_process, get_thread_proess, get_process_thread)
17585 (strut process_info, all_processes, linux_attach_lwp)
17586 (thread_db_init): New.
17587
17588 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17589 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17590 (the_low_target): Add new members.
17591 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17592 (i386_store_fpxregset): Constify.
17593 (target_regsets): Add new kind identifier.
17594 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17595 (i386_set_pc): Add debugging.
17596 (i386_breakpoint_at): New function.
17597 (the_low_target): Add new members.
17598 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17599 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17600 (mips_breakpoint_at): New.
17601 (the_low_target): Add new members.
17602 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17603 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17604 (the_low_target): Add new members.
17605 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17606 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17607 (the_low_target): Add new members.
17608 * linux-x86-64-low.c (target_regsets): Add new kind
17609 identifier.
17610
17611 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17612
17613 From Martin Pool <mbp@samba.org>:
17614 * server.c (gdbserver_usage): New function.
17615 (main): Call it.
17616
17617 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17618
17619 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17620 stop_at -> stop_pc.
17621
17622 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17623
17624 * Makefile.in: Remove obsolete code.
17625
17626 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17627
17628 * linux-low.c (regsets_fetch_inferior_registers),
17629 (regsets_store_inferior_registers): Removed cast to int from
17630 ptrace() calls.
17631 * regcache.h: Added declaration of struct inferior_info.
17632
17633 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17634
17635 * inferiors.c (struct inferior_info): Add regcache_data.
17636 (add_inferior): Call create_register_cache.
17637 (clear_inferiors): Call free_register_cache.
17638 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17639 * regcache.c (struct inferior_regcache_data): New.
17640 (registers): Remove.
17641 (get_regcache): New function.
17642 (create_register_cache, free_register_cache): New functions.
17643 (set_register_cache): Don't initialize the register cache here.
17644 (registers_to_string, registers_from_string, register_data): Call
17645 get_regcache.
17646 * regcache.h: Add prototypes.
17647 * server.h: Likewise.
17648
17649 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17650
17651 * mem-break.c: New file.
17652 * mem-break.h: New file.
17653 * Makefile.in: Add mem-break.o rule; update server.h
17654 dependencies.
17655 * inferiors.c (struct inferior_info): Add target_data
17656 member.
17657 (clear_inferiors): Free target_data member if set.
17658 (inferior_target_data, set_inferior_target_data): New functions.
17659 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17660 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17661 * linux-low.c (linux_bp_reinsert): New variable.
17662 (struct inferior_linux_data): New.
17663 (linux_create_inferior): Use set_inferior_target_data.
17664 (linux_attach): Likewise. Call add_inferior.
17665 (linux_wait_for_one_inferior): New function.
17666 (linux_wait): Call it.
17667 (linux_write_memory): Add const.
17668 (initialize_low): Call set_breakpoint_data.
17669 * linux-low.h (struct linux_target_ops): Add breakpoint
17670 handling members.
17671 * server.c (attach_inferior): Remove extra add_inferior
17672 call.
17673 * server.h: Include mem-break.h. Update inferior.c
17674 prototypes.
17675 * target.c (read_inferior_memory)
17676 (write_inferior_memory): New functions.
17677 * target.h (read_inferior_memory)
17678 (write_inferior_memory): Change macros to prototypes.
17679 (struct target_ops): Update comments. Add const to write_memory
17680 definition.
17681
17682 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17683
17684 * linux-low.c (usr_store_inferior_registers): Support
17685 registers which are allowed to fail to store.
17686 * linux-low.h (linux_target_ops): Likewise.
17687 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17688 (ppc_cannot_store_register): FPSCR may not be storable.
17689
17690 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17691
17692 * server.h: Include <string.h> if HAVE_STRING_H.
17693 * ChangeLog: Correct paths in last ChangeLog entry.
17694
17695 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17696
17697 * linux-low.h: Remove obsolete prototypes.
17698 (struct linux_target_ops): New.
17699 (extern the_low_target): New.
17700 * linux-low.c (num_regs, regmap): Remove declarations.
17701 (register_addr): Use the_low_target explicitly.
17702 (fetch_register): Likewise.
17703 (usr_fetch_inferior_registers): Likewise.
17704 (usr_store_inferior_registers): Likewise.
17705 * linux-arm-low.c (num_regs): Remove.
17706 (arm_num_regs): Define.
17707 (arm_regmap): Renamed from regmap, made static.
17708 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17709 made static.
17710 (arm_cannot_store_register): Renamed from cannot_store_register,
17711 made static.
17712 (the_low_target): New.
17713 * linux-i386-low.c (num_regs): Remove.
17714 (i386_num_regs): Define.
17715 (i386_regmap): Renamed from regmap, made static.
17716 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17717 made static.
17718 (i386_cannot_store_register): Renamed from cannot_store_register,
17719 made static.
17720 (the_low_target): New.
17721 * linux-ia64-low.c (num_regs): Remove.
17722 (ia64_num_regs): Define.
17723 (ia64_regmap): Renamed from regmap, made static.
17724 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17725 made static.
17726 (ia64_cannot_store_register): Renamed from cannot_store_register,
17727 made static.
17728 (the_low_target): New.
17729 * linux-m68k-low.c (num_regs): Remove.
17730 (m68k_num_regs): Define.
17731 (m68k_regmap): Renamed from regmap, made static.
17732 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17733 made static.
17734 (m68k_cannot_store_register): Renamed from cannot_store_register,
17735 made static.
17736 (the_low_target): New.
17737 * linux-mips-low.c (num_regs): Remove.
17738 (mips_num_regs): Define.
17739 (mips_regmap): Renamed from regmap, made static.
17740 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17741 made static.
17742 (mips_cannot_store_register): Renamed from cannot_store_register,
17743 made static.
17744 (the_low_target): New.
17745 * linux-ppc-low.c (num_regs): Remove.
17746 (ppc_num_regs): Define.
17747 (ppc_regmap): Renamed from regmap, made static.
17748 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17749 made static.
17750 (ppc_cannot_store_register): Renamed from cannot_store_register,
17751 made static.
17752 (the_low_target): New.
17753 * linux-s390-low.c (num_regs): Remove.
17754 (s390_num_regs): Define.
17755 (s390_regmap): Renamed from regmap, made static.
17756 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17757 made static.
17758 (s390_cannot_store_register): Renamed from cannot_store_register,
17759 made static.
17760 (the_low_target): New.
17761 * linux-sh-low.c (num_regs): Remove.
17762 (sh_num_regs): Define.
17763 (sh_regmap): Renamed from regmap, made static.
17764 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17765 made static.
17766 (sh_cannot_store_register): Renamed from cannot_store_register,
17767 made static.
17768 (the_low_target): New.
17769 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17770 (the_low_target): New.
17771
17772 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17773
17774 * Makefile.in: Add stamp-h target.
17775 * configure.in: Create stamp-h.
17776 * configure: Regenerated.
17777
17778 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17779
17780 * inferiors.c: New file.
17781 * target.c: New file.
17782 * target.h: New file.
17783 * Makefile.in: Add target.o and inferiors.o. Update
17784 dependencies.
17785 * linux-low.c (inferior_pid): New static variable,
17786 moved from server.c.
17787 (linux_create_inferior): Renamed from create_inferior.
17788 Call add_inferior. Return 0 on success instead of a PID.
17789 (linux_attach): Renamed from myattach.
17790 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17791 (linux_thread_alive): Renamed from mythread_alive.
17792 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17793 child dies.
17794 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17795 (regsets_store_inferior_registers): Correct error message.
17796 Add missing ``return 0''.
17797 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17798 (linux_store_registers): Renamed from store_inferior_registers.
17799 (linux_read_memory): Renamed from read_inferior_memory.
17800 (linux_write_memory): Renamed from write_inferior_memory.
17801 (linux_target_ops): New structure.
17802 (initialize_low): Call set_target_ops ().
17803 * remote-utils.c (unhexify): New function.
17804 (hexify): New function.
17805 (input_interrupt): Send signals to ``signal_pid''.
17806 * server.c (inferior_pid): Remove.
17807 (start_inferior): Update create_inferior call.
17808 (attach_inferior): Call add_inferior.
17809 (handle_query): New function.
17810 (main): Call handle_query for `q' packets.
17811 * server.h: Include "target.h". Remove obsolete prototypes.
17812 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17813
17814 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17815
17816 * Makefile.in: Add WARN_CFLAGS. Update configury
17817 dependencies.
17818 * configure.in: Check for <string.h>
17819 * configure: Regenerate.
17820 * config.in: Regenerate.
17821 * gdbreplay.c: Include needed system headers.
17822 (remote_open): Remove strchr prototype.
17823 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17824 * regcache.c (supply_register): Change buf argument to const void *.
17825 (supply_register_by_name): Likewise.
17826 (collect_register): Change buf argument to void *.
17827 (collect_register_by_name): Likewise.
17828 * regcache.h: Add missing prototypes.
17829 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17830 * server.c (handle_query): New function.
17831 (attached): New static variable, moved out of main.
17832 (main): Quiet longjmp clobber warnings.
17833 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17834 * utils.c (error): Remove NORETURN.
17835 (fatal): Likewise.
This page took 0.376975 seconds and 3 git commands to generate.