Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2
3 * server.c (gdbserver_version): Change copyright year to 2020.
4 * gdbreplay.c (gdbreplay_version): Likewise.
5
6 2019-12-26 Christian Biesinger <cbiesinger@google.com>
7
8 * configure: Regenerate.
9 * configure.ac: Quote variable arguments of test.
10
11 2019-12-10 Christian Biesinger <cbiesinger@google.com>
12
13 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
14 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
15 * config.in: Regenerate.
16 * configure: Regenerate.
17 * configure.ac: Don't check for strerror.
18 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
19 Call safe_strerror instead of strerror.
20 * server.h (strerror): Remove this now-unnecessary declaration.
21 * tracepoint.c (init_named_socket): Call safe_strerror instead of
22 strerror.
23 (gdb_agent_helper_thread): Likewise.
24 * utils.c (perror_with_name): Likewise.
25
26 2019-11-26 Tom Tromey <tom@tromey.com>
27
28 * configure, config.in: Rebuild.
29
30 2019-11-26 Tom Tromey <tom@tromey.com>
31
32 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
33 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
34 gdb_sigmask.
35 * configure, config.in: Rebuild.
36
37 2019-11-26 Tom Tromey <tom@tromey.com>
38
39 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
40 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
41 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
42 * acinclude.m4: Include ax_pthread.m4.
43 * config.in, configure: Rebuild.
44
45 2019-11-26 Christian Biesinger <cbiesinger@google.com>
46
47 * debug.c (debug_set_output): Call safe_strerror instead of
48 strerror.
49 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
50 (linux_kill_one_lwp): Likewise.
51 (linux_detach_one_lwp): Likewise.
52 (linux_wait_for_event_filtered): Likewise.
53 (store_register): Likewise.
54 * lynx-low.c (lynx_attach): Likewise.
55 * mem-break.c (insert_memory_breakpoint): Likewise.
56 (remove_memory_breakpoint): Likewise.
57 (delete_fast_tracepoint_jump): Likewise.
58 (set_fast_tracepoint_jump): Likewise.
59 (uninsert_fast_tracepoint_jumps_at): Likewise.
60 (reinsert_fast_tracepoint_jumps_at): Likewise.
61 * nto-low.c (nto_xfer_memory): Likewise.
62 (nto_resume): Likewise.
63
64 2019-11-20 Luis Machado <luis.machado@linaro.org>
65
66 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
67 instead of register count.
68 * tdesc.c (tdesc_contains_feature): New function.
69 * tdesc.h (tdesc_contains_feature): New prototype.
70
71 2019-11-15 Christian Biesinger <cbiesinger@google.com>
72
73 * Makefile.in: Add safe-strerror.c.
74 * configure: Regenerate.
75 * configure.ac: Don't source common.host.
76
77 2019-11-15 Christian Biesinger <cbiesinger@google.com>
78
79 * config.in: Regenerate.
80 * configure: Regenerate.
81
82 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
83
84 * ax.c (ax_printf): Handle size_t_arg.
85
86 2019-11-06 Christian Biesinger <cbiesinger@google.com>
87
88 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
89 * mi/mi-main.c (output_cores): Likewise.
90 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
91 (linux_xfer_osdata_modules): Likewise.
92 * remote.c (register_remote_support_xml): Likewise.
93 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
94 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
95
96 2019-11-01 Christian Biesinger <cbiesinger@google.com>
97
98 * configure: Regenerate.
99 * configure.ac: Remove check for strerror_r.
100
101 2019-10-31 Christian Biesinger <cbiesinger@google.com>
102
103 * config.in: Regenerate.
104 * configure: Regenerate.
105 * configure.ac: Also check for strerror_r.
106
107 2019-10-31 Christian Biesinger <cbiesinger@google.com>
108
109 * ax.h (debug_agent): Remove duplicate declaration.
110
111 2019-10-26 Tom de Vries <tdevries@suse.de>
112
113 * linux-aarch64-low.c: Fix typos in comments.
114 * linux-arm-low.c: Same.
115 * linux-low.c: Same.
116 * linux-ppc-low.c: Same.
117 * proc-service.c: Same.
118 * regcache.h: Same.
119 * server.c: Same.
120 * tracepoint.c: Same.
121 * win32-low.c: Same.
122
123 2019-10-25 Tom Tromey <tromey@adacore.com>
124
125 * utils.c (xstrdup): Remove.
126
127 2019-10-23 Tom Tromey <tom@tromey.com>
128
129 * configure, config.in: Rebuild.
130
131 2019-10-23 Tom Tromey <tom@tromey.com>
132
133 * configure: Rebuild.
134 * acinclude.m4: Use m4_include, not sinclude.
135
136 2019-10-17 Tom Tromey <tromey@adacore.com>
137
138 * configure: Rebuild.
139 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
140 in AC_CONFIG_FILES invocation.
141 * Makefile.in (stamp-h, Makefile): Use new-style config.status
142 invocation.
143
144 2019-10-16 Christian Biesinger <cbiesinger@google.com>
145
146 * server.c: Include xml-builtin.h.
147 (get_xml_features): Don't declare xml_builtins here.
148
149 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
150
151 * Makefile.in: Remove references to vec-ipa.o.
152
153 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
154
155 * Makefile.in: Remove references to vec.c.
156
157 2019-10-02 Christian Biesinger <cbiesinger@google.com>
158
159 * server.c (server_waiting): Change to bool.
160 (extended_protocol): Likewise.
161 (response_needed): Likewise.
162 (exit_requested): Likewise.
163 (run_once): Likewise.
164 (report_no_resumed): Likewise.
165 (non_stop): Likewise.
166 (disable_packet_vCont): Likewise.
167 (disable_packet_Tthread): Likewise.
168 (disable_packet_qC): Likewise.
169 (disable_packet_qfThreadInfo): Likewise.
170 (handle_general_set): Update.
171 (handle_detach): Update.
172 (handle_monitor_command): Update.
173 (handle_query): Update.
174 (captured_main): Update.
175 (process_serial_event): Update.
176 * server.h (server_waiting): Change to bool.
177 (disable_packet_vCont): Likewise.
178 (disable_packet_Tthread): Likewise.
179 (disable_packet_qC): Likewise.
180 (disable_packet_qfThreadInfo): Likewise.
181 (run_once): Likewise.
182 (non_stop): Likewise.
183 * target.c (target_stop_and_wait): Update.
184
185 2019-10-02 Tom Tromey <tromey@adacore.com>
186
187 * Makefile.in (SFILES): Add common-inferior.c.
188 (OBS): Add common-inferior.o.
189 * server.c (startup_with_shell): Don't define.
190
191 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
192
193 * linux-low.c (linux_low_read_btrace): Update for change to
194 std::vector.
195
196 2019-09-20 Christian Biesinger <cbiesinger@google.com>
197
198 * debug.c (debug_threads): Remove comment in favor of the header.
199 * debug.h (using_threads): Add declaration.
200 (debug_threads): Add comment.
201 * linux-aarch64-low.c: Include debug.h and remove declaration of
202 debug_threads.
203 * nto-low.c: Likewise.
204 * remote-utils.c: Likewise.
205 * thread-db.c: Likewise.
206
207 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
208
209 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
210 and powerpc-cell64l-ipa.o.
211 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
212 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
213 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
214 (spu*-*-*): Remove.
215
216 * spu-low.c: Remove file.
217
218 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
219 (parse_spufs_run): Remove.
220 (ppc_get_pc): Remove Cell/B.E. support.
221 (ppc_set_pc): Likewise.
222 (ppc_breakpoint_at): Likewise.
223 (ppc_arch_setup): Likewise.
224 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
225 tdesc_powerpc_cell32l.
226 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
227 or init_registers_powerpc_cell32l.
228 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
229 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
230 or init_registers_powerpc_cell32l.
231 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
232 (init_registers_powerpc_cell32l): Remove prototype.
233 (init_registers_powerpc_cell64l): Likewise.
234
235 * target.h (struct target_ops): Remove qxfer_spu member.
236 * server.c (handle_qxfer_spu): Remove.
237 (qxfer_packets): Remove entry for "spu".
238 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
239 * linux-low.c (SPUFS_MAGIC): Remove.
240 (spu_enumerate_spu_ids): Remove.
241 (linux_qxfer_spu): Remove.
242 (linux_target_ops): Remove qxfer_spu member.
243 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
244 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
245 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
246
247 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
248
249 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
250 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
251 * config.in: Regenerate.
252 * configure: Regenerate.
253
254 2019-08-15 Tom Tromey <tromey@adacore.com>
255
256 * target.c (target_write_memory): Use gdb::byte_vector.
257
258 2019-08-15 Tom Tromey <tromey@adacore.com>
259
260 * tracepoint.c (write_inferior_data_pointer)
261 (write_inferior_integer, write_inferior_int8)
262 (write_inferior_uinteger, m_tracepoint_action_download)
263 (r_tracepoint_action_download, x_tracepoint_action_download)
264 (l_tracepoint_action_download, clear_inferior_trace_buffer)
265 (download_agent_expr, download_tracepoint_1)
266 (download_trace_state_variables, upload_fast_traceframes): Update.
267 * server.c (gdb_write_memory): Update.
268 * remote-utils.c (relocate_instruction): Update.
269 * proc-service.c (ps_pdwrite): Update.
270 * mem-break.c (remove_memory_breakpoint)
271 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
272 (uninsert_fast_tracepoint_jumps_at)
273 (reinsert_fast_tracepoint_jumps_at): Update.
274 * linux-x86-low.c (append_insns)
275 (i386_install_fast_tracepoint_jump_pad)
276 (amd64_write_goto_address, i386_write_goto_address): Update.
277 * linux-s390-low.c (append_insns, s390_write_goto_address):
278 Update.
279 * linux-ppc-low.c (ppc_relocate_instruction)
280 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
281 (ppc_write_goto_address): Update.
282 * linux-aarch64-low.c (append_insns): Update.
283 * target.h (struct target_ops): Update.
284 (write_inferior_memory): Don't declare.
285 * target.c (target_write_memory): Rename from
286 write_inferior_memory. Remove old target_write_memory.
287
288 2019-08-15 Tom Tromey <tromey@adacore.com>
289
290 * target.c (write_inferior_memory): Use std::vector.
291
292 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
293
294 PR build/24886
295 * configure.ac: Drop enable-libmcheck support.
296 * configure, config.in: Rebuild.
297 * acinclude.m4: Don't include it.
298
299 2019-07-19 Alan Hayward <alan.hayward@arm.com>
300
301 * configure.srv: Remove Arm xml files.
302
303 2019-07-19 Alan Hayward <alan.hayward@arm.com>
304
305 * configure.srv: Add new files. Remove xml generated files.
306 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
307 registers.
308 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
309 * linux-aarch32-tdesc.c: New file.
310 * linux-aarch32-tdesc.h: New file.
311 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
312 * linux-arm-low.c (init_registers_arm, tdesc_arm)
313 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
314 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
315 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
316 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
317 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
318 (arm_read_description): Call arm_linux_read_description.
319 (initialize_low_arch): Don't init registers.
320 * linux-arm-tdesc.c: New file.
321 * linux-arm-tdesc.h: New file.
322
323 2019-07-10 Alan Hayward <alan.hayward@arm.com>
324
325 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
326 Move counter inside for.
327 (arm_read_description): Check ptrace earlier.
328 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
329
330 2019-07-09 Tom Tromey <tom@tromey.com>
331
332 * configure: Rebuild.
333 * configure.ac: Change common to gdbsupport.
334 * acinclude.m4: Change common to gdbsupport.
335 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
336 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
337 common to gdbsupport.
338 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
339 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
340 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
341 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
342 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
343 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
344 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
345 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
346 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
347 common to gdbsupport.
348
349 2019-07-04 Alan Hayward <alan.hayward@arm.com>
350
351 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
352 defines.
353 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
354
355 2019-07-04 Alan Hayward <alan.hayward@arm.com>
356
357 * configure.srv: Remove legacy xml.
358 * linux-aarch64-low.c (initialize_low_arch): Remove
359 initialize_low_tdesc call.
360 * linux-aarch64-tdesc-selftest.c: Remove file.
361 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
362 * linux-x86-low.c (initialize_low_arch): Remove
363 initialize_low_tdesc call.
364 * linux-x86-tdesc-selftest.c: Remove file.
365 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
366
367 2019-06-20 Tom de Vries <tdevries@suse.de>
368
369 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
370 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
371
372 2019-06-19 Tom de Vries <tdevries@suse.de>
373
374 * debug.h (debug_write): Change return type to ssize_t.
375 * debug.c (debug_write): Same.
376
377 2019-06-14 Tom Tromey <tom@tromey.com>
378
379 * configure.ac: Use new path to gnulib.
380 * configure: Rebuild.
381 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
382 to gnulib.
383
384 2019-06-11 Tom Tromey <tom@tromey.com>
385
386 * Makefile.in (SFILES): Add alloc.c.
387 (OBS): Add alloc.o.
388 (IPA_OBJS): Add alloc-ipa.o.
389 (alloc-ipa.o): New target.
390 (%.o: ../%.c): New pattern rule.
391
392 2019-06-10 Tom Tromey <tromey@adacore.com>
393
394 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
395 end warning with a newline.
396 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
397 newline.
398 * thread-db.c (attach_thread): Don't end warning with a newline.
399 (thread_db_notice_clone): Likewise.
400 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
401 newline.
402 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
403 end warning with a newline.
404
405 2019-06-04 Pedro Alves <palves@redhat.com>
406
407 * server.c (captured_main): Use make_unique_xstrdup.
408
409 2019-06-02 Tom Tromey <tom@tromey.com>
410
411 * gdbreplay.c (fromhex): Remove.
412 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
413
414 2019-05-29 Tom Tromey <tromey@adacore.com>
415
416 * configure: Rebuild.
417
418 2019-05-06 Kevin Buettner <kevinb@redhat.com>
419
420 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
421 sign extension code on 32-bit builds.
422
423 2019-05-03 Eli Zaretskii <eliz@gnu.org>
424
425 * remote-utils.c:
426 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
427
428 2019-04-19 Tom Tromey <tom@tromey.com>
429
430 * server.c (struct vstop_notif): Derive from notif_event.
431 <base>: Remove.
432 (queue_stop_reply): Update.
433 (remove_all_on_match_ptid): Change type. Rewrite.
434 (discard_queued_stop_replies): Rewrite.
435 (in_queued_stop_replies_ptid): Change type.
436 (in_queued_stop_replies): Rewrite.
437 (notif_stop): Update.
438 (queue_stop_reply_callback): Update.
439 (captured_main): Don't call initialize_notif.
440 (push_stop_notification): Update.
441 * notif.c (notif_write_event, handle_notif_ack)
442 (notif_event_enque, notif_push): Update.
443 (notif_event_xfree, initialize_notif): Remove.
444 * notif.h (struct notif_event): Include <list>, not
445 "common/queue.h".
446 (struct notif_server) <queue>: Now a std::list.
447 (notif_event_p): Remove typedef.
448 (initialize_notif): Don't declare.
449 (struct notif_event): Add virtual destructor.
450
451 2019-04-17 Alan Hayward <alan.hayward@arm.com>
452
453 * ax.c (ax_vdebug): Call debug_printf.
454 * debug.c (debug_write): New function.
455 * debug.h (debug_write): New declaration.
456 * linux-low.c (sigchld_handler): Call debug_write.
457
458 2019-04-17 Alan Hayward <alan.hayward@arm.com>
459
460 * debug.c (debug_set_output): New function.
461 (debug_vprintf): Send output to debug_file.
462 (debug_flush): Likewise.
463 * debug.h (debug_set_output): New declaration.
464 * server.c (handle_monitor_command): Add debug-file option.
465 (captured_main): Likewise.
466
467 2019-04-17 Alan Hayward <alan.hayward@arm.com>
468
469 * debug.c (remote_debug): Add definition.
470 * debug.h (remote_debug): Add declaration.
471 * hostio.c (remote_debug): Remove declaration.
472 * remote-utils.c (struct ui_file): Likewise.
473 (remote_debug): Likewise.
474 * remote-utils.h (remote_debug): Likewise,
475 * server.c (remote_debug): Remove definition.
476
477 2019-04-10 Kevin Buettner <kevinb@redhat.com>
478
479 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
480 when using a 64-bit gdbserver.
481
482 2019-04-09 Tom Tromey <tromey@adacore.com>
483
484 * linux-low.c (select_event_lwp): Use find_thread_in_random.
485
486 2019-04-08 Tom Tromey <tom@tromey.com>
487
488 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
489 throw.
490 (linux_resume_one_lwp): Likewise.
491
492 2019-04-08 Tom Tromey <tom@tromey.com>
493
494 * gdbreplay.c: Update.
495 * linux-low.c: Update.
496 * server.c: Update.
497
498 2019-04-08 Tom Tromey <tom@tromey.com>
499
500 * server.c: Use C++ exception handling.
501 * linux-low.c: Use C++ exception handling.
502 * gdbreplay.c: Use C++ exception handling.
503
504 2019-04-08 Tom Tromey <tom@tromey.com>
505
506 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
507 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
508 (captured_main, main): Update.
509 * gdbreplay.c (main): Update.
510
511 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
512
513 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
514 value in argument pointer, return 1 if the entry is found and 0
515 otherwise. Move comment.
516 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
517 * linux-low.h (linux_get_auxv): Declare.
518 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
519
520 2019-04-05 Tom Tromey <tromey@adacore.com>
521
522 * server.c (gdbserver_usage): Use upper-case for metasyntactic
523 variables.
524
525 2019-03-28 Alan Hayward <alan.hayward@arm.com>
526
527 * linux-low.c (AT_HWCAP2): Add define if not already included.
528
529 2019-03-26 Alan Hayward <alan.hayward@arm.com>
530
531 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
532 (aarch64_arch_setup): Call linux_get_hwcap.
533 * linux-arm-low.c (arm_get_hwcap): Remove function.
534 (arm_read_description): Call linux_get_hwcap.
535 * linux-low.c (linux_get_auxv): New function.
536 (linux_get_hwcap): Likewise.
537 (linux_get_hwcap2): Likewise.
538 * linux-low.h (linux_get_hwcap): New declaration.
539 (linux_get_hwcap2): Likewise.
540 * linux-ppc-low.c (ppc_get_auxv): Remove function.
541 (ppc_arch_setup): Call linux_get_hwcap.
542 * linux-s390-low.c (s390_get_hwcap): Remove function.
543 (s390_arch_setup): Call linux_get_hwcap.
544
545 2019-03-22 Alan Hayward <alan.hayward@arm.com>
546 Jiong Wang <jiong.wang@arm.com>
547
548 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
549 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
550 to fail.
551 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
552
553 2019-03-22 Alan Hayward <alan.hayward@arm.com>
554 Jiong Wang <jiong.wang@arm.com>
555
556 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
557 (aarch64_get_hwcap): New function.
558 (aarch64_arch_setup): Read APIA hwcap.
559
560 2019-03-22 Alan Hayward <alan.hayward@arm.com>
561 Jiong Wang <jiong.wang@arm.com>
562
563 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
564 (initialize_low_tracepoint): Likewise.
565 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
566 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
567 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
568 (aarch64_linux_read_description): Likewise.
569 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
570
571 2019-03-12 John Baldwin <jhb@FreeBSD.org>
572
573 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
574 i386_create_target_description for 'segments' parameter.
575 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
576 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
577 * win32-i386-low.c (i386_arch_setup): Likewise.
578
579 2019-03-12 Tom Tromey <tromey@adacore.com>
580
581 * linux-low.c (iterate_over_lwps): Update.
582
583 2019-03-06 Tom Tromey <tom@tromey.com>
584
585 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
586 (captured_main): Use SCOPE_EXIT.
587
588 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
589
590 * configure.srv: Use '$enable_unittest' instead of '$development'
591 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
592 case.
593
594 2019-02-27 Tom Tromey <tromey@adacore.com>
595
596 * gdbreplay.c (logchar): Handle \r\n.
597
598 2019-02-07 Alan Hayward <alan.hayward@arm.com>
599
600 * linux-low.c (linux_attach): Add process before lwp.
601 * server.c (attach_inferior): Check if already attached.
602
603 2019-02-07 Tom Tromey <tom@tromey.com>
604
605 * x86-tdesc.h: Rename include guard.
606 * x86-low.h: Add include guard.
607 * wincecompat.h: Rename include guard.
608 * win32-low.h: Add include guard.
609 * utils.h: Rename include guard.
610 * tracepoint.h: Rename include guard.
611 * tdesc.h: Rename include guard.
612 * target.h: Rename include guard.
613 * server.h: Rename include guard.
614 * remote-utils.h: Rename include guard.
615 * regcache.h: Rename include guard.
616 * nto-low.h: Rename include guard.
617 * notif.h: Add include guard.
618 * mem-break.h: Rename include guard.
619 * lynx-low.h: Add include guard.
620 * linux-x86-tdesc.h: Add include guard.
621 * linux-s390-tdesc.h: Add include guard.
622 * linux-ppc-tdesc-init.h: Add include guard.
623 * linux-low.h: Add include guard.
624 * linux-aarch64-tdesc.h: Add include guard.
625 * linux-aarch32-low.h: Add include guard.
626 * inferiors.h: Rename include guard.
627 * i387-fp.h: Rename include guard.
628 * hostio.h: Rename include guard.
629 * gdbthread.h: Rename include guard.
630 * gdb_proc_service.h: Rename include guard.
631 * event-loop.h: Rename include guard.
632 * dll.h: Rename include guard.
633 * debug.h: Rename include guard.
634 * ax.h: Rename include guard.
635
636 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
637
638 PR gdb/23985
639 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
640 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
641
642 2019-01-25 Tom Tromey <tom@tromey.com>
643
644 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
645
646 2019-01-25 Tom Tromey <tom@tromey.com>
647
648 * win32-low.c: Fix common/ includes.
649 * win32-i386-low.c: Fix common/ includes.
650 * tracepoint.c: Fix common/ includes.
651 * thread-db.c: Fix common/ includes.
652 * target.h: Fix common/ includes.
653 * symbol.c: Fix common/ includes.
654 * spu-low.c: Fix common/ includes.
655 * server.h: Fix common/ includes.
656 * server.c: Fix common/ includes.
657 * remote-utils.c: Fix common/ includes.
658 * regcache.h: Fix common/ includes.
659 * regcache.c: Fix common/ includes.
660 * nto-x86-low.c: Fix common/ includes.
661 * notif.h: Fix common/ includes.
662 * mem-break.h: Fix common/ includes.
663 * lynx-low.c: Fix common/ includes.
664 * lynx-i386-low.c: Fix common/ includes.
665 * linux-x86-tdesc-selftest.c: Fix common/ includes.
666 * linux-x86-low.c: Fix common/ includes.
667 * linux-low.c: Fix common/ includes.
668 * inferiors.h: Fix common/ includes.
669 * i387-fp.c: Fix common/ includes.
670 * hostio.c: Fix common/ includes.
671 * hostio-errno.c: Fix common/ includes.
672 * gdbthread.h: Fix common/ includes.
673 * gdbreplay.c: Fix common/ includes.
674 * fork-child.c: Fix common/ includes.
675 * event-loop.c: Fix common/ includes.
676 * ax.c:
677 (enum gdb_agent_op): Fix common/ includes.
678
679 2019-01-21 Tom Tromey <tom@tromey.com>
680
681 * tracepoint.c: Fix includes.
682 * remote-utils.c: Fix includes.
683 * linux-x86-low.c: Fix includes.
684
685 2019-01-01 Joel Brobecker <brobecker@adacore.com>
686
687 * gdbreplay.c (gdbreplay_version): Update copyright year in
688 version message.
689 * server.c (gdbserver_version): Likewise.
690
691 2018-12-05 Alan Hayward <alan.hayward@arm.com>
692
693 * linux-low.c (add_lwp): Switch ordering.
694
695 2018-11-29 Tom Tromey <tom@tromey.com>
696
697 * win32-low.c (win32_join): Take pid, not process.
698 * target.h (struct target_ops) <join>: Change argument type.
699 (join_inferior): Change argument name.
700 * spu-low.c (spu_join): Take pid, not process.
701 * server.c (handle_detach): Preserve pid before destroying
702 process.
703 * lynx-low.c (lynx_join): Take pid, not process.
704 * linux-low.c (linux_join): Take pid, not process.
705
706 2018-11-23 Alan Hayward <alan.hayward@arm.com>
707
708 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
709 (aarch64_cannot_fetch_register): Likewise.
710 (struct linux_target_ops): Update references.
711
712 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
713
714 * linux-ppc-low.c: Include nat/linux-ptrace.h.
715
716 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
717
718 * configure.srv (ipa_ppc_linux_regobj): Add
719 powerpc-isa207-htm-vsx32l-ipa.o and
720 powerpc-isa207-htm-vsx64l-ipa.o.
721 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
722 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
723 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
724 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
725 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
726 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
727 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
728 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
729 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
730 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
731 (init_registers_powerpc_isa207_htm_vsx32l)
732 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
733 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
734 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
735 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
736 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
737 (ppc_store_tm_ctarregset): New functions.
738 (ppc_regsets): Add entries for HTM regsets.
739 (ppc_arch_setup): Set htm in features struct when needed. Set
740 sizes for the HTM regsets.
741 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
742 (initialize_low_arch): Call
743 init_registers_powerpc_isa207_htm_vsx32l and
744 init_registers_powerpc_isa207_htm_vsx64l.
745 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
746 PPC_TDESC_ISA207_HTM_VSX.
747 (initialize_low_tracepoint): Call
748 init_registers_powerpc_isa207_htm_vsx32l and
749 init_registers_powerpc_isa207_htm_vsx64l.
750
751 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
752
753 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
754 rs6000/power-linux-pmu.xml to srv_xmlfiles.
755 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
756 (ppc_store_pmuregset): New functions.
757 (ppc_regsets): Add entries for ebb and pmu regsets.
758 (ppc_arch_setup): Set isa207 in features struct if the ebb and
759 pmu regsets are available. Set sizes for these regsets.
760
761 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
762
763 * configure.srv (ipa_ppc_linux_regobj): Add
764 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
765 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
766 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
767 rs6000/powerpc-isa207-vsx32l.xml, and
768 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
769 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
770 <PPC_TDESC_ISA207_VSX>: New enum value.
771 (init_registers_powerpc_isa207_vsx32l): Declare.
772 (init_registers_powerpc_isa207_vsx64l): Declare.
773 * linux-ppc-low.c (ppc_fill_tarregset): New function.
774 (ppc_store_tarregset): New function.
775 (ppc_regsets): Add entry for the TAR regset.
776 (ppc_arch_setup): Set isa207 in features struct when needed. Set
777 size for the TAR regsets.
778 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
779 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
780 and init_registers_powerpc_isa207_vsx64l.
781 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
782 (initialize_low_tracepoint): Call
783 init_registers_powerpc_isa207_vsx32l and
784 init_registers_powerpc_isa207_vsx64l.
785
786 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
787 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
788
789 * configure.srv (ipa_ppc_linux_regobj): Add
790 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
791 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
792 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
793 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
794 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
795 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
796 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
797 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
798 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
799 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
800 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
801 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
802 (ppc_hwcap): Add comment.
803 (ppc_hwcap2): New global.
804 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
805 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
806 (ppc_regsets): Add entries for the DSCR and PPR regsets.
807 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
808 when needed. Set sizes for the the DSCR and PPR regsets.
809 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
810 (initialize_low_arch): Call
811 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
812 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
813 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
814 PPC_TDESC_ISA205_PPR_DSCR_VSX.
815 (initialize_low_tracepoint): Call
816 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
817 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
818
819 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
820
821 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
822
823 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
824 Simon Marchi <simark@simark.ca>
825
826 * acinclude.m4: Include "../selftest.m4".
827 * configure: Regenerate.
828 * configure.ac: Use "GDB_AC_SELFTEST".
829 * configure.srv: Use "$enable_unittests" instead of
830 "$development" when checking whether unit tests have been
831 enabled.
832 * server.c (captured_main): Update message informing that
833 selftests have been disabled.
834
835 2018-10-04 Tom Tromey <tom@tromey.com>
836
837 * configure: Rebuild.
838
839 2018-10-04 Tom Tromey <tom@tromey.com>
840
841 * server.c (handle_status): Rename inner "thread".
842 (process_serial_event): Declare "res" in 'm' case.
843 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
844 (iterate_over_lwps): Rename inner "thread".
845 (linux_qxfer_libraries_svr4): Rename inner "len".
846 * gdbthread.h (find_thread_in_random): Rename inner "thread".
847
848 2018-10-01 Gary Benson <gbenson@redhat.com>
849
850 * gdb_proc_service.h: Moved common code to
851 common/gdb_proc_service.h.
852
853 2018-10-01 Gary Benson <gbenson@redhat.com>
854
855 * gdb_proc_service.h: Synchronize comments and whitespace with
856 GDB's version of this file.
857
858 2018-09-25 Tom Tromey <tom@tromey.com>
859
860 * configure: Rebuild.
861 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
862
863 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
864
865 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
866 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
867 ($(IPA_LIB)): Sort IPA_OBJS.
868
869 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
870
871 * Makefile.in: Remove references to $(ADD_DEPS).
872
873 2018-09-16 Tom Tromey <tom@tromey.com>
874
875 * remote-utils.c (remote_open): Use GNU style for metasyntactic
876 variables.
877 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
878 variables.
879
880 2018-09-05 Tom Tromey <tom@tromey.com>
881
882 * configure: Rebuild.
883
884 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
885
886 PR build/23399
887 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
888
889 2018-08-27 Tom Tromey <tom@tromey.com>
890
891 PR build/23087:
892 * configure: Rebuild.
893
894 2018-08-27 Tom Tromey <tom@tromey.com>
895
896 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
897 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
898 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
899 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
900 (s390x_emit_stack_adjust): Add casts to unsigned char.
901
902 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
903
904 PR gdb/23374
905 PR gdb/23375
906 * server.h (struct client_state) <disable_randomization>:
907 Initialize to 1.
908
909 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
910
911 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
912 variable.
913 (mips_supply_ptrace_register): Likewise.
914
915 2018-07-22 Tom Tromey <tom@tromey.com>
916
917 * configure: Rebuild.
918
919 2018-07-22 Tom Tromey <tom@tromey.com>
920
921 * win32-low.c (win32_create_inferior): Remove unused variables.
922 * gdbreplay.c (remote_open): Remove unused variable.
923 * remote-utils.c (remote_prepare): Remove unused variable.
924 * x86-tdesc.h (X86_TDESC_H): Define.
925 (amd64_expedite_regs): Define conditionally.
926 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
927 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
928 * remote-utils.c (readchar): Remove unused variable.
929
930 2018-07-13 Pedro Alves <palves@redhat.com>
931
932 * linux-low.c (linux_kill): Change parameter to process_info
933 pointer instead of pid. Adjust.
934 * lynx-low.c (lynx_kill): Likewise.
935 * nto-low.c (nto_kill): Likewise.
936 * spu-low.c (spu_kill): Likewise.
937 * win32-low.c (win32_kill): Likewise.
938 * server.c (handle_v_kill, kill_inferior_callback)
939 (detach_or_kill_for_exit): Adjust.
940 * target.c (kill_inferior): Change parameter to process_info
941 pointer instead of pid. Adjust.
942 * target.h (struct target_ops) <kill>: Change parameter to
943 process_info pointer instead of pid. Adjust all implementations
944 and callers.
945 (kill_inferior): Likewise.
946
947 2018-07-13 Pedro Alves <palves@redhat.com>
948
949 * linux-low.c (linux_detach, linux_join): Change parameter to
950 process_info pointer instead of pid. Adjust.
951 * lynx-low.c (lynx_detach, lynx_join): Likewise.
952 * nto-low.c (nto_detach): Likewise.
953 * spu-low.c (spu_detach, spu_join): Likewise.
954 * win32-low.c (win32_detach, win32_join): Likewise.
955 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
956 * target.h (struct target_ops) <detach, join>: Change parameter to
957 process_info pointer instead of pid. Adjust all implementations
958 and callers.
959 (detach_inferior, join_inferior): Rename 'pid' parameter to
960 'proc'.
961
962 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
963 Jan Kratochvil <jan.kratochvil@redhat.com>
964 Paul Fertser <fercerpav@gmail.com>
965 Tsutomu Seki <sekiriki@gmail.com>
966
967 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
968 (OBS): Add 'common/netstuff.o'.
969 (GDBREPLAY_OBS): Likewise.
970 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
971 (remote_open): Implement support for IPv6
972 connections.
973 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
974 and 'wspiapi.h'.
975 (handle_accept_event): Accept connections from IPv6 sources.
976 (remote_prepare): Handle IPv6-style hostnames; implement
977 support for IPv6 connections.
978 (remote_open): Implement support for printing connections from
979 IPv6 sources.
980
981 2018-07-11 Pedro Alves <palves@redhat.com>
982
983 PR gdb/23377
984 * mem-break.c (any_persistent_commands): Add process_info
985 parameter and use it instead of relying on the current process.
986 Change return type to bool.
987 * mem-break.h (any_persistent_commands): Add process_info
988 parameter and change return type to bool.
989 * server.c (handle_detach): Remove require_running_or_return call.
990 Look up the process_info for the process we're about to detach.
991 If not found, return back error to GDB. Adjust
992 any_persistent_commands call to pass down a process pointer.
993
994 2018-07-11 Pedro Alves <palves@redhat.com>
995
996 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
997 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
998 instead of collect_register_by_name.
999 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1000 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1001
1002 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1003 Pedro Alves <palves@redhat.com>
1004
1005 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1006
1007 2018-07-03 Tom Tromey <tom@tromey.com>
1008
1009 * linux-low.c: Update.
1010 * lynx-low.c: Update.
1011 * mem-break.c: Update.
1012 * nto-low.c: Update.
1013 * remote-utils.c: Update.
1014 * server.c: Update.
1015 * spu-low.c: Update.
1016 * target.c: Update.
1017 * win32-low.c: Update.
1018
1019 2018-07-03 Tom Tromey <tom@tromey.com>
1020
1021 * server.c: Update.
1022
1023 2018-07-03 Tom Tromey <tom@tromey.com>
1024
1025 * linux-low.c: Update.
1026
1027 2018-07-03 Tom Tromey <tom@tromey.com>
1028
1029 * target.c: Update.
1030
1031 2018-07-03 Tom Tromey <tom@tromey.com>
1032
1033 * linux-low.c: Update.
1034 * linux-mips-low.c: Update.
1035 * lynx-low.c: Update.
1036 * nto-low.c: Update.
1037 * remote-utils.c: Update.
1038 * server.c: Update.
1039 * spu-low.c: Update.
1040 * target.c: Update.
1041 * thread-db.c: Update.
1042
1043 2018-07-03 Tom Tromey <tom@tromey.com>
1044
1045 * linux-low.c: Update.
1046 * linux-mips-low.c: Update.
1047 * lynx-low.c: Update.
1048 * mem-break.c: Update.
1049 * nto-low.c: Update.
1050 * remote-utils.c: Update.
1051 * server.c: Update.
1052 * spu-low.c: Update.
1053 * target.c: Update.
1054 * tracepoint.c: Update.
1055
1056 2018-07-03 Tom Tromey <tom@tromey.com>
1057
1058 * linux-low.c: Update.
1059 * linux-ppc-low.c: Update.
1060 * linux-x86-low.c: Update.
1061 * proc-service.c: Update.
1062 * server.c: Update.
1063 * spu-low.c: Update.
1064 * thread-db.c: Update.
1065 * win32-low.c: Update.
1066
1067 2018-07-03 Tom Tromey <tom@tromey.com>
1068
1069 * linux-low.c: Update.
1070 * lynx-low.c: Update.
1071 * nto-low.c: Update.
1072 * remote-utils.c: Update.
1073 * spu-low.c: Update.
1074 * thread-db.c: Update.
1075 * win32-low.c: Update.
1076
1077 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1078
1079 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1080 parameter in call to 'amd64_create_target_description'.
1081
1082 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1083
1084 * x86-tdesc.h: Remove executable permission flag.
1085
1086 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1087
1088 * configure.ac: Remove AC_PREREQ, add missing quoting.
1089 * configure: Re-generate.
1090 * config.in: Re-generate.
1091 * aclocal.m4: Re-generate.
1092
1093 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1094
1095 * tracepoint.h (current_traceframe): Remove declaration.
1096
1097 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1098
1099 * linux-aarch64-low.c (is_sve_tdesc): New function.
1100 (aarch64_sve_regs_copy_to_regcache): Likewise.
1101 (aarch64_sve_regs_copy_from_regcache): Likewise.
1102 (aarch64_regs_info): Add SVE checks.
1103 (initialize_low_arch): Initialize SVE.
1104
1105 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1106
1107 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1108
1109 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1110
1111 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1112 (initialize_low_tracepoint): Likewise
1113 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1114 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1115 param.
1116 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1117 checks.
1118 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1119
1120 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1121
1122 * server.h (PBUFSIZ): Increase size
1123
1124 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1125
1126 * regcache.c (regcache::raw_compare): New function.
1127 * regcache.h (regcache::raw_compare): New declaration.
1128
1129 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1130
1131 * regcache.c (new_register_cache): Use new.
1132 (free_register_cache): Use delete.
1133 (register_data): Use const.
1134 (supply_register): Move body inside regcache.
1135 (regcache::raw_supply): New override function.
1136 (collect_register): Move body inside regcache.
1137 (regcache::raw_collect): New override function.
1138 (regcache::get_register_status): New override function.
1139 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1140
1141 2018-06-09 Tom Tromey <tom@tromey.com>
1142
1143 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1144 declare queue.
1145 (event_queue): Use std::queue.
1146 (gdb_event_xfree): Remove.
1147 (initialize_event_loop, process_event, wait_for_event): Update.
1148
1149 2018-06-08 Stan Cox <scox@redhat.com>
1150
1151 * win32-low.c (win32_create_inferior): last_ptid and last_status
1152 moved to client_state.
1153
1154 2018-06-08 Pedro Alves <palves@redhat.com>
1155
1156 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1157 common/common-exceptions.o, common/common-utils.o,
1158 common/errors.o, common/print-utils.o and utils.o.
1159 * gdbreplay.c: Include "common-defs.h" instead of the two
1160 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1161 string.h or alloca.h.
1162 (perror_with_name): Delete.
1163 (remote_open): Use xstrdup instead of strdup.
1164 (main): Rename to ...
1165 (captured_main): ... this.
1166 (main): New.
1167
1168 2018-06-08 Tom Tromey <tom@tromey.com>
1169
1170 * linux-low.c (linux_low_read_btrace): Update.
1171
1172 2018-06-04 Stan Cox <scox@redhat.com>
1173
1174 * server.h (struct client_state): New.
1175 * server.c (cont_thread, general_thread, multi_process)
1176 (report_fork_events, report_vfork_events, report_exec_events)
1177 (report_thread_events, swbreak_feature, hwbreak_feature)
1178 (vCont_supported, disable_randomization, pass_signals)
1179 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1180 Moved to client_state.
1181 * remote-utils.c (remote_debug, noack_mode)
1182 (transport_is_reliable): Moved to client_state.
1183 * tracepoint.c (current_traceframe): Moved to client_state.
1184
1185 Update all callers.
1186 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1187 linux-low.c, remote-utils.h, target.c: Use client_state.
1188
1189 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1190
1191 * configure.srv: Add new c/h file.
1192
1193 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1194
1195 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1196 null VQ.
1197
1198 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1199
1200 * gdb.arch/mips-fpregset-core.exp: New test.
1201 * gdb.arch/mips-fpregset-core.c: New test source.
1202
1203 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1204
1205 PR server/23198
1206 * hostio.c (require_int): Do not report overflow for integers
1207 between 0xfffffff and 0x7fffffff.
1208
1209 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1210
1211 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1212 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1213 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1214 functions.
1215 (the_low_target): Wire them.
1216
1217 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1218
1219 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1220 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1221 mode. Call collect_register_by_name with vscr using
1222 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1223 (ppc_store_vrregset): Add and set vscr_offset variable as in
1224 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1225 vscr_offset.
1226
1227 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1228
1229 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1230 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1231 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1232
1233 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1234
1235 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1236 (ppc_store_vsxregset): Likewise.
1237 (ppc_fill_vrregset): Likewise.
1238 (ppc_store_vrregset): Likewise.
1239 (ppc_fill_evrregset): Likewise.
1240 (ppc_store_evrregset): Likewise.
1241 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1242 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1243 needed.
1244
1245 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1246
1247 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1248 wordsize of the inferior. Call ppc_linux_target_wordsize.
1249
1250 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1251
1252 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1253 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1254 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1255 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1256 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1257 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1258 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1259 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1260 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1261 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1262 (tdesc_powerpc_e500l): Remove.
1263 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1264 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1265 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1266 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1267 linux-ppc-tdesc.h.
1268 (ppc_arch_setup): Remove target description matching code. Fill a
1269 ppc_linux_features struct and call ppc_linux_match_description
1270 with it.
1271
1272 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1273
1274 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1275 width of the requested register exceeds the width of the
1276 `ptrace' data type.
1277 (mips_cannot_store_register): Likewise.
1278
1279 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1280
1281 * linux-mips-low.c (mips_fetch_register): New function. Update
1282 preceding comment.
1283 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1284 (the_low_target): Wire `mips_fetch_register'.
1285
1286 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1287
1288 * lynx-i386-low.c (LYNXOS_178): New macro.
1289 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1290 the layout on LynxOS-178.
1291 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1292 handle floating point registers that are not supported by
1293 LynxOS-178.
1294
1295 2018-05-10 Tom Tromey <tom@tromey.com>
1296
1297 * configure: Rebuild.
1298
1299 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1300
1301 PR server/23158:
1302 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1303 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1304 Use it to set the expedite_regs field in the given tdesc.
1305 * x86-tdesc.h: New file.
1306 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1307 Adjust following the addition of the new expedite_regs parameter
1308 to init_target_desc.
1309 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1310 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1311 (i386_linux_read_description, amd64_linux_read_description):
1312 Adjust following the addition of the new expedite_regs parameter
1313 to init_target_desc.
1314 * lynx-i386-low.c: #include "x86-tdesc.h".
1315 (lynx_i386_arch_setup): Adjust following the addition of the new
1316 expedite_regs parameter to init_target_desc.
1317 * nto-x86-low.c: #include "x86-tdesc.h".
1318 (nto_x86_arch_setup): Adjust following the addition of the new
1319 expedite_regs parameter to init_target_desc.
1320 * win32-i386-low.c: #include "x86-tdesc.h".
1321 (i386_arch_setup): Adjust following the addition of the new
1322 expedite_regs parameter to init_target_desc.
1323
1324 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1325
1326 PR server/23158:
1327 * win32-low.c (win32_create_inferior): Add call to my_wait
1328 setting last_status global.
1329
1330 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1331
1332 PR server/23158:
1333 * win32-low.c (create_process): Only call gdb_tilde_expand if
1334 inferior_cwd is not NULL.
1335
1336 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1337
1338 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1339 registers to the cache if their values have changed.
1340 (i387_xsave_to_cache): Provide default values for x87 control
1341 registers when these features are available, but disabled.
1342 * regcache.c (supply_register_by_name_zeroed): New function.
1343 * regcache.h (supply_register_by_name_zeroed): Declare new
1344 function.
1345
1346 2018-05-07 Tom Tromey <tom@tromey.com>
1347
1348 * configure: Rebuild.
1349
1350 2018-05-04 Tom Tromey <tom@tromey.com>
1351
1352 * configure: Rebuild.
1353
1354 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1355 Pedro Alves <palves@redhat.com>
1356
1357 * linux-aarch64-low.c (aarch64_stopped_data_address):
1358 Likewise.
1359
1360 2018-04-27 Tom Tromey <tom@tromey.com>
1361
1362 * configure: Rebuild.
1363
1364 2018-04-23 Tom Tromey <tom@tromey.com>
1365
1366 * configure: Rebuild.
1367
1368 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1369
1370 * Makefile.in (depcomp): Add "..".
1371 (all_deps_files): New and use it.
1372
1373 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1374
1375 * configure.srv (aarch64*-*-linux*): Don't include xml.
1376 (i[34567]86-*-cygwin*): Likewise.
1377 (i[34567]86-*-linux*): Likewise.
1378 (i[34567]86-*-lynxos*): Likewise.
1379 (i[34567]86-*-mingw32ce*): Likewise.
1380 (i[34567]86-*-mingw*): Likewise.
1381 (i[34567]86-*-nto*): Likewise.
1382 (tic6x-*-uclinux): Likewise.
1383 (x86_64-*-linux*): Likewise.
1384 (x86_64-*-mingw*): Likewise.
1385 (x86_64-*-cygwin*): Likewise.
1386
1387 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1388
1389 * tdesc.c: Remove xml parameter.
1390
1391 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1392
1393 * server.c (get_features_xml): Remove cast.
1394 * tdesc.c (void target_desc::accept): Fill in function.
1395 (tdesc_get_features_xml): Remove old xml creation.
1396 (print_xml_feature::visit_pre): Add xml vistor.
1397 * tdesc.h (struct target_desc): Make xmltarget mutable.
1398 (tdesc_get_features_xml): Remove declaration.
1399
1400 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1401
1402 * tdesc.c (tdesc_architecture_name): Add new function.
1403 (tdesc_osabi_name): Likewise.
1404 (tdesc_get_features_xml): Use new functions.
1405
1406 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1407
1408 * tdesc.c (tdesc_create_flags): Remove.
1409 (tdesc_add_flag): Likewise.
1410 (tdesc_named_type): Likewise.
1411 (tdesc_create_union): Likewise.
1412 (tdesc_create_struct): Likewise.
1413 (tdesc_create_vector): Likewise.
1414 (tdesc_add_bitfield): Likewise.
1415 (tdesc_add_field): Likewise.
1416 (tdesc_set_struct_size): Likewise.
1417
1418 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1419
1420 * tdesc.c (~target_desc): Remove implictly deleted items.
1421 (init_target_desc): Iterate all features.
1422 (tdesc_get_features_xml): Use vector.
1423 (tdesc_create_feature): Create feature.
1424 * tdesc.h (tdesc_feature) Remove
1425 (target_desc): Add features.
1426
1427 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1428
1429 * Makefile.in: Add common/tdesc.c
1430 * tdesc.c (init_target_desc): init all reg_defs from register
1431 vector.
1432 (tdesc_create_reg): Create tdesc_reg.
1433 * tdesc.h (tdesc_feature): Add register vector.
1434
1435 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1436
1437 * tdesc.h (struct target_desc) <features>: Change type to
1438 std::vector<std::string>.
1439 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1440 changes.
1441 (tdesc_get_features_xml): Likewise.
1442 (tdesc_create_feature): Likewise.
1443
1444 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1445
1446 * regcache.c (find_register_by_number): Return a ref.
1447 (find_regno): Use references.
1448 (register_size): Likewise.
1449 (register_data): Likewise.
1450 * tdesc.c (target_desc::~target_desc): Remove free calls.
1451 (target_desc::operator==): Use std::vector compare.
1452 (init_target_desc): Use reference.
1453 (tdesc_create_reg): Use reg constructors.
1454 * tdesc.h (struct target_desc): Replace pointer with object.
1455
1456 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1457
1458 * regcache.c (find_register_by_number): Make static.
1459 (find_regno): Use find_register_by_number
1460 * regcache.h (struct reg): Remove declaration.
1461
1462 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1463
1464 * tdesc.c (target_desc::~target_desc): Move to here.
1465 (target_desc::operator==): Likewise.
1466 * tdesc.h (target_desc::~target_desc): Move from here.
1467 (target_desc::operator==): Likewise.
1468
1469 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1470
1471 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1472
1473 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1474
1475 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1476 S390_TDESC_GS.
1477 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1478 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1479 and init_registers_s390_gs_linux64.
1480
1481 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1482
1483 * linux-s390-low.c (s390_fill_gs): Remove function.
1484 (s390_fill_gsbc): Remove function.
1485 (s390_regsets): Set fill functions for the guarded storage regsets
1486 to NULL.
1487
1488 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1489
1490 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1491 the word size. Add comment.
1492 (s390_get_wordsize): New function.
1493 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1494 pswm with it. Instead, use s390_get_wordsize to determine the
1495 word size first and derive the correct tdesc from that directly.
1496
1497 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1498
1499 * Makefile.in: Include silent-rules.mk.
1500 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1501 (COMPILE): Add ECHO_CXX.
1502 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1503 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1504 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1505 (version-generated.c): Add ECHO_GEN.
1506 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1507 (IPAGENT_COMPILE): Add ECHO_CXX.
1508 (%-generated.c): Add ECHO_REGDAT.
1509
1510 2018-03-14 Tom Tromey <tom@tromey.com>
1511
1512 PR cli/14977:
1513 * ax.c (ax_printf): Special case for NULL.
1514
1515 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * linux-low.c (linux_qxfer_libraries_svr4): Use
1518 xml_escape_text_append.
1519
1520 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1521
1522 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1523
1524 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1525
1526 * server.c (handle_general_set): Remove unnecessary xstrdup.
1527
1528 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1529
1530 * server.c (parse_debug_format_options): Adjust to
1531 delim_string_to_char_ptr_vec changes.
1532 * thread-db.c (thread_db_load_search): Adjust to
1533 dirnames_to_char_ptr_vec changes.
1534
1535 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1536
1537 * target.h (target_enable_btrace, target_disable_btrace)
1538 (target_read_btrace, target_read_btrace_conf): Turn macro into
1539 inline function. Throw error if target method is not defined.
1540 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1541 check for btrace target method. Be prepared to handle exceptions
1542 from btrace target methods.
1543
1544 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1545
1546 * server.c (captured_main): Change order of error message printed
1547 when the current working directory cannot be found.
1548
1549 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1550
1551 * server.c: Include "filenames.h" and "pathstuff.h".
1552 (program_name): Delete variable.
1553 (program_path): New anonymous class.
1554 (get_exec_wrapper): Use "program_path" instead of
1555 "program_name".
1556 (handle_v_run): Likewise.
1557 (captured_main): Likewise.
1558 (process_serial_event): Likewise.
1559
1560 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1561
1562 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1563 (OBJS): Add "pathstuff.o".
1564 * server.c (current_directory): New global variable.
1565 (captured_main): Initialize "current_directory".
1566
1567 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1568
1569 * tdesc.c: Use common/tdesc.h.
1570 * tdesc.h: Likewise.
1571
1572 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1573 Simon Marchi <simon.marchi@ericsson.com>
1574
1575 * Makefile.in: Switch order of make rules.
1576
1577 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1578
1579 * Makefile.in: Add common directory in build.
1580 * configure.ac: Add common reference.
1581 * configure: Regenerate.
1582
1583 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1584
1585 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1586 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1587 * spu-low.c (spu_target_ops): Likewise.
1588 * win32-low.c (win32_target_ops): Likewise.
1589 * server.c (supported_btrace_packets): Report packets unconditionally.
1590 * target.h (target_ops) <supports_btrace>: Remove.
1591 (target_supports_btrace): Remove.
1592
1593 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1594
1595 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1596 (handle_btrace_disable): Change return type to void. Use exceptions
1597 to report errors.
1598 (handle_btrace_general_set): Catch exception and copy message to
1599 return message.
1600
1601 2018-02-08 Tom Tromey <tom@tromey.com>
1602
1603 * linux-low.c (install_software_single_step_breakpoints): Use
1604 make_scoped_restore.
1605 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1606 (do_restore_current_thread_cleanup): Remove.
1607 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1608 declare.
1609
1610 2018-02-08 Tom Tromey <tom@tromey.com>
1611
1612 * mem-break.c (set_raw_breakpoint_at): Use
1613 gdb::unique_xmalloc_ptr.
1614
1615 2018-01-30 Pedro Alves <palves@redhat.com>
1616
1617 PR gdb/13211
1618 * target.c (target_terminal::terminal_state): Rename to ...
1619 (target_terminal::m_terminal_state): ... this.
1620
1621 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1622
1623 * linux-low.c (handle_extended_wait): Surround call to
1624 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1625
1626 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1627
1628 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1629 linux_ptrace_attach_fail_reason_string now returning an
1630 std::string.
1631 (linux_attach): Likewise.
1632 * thread-db.c (attach_thread): Likewise.
1633
1634 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1635
1636 PR gdb/21559
1637 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1638 checking for fs_base/gs_base fields in struct user_regs_struct.
1639 * configure: Regenerate.
1640
1641 2018-01-16 Yao Qi <yao.qi@linaro.org>
1642
1643 PR gdb/18749
1644 * linux-low.c (fetch_register): Call supply_register instead of
1645 error.
1646
1647 2018-01-08 Yao Qi <yao.qi@linaro.org>
1648 Simon Marchi <simon.marchi@ericsson.com>
1649
1650 * Makefile.in (OBS): Remove selftest.o.
1651 * configure.ac: Set srv_selftest_objs if $development is true.
1652 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1653 * configure: Re-generated.
1654 * server.c (captured_main): Wrap variable selftest_filter with
1655 GDB_SELF_TEST.
1656
1657 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1658
1659 * server.c (parse_debug_format_options): Return std::string.
1660 (handle_monitor_command, captured_main): Adjust.
1661
1662 2018-01-05 Pedro Alves <palves@redhat.com>
1663
1664 PR gdb/18653
1665 * server.c (captured_main): Pass quiet=false to
1666 save_original_signals_state.
1667
1668 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1669
1670 * gdbreplay.c (gdbreplay_version): Update copyright year in
1671 version message.
1672 * server.c (gdbserver_version): Likewise.
1673
1674 2017-12-08 Tom Tromey <tom@tromey.com>
1675
1676 * ax.c (ax_printf): Update.
1677
1678 2017-12-07 Yao Qi <yao.qi@linaro.org>
1679
1680 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1681 aarch64_linux_read_description.
1682 * linux-amd64-ipa.c (idx2mask): New array.
1683 (get_ipa_tdesc): Move idx2mask out.
1684 (initialize_low_tracepoint): Initialize target descriptions.
1685 * linux-i386-ipa.c (idx2mask): New array.
1686 (get_ipa_tdesc): Move idx2mask out.
1687 (initialize_low_tracepoint): Initialize target descriptions.
1688
1689 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1690
1691 * tdesc.c (struct tdesc_type): Change return type.
1692 (tdesc_add_flag): Change parameter type.
1693 (tdesc_add_bitfield): Likewise.
1694 (tdesc_add_field): Likewise.
1695 (tdesc_set_struct_size): Likewise.
1696
1697 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1698
1699 * regcache.c (registers_to_string): Remove unused variable.
1700
1701 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * inferiors.c (for_each_inferior_with_data): Remove.
1704 * inferiors.h (for_each_inferior_with_data): Remove.
1705 * server.c (handle_qxfer_threads_worker): Change parameter type.
1706 (handle_qxfer_threads_proper): Use for_each_thread.
1707
1708 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1709
1710 * inferiors.c (for_each_inferior): Remove.
1711 (clear_inferiors): Use for_each_thread.
1712 * inferiors.h (for_each_inferior): Remove.
1713 * linux-low.c (linux_wait_for_event_filtered): Use
1714 for_each_thread.
1715 (linux_stabilize_threads): Likewise.
1716 * regcache.c (regcache_release): Likewise.
1717 * server.c (gdb_wants_all_threads_stopped): Likewise.
1718 (clear_pending_status_callback): Remove.
1719 (handle_status): Use for_each_thread.
1720 (captured_main): Likewise.
1721 * win32-low.c (child_init_thread_list): Likewise.
1722 (win32_clear_inferiors): Likewise.
1723 (fake_breakpoint_event): Likewise.
1724
1725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * inferiors.h (find_inferior): Remove.
1728 * inferiors.c (find_inferior): Remove.
1729
1730 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1731
1732 * linux-low.c (resume_status_pending_p): Update comment.
1733 (need_step_over_p): Update comment.
1734
1735 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1736
1737 * linux-low.c (proceed_one_lwp): Return void, change parameter
1738 type.
1739 (unsuspend_and_proceed_one_lwp): Likewise.
1740 (proceed_all_lwps): Use for_each_thread.
1741 (unstop_all_lwps): Likewise.
1742
1743 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * linux-low.c (linux_resume_one_thread): Return void, take
1746 parameter directly.
1747 (linux_resume): Use for_each_thread.
1748
1749 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * linux-low.c (send_sigstop_callback): Return void, change
1752 parameter type. Rename to...
1753 (send_sigstop): ... this.
1754 (suspend_and_send_sigstop_callback): Return void, change parameter
1755 type. Rename to...
1756 (suspend_and_send_sigstop): ... this.
1757 (stop_all_lwps): Use for_each_thread.
1758
1759 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1760
1761 * linux-low.c (lwp_running): Return bool, remove unused
1762 argument.
1763 (linux_stabilize_threads): Use find_thread.
1764
1765 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1766
1767 * linux-low.c (select_singlestep_lwp_callback): Remove.
1768 (count_events_callback): Remove.
1769 (select_event_lwp_callback): Remove.
1770 (select_event_lwp): Use find_thread/for_each_thread.
1771
1772 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1773
1774 * linux-low.c (not_stopped_callback): Return bool, take filter
1775 argument directly.
1776 (linux_wait_for_event_filtered): Use find_thread.
1777 (linux_wait_1): Likewise.
1778
1779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1780
1781 * linux-low.c (same_lwp): Remove.
1782 (find_lwp_pid): Use find_thread.
1783
1784 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1785
1786 * linux-low.c (delete_lwp_callback): Remove.
1787 (linux_mourn): Use for_each_thread.
1788
1789 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1790
1791 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1792 args parameter, don't check for pid.
1793 (linux_detach): Use for_each_thread.
1794
1795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * linux-low.c (struct counter): Remove.
1798 (second_thread_of_pid_p): Remove.
1799 (last_thread_of_process_p): Use find_thread.
1800
1801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * inferiors.c (find_inferior_in_random): Remove.
1804 * inferiors.h (find_inferior_in_random): Remove.
1805 * linux-low.c (status_pending_p_callback): Return bool, accept
1806 parameter ptid directly.
1807 (linux_wait_for_event_filtered): Use find_thread_in_random.
1808 (linux_wait_1): Likewise.
1809
1810 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1811
1812 * inferiors.c (find_inferior_id): Remove.
1813 (find_thread_ptid): Move implemention from find_inferior_id to
1814 here.
1815 * inferiors.h (find_inferior_id): Remove.
1816 * server.c (handle_status): Use find_thread_ptid.
1817 (process_serial_event): Likewise.
1818 * thread-db.c (find_one_thread): Likewise.
1819 (thread_db_thread_handle): Likewise.
1820 * win32-low.c (thread_rec): Likewise.
1821 (child_delete_thread): Likewise.
1822 (win32_thread_alive): Likewise.
1823 (get_child_debug_event): Likewise.
1824
1825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1826
1827 * linux-mips-low.c (update_watch_registers_callback): Return
1828 void, remove pid_p parameter, don't check for pid.
1829 (mips_insert_point, mips_remove_point): Use for_each_thread.
1830
1831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * lynx.low (lynx_delete_thread_callback): Remove.
1834 (lynx_mourn): Use for_each_thread.
1835
1836 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1837
1838 * regcache.c (regcache_invalidate_one): Remove.
1839 (regcache_invalidate_pid): use for_each_thread.
1840
1841 2017-11-26 Tom Tromey <tom@tromey.com>
1842
1843 * linux-low.c (linux_create_inferior): Update.
1844
1845 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1846
1847 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1848
1849 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1850
1851 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1852 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1853 * linux-aarch64-tdesc-selftest.c: New file.
1854 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1855
1856 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1857
1858 * configure.srv: Add new file.
1859 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1860 * linux-aarch64-tdesc-selftest.c: New file.
1861 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1862
1863 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1864
1865 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1866 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1867 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1868
1869 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1870
1871 * configure.srv: Add new files.
1872 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1873 aarch64_linux_read_description.
1874 * linux-aarch64-low.c (aarch64_linux_read_description):
1875 Merge with aarch64_arch_setup.
1876 (aarch64_arch_setup): Call aarch64_linux_read_description.
1877 * linux-aarch64-tdesc.c: New file.
1878 * linux-aarch64-tdesc.h: New file.
1879
1880 2017-11-24 Yao Qi <yao.qi@linaro.org>
1881
1882 * configure.srv: Set $srv_regobj for tic6x-linux.
1883 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1884 (tic6x_read_description): Move some code to tic6x_arch_setup.
1885 (tic6x_tdesc_test): New function.
1886 (initialize_low_arch): Call selftests::register_test.
1887
1888 2017-11-22 Yao Qi <yao.qi@linaro.org>
1889
1890 * remote-utils.c (prepare_resume_reply): Use memcpy.
1891
1892 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1893
1894 * linux-low.c (kill_one_lwp_callback): Return void, take
1895 argument directly, don't filter on pid.
1896 (linux_kill): Use for_each_thread.
1897
1898 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * linux-low.c (need_step_over_p): Return bool, remove dummy
1901 argument.
1902 (linux_resume, proceed_all_lwps): Use find_thread.
1903
1904 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * linux-low.c (resume_status_pending_p): Return bool, remove
1907 flag_p argument.
1908 (linux_resume): Use find_thread.
1909
1910 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1911
1912 * linux-low.c (struct thread_resume_array): Remove.
1913 (linux_set_resume_request): Return void, take arguments
1914 directly.
1915 (linux_resume): Use for_each_thread.
1916
1917 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1920 return bool, remove data argument.
1921 (linux_stabilize_threads): Use find_thread.
1922
1923 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * linux-low.c (unsuspend_one_lwp): Remove.
1926 (unsuspend_all_lwps): Use for_each_thread, inline code from
1927 unsuspend_one_lwp.
1928
1929 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1932 * linux-low.c (struct iterate_over_lwps_args): Remove.
1933 (iterate_over_lwps_filter): Remove.
1934 (iterate_over_lwps): Use find_thread.
1935
1936 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1937
1938 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1939 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1940 code from reset_lwp_ptrace_options_callback.
1941
1942 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1943
1944 * linux-arm-low.c (struct update_registers_data): Remove.
1945 (update_registers_callback): Return void, take arguments
1946 directly, don't check thread's pid.
1947 (arm_insert_point, arm_remove_point): Use for_each_thread.
1948
1949 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * win32-low.c (continue_one_thread): Return void, take argument
1952 directly.
1953 (child_continue): Use for_each_thread.
1954
1955 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1956
1957 * win32-i386-low.c (update_debug_registers_callback): Rename
1958 to ...
1959 (update_debug_registers): ... this, return void, remove pid_p arg.
1960 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1961
1962 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1963
1964 * inferiors.h (struct process_info): Add constructor, initialize
1965 fields..
1966 <syscalls_to_catch>: Change type to std::vector<int>.
1967 * inferiors.c (add_process): Allocate process_info with new.
1968 (remove_process): Free process_info with delete.
1969 * linux-low.c (handle_extended_wait): Adjust.
1970 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1971 * server.c (handle_general_set): Adjust.
1972
1973 2017-11-16 Pedro Alves <palves@redhat.com>
1974
1975 * remote-utils.c (remote_close): Block SIGIO signals instead of
1976 uninstalling the SIGIO handler.
1977
1978 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1979
1980 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1981
1982 2017-11-16 Yao Qi <yao.qi@linaro.org>
1983
1984 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1985 (tic6x_store_gregset): Likewise.
1986 (tic6x_usrregs_info): Move it up.
1987
1988 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1989
1990 * Makefile.in: Update arch rules.
1991 * configure.srv: Explicitly mark arch/ files.
1992
1993 2017-11-13 Andreas Schwab <schwab@suse.de>
1994
1995 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1996 function.
1997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1998
1999 2017-11-06 Pedro Alves <palves@redhat.com>
2000
2001 * config.in, configure: Regenerate.
2002
2003 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2004
2005 * target.c (struct thread_search): Remove.
2006 (thread_search_callback): Remove.
2007 (prepare_to_access_memory): Use for_each_thread instead of
2008 find_inferior. Inline code from thread_search_callback.
2009
2010 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2011
2012 * server.c (struct visit_actioned_threads_data): Remove.
2013 (visit_actioned_threads): Change prototype to take arguments
2014 directly.
2015 (resume): Use find_thread instead of find_inferior.
2016
2017 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2018
2019 * server.c (queue_stop_reply_callback): Change prototype, return
2020 void.
2021 (find_status_pending_thread_callback): Remove.
2022 (handle_status): Replace find_inferior with find_thread and
2023 for_each_thread.
2024
2025 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2026
2027 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2028 with REGNO.
2029 (aarch64_store_gregset): Likewise.
2030 (aarch64_fill_fpregset): Likewise.
2031 (aarch64_store_fpregset): Likewise.
2032
2033 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2034
2035 * gdbthread.h (find_thread, for_each_thread): New functions.
2036 * inferiors.c (thread_of_pid): Remove.
2037 (find_any_thread_of_pid): Use find_thread.
2038 * linux-low.c (num_lwps): Use for_each_thread.
2039
2040 2017-10-17 Yao Qi <yao.qi@linaro.org>
2041
2042 * Makefile.in: Remove one rule.
2043 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2044
2045 2017-10-17 Yao Qi <yao.qi@linaro.org>
2046
2047 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2048 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2049
2050 2017-10-17 Yao Qi <yao.qi@linaro.org>
2051
2052 * configure.srv: Rename arm.o with arch/arm.o.
2053
2054 2017-10-17 Yao Qi <yao.qi@linaro.org>
2055
2056 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2057 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2058 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2059 (arch-i386.o, arch-amd64.o): Remove rules.
2060 (arch/%.o): New rule.
2061 Update POSTCOMPILE and COMPILE.pre.
2062 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2063 * configure: Re-generated.
2064 * configure.srv: Replace arch-i386.o with arch/i386.o.
2065 Replace arch-amd64.o with arch/amd64.o.
2066
2067 2017-10-16 Yao Qi <yao.qi@linaro.org>
2068
2069 * configure: Regenerated.
2070
2071 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2072
2073 * inferiors.h: (struct inferior_list): Remove.
2074 (struct inferior_list_entry); Remove.
2075 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2076 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2077 get_first_inferior): Remove.
2078 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2079 find_inferior_id, find_inferior_in_random): Change signature.
2080 * inferiors.c (all_threads): Change type to
2081 std::list<thread_info *>.
2082 (get_thread): Remove macro.
2083 (find_inferior, find_inferior_id): Change signature, implement
2084 using find_thread.
2085 (find_inferior_in_random): Change signature, implement using
2086 find_thread_in_random.
2087 (for_each_inferior, for_each_inferior_with_data): Change
2088 signature, implement using for_each_thread.
2089 (add_inferior_to_list, remove_inferior): Remove.
2090 (add_thread, get_first_thread, thread_of_pid,
2091 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2092 (get_first_inferior, one_inferior_p, clear_inferior_list):
2093 Remove.
2094 (clear_inferiors, get_thread_process): Update.
2095 * gdbthread.h: Include <list>.
2096 (struct thread_info) <entry>: Remove field.
2097 <id>: New field.
2098 (all_threads): Change type to std::list<thread_info *>.
2099 (get_first_inferior): Add doc.
2100 (find_thread, for_each_thread, find_thread_in_random): New
2101 functions.
2102 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2103 * linux-arm-low.c (update_registers_callback): Update.
2104 * linux-low.c (second_thread_of_pid_p): Update.
2105 (kill_one_lwp_callback, linux_detach_lwp_callback,
2106 delete_lwp_callback, status_pending_p_callback, same_lwp,
2107 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2108 iterate_over_lwps, not_stopped_callback,
2109 resume_stopped_resumed_lwps, count_events_callback,
2110 select_singlestep_lwp_callback, select_event_lwp_callback,
2111 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2112 suspend_and_send_sigstop_callback, wait_for_sigstop,
2113 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2114 lwp_running, linux_set_resume_request, resume_status_pending_p,
2115 need_step_over_p, start_step_over, linux_resume_one_thread,
2116 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2117 reset_lwp_ptrace_options_callback): Update.
2118 * linux-mips-low.c (update_watch_registers_callback): Update.
2119 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2120 Update.
2121 (free_register_cache_thread_one): Remove.
2122 (regcache_release): Update.
2123 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2124 handle_qxfer_threads_worker): Update.
2125 (handle_query): Update, use list iterator.
2126 (visit_actioned_threads, handle_pending_status,
2127 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2128 clear_pending_status_callback, set_pending_status_callback,
2129 find_status_pending_thread_callback, handle_status,
2130 process_serial_event): Update.
2131 * target.c (thread_search_callback): Update.
2132 * thread-db.c (thread_db_get_tls_address): Update.
2133 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2134 Update.
2135 * win32-i386-low.c (update_debug_registers_callback): Update.
2136 * win32-low.c (delete_thread_info, child_delete_thread,
2137 continue_one_thread, suspend_one_thread,
2138 get_child_debug_event): Adjust.
2139
2140 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2141
2142 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2143 * inferiors.h: Include <list>.
2144 (struct process_info) <entry>: Remove field.
2145 <pid>: New field.
2146 (pid_of): Change macro to function.
2147 (ptid_of, lwpid_of): Remove macro.
2148 (all_processes): Change type to std::list<process_info *>.
2149 (ALL_PROCESSES): Remove macro.
2150 (for_each_process, find_process): New function.
2151 * inferiors.c (all_processes): Change type to
2152 std::list<process_info *>.
2153 (find_thread_process): Adjust.
2154 (add_process): Likewise.
2155 (remove_process): Likewise.
2156 (find_process_pid): Likewise.
2157 (get_first_process): Likewise.
2158 (started_inferior_callback): Remove.
2159 (have_started_inferiors_p): Adjust.
2160 (attached_inferior_callback): Remove.
2161 (have_attached_inferiors_p): Adjust.
2162 * linux-low.c (check_zombie_leaders): Likewise.
2163 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2164 (x86_linux_update_xmltarget): Adjust.
2165 * server.c (handle_query): Likewise.
2166 (gdb_reattached_process): Remove.
2167 (handle_status): Adjust.
2168 (kill_inferior_callback): Likewise.
2169 (detach_or_kill_inferior): Remove.
2170 (print_started_pid): Likewise.
2171 (print_attached_pid): Likewise.
2172 (detach_or_kill_for_exit): Update.
2173 (process_serial_event): Likewise.
2174 * linux-arm-low.c (arm_new_fork): Likewise.
2175
2176 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2177
2178 * dll.h: Include <list>.
2179 (struct dll_info): Add constructor.
2180 <entry>: Remove field.
2181 (all_dlls): Change type to std::list<dll_info>.
2182 * dll.c: Include <algorithm>.
2183 (get_dll): Remove macro.
2184 (all_dlls): Change type to std::list<dll_info *>.
2185 (free_one_dll): Remove.
2186 (match_dll): Likewise.
2187 (loaded_dll): Adjust.
2188 (unloaded_dll): Adjust to all_dlls type change, use
2189 std::find_if. Inline code from match_dll.
2190 (clear_dlls): Adjust to all_dlls type change.
2191 * server.c (emit_dll_description): Remove.
2192 (handle_qxfer_libraries): Adjust to all_dlls type change,
2193 integrate emit_dll_description's functionality.
2194
2195 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2196
2197 * linux-low.h (struct linux_target_ops) <delete_process>: New
2198 field.
2199 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2200 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2201 (struct linux_target_ops): Add delete_process callback.
2202 * linux-arm-low.c (arm_delete_process): New.
2203 (struct linux_target_ops): Add delete_process callback.
2204 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2205 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2206 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2207 * linux-mips-low.c (mips_linux_delete_process): New.
2208 (struct linux_target_ops): Add delete_process callback.
2209 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2210 * linux-s390-low.c (struct linux_target_ops): Likewise.
2211 * linux-sh-low.c (struct linux_target_ops): Likewise.
2212 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2213 * linux-tile-low.c (struct linux_target_ops): Likewise.
2214 * linux-x86-low.c (x86_linux_delete_process): New.
2215 (struct linux_target_ops): Add delete_process callback.
2216 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2217
2218 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * linux-aarch64-low.c (the_low_target): Add thread delete
2221 callback.
2222 * linux-arm-low.c (arm_delete_thread): New function.
2223 (the_low_target): Add thread delete callback.
2224 * linux-bfin-low.c (the_low_target): Likewise.
2225 * linux-crisv32-low.c (the_low_target): Likewise.
2226 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2227 set.
2228 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2229 field.
2230 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2231 * linux-mips-low.c (mips_linux_delete_thread): New function.
2232 (the_low_target): Add thread delete callback.
2233 * linux-ppc-low.c (the_low_target): Likewise.
2234 * linux-s390-low.c (the_low_target): Likewise.
2235 * linux-sh-low.c (the_low_target): Likewise.
2236 * linux-tic6x-low.c (the_low_target): Likewise.
2237 * linux-tile-low.c (the_low_target): Likewise.
2238 * linux-x86-low.c (the_low_target): Likewise.
2239 * linux-xtensa-low.c (the_low_target): Likewise.
2240
2241 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2242
2243 * win32-low.c: Include "common-inferior.h".
2244
2245 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2246
2247 * inferiors.c (set_inferior_cwd): New function.
2248 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2249 (handle_query): Inform that QSetWorkingDir is supported.
2250 * win32-low.c (create_process): Pass the inferior's cwd to
2251 CreateProcess.
2252
2253 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2254
2255 * inferiors.c (current_inferior_cwd): New global variable.
2256 (get_inferior_cwd): New function.
2257 * inferiors.h (struct process_info) <cwd>: New field.
2258
2259 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2260
2261 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2262 (OBS): Add gdb_tilde_expand.o.
2263
2264 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2265
2266 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2267 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2268
2269 2017-09-29 Pedro Alves <palves@redhat.com>
2270
2271 * ax.c (gdb_parse_agent_expr): Constify.
2272 * ax.h (gdb_parse_agent_expr): Constify.
2273 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2274 Constify.
2275 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2276 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2277 * remote-utils.h (read_ptid): Constify.
2278 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2279 (process_point_options, process_serial_event): Constify.
2280 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2281 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2282 (cmd_qtbuffer): Constify.
2283
2284 2017-09-29 Pedro Alves <palves@redhat.com>
2285
2286 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2287 fails.
2288
2289 2017-09-29 Pedro Alves <palves@redhat.com>
2290
2291 * linux-low.c (handle_extended_wait): Pass parent thread instead
2292 of process to thread_db_notice_clone.
2293 * linux-low.h (thread_db_notice_clone): Replace parent process
2294 parameter with parent thread parameter.
2295 * thread-db.c (find_one_thread): Add comment.
2296 (thread_db_notice_clone): Replace parent process parameter with
2297 parent thread parameter. Temporarily switch to the parent thread.
2298
2299 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2300
2301 * gdbthread.h: Include "common-gdbthread.h".
2302 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2303 "if" when validating the ptid.
2304 * remote-utils.c: Include "gdbthread.h".
2305 (prepare_resume_reply): Use "switch_to_thread".
2306 * target.c (done_accessing_memory): Likewise.
2307
2308 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2309
2310 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2311 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2312 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2313 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2314 s390x-gs-linux64-ipa.o to ipa_obj.
2315 * linux-s390-low.c (HWCAP_S390_GS): New define.
2316 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2317 New functions.
2318 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2319 (s390_arch_setup): Check for guarded-storage support and choose
2320 appropriate tdesc.
2321 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2322 init_registers_s390x_gs_linux64.
2323 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2324 enum value.
2325 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2326 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2327
2328 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2331
2332 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2333
2334 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2335 (thread_db_thread_handle): Declare.
2336 * linux-low.c (linux_target_ops): Initialize thread_handle.
2337 * server.c (handle_qxfer_threads_worker): Add support for
2338 "handle" attribute.
2339 * target.h (struct target_ops): Add new function pointer,
2340 thread_handle.
2341 (target_thread_handle): Define.
2342 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2343 field in lwp.
2344 (thread_db_thread_handle): New function.
2345
2346 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2347
2348 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2349 * linux-low.h (thread_db_notice_clone): Declare.
2350 * thread-db.c (thread_db_notice_clone): New function.
2351
2352 2017-09-21 Pedro Alves <palves@redhat.com>
2353
2354 * server.c (gdb_read_memory, handle_status, process_serial_event)
2355 (handle_serial_event, handle_target_event): Adjust to
2356 set_desired_thread prototype change.
2357 * target.c (set_desired_thread): Remove 'use_general' parameter
2358 and adjust.
2359 * target.h (set_desired_thread): Remove 'use_general' parameter.
2360
2361 2017-09-20 Tom Tromey <tom@tromey.com>
2362
2363 * target.c (target_terminal::terminal_state): Define.
2364 (target_terminal::init): Rename from target_terminal_init.
2365 (target_terminal::inferior): Rename from
2366 target_terminal_inferior.
2367 (target_terminal::ours): Rename from target_terminal_ours.
2368 (target_terminal::ours_for_output, target_terminal::info): New.
2369
2370 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2371
2372 * server.c (accumulate_file_name_length): Remove.
2373 (emit_dll_description): Adjust to std::string change.
2374 (handle_qxfer_libraries): Use std::string to hold document.
2375
2376 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2377
2378 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2379 return type of xml_escape_text.
2380 * server.c (emit_dll_description): Likewise.
2381
2382 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * server.c (captured_main): Accept argument for --selftest.
2385 Update run_tests call.
2386 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2387 when registering selftests.
2388
2389 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2390
2391 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2392 instead of "VEC" for "target_desc.reg_defs".
2393 (regcache_cpy): Likewise.
2394 (registers_to_string): Likewise.
2395 (registers_from_string): Likewise.
2396 (find_regno): Likewise.
2397 (supply_regblock): Likewise.
2398 (regcache_raw_read_unsigned): Likewise.
2399 * tdesc.c (init_target_desc): Likewise.
2400 (tdesc_create_reg): Likewise.
2401 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2402 (struct target_desc) <reg_defs>: Convert to "std::vector".
2403 (target_desc): Do not initialize "reg_defs".
2404 (~target_desc): Update code to use "std::vector" instead of "VEC"
2405 for "target_desc.reg_defs".
2406 (operator==): Likewise.
2407
2408 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2409
2410 * inferiors.h (thread_to_gdb_id): Remove.
2411 * inferiors.c (thread_to_gdb_id): Remove.
2412 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2413 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2414 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2415 Likewise.
2416 * nto-low.c (nto_fetch_registers, nto_store_registers,
2417 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2418
2419 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2420
2421 * inferiors.h (gdb_id_to_thread_id): Remove.
2422 * inferiors.c (gdb_id_to_thread_id): Remove.
2423 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2424 removal. Move pid declaration closer to where it's used.
2425
2426 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2427
2428 * server.c (handle_detach): New function.
2429 (process_serial_event): Move code out, call handle_detach.
2430
2431 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * server.c (require_running): Rename to ...
2434 (require_running_or_return): ... this ...
2435 (require_running_or_break): ... and this.
2436 (handle_query, process_serial_event): Adjust.
2437
2438 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2439
2440 * linux-low.c (linux_set_resume_request): Remove unused
2441 variables.
2442
2443 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2444
2445 * server.c (first_thread_of): Remove.
2446 (process_serial_event): Replace usage of first_thread_of with
2447 find_any_thread_of_pid.
2448 * tracepoint.c (same_process_p): Remove.
2449 (gdb_agent_about_to_close): Replace usage of same_process_p with
2450 find_any_thread_of_pid.
2451 * linux-x86-low.c (same_process_callback): Remove.
2452 (x86_arch_setup_process_callback): Replace usage of
2453 same_process_callback with find_any_thread_of_pid.
2454 * thread-db.c (any_thread_of): Remove.
2455 (switch_to_process): Replace usage of any_thread_of with
2456 find_any_thread_of_pid.
2457 * inferiors.c (thread_pid_matches_callback): Remove.
2458 (find_thread_process): Adjust to use find_any_thread_of_pid.
2459
2460 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2461
2462 * regcache.c (get_thread_regcache): Guard calls to "memset"
2463 with "!VEC_empty".
2464
2465 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2466
2467 * linux-low.c (handle_extended_wait): Use
2468 "allocate_target_description" instead of "XNEW".
2469 * linux-x86-low.c (initialize_low_arch): Likewise.
2470
2471 2017-09-05 Yao Qi <yao.qi@linaro.org>
2472
2473 * configure.srv (srv_i386_regobj): Remove.
2474 (srv_amd64_regobj): Remove.
2475 (srv_regobj): Set it to "" for x86 non-linux targets.
2476 * linux-x86-tdesc.c (i386_linux_read_description):
2477 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2478 (init_registers_i386): Remove the declaration.
2479 (tdesc_i386): Remove the declaration.
2480 (lynx_i386_arch_setup): Call i386_create_target_description.
2481 * nto-x86-low.c: Likewise.
2482 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2483 [!__x86_64__]: include arch/i386.h.
2484 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2485
2486 2017-09-05 Yao Qi <yao.qi@linaro.org>
2487
2488 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2489 i386/amd64-XXX-linux from it.
2490
2491 2017-09-05 Yao Qi <yao.qi@linaro.org>
2492
2493 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2494 false.
2495 (ipa_amd64_linux_regobj): Remove.
2496 (ipa_x32_linux_regobj): Remove.
2497
2498 2017-09-05 Yao Qi <yao.qi@linaro.org>
2499
2500 * Makefile.in (arch-amd64.o): New rule.
2501 * configure.srv: Append arch-amd64.o.
2502 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2503 (get_ipa_tdesc): Call amd64_linux_read_description.
2504 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2505 and init_registers_amd64_XXX.
2506 * linux-x86-low.c (x86_linux_read_description): Call
2507 amd64_linux_read_description.
2508 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2509 (initialize_low_arch): Don't call init_registers_x32_XXX and
2510 init_registers_amd64_XXX.
2511 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2512 and tdesc_amd64_XXX.
2513 [__x86_64__] (amd64_tdesc_test): New function.
2514 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2515 and init_registers_amd64_XXX.
2516 * linux-x86-tdesc.c: Include arch/amd64.h.
2517 (xcr0_to_tdesc_idx): New function.
2518 (i386_linux_read_description): New function.
2519 (amd64_get_ipa_tdesc_idx): New function.
2520 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2521 (amd64_get_ipa_tdesc): Declare.
2522
2523 2017-09-05 Yao Qi <yao.qi@linaro.org>
2524
2525 * configure.srv (srv_i386_linux_xmlfiles): Remove
2526 i386/i386-XXX-linux.xml from it.
2527
2528 2017-09-05 Yao Qi <yao.qi@linaro.org>
2529
2530 * configure.srv: Set srv_i386_linux_regobj empty if $development
2531 is false.
2532 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2533 initialize_low_tdesc.
2534 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2535 with #if initialize_low_tdesc.
2536 * linux-x86-tdesc-selftest.c: New file.
2537 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2538
2539 2017-09-05 Yao Qi <yao.qi@linaro.org>
2540
2541 * Makefile.in (arch-i386.o): New rule.
2542 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2543 (x86_64-*-linux*): Likewise.
2544 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2545 include arch/i386.h.
2546 (i386_linux_read_description): Remove code and call
2547 i386_create_target_description.
2548 * tdesc.c (allocate_target_description): New function.
2549 * tdesc.h (set_tdesc_architecture): Remove declaration.
2550 (set_tdesc_osabi): Likewise.
2551
2552 2017-09-05 Yao Qi <yao.qi@linaro.org>
2553
2554 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2555 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2556 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2557 .xmltarget.
2558 * server.c (get_features_xml): Call tdesc_get_features_xml.
2559 * tdesc.c (set_tdesc_architecture): New function.
2560 (set_tdesc_osabi): New function.
2561 (tdesc_get_features_xml): New function.
2562 (tdesc_create_feature): Add an argument.
2563 * tdesc.h (struct target_desc) <features>: New field.
2564 <arch, osabi>: New field.
2565 (~target_desc): xfree features, arch, and osabi.
2566 (target_desc::oerator==): Don't compare .xmltarget.
2567 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2568 (set_tdesc_osabi): Likewise.
2569 (tdesc_get_features_xml): Likewise.
2570
2571 2017-09-05 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-x86-tdesc.c: Include selftest.h.
2574 (i386_tdesc_test): New function.
2575 (initialize_low_tdesc): Call selftests::register_test.
2576 * tdesc.h: Include regdef.h.
2577 (target_desc): Override operator == and !=.
2578
2579 2017-09-05 Yao Qi <yao.qi@linaro.org>
2580
2581 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2582 (ipa_obj): Likewise.
2583 * linux-i386-ipa.c: Include common/x86-xstate.h
2584 (get_ipa_tdesc): Call i386_linux_read_description.
2585 (initialize_low_tracepoint): Don't call init_registers_XXX
2586 functions, call initialize_low_tdesc instead.
2587 * linux-x86-low.c (x86_linux_read_description): Call
2588 i386_linux_read_description.
2589 (initialize_low_arch): Don't call init_registers_i386_XXX
2590 functions, call initialize_low_tdesc.
2591 * linux-x86-tdesc.c: New file.
2592 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2593 (i386_get_ipa_tdesc_idx): Declare.
2594 (i386_get_ipa_tdesc): Declare.
2595 (initialize_low_tdesc): Declare.
2596
2597 2017-09-05 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2600 instead of 0.
2601
2602 2017-09-05 Yao Qi <yao.qi@linaro.org>
2603
2604 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2605 * regcache.c (get_thread_regcache): Use VEC_length.
2606 (init_register_cache): Likewise.
2607 (regcache_cpy): Likewise.
2608 (registers_to_string): Iterate reg_defs via VEC_iterate.
2609 (find_regno): Likewise.
2610 (find_register_by_number): Use VEC_index.
2611 (register_size): Call find_register_by_number.
2612 (register_data): Call find_register_by_number.
2613 (supply_regblock): Use VEC_length.
2614 (regcache_raw_read_unsigned): Likewise.
2615 * tdesc.c (init_target_desc): Iterate reg_defs via
2616 VEC_iterate.
2617 (default_description): Update initializer.
2618 (copy_target_description): Don't update field num_registers.
2619 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2620 <num_registers>: Remove.
2621
2622 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * Makefile.in (.SECONDARY): Define target.
2625
2626 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * linux-low.c (linux_wait_1): Adjust.
2629 * server.c (queue_stop_reply_callback): Adjust.
2630
2631 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2632
2633 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2634 QEnvironmentUnset and QEnvironmentReset packets.
2635 (handle_query): Inform remote that QEnvironmentHexEncoded,
2636 QEnvironmentUnset and QEnvironmentReset are supported.
2637
2638 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * inferiors.h (inferior_target_data): Rename to ...
2641 (thread_target_data): ... this.
2642 (inferior_regcache_data): Rename to ...
2643 (thread_regcache_data): ... this.
2644 (set_inferior_regcache_data): Rename to ...
2645 (set_thread_regcache_data): ... this.
2646 * inferiors.c (inferior_target_data): Rename to ...
2647 (thread_target_data): ... this.
2648 (inferior_regcache_data): Rename to ...
2649 (thread_regcache_data): ... this.
2650 (set_inferior_regcache_data): Rename to ...
2651 (set_thread_regcache_data): ... this.
2652 (free_one_thread): Update.
2653 * linux-low.h (get_thread_lwp): Update.
2654 * regcache.c (get_thread_regcache): Update.
2655 (regcache_invalidate_thread): Update.
2656 (free_register_cache_thread): Update.
2657 * win32-i386-low.c (update_debug_registers_callback): Update.
2658 (win32_get_current_dr): Update.
2659 * win32-low.c (thread_rec): Update.
2660 (delete_thread_info): Update.
2661 (continue_one_thread): Update.
2662 (suspend_one_thread): Update.
2663
2664 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2665
2666 * inferiors.c (set_inferior_target_data): Remove.
2667 * inferiors.h (set_inferior_target_data): Remove.
2668
2669 2017-08-18 Yao Qi <yao.qi@linaro.org>
2670
2671 * Makefile.in (OBS): Add selftest.o.
2672 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2673 * configure, config.in: Re-generated.
2674 * server.c: Include common/sefltest.h.
2675 (captured_main): Handle option --selftest.
2676
2677 2017-08-09 Yao Qi <yao.qi@linaro.org>
2678
2679 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2680 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2681 i386-avx-mpx.o and i386-mmx.o.
2682 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2683 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2684 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2685 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2686 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2687 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2688 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2689 i386/amd64-avx-mpx.xml.
2690
2691 2017-08-09 Yao Qi <yao.qi@linaro.org>
2692
2693 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2694 and x32-avx-avx512.o.
2695 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2696 i386/x32-avx-avx512.xml.
2697
2698 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2699
2700 * tracepoint.h (enum class fast_tpoint_collect_result): New
2701 enumeration.
2702 (fast_tracepoint_collecting): Change return type to
2703 fast_tpoint_collect_result.
2704 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2705 * linux-low.h: Include tracepoint.h.
2706 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2707 fast_tpoint_collect_result.
2708 * linux-low.c (handle_tracepoints): Adjust.
2709 (linux_fast_tracepoint_collecting): Change return type to
2710 fast_tpoint_collect_result.
2711 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2712 linux_wait_1, stuck_in_jump_pad_callback,
2713 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2714 proceed_one_lwp): Adjust to type change.
2715
2716 2017-07-10 Yao Qi <yao.qi@linaro.org>
2717
2718 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2719
2720 2017-06-29 Yao Qi <yao.qi@linaro.org>
2721
2722 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2723 Remove.
2724 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2725
2726 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2727
2728 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2729
2730 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2731
2732 * linux-low.c (linux_create_inferior): Adjust code to access the
2733 environment information via 'gdb_environ' class.
2734 * lynx-low.c (lynx_create_inferior): Likewise.
2735 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2736 (get_environ): Return a pointer to 'our_environ'.
2737 (captured_main): Initialize 'our_environ'.
2738 * server.h (get_environ): Adjust prototype.
2739 * spu-low.c (spu_create_inferior): Adjust code to access the
2740 environment information via 'gdb_environ' class.
2741
2742 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2743
2744 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2745 usage of "register" keyword.
2746
2747 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * configure: Re-generate.
2750
2751 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2752
2753 * configure: Re-generate.
2754
2755 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * Makefile.in (COMPILE.pre): Add "-x c++".
2758
2759 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2760
2761 * fork-child.c: Conditionally include <signal.h>.
2762
2763 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2764
2765 * server.c (handle_general_set): Handle new packet
2766 "QStartupWithShell".
2767 (handle_query): Add "QStartupWithShell" to the list of supported
2768 packets.
2769 (gdbserver_usage): Add help text explaining the
2770 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2771 options.
2772 (captured_main): Recognize and act upon the presence of the new
2773 CLI options.
2774
2775 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2776 Pedro Alves <palves@redhat.com>
2777
2778 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2779 * configure: Regenerate.
2780 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2781 "fork-inferior.o".
2782 (i[34567]86-*-lynxos*): Likewise.
2783 (spu*-*-*): Likewise.
2784 * fork-child.c: New file.
2785 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2786 and "environ.h".
2787 (linux_ptrace_fun): New function.
2788 (linux_create_inferior): Adjust function prototype to reflect
2789 change on "target.h". Adjust function code to use
2790 "fork_inferior".
2791 (linux_request_interrupt): Delete "signal_pid".
2792 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2793 (lynx_ptrace_fun): New function.
2794 (lynx_create_inferior): Adjust function prototype to reflect
2795 change on "target.h". Adjust function code to use
2796 "fork_inferior".
2797 * nto-low.c (nto_create_inferior): Adjust function prototype and
2798 code to reflect change on "target.h". Update comments.
2799 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2800 "common-terminal.h" and "environ.h".
2801 (terminal_fd): Moved to fork-child.c.
2802 (old_foreground_pgrp): Likewise.
2803 (restore_old_foreground_pgrp): Likewise.
2804 (last_status): Make it global.
2805 (last_ptid): Likewise.
2806 (our_environ): New variable.
2807 (startup_with_shell): Likewise.
2808 (program_name): Likewise.
2809 (program_argv): Rename to...
2810 (program_args): ...this.
2811 (wrapper_argv): New variable.
2812 (start_inferior): Delete function.
2813 (get_exec_wrapper): New function.
2814 (get_exec_file): Likewise.
2815 (get_environ): Likewise.
2816 (prefork_hook): Likewise.
2817 (post_fork_inferior): Likewise.
2818 (postfork_hook): Likewise.
2819 (postfork_child_hook): Likewise.
2820 (handle_v_run): Update code to deal with arguments coming from the
2821 remote host. Update calls from "start_inferior" to
2822 "create_inferior".
2823 (captured_main): Likewise. Initialize environment variable. Call
2824 "have_job_control".
2825 * server.h (post_fork_inferior): New prototype.
2826 (get_environ): Likewise.
2827 (last_status): Declare.
2828 (last_ptid): Likewise.
2829 (signal_pid): Likewise.
2830 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2831 (spu_ptrace_fun): New function.
2832 (spu_create_inferior): Adjust function prototype to reflect change
2833 on "target.h". Adjust function code to use "fork_inferior".
2834 * target.c (target_terminal_init): New function.
2835 (target_terminal_inferior): Likewise.
2836 (target_terminal_ours): Likewise.
2837 * target.h: Include <vector>.
2838 (struct target_ops) <create_inferior>: Update prototype.
2839 (create_inferior): Update macro.
2840 * utils.c (gdb_flush_out_err): New function.
2841 * win32-low.c (win32_create_inferior): Adjust function prototype
2842 and code to reflect change on "target.h".
2843
2844 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2845
2846 * inferiors.c (switch_to_thread): New function.
2847
2848 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2849
2850 * Makefile.in (SFILE): Add "common/job-control.c".
2851 (OBS): Add "job-control.o".
2852
2853 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2854
2855 * Makefile: Remove "@host_makefile_frag@".
2856
2857 2017-05-05 Pedro Alves <palves@redhat.com>
2858
2859 * configure: Regenerate.
2860
2861 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2862
2863 * configure: Regenerate.
2864
2865 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2866
2867 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2868 software_single_step change of return type to
2869 std::vector<CORE_ADDR>.
2870 * linux-low.c (install_software_single_step_breakpoints):
2871 Likewise.
2872 * linux-low.h (install_software_single_step_breakpoints):
2873 Likewise.
2874
2875 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2876
2877 * remote-utils.c: Include "gdb_termios.h" instead of
2878 "terminal.h".
2879 * terminal.h: Delete file.
2880
2881 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2882
2883 * server.c: Include <vector>.
2884 <program_argv, wrapper_argv>: Convert to std::vector.
2885 (start_inferior): Rewrite function to use C++.
2886 (handle_v_run): Likewise. Update code that calculates the argv
2887 based on the vRun packet; use C++.
2888 (captured_main): Likewise.
2889
2890 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2891
2892 * server.c (handle_v_cont): Initialize thread_resume::thread
2893 with null_ptid.
2894
2895 2017-04-05 Pedro Alves <palves@redhat.com>
2896
2897 * configure: Regenerate.
2898
2899 2017-04-05 Pedro Alves <palves@redhat.com>
2900
2901 * gdbreplay.c (sync_error): Constify.
2902 * linux-x86-low.c (push_opcode): Constify.
2903
2904 2017-04-05 Pedro Alves <palves@redhat.com>
2905
2906 * win32-low.c (get_child_debug_event)
2907 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2908 Report TARGET_WAITKIND_SPURIOUS instead.
2909
2910 2017-04-05 Pedro Alves <palves@redhat.com>
2911
2912 * remote-utils.c (remote_prepare, remote_open): Constify.
2913 * remote-utils.h (remote_prepare, remote_open): Constify.
2914 * server.c (captured_main): Constify 'port' handling.
2915
2916 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2917
2918 * Makefile.in (clean): Clear .deps.
2919
2920 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2921
2922 * .gitignore: Remove generated files, replace with wildcard.
2923 * (clean): Replace removal of generated files with wildcard.
2924 (version.c): Replace with...
2925 (version-generated.c): ...this.
2926 (xml-builtin.c): Replace with...
2927 (xml-builtin-generated.c): ...this.
2928 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2929 (%.c: *regformats*): Replace with...
2930 (%-generated.c: *regformats*): ...this.
2931
2932 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2933
2934 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2935 (xtensa_fill_gregset): Call collect_register_by_name for
2936 threadptr register.
2937 (xtensa_store_gregset): Call supply_register_by_name for
2938 threadptr register.
2939
2940 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2941
2942 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2943 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2944 (xtensa_store_gregset): Call supply_register for all registers in
2945 a0_regnum..a0_regnum + C0_NREGS range.
2946
2947 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2950 (ax-ipa.o: ax.c): Remove.
2951 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2952 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2953 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2954 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2955 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2956
2957 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2958
2959 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2960 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2961 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2962 (errors-ipa.o: ../common/errors.c): Remove.
2963 (format-ipa.o: ../common/format.c): Remove.
2964 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2965
2966 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2967
2968 * Makefile.in (%-ipa.o: %.c): New rule.
2969 (tracepoint-ipa.o: tracepoint.c): Remove.
2970 (utils-ipa.o: utils.c): Remove.
2971 (remote-utils-ipa.o: remote-utils.c): Remove.
2972 (regcache-ipa.o: regcache.c): Remove.
2973 (i386-linux-ipa.o: i386-linux.c): Remove.
2974 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2975 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2976 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2977 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2978 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2979 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2980 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2981 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2982 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2983 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2984 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2985 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2986 (aarch64-ipa.o: aarch64.c): Remove.
2987 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2988 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2989 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2990 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2991 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2992 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2993 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2994 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2995 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2996 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2997 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2998 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2999 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3000 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3001 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3002 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3003 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3004 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3005 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3006 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3007 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3008 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3009 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3010 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3011 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3012 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3013 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3014 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3015 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3016 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3017 (tdesc-ipa.o: tdesc.c): Remove.
3018 (x32-linux-ipa.o: x32-linux.c): Remove.
3019 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3020 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3021
3022 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3023
3024 * Makefile.in (%.o: ../arch/%.c): New rule.
3025 (arm.o: ../arch/arm.c): Remove.
3026 (arm-linux.o: ../arch/arm-linux.c): Remove.
3027 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3028 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3029
3030 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3031
3032 * Makefile.in (%.o: ../nat/%.c): New rule.
3033 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3034 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3035 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3036 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3037 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3038 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3039 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3040 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3041 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3042 (linux-personality.o: ../nat/linux-personality.c): Remove.
3043 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3044 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3045 (x86-linux.o: ../nat/x86-linux.c): Remove.
3046 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3047 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3048
3049 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3050
3051 * Makefile.in (%.o: ../common/%.c): New rule.
3052 (signals.o: ../common/signals.c): Remove.
3053 (print-utils.o: ../common/print-utils.c): Remove.
3054 (rsp-low.o: ../common/rsp-low.c): Remove.
3055 (common-utils.o: ../common/common-utils.c): Remove.
3056 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3057 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3058 (vec.o: ../common/vec.c): Remove.
3059 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3060 (xml-utils.o: ../common/xml-utils.c): Remove.
3061 (ptid.o: ../common/ptid.c): Remove.
3062 (buffer.o: ../common/buffer.c): Remove.
3063 (format.o: ../common/format.c): Remove.
3064 (filestuff.o: ../common/filestuff.c): Remove.
3065 (agent.o: ../common/agent.c): Remove.
3066 (errors.o: ../common/errors.c): Remove.
3067 (environ.o: ../common/environ.c): Remove.
3068 (common-debug.o: ../common/common-debug.c): Remove.
3069 (cleanups.o: ../common/cleanups.c): Remove.
3070 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3071 (fileio.o: ../common/fileio.c): Remove.
3072 (common-regcache.o: ../common/common-regcache.c): Remove.
3073 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3074 (new-op.o: ../common/new-op.c): Remove.
3075 (btrace-common.o: ../common/btrace-common.c): Remove.
3076
3077 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * Makefile.in (%.o: ../target/%.c): New rule.
3080 (waitstatus.o: ../target/waitstatus.c): Remove.
3081
3082 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3083
3084 * Makefile.in
3085 (%.c: ../regformats/%.dat,
3086 (%.c: ../regformats/arm/%.dat,
3087 (%.c: ../regformats/i386/%.dat,
3088 (%.c: ../regformats/rs6000/%.dat): New rules.
3089 (aarch64.c): Remove.
3090 (reg-arm.c): Remove.
3091 (arm-with-iwmmxt.c): Remove.
3092 (arm-with-vfpv2.c): Remove.
3093 (arm-with-vfpv3.c): Remove.
3094 (arm-with-neon.c): Remove.
3095 (reg-bfin.c): Remove.
3096 (reg-cris.c): Remove.
3097 (reg-crisv32.c): Remove.
3098 (i386.c): Remove.
3099 (i386-linux.c): Remove.
3100 (i386-avx.c): Remove.
3101 (i386-avx-linux.c): Remove.
3102 (i386-avx-avx512.c): Remove.
3103 (i386-avx-avx512-linux.c): Remove.
3104 (i386-mpx.c): Remove.
3105 (i386-mpx-linux.c): Remove.
3106 (i386-avx-mpx-avx512-pku.c): Remove.
3107 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3108 (i386-avx-mpx.c): Remove.
3109 (i386-avx-mpx-linux.c): Remove.
3110 (i386-mmx.c): Remove.
3111 (i386-mmx-linux.c): Remove.
3112 (reg-ia64.c): Remove.
3113 (reg-m32r.c): Remove.
3114 (reg-m68k.c): Remove.
3115 (reg-cf.c): Remove.
3116 (mips-linux.c): Remove.
3117 (mips-dsp-linux.c): Remove.
3118 (mips64-linux.c): Remove.
3119 (mips64-dsp-linux.c): Remove.
3120 (nios2-linux.c): Remove.
3121 (powerpc-32.c): Remove.
3122 (powerpc-32l.c): Remove.
3123 (powerpc-altivec32l.c): Remove.
3124 (powerpc-cell32l.c): Remove.
3125 (powerpc-vsx32l.c): Remove.
3126 (powerpc-isa205-32l.c): Remove.
3127 (powerpc-isa205-altivec32l.c): Remove.
3128 (powerpc-isa205-vsx32l.c): Remove.
3129 (powerpc-e500l.c): Remove.
3130 (powerpc-64l.c): Remove.
3131 (powerpc-altivec64l.c): Remove.
3132 (powerpc-cell64l.c): Remove.
3133 (powerpc-vsx64l.c): Remove.
3134 (powerpc-isa205-64l.c): Remove.
3135 (powerpc-isa205-altivec64l.c): Remove.
3136 (powerpc-isa205-vsx64l.c): Remove.
3137 (s390-linux32.c): Remove.
3138 (s390-linux32v1.c): Remove.
3139 (s390-linux32v2.c): Remove.
3140 (s390-linux64.c): Remove.
3141 (s390-linux64v1.c): Remove.
3142 (s390-linux64v2.c): Remove.
3143 (s390-te-linux64.c): Remove.
3144 (s390-vx-linux64.c): Remove.
3145 (s390-tevx-linux64.c): Remove.
3146 (s390x-linux64.c): Remove.
3147 (s390x-linux64v1.c): Remove.
3148 (s390x-linux64v2.c): Remove.
3149 (s390x-te-linux64.c): Remove.
3150 (s390x-vx-linux64.c): Remove.
3151 (s390x-tevx-linux64.c): Remove.
3152 (tic6x-c64xp-linux.c): Remove.
3153 (tic6x-c64x-linux.c): Remove.
3154 (tic6x-c62x-linux.c): Remove.
3155 (reg-sh.c): Remove.
3156 (reg-sparc64.c): Remove.
3157 (reg-spu.c): Remove.
3158 (amd64.c): Remove.
3159 (amd64-linux.c): Remove.
3160 (amd64-avx.c): Remove.
3161 (amd64-avx-linux.c): Remove.
3162 (amd64-avx-avx512.c): Remove.
3163 (amd64-avx-avx512-linux.c): Remove.
3164 (amd64-mpx.c): Remove.
3165 (amd64-mpx-linux.c): Remove.
3166 (amd64-avx-mpx-avx512-pku.c): Remove.
3167 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3168 (amd64-avx-mpx.c): Remove.
3169 (amd64-avx-mpx-linux.c): Remove.
3170 (x32.c): Remove.
3171 (x32-linux.c): Remove.
3172 (x32-avx.c): Remove.
3173 (x32-avx-linux.c): Remove.
3174 (x32-avx-avx512.c): Remove.
3175 (x32-avx-avx512-linux.c): Remove.
3176 (reg-xtensa.c): Remove.
3177 (reg-tilegx.c): Remove.
3178 (reg-tilegx32.c): Remove.
3179
3180 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3181
3182 * Makefile.in (SFILES): Add "common/environ.c".
3183 (OBJS): Add "common/environ.h".
3184
3185 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3186
3187 * configure.ac: Check if the fs_base and gs_base members of
3188 `struct user_regs_struct' exist.
3189 * config.in: Regenerated.
3190 * configure: Likewise.
3191
3192 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3193
3194 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3195 target_read_memory.
3196 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3197 (get_next_pcs_syscall_next_pc): Likewise.
3198
3199 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3200
3201 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3202 * nto-x86-low.c: Likewise.
3203
3204 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3205
3206 * Makefile.in: Include disable-implicit-rules.mk.
3207
3208 2016-11-23 Pedro Alves <palves@redhat.com>
3209
3210 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3211 (debug_vprintf): Use std::chrono::steady_clock instead of
3212 gettimeofday. Use '.' instead of ':'.
3213 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3214 (get_timestamp): Use std::chrono::steady_clock instead of
3215 gettimeofday.
3216
3217 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3218
3219 * Makefile.in: Fix whitespace formatting.
3220
3221 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3222
3223 * Makefile.in (SFILES, OBS): Flatten list and order
3224 alphabetically.
3225
3226 2016-11-23 Pedro Alves <palves@redhat.com>
3227
3228 * event-loop.c (handle_file_event): Use warning.
3229 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3230 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3231 Use warning.
3232
3233 2016-11-23 Pedro Alves <palves@redhat.com>
3234
3235 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3236 output.
3237 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3238 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3239 debug_printf and debug_flush for debug output.
3240 * server.c (handle_general_set): Likewise.
3241 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3242 output.
3243
3244 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3245
3246 * Makefile.in (.c.o): Replace rule with ...
3247 (%.o: %.c): ... this one.
3248
3249 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3250
3251 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3252 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3253 make.
3254 * configure.ac: Remove checks for the make program.
3255 * configure: Re-generate.
3256
3257 2016-10-28 Pedro Alves <palves@redhat.com>
3258
3259 * Makefile.in (CXX_DIALECT): Get from configure.
3260 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3261 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3262 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3263 * config.in: Regenerate.
3264 * configure: Regenerate.
3265
3266 2016-10-27 Yao Qi <yao.qi@linaro.org>
3267
3268 * linux-low.c (linux_supports_range_stepping): Return true if
3269 can_software_single_step return true.
3270
3271 2016-10-27 Yao Qi <yao.qi@linaro.org>
3272
3273 * inferiors.c (find_inferior_in_random): New function.
3274 * inferiors.h (find_inferior_in_random): Declare.
3275 * linux-low.c (linux_wait_for_event_filtered): Call
3276 find_inferior_in_random instead of find_inferior.
3277
3278 2016-10-27 Yao Qi <yao.qi@linaro.org>
3279
3280 * linux-low.c (linux_wait_1): If single-step breakpoints are
3281 inserted, remove them.
3282
3283 2016-10-26 Pedro Alves <palves@redhat.com>
3284
3285 * linux-low.c (handle_extended_wait): Link parent/child fork
3286 threads.
3287 (linux_wait_1): Unlink them.
3288 (linux_set_resume_request): Ignore resume requests for
3289 already-resumed and unhandled fork child threads.
3290 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3291 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3292 New functions.
3293 (handle_v_requests) <vCont>: Don't call require_running.
3294 * server.h (in_queued_stop_replies): New declaration.
3295
3296 2016-10-24 Yao Qi <yao.qi@linaro.org>
3297
3298 PR server/20733
3299 * linux-aarch64-low.c (append_insns): Cast the return value to
3300 'uint32_t *'.
3301
3302 2016-10-10 Yao Qi <yao.qi@linaro.org>
3303
3304 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3305
3306 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3307
3308 * target.c (target_supports_multi_process): New function, moved
3309 from...
3310 * target.h (target_supports_multi_process): ... here. Remove
3311 macro.
3312
3313 2016-10-05 Tom Tromey <tom@tromey.com>
3314
3315 PR remote/20655:
3316 * tracepoint.c (handle_tracepoint_bkpts): Check
3317 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3318
3319 2016-10-05 Yao Qi <yao.qi@linaro.org>
3320
3321 * configure.srv: Update the path of arm-*.xml files.
3322
3323 2016-10-05 Terry Guo <terry.guo@arm.com>
3324 Yao Qi <yao.qi@linaro.org>
3325
3326 * Makefile.in: Adjust the path of rules.
3327 * configure.srv: Update the path of xml files.
3328 * regformats/arm-with-iwmmxt.dat: Regenerated.
3329 * regformats/arm-with-neon.dat: Likewise.
3330 * regformats/arm-with-vfpv2.dat: Likewise.
3331 * regformats/arm-with-vfpv3.dat Likewise.
3332
3333 2016-09-30 Yao Qi <yao.qi@linaro.org>
3334
3335 PR gdbserver/20627
3336 * target.c (target_stop_and_wait): Don't call
3337 target_continue_no_signal, use resume_stop instead.
3338
3339 2016-09-26 Yao Qi <yao.qi@linaro.org>
3340
3341 * linux-low.c (linux_wait_1): Call debug_exit.
3342
3343 2016-09-23 Pedro Alves <palves@redhat.com>
3344
3345 * Makefile.in (SFILES): Add common/new-op.c.
3346 (OBS): Add common/new-op.o.
3347 (new-op.o): New rule.
3348
3349 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3350
3351 * .gitinore: Ignore more files.
3352
3353 2016-09-21 Yao Qi <yao.qi@linaro.org>
3354
3355 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3356 23.
3357
3358 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3359
3360 * server.c (start_inferior): Call target_mourn_inferior instead of
3361 mourn_inferior; pass ptid_t argument to it.
3362 (resume): Likewise.
3363 (handle_target_event): Likewise.
3364 * target.c (target_mourn_inferior): New function.
3365 * target.h (mourn_inferior): Delete macro.
3366
3367 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3368
3369 * linux-low.c (lwp_is_stepping): New function.
3370
3371 2016-09-06 Carl Love <cel@us.ibm.com>
3372
3373 * server.c (start_inferior): Fixed comment, requested comment change
3374 didn't get updated correctly. Removed reference to ptrace () call as
3375 it is only true on Linux systems.
3376
3377 2016-09-06 Carl Love <cel@us.ibm.com>
3378
3379 * server.c (start_inferior): Do not call
3380 function target_post_create_inferior () if the
3381 inferior process has already exited.
3382
3383 2016-09-05 Pedro Alves <palves@redhat.com>
3384
3385 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3386 (COMPILE.pre, CC_LD): Use CXX directly.
3387 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3388 * acinclude.m4: Don't include build-with-cxx.m4.
3389 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3390 * configure: Regenerate.
3391
3392 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3393
3394 PR gdb/19495
3395 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3396 call writing data to own_buf.
3397
3398 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3399
3400 * target.c (mywait): Call target_wait instead of
3401 the_target->wait.
3402 (target_wait): New function.
3403
3404 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3405
3406 * server.c (start_inferior): New variable 'ptid'. Replace calls
3407 to the_target->resume by target_continue{,_no_signal}, depending
3408 on the case.
3409 * target.c (target_stop_and_wait): Call target_continue_no_signal
3410 instead of the_target->resume.
3411 (target_continue): New function.
3412
3413 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3414
3415 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3416
3417 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3418
3419 PR server/20491
3420 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3421 ps_prochandle.
3422 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3423 * linux-arm-low.c (ps_get_thread_area): Likewise.
3424 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3425 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3426 * linux-mips-low.c (ps_get_thread_area): Likewise.
3427 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3428 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3429 * linux-x86-low.c (ps_get_thread_area): Likewise.
3430 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3431
3432 2016-08-19 Pedro Alves <palves@redhat.com>
3433
3434 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3435
3436 2016-08-19 Pedro Alves <palves@redhat.com>
3437
3438 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3439 comment. Use memcpy instead of casting through unsigned long.
3440
3441 2016-08-19 Pedro Alves <palves@redhat.com>
3442
3443 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3444 allocating around 0x80000000.
3445
3446 2016-08-19 Pedro Alves <palves@redhat.com>
3447
3448 PR gdb/20415
3449 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3450 (x32-avx512-linux-ipa.o): New rules.
3451 * configure.ac (x86_64-*-linux*): New x32 check.
3452 * configure.srv (ipa_x32_linux_regobj): New.
3453 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3454 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3455 descriptions.
3456 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3457 descriptions.
3458 * configure: Regenerate.
3459
3460 2016-08-09 Pedro Alves <palves@redhat.com>
3461
3462 PR gdb/18653
3463 * Makefile.in (OBS): Add signals-state-save-restore.o.
3464 (signals-state-save-restore.o): New rule.
3465 * config.in: Regenerate.
3466 * configure: Regenerate.
3467 * linux-low.c: Include "signals-state-save-restore.h".
3468 (linux_create_inferior): Call
3469 restore_original_signals_state.
3470 * server.c: Include "dispositions-save-restore.h".
3471 (captured_main): Call save_original_signals_state.
3472
3473 2016-08-05 Pedro Alves <palves@redhat.com>
3474
3475 * configure: Regenerate.
3476
3477 2016-08-04 Yao Qi <yao.qi@linaro.org>
3478
3479 * linux-low.c (regsets_fetch_inferior_registers): Check
3480 errno is ESRCH or not.
3481
3482 2016-08-02 Yao Qi <yao.qi@linaro.org>
3483
3484 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3485 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3486 (thread_db_load_search): Update.
3487 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3488 td_ta_set_event and td_ta_event_getmsg.
3489
3490 2016-07-26 Pedro Alves <palves@redhat.com>
3491
3492 PR server/20414
3493 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3494 of unsigned long for 64-bit registers and use uint32_t instead of
3495 unsigned int for 32-bit registers.
3496
3497 2016-07-26 Pedro Alves <palves@redhat.com>
3498
3499 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3500 to 'ptrace'.
3501
3502 2016-07-21 Tom Tromey <tom@tromey.com>
3503
3504 * configure: Rebuild.
3505
3506 2016-07-21 Yao Qi <yao.qi@linaro.org>
3507
3508 * mem-break.c (find_gdb_breakpoint): Cast bp to
3509 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3510
3511 2016-07-21 Yao Qi <yao.qi@linaro.org>
3512
3513 * server.c (handle_v_requests): Support s and S actions
3514 if target_supports_software_single_step return true.
3515
3516 2016-07-21 Yao Qi <yao.qi@linaro.org>
3517
3518 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3519 is resume_step, call maybe_hw_step.
3520 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3521 and unstop them.
3522 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3523 breakpoints or not.
3524 (proceed_one_lwp): If resume request is resume_step, install
3525 reinsert breakpoints and call maybe_hw_step.
3526
3527 2016-07-21 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-low.c (proceed_one_lwp): Declare.
3530 (linux_resume_one_thread): Remove local variable 'step'.
3531 Lift code enqueue signal. Call proceed_one_lwp instead of
3532 linux_resume_one_lwp.
3533
3534 2016-07-21 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-low.c (linux_resume_one_thread): Call
3537 enqueue_pending_signal.
3538
3539 2016-07-21 Yao Qi <yao.qi@linaro.org>
3540
3541 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3542 * inferiors.c (do_restore_current_thread_cleanup): New function.
3543 (make_cleanup_restore_current_thread): Likewise.
3544 * linux-low.c (install_software_single_step_breakpoints): Call
3545 make_cleanup_restore_current_thread. Switch current_thread to
3546 thread.
3547
3548 2016-07-21 Yao Qi <yao.qi@linaro.org>
3549
3550 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3551 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3552 (clone_one_breakpoint): Likewise.
3553 (delete_reinsert_breakpoints): Change parameter to thread.
3554 Callers updated.
3555 (has_reinsert_breakpoints): Likewise.
3556 (uninsert_reinsert_breakpoints): Likewise.
3557 (reinsert_reinsert_breakpoints): Likewise.
3558 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3559 (delete_reinsert_breakpoints): Likewise.
3560 (reinsert_reinsert_breakpoints): Likewise.
3561 (uninsert_reinsert_breakpoints): Likewise.
3562 (has_reinsert_breakpoints): Likewise.
3563
3564 2016-07-21 Yao Qi <yao.qi@linaro.org>
3565
3566 * inferiors.c (get_thread_process): Make parameter const.
3567 * inferiors.h (get_thread_process): Update declaration.
3568 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3569 Add new parameters child_thread and parent_thread. Callers
3570 updated.
3571 * mem-break.h (clone_all_breakpoints): Update declaration.
3572
3573 2016-07-21 Yao Qi <yao.qi@linaro.org>
3574
3575 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3576 <command_list, handler>: Remove.
3577 (struct gdb_breakpoint): New.
3578 (struct other_breakpoint): New.
3579 (struct reinsert_breakpoint): New.
3580 (is_gdb_breakpoint): New function.
3581 (any_persistent_commands): Update command_list if
3582 is_gdb_breakpoint returns true.
3583 (set_breakpoint): Create breakpoints according to their types.
3584 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3585 (set_gdb_breakpoint_1): Likewise.
3586 (set_gdb_breakpoint): Likewise.
3587 (clear_breakpoint_conditions): Change parameter type to
3588 'struct gdb_breakpoint *'.
3589 (clear_breakpoint_commands): Likewise.
3590 (clear_breakpoint_conditions_and_commands): Likewise.
3591 (add_condition_to_breakpoint): Likewise.
3592 (add_breakpoint_condition): Likewise.
3593 (add_commands_to_breakpoint): Likewise.
3594 (check_breakpoints): Check other_breakpoint.
3595 (clone_one_breakpoint): Clone breakpopint according to its type.
3596 * mem-break.h (struct gdb_breakpoint): Declare.
3597 (set_gdb_breakpoint): Update declaration.
3598 (clear_breakpoint_conditions_and_commands): Likewise.
3599 (add_breakpoint_condition): Likewise.
3600 (add_breakpoint_commands): Likewise.
3601 * server.c (process_point_options): Change parameter type to
3602 'struct gdb_breakpoint *'.
3603
3604 2016-07-21 Yao Qi <yao.qi@linaro.org>
3605
3606 * mem-break.c (set_breakpoint_at): Rename it to ...
3607 (set_breakpoint_type_at): ... it.
3608 (set_breakpoint_at): Call set_breakpoint_type_at.
3609 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3610 * mem-break.h (set_breakpoint_at): Update comments.
3611
3612 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3613
3614 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3615 to buf parameter.
3616 (nios2_store_gregset): Likewise.
3617
3618 2016-07-01 Pedro Alves <palves@redhat.com>
3619 Antoine Tremblay <antoine.tremblay@ericsson.com>
3620
3621 * linux-low.c: Change interface to take the target lwp_info
3622 pointer directly and return void. Handle detaching from a zombie
3623 thread.
3624 (linux_detach_lwp_callback): New function.
3625 (linux_detach): Detach from the leader thread after detaching from
3626 the clone threads.
3627
3628 2016-06-28 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3631 for variable new_offset.
3632 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3633 (aarch64_ftrace_insn_reloc_cb): Likewise.
3634 (aarch64_ftrace_insn_reloc_tb): Likewise.
3635 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3636 PRIx64 instead of PRIx32.
3637
3638 2016-06-28 Yao Qi <yao.qi@linaro.org>
3639
3640 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3641 (the_low_target): Install arm_get_syscall_trapinfo.
3642
3643 2016-06-28 Yao Qi <yao.qi@linaro.org>
3644
3645 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3646 function.
3647 (the_low_target): Install aarch64_get_syscall_trapinfo.
3648
3649 2016-06-28 Yao Qi <yao.qi@linaro.org>
3650
3651 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3652 Callers updated.
3653 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3654 Remove parameter sysno.
3655 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3656 sysret.
3657
3658 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3659
3660 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3661 (s390_emit_ne_goto): Likewise.
3662 (s390_emit_lt_goto): Likewise.
3663 (s390_emit_le_goto): Likewise.
3664 (s390_emit_gt_goto): Likewise.
3665 (s390_emit_ge_goto): Likewise.
3666 (s390x_emit_eq_goto): Likewise.
3667 (s390x_emit_ne_goto): Likewise.
3668 (s390x_emit_lt_goto): Likewise.
3669 (s390x_emit_le_goto): Likewise.
3670 (s390x_emit_gt_goto): Likewise.
3671 (s390x_emit_ge_goto): Likewise.
3672 (s390_emit_ops_impl): Mark variable static.
3673 (s390x_emit_ops): Likewise.
3674
3675 2016-06-17 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-low.c (handle_extended_wait): Call
3678 uninsert_reinsert_breakpoints for the parent process. Remove
3679 reinsert breakpoints from the child process. Reinsert them to
3680 the parent process when vfork is done.
3681 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3682 (reinsert_reinsert_breakpoints): New function.
3683 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3684 (reinsert_reinsert_breakpoints): Declare.
3685
3686 2016-06-17 Yao Qi <yao.qi@linaro.org>
3687
3688 * linux-low.c (handle_extended_wait): If the parent is doing
3689 step-over, remove the reinsert breakpoints from the forked child.
3690
3691 2016-06-17 Yao Qi <yao.qi@linaro.org>
3692
3693 * linux-low.c (unsuspend_all_lwps): Declare.
3694 (linux_low_filter_event): If thread exited, call finish_step_over.
3695 If step-over is finished, unsuspend other threads.
3696
3697 2016-06-17 Yao Qi <yao.qi@linaro.org>
3698
3699 * linux-low.c (linux_resume_one_lwp_throw): Assert
3700 has_reinsert_breakpoints returns false.
3701 * mem-break.c (delete_disabled_breakpoints): Assert
3702 bp type isn't reinsert_breakpoint.
3703
3704 2016-06-17 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-low.c (maybe_hw_step): New function.
3707 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3708 (finish_step_over): Switch current_thread to lwp temporarily,
3709 and assert has_reinsert_breakpoints returns true.
3710 (proceed_one_lwp): Call maybe_hw_step.
3711 * mem-break.c (has_reinsert_breakpoints): New function.
3712 * mem-break.h (has_reinsert_breakpoints): Declare.
3713
3714 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3715
3716 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3717
3718 2016-05-17 Yao Qi <yao.qi@linaro.org>
3719
3720 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3721 instead of find_inferior.
3722
3723 2016-05-05 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3726 Initialize res to zero.
3727
3728 2016-05-05 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3731 to uint32_t.
3732
3733 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3734
3735 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3736 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3737 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3738
3739 2016-04-28 Par Olsson <par.olsson@windriver.com>
3740 Simon Marchi <simon.marchi@ericsson.com>
3741
3742 * tracepoint.c (write_inferior_int8): New function.
3743 (cmd_qtenable_disable): Write enable flag using
3744 write_inferior_int8.
3745
3746 2016-04-25 Yao Qi <yao.qi@linaro.org>
3747
3748 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3749 (need_step_over_p): Return zero if the LWP has pending signals
3750 can be delivered on software single step target.
3751
3752 2016-04-25 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3755 return instead of error.
3756
3757 2016-04-22 Yao Qi <yao.qi@linaro.org>
3758
3759 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3760 to 23.
3761
3762 2016-04-22 Yao Qi <yao.qi@linaro.org>
3763
3764 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3765 signal when stepping over breakpoint with software single
3766 step.
3767
3768 2016-04-21 Pedro Alves <palves@redhat.com>
3769
3770 * linux-s390-low.c (s390_collect_ptrace_register)
3771 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3772 add casts.
3773 (s390_check_regset): Use void * instead of gdb_byte *.
3774
3775 2016-04-20 Pedro Alves <palves@redhat.com>
3776
3777 * configure: Renegerate.
3778
3779 2016-04-20 Yao Qi <yao.qi@linaro.org>
3780
3781 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3782 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3783 number 16.
3784 (arm_store_gregset): Likewise.
3785
3786 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3787
3788 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3789 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3790 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3791 (amd64-avx-mpx-linux.c): New rules.
3792 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3793 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3794 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3795 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3796 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3797 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3798 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3799 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3800 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3801 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3802 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3803 * linux-x86-low.c (x86_linux_read_description): Add case for
3804 X86_XSTATE_AVX_MPX_MASK.
3805 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3806 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3807 init_registers_i386_avx_mpx_linux.
3808 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3809 (initialize_low_tracepoint): Call
3810 init_registers_i386_avx_mpx_linux.
3811 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3812 (initialize_low_tracepoint): Call
3813 init_registers_amd64_avx_mpx_linux.
3814 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3815 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3816 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3817 declarations.
3818
3819 2016-04-18 Pedro Alves <palves@redhat.com>
3820
3821 * configure: Regenerate.
3822
3823 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3824
3825 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3826 (aarch64_emit_sub): Likewise.
3827
3828 2016-04-12 Pedro Alves <palves@redhat.com>
3829
3830 * utils.c (prepare_to_throw_exception): Delete.
3831
3832 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3833
3834 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3835
3836 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3837
3838 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3839
3840 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3841
3842 * linux-aarch64-ipa.c: Add <elf.h> include.
3843 * linux-ppc-ipa.c: Add <elf.h> include.
3844 * linux-s390-ipa.c: Add <elf.h> include.
3845
3846 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3847
3848 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3849 (get_raw_reg_ptr): Likewise.
3850 (get_trace_state_variable_value_ptr): Likewise.
3851 (set_trace_state_variable_value_ptr): Likewise.
3852 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3853 char *.
3854
3855 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3856 Marcin Kościelnicki <koriakin@0x04.net>
3857
3858 PR/17221
3859 * linux-ppc-low.c (emit_insns): New function.
3860 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3861 (ppc_emit_prologue): New function.
3862 (ppc_emit_epilogue): New function.
3863 (ppc_emit_add): New function.
3864 (ppc_emit_sub): New function.
3865 (ppc_emit_mul): New function.
3866 (ppc_emit_lsh): New function.
3867 (ppc_emit_rsh_signed): New function.
3868 (ppc_emit_rsh_unsigned): New function.
3869 (ppc_emit_ext): New function.
3870 (ppc_emit_zero_ext): New function.
3871 (ppc_emit_log_not): New function.
3872 (ppc_emit_bit_and): New function.
3873 (ppc_emit_bit_or): New function.
3874 (ppc_emit_bit_xor): New function.
3875 (ppc_emit_bit_not): New function.
3876 (ppc_emit_equal): New function.
3877 (ppc_emit_less_signed): New function.
3878 (ppc_emit_less_unsigned): New function.
3879 (ppc_emit_ref): New function.
3880 (ppc_emit_const): New function.
3881 (ppc_emit_reg): New function.
3882 (ppc_emit_pop): New function.
3883 (ppc_emit_stack_flush): New function.
3884 (ppc_emit_swap): New function.
3885 (ppc_emit_stack_adjust): New function.
3886 (ppc_emit_call): New function.
3887 (ppc_emit_int_call_1): New function.
3888 (ppc_emit_void_call_2): New function.
3889 (ppc_emit_if_goto): New function.
3890 (ppc_emit_goto): New function.
3891 (ppc_emit_eq_goto): New function.
3892 (ppc_emit_ne_goto): New function.
3893 (ppc_emit_lt_goto): New function.
3894 (ppc_emit_le_goto): New function.
3895 (ppc_emit_gt_goto): New function.
3896 (ppc_emit_ge_goto): New function.
3897 (ppc_write_goto_address): New function.
3898 (ppc_emit_ops_impl): New static variable.
3899 (ppc64v1_emit_prologue): New function.
3900 (ppc64v2_emit_prologue): New function.
3901 (ppc64_emit_epilogue): New function.
3902 (ppc64_emit_add): New function.
3903 (ppc64_emit_sub): New function.
3904 (ppc64_emit_mul): New function.
3905 (ppc64_emit_lsh): New function.
3906 (ppc64_emit_rsh_signed): New function.
3907 (ppc64_emit_rsh_unsigned): New function.
3908 (ppc64_emit_ext): New function.
3909 (ppc64_emit_zero_ext): New function.
3910 (ppc64_emit_log_not): New function.
3911 (ppc64_emit_bit_and): New function.
3912 (ppc64_emit_bit_or): New function.
3913 (ppc64_emit_bit_xor): New function.
3914 (ppc64_emit_bit_not): New function.
3915 (ppc64_emit_equal): New function.
3916 (ppc64_emit_less_signed): New function.
3917 (ppc64_emit_less_unsigned): New function.
3918 (ppc64_emit_ref): New function.
3919 (ppc64_emit_const): New function.
3920 (ppc64v1_emit_reg): New function.
3921 (ppc64v2_emit_reg): New function.
3922 (ppc64_emit_pop): New function.
3923 (ppc64_emit_stack_flush): New function.
3924 (ppc64_emit_swap): New function.
3925 (ppc64v1_emit_call): New function.
3926 (ppc64v2_emit_call): New function.
3927 (ppc64v1_emit_int_call_1): New function.
3928 (ppc64v2_emit_int_call_1): New function.
3929 (ppc64v1_emit_void_call_2): New function.
3930 (ppc64v2_emit_void_call_2): New function.
3931 (ppc64_emit_if_goto): New function.
3932 (ppc64_emit_eq_goto): New function.
3933 (ppc64_emit_ne_goto): New function.
3934 (ppc64_emit_lt_goto): New function.
3935 (ppc64_emit_le_goto): New function.
3936 (ppc64_emit_gt_goto): New function.
3937 (ppc64_emit_ge_goto): New function.
3938 (ppc64v1_emit_ops_impl): New static variable.
3939 (ppc64v2_emit_ops_impl): New static variable.
3940 (ppc_emit_ops): New function.
3941 (linux_low_target): Wire in ppc_emit_ops.
3942
3943 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3944 Marcin Kościelnicki <koriakin@0x04.net>
3945
3946 PR/17221
3947 * Makefile.in: Add powerpc-*-ipa.o
3948 * configure.srv: Add ipa_obj for powerpc*-linux.
3949 * linux-ppc-ipa.c: New file.
3950 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3951 includes.
3952 (PPC_FIELD): New macro.
3953 (PPC_SEXT): New macro.
3954 (PPC_OP6): New macro.
3955 (PPC_BO): New macro.
3956 (PPC_LI): New macro.
3957 (PPC_BD): New macro.
3958 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3959 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3960 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3961 (ppc_get_thread_area): New function.
3962 (is_elfv2_inferior): New function.
3963 (gen_ds_form): New function.
3964 (GEN_STD): New macro.
3965 (GEN_STDU): New macro.
3966 (GEN_LD): New macro.
3967 (GEN_LDU): New macro.
3968 (gen_d_form): New function.
3969 (GEN_ADDI): New macro.
3970 (GEN_ADDIS): New macro.
3971 (GEN_LI): New macro.
3972 (GEN_LIS): New macro.
3973 (GEN_ORI): New macro.
3974 (GEN_ORIS): New macro.
3975 (GEN_LWZ): New macro.
3976 (GEN_STW): New macro.
3977 (GEN_STWU): New macro.
3978 (gen_xfx_form): New function.
3979 (GEN_MFSPR): New macro.
3980 (GEN_MTSPR): New macro.
3981 (GEN_MFCR): New macro.
3982 (GEN_MTCR): New macro.
3983 (GEN_SYNC): New macro.
3984 (GEN_LWSYNC): New macro.
3985 (gen_x_form): New function.
3986 (GEN_OR): New macro.
3987 (GEN_MR): New macro.
3988 (GEN_LWARX): New macro.
3989 (GEN_STWCX): New macro.
3990 (GEN_CMPW): New macro.
3991 (gen_md_form): New function.
3992 (GEN_RLDICL): New macro.
3993 (GEN_RLDICR): New macro.
3994 (gen_i_form): New function.
3995 (GEN_B): New macro.
3996 (GEN_BL): New macro.
3997 (gen_b_form): New function.
3998 (GEN_BNE): New macro.
3999 (GEN_LOAD): New macro.
4000 (GEN_STORE): New macro.
4001 (gen_limm): New function.
4002 (gen_atomic_xchg): New function.
4003 (gen_call): New function.
4004 (ppc_relocate_instruction): New function.
4005 (ppc_install_fast_tracepoint_jump_pad): New function.
4006 (ppc_get_min_fast_tracepoint_insn_len): New function.
4007 (ppc_get_ipa_tdesc_idx): New function.
4008 (the_low_target): Wire in the new functions.
4009 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4010 tdescs.
4011 * linux-ppc-tdesc.h: New file.
4012
4013 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4014
4015 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4016 (alloc_jump_pad_buffer): New function.
4017 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4018 (alloc_jump_pad_buffer): New function.
4019 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4020 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4021 (alloc_jump_pad_buffer): New function.
4022 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4023 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4024 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4025 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4026
4027 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4028
4029 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4030 * linux-amd64-ipa.c: Likewise.
4031 * linux-i386-ipa.c: Likewise.
4032 * linux-s390-ipa.c: Likewise.
4033 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4034 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4035 set_trace_state_variable_value_ptr.
4036 (struct ipa_sym_addresses): Likewise.
4037 (symbol_list): Likewise.
4038 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4039 accessing gdb_collect directly.
4040 (gdb_collect_ptr_type): New typedef.
4041 (get_raw_reg_ptr_type): New typedef.
4042 (get_trace_state_variable_value_ptr_type): New typedef.
4043 (set_trace_state_variable_value_ptr_type): New typedef.
4044 (gdb_collect_ptr): New global.
4045 (get_raw_reg_ptr): New global.
4046 (get_trace_state_variable_value_ptr): New global.
4047 (set_trace_state_variable_value_ptr): New global.
4048 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4049 accessing get_raw_reg directly.
4050 (get_get_tsv_func_addr): Likewise for
4051 get_trace_state_variable_value_ptr.
4052 (get_set_tsv_func_addr): Likewise for
4053 set_trace_state_variable_value_ptr.
4054 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4055
4056 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4057
4058 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4059
4060 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4061
4062 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4063 packets.
4064 (relocate_instruction): Remove own_buf.
4065 * server.c (own_buf): Make global.
4066 (handle_v_requests): Make global.
4067 * server.h (own_buf): New declaration.
4068 (handle_v_requests): New prototype.
4069
4070 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4071
4072 PR 18377
4073 * linux-s390-low.c (add_insns): New function.
4074 (s390_emit_prologue): New function.
4075 (s390_emit_epilogue): New function.
4076 (s390_emit_add): New function.
4077 (s390_emit_sub): New function.
4078 (s390_emit_mul): New function.
4079 (s390_emit_lsh): New function.
4080 (s390_emit_rsh_signed): New function.
4081 (s390_emit_rsh_unsigned): New function.
4082 (s390_emit_ext): New function.
4083 (s390_emit_log_not): New function.
4084 (s390_emit_bit_and): New function.
4085 (s390_emit_bit_or): New function.
4086 (s390_emit_bit_xor): New function.
4087 (s390_emit_bit_not): New function.
4088 (s390_emit_equal): New function.
4089 (s390_emit_less_signed): New function.
4090 (s390_emit_less_unsigned): New function.
4091 (s390_emit_ref): New function.
4092 (s390_emit_if_goto): New function.
4093 (s390_emit_goto): New function.
4094 (s390_write_goto_address): New function.
4095 (s390_emit_litpool): New function.
4096 (s390_emit_const): New function.
4097 (s390_emit_call): New function.
4098 (s390_emit_reg): New function.
4099 (s390_emit_pop): New function.
4100 (s390_emit_stack_flush): New function.
4101 (s390_emit_zero_ext): New function.
4102 (s390_emit_swap): New function.
4103 (s390_emit_stack_adjust): New function.
4104 (s390_emit_set_r2): New function.
4105 (s390_emit_int_call_1): New function.
4106 (s390_emit_void_call_2): New function.
4107 (s390_emit_eq_goto): New function.
4108 (s390_emit_ne_goto): New function.
4109 (s390_emit_lt_goto): New function.
4110 (s390_emit_le_goto): New function.
4111 (s390_emit_gt_goto): New function.
4112 (s390_emit_ge_goto): New function.
4113 (s390x_emit_prologue): New function.
4114 (s390x_emit_epilogue): New function.
4115 (s390x_emit_add): New function.
4116 (s390x_emit_sub): New function.
4117 (s390x_emit_mul): New function.
4118 (s390x_emit_lsh): New function.
4119 (s390x_emit_rsh_signed): New function.
4120 (s390x_emit_rsh_unsigned): New function.
4121 (s390x_emit_ext): New function.
4122 (s390x_emit_log_not): New function.
4123 (s390x_emit_bit_and): New function.
4124 (s390x_emit_bit_or): New function.
4125 (s390x_emit_bit_xor): New function.
4126 (s390x_emit_bit_not): New function.
4127 (s390x_emit_equal): New function.
4128 (s390x_emit_less_signed): New function.
4129 (s390x_emit_less_unsigned): New function.
4130 (s390x_emit_ref): New function.
4131 (s390x_emit_if_goto): New function.
4132 (s390x_emit_const): New function.
4133 (s390x_emit_call): New function.
4134 (s390x_emit_reg): New function.
4135 (s390x_emit_pop): New function.
4136 (s390x_emit_stack_flush): New function.
4137 (s390x_emit_zero_ext): New function.
4138 (s390x_emit_swap): New function.
4139 (s390x_emit_stack_adjust): New function.
4140 (s390x_emit_int_call_1): New function.
4141 (s390x_emit_void_call_2): New function.
4142 (s390x_emit_eq_goto): New function.
4143 (s390x_emit_ne_goto): New function.
4144 (s390x_emit_lt_goto): New function.
4145 (s390x_emit_le_goto): New function.
4146 (s390x_emit_gt_goto): New function.
4147 (s390x_emit_ge_goto): New function.
4148 (s390_emit_ops): New function.
4149 (struct linux_target_ops): Fill in emit_ops hook.
4150
4151 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4152
4153 PR 18377
4154 * Makefile.in: Add s390 IPA files.
4155 * configure.srv: Build IPA for s390.
4156 * linux-s390-ipa.c: New file.
4157 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4158 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4159 (tdesc_s390_linux32): Likewise.
4160 (init_registers_s390_linux32v1): Likewise.
4161 (tdesc_s390_linux32v1): Likewise.
4162 (init_registers_s390_linux32v2): Likewise.
4163 (tdesc_s390_linux32v2): Likewise.
4164 (init_registers_s390_linux64): Likewise.
4165 (tdesc_s390_linux64): Likewise.
4166 (init_registers_s390_linux64v1): Likewise.
4167 (tdesc_s390_linux64v1): Likewise.
4168 (init_registers_s390_linux64v2): Likewise.
4169 (tdesc_s390_linux64v2): Likewise.
4170 (init_registers_s390_te_linux64): Likewise.
4171 (tdesc_s390_te_linux64): Likewise.
4172 (init_registers_s390_vx_linux64): Likewise.
4173 (tdesc_s390_vx_linux64): Likewise.
4174 (init_registers_s390_tevx_linux64): Likewise.
4175 (tdesc_s390_tevx_linux64): Likewise.
4176 (init_registers_s390x_linux64): Likewise.
4177 (tdesc_s390x_linux64): Likewise.
4178 (init_registers_s390x_linux64v1): Likewise.
4179 (tdesc_s390x_linux64v1): Likewise.
4180 (init_registers_s390x_linux64v2): Likewise.
4181 (tdesc_s390x_linux64v2): Likewise.
4182 (init_registers_s390x_te_linux64): Likewise.
4183 (tdesc_s390x_te_linux64): Likewise.
4184 (init_registers_s390x_vx_linux64): Likewise.
4185 (tdesc_s390x_vx_linux64): Likewise.
4186 (init_registers_s390x_tevx_linux64): Likewise.
4187 (tdesc_s390x_tevx_linux64): Likewise.
4188 (have_hwcap_s390_vx): New static variable.
4189 (s390_arch_setup): Fill have_hwcap_s390_vx.
4190 (s390_get_thread_area): New function.
4191 (s390_ft_entry_gpr_esa): New const.
4192 (s390_ft_entry_gpr_zarch): New const.
4193 (s390_ft_entry_misc): New const.
4194 (s390_ft_entry_fr): New const.
4195 (s390_ft_entry_vr): New const.
4196 (s390_ft_main_31): New const.
4197 (s390_ft_main_64): New const.
4198 (s390_ft_exit_fr): New const.
4199 (s390_ft_exit_vr): New const.
4200 (s390_ft_exit_misc): New const.
4201 (s390_ft_exit_gpr_esa): New const.
4202 (s390_ft_exit_gpr_zarch): New const.
4203 (append_insns): New function.
4204 (s390_relocate_instruction): New function.
4205 (s390_install_fast_tracepoint_jump_pad): New function.
4206 (s390_get_min_fast_tracepoint_insn_len): New function.
4207 (s390_get_ipa_tdesc_idx): New function.
4208 (struct linux_target_ops): Wire in the above functions.
4209 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4210 * linux-s390-tdesc.h: New file.
4211
4212 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4213
4214 * linux-s390-low.c (s390_supports_tracepoints): New function.
4215 (struct linux_target_ops): Fill supports_tracepoints hook.
4216
4217 2016-03-18 Yao Qi <yao.qi@linaro.org>
4218
4219 * linux-low.c (lwp_signal_can_be_delivered): New function.
4220 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4221
4222 2016-03-18 Yao Qi <yao.qi@linaro.org>
4223
4224 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4225 0 if signal is enqueued. Remove 'signal' from one debugging
4226 message. Move one debugging message to some lines below.
4227 Remove code setting 'signal' to 0.
4228
4229 2016-03-18 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-low.c (linux_low_filter_event): Remove redundant
4232 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4233
4234 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4235
4236 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4237 (struct linux_target_ops): Wire in the above.
4238
4239 2016-03-03 Yao Qi <yao.qi@linaro.org>
4240
4241 * linux-low.c: Update comments to start_step_over.
4242
4243 2016-03-03 Yao Qi <yao.qi@linaro.org>
4244
4245 PR server/19736
4246 * linux-low.c (handle_extended_wait): Set child suspended
4247 if event_lwp->bp_reinsert isn't zero.
4248
4249 2016-03-02 Yao Qi <yao.qi@linaro.org>
4250
4251 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4252 enqueue_pending_signal.
4253
4254 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4255
4256 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4257 is actually loaded.
4258
4259 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4260
4261 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4262 (s390_regmap_3264) [!__s390x__]: New global.
4263 (s390_collect_ptrace_register): Skip map entries containing -1.
4264 (s390_supply_ptrace_register): Ditto.
4265 (s390_fill_gprs_high): New function.
4266 (s390_store_gprs_high): New function.
4267 (s390_regsets): Add NT_S390_HIGH_GPRS.
4268 (s390_get_hwcap): Enable on 31-bit.
4269 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4270 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4271 Detect NT_S390_HIGH_GPRS.
4272 (s390_usrregs_info_3264): Enable on 31-bit.
4273 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4274 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4275
4276 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4277
4278 PR gdb/13808
4279 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4280 * configure.srv: Ditto.
4281 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4282 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4283 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4284 (init_registers_amd64_linux): Remove prototype.
4285 (tdesc_amd64_linux): Remove declaration.
4286 (get_ipa_tdesc): New function.
4287 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4288 initialize remaining tdescs.
4289 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4290 (init_registers_i386_linux): Remove prototype.
4291 (tdesc_i386_linux): Remove declaration.
4292 (get_ipa_tdesc): New function.
4293 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4294 initialize remaining tdescs.
4295 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4296 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4297 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4298 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4299 (x86_get_ipa_tdesc_idx): New function.
4300 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4301 * linux-x86-tdesc.h: New file.
4302 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4303 (target_get_ipa_tdesc_idx): New macro.
4304 * tracepoint.c (ipa_tdesc_idx): New macro.
4305 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4306 (symbol_list): Add ipa_tdesc_idx.
4307 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4308 (ipa_tdesc): Remove.
4309 (ipa_tdesc_idx): New variable.
4310 (get_context_regcache): Use get_ipa_tdesc.
4311 (gdb_collect): Ditto.
4312 (gdb_probe): Ditto.
4313 * tracepoint.h (get_ipa_tdesc): New prototype.
4314 (ipa_tdesc): Remove.
4315
4316 2016-02-24 Pedro Alves <palves@redhat.com>
4317
4318 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4319 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4320 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4321 Factor out common code between the USE_SIGTRAP_SIGINFO and
4322 !USE_SIGTRAP_SIGINFO blocks.
4323 (linux_low_filter_event): Call save_stop_reason instead of
4324 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4325 Update comments.
4326 (linux_wait_1): Update comments.
4327
4328 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4329
4330 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4331 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4332 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4333 ppc_insert_point, ppc_remove_point.
4334
4335 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4336
4337 * linux-s390-low.c (s390_supports_z_point_type): New function.
4338 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4339
4340 2016-02-16 Yao Qi <yao.qi@linaro.org>
4341
4342 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4343 PC. Get pc from regcache_read_pc.
4344
4345 2016-02-12 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4348 or linux_get_pc_32bit.
4349 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4350
4351 2016-02-12 Yao Qi <yao.qi@linaro.org>
4352
4353 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4354 arm_linux_get_next_pcs_fixup.
4355
4356 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4357
4358 * tracepoint.c (x_tracepoint_action_download): Change
4359 write_inferior_data_ptr to write_inferior_data_pointer.
4360 (cmd_qtstart): Likewise.
4361 (write_inferior_data_ptr): Remove.
4362 (download_agent_expr): Change write_inferior_data_ptr to
4363 write_inferior_data_pointer.
4364 (download_tracepoint_1): Likewise.
4365 (download_tracepoint): Likewise.
4366 (download_trace_state_variables): Likewise.
4367
4368 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4369 Marcin Kościelnicki <koriakin@0x04.net>
4370
4371 * tracepoint.c (struct tracepoint_action_ops): Remove.
4372 (struct tracepoint_action): Remove ops.
4373 (m_tracepoint_action_download, r_tracepoint_action_download)
4374 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4375 size and offset accordingly.
4376 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4377 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4378 (tracepoint_action_send, tracepoint_action_download): New functions.
4379 Helpers for trace action handlers.
4380 (add_tracepoint_action): Remove setup actions ops.
4381 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4382
4383 2016-02-10 Yao Qi <yao.qi@linaro.org>
4384
4385 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4386
4387 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4388
4389 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4390 to AC_OUTPUT.
4391 * configure: Regenerate.
4392
4393 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4394
4395 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4396 void * to gdb_byte *.
4397 * linux-low.c (siginfo_fixup): Likewise.
4398 (linux_xfer_siginfo): Likewise.
4399 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4400 Likewise.
4401 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4402
4403 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4404
4405 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4406 to srv_tgtobj.
4407 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4408 to srv_tgtobj.
4409 * linux-x86-low.c [__x86_64__]: Include
4410 "nat/amd64-linux-siginfo.h".
4411 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4412 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4413 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4414 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4415 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4416 (cpt_si_fd, si_timerid, si_overrun): Move from
4417 nat/amd64-linux-siginfo.c.
4418 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4419
4420 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4421
4422 * server.c (skip_to_semicolon): Remove.
4423 (process_point_options): Use strchrnul instead of
4424 skip_to_semicolon.
4425
4426 2016-01-26 Yao Qi <yao.qi@linaro.org>
4427
4428 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4429 * linux-low.c (install_software_single_step_breakpoints): Don't
4430 call regcache_read_pc.
4431 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4432 argument pc.
4433
4434 2016-01-26 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-low.c (install_software_single_step_breakpoints): Call
4437 regcache_read_pc instead of get_pc.
4438
4439 2016-01-26 Yao Qi <yao.qi@linaro.org>
4440
4441 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4442 (unblock_async_io): Rename to ...
4443 (block_unblock_async_io): ... it. New function.
4444 (enable_async_io): Don't install SIGIO handler. Unblock it
4445 instead.
4446 (disable_async_io): Don't ignore SIGIO. Block it instead.
4447 (initialize_async_io): Install SIGIO handler. Don't call
4448 unblock_async_io.
4449
4450 2016-01-26 Yao Qi <yao.qi@linaro.org>
4451
4452 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4453 first character is '\003', call *the_target->request_interrupt.
4454
4455 2016-01-25 Yao Qi <yao.qi@linaro.org>
4456
4457 * remote-utils.c (new_thread_notify): Remove.
4458 (dead_thread_notify): Likewise.
4459 * remote-utils.h (new_thread_notify): Remove declaration.
4460 (dead_thread_notify): Likewise.
4461
4462 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4463
4464 * gdb.trace/pending.exp: Fix expected message on continue.
4465
4466 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4467
4468 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4469 it works properly on big-endian machines where sizeof (CORE_ADDR)
4470 != sizeof (void *).
4471
4472 2016-01-21 Pedro Alves <palves@redhat.com>
4473
4474 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4475 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4476 * configure: Regenerate.
4477
4478 2016-01-21 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4481 is_thumb and set it according to CPSR saved on the stack.
4482 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4483 arm_sigreturn_next_pc.
4484
4485 2016-01-18 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-low.c (linux_set_pc_64bit): New function.
4488 (linux_get_pc_64bit): New function.
4489 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4490 Declare.
4491 * linux-sparc-low.c (debug_threads): Remove declaration.
4492 (sparc_get_pc): Remove.
4493 (the_low_target): Use linux_get_pc_64bit instead of
4494 sparc_get_pc.
4495 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4496 (the_low_target): Use linux_get_pc_64bit and
4497 linux_set_pc_64bit.
4498
4499 2016-01-18 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-arm-low.c (debug_threads): Remove declaration.
4502 (arm_get_pc, arm_set_pc): Remove.
4503 (the_low_target): Use linux_get_pc_32bit and
4504 linux_set_pc_32bit.
4505 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4506 (the_low_target): Use linux_get_pc_32bit and
4507 linux_set_pc_32bit.
4508 * linux-cris-low.c (debug_threads): Remove declaration.
4509 (cris_get_pc, cris_set_pc,): Remove.
4510 (the_low_target): Use linux_get_pc_32bit and
4511 linux_set_pc_32bit.
4512 * linux-crisv32-low.c (debug_threads): Remove declaration.
4513 (cris_get_pc, cris_set_pc): Remove.
4514 (the_low_target): Use linux_get_pc_32bit and
4515 linux_set_pc_32bit.
4516 * linux-low.c: Include inttypes.h.
4517 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4518 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4519 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4520 (the_low_target): Use linux_get_pc_32bit and
4521 linux_set_pc_32bit.
4522 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4523 (the_low_target): Use linux_get_pc_32bit and
4524 linux_set_pc_32bit.
4525 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4526 (the_low_target): Use linux_get_pc_32bit and
4527 linux_set_pc_32bit.
4528 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4529 (the_low_target): Use linux_get_pc_32bit and
4530 linux_set_pc_32bit.
4531 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4532 (the_low_target): Use linux_get_pc_32bit and
4533 linux_set_pc_32bit.
4534
4535 2016-01-18 Gary Benson <gbenson@redhat.com>
4536
4537 * configure.ac (AC_FUNC_FORK): New check.
4538 * config.in: Regenerate.
4539 * configure: Likewise.
4540
4541 2016-01-14 Yao Qi <yao.qi@linaro.org>
4542
4543 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4544 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4545 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4546 arm_get_next_pcs_ctor.
4547
4548 2016-01-12 Josh Stone <jistone@redhat.com>
4549 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4550
4551 * inferiors.h: Include "gdb_vecs.h".
4552 (struct process_info): Add syscalls_to_catch.
4553 * inferiors.c (remove_process): Free syscalls_to_catch.
4554 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4555 syscall_return stops.
4556 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4557 * server.c (handle_general_set): Handle QCatchSyscalls.
4558 (handle_query): Report support for QCatchSyscalls.
4559 * target.h (struct target_ops): Add supports_catch_syscall.
4560 (target_supports_catch_syscall): New macro.
4561 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4562 (struct lwp_info): Add syscall_state.
4563 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4564 Maintain syscall_state and syscalls_to_catch across exec.
4565 (get_syscall_trapinfo): New function, proxy to the_low_target.
4566 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4567 (linux_low_filter_event): Toggle syscall_state entry/return for
4568 syscall traps, and set it ignored for all others.
4569 (gdb_catching_syscalls_p): New function.
4570 (gdb_catch_this_syscall_p): New function.
4571 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4572 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4573 (linux_supports_catch_syscall): New function.
4574 (linux_target_ops): Install it.
4575 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4576 (the_low_target): Install it.
4577
4578 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4579
4580 * acinclude.m4: Include new ../warning.m4 file.
4581 * configure: Regenerated.
4582 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4583
4584 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4585
4586 * ax.c (is_goto_target): Mark static.
4587 * linux-low.c (register_addr): Likewise.
4588 (linux_fetch_registers, linux_store_registers): Likewise.
4589 * mem-break.c (any_persistent_commands): Fix old prototype.
4590 (add_commands_to_breakpoint): Mark static.
4591 * regcache.c (find_register_by_name): Delete unused func.
4592 * remote-utils.c (hex_or_minus_one): Mark static.
4593 * server.c (monitor_show_help): Mark static.
4594 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4595 handle_v_requests): Likewise.
4596
4597 2016-01-12 Pedro Alves <palves@redhat.com>
4598
4599 Remove use of the registered trademark symbol throughout.
4600
4601 2016-01-08 Yao Qi <yao.qi@linaro.org>
4602
4603 * remote-utils.c (getpkt): If c is '\003', call target hook
4604 request_interrupt.
4605
4606 2016-01-06 Yao Qi <yao.qi@linaro.org>
4607
4608 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4609 linux-aarch32-low.c.
4610 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4611 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4612 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4613 (thumb2_breakpoint): Declare.
4614 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4615 linux-aarch32-low.h.
4616 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4617 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4618 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4619
4620 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4621
4622 * gdbreplay.c (gdbreplay_version): Change copyright year in
4623 version message.
4624 * server.c (gdbserver_version): Likewise.
4625
4626 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4627
4628 * server.c (crc32_table): Delete.
4629 (crc32): Use libiberty's xcrc32 function.
4630
4631 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4632
4633 * lynx-low.c (lynx_delete_thread_callback): New function.
4634 (lynx_mourn): Properly delete our process and all of its
4635 threads. Remove call to clear_inferiors.
4636
4637 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4638
4639 * target.c (thread_search_callback): Add check that
4640 the thread_stopped target callback is not NULL before
4641 calling it.
4642
4643 2015-12-21 Yao Qi <yao.qi@linaro.org>
4644
4645 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4646 arm breakpoint.
4647
4648 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4649
4650 * server.c (handle_query): Call target_supports_software_single_step.
4651
4652 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4653
4654 * linux-low.c (single_step): New function.
4655 (linux_resume_one_lwp_throw): Call single_step.
4656 (start_step_over): Likewise.
4657
4658 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4659
4660 * Makefile.in (SFILES): Append arch/arm-linux.c,
4661 arch/arm-get-next-pcs.c.
4662 (arm-linux.o): New rule.
4663 (arm-get-next-pcs.o): New rule.
4664 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4665 arm-linux.o.
4666 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4667 to linux-aarch32-low.c.
4668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4669 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4670 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4671 (thumb2_breakpoint_len): Likewise.
4672 (arm_is_thumb_mode): Make non-static.
4673 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4674 from linux-aarch32-low.c.
4675 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4676 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4677 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4678 (thumb2_breakpoint_len): Likewise.
4679 (arm_is_thumb_mode): New declaration.
4680 * linux-arm-low.c: Include arch/arm-linux.h
4681 aarch/arm-get-next-pcs.h, sys/syscall.h.
4682 (get_next_pcs_ops): New struct.
4683 (get_next_pcs_addr_bits_remove): New function.
4684 (get_next_pcs_is_thumb): New function.
4685 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4686 (arm_sigreturn_next_pc): Likewise.
4687 (get_next_pcs_syscall_next_pc): Likewise.
4688 (arm_gdbserver_get_next_pcs): Likewise.
4689 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4690 Initialize.
4691 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4692 * server.h: Include gdb_vecs.h.
4693
4694 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4695
4696 * Makefile.in (SFILES): Append common/common-regcache.c.
4697 (OBS): Append common-regcache.o.
4698 (common-regcache.o): New rule.
4699 * regcache.c (init_register_cache): Initialize cache to
4700 REG_UNAVAILABLE.
4701 (regcache_raw_read_unsigned): New function.
4702 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4703 register_status enum.
4704
4705 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4706
4707 * linux-aarch64-low.c (the_low_targets): Rename
4708 breakpoint_reinsert_addr to get_next_pcs.
4709 * linux-arm-low.c (the_low_targets): Likewise.
4710 * linux-bfin-low.c (the_low_targets): Likewise.
4711 * linux-cris-low.c (the_low_targets): Likewise.
4712 * linux-crisv32-low.c (the_low_targets): Likewise.
4713 * linux-low.c (can_software_single_step): Likewise.
4714 (install_software_single_step_breakpoints): New function.
4715 (start_step_over): Use install_software_single_step_breakpoints.
4716 * linux-low.h: New CORE_ADDR vector.
4717 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4718 get_next_pcs.
4719 * linux-mips-low.c (the_low_targets): Likewise.
4720 * linux-nios2-low.c (the_low_targets): Likewise.
4721 * linux-sparc-low.c (the_low_targets): Likewise.
4722
4723 2015-12-17 Pedro Alves <palves@redhat.com>
4724
4725 * linux-low.c (linux_kill_one_lwp): Remove references to
4726 LinuxThreads.
4727 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4728 to 'kill'.
4729 (linux_init_signals): Delete.
4730 (initialize_low): Adjust.
4731 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4732
4733 2015-12-16 Pedro Alves <palves@redhat.com>
4734
4735 * configure.ac (compiler warning flags): When testing a
4736 -Wno-foo option, check whether -Wfoo works instead.
4737 * configure: Regenerate.
4738
4739 2015-12-11 Don Breazeal <donb@codesourcery.com>
4740
4741 * server.c (process_serial_event): Don't exit from gdbserver
4742 in remote mode if there are still active inferiors.
4743
4744 2015-12-11 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4747 arm_breakpoint_at if the process is 32-bit.
4748
4749 2015-12-11 Yao Qi <yao.qi@linaro.org>
4750
4751 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4752 arm breakpoint.
4753
4754 2015-12-07 Yao Qi <yao.qi@linaro.org>
4755
4756 * configure.srv: Append arm.o to srv_tgtobj for
4757 aarch64*-*-linux* target.
4758 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4759 from linux-arm-low.c.
4760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4761 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4762 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4763 (thumb2_breakpoint_len): Likewise.
4764 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4765 (arm_breakpoint_kinds): Likewise.
4766 (arm_breakpoint_kind_from_pc): Likewise.
4767 (arm_sw_breakpoint_from_kind): Likewise.
4768 (arm_breakpoint_kind_from_current_state): Likewise.
4769 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4770 (arm_sw_breakpoint_from_kind): Declare.
4771 (arm_breakpoint_kind_from_current_state): Declare.
4772 (arm_breakpoint_at): Declare.
4773 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4774 arm_sw_breakpoint_from_kind if process is 32-bit.
4775 (aarch64_breakpoint_kind_from_pc): New function.
4776 (aarch64_breakpoint_kind_from_current_state): New function.
4777 (the_low_target): Initialize fields breakpoint_kind_from_pc
4778 and breakpoint_kind_from_current_state.
4779 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4780 linux-aarch32-low.c.
4781 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4782 (arm_breakpoint, arm_breakpoint_len): Likewise.
4783 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4784 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4785 (arm_is_thumb_mode): Likewise.
4786 (arm_breakpoint_at): Likewise.
4787 (arm_breakpoint_kind_from_pc): Likewise.
4788 (arm_sw_breakpoint_from_kind): Likewise.
4789 (arm_breakpoint_kind_from_current_state): Likewise.
4790
4791 Revert:
4792 2015-08-04 Yao Qi <yao.qi@linaro.org>
4793
4794 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4795 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4796 * server.c (extended_protocol): Remove "static".
4797 * server.h (extended_protocol): Declare it.
4798
4799 2015-12-04 Josh Stone <jistone@redhat.com>
4800
4801 * target.h (struct target_ops) <arch_setup>: Rename to ...
4802 (struct target_ops) <post_create_inferior>: ... this.
4803 (target_arch_setup): Rename to ...
4804 (target_post_create_inferior): ... this, calling post_create_inferior.
4805 * server.c (start_inferior): Update target_arch_setup calls to
4806 target_post_create_inferior.
4807 * linux-low.c (linux_low_ptrace_options): Forward declare.
4808 (linux_arch_setup): Update its comment for general use.
4809 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4810 (struct linux_target_ops): Use linux_post_create_inferior.
4811 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4812 to post_create_inferior.
4813 * nto-low.c (struct nto_target_ops): Likewise.
4814 * spu-low.c (struct spu_target_ops): Likewise.
4815 * win32-low.c (struct win32_target_ops): Likewise.
4816
4817 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4818
4819 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4820
4821 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4822
4823 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4824 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4825 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4826 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4827 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4828 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4829 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4830 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4831 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4832 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4833 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4835
4836 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4837
4838 * linux-low.c (linux_look_up_symbols): Don't call
4839 linux_supports_traceclone.
4840 * linux-low.h (thread_db_init): Remove use_events argument.
4841 * thread-db.c (thread_db_use_event): Remove global variable.
4842 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4843 (struct thread_db) <td_create_bp>: Remove field.
4844 (thread_db_create_event): Remove function.
4845 (thread_db_enable_reporting): Likewise.
4846 (find_one_thread): Don't check for thread_db_use_events.
4847 (attach_thread): Likewise.
4848 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4849 (try_thread_db_load_1): Don't check for thread_db_use_events.
4850 (thread_db_init): Remove use_events argument and thread events
4851 handling.
4852 (remove_thread_event_breakpoints): Remove function.
4853 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4854
4855 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4856
4857 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4858 New function.
4859 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4860 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4861 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4862 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4863 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4864 Initialize.
4865 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4866 New function.
4867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4868 * linux-low.c (can_hardware_single_step): Use
4869 supports_hardware_single_step.
4870 (can_software_single_step): New function.
4871 (start_step_over): Call can_software_single_step.
4872 (linux_supports_hardware_single_step): New function.
4873 (struct target_ops) <supports_software_single_step>: Initialize.
4874 * linux-low.h (struct linux_target_ops)
4875 <supports_hardware_single_step>: Initialize.
4876 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4877 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4878 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4879 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4880 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4881 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4882 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4883 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4884 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4885 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4886 Initialize.
4887 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4888 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4889 Initialize.
4890 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4891 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4892 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4893 New function.
4894 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4895 * target.h (struct target_ops): <supports_software_single_step>:
4896 New field.
4897 (target_supports_software_single_step): New macro.
4898
4899 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4900
4901 * linux-low.c (linux_wait_1): Fix pc advance condition.
4902 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4903 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4904
4905 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4906
4907 * linux-arm-low.c (arm_is_thumb_mode): New function.
4908 (arm_breakpoint_at): Use arm_is_thumb_mode.
4909 (arm_breakpoint_kind_from_current_state): New function.
4910 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4911 Initialize.
4912 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4913 (linux_breakpoint_kind_from_current_state): New function.
4914 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4915 * linux-low.h (struct linux_target_ops)
4916 <breakpoint_kind_from_current_state>: New field.
4917 * target.h (struct target_ops): Likewise.
4918 (target_breakpoint_kind_from_current_state): New macro.
4919
4920 2015-11-30 Pedro Alves <palves@redhat.com>
4921
4922 * linux-low.c (linux_resume): Wake up the event loop before
4923 returning.
4924
4925 2015-11-30 Pedro Alves <palves@redhat.com>
4926
4927 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4928 check.
4929 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4930 to -1.
4931 * target.c (struct thread_search): New structure.
4932 (thread_search_callback): New function.
4933 (prev_general_thread): New global.
4934 (prepare_to_access_memory, done_accessing_memory): New functions.
4935 * target.h (prepare_to_access_memory, done_accessing_memory):
4936 Replace macros with function declarations.
4937
4938 2015-11-30 Pedro Alves <palves@redhat.com>
4939
4940 PR 14618
4941 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4942 report TARGET_WAITKIND_NO_RESUMED.
4943 * remote-utils.c (prepare_resume_reply): Handle
4944 TARGET_WAITKIND_NO_RESUMED.
4945 * server.c (report_no_resumed): New global.
4946 (handle_query) <qSupported>: Handle "no-resumed+". Report
4947 "no-resumed+" support.
4948 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4949 return error if the client doesn't support no-resumed events.
4950 (push_stop_notification): New function.
4951 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4952 events if the client supports them.
4953
4954 2015-11-30 Pedro Alves <palves@redhat.com>
4955
4956 * linux-low.c (thread_still_has_status_pending_p): Don't check
4957 vCont;t here.
4958 (lwp_resumed): New function.
4959 (status_pending_p_callback): Return early if the LWP is not
4960 supposed to be resumed.
4961
4962 2015-11-30 Pedro Alves <palves@redhat.com>
4963
4964 * linux-low.c (handle_extended_wait): Assert that the LWP's
4965 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4966 thread create events, leave the new child's status pending.
4967 (linux_low_filter_event): If GDB wants to hear about thread exit
4968 events, leave the LWP marked dead and don't delete it.
4969 (linux_wait_for_event_filtered): Don't check for thread exit.
4970 (filter_exit_event): New function.
4971 (linux_wait_1): Use it, when returning an exit event.
4972 (linux_resume_one_lwp_throw): Assert that the LWP's
4973 waitstatus is TARGET_WAITKIND_IGNORE.
4974 * remote-utils.c (prepare_resume_reply): Handle
4975 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4976 * server.c (report_thread_events): New global.
4977 (handle_general_set): Handle QThreadEvents.
4978 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4979 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4980 TARGET_WAITKIND_THREAD_EXITED.
4981 * server.h (report_thread_events): Declare.
4982
4983 2015-11-30 Pedro Alves <palves@redhat.com>
4984
4985 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4986 the thread's last_resume_kind was resume_stop.
4987
4988 2015-11-30 Pedro Alves <palves@redhat.com>
4989
4990 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4991 before returning.
4992
4993 2015-11-30 Pedro Alves <palves@redhat.com>
4994
4995 * server.c (handle_v_requests): Handle vCtrlC.
4996
4997 2015-11-30 Pedro Alves <palves@redhat.com>
4998
4999 * gdbthread.h (find_any_thread_of_pid): Declare.
5000 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5001 functions.
5002 * server.c (handle_query): If current_thread is NULL, look for
5003 another thread of the selected process.
5004
5005 2015-11-26 Daniel Colascione <dancol@dancol.org>
5006 Simon Marchi <simon.marchi@ericsson.com>
5007
5008 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5009 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5010 name in reply.
5011 * target.h (struct target_ops) <thread_name>: New field.
5012 (target_thread_name): New macro.
5013
5014 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5015
5016 * regcache.h (regcache_invalidate_pid): Add declaration.
5017 * regcache.c (regcache_invalidate_pid): New function, extracted
5018 from regcache_invalidate.
5019 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5020 Add trivial documentation comment.
5021 * lynx-low.c: Use regcache_invalidate_pid instead of
5022 regcache_invalidate.
5023
5024 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5025
5026 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5027 and Elf64_auxv_t if the target is Android.
5028
5029 2015-11-22 Doug Evans <xdje42@gmail.com>
5030
5031 * target.h: #include <sys/types.h>.
5032
5033 2015-11-19 Pedro Alves <palves@redhat.com>
5034
5035 * linux-low.c (linux_process_qsupported): Change prototype.
5036 Adjust.
5037 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5038 Change prototype.
5039 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5040 and adjust to loop over all features.
5041 * server.c (handle_query) <qSupported>: Adjust to call
5042 target_process_qsupported once, passing it a vector of unprocessed
5043 features.
5044 * target.h (struct target_ops) <process_qsupported>: Change
5045 prototype.
5046 (target_process_qsupported): Adjust.
5047
5048 2015-11-19 Pedro Alves <palves@redhat.com>
5049
5050 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5051 mode.
5052 * configure: Regenerate.
5053
5054 2015-11-19 Pedro Alves <palves@redhat.com>
5055
5056 * configure: Regenerate.
5057
5058 2015-11-19 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5061 type to uint32_t.
5062
5063 2015-11-19 Yao Qi <yao.qi@linaro.org>
5064
5065 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5066 (struct aarch64_operand): Move enum out.
5067
5068 2015-11-19 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5071 struct user_fpsimd_state *.
5072 (aarch64_store_fpregset): Likewise.
5073
5074 2015-11-19 Yao Qi <yao.qi@linaro.org>
5075
5076 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5077 struct user_pt_regs *.
5078 (aarch64_store_gregset): Likewise.
5079
5080 2015-11-18 Pedro Alves <palves@redhat.com>
5081
5082 * Makefile.in (all_object_files): Add $IPA_OBJS.
5083
5084 2015-11-17 Pedro Alves <palves@redhat.com>
5085
5086 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5087 GDB_SIGNAL_0 and gdb_signal_to_string.
5088
5089 2015-11-17 Pedro Alves <palves@redhat.com>
5090
5091 * win32-low.c (handle_output_debug_string): Remove parameter.
5092 (win32_kill): Remove our_status local and adjust call to
5093 handle_output_debug_string.
5094 (get_child_debug_event): Adjust call to
5095 handle_output_debug_string.
5096
5097 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5098
5099 * linux-mips-low.c (mips_fill_gregset): Add cast.
5100 (mips_store_gregset): Likewise.
5101 (mips_fill_fpregset): Likewise.
5102 (mips_store_fpregset): Likewise.
5103
5104 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5105
5106 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5107 priv.
5108
5109 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5110
5111 * linux-mips-low.c (mips_linux_new_thread): Change type of
5112 watch_type to enum target_hw_bp_type.
5113
5114 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5115
5116 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5117 Change return type to arm_hwbp_type.
5118
5119 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5120
5121 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5122 (arm_store_gregset): Likewise.
5123 * linux-arm-low.c (arm_get_hwcap): Likewise.
5124 (arm_read_description): Likewise.
5125
5126 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5127
5128 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5129
5130 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5131
5132 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5133 (ppc_fill_vsxregset): Likewise.
5134 (ppc_store_vsxregset): Likewise.
5135 (ppc_fill_vrregset): Likewise.
5136 (ppc_store_vrregset): Likewise.
5137 (ppc_fill_evrregset): Likewise.
5138 (ppc_store_evrregset): Likewise.
5139
5140 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5141
5142 * linux-ppc-low.c (ppc_usrregs_info): Remove
5143 forward-declaration.
5144 (ppc_arch_setup): Move lower in file.
5145
5146 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5147
5148 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5149 (ps_pdwrite): Likewise.
5150
5151 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5152
5153 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5154 to after assert checks.
5155
5156 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5157
5158 * proc-service.c (ps_pdread): Add/adjust casts.
5159 (ps_pdwrite): Add/adjust casts.
5160
5161 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5162
5163 * server.c (handle_search_memory_1): Cast return value of
5164 memmem.
5165
5166 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5167
5168 * server.c (write_qxfer_response): Change type of data to
5169 gdb_byte *.
5170
5171 2015-10-29 Pedro Alves <palves@redhat.com>
5172
5173 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5174
5175 2015-10-29 Pedro Alves <palves@redhat.com>
5176
5177 * tracepoint.c (clear_installed_tracepoints): Add casts.
5178
5179 2015-10-29 Pedro Alves <palves@redhat.com>
5180
5181 * server.c (handle_v_cont, process_serial_event): Add enum
5182 gdb_signal casts to signal parsing code.
5183
5184 2015-10-29 Pedro Alves <palves@redhat.com>
5185
5186 * linux-low.h (NULL_REGSET): Define.
5187 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5188 * linux-arm-low.c (arm_regsets): Likewise.
5189 * linux-crisv32-low.c (cris_regsets): Likewise.
5190 * linux-m68k-low.c (m68k_regsets): Likewise.
5191 * linux-mips-low.c (mips_regsets): Likewise.
5192 * linux-nios2-low.c (nios2_regsets): Likewise.
5193 * linux-ppc-low.c (ppc_regsets): Likewise.
5194 * linux-s390-low.c (s390_regsets): Likewise.
5195 * linux-sh-low.c (sh_regsets): Likewise.
5196 * linux-sparc-low.c (sparc_regsets): Likewise.
5197 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5198 * linux-tile-low.c (tile_regsets): Likewise.
5199 * linux-x86-low.c (x86_regsets): Likewise.
5200 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5201
5202 2015-10-29 Pedro Alves <palves@redhat.com>
5203
5204 * linux-low.h (NULL_REGSET): Define.
5205 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5206 * linux-arm-low.c (arm_regsets): Likewise.
5207 * linux-crisv32-low.c (cris_regsets): Likewise.
5208 * linux-m68k-low.c (m68k_regsets): Likewise.
5209 * linux-mips-low.c (mips_regsets): Likewise.
5210 * linux-nios2-low.c (nios2_regsets): Likewise.
5211 * linux-ppc-low.c (ppc_regsets): Likewise.
5212 * linux-s390-low.c (s390_regsets): Likewise.
5213 * linux-sh-low.c (sh_regsets): Likewise.
5214 * linux-sparc-low.c (sparc_regsets): Likewise.
5215 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5216 * linux-tile-low.c (tile_regsets): Likewise.
5217 * linux-x86-low.c (x86_regsets): Likewise.
5218 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5219
5220 2015-10-26 Doug Evans <dje@google.com>
5221
5222 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5223
5224 2015-10-26 Doug Evans <dje@google.com>
5225
5226 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5227
5228 2015-10-26 Doug Evans <dje@google.com>
5229
5230 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5231 for debug_printf.
5232 (attach_thread, find_new_threads_callback): Ditto.
5233
5234 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5235
5236 * mem-break.h (set_breakpoint_data): Remove.
5237
5238 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5239
5240 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5241 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5242 (initialize_low): Remove set_breakpoint_data call.
5243 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5244 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5245 (initialize_low): Remove set_breakpoint_data call.
5246 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5247 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5248 (initialize_low): Remove set_breakpoint_data call.
5249
5250 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5251
5252 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5253 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5254 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5255 * target.h (target_breakpoint_kind_from_pc): New macro.
5256
5257 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5258
5259 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5260 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5261 the default breakpoint kind.
5262
5263 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5264
5265 * linux-arm-low.c (arm_supports_z_point_type): Add software
5266 breakpoint support.
5267
5268 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5269
5270 * linux-arm-low.c: Refactor breakpoint definitions.
5271 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5272 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5273
5274 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5275
5276 * Makefile.in: Add arm.c/o.
5277 * configure.srv: Likewise.
5278 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5279 (arm_breakpoint_kind_from_pc): New function.
5280 (arm_sw_breakpoint_from_kind): Return proper kind.
5281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5282
5283 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5284
5285 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5286 removal.
5287 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5288 (struct raw_breakpoint) <size>: Remove.
5289 (struct raw_breakpoint) <kind>: Add.
5290 (bp_size): New function.
5291 (bp_opcode): Likewise.
5292 (find_raw_breakpoint_at): Adjust for kind.
5293 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5294 (remove_memory_breakpoint): Adjust for kind call bp_size.
5295 (set_raw_breakpoint_at): Adjust for kind.
5296 (set_breakpoint): Likewise.
5297 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5298 (delete_raw_breakpoint): Adjust for kind.
5299 (delete_breakpoint): Likewise.
5300 (find_gdb_breakpoint): Likewise.
5301 (set_gdb_breakpoint_1): Likewise.
5302 (set_gdb_breakpoint): Likewise.
5303 (delete_gdb_breakpoint_1): Likewise.
5304 (delete_gdb_breakpoint): Likewise.
5305 (uninsert_raw_breakpoint): Likewise.
5306 (reinsert_raw_breakpoint): Likewise.
5307 (set_breakpoint_data): Remove.
5308 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5309 (check_mem_read): Adjust for kind call bp_size.
5310 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5311 (clone_one_breakpoint): Adjust for kind.
5312 * mem-break.h (set_gdb_breakpoint): Likewise.
5313 (delete_gdb_breakpoint): Likewise.
5314 * server.c (process_serial_event): Likewise.
5315
5316 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5317
5318 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5319 (struct linux_target_ops) <breakpoint>: Remove.
5320 (struct linux_target_ops) <breakpoint_len>: Remove.
5321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5323 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5324 (arm_sw_breakpoint_from_kind): New function.
5325 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5326 (struct linux_target_ops) <breakpoint>: Remove.
5327 (struct linux_target_ops) <breakpoint_len>: Remove.
5328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5330 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5331 (struct linux_target_ops) <breakpoint>: Remove.
5332 (struct linux_target_ops) <breakpoint_len>: Remove.
5333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5335 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5336 (struct linux_target_ops) <breakpoint>: Remove.
5337 (struct linux_target_ops) <breakpoint_len>: Remove.
5338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5340 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5341 and sw_breakpoint_from_kind to increment the pc.
5342 (linux_breakpoint_kind_from_pc): New function.
5343 (linux_sw_breakpoint_from_kind): New function.
5344 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5345 (initialize_low): Call breakpoint_kind_from_pc and
5346 sw_breakpoint_from_kind to replace breakpoint_data/len.
5347 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5348 New field.
5349 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5350 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5351 (struct linux_target_ops) <breakpoint>: Remove.
5352 (struct linux_target_ops) <breakpoint_len>: Remove.
5353 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5354 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5355 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5356 (struct linux_target_ops) <breakpoint>: Remove.
5357 (struct linux_target_ops) <breakpoint_len>: Remove.
5358 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5359 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5360 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5361 (struct linux_target_ops) <breakpoint>: Remove.
5362 (struct linux_target_ops) <breakpoint_len>: Remove.
5363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5365 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5366 (struct linux_target_ops) <breakpoint>: Remove.
5367 (struct linux_target_ops) <breakpoint_len>: Remove.
5368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5370 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5371 (struct linux_target_ops) <breakpoint>: Remove.
5372 (struct linux_target_ops) <breakpoint_len>: Remove.
5373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5375 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5376 (struct linux_target_ops) <breakpoint>: Remove.
5377 (struct linux_target_ops) <breakpoint_len>: Remove.
5378 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5379 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5380 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5381 (struct linux_target_ops) <breakpoint>: Remove.
5382 (struct linux_target_ops) <breakpoint_len>: Remove.
5383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5385 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5386 (struct linux_target_ops) <breakpoint>: Remove.
5387 (struct linux_target_ops) <breakpoint_len>: Remove.
5388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5390 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5391 (struct linux_target_ops) <breakpoint>: Remove.
5392 (struct linux_target_ops) <breakpoint_len>: Remove.
5393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5395 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5396 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
5407 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5408
5409 * linux-cris-low.c (cris_get_pc): Remove void arg.
5410
5411 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5412
5413 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5414 variable name.
5415
5416 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5417
5418 * inferiors.c (thread_pid_matches_callback): New function.
5419 (find_thread_process): New function.
5420 (remove_thread): Reset current_thread.
5421 (remove_process): Assert threads have been removed first.
5422
5423 2015-10-15 Yao Qi <yao.qi@linaro.org>
5424
5425 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5426 if it is 3.
5427 (aarch64_remove_point): Likewise.
5428 * regcache.c (regcache_register_size): New function.
5429
5430 2015-10-12 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c: Update all callers as emit_load_store
5433 is renamed to aarch64_emit_load_store.
5434
5435 2015-10-12 Yao Qi <yao.qi@linaro.org>
5436
5437 * linux-aarch64-low.c: Update all callers of function renaming
5438 from emit_insn to aarch64_emit_insn.
5439
5440 2015-10-12 Yao Qi <yao.qi@linaro.org>
5441
5442 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5443 arch/aarch64-insn.h.
5444 (struct aarch64_memory_operand): Likewise.
5445 (ENCODE): Likewise.
5446 (emit_insn): Move to arch/aarch64-insn.c.
5447 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5448 (emit_load_store): Move to arch/aarch64-insn.c.
5449 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5450 (can_encode_int32): Remove.
5451
5452 2015-10-12 Yao Qi <yao.qi@linaro.org>
5453
5454 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5455 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5456 (aarch64_relocate_instruction): Likewise.
5457 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5458 (struct aarch64_insn_visitor): Likewise.
5459
5460 2015-10-12 Yao Qi <yao.qi@linaro.org>
5461
5462 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5463 (struct aarch64_insn_visitor): New.
5464 (struct aarch64_insn_relocation_data): New.
5465 (aarch64_ftrace_insn_reloc_b): New function.
5466 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5467 (aarch64_ftrace_insn_reloc_cb): Likewise.
5468 (aarch64_ftrace_insn_reloc_tb): Likewise.
5469 (aarch64_ftrace_insn_reloc_adr): Likewise.
5470 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5471 (aarch64_ftrace_insn_reloc_others): Likewise.
5472 (visitor): New.
5473 (aarch64_relocate_instruction): Use visitor.
5474
5475 2015-10-12 Yao Qi <yao.qi@linaro.org>
5476
5477 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5478 int. Add argument buf.
5479 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5480 aarch64_relocate_instruction.
5481
5482 2015-10-12 Yao Qi <yao.qi@linaro.org>
5483
5484 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5485 argument insn. Remove local variable insn. Don't call
5486 target_read_uint32.
5487 (aarch64_install_fast_tracepoint_jump_pad): Call
5488 target_read_uint32.
5489
5490 2015-09-30 Yao Qi <yao.qi@linaro.org>
5491
5492 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5493 (emit_load_store_pair): Likewise.
5494
5495 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5496
5497 * dll.c (match_dll): Add cast(s).
5498 (unloaded_dll): Likewise.
5499 * linux-low.c (second_thread_of_pid_p): Likewise.
5500 (delete_lwp_callback): Likewise.
5501 (count_events_callback): Likewise.
5502 (select_event_lwp_callback): Likewise.
5503 (linux_set_resume_request): Likewise.
5504 * server.c (accumulate_file_name_length): Likewise.
5505 (emit_dll_description): Likewise.
5506 (handle_qxfer_threads_worker): Likewise.
5507 (visit_actioned_threads): Likewise.
5508 * thread-db.c (any_thread_of): Likewise.
5509 * tracepoint.c (same_process_p): Likewise.
5510 (match_blocktype): Likewise.
5511 (build_traceframe_info_xml): Likewise.
5512
5513 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5514
5515 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5516 assignment.
5517 (gdb_unparse_agent_expr): Likewise.
5518 * hostio.c (require_data): Likewise.
5519 (handle_pread): Likewise.
5520 * linux-low.c (disable_regset): Likewise.
5521 (fetch_register): Likewise.
5522 (store_register): Likewise.
5523 (get_dynamic): Likewise.
5524 (linux_qxfer_libraries_svr4): Likewise.
5525 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5526 (set_fast_tracepoint_jump): Likewise.
5527 (uninsert_fast_tracepoint_jumps_at): Likewise.
5528 (reinsert_fast_tracepoint_jumps_at): Likewise.
5529 (validate_inserted_breakpoint): Likewise.
5530 (clone_agent_expr): Likewise.
5531 * regcache.c (init_register_cache): Likewise.
5532 * remote-utils.c (putpkt_binary_1): Likewise.
5533 (decode_M_packet): Likewise.
5534 (decode_X_packet): Likewise.
5535 (look_up_one_symbol): Likewise.
5536 (relocate_instruction): Likewise.
5537 (monitor_output): Likewise.
5538 * server.c (handle_search_memory): Likewise.
5539 (handle_qxfer_exec_file): Likewise.
5540 (handle_qxfer_libraries): Likewise.
5541 (handle_qxfer): Likewise.
5542 (handle_query): Likewise.
5543 (handle_v_cont): Likewise.
5544 (handle_v_run): Likewise.
5545 (captured_main): Likewise.
5546 * target.c (write_inferior_memory): Likewise.
5547 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5548 * tracepoint.c (init_trace_buffer): Likewise.
5549 (add_tracepoint_action): Likewise.
5550 (add_traceframe): Likewise.
5551 (add_traceframe_block): Likewise.
5552 (cmd_qtdpsrc): Likewise.
5553 (cmd_qtdv): Likewise.
5554 (cmd_qtstatus): Likewise.
5555 (response_source): Likewise.
5556 (response_tsv): Likewise.
5557 (cmd_qtnotes): Likewise.
5558 (gdb_collect): Likewise.
5559 (initialize_tracepoint): Likewise.
5560
5561 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5562
5563 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5564 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5565 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5566 <NOP>: New.
5567 (enum aarch64_condition_codes): New enum.
5568 (w0): New static global.
5569 (fp): Likewise.
5570 (lr): Likewise.
5571 (struct aarch64_memory_operand) <type>: New
5572 MEMORY_OPERAND_POSTINDEX type.
5573 (postindex_memory_operand): New helper function.
5574 (emit_ret): New function.
5575 (emit_load_store_pair): New function, factored out of emit_stp
5576 with support for MEMORY_OPERAND_POSTINDEX.
5577 (emit_stp): Rewrite using emit_load_store_pair.
5578 (emit_ldp): New function.
5579 (emit_load_store): Likewise.
5580 (emit_ldr): Mention post-index instruction in comment.
5581 (emit_ldrh): New function.
5582 (emit_ldrb): New function.
5583 (emit_ldrsw): Mention post-index instruction in comment.
5584 (emit_str): Likewise.
5585 (emit_subs): New function.
5586 (emit_cmp): Likewise.
5587 (emit_and): Likewise.
5588 (emit_orr): Likewise.
5589 (emit_orn): Likewise.
5590 (emit_eor): Likewise.
5591 (emit_mvn): Likewise.
5592 (emit_lslv): Likewise.
5593 (emit_lsrv): Likewise.
5594 (emit_asrv): Likewise.
5595 (emit_mul): Likewise.
5596 (emit_sbfm): Likewise.
5597 (emit_sbfx): Likewise.
5598 (emit_ubfm): Likewise.
5599 (emit_ubfx): Likewise.
5600 (emit_csinc): Likewise.
5601 (emit_cset): Likewise.
5602 (emit_nop): Likewise.
5603 (emit_ops_insns): New helper function.
5604 (emit_pop): Likewise.
5605 (emit_push): Likewise.
5606 (aarch64_emit_prologue): New function.
5607 (aarch64_emit_epilogue): Likewise.
5608 (aarch64_emit_add): Likewise.
5609 (aarch64_emit_sub): Likewise.
5610 (aarch64_emit_mul): Likewise.
5611 (aarch64_emit_lsh): Likewise.
5612 (aarch64_emit_rsh_signed): Likewise.
5613 (aarch64_emit_rsh_unsigned): Likewise.
5614 (aarch64_emit_ext): Likewise.
5615 (aarch64_emit_log_not): Likewise.
5616 (aarch64_emit_bit_and): Likewise.
5617 (aarch64_emit_bit_or): Likewise.
5618 (aarch64_emit_bit_xor): Likewise.
5619 (aarch64_emit_bit_not): Likewise.
5620 (aarch64_emit_equal): Likewise.
5621 (aarch64_emit_less_signed): Likewise.
5622 (aarch64_emit_less_unsigned): Likewise.
5623 (aarch64_emit_ref): Likewise.
5624 (aarch64_emit_if_goto): Likewise.
5625 (aarch64_emit_goto): Likewise.
5626 (aarch64_write_goto_address): Likewise.
5627 (aarch64_emit_const): Likewise.
5628 (aarch64_emit_call): Likewise.
5629 (aarch64_emit_reg): Likewise.
5630 (aarch64_emit_pop): Likewise.
5631 (aarch64_emit_stack_flush): Likewise.
5632 (aarch64_emit_zero_ext): Likewise.
5633 (aarch64_emit_swap): Likewise.
5634 (aarch64_emit_stack_adjust): Likewise.
5635 (aarch64_emit_int_call_1): Likewise.
5636 (aarch64_emit_void_call_2): Likewise.
5637 (aarch64_emit_eq_goto): Likewise.
5638 (aarch64_emit_ne_goto): Likewise.
5639 (aarch64_emit_lt_goto): Likewise.
5640 (aarch64_emit_le_goto): Likewise.
5641 (aarch64_emit_gt_goto): Likewise.
5642 (aarch64_emit_ge_got): Likewise.
5643 (aarch64_emit_ops_impl): New static global variable.
5644 (aarch64_emit_ops): New target function, return
5645 &aarch64_emit_ops_impl.
5646 (struct linux_target_ops): Install it.
5647
5648 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5649
5650 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5651 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5652 aarch64-ipa.o.
5653 * linux-aarch64-ipa.c: New file.
5654 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5655 and endian.h.
5656 (aarch64_get_thread_area): New target method.
5657 (extract_signed_bitfield): New helper function.
5658 (aarch64_decode_ldr_literal): New function.
5659 (enum aarch64_opcodes): New enum.
5660 (struct aarch64_register): New struct.
5661 (struct aarch64_operand): New struct.
5662 (x0): New static global.
5663 (x1): Likewise.
5664 (x2): Likewise.
5665 (x3): Likewise.
5666 (x4): Likewise.
5667 (w2): Likewise.
5668 (ip0): Likewise.
5669 (sp): Likewise.
5670 (xzr): Likewise.
5671 (aarch64_register): New helper function.
5672 (register_operand): Likewise.
5673 (immediate_operand): Likewise.
5674 (struct aarch64_memory_operand): New struct.
5675 (offset_memory_operand): New helper function.
5676 (preindex_memory_operand): Likewise.
5677 (enum aarch64_system_control_registers): New enum.
5678 (ENCODE): New macro.
5679 (emit_insn): New helper function.
5680 (emit_b): New function.
5681 (emit_bcond): Likewise.
5682 (emit_cb): Likewise.
5683 (emit_tb): Likewise.
5684 (emit_blr): Likewise.
5685 (emit_stp): Likewise.
5686 (emit_ldp_q_offset): Likewise.
5687 (emit_stp_q_offset): Likewise.
5688 (emit_load_store): Likewise.
5689 (emit_ldr): Likewise.
5690 (emit_ldrsw): Likewise.
5691 (emit_str): Likewise.
5692 (emit_ldaxr): Likewise.
5693 (emit_stxr): Likewise.
5694 (emit_stlr): Likewise.
5695 (emit_data_processing_reg): Likewise.
5696 (emit_data_processing): Likewise.
5697 (emit_add): Likewise.
5698 (emit_sub): Likewise.
5699 (emit_mov): Likewise.
5700 (emit_movk): Likewise.
5701 (emit_mov_addr): Likewise.
5702 (emit_mrs): Likewise.
5703 (emit_msr): Likewise.
5704 (emit_sevl): Likewise.
5705 (emit_wfe): Likewise.
5706 (append_insns): Likewise.
5707 (can_encode_int32_in): New helper function.
5708 (aarch64_relocate_instruction): New function.
5709 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5710 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5711 (struct linux_target_ops): Install aarch64_get_thread_area,
5712 aarch64_install_fast_tracepoint_jump_pad and
5713 aarch64_get_min_fast_tracepoint_insn_len.
5714
5715 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5716
5717 * Makefile.in (aarch64-insn.o): New rule.
5718 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5719
5720 2015-09-21 Yao Qi <yao.qi@linaro.org>
5721
5722 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5723
5724 2015-09-21 Yao Qi <yao.qi@linaro.org>
5725
5726 * tracepoint.c (max_jump_pad_size): Remove.
5727
5728 2015-09-18 Yao Qi <yao.qi@linaro.org>
5729
5730 * linux-aarch64-low.c: Don't include sys/uio.h.
5731 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5732
5733 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5734
5735 * tracepoint.c (eval_result_type): Change prototype.
5736 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5737
5738 2015-09-15 Pedro Alves <palves@redhat.com>
5739
5740 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5741 Check whether to report exec events instead of checking whether
5742 multiprocess is enabled.
5743
5744 2015-09-15 Pedro Alves <palves@redhat.com>
5745
5746 PR remote/18965
5747 * remote-utils.c (prepare_resume_reply): Merge
5748 TARGET_WAITKIND_VFORK_DONE switch case with the
5749 TARGET_WAITKIND_FORKED case.
5750
5751 2015-09-15 Yao Qi <yao.qi@linaro.org>
5752
5753 * server.c (handle_query): Check string comparison using
5754 "else if" instead of "if".
5755
5756 2015-09-15 Yao Qi <yao.qi@linaro.org>
5757
5758 * server.c (vCont_supported): New global variable.
5759 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5760 matches. Append ";vContSupported+" to own_buf.
5761 (handle_v_requests): Append ";s;S" to own_buf if target supports
5762 hardware single step or vCont_supported is false.
5763 (capture_main): Set vCont_supported to zero.
5764
5765 2015-09-15 Yao Qi <yao.qi@linaro.org>
5766
5767 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5768 it to ...
5769 (linux_supports_hardware_single_step): ... New function.
5770 (linux_target_ops): Update.
5771 * lynx-low.c (lynx_target_ops): Set field
5772 supports_hardware_single_step to target_can_do_hardware_single_step.
5773 * nto-low.c (nto_target_ops): Likewise.
5774 * spu-low.c (spu_target_ops): Likewise.
5775 * win32-low.c (win32_target_ops): Likewise.
5776 * target.c (target_can_do_hardware_single_step): New function.
5777 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5778 Remove. <supports_hardware_single_step>: New field.
5779 (target_supports_conditional_breakpoints): Remove.
5780 (target_supports_hardware_single_step): New macro.
5781 (target_can_do_hardware_single_step): Declare.
5782 * server.c (handle_query): Use target_supports_hardware_single_step
5783 instead of target_supports_conditional_breakpoints.
5784
5785 2015-09-15 Yao Qi <yao.qi@linaro.org>
5786
5787 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5788 function.
5789 (struct linux_target_ops the_low_target): Install
5790 aarch64_linux_siginfo_fixup.
5791
5792 2015-09-11 Don Breazeal <donb@codesourcery.com>
5793 Luis Machado <lgustavo@codesourcery.com>
5794
5795 * linux-low.c (linux_mourn): Static declaration.
5796 (linux_arch_setup): Move in front of
5797 handle_extended_wait.
5798 (linux_arch_setup_thread): New function.
5799 (handle_extended_wait): Handle exec events. Call
5800 linux_arch_setup_thread. Make event_lwp argument a
5801 pointer-to-a-pointer.
5802 (check_zombie_leaders): Do not check stopped threads.
5803 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5804 (linux_low_filter_event): Add lwp and thread for exec'ing
5805 non-leader thread if leader thread has been deleted.
5806 Refactor code into linux_arch_setup_thread and call it.
5807 Pass child lwp pointer by reference to handle_extended_wait.
5808 (linux_wait_for_event_filtered): Update comment.
5809 (linux_wait_1): Prevent clobbering exec event status.
5810 (linux_supports_exec_events): New function.
5811 (linux_target_ops) <supports_exec_events>: Initialize new member.
5812 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5813 new member.
5814 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5815 * server.c (report_exec_events): New global variable.
5816 (handle_query): Handle qSupported query for exec-events feature.
5817 (captured_main): Initialize report_exec_events.
5818 * server.h (report_exec_events): Declare new global variable.
5819 * target.h (struct target_ops) <supports_exec_events>: New
5820 member.
5821 (target_supports_exec_events): New macro.
5822 * win32-low.c (win32_target_ops) <supports_exec_events>:
5823 Initialize new member.
5824
5825 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5826
5827 * linux-low.c (linux_low_enable_btrace): Remove.
5828 (linux_target_ops): Replace linux_low_enable_btrace with
5829 linux_enable_btrace.
5830
5831 2015-09-03 Yao Qi <yao.qi@linaro.org>
5832
5833 * linux-aarch64-low.c (aarch64_insert_point): Call
5834 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5835 returns true.
5836
5837 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5838
5839 * linux-low.c (check_stopped_by_breakpoint): Use
5840 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5841
5842 2015-08-27 Pedro Alves <palves@redhat.com>
5843
5844 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5845
5846 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5847
5848 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5849 the XNEW-family equivalent.
5850 (compile_bytecodes): Likewise.
5851 * dll.c (loaded_dll): Likewise.
5852 * event-loop.c (append_callback_event): Likewise.
5853 (create_file_handler): Likewise.
5854 (create_file_event): Likewise.
5855 * hostio.c (handle_open): Likewise.
5856 * inferiors.c (add_thread): Likewise.
5857 (add_process): Likewise.
5858 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5859 * linux-arm-low.c (arm_new_process): Likewise.
5860 (arm_new_thread): Likewise.
5861 * linux-low.c (add_to_pid_list): Likewise.
5862 (linux_add_process): Likewise.
5863 (handle_extended_wait): Likewise.
5864 (add_lwp): Likewise.
5865 (enqueue_one_deferred_signal): Likewise.
5866 (enqueue_pending_signal): Likewise.
5867 (linux_resume_one_lwp_throw): Likewise.
5868 (linux_resume_one_thread): Likewise.
5869 (linux_read_memory): Likewise.
5870 (linux_write_memory): Likewise.
5871 * linux-mips-low.c (mips_linux_new_process): Likewise.
5872 (mips_linux_new_thread): Likewise.
5873 (mips_add_watchpoint): Likewise.
5874 * linux-x86-low.c (initialize_low_arch): Likewise.
5875 * lynx-low.c (lynx_add_process): Likewise.
5876 * mem-break.c (set_raw_breakpoint_at): Likewise.
5877 (set_breakpoint): Likewise.
5878 (add_condition_to_breakpoint): Likewise.
5879 (add_commands_to_breakpoint): Likewise.
5880 (clone_agent_expr): Likewise.
5881 (clone_one_breakpoint): Likewise.
5882 * regcache.c (new_register_cache): Likewise.
5883 * remote-utils.c (look_up_one_symbol): Likewise.
5884 * server.c (queue_stop_reply): Likewise.
5885 (start_inferior): Likewise.
5886 (queue_stop_reply_callback): Likewise.
5887 (handle_target_event): Likewise.
5888 * spu-low.c (fetch_ppc_memory): Likewise.
5889 (store_ppc_memory): Likewise.
5890 * target.c (set_target_ops): Likewise.
5891 * thread-db.c (thread_db_load_search): Likewise.
5892 (try_thread_db_load_1): Likewise.
5893 * tracepoint.c (add_tracepoint): Likewise.
5894 (add_tracepoint_action): Likewise.
5895 (create_trace_state_variable): Likewise.
5896 (cmd_qtdpsrc): Likewise.
5897 (cmd_qtro): Likewise.
5898 (add_while_stepping_state): Likewise.
5899 * win32-low.c (child_add_thread): Likewise.
5900 (get_image_name): Likewise.
5901
5902 2015-08-25 Yao Qi <yao.qi@linaro.org>
5903
5904 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5905
5906 2015-08-25 Yao Qi <yao.qi@linaro.org>
5907
5908 * Makefile.in (aarch64-linux.o): New rule.
5909 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5910 srv_tgtobj.
5911 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5912 (aarch64_init_debug_reg_state): Make it extern.
5913 (aarch64_linux_prepare_to_resume): Remove.
5914
5915 2015-08-25 Yao Qi <yao.qi@linaro.org>
5916
5917 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5918 lwp_arch_private_info and ptid_of_lwp.
5919
5920 2015-08-25 Yao Qi <yao.qi@linaro.org>
5921
5922 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5923 Find proc_info by find_process_pid. All callers updated.
5924
5925 2015-08-25 Yao Qi <yao.qi@linaro.org>
5926
5927 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5928 Remove.
5929 (debug_reg_change_callback): Remove.
5930 (aarch64_notify_debug_reg_change): Remove.
5931
5932 2015-08-25 Yao Qi <yao.qi@linaro.org>
5933
5934 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5935 Call current_lwp_ptid.
5936
5937 2015-08-25 Yao Qi <yao.qi@linaro.org>
5938
5939 * linux-aarch64-low.c (debug_reg_change_callback): Use
5940 debug_printf.
5941
5942 2015-08-25 Yao Qi <yao.qi@linaro.org>
5943
5944 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5945
5946 2015-08-25 Yao Qi <yao.qi@linaro.org>
5947
5948 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5949
5950 2015-08-25 Yao Qi <yao.qi@linaro.org>
5951
5952 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5953 the code.
5954
5955 2015-08-25 Yao Qi <yao.qi@linaro.org>
5956
5957 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5958 Remove.
5959 (debug_reg_change_callback): Remove argument entry and add argument
5960 lwp. Remove local variable thread. Don't print thread id in the
5961 debugging output. Don't check whether pid of thread equals to pid.
5962 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5963 iterate_over_lwps instead find_inferior.
5964
5965 2015-08-24 Pedro Alves <palves@redhat.com>
5966
5967 * inferiors.c (get_first_process): New function.
5968 * inferiors.h (get_first_process): New declaration.
5969 * remote-utils.c (read_ptid): Default to the first process in the
5970 list, instead of to the current thread's process.
5971
5972 2015-08-24 Pedro Alves <palves@redhat.com>
5973
5974 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5975 * event-loop.c: Likewise.
5976 * remote-utils.c: Likewise.
5977 * tracepoint.c: Likewise.
5978
5979 2015-08-24 Pedro Alves <palves@redhat.com>
5980
5981 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5982 ptid_get_lwp.
5983
5984 2015-08-21 Pedro Alves <palves@redhat.com>
5985
5986 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5987 instead of literal 1.
5988
5989 2015-08-21 Pedro Alves <palves@redhat.com>
5990
5991 * tdesc.c (default_description): Explicitly zero-initialize.
5992
5993 2015-08-21 Pedro Alves <palves@redhat.com>
5994
5995 PR gdb/18749
5996 * inferiors.c (remove_thread): Discard any pending stop reply for
5997 this thread.
5998 * server.c (remove_all_on_match_pid): Rename to ...
5999 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6000 instead of a pid.
6001 (discard_queued_stop_replies): Change parameter to a ptid. Now
6002 extern.
6003 (handle_v_kill, kill_inferior_callback, captured_main)
6004 (process_serial_event): Adjust.
6005 * server.h (discard_queued_stop_replies): Declare.
6006
6007 2015-08-21 Pedro Alves <palves@redhat.com>
6008
6009 * linux-low.c (wait_for_sigstop): Always switch to no thread
6010 selected if the previously current thread dies.
6011 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6012 process instead of the current thread's.
6013 * remote-utils.c (input_interrupt): Don't check if there's no
6014 current thread.
6015 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6016 current thread to the general thread fails, error out.
6017 (handle_qxfer_auxv, handle_qxfer_libraries)
6018 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6019 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6020 (handle_query): Check if there's a thread selected instead of
6021 checking whether there's any thread in the thread list.
6022 (handle_qxfer_threads, handle_qxfer_btrace)
6023 (handle_qxfer_btrace_conf): Don't error out early if there's no
6024 thread in the thread list.
6025 (handle_v_cont, myresume): Don't set the current thread to the
6026 continue thread.
6027 (process_serial_event) <Hg handling>: Also set thread_id if the
6028 previous general thread is still alive.
6029 (process_serial_event) <g/G handling>: If setting the current
6030 thread to the general thread fails, error out.
6031 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6032 thread's lwp instead of the current thread's.
6033 * target.c (set_desired_thread): If the desired thread was not
6034 found, leave the current thread pointing to NULL. Return an int
6035 (boolean) indicating success.
6036 * target.h (set_desired_thread): Change return type to int.
6037
6038 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6039
6040 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6041 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6042 #includes.
6043 (ps_get_thread_area): New function.
6044
6045 2015-08-19 Gary Benson <gbenson@redhat.com>
6046
6047 * hostio.c (handle_pread): Do not attempt to read more data
6048 than hostio_reply_with_data can fit in a packet.
6049
6050 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6051
6052 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6053
6054 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6055
6056 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6057
6058 2015-08-06 Pedro Alves <palves@redhat.com>
6059
6060 * tracepoint.c (expr_eval_result): Now an int.
6061
6062 2015-08-06 Pedro Alves <palves@redhat.com>
6063
6064 * gdbthread.h (struct regcache): Forward declare.
6065 (struct thread_info) <regcache_data>: Now a struct regcache
6066 pointer.
6067 * inferiors.c (inferior_regcache_data)
6068 (set_inferior_regcache_data): Now work with struct regcache
6069 pointers.
6070 * inferiors.h (struct regcache): Forward declare.
6071 (inferior_regcache_data, set_inferior_regcache_data): Now work
6072 with struct regcache pointers.
6073 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6074 (free_register_cache_thread): Remove struct regcache pointer
6075 casts.
6076
6077 2015-08-06 Pedro Alves <palves@redhat.com>
6078
6079 * server.c (captured_main): On error, print the exception message
6080 to stderr, and if run_once is set, throw a quit.
6081
6082 2015-08-06 Pedro Alves <palves@redhat.com>
6083
6084 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6085 the current thread.
6086
6087 2015-08-06 Pedro Alves <palves@redhat.com>
6088
6089 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6090 reading beyond the passed in buffer length.
6091
6092 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6093
6094 * tracepoint.c (symbol_list) <required>: Remove.
6095
6096 2015-08-06 Pedro Alves <palves@redhat.com>
6097
6098 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6099 count if stopping and suspending threads.
6100 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6101 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6102 (linux_detach): Complete an ongoing step-over.
6103 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6104 throughout.
6105 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6106 (linux_wait_1): If passing a signal to the inferior after
6107 finishing a step-over, unsuspend and re-resume all lwps. If we
6108 see a single-step event but the thread should be continuing, don't
6109 pass the trap to gdb.
6110 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6111 internal_error instead of gdb_assert.
6112 (enqueue_pending_signal): New function.
6113 (check_ptrace_stopped_lwp_gone): Add debug output.
6114 (start_step_over): Use internal_error instead of gdb_assert.
6115 (complete_ongoing_step_over): New function.
6116 (linux_resume_one_thread): Don't resume a suspended thread.
6117 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6118 it stepping.
6119
6120 2015-08-06 Pedro Alves <palves@redhat.com>
6121
6122 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6123 (linux_thread_alive): Use lwp_is_marked_dead.
6124 (extended_event_reported): Delete.
6125 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6126 instead of extended_event_reported.
6127 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6128 as well.
6129 (lwp_is_marked_dead): New function.
6130 (lwp_running): Use lwp_is_marked_dead.
6131 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6132 comment.
6133
6134 2015-08-06 Pedro Alves <palves@redhat.com>
6135
6136 * linux-low.c (linux_wait_1): Move fork event output out of the
6137 !report_to_gdb check. Pass event_child->waitstatus to
6138 target_waitstatus_to_string instead of ourstatus.
6139
6140 2015-08-04 Yao Qi <yao.qi@linaro.org>
6141
6142 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6143 if current_thread is 32 bit.
6144
6145 2015-08-04 Yao Qi <yao.qi@linaro.org>
6146
6147 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6148 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6149 * server.c (extended_protocol): Remove "static".
6150 * server.h (extended_protocol): Declare it.
6151
6152 2015-08-04 Yao Qi <yao.qi@linaro.org>
6153
6154 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6155 both aarch64 and aarch32.
6156 (aarch64_set_pc): Likewise.
6157
6158 2015-08-04 Yao Qi <yao.qi@linaro.org>
6159
6160 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6161 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6162 arm-with-neon.xml to srv_xmlfiles.
6163 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6164 (is_64bit_tdesc): New function.
6165 (aarch64_linux_read_description): New function.
6166 (aarch64_arch_setup): Call aarch64_linux_read_description.
6167 (regs_info): Rename to regs_info_aarch64.
6168 (aarch64_regs_info): Return right regs_info.
6169 (initialize_low_arch): Call initialize_low_arch_aarch32.
6170
6171 2015-08-04 Yao Qi <yao.qi@linaro.org>
6172
6173 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6174 * linux-aarch32-low.c: New file.
6175 * linux-aarch32-low.h: New file.
6176 * linux-arm-low.c (arm_fill_gregset): Move it to
6177 linux-aarch32-low.c.
6178 (arm_store_gregset): Likewise.
6179 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6180 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6181 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6182 (regs_info): Rename to regs_info_arm.
6183 (arm_regs_info): Return regs_info_aarch32 if
6184 have_ptrace_getregset is 1 and target description is
6185 arm_with_neon or arm_with_vfpv3.
6186 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6187 Call initialize_low_arch_aarch32 instead.
6188
6189 2015-08-04 Yao Qi <yao.qi@linaro.org>
6190
6191 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6192 * linux-low.c: ... here.
6193 * linux-low.h (have_ptrace_getregset): Declare it.
6194
6195 2015-08-04 Pedro Alves <palves@redhat.com>
6196
6197 * thread-db.c (struct thread_db): Use new typedefs.
6198 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6199 CHK calls.
6200 (disable_thread_event_reporting): Cast result of dlsym to
6201 destination function pointer type.
6202 (thread_db_mourn): Use td_ta_delete_ftype.
6203
6204 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6205
6206 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6207 arch variant.
6208 (CDX_BREAKPOINT): Define for R2.
6209 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6210 (the_low_target): Add comments.
6211
6212 2015-07-30 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-arm-low.c (arm_hwcap): Remove it.
6215 (arm_read_description): New local variable arm_hwcap. Don't
6216 set arm_hwcap to zero.
6217
6218 2015-07-30 Yao Qi <yao.qi@linaro.org>
6219
6220 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6221 Use regcache->tdesc instead.
6222 (arm_store_wmmxregset): Likewise.
6223 (arm_fill_vfpregset): Likewise.
6224 (arm_store_vfpregset): Likewise.
6225
6226 2015-07-30 Yao Qi <yao.qi@linaro.org>
6227
6228 * linux-arm-low.c: Include arch/arm.h.
6229 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6230 (arm_store_gregset): Likewise.
6231
6232 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6233
6234 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6235 ptrace's 4th parameter.
6236
6237 2015-07-27 Yao Qi <yao.qi@linaro.org>
6238
6239 * configure.srv (case aarch64*-*-linux*): Don't set
6240 srv_linux_usrregs.
6241
6242 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6243
6244 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6245 sys/ptrace.h.
6246 * linux-arm-low.c: Likewise.
6247 * linux-cris-low.c: Likewise.
6248 * linux-crisv32-low.c: Likewise.
6249 * linux-low.c: Likewise.
6250 * linux-m68k-low.c: Likewise.
6251 * linux-mips-low.c: Likewise.
6252 * linux-nios2-low.c: Likewise.
6253 * linux-s390-low.c: Likewise.
6254 * linux-sparc-low.c: Likewise.
6255 * linux-tic6x-low.c: Likewise.
6256 * linux-tile-low.c: Likewise.
6257 * linux-x86-low.c: Likewise.
6258
6259 2015-07-24 Pedro Alves <palves@redhat.com>
6260
6261 * config.in: Regenerate.
6262 * configure: Regenerate.
6263
6264 2015-07-24 Pedro Alves <palves@redhat.com>
6265
6266 * acinclude.m4: Include ../ptrace.m4.
6267 * configure.ac: Call GDB_AC_PTRACE.
6268 * config.in, configure: Regenerate.
6269
6270 2015-07-24 Yao Qi <yao.qi@linaro.org>
6271
6272 * linux-low.c (linux_create_inferior): Remove setting to
6273 proc->priv->new_inferior.
6274 (linux_attach): Likewise.
6275 (linux_low_filter_event): Likewise.
6276 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6277
6278 2015-07-24 Yao Qi <yao.qi@linaro.org>
6279
6280 * linux-low.c (linux_arch_setup): New function.
6281 (linux_low_filter_event): If proc->tdesc is NULL and
6282 proc->attached is true, call the_low_target.arch_setup.
6283 Otherwise, keep status pending, and return.
6284 (linux_resume_one_lwp_throw): Don't call get_pc if
6285 thread->while_stepping isn't NULL. Don't call
6286 get_thread_regcache if proc->tdesc is NULL.
6287 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6288 (linux_target_ops): Install arch_setup.
6289 * server.c (start_inferior): Call the_target->arch_setup.
6290 * target.h (struct target_ops) <arch_setup>: New field.
6291 (target_arch_setup): New marco.
6292 * lynx-low.c (lynx_target_ops): Update.
6293 * nto-low.c (nto_target_ops): Update.
6294 * spu-low.c (spu_target_ops): Update.
6295 * win32-low.c (win32_target_ops): Update.
6296
6297 2015-07-24 Yao Qi <yao.qi@linaro.org>
6298
6299 * linux-low.c (linux_add_process): Don't set
6300 proc->priv->new_inferior.
6301 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6302 (linux_attach): Likewise.
6303
6304 2015-07-24 Yao Qi <yao.qi@linaro.org>
6305
6306 * server.c (start_inferior): Code refactor.
6307
6308 2015-07-24 Yao Qi <yao.qi@linaro.org>
6309
6310 * server.c (process_serial_event): Set general_thread.
6311
6312 2015-07-21 Yao Qi <yao.qi@linaro.org>
6313
6314 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6315 aarch64_linux_get_debug_reg_capacity.
6316
6317 2015-07-17 Yao Qi <yao.qi@linaro.org>
6318
6319 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6320 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6321 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6322 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6323 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6324 (AARCH64_HWP_ALIGNMENT): Likewise.
6325 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6326 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6327 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6328 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6329 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6330 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6331 (struct aarch64_debug_reg_state): Likewise.
6332 (struct arch_lwp_info): Likewise.
6333 (aarch64_align_watchpoint): Likewise.
6334 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6335 (aarch64_watchpoint_length): Likewise.
6336 (aarch64_point_encode_ctrl_reg): Likewise
6337 (aarch64_point_is_aligned): Likewise.
6338 (aarch64_align_watchpoint): Likewise.
6339 (aarch64_linux_set_debug_regs):
6340 (aarch64_dr_state_insert_one_point): Likewise.
6341 (aarch64_dr_state_remove_one_point): Likewise.
6342 (aarch64_handle_breakpoint): Likewise.
6343 (aarch64_handle_aligned_watchpoint): Likewise.
6344 (aarch64_handle_unaligned_watchpoint): Likewise.
6345 (aarch64_handle_watchpoint): Likewise.
6346
6347 2015-07-17 Yao Qi <yao.qi@linaro.org>
6348
6349 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6350 and don't aarch64_get_debug_reg_state. All callers update.
6351 (aarch64_handle_aligned_watchpoint): Likewise.
6352 (aarch64_handle_unaligned_watchpoint): Likewise.
6353 (aarch64_handle_watchpoint): Likewise.
6354 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6355 (aarch64_remove_point): Likewise.
6356
6357 2015-07-17 Yao Qi <yao.qi@linaro.org>
6358
6359 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6360 debug_printf.
6361 (aarch64_handle_unaligned_watchpoint): Likewise.
6362
6363 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6364
6365 Revert the previous 3 commits:
6366 Move gdb_regex* to common/
6367 Move linux_find_memory_regions_full & co.
6368 gdbserver build-id attribute generator
6369
6370 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6371 Jan Kratochvil <jan.kratochvil@redhat.com>
6372
6373 gdbserver build-id attribute generator.
6374 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6375 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6376 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6377 (find_phdr): New.
6378 (get_dynamic): Use find_pdhr to traverse program headers.
6379 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6380 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6381 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6382 (get_hex_build_id): New.
6383 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6384 to reply XML document.
6385
6386 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6387 Jan Kratochvil <jan.kratochvil@redhat.com>
6388
6389 * target.c: Include target/target-utils.h and fcntl.h.
6390 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6391 (target_fileio_read_stralloc): New functions.
6392
6393 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6394
6395 * Makefile.in (OBS): Add gdb_regex.o.
6396 (gdb_regex.o): New.
6397 * config.in: Rebuilt.
6398 * configure: Rebuilt.
6399
6400 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6401 Jan Kratochvil <jan.kratochvil@redhat.com>
6402
6403 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6404 * Makefile.in (OBS): Add target-utils.o.
6405 (linux-maps.o, target-utils.o): New.
6406 * configure.srv (srv_linux_obj): Add linux-maps.o.
6407
6408 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6409
6410 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6411 function, return 1.
6412 (the_low_target): Install it.
6413
6414 2015-07-14 Pedro Alves <palves@redhat.com>
6415
6416 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6417 Instead, ignore ECHILD, and throw an error for other errnos.
6418
6419 2015-07-10 Pedro Alves <palves@redhat.com>
6420
6421 * event-loop.c (struct callback_event) <data>: Change type to
6422 gdb_client_data instance instead of gdb_client_data pointer.
6423 (append_callback_event): Adjust.
6424
6425 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6426
6427 * linux-aarch64-low.c: Add comments for each linux_target_ops
6428 method. Remove comments already covered in target_ops and
6429 linux_target_ops definitions.
6430 (the_low_target): Add comments for each unimplemented method.
6431
6432 2015-07-09 Yao Qi <yao.qi@linaro.org>
6433
6434 * linux-aarch64-low.c (aarch64_regmap): Remove.
6435 (aarch64_usrregs_info): Remove.
6436 (regs_info): Set field usrregs to NULL.
6437
6438 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6439
6440 * linux-low.c: Include "rsp-low.h"
6441 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6442 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6443 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6444 (handle_btrace_enable_pt): New.
6445 (handle_btrace_general_set): Support "pt".
6446 (handle_btrace_conf_general_set): Support "pt:size".
6447
6448 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6449
6450 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6451 Z_PACKET_SW_BP.
6452
6453 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6454
6455 * linux-aarch64-low.c: Remove comment about endianness.
6456 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6457 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6458 memcmp.
6459
6460 2015-06-24 Gary Benson <gbenson@redhat.com>
6461
6462 * linux-i386-ipa.c (stdint.h): Do not include.
6463 * lynx-i386-low.c (stdint.h): Likewise.
6464 * lynx-ppc-low.c (stdint.h): Likewise.
6465 * mem-break.c (stdint.h): Likewise.
6466 * thread-db.c (stdint.h): Likewise.
6467 * tracepoint.c (stdint.h): Likewise.
6468 * win32-low.c (stdint.h): Likewise.
6469
6470 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6471
6472 * server.c (write_qxfer_response): Update call to
6473 remote_escape_output.
6474
6475 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6476 Jan Kratochvil <jan.kratochvil@redhat.com>
6477
6478 Merge multiple hex conversions.
6479 * gdbreplay.c (tohex): Rename to 'fromhex'.
6480 (logchar): Use fromhex.
6481
6482 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6483
6484 * server.c (handle_qxfer_libraries): Set `version' attribute for
6485 <library-list>.
6486
6487 2015-06-10 Gary Benson <gbenson@redhat.com>
6488
6489 * target.h (struct target_ops) <multifs_open>: New field.
6490 <multifs_unlink>: Likewise.
6491 <multifs_readlink>: Likewise.
6492 * linux-low.c (nat/linux-namespaces.h): New include.
6493 (linux_target_ops): Initialize the_target->multifs_open,
6494 the_target->multifs_unlink and the_target->multifs_readlink.
6495 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6496 * hostio.c (hostio_fs_pid): New static variable.
6497 (hostio_handle_new_gdb_connection): New function.
6498 (handle_setfs): Likewise.
6499 (handle_open): Use the_target->multifs_open as appropriate.
6500 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6501 (handle_readlink): Use the_target->multifs_readlink as
6502 appropriate.
6503 (handle_vFile): Handle vFile:setfs packets.
6504 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6505 after target_handle_new_gdb_connection.
6506
6507 2015-06-10 Gary Benson <gbenson@redhat.com>
6508
6509 * configure.ac (AC_CHECK_FUNCS): Add setns.
6510 * config.in: Regenerate.
6511 * configure: Likewise.
6512 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6513 (linux-namespaces.o): New rule.
6514 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6515
6516 2015-06-09 Gary Benson <gbenson@redhat.com>
6517
6518 * hostio.c (handle_open): Process mode argument with
6519 fileio_to_host_mode.
6520
6521 2015-06-01 Yao Qi <yao.qi@linaro.org>
6522
6523 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6524 * linux-x86-low.c: Likewise.
6525
6526 2015-05-28 Don Breazeal <donb@codesourcery.com>
6527
6528 * linux-low.c (handle_extended_wait): Initialize
6529 thread_info.last_resume_kind for new fork children.
6530
6531 2015-05-15 Pedro Alves <palves@redhat.com>
6532
6533 * target.h (target_handle_new_gdb_connection): Rewrite using if
6534 wrapped in do/while.
6535
6536 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6537
6538 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6539 * configure, config.in: Regenerate.
6540 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6541 Declare typedef.
6542
6543 2015-05-12 Don Breazeal <donb@codesourcery.com>
6544
6545 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6546 PTRACE_EVENT_VFORK_DONE.
6547 (linux_low_ptrace_options, extended_event_reported): Add vfork
6548 events.
6549 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6550 and "vforkdone" for RSP 'T' Stop Reply Packet.
6551 * server.h (report_vfork_events): Declare
6552 global variable.
6553
6554 2015-05-12 Don Breazeal <donb@codesourcery.com>
6555
6556 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6557 (the_low_target) <new_fork>: Initialize new member.
6558 * linux-arm-low.c (arm_new_fork): New function.
6559 (the_low_target) <new_fork>: Initialize new member.
6560 * linux-low.c (handle_extended_wait): Call new target function
6561 new_fork.
6562 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6563 * linux-mips-low.c (mips_add_watchpoint): New function
6564 extracted from mips_insert_point.
6565 (the_low_target) <new_fork>: Initialize new member.
6566 (mips_linux_new_fork): New function.
6567 (mips_insert_point): Call mips_add_watchpoint.
6568 * linux-x86-low.c (x86_linux_new_fork): New function.
6569 (the_low_target) <new_fork>: Initialize new member.
6570
6571 2015-05-12 Don Breazeal <donb@codesourcery.com>
6572
6573 * linux-low.c (handle_extended_wait): Implement return value,
6574 rename argument 'event_child' to 'event_lwp', handle
6575 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6576 (linux_low_ptrace_options): New function.
6577 (linux_low_filter_event): Call linux_low_ptrace_options,
6578 use different argument fo linux_enable_event_reporting,
6579 use return value from handle_extended_wait.
6580 (extended_event_reported): New function.
6581 (linux_wait_1): Call extended_event_reported and set
6582 status to report fork events.
6583 (linux_write_memory): Add pid to debug message.
6584 (reset_lwp_ptrace_options_callback): New function.
6585 (linux_handle_new_gdb_connection): New function.
6586 (linux_target_ops): Initialize new structure member.
6587 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6588 * lynx-low.c: Initialize new structure member.
6589 * remote-utils.c (prepare_resume_reply): Implement stop reason
6590 "fork" for "T" stop message.
6591 * server.c (handle_query): Call handle_new_gdb_connection.
6592 * server.h (report_fork_events): Declare global flag.
6593 * target.h (struct target_ops) <handle_new_gdb_connection>:
6594 New member.
6595 (target_handle_new_gdb_connection): New macro.
6596 * win32-low.c: Initialize new structure member.
6597
6598 2015-05-12 Don Breazeal <donb@codesourcery.com>
6599
6600 * mem-break.c (APPEND_TO_LIST): Define macro.
6601 (clone_agent_expr): New function.
6602 (clone_one_breakpoint): New function.
6603 (clone_all_breakpoints): New function.
6604 * mem-break.h: Declare new functions.
6605
6606 2015-05-12 Don Breazeal <donb@codesourcery.com>
6607
6608 * linux-low.c (linux_supports_fork_events): New function.
6609 (linux_supports_vfork_events): New function.
6610 (linux_target_ops): Initialize new structure members.
6611 (initialize_low): Call linux_check_ptrace_features.
6612 * lynx-low.c (lynx_target_ops): Initialize new structure
6613 members.
6614 * server.c (report_fork_events, report_vfork_events):
6615 New global flags.
6616 (handle_query): Add new features to qSupported packet and
6617 response.
6618 (captured_main): Initialize new global variables.
6619 * target.h (struct target_ops) <supports_fork_events>:
6620 New member.
6621 <supports_vfork_events>: New member.
6622 (target_supports_fork_events): New macro.
6623 (target_supports_vfork_events): New macro.
6624 * win32-low.c (win32_target_ops): Initialize new structure
6625 members.
6626
6627 2015-05-12 Gary Benson <gbenson@redhat.com>
6628
6629 * server.c (handle_qxfer_exec_file): Use current process
6630 if annex is empty.
6631
6632 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6633
6634 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6635 Remove HAVE_PTRACE_GETREGS conditionals.
6636 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6637 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6638
6639 2015-05-08 Yao Qi <yao.qi@linaro.org>
6640
6641 * linux-low.c (linux_supports_conditional_breakpoints): New
6642 function.
6643 (linux_target_ops): Install new target method.
6644 * lynx-low.c (lynx_target_ops): Install NULL hook for
6645 supports_conditional_breakpoints.
6646 * nto-low.c (nto_target_ops): Likewise.
6647 * spu-low.c (spu_target_ops): Likewise.
6648 * win32-low.c (win32_target_ops): Likewise.
6649 * server.c (handle_query): Check
6650 target_supports_conditional_breakpoints.
6651 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6652 New field.
6653 (target_supports_conditional_breakpoints): New macro.
6654
6655 2015-05-06 Pedro Alves <palves@redhat.com>
6656
6657 PR server/18081
6658 * server.c (start_inferior): If the process exits, mourn it.
6659
6660 2015-04-21 Gary Benson <gbenson@redhat.com>
6661
6662 * hostio.c (fileio_open_flags_to_host): Factored out to
6663 fileio_to_host_openflags in common/fileio.c. Single use
6664 updated.
6665
6666 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6667
6668 * linux-xtensa-low.c (xtensa_fill_gregset)
6669 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6670 XCHAL_HAVE_LOOP.
6671
6672 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6673
6674 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6675 (regs_info): Replace usrregs pointer with NULL.
6676
6677 2015-04-17 Gary Benson <gbenson@redhat.com>
6678
6679 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6680 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6681 * server.c (handle_qxfer_exec_file): New function.
6682 (qxfer_packets): Add exec-file entry.
6683 (handle_query): Report qXfer:exec-file:read as supported packet.
6684
6685 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6686
6687 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6688
6689 2015-04-09 Gary Benson <gbenson@redhat.com>
6690
6691 * hostio-errno.c (errno_to_fileio_error): Remove function.
6692 Update caller to use remote_fileio_to_fio_error.
6693
6694 2015-04-09 Yao Qi <yao.qi@linaro.org>
6695
6696 * linux-low.c (linux_insert_point): Call
6697 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6698 (linux_remove_point): Call remove_memory_breakpoint if type is
6699 raw_bkpt_type_sw.
6700 * linux-x86-low.c (x86_insert_point): Don't call
6701 insert_memory_breakpoint.
6702 (x86_remove_point): Don't call remove_memory_breakpoint.
6703
6704 2015-04-01 Pedro Alves <palves@redhat.com>
6705 Cleber Rosa <crosa@redhat.com>
6706
6707 * server.c (gdbserver_usage): Reorganize and extend the usage
6708 message.
6709
6710 2015-03-24 Pedro Alves <palves@redhat.com>
6711
6712 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6713 output. Also dump TRAP_TRACE.
6714 (linux_low_filter_event): In debug output, distinguish a
6715 resume_stop SIGSTOP from a delayed SIGSTOP.
6716
6717 2015-03-24 Gary Benson <gbenson@redhat.com>
6718
6719 * linux-x86-low.c (x86_linux_new_thread): Moved to
6720 nat/x86-linux.c.
6721 (x86_linux_prepare_to_resume): Likewise.
6722
6723 2015-03-24 Gary Benson <gbenson@redhat.com>
6724
6725 * Makefile.in (x86-linux-dregs.o): New rule.
6726 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6727 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6728 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6729 (x86_linux_dr_get): Likewise.
6730 (x86_linux_dr_set): Likewise.
6731 (update_debug_registers_callback): Likewise.
6732 (x86_linux_dr_set_addr): Likewise.
6733 (x86_linux_dr_get_addr): Likewise.
6734 (x86_linux_dr_set_control): Likewise.
6735 (x86_linux_dr_get_control): Likewise.
6736 (x86_linux_dr_get_status): Likewise.
6737 (x86_linux_update_debug_registers): Likewise.
6738
6739 2015-03-24 Gary Benson <gbenson@redhat.com>
6740
6741 * linux-x86-low.c (x86_linux_update_debug_registers):
6742 New function, factored out from...
6743 (x86_linux_prepare_to_resume): ...this.
6744
6745 2015-03-24 Gary Benson <gbenson@redhat.com>
6746
6747 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6748 (x86_linux_dr_set): Likewise.
6749 (update_debug_registers_callback): Likewise.
6750 (x86_linux_dr_set_addr): Likewise.
6751 (x86_linux_dr_get_addr): Likewise.
6752 (x86_linux_dr_set_control): Likewise.
6753 (x86_linux_dr_get_control): Likewise.
6754 (x86_linux_dr_get_status): Likewise.
6755 (x86_linux_prepare_to_resume): Likewise.
6756
6757 2015-03-24 Gary Benson <gbenson@redhat.com>
6758
6759 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6760 Use perror_with_name. Pass string through gettext.
6761 (x86_linux_dr_set): Likewise.
6762
6763 2015-03-24 Gary Benson <gbenson@redhat.com>
6764
6765 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6766 (x86_linux_dr_set_addr): ...this.
6767 (x86_dr_low_get_addr): Rename to...
6768 (x86_linux_dr_get_addr): ...this.
6769 (x86_dr_low_set_control): Rename to...
6770 (x86_linux_dr_set_control): ...this.
6771 (x86_dr_low_get_control): Rename to...
6772 (x86_linux_dr_get_control): ...this.
6773 (x86_dr_low_get_status): Rename to...
6774 (x86_linux_dr_get_status): ...this.
6775 (x86_dr_low): Update with new function names.
6776
6777 2015-03-24 Gary Benson <gbenson@redhat.com>
6778
6779 * Makefile.in (x86-linux.o): New rule.
6780 * configure.srv: Add x86-linux.o to relevant targets.
6781 * linux-low.c (lwp_set_arch_private_info): New function.
6782 (lwp_arch_private_info): Likewise.
6783 * linux-x86-low.c: Include nat/x86-linux.h.
6784 (arch_lwp_info): Removed structure.
6785 (update_debug_registers_callback):
6786 Use lwp_set_debug_registers_changed.
6787 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6788 and lwp_set_debug_registers_changed.
6789 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6790
6791 2015-03-24 Gary Benson <gbenson@redhat.com>
6792
6793 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6794 * linux-arm-low.c (arm_new_thread): Likewise.
6795 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6796 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6797 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6798 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6799
6800 2015-03-24 Gary Benson <gbenson@redhat.com>
6801
6802 * linux-low.c (ptid_of_lwp): New function.
6803 (lwp_is_stopped): Likewise.
6804 (lwp_stop_reason): Likewise.
6805 * linux-x86-low.c (update_debug_registers_callback):
6806 Use lwp_is_stopped.
6807 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6808 lwp_stop_reason.
6809
6810 2015-03-24 Gary Benson <gbenson@redhat.com>
6811
6812 * linux-low.h (linux_stop_lwp): Remove declaration.
6813
6814 2015-03-24 Gary Benson <gbenson@redhat.com>
6815
6816 * linux-low.h: Include nat/linux-nat.h.
6817 * linux-low.c (iterate_over_lwps_args): New structure.
6818 (iterate_over_lwps_filter): New function.
6819 (iterate_over_lwps): Likewise.
6820 * linux-x86-low.c (update_debug_registers_callback):
6821 Update signature to what iterate_over_lwps expects.
6822 Remove PID check that iterate_over_lwps now performs.
6823 (x86_dr_low_set_addr): Use iterate_over_lwps.
6824 (x86_dr_low_set_control): Likewise.
6825
6826 2015-03-24 Gary Benson <gbenson@redhat.com>
6827
6828 * linux-x86-low.c (x86_debug_reg_state): New function.
6829 (x86_linux_prepare_to_resume): Use the above.
6830
6831 2015-03-24 Gary Benson <gbenson@redhat.com>
6832
6833 * linux-low.c (current_lwp_ptid): New function.
6834 * linux-x86-low.c: Include nat/linux-nat.h.
6835 (x86_dr_low_get_addr): Use current_lwp_ptid.
6836 (x86_dr_low_get_control): Likewise.
6837 (x86_dr_low_get_status): Likewise.
6838
6839 2015-03-20 Pedro Alves <palves@redhat.com>
6840
6841 * tracepoint.c (cmd_qtstatus): Make "str" const.
6842
6843 2015-03-20 Pedro Alves <palves@redhat.com>
6844
6845 * server.c (handle_general_set): Make "req_str" const.
6846
6847 2015-03-19 Pedro Alves <palves@redhat.com>
6848
6849 * linux-low.c (linux_resume_one_lwp): Rename to ...
6850 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6851 instead call perror_with_name.
6852 (check_ptrace_stopped_lwp_gone): New function.
6853 (linux_resume_one_lwp): Reimplement as wrapper around
6854 linux_resume_one_lwp_throw that swallows errors if the LWP is
6855 gone.
6856
6857 2015-03-19 Pedro Alves <palves@redhat.com>
6858
6859 * linux-low.c (count_events_callback, select_event_lwp_callback):
6860 No longer check whether the thread has resume_stop as last resume
6861 kind.
6862
6863 2015-03-19 Pedro Alves <palves@redhat.com>
6864
6865 * linux-low.c (count_events_callback, select_event_lwp_callback):
6866 Use the lwp's status_pending_p field, not the thread's.
6867
6868 2015-03-19 Pedro Alves <palves@redhat.com>
6869
6870 * linux-low.c (select_event_lwp_callback): Update comments to
6871 no longer mention SIGTRAP.
6872
6873 2015-03-18 Gary Benson <gbenson@redhat.com>
6874
6875 * server.c (handle_query): Do not report vFile:fstat as supported.
6876
6877 2015-03-11 Gary Benson <gbenson@redhat.com>
6878
6879 * hostio.c (sys/types.h): New include.
6880 (sys/stat.h): Likewise.
6881 (common-remote-fileio.h): Likewise.
6882 (handle_fstat): New function.
6883 (handle_vFile): Handle vFile:fstat packets.
6884
6885 2015-03-11 Gary Benson <gbenson@redhat.com>
6886
6887 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6888 struct stat.st_blocks and struct stat.st_blksize.
6889 * configure: Regenerate.
6890 * config.in: Likewise.
6891 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6892 (OBS): Add common-remote-fileio.o.
6893 (common-remote-fileio.o): New rule.
6894
6895 2015-03-09 Pedro Alves <palves@redhat.com>
6896
6897 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6898 'struct sockaddr' pointer in 'accept' call.
6899
6900 2015-03-09 Pedro Alves <palves@redhat.com>
6901
6902 Revert:
6903 2015-03-07 Pedro Alves <palves@redhat.com>
6904 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6905 or <winsock2.h> here. Instead include "gdb_socket.h".
6906 (remote_open): Use union gdb_sockaddr_u.
6907 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6908 or <winsock2.h> here. Instead include "gdb_socket.h".
6909 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6910 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6911 or <sys/un.h>.
6912 (init_named_socket, gdb_agent_helper_thread): Use union
6913 gdb_sockaddr_u.
6914
6915 2015-03-07 Pedro Alves <palves@redhat.com>
6916
6917 * configure.ac (build_warnings): Move
6918 -Wdeclaration-after-statement to the C-specific set.
6919 * configure: Regenerate.
6920
6921 2015-03-07 Pedro Alves <palves@redhat.com>
6922
6923 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6924 or <winsock2.h> here. Instead include "gdb_socket.h".
6925 (remote_open): Use union gdb_sockaddr_u.
6926 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6927 or <winsock2.h> here. Instead include "gdb_socket.h".
6928 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6929 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6930 or <sys/un.h>.
6931 (init_named_socket, gdb_agent_helper_thread): Use union
6932 gdb_sockaddr_u.
6933
6934 2015-03-07 Pedro Alves <palves@redhat.com>
6935
6936 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6937 instead.
6938
6939 2015-03-06 Yao Qi <yao.qi@linaro.org>
6940
6941 * linux-aarch64-low.c (aarch64_insert_point): Use
6942 show_debug_regs as a boolean.
6943 (aarch64_remove_point): Likewise.
6944
6945 2015-03-05 Pedro Alves <palves@redhat.com>
6946
6947 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6948 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6949 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6950 * nto-low.c (nto_target_ops): Likewise.
6951 * spu-low.c (spu_target_ops): Likewise.
6952 * win32-low.c (win32_target_ops): Likewise.
6953
6954 2015-03-04 Pedro Alves <palves@redhat.com>
6955
6956 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6957 Decide whether a breakpoint triggered based on the SIGTRAP's
6958 siginfo.si_code.
6959 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6960 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6961 (linux_low_filter_event): Check for breakpoints before checking
6962 watchpoints.
6963 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6964 siginfo.si_code.
6965 (linux_stopped_by_sw_breakpoint)
6966 (linux_supports_stopped_by_sw_breakpoint)
6967 (linux_stopped_by_hw_breakpoint)
6968 (linux_supports_stopped_by_hw_breakpoint): New functions.
6969 (linux_target_ops): Install new target methods.
6970
6971 2015-03-04 Pedro Alves <palves@redhat.com>
6972
6973 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6974 * server.c (swbreak_feature, hwbreak_feature): New globals.
6975 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6976 (captured_main): Clear swbreak_feature and hwbreak_feature.
6977 * server.h (swbreak_feature, hwbreak_feature): Declare.
6978 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6979 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6980 supports_stopped_by_hw_breakpoint>: New fields.
6981 (target_supports_stopped_by_sw_breakpoint)
6982 (target_stopped_by_sw_breakpoint)
6983 (target_supports_stopped_by_hw_breakpoint)
6984 (target_stopped_by_hw_breakpoint): Declare.
6985
6986 2015-03-04 Pedro Alves <palves@redhat.com>
6987
6988 enum lwp_stop_reason -> enum target_stop_reason
6989 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6990 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6991 (linux_wait_1, stuck_in_jump_pad_callback)
6992 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6993 (linux_stopped_by_watchpoint):
6994 * linux-low.h (enum lwp_stop_reason): Delete.
6995 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6996 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6997
6998 2015-03-04 Yao Qi <yao.qi@linaro.org>
6999
7000 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7001
7002 2015-03-03 Gary Benson <gbenson@redhat.com>
7003
7004 * hostio.c (handle_vFile): Fix prefix lengths.
7005
7006 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7007
7008 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7009 ptr_bits.
7010
7011 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7012
7013 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7014 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7015 (clean): Add "rm -f" for above C files.
7016 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7017 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7018 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7019 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7020 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7021 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7022 (init_registers_s390x_vx_linux64)
7023 (init_registers_s390x_tevx_linux64)
7024 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7025 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7026 declarations.
7027 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7028 (s390_store_vxrs_high): New functions.
7029 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7030 NT_S390_VXRS_HIGH.
7031 (s390_arch_setup): Add logic for selecting one of the new target
7032 descriptions. Activate the new vector regsets if applicable.
7033 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7034 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7035 and init_registers_s390x_tevx_linux64.
7036
7037 2015-03-01 Pedro Alves <palves@redhat.com>
7038
7039 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7040 parameter.
7041
7042 2015-02-27 Pedro Alves <palves@redhat.com>
7043
7044 * linux-x86-low.c (u_debugreg_offset): New function.
7045 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7046
7047 2015-02-27 Pedro Alves <palves@redhat.com>
7048
7049 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7050 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7051 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7052 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7053 (ps_lsetfpregs, ps_getpid)
7054 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7055 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7056 (ps_lsetxregs, ps_plog): Declare.
7057
7058 2015-02-27 Pedro Alves <palves@redhat.com>
7059
7060 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7061 IP_AGENT_EXPORT_FUNC.
7062 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7063 IP_AGENT_EXPORT_FUNC.
7064 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7065 (IP_AGENT_EXPORT): Delete.
7066 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7067 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7068 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7069 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7070 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7071 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7072 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7073 (traceframe_read_count, traceframe_write_count)
7074 (traceframes_created, trace_state_variables, get_raw_reg)
7075 (get_trace_state_variable_value, set_trace_state_variable_value)
7076 (ust_loaded, helper_thread_id, cmd_buf): Use
7077 IPA_SYM_EXPORTED_NAME.
7078 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7079 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7080 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7081 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7082 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7083 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7084 EXTERN_C_PUSH/EXTERN_C_POP.
7085 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7086 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7087 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7088 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7089 (traceframe_write_count, traceframe_read_count)
7090 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7091 (about_to_request_buffer_space, get_trace_state_variable_value)
7092 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7093 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7094 EXTERN_C_PUSH/EXTERN_C_POP.
7095 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7096 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7097 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7098 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7099 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7100 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7101 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7102 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7103 Define.
7104 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7105 (IP_AGENT_EXPORT_VAR_DECL): Define.
7106 (tracing): Declare.
7107 (gdb_agent_get_raw_reg): Declare.
7108
7109 2015-02-27 Tom Tromey <tromey@redhat.com>
7110 Pedro Alves <palves@redhat.com>
7111
7112 Rename symbols whose names are reserved C++ keywords throughout.
7113
7114 2015-02-27 Pedro Alves <palves@redhat.com>
7115
7116 * Makefile.in (COMPILER): New, get it from autoconf.
7117 (CXX): Get from autoconf instead.
7118 (COMPILE.pre): Use COMPILER.
7119 (CC-LD): Rename to ...
7120 (CC_LD): ... this. Use COMPILER.
7121 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7122 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7123 * acinclude.m4: Include build-with-cxx.m4.
7124 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7125 Disable -Werror by default if building in C++ mode.
7126 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7127 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7128 the C++ compiler. Save/restore CXXFLAGS too.
7129 * configure: Regenerate.
7130
7131 2015-02-27 Pedro Alves <palves@redhat.com>
7132
7133 * acinclude.m4: Include libiberty.m4.
7134 * configure.ac: Call libiberty_INIT.
7135 * config.in, configure: Regenerate.
7136
7137 2015-02-26 Pedro Alves <palves@redhat.com>
7138
7139 * linux-low.c (linux_wait_1): When incrementing the PC past a
7140 program breakpoint always use the_low_target.breakpoint_len as
7141 increment, rather than the maximum between that and
7142 the_low_target.decr_pc_after_break.
7143
7144 2015-02-23 Pedro Alves <palves@redhat.com>
7145
7146 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7147 thread was doing a step-over; always adjust the PC if
7148 we stepped over a permanent breakpoint.
7149 (linux_wait_1): If we stepped over breakpoint that was on top of a
7150 permanent breakpoint, manually advance the PC past it.
7151
7152 2015-02-23 Pedro Alves <palves@redhat.com>
7153
7154 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7155 modes.
7156 (x86_fill_gregset, x86_store_gregset): Use it when handling
7157 $orig_eax.
7158
7159 2015-02-20 Pedro Alves <palves@redhat.com>
7160
7161 * thread-db.c: Include "nat/linux-procfs.h".
7162 (thread_db_init): Skip listing new threads if the kernel supports
7163 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7164
7165 2015-02-20 Pedro Alves <palves@redhat.com>
7166
7167 * linux-low.c (status_pending_p_callback): Use ptid_match.
7168
7169 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7170
7171 PR breakpoints/16812
7172 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7173 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7174 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7175
7176 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7177
7178 PR breakpoints/15956
7179 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7180
7181 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7182
7183 * linux-low.c (linux_low_btrace_conf): Print size.
7184 * server.c (handle_btrace_conf_general_set): New.
7185 (hanle_general_set): Call handle_btrace_conf_general_set.
7186 (handle_query): Report Qbtrace-conf:bts:size as supported.
7187
7188 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7189
7190 * linux-low.c (linux_low_enable_btrace): Update parameters.
7191 (linux_low_btrace_conf): New.
7192 (linux_target_ops)<to_btrace_conf>: Initialize.
7193 * server.c (current_btrace_conf): New.
7194 (handle_btrace_enable): Rename to ...
7195 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7196 to target_enable_btrace. Update comment. Update users.
7197 (handle_qxfer_btrace_conf): New.
7198 (qxfer_packets): Add btrace-conf entry.
7199 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7200 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7201 (target_ops)<read_btrace_conf>: New.
7202 (target_enable_btrace): Update parameters.
7203 (target_read_btrace_conf): New.
7204
7205 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7206
7207 * server.c (handle_btrace_general_set): Remove call to
7208 target_supports_btrace.
7209 (supported_btrace_packets): New.
7210 (handle_query): Call supported_btrace_packets.
7211 * target.h: include btrace-common.h.
7212 (btrace_target_info): Removed.
7213 (supports_btrace, target_supports_btrace): Update parameters.
7214
7215 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7216
7217 * Makefile.in (SFILES): Add common/btrace-common.c.
7218 (OBS): Add common/btrace-common.o.
7219 (btrace-common.o): Add build rules.
7220 * linux-low: Include btrace-common.h.
7221 (linux_low_read_btrace): Use struct btrace_data. Call
7222 btrace_data_init and btrace_data_fini.
7223
7224 2015-02-06 Pedro Alves <palves@redhat.com>
7225
7226 * thread-db.c (find_new_threads_callback): Add debug output.
7227
7228 2015-02-04 Pedro Alves <palves@redhat.com>
7229
7230 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7231 (resume_stopped_resumed_lwps): New function.
7232 (linux_wait_for_event_filtered): Use it.
7233
7234 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7235
7236 * Makefile.in (SFILES): Add linux-personality.c.
7237 (linux-personality.o): New rule.
7238 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7239 list of objects to be built.
7240 * linux-low.c: Include nat/linux-personality.h.
7241 (linux_create_inferior): Remove code to disable address space
7242 randomization (moved to ../nat/linux-personality.c). Create
7243 cleanup to disable address space randomization.
7244
7245 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7246
7247 * Makefile.in (posix-strerror.o): New rule.
7248 (mingw-strerror.o): Likewise.
7249 * configure: Regenerated.
7250 * configure.ac: Source file ../common/common.host. Initialize new
7251 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7252
7253 2015-01-14 Yao Qi <yao@codesourcery.com>
7254
7255 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7256 (ppc-linux.o): New rule.
7257 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7258 * configure.ac: AC_CHECK_FUNCS(getauxval).
7259 * config.in: Re-generated.
7260 * configure: Re-generated.
7261 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7262 ppc64_64bit_inferior_p
7263
7264 2015-01-14 Yao Qi <yao@codesourcery.com>
7265
7266 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7267 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7268 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7269 (PT_ORIG_R3, PT_TRAP): Likewise.
7270 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7271 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7272 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7273
7274 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7275
7276 * i387-fp.c (i387_cache_to_xsave): In look over
7277 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7278 zmmh_low_space field by use of zmmh_high_space.
7279
7280 2015-01-09 Pedro Alves <palves@redhat.com>
7281
7282 * linux-low.c (step_over_bkpt): Move higher up in the file.
7283 (handle_extended_wait): Don't store the stop_pc here.
7284 (get_stop_pc): Adjust comments and rename to ...
7285 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7286 stopped for a software breakpoint or hardware breakpoint.
7287 (thread_still_has_status_pending_p): New function.
7288 (status_pending_p_callback): Use
7289 thread_still_has_status_pending_p. If the event is no longer
7290 interesting, resume the LWP.
7291 (handle_tracepoints): Add assert.
7292 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7293 (wstatus_maybe_breakpoint): New function.
7294 (cancel_breakpoint): Delete function.
7295 (check_stopped_by_watchpoint): New function, factored out from
7296 linux_low_filter_event.
7297 (lp_status_maybe_breakpoint): Delete function.
7298 (linux_low_filter_event): Remove filter_ptid argument.
7299 Leave thread group exits pending here. Store the LWP's stop PC.
7300 Always leave events pending.
7301 (linux_wait_for_event_filtered): Pull all events out of the
7302 kernel, and leave them all pending.
7303 (count_events_callback, select_event_lwp_callback): Consider all
7304 events.
7305 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7306 (select_event_lwp): Only give preference to the stepping LWP in
7307 all-stop mode. Adjust comments.
7308 (ignore_event): New function.
7309 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7310 references to cancel_breakpoints. Adjust to renames. Also give
7311 equal priority to all LWPs that have had events in non-stop mode.
7312 If reporting a software breakpoint event, unadjust the LWP's PC.
7313 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7314 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7315 Adjust.
7316 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7317 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7318 (linux_stopped_by_watchpoint): Adjust.
7319 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7320 * linux-low.h (enum lwp_stop_reason): New.
7321 (struct lwp_info) <stop_pc>: Adjust comment.
7322 <stopped_by_watchpoint>: Delete field.
7323 <stop_reason>: New field.
7324 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7325 * mem-break.c (software_breakpoint_inserted_here)
7326 (hardware_breakpoint_inserted_here): New function.
7327 * mem-break.h (software_breakpoint_inserted_here)
7328 (hardware_breakpoint_inserted_here): Declare.
7329 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7330 (cancel_breakpoints): Delete.
7331 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7332 (upload_fast_traceframes): Remove references to
7333 cancel_breakpoints.
7334
7335 2015-01-09 Pedro Alves <palves@redhat.com>
7336
7337 * thread-db.c (find_new_threads_callback): Ignore thread if the
7338 kernel thread ID is -1.
7339
7340 2015-01-09 Pedro Alves <palves@redhat.com>
7341
7342 * linux-low.c (linux_attach_fail_reason_string): Move to
7343 nat/linux-ptrace.c, and rename.
7344 (linux_attach_lwp): Update comment.
7345 (attach_proc_task_lwp_callback): New function.
7346 (linux_attach): Adjust to rename and use
7347 linux_proc_attach_tgid_threads.
7348 (linux_attach_fail_reason_string): Delete declaration.
7349
7350 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7351
7352 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7353 * server.c (gdbserver_version): Likewise.
7354
7355 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7356
7357 * remote-utils.c: Include ctype.h.
7358 (input_interrupt): Explicitly handle the case when the char
7359 received is the NUL byte. Improve the printing of non-ASCII
7360 characters.
7361
7362 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7363
7364 * linux-low.c (linux_low_filter_event): Update call to
7365 linux_enable_event_reporting following the addition of
7366 a new parameter to that function.
7367
7368 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7369
7370 PR server/17457
7371 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7372 (AARCH64_FPCR_REGNO): Likewise.
7373 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7374 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7375 (aarch64_store_fpregset): Likewise.
7376
7377 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7378
7379 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7380 Remove FIXME comment about assumption about N.
7381
7382 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7383
7384 * configure.ac: If large-file support is disabled in GDBserver,
7385 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7386 * configure: Regenerate.
7387
7388 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7389
7390 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7391 warning upon ENODATA from ptrace.
7392 * linux-s390-low.c (s390_store_tdb): New.
7393 (s390_regsets): Add regset for NT_S390_TDB.
7394
7395 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7396
7397 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7398 without a fill_function.
7399 * linux-s390-low.c (s390_fill_last_break): Remove.
7400 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7401 (s390_arch_setup): Use regset's size instead of fill_function for
7402 loop end condition.
7403
7404 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7405
7406 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7407 the regset's store function when ptrace returned an error.
7408 * regcache.c (get_thread_regcache): Invalidate register cache
7409 before fetching inferior's registers.
7410
7411 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7412
7413 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7414 while-loop as for-loop.
7415 (regsets_store_inferior_registers): Likewise.
7416
7417 2014-11-28 Yao Qi <yao@codesourcery.com>
7418
7419 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7420 * config.in, configure: Re-generate.
7421 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7422 is defined.
7423
7424 2014-11-21 Yao Qi <yao@codesourcery.com>
7425
7426 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7427 (AC_CHECK_HEADERS): Remove malloc.h.
7428 * configure: Re-generated.
7429 * config.in: Re-generated.
7430 * server.h: Don't include alloca.h and malloc.h.
7431 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7432 Don't include malloc.h.
7433
7434 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7435
7436 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7437 corresponding ERRNO check in same block.
7438
7439 2014-11-12 Pedro Alves <palves@redhat.com>
7440
7441 * server.c (cont_thread): Update comment.
7442 (start_inferior, attach_inferior): No longer clear cont_thread.
7443 (handle_v_cont): No longer set cont_thread.
7444 (captured_main): Clear cont_thread each time a GDB connects.
7445
7446 2014-11-12 Pedro Alves <palves@redhat.com>
7447
7448 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7449 thread, and don't resume all threads if the Hc thread has exited.
7450
7451 2014-11-12 Pedro Alves <palves@redhat.com>
7452
7453 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7454 the process group instead of to a specific LWP.
7455
7456 2014-10-15 Pedro Alves <palves@redhat.com>
7457
7458 PR server/17487
7459 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7460 parameter.
7461 (arm_set_thread_context): Delete.
7462 (the_low_target): Adjust.
7463 * win32-i386-low.c (debug_registers_changed)
7464 (debug_registers_used): Delete.
7465 (update_debug_registers_callback): New function.
7466 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7467 needing to update their debug registers.
7468 (win32_get_current_dr): New function.
7469 (x86_dr_low_get_addr, x86_dr_low_get_control)
7470 (x86_dr_low_get_status): Fetch the debug register from the thread
7471 record's context.
7472 (i386_initial_stuff): Adjust.
7473 (i386_get_thread_context): Remove current_event parameter. Don't
7474 clear debug_registers_changed nor copy DR values to
7475 debug_reg_state.
7476 (i386_set_thread_context): Delete.
7477 (i386_prepare_to_resume): New function.
7478 (i386_thread_added): Mark the thread as needing to update irs
7479 debug registers.
7480 (the_low_target): Remove i386_set_thread_context and install
7481 i386_prepare_to_resume.
7482 * win32-low.c (win32_get_thread_context): Adjust.
7483 (win32_set_thread_context): Use SetThreadContext
7484 directly.
7485 (win32_prepare_to_resume): New function.
7486 (win32_require_context): New function, factored out from ...
7487 (thread_rec): ... this.
7488 (continue_one_thread): Call win32_prepare_to_resume on each thread
7489 we're about to continue.
7490 (win32_resume): Call win32_prepare_to_resume on the event thread.
7491 * win32-low.h (struct win32_thread_info)
7492 <debug_registers_changed>: New field.
7493 (struct win32_target_ops): Change prototype of set_thread_context,
7494 delete set_thread_context and add prepare_to_resume.
7495 (win32_require_context): New declaration.
7496
7497 2014-10-08 Gary Benson <gbenson@redhat.com>
7498
7499 * server.h: Do not include common-exceptions.h.
7500
7501 2014-10-08 Gary Benson <gbenson@redhat.com>
7502
7503 * server.h: Do not include cleanups.h.
7504
7505 2014-09-30 James Hogan <james.hogan@imgtec.com>
7506
7507 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7508 mips64-dsp-linux.c.
7509
7510 2014-09-23 Yao Qi <yao@codesourcery.com>
7511
7512 * linux-low.c (lp_status_maybe_breakpoint): New function.
7513 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7514 (count_events_callback): Likewise.
7515 (select_event_lwp_callback): Likewise.
7516 (cancel_breakpoints_callback): Likewise.
7517
7518 2014-09-19 Don Breazeal <donb@codesourcery.com>
7519
7520 * linux-low.c (handle_extended_wait): Call
7521 linux_ptrace_get_extended_event.
7522 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7523 linux_is_extended_waitstatus.
7524
7525 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7526
7527 * Makefile.in (CPPFLAGS): Define.
7528 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7529 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7530
7531 2014-09-16 Gary Benson <gbenson@redhat.com>
7532
7533 * inferiors.h (current_inferior): Renamed as...
7534 (current_thread): New variable. All uses updated.
7535 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7536 (maybe_move_out_of_jump_pad): Likewise.
7537 (cancel_breakpoint): Likewise.
7538 (linux_low_filter_event): Likewise.
7539 (wait_for_sigstop): Likewise.
7540 (linux_resume_one_lwp): Likewise.
7541 (need_step_over_p): Likewise.
7542 (start_step_over): Likewise.
7543 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7544 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7545 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7546 and save_inferior as saved_thread.
7547 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7548 saved_thread.
7549 (regcache_invalidate_thread): Likewise.
7550 * remote-utils.c (prepare_resume_reply): Likewise.
7551 * thread-db.c (thread_db_get_tls_address): Likewise.
7552 (disable_thread_event_reporting): Likewise.
7553 (remove_thread_event_breakpoints): Likewise.
7554 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7555 as saved_thread.
7556 * target.h (set_desired_inferior): Renamed as...
7557 (set_desired_thread): New declaration. All uses updated.
7558 * server.c (myresume): Updated comment to reference thread instead
7559 of inferior.
7560 (handle_serial_event): Likewise.
7561 (handle_target_event): Likewise.
7562
7563 2014-09-12 Tom Tromey <tromey@redhat.com>
7564 Gary Benson <gbenson@redhat.com>
7565
7566 * regcache.h: Include common-regcache.h.
7567 (regcache_read_pc): Don't declare.
7568 * regcache.c (get_thread_regcache_for_ptid): New function.
7569
7570 2014-09-11 Tom Tromey <tromey@redhat.com>
7571 Gary Benson <gbenson@redhat.com>
7572
7573 * symbol.c: New file.
7574 * Makefile.in (SFILES): Add symbol.c.
7575 (OBS): Add symbol.o.
7576
7577 2014-09-11 Gary Benson <gbenson@redhat.com>
7578
7579 * target.c (target_stop_ptid, target_continue_ptid): New
7580 functions.
7581
7582 2014-09-11 Tom Tromey <tromey@redhat.com>
7583 Gary Benson <gbenson@redhat.com>
7584
7585 * target.h: Include target/target.h.
7586 * target.c (target_read_memory, target_read_uint32)
7587 (target_write_memory): New functions.
7588
7589 2014-09-11 Gary Benson <gbenson@redhat.com>
7590
7591 * server.h (debug_hw_points): Don't declare.
7592 * server.c (debug_hw_points): Don't define. Replace all uses
7593 with show_debug_regs.
7594 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7595 all uses with show_debug_regs.
7596
7597 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7598
7599 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7600 endianness into account.
7601 (ppc_supply_ptrace_register): Likewise.
7602
7603 2014-09-03 James Hogan <james.hogan@imgtec.com>
7604
7605 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7606 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7607
7608 2014-09-03 Gary Benson <gbenson@redhat.com>
7609
7610 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7611 ALL_DEBUG_ADDRESS_REGISTERS.
7612
7613 2014-09-02 Gary Benson <gbenson@redhat.com>
7614
7615 * i386-low.h: Renamed as...
7616 * x86-low.h: New file. All type, function and variable name
7617 prefixes changed from "i386_" to "x86_". All references updated.
7618 * i386-low.c: Renamed as...
7619 * x86-low.c: New file. All type, function and variable name
7620 prefixes changed from "i386_" to "x86_". All references updated.
7621
7622 2014-09-02 Gary Benson <gbenson@redhat.com>
7623
7624 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7625 (x86_linux_new_thread): Likewise.
7626
7627 2014-08-29 Gary Benson <gbenson@redhat.com>
7628
7629 * server.h (setjmp.h): Do not include.
7630 (toplevel): Do not declare.
7631 (common-exceptions.h): Include.
7632 (cleanups.h): Likewise.
7633 * server.c (toplevel): Do not define.
7634 (exit_code): New static global.
7635 (detach_or_kill_for_exit_cleanup): New function.
7636 (main): New function. Original main renamed to...
7637 (captured_main): New function.
7638 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7639
7640 2014-08-29 Gary Benson <gbenson@redhat.com>
7641
7642 * Makefile.in (SFILES): Add common/common-exceptions.c.
7643 (OBS): Add common-exceptions.o.
7644 (common-exceptions.o): New rule.
7645 * utils.c (prepare_to_throw_exception): New function.
7646
7647 2014-08-29 Gary Benson <gbenson@redhat.com>
7648
7649 * config.in: Regenerate.
7650 * configure: Likewise.
7651
7652 2014-08-29 Gary Benson <gbenson@redhat.com>
7653
7654 * Makefile.in (SFILES): Add common/cleanups.c.
7655 (OBS): cleanups.o.
7656 (cleanups.o): New rule.
7657
7658 2014-08-29 Gary Benson <gbenson@redhat.com>
7659
7660 * utils.c (internal_vwarning): New function.
7661
7662 2014-08-28 Gary Benson <gbenson@redhat.com>
7663
7664 * utils.h (fatal): Remove declaration.
7665 * utils.c (fatal): Remove function.
7666
7667 2014-08-28 Gary Benson <gbenson@redhat.com>
7668
7669 * tracepoint.c (gdb_agent_init): Replace fatal with
7670 perror_with_name.
7671 (initialize_tracepoint): Likewise.
7672
7673 2014-08-28 Gary Benson <gbenson@redhat.com>
7674
7675 * remote-utils.c (remote_prepare): Replace fatal with error.
7676
7677 2014-08-28 Gary Benson <gbenson@redhat.com>
7678
7679 * linux-low.c (linux_async): Replace fatal with warning.
7680 Tidy up and return.
7681 (linux_start_non_stop): Return -1 if linux_async failed.
7682
7683 2014-08-28 Gary Benson <gbenson@redhat.com>
7684
7685 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7686 gdb_assert.
7687 (i386_dr_low_get_addr): Remove vague comment.
7688 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7689 gdb_assert.
7690
7691 2014-08-28 Gary Benson <gbenson@redhat.com>
7692
7693 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7694 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7695 internal_error.
7696 (linux_resume_one_lwp): Likewise.
7697 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7698 gdb_assert.
7699 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7700 with internal_error.
7701 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7702 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7703 (find_register_by_name): Replace fatal with internal_error.
7704 (find_regno): Likewise.
7705 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7706 * thread-db.c (thread_db_create_event): Likewise.
7707 (thread_db_load_search): Likewise.
7708 (try_thread_db_load_1): Likewise.
7709 * tracepoint.c (get_jump_space_head): Replace fatal with
7710 internal_error.
7711 (claim_trampoline_space): Likewise.
7712 (have_fast_tracepoint_trampoline_buffer): Likewise.
7713 (cmd_qtstart): Likewise.
7714 (stop_tracing): Likewise.
7715 (fast_tracepoint_collecting): Likewise.
7716 (target_malloc): Likewise.
7717 (download_tracepoint): Likewise.
7718 (download_trace_state_variables): Replace check with gdb_assert.
7719 (upload_fast_traceframes): Replace fatal with internal_error.
7720
7721 2014-08-19 Tom Tromey <tromey@redhat.com>
7722 Gary Benson <gbenson@redhat.com>
7723
7724 * Makefile.in (SFILES): Add common/common-debug.c.
7725 (OBS): Add common-debug.o.
7726 (common-debug.o): New rule.
7727 * debug.h (debug_printf): Don't declare.
7728 * debug.c (debug_printf): Renamed and rewritten as...
7729 (debug_vprintf): New function.
7730
7731 2014-08-19 Gary Benson <gbenson@redhat.com>
7732
7733 * utils.h: Do not include print-utils.h.
7734
7735 2014-08-19 Tom Tromey <tromey@redhat.com>
7736 Gary Benson <gbenson@redhat.com>
7737
7738 * server.h: Add static assertion.
7739 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7740
7741 2014-08-19 Tom Tromey <tromey@redhat.com>
7742 Gary Benson <gbenson@redhat.com>
7743
7744 * Makefile.in (SFILES): Add common/errors.c.
7745 (OBS): Add errors.o.
7746 (IPA_OBS): Add errors-ipa.o.
7747 (errors.o): New rule.
7748 (errors-ipa.o): Likewise.
7749 * utils.h (perror_with_name, error, warning): Don't declare.
7750 * utils.c (warning): Renamed and rewritten as...
7751 (vwarning): New function.
7752 (error): Renamed and rewritten as...
7753 (verror): New function.
7754 (internal_error): Renamed and rewritten as...
7755 (internal_verror): New function.
7756
7757 2014-08-07 Gary Benson <gbenson@redhat.com>
7758
7759 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7760 * configure: Regenerate.
7761 * config.in: Likewise.
7762 * server.h: Do not include errno.h.
7763 * event-loop.c: Likewise.
7764 * hostio-errno.c: Likewise.
7765 * linux-low.c: Likewise.
7766 * remote-utils.c: Likewise.
7767 * spu-low.c: Likewise.
7768 * utils.c: Likewise.
7769 * gdbreplay.c: Unconditionally include errno.h.
7770
7771 2014-08-07 Gary Benson <gbenson@redhat.com>
7772
7773 * server.h: Do not include string.h.
7774 * event-loop.c: Likewise.
7775 * linux-low.c: Likewise.
7776 * regcache.c: Likewise.
7777 * remote-utils.c: Likewise.
7778 * spu-low.c: Likewise.
7779 * utils.c: Likewise.
7780
7781 2014-08-07 Gary Benson <gbenson@redhat.com>
7782
7783 * server.h: Do not include gdb_assert.h.
7784
7785 2014-08-07 Gary Benson <gbenson@redhat.com>
7786
7787 * server.h: Do not include common-utils.h.
7788
7789 2014-08-07 Gary Benson <gbenson@redhat.com>
7790
7791 * server.h: Do not include ptid.h.
7792 * notif.h: Likewise.
7793
7794 2014-08-07 Gary Benson <gbenson@redhat.com>
7795
7796 * server.h: Do not include gdb_locale.h.
7797
7798 2014-08-07 Gary Benson <gbenson@redhat.com>
7799
7800 * server.h: Do not include gdb/signals.h.
7801 * win32-low.c: Likewise.
7802
7803 2014-08-07 Gary Benson <gbenson@redhat.com>
7804
7805 * server.h: Do not include pathmax.h.
7806
7807 2014-08-07 Gary Benson <gbenson@redhat.com>
7808
7809 * server.h: Do not include libiberty.h.
7810 * linux-bfin-low.c: Likewise.
7811
7812 2014-08-07 Gary Benson <gbenson@redhat.com>
7813
7814 * server.h: Do not include ansidecl.h.
7815
7816 2014-08-07 Gary Benson <gbenson@redhat.com>
7817
7818 * linux-x86-low.c: Do not include stddef.h.
7819 * lynx-ppc-low.c: Likewise.
7820 * tracepoint.c: Likewise.
7821
7822 2014-08-07 Gary Benson <gbenson@redhat.com>
7823
7824 * server.h: Do not include stdarg.h.
7825 * nto-low.c: Likewise.
7826
7827 2014-08-07 Gary Benson <gbenson@redhat.com>
7828
7829 * server.h: Do not include stdlib.h.
7830 * inferiors.c: Likewise.
7831 * linux-low.c: Likewise.
7832 * regcache.c: Likewise.
7833 * spu-low.c: Likewise.
7834 * tracepoint.c: Likewise.
7835 * utils.c: Likewise.
7836
7837 2014-08-07 Gary Benson <gbenson@redhat.com>
7838
7839 * server.h: Do not include stdio.h.
7840 * linux-low.c: Likewise.
7841 * remote-utils.c: Likewise.
7842 * spu-low.c: Likewise.
7843 * utils.c: Likewise.
7844 * wincecompat.c: Likewise.
7845
7846 2014-08-06 Gary Benson <gbenson@redhat.com>
7847
7848 * regcache.c (init_register_cache): Move conditionals inside if.
7849
7850 2014-08-06 Gary Benson <gbenson@redhat.com>
7851
7852 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7853
7854 2014-07-31 Gary Benson <gbenson@redhat.com>
7855
7856 * ax.h: Do not include server.h.
7857 * gdbthread.h: Likewise.
7858 * lynx-low.h: Likewise.
7859 * notif.h: Likewise.
7860
7861 2014-07-30 Gary Benson <gbenson@redhat.com>
7862
7863 * server.h: Include common-defs.h.
7864 Do not include config.h or build-gnulib-gdbserver/config.h.
7865
7866 2014-07-30 Gary Benson <gbenson@redhat.com>
7867
7868 * hostio-errno.c: Move server.h to top of includes list.
7869 * inferiors.c: Likewise.
7870 * linux-x86-low.c: Likewise.
7871 * notif.c: Include server.h.
7872
7873 2014-07-24 Tom Tromey <tromey@redhat.com>
7874 Gary Benson <gbenson@redhat.com>
7875
7876 * server.h (CORE_ADDR): Now unsigned.
7877
7878 2014-07-16 Pedro Alves <palves@redhat.com>
7879
7880 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7881
7882 2014-07-15 Pedro Alves <palves@redhat.com>
7883
7884 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7885 copy.
7886
7887 2014-07-11 Pedro Alves <palves@redhat.com>
7888
7889 * linux-low.c (kill_wait_lwp): New function, based on
7890 kill_one_lwp_callback, but use my_waitpid directly.
7891 (kill_one_lwp_callback, linux_kill): Use it.
7892
7893 2014-06-23 Pedro Alves <palves@redhat.com>
7894
7895 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7896 before setting DR0..DR3.
7897
7898 2014-06-20 Gary Benson <gbenson@redhat.com>
7899
7900 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7901 * configure: Regenerated.
7902 * config.in: Likewise.
7903
7904 2014-06-20 Gary Benson <gbenson@redhat.com>
7905
7906 * Makefile.in (SFILES): Update locations for files moved
7907 from common to nat.
7908 (object file files): Reordered.
7909
7910 2014-06-20 Gary Benson <gbenson@redhat.com>
7911
7912 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7913 (i386_dr_low_set_addr): Likewise.
7914 (i386_dr_low_get_addr): Likewise.
7915 (i386_dr_low_can_set_control): Likewise.
7916 (i386_dr_low_set_control): Likewise.
7917 (i386_dr_low_get_control): Likewise.
7918 (i386_dr_low_get_status): Likewise.
7919 (i386_get_debug_register_length): Likewise.
7920 * linux-x86-low.c (i386_dr_low_set_addr):
7921 Changed signature. Made static.
7922 (i386_dr_low_get_addr): Likewise.
7923 (i386_dr_low_set_control): Likewise.
7924 (i386_dr_low_get_control): Likewise.
7925 (i386_dr_low_get_status): Likewise.
7926 (i386_dr_low): New global variable.
7927 * win32-i386-low.c (i386_dr_low_set_addr):
7928 Changed signature. Made static.
7929 (i386_dr_low_get_addr): Likewise.
7930 (i386_dr_low_set_control): Likewise.
7931 (i386_dr_low_get_control): Likewise.
7932 (i386_dr_low_get_status): Likewise.
7933 (i386_dr_low): New global variable.
7934
7935 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7936
7937 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7938 * Makefile.in (AR, AR_FLAGS): Define.
7939 * configure: Regenerate.
7940
7941 2014-06-19 Gary Benson <gbenson@redhat.com>
7942
7943 * Makefile.in (i386-dregs.o): New rule.
7944 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7945 * i386-low.c (target.h): Remove include.
7946 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7947 (DR_CONTROL_SHIFT): Likewise.
7948 (DR_CONTROL_SIZE): Likewise.
7949 (DR_RW_EXECUTE): Likewise.
7950 (DR_RW_WRITE): Likewise.
7951 (DR_RW_READ): Likewise.
7952 (DR_RW_IORW): Likewise.
7953 (DR_LEN_1): Likewise.
7954 (DR_LEN_2): Likewise.
7955 (DR_LEN_4): Likewise.
7956 (DR_LEN_8): Likewise.
7957 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7958 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7959 (DR_ENABLE_SIZE): Likewise.
7960 (DR_LOCAL_SLOWDOWN): Likewise.
7961 (DR_GLOBAL_SLOWDOWN): Likewise.
7962 (DR_CONTROL_RESERVED): Likewise.
7963 (I386_DR_CONTROL_MASK): Likewise.
7964 (I386_DR_VACANT): Likewise.
7965 (I386_DR_LOCAL_ENABLE): Likewise.
7966 (I386_DR_GLOBAL_ENABLE): Likewise.
7967 (I386_DR_DISABLE): Likewise.
7968 (I386_DR_SET_RW_LEN): Likewise.
7969 (I386_DR_GET_RW_LEN): Likewise.
7970 (I386_DR_WATCH_HIT): Likewise.
7971 (i386_wp_op_t): Likewise.
7972 (i386_show_dr): Likewise.
7973 (i386_length_and_rw_bits): Likewise.
7974 (i386_insert_aligned_watchpoint): Likewise.
7975 (i386_remove_aligned_watchpoint): Likewise.
7976 (i386_handle_nonaligned_watchpoint): Likewise.
7977 i386_update_inferior_debug_regs(): Likewise.
7978 (i386_dr_insert_watchpoint): Likewise.
7979 (i386_dr_remove_watchpoint): Likewise.
7980 (i386_dr_region_ok_for_watchpoint): Likewise.
7981 (i386_dr_stopped_data_address): Likewise.
7982 (i386_dr_stopped_by_watchpoint): Likewise.
7983
7984 2014-06-19 Gary Benson <gbenson@redhat.com>
7985
7986 * i386-low.c (i386_dr_show): Renamed to
7987 i386_show_dr and made static. All uses updated.
7988 (i386_dr_length_and_rw_bits): Renamed to
7989 i386_length_and_rw_bits and made static.
7990 All uses updated.
7991 (i386_dr_insert_aligned_watchpoint): Renamed to
7992 i386_insert_aligned_watchpoint and made static.
7993 All uses updated.
7994 (i386_dr_remove_aligned_watchpoint): Renamed to
7995 i386_remove_aligned_watchpoint and made static.
7996 All uses updated.
7997 (i386_dr_update_inferior_debug_regs): Renamed to
7998 i386_update_inferior_debug_regs and made static.
7999 All uses updated.
8000
8001 2014-06-18 Gary Benson <gbenson@redhat.com>
8002
8003 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8004 (i386_dr_low_can_set_control): Likewise.
8005 (i386_get_debug_register_length): Likewise.
8006 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8007 (i386_dr_low_can_set_control): Likewise.
8008 (i386_get_debug_register_length): Likewise.
8009
8010 2014-06-17 Gary Benson <gbenson@redhat.com>
8011
8012 * i386-low.h (i386-dregs.h): New include.
8013 (DR_FIRSTADDR): Now in i386-dregs.h.
8014 (DR_LASTADDR): Likewise.
8015 (DR_NADDR): Likewise.
8016 (DR_STATUS): Likewise.
8017 (DR_CONTROL): Likewise.
8018 (i386_debug_reg_state): Likewise.
8019 (i386_dr_insert_watchpoint): Likewise.
8020 (i386_dr_remove_watchpoint): Likewise.
8021 (i386_dr_region_ok_for_watchpoint): Likewise.
8022 (i386_dr_stopped_data_address): Likewise.
8023 (i386_dr_stopped_by_watchpoint): Likewise.
8024 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8025
8026 2014-06-18 Gary Benson <gbenson@redhat.com>
8027
8028 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8029 i386_dr_insert_watchpoint.
8030 (i386_low_remove_watchpoint): Renamed to
8031 i386_dr_remove_watchpoint.
8032 (i386_low_region_ok_for_watchpoint): Renamed to
8033 i386_dr_region_ok_for_watchpoint.
8034 (i386_low_stopped_data_address): Renamed to
8035 i386_dr_stopped_data_address.
8036 (i386_low_stopped_by_watchpoint): Renamed to
8037 i386_dr_stopped_by_watchpoint.
8038 * i386-low.c (i386_show_dr): Renamed to
8039 i386_dr_show and made nonstatic. All uses updated.
8040 (i386_length_and_rw_bits): Renamed to
8041 i386_dr_length_and_rw_bits and made nonstatic.
8042 All uses updated.
8043 (i386_insert_aligned_watchpoint): Renamed to
8044 i386_dr_insert_aligned_watchpoint and made nonstatic.
8045 All uses updated.
8046 (i386_remove_aligned_watchpoint): Renamed to
8047 i386_dr_remove_aligned_watchpoint and made nonstatic.
8048 All uses updated.
8049 (i386_update_inferior_debug_regs): Renamed to
8050 i386_dr_update_inferior_debug_regs and made nonstatic.
8051 All uses updated.
8052 (i386_low_insert_watchpoint): Renamed to
8053 i386_dr_insert_watchpoint. All uses updated.
8054 (i386_low_remove_watchpoint): Renamed to
8055 i386_dr_remove_watchpoint. All uses updated.
8056 (i386_low_region_ok_for_watchpoint): Renamed to
8057 i386_dr_region_ok_for_watchpoint. All uses updated.
8058 (i386_low_stopped_data_address): Renamed to
8059 i386_dr_stopped_data_address. All uses updated.
8060 (i386_low_stopped_by_watchpoint): Renamed to
8061 i386_dr_stopped_by_watchpoint. All uses updated.
8062
8063 2014-06-18 Gary Benson <gbenson@redhat.com>
8064
8065 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8066 (i386_dr_low_can_set_control): Likewise.
8067 (i386_insert_aligned_watchpoint): New check.
8068
8069 2014-06-18 Gary Benson <gbenson@redhat.com>
8070
8071 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8072 Renamed to state.
8073
8074 2014-06-18 Gary Benson <gbenson@redhat.com>
8075
8076 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8077 instead of fatal and error.
8078 (i386_handle_nonaligned_watchpoint): Likewise.
8079
8080 2014-06-18 Gary Benson <gbenson@redhat.com>
8081
8082 * i386-low.c (i386_get_debug_register_length): New macro.
8083 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8084 (i386_show_dr): Use debug_printf instead of fprintf. Use
8085 phex to format values.
8086
8087 2014-06-18 Gary Benson <gbenson@redhat.com>
8088
8089 * i386-low.h: Comment changes.
8090 * i386-low.c: Likewise.
8091
8092 2014-06-18 Gary Benson <gbenson@redhat.com>
8093
8094 * i386-low.c: Whitespace changes.
8095
8096 2014-06-12 Tom Tromey <tromey@redhat.com>
8097
8098 * utils.c (freeargv): Remove.
8099
8100 2014-06-12 Tom Tromey <tromey@redhat.com>
8101
8102 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8103 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8104 (parse_debug_format_options): Likewise.
8105 (gdbserver_usage): Likewise.
8106 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8107 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8108 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8109 against libiberty.
8110 ($(LIBGNU)): Depend on libiberty.
8111 (all-lib): Recurse into all subdirs.
8112 (install-only): Invoke "install" target in subdirs.
8113 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8114 targets.
8115 * configure: Rebuild.
8116 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8117 for vasprintf, vsnprintf, or gettimeofday.
8118 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8119 srv_tgtobj.
8120
8121 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8122
8123 * development.sh: Delete.
8124 * Makefile.in (config.status): Adjust dependency on development.sh.
8125 * configure.ac: Adjust development.sh source call.
8126 * configure: Regenerate.
8127
8128 2014-06-02 Pedro Alves <palves@redhat.com>
8129
8130 * ax.c (gdb_free_agent_expr): New function.
8131 * ax.h (gdb_free_agent_expr): New declaration.
8132 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8133 list.
8134 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8135 static.
8136 (clear_breakpoint_conditions_and_commands): New function.
8137 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8138 (clear_breakpoint_conditions_and_commands): New declaration.
8139
8140 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8141
8142 * linux-aarch64-low.c (asm/ptrace.h): Include.
8143
8144 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8145
8146 Fix TLS access for -static -pthread.
8147 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8148 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8149 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8150
8151 2014-05-20 Pedro Alves <palves@redhat.com>
8152
8153 * linux-aarch64-low.c (aarch64_insert_point)
8154 (aarch64_remove_point): No longer check whether the type is
8155 supported here. Adjust to new interface.
8156 (the_low_target): Install aarch64_supports_z_point_type as
8157 supports_z_point_type method.
8158 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8159 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8160 instead of a Z packet char. Adjust.
8161 (arm_supports_z_point_type): New function.
8162 (arm_insert_point, arm_remove_point): Adjust to new interface.
8163 (the_low_target): Install arm_supports_z_point_type.
8164 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8165 (cris_insert_point, cris_remove_point): Adjust to new interface.
8166 Don't check whether the type is supported here.
8167 (the_low_target): Install cris_supports_z_point_type.
8168 * linux-low.c (linux_supports_z_point_type): New function.
8169 (linux_insert_point, linux_remove_point): Adjust to new interface.
8170 * linux-low.h (struct linux_target_ops) <insert_point,
8171 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8172 raw_breakpoint pointer parameter.
8173 <supports_z_point_type>: New method.
8174 * linux-mips-low.c (mips_supports_z_point_type): New function.
8175 (mips_insert_point, mips_remove_point): Adjust to new interface.
8176 Use mips_supports_z_point_type.
8177 (the_low_target): Install mips_supports_z_point_type.
8178 * linux-ppc-low.c (the_low_target): Install NULL as
8179 supports_z_point_type method.
8180 * linux-s390-low.c (the_low_target): Install NULL as
8181 supports_z_point_type method.
8182 * linux-sparc-low.c (the_low_target): Install NULL as
8183 supports_z_point_type method.
8184 * linux-x86-low.c (x86_supports_z_point_type): New function.
8185 (x86_insert_point): Adjust to new insert_point interface. Use
8186 insert_memory_breakpoint. Adjust to new
8187 i386_low_insert_watchpoint interface.
8188 (x86_remove_point): Adjust to remove_point interface. Use
8189 remove_memory_breakpoint. Adjust to new
8190 i386_low_remove_watchpoint interface.
8191 (the_low_target): Install x86_supports_z_point_type.
8192 * lynx-low.c (lynx_target_ops): Install NULL as
8193 supports_z_point_type callback.
8194 * nto-low.c (nto_supports_z_point_type): New.
8195 (nto_insert_point, nto_remove_point): Adjust to new interface.
8196 (nto_target_ops): Install nto_supports_z_point_type.
8197 * mem-break.c: Adjust intro comment.
8198 (struct raw_breakpoint) <raw_type, size>: New fields.
8199 <inserted>: Update comment.
8200 <shlib_disabled>: Delete field.
8201 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8202 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8203 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8204 (raw_bkpt_type_to_target_hw_bp_type): New function.
8205 (find_enabled_raw_code_breakpoint_at): New function.
8206 (find_raw_breakpoint_at): New type and size parameters. Use them.
8207 (insert_memory_breakpoint): New function, based off
8208 set_raw_breakpoint_at.
8209 (remove_memory_breakpoint): New function.
8210 (set_raw_breakpoint_at): Reimplement.
8211 (set_breakpoint): New, based on set_breakpoint_at.
8212 (set_breakpoint_at): Reimplement.
8213 (delete_raw_breakpoint): Go through the_target->remove_point
8214 instead of assuming memory breakpoints.
8215 (find_gdb_breakpoint_at): Delete.
8216 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8217 (find_gdb_breakpoint): New function.
8218 (set_gdb_breakpoint_at): Delete.
8219 (z_type_supported): New function.
8220 (set_gdb_breakpoint_1): New function, loosely based off
8221 set_gdb_breakpoint_at.
8222 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8223 (delete_gdb_breakpoint_at): Delete.
8224 (delete_gdb_breakpoint_1): New function, loosely based off
8225 delete_gdb_breakpoint_at.
8226 (delete_gdb_breakpoint): New function.
8227 (clear_gdb_breakpoint_conditions): Rename to ...
8228 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8229 breakpoint.
8230 (add_condition_to_breakpoint): Make static.
8231 (add_breakpoint_condition): Take a struct breakpoint pointer
8232 instead of an address. Adjust.
8233 (gdb_condition_true_at_breakpoint): Rename to ...
8234 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8235 z_type parameter.
8236 (gdb_condition_true_at_breakpoint): Reimplement.
8237 (add_breakpoint_commands): Take a struct breakpoint pointer
8238 instead of an address. Adjust.
8239 (gdb_no_commands_at_breakpoint): Rename to ...
8240 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8241 parameter. Return true if no breakpoint was found. Change debug
8242 output.
8243 (gdb_no_commands_at_breakpoint): Reimplement.
8244 (run_breakpoint_commands): Rename to ...
8245 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8246 and change return type to boolean.
8247 (run_breakpoint_commands): New function.
8248 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8249 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8250 breakpoint. Go through the_target->remove_point instead of
8251 assuming memory breakpoint.
8252 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8253 software and hardware breakpoints.
8254 (reinsert_raw_breakpoint): Go through the_target->insert_point
8255 instead of assuming memory breakpoint.
8256 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8257 software and hardware breakpoints.
8258 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8259 Check both software and hardware breakpoints.
8260 (validate_inserted_breakpoint): Assert the breakpoint is a
8261 software breakpoint. Set the inserted flag to -1 instead of
8262 setting shlib_disabled.
8263 (delete_disabled_breakpoints): Adjust.
8264 (validate_breakpoints): Only validate software breakpoints.
8265 Adjust to inserted flag change.
8266 (check_mem_read, check_mem_write): Skip breakpoint types other
8267 than software breakpoints. Adjust to inserted flag change.
8268 * mem-break.h (enum raw_bkpt_type): New enum.
8269 (raw_breakpoint, struct process_info): Forward declare.
8270 (Z_packet_to_target_hw_bp_type): Delete declaration.
8271 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8272 (set_gdb_breakpoint, delete_gdb_breakpoint)
8273 (clear_breakpoint_conditions): New declarations.
8274 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8275 (breakpoint_inserted_here): Update comment.
8276 (add_breakpoint_condition, add_breakpoint_commands): Replace
8277 address parameter with a breakpoint pointer parameter.
8278 (gdb_breakpoint_here): Update comment.
8279 (delete_gdb_breakpoint_at): Delete.
8280 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8281 * server.c (process_point_options): Take a struct breakpoint
8282 pointer instead of an address. Adjust.
8283 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8284 delete_gdb_breakpoint.
8285 * spu-low.c (spu_target_ops): Install NULL as
8286 supports_z_point_type method.
8287 * target.h: Include mem-break.h.
8288 (struct target_ops) <prepare_to_access_memory>: Update comment.
8289 <supports_z_point_type>: New field.
8290 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8291 instead of a char. Also take a raw breakpoint pointer.
8292 * win32-arm-low.c (the_low_target): Install NULL as
8293 supports_z_point_type.
8294 * win32-i386-low.c (i386_supports_z_point_type): New function.
8295 (i386_insert_point, i386_remove_point): Adjust to new interface.
8296 (the_low_target): Install i386_supports_z_point_type.
8297 * win32-low.c (win32_supports_z_point_type): New function.
8298 (win32_insert_point, win32_remove_point): Adjust to new interface.
8299 (win32_target_ops): Install win32_supports_z_point_type.
8300 * win32-low.h (struct win32_target_ops):
8301 <supports_z_point_type>: New method.
8302 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8303 instead of a char. Also take a raw breakpoint pointer.
8304
8305 2014-05-20 Pedro Alves <palves@redhat.com>
8306
8307 * mem-break.h: Include break-common.h.
8308 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8309 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8310 (Z_packet_to_target_hw_bp_type): New declaration.
8311 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8312 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8313 (Z_PACKET_ACCESS_WP): Delete macros.
8314 (Z_packet_to_hw_type): Delete function.
8315 * i386-low.h: Don't include break-common.h here.
8316 (Z_packet_to_hw_type): Delete declaration.
8317 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8318 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8319 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8320 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8321 * linux-aarch64-low.c: Don't include break-common.h here.
8322 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8323 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8324 (Z_packet_to_target_hw_bp_type): Delete function.
8325 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8326 function.
8327 (mips_insert_point, mips_remove_point): Use
8328 Z_packet_to_target_hw_bp_type.
8329
8330 2014-05-20 Pedro Alves <palves@redhat.com>
8331
8332 * linux-aarch64-low.c: Include break-common.h.
8333 (enum target_point_type): Delete.
8334 (Z_packet_to_point_type): Rename to ...
8335 (Z_packet_to_target_hw_bp_type): ... this, and return a
8336 target_hw_bp_type instead.
8337 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8338 instead of an enum target_point_type.
8339 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8340 breakpoint type.
8341 (aarch64_dr_state_insert_one_point)
8342 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8343 (aarch64_handle_aligned_watchpoint)
8344 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8345 Take an enum target_hw_bp_type instead of an enum
8346 target_point_type.
8347 (aarch64_supports_z_point_type): New function.
8348 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8349 use Z_packet_to_target_hw_bp_type.
8350
8351 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8352
8353 * configure.ac: Only use -Werror by default when DEVELOPMENT
8354 is true.
8355 * configure: Regenerate.
8356
8357 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8358
8359 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8360 * linux-x86-low.c (X86_64_USER_REGS): New.
8361 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8362
8363 2014-04-28 Yao Qi <yao@codesourcery.com>
8364
8365 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8366 name.
8367
8368 2014-04-25 Pedro Alves <palves@redhat.com>
8369
8370 PR server/16255
8371 * linux-low.c (linux_attach_fail_reason_string): New function.
8372 (linux_attach_lwp): Delete.
8373 (linux_attach_lwp_1): Rename to ...
8374 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8375 argument. Remove "initial" parameter. Return int instead of
8376 void. Don't error or warn here.
8377 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8378 failure to attach to the tgid. Call warning when failing to
8379 attach to an lwp.
8380 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8381 argument. Remove "initial" parameter. Return int instead of
8382 void. Don't error or warn here.
8383 (linux_attach_fail_reason_string): New declaration.
8384 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8385 interface change. Use linux_attach_fail_reason_string.
8386
8387 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8388 Walfred Tedeschi <walfred.tedeschi@intel.com>
8389
8390 * Makefile.in: Added rules to handle new files
8391 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8392 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8393 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8394 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8395 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8396 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8397 x32-avx512-linux.o.
8398 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8399 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8400 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8401 i386/x32-avx512.xml.
8402 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8403 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8404 i386/x32-avx512-linux.xml.
8405 * i387-fp.c (num_avx512_k_registers): New constant for number
8406 of K registers.
8407 (num_avx512_zmmh_low_registers): New constant for number of
8408 lower ZMM registers (0-15).
8409 (num_avx512_zmmh_high_registers): New constant for number of
8410 higher ZMM registers (16-31).
8411 (num_avx512_ymmh_registers): New contant for number of higher
8412 YMM registers (ymm16-31 added by avx521 on x86_64).
8413 (num_avx512_xmm_registers): New constant for number of higher
8414 XMM registers (xmm16-31 added by AVX512 on x86_64).
8415 (struct i387_xsave): Add space for AVX512 registers.
8416 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8417 Add code to handle AVX512 registers.
8418 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8419 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8420 prototypei from generated file.
8421 (tdesc_amd64_avx512_linux): Likewise.
8422 (init_registers_x32_avx512_linux): Likewise.
8423 (tdesc_x32_avx512_linux): Likewise.
8424 (init_registers_i386_avx512_linux): Likewise.
8425 (tdesc_i386_avx512_linux): Likewise.
8426 (x86_64_regmap): Add AVX512 registers.
8427 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8428 mask.
8429 (initialize_low_arch): Add code to initialize AVX512 registers.
8430
8431 2014-04-23 Pedro Alves <palves@redhat.com>
8432
8433 * mem-break.c (find_gdb_breakpoint_at): Make static.
8434 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8435
8436 2014-04-23 Pedro Alves <palves@redhat.com>
8437
8438 * i386-low.c: Don't include break-common.h here.
8439 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8440 prototype to take target_hw_bp_type as argument instead of a Z
8441 packet char.
8442 * i386-low.h: Include break-common.h here.
8443 (Z_packet_to_hw_type): Declare.
8444 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8445 prototypes.
8446 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8447 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8448 (x86_remove_point): Convert the packet number to a
8449 target_hw_bp_type before calling i386_low_remove_watchpoint.
8450 * win32-i386-low.c (i386_insert_point): Convert the packet number
8451 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8452 (i386_remove_point): Convert the packet number to a
8453 target_hw_bp_type before calling i386_low_remove_watchpoint.
8454
8455 2014-04-23 Pedro Alves <palves@redhat.com>
8456
8457 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8458
8459 2014-04-10 Pedro Alves <palves@redhat.com>
8460
8461 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8462 Check if the condition or command is NULL before checking if the
8463 breakpoint is known. On success, return true.
8464 * mem-break.h (add_breakpoint_condition): Document return.
8465 (add_breakpoint_commands): Add describing comment.
8466 * server.c (skip_to_semicolon): New function.
8467 (process_point_options): Use it.
8468
8469 2014-04-09 Pedro Alves <palves@redhat.com>
8470
8471 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8472 to lwpid_of.
8473
8474 2014-02-27 Pedro Alves <palves@redhat.com>
8475
8476 PR 12702
8477 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8478 macros.
8479 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8480 output.
8481 (last_thread_of_process_p): Take a PID argument instead of a
8482 thread pointer.
8483 (linux_wait_for_lwp): Delete.
8484 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8485 functions.
8486 (linux_low_filter_event): New function, party factored out from
8487 linux_wait_for_event.
8488 (linux_wait_for_event): Rename to ...
8489 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8490 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8491 sigsuspend. Check for zombie leaders.
8492 (linux_wait_for_event): Reimplement as wrapper around
8493 linux_wait_for_event_filtered.
8494 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8495 a normal or signal exit is seen, it's the whole process exiting.
8496 (wait_for_sigstop): No longer a for_each_inferior callback.
8497 Rewrite on top of linux_wait_for_event_filtered.
8498 (stop_all_lwps): Call wait_for_sigstop directly.
8499 * server.c (resume, handle_target_event): Handle
8500 TARGET_WAITKIND_NO_RESUMED.
8501
8502 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8503
8504 * win32-low.c (psapi_get_dll_name,
8505 * win32_CreateToolhelp32Snapshot): Delete.
8506 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8507 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8508 Delete.
8509 (handle_load_dll): Add function description.
8510 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8511
8512 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8513
8514 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8515 Add comment.
8516 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8517 base address when calling win32_add_one_solib.
8518 (handle_load_dll): Delete local variable load_addr.
8519 Remove 0x1000 offset applied to DLL base address when calling
8520 win32_add_one_solib.
8521 (handle_unload_dll): Add comment.
8522
8523 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8524
8525 * win32-low.c (win32_add_all_dlls): Renames
8526 win32_ensure_ntdll_loaded. Rewrite function documentation.
8527 Adjust implementation to always load all DLLs.
8528 Add 0x1000 offset to DLL base address when calling
8529 win32_add_one_solib.
8530 (child_initialization_done): New static global.
8531 (do_initial_child_stuff): Set child_initialization_done to
8532 zero during child initialization, and 1 after. Replace call
8533 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8534 Add comment.
8535 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8536 (handle_unload_dll): Add function documentation.
8537 (get_child_debug_event): Ignore load and unload DLL events
8538 during child initialization.
8539
8540 2014-02-20 Doug Evans <dje@google.com>
8541
8542 Remove global all_lwps.
8543 * inferiors.h (ptid_of): Move here from linux-low.h.
8544 (pid_of, lwpid_of): Ditto.
8545 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8546 parameter is a struct thread_info * now.
8547 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8548 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8549 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8550 directly.
8551 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8552 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8553 * linux-arm-low.c (update_registers_callback): Update, "entry"
8554 parameter is a struct thread_info * now.
8555 Fetch lwpid from current_inferior directly.
8556 (arm_insert_point): Pass &all_threads to find_inferior instead of
8557 &all_lwps.
8558 (arm_remove_point): Ditto.
8559 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8560 (arm_prepare_to_resume): Fetch pid from thread.
8561 (arm_read_description): Fetch lwpid from current_inferior directly.
8562 * linux-low.c (all_lwps): Delete.
8563 (delete_lwp): Delete call to remove_inferior.
8564 (handle_extended_wait): Fetch lwpid from thread.
8565 (add_lwp): Don't set lwp->entry.id. Remove call to
8566 add_inferior_to_list.
8567 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8568 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8569 (kill_one_lwp_callback): Ditto.
8570 (linux_kill): Don't dereference NULL pointer.
8571 Fetch ptid,lwpid from thread.
8572 (get_detach_signal): Fetch ptid from thread.
8573 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8574 Simplify call to regcache_invalidate_thread.
8575 (delete_lwp_callback): Update, "entry" parameter is a
8576 struct thread_info * now. Fetch pid from thread.
8577 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8578 (status_pending_p_callback): Update, "entry" parameter is a
8579 struct thread_info * now. Fetch ptid from thread.
8580 (find_lwp_pid): Update, "entry" parameter is a
8581 struct thread_info * now.
8582 (linux_wait_for_lwp): Fetch pid from thread.
8583 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8584 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8585 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8586 (dequeue_one_deferred_signal): Ditto.
8587 (cancel_breakpoint): Fetch ptid from current_inferior.
8588 (linux_wait_for_event): Pass &all_threads to find_inferior,
8589 not &all_lwps. Fetch ptid, lwpid from thread.
8590 (count_events_callback): Update, "entry" parameter is a
8591 struct thread_info * now.
8592 (select_singlestep_lwp_callback): Ditto.
8593 (select_event_lwp_callback): Ditto.
8594 (cancel_breakpoints_callback): Ditto.
8595 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8596 not &all_lwps.
8597 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8598 (unsuspend_one_lwp): Update, "entry" parameter is a
8599 struct thread_info * now.
8600 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8601 not &all_lwps.
8602 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8603 Fetch lwpid from thread, not lwp.
8604 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8605 Pass &all_threads to find_inferior, not &all_lwps.
8606 (send_sigstop): Fetch lwpid from thread, not lwp.
8607 (send_sigstop_callback): Update, "entry" parameter is a
8608 struct thread_info * now.
8609 (suspend_and_send_sigstop_callback): Ditto.
8610 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8611 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8612 struct thread_info * now.
8613 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8614 from thread, lwp.
8615 (lwp_running): Update, "entry" parameter is a
8616 struct thread_info * now.
8617 (stop_all_lwps): Fetch ptid from thread.
8618 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8619 (linux_resume_one_lwp): Fetch lwpid from thread.
8620 (linux_set_resume_request): Update, "entry" parameter is a
8621 struct thread_info * now. Fetch pid, lwpid from thread.
8622 (resume_status_pending_p): Update, "entry" parameter is a
8623 struct thread_info * now.
8624 (need_step_over_p): Ditto. Fetch lwpid from thread.
8625 (start_step_over): Fetch lwpid from thread.
8626 (linux_resume_one_thread): Update, "entry" parameter is a
8627 struct thread_info * now. Fetch lwpid from thread.
8628 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8629 (proceed_one_lwp): Update, "entry" parameter is a
8630 struct thread_info * now. Fetch lwpid from thread.
8631 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8632 struct thread_info * now.
8633 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8634 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8635 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8636 directly.
8637 (regsets_store_inferior_registers): Ditto.
8638 (fetch_register, store_register): Ditto.
8639 (linux_read_memory, linux_write_memory): Ditto.
8640 (linux_request_interrupt): Ditto.
8641 (linux_read_auxv): Ditto.
8642 (linux_xfer_siginfo): Ditto.
8643 (linux_qxfer_spu): Ditto.
8644 (linux_qxfer_libraries_svr4): Ditto.
8645 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8646 moved to inferiors.h.
8647 (get_lwp): Delete.
8648 (get_thread_lwp): Update.
8649 (struct lwp_info): Delete member "entry". Simplify comment for
8650 member "thread".
8651 (all_lwps): Delete.
8652 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8653 current_inferior directly.
8654 (update_watch_registers_callback): Update, "entry" parameter is a
8655 struct thread_info * now. Fetch pid from thread.
8656 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8657 (mips_insert_point): Fetch lwpid from current_inferior.
8658 Pass &all_threads to find_inferior, not &all_lwps.
8659 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8660 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8661 directly.
8662 (mips_stopped_data_address): Ditto.
8663 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8664 directly.
8665 * linux-tile-low.c (tile_arch_setup): Ditto.
8666 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8667 (update_debug_registers_callback): Update, "entry" parameter is a
8668 struct thread_info * now. Fetch pid from thread.
8669 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8670 Pass &all_threads to find_inferior, not &all_lwps.
8671 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8672 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8673 Pass &all_threads to find_inferior, not &all_lwps.
8674 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8675 (i386_dr_low_get_status): Ditto.
8676 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8677 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8678 (x86_linux_read_description): Ditto.
8679 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8680
8681 2014-02-20 Doug Evans <dje@google.com>
8682
8683 * inferiors.c (get_first_inferior): Fix buglet.
8684
8685 2014-02-19 Doug Evans <dje@google.com>
8686
8687 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8688 * inferiors.c (add_thread): Change result type to struct thread_info *.
8689 All callers updated.
8690 (add_lwp): Call add_thread here instead of in callers.
8691 All callers updated.
8692 * linux-low.h (get_lwp_thread): Rewrite.
8693 (struct lwp_info): New member "thread".
8694
8695 2014-02-19 Doug Evans <dje@google.com>
8696
8697 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8698 All callers updated.
8699
8700 2014-02-19 Doug Evans <dje@google.com>
8701
8702 * inferiors.c (add_thread): Fix whitespace.
8703
8704 2014-02-19 Doug Evans <dje@google.com>
8705
8706 * dll.c (clear_dlls): Replace accessing list implemention details
8707 with API function.
8708 * gdbthread.h (get_first_thread): Declare.
8709 * inferiors.c (for_each_inferior_with_data): New function.
8710 (get_first_thread): New function.
8711 (find_thread_ptid): Simplify.
8712 (get_first_inferior): New function.
8713 (clear_list): Delete.
8714 (one_inferior_p): New function.
8715 (clear_inferior_list): New function.
8716 (clear_inferiors): Update.
8717 * inferiors.h (for_each_inferior_with_data): Declare.
8718 (clear_inferior_list): Declare.
8719 (one_inferior_p): Declare.
8720 (get_first_inferior): Declare.
8721 * linux-low.c (linux_wait_for_event): Replace accessing list
8722 implemention details with API function.
8723 * server.c (target_running): Ditto.
8724 (accumulate_file_name_length): New function.
8725 (emit_dll_description): New function.
8726 (handle_qxfer_libraries): Replace accessing list implemention
8727 details with API function.
8728 (handle_qxfer_threads_worker): New function.
8729 (handle_qxfer_threads_proper): Replace accessing list implemention
8730 details with API function.
8731 (handle_query): Ditto.
8732 (visit_actioned_threads_callback_ftype): New typedef.
8733 (visit_actioned_threads_data): New struct.
8734 (visit_actioned_threads): Rewrite to be find_inferior callback.
8735 (resume): Call find_inferior.
8736 (handle_status): Replace accessing list implemention
8737 details with API function.
8738 (process_serial_event): Replace accessing list implemention details
8739 with API function.
8740 * target.c (set_desired_inferior): Replace accessing list implemention
8741 details with API function.
8742 * tracepoint.c (same_process_p): New function.
8743 (gdb_agent_about_to_close): Replace accessing list implemention
8744 details with API function.
8745 * win32-low.c (child_delete_thread): Replace accessing list
8746 implemention details with API function.
8747 (match_dll_by_basename): New function.
8748 (dll_is_loaded_by_basename): New function.
8749 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8750 details call to dll_is_loaded_by_basename.
8751
8752 2014-02-19 Doug Evans <dje@google.com>
8753
8754 * dll.h (struct dll_info): Add comment.
8755 * gdbthread.h (struct thread_info): Add comment.
8756 (current_ptid): Simplify.
8757 * inferiors.c (add_process): Update.
8758 (remove_process): Update.
8759 * inferiors.h (struct process_info): Rename member "head" to "entry".
8760 * linux-low.c (delete_lwp): Update.
8761 (add_lwp): Update.
8762 (last_thread_of_process_p): Update.
8763 (kill_one_lwp_callback, linux_kill): Update.
8764 (status_pending_p_callback): Update.
8765 (wait_for_sigstop): Update. Simplify read of ptid.
8766 (start_step_over): Update.
8767 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8768 (get_lwp_thread): Update.
8769 (struct lwp_info): Rename member "head" to "entry".
8770 * regcache.h (inferior_list_entry): Delete.
8771 * server.c (kill_inferior_callback): Update.
8772 (detach_or_kill_inferior_callback): Update.
8773 (print_started_pid): Update.
8774 (print_attached_pid): Update.
8775 (process_serial_event): Simplify read of ptid.
8776 * thread-db.c (thread_db_create_event): Update.
8777 (thread_db_get_tls_address): Update.
8778 * win32-low.c (current_inferior_ptid): Simplify.
8779
8780 2014-02-19 Tom Tromey <tromey@redhat.com>
8781
8782 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8783 argument.
8784 (target_supports_btrace): Update.
8785
8786 2014-02-14 Yao Qi <yao@codesourcery.com>
8787
8788 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8789 (rsp-low-ipa.o): New target.
8790
8791 2014-02-12 Tom Tromey <tromey@redhat.com>
8792
8793 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8794 convert_ascii_to_int.
8795 * regcache.c (registers_to_string): Likewise.
8796 * remote-utils.c (decode_M_packet): Likewise.
8797 * server.c (process_serial_event): Likewise.
8798
8799 2014-02-12 Tom Tromey <tromey@redhat.com>
8800
8801 * server.c (handle_query, handle_v_run): Use hex2bin, not
8802 unhexify.
8803 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8804
8805 2014-02-12 Tom Tromey <tromey@redhat.com>
8806
8807 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8808 convert_int_to_ascii.
8809 * regcache.c (registers_to_string, collect_register_as_string):
8810 Likewise.
8811 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8812 Likewise.
8813 * server.c (process_serial_event): Likewise.
8814 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8815 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8816
8817 2014-02-12 Tom Tromey <tromey@redhat.com>
8818
8819 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8820 bin2hex, not hexify.
8821 * tracepoint.c (cmd_qtstatus): Likewise.
8822
8823 2014-02-12 Tom Tromey <tromey@redhat.com>
8824
8825 * remote-utils.c (monitor_output): Pass explicit length to
8826 hexify.
8827
8828 2014-02-12 Tom Tromey <tromey@redhat.com>
8829
8830 * tracepoint.c: Include rsp-low.h.
8831 * server.c: Include rsp-low.h.
8832 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8833 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8834 declare.
8835 * remote-utils.c: Include rsp-low.h.
8836 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8837 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8838 (convert_int_to_ascii, convert_ascii_to_int): Move to
8839 common/rsp-low.c.
8840 * regcache.c: Include rsp-low.h.
8841 * ax.c: Include rsp-low.h.
8842 * Makefile.in (SFILES): Add common/rsp-low.c.
8843 (OBS): Add rsp-low.o.
8844 (rsp-low.o): New target.
8845
8846 2014-02-12 Tom Tromey <tromey@redhat.com>
8847
8848 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8849 Include print-utils.h.
8850 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8851 (plongest, thirty_two, phex_nz): Remove.
8852 * Makefile.in (SFILES): Add common/print-utils.c.
8853 (OBS): Add print-utils.o.
8854 (print-utils-ipa.o): New target.
8855 (print-utils.o): New target.
8856 (IPA_OBJS): Add print-utils-ipa.o.
8857
8858 2014-02-06 Tom Tromey <tromey@redhat.com>
8859
8860 * Makefile.in (SFILES): Fix indentation.
8861
8862 2014-02-05 Doug Evans <dje@google.com>
8863
8864 * linux-low.c (linux_wait_for_event): Improve comment.
8865 (linux_wait_1): Keep current_inferior in sync with event_child.
8866
8867 2014-01-22 Doug Evans <dje@google.com>
8868
8869 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8870
8871 2014-01-22 Doug Evans <dje@google.com>
8872
8873 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8874 * configure: Regenerate.
8875 * config.in: Regenerate.
8876 * Makefile.in (SFILES): Add debug.c.
8877 (OBS): Add debug.o.
8878 * debug.c: New file.
8879 * debug.h: New file.
8880 * linux-aarch64-low.c (*): Update all debugging printfs to use
8881 debug_printf instead of fprintf.
8882 * linux-arm-low.c (*): Ditto.
8883 * linux-cris-low.c (*): Ditto.
8884 * linux-crisv32-low.c (*): Ditto.
8885 * linux-m32r-low.c (*): Ditto.
8886 * linux-sparc-low.c (*): Ditto.
8887 * linux-x86.c (*): Ditto.
8888 * linux-low.c (*): Ditto.
8889 (linux_wait_1): Add calls to debug_enter, debug_exit.
8890 (linux_wait): Remove redundant debugging printf.
8891 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8892 (linux_resume, unstop_all_lwps): Ditto.
8893 * mem-break.c (*): Update all debugging printfs to use
8894 debug_printf instead of fprintf.
8895 * remote-utils.c (*): Ditto.
8896 * thread-db.c (*): Ditto.
8897 * server.c #include <ctype.h>, "gdb_vecs.h".
8898 (debug_threads): Moved to debug.c.
8899 (*): Update all debugging printfs to use debug_printf instead of
8900 fprintf.
8901 (start_inferior): Replace call to fflush with call to debug_flush.
8902 (monitor_show_help): Mention set debug-format.
8903 (parse_debug_format_options): New function.
8904 (handle_monitor_command): Handle "monitor set debug-format".
8905 (gdbserver_usage): Mention --debug-format.
8906 (main): Parse --debug-format.
8907 * server.h (debug_threads): Declaration moved to debug.h.
8908 #include "debug.h".
8909 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8910 trace_debug_1 that uses debug_printf.
8911 (tracepoint_look_up_symbols): Update all debugging printfs to use
8912 debug_printf instead of fprintf.
8913
8914 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8915
8916 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8917 sys/ptrace.h.
8918
8919 2014-01-17 Pedro Alves <palves@redhat.com>
8920
8921 PR build/16445
8922 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8923 defined after including gdb_proc_service.h.
8924
8925 2014-01-16 Doug Evans <dje@google.com>
8926
8927 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8928 (match_dll): Use it.
8929
8930 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8931
8932 * target.h (target_ops) <read_btrace>: Change parameters and
8933 return type to allow error reporting.
8934 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8935 trace reading errors on.
8936 * linux-low.c (linux_low_read_btrace): Pass trace reading
8937 errors on.
8938 (linux_low_disable_btrace): New.
8939
8940 2014-01-15 Doug Evans <dje@google.com>
8941
8942 * inferiors.c (thread_id_to_gdb_id): Delete.
8943 * inferiors.h (thread_id_to_gdb_id): Delete.
8944
8945 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8946
8947 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8948 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8949 versions.
8950
8951 2014-01-08 Pedro Alves <palves@redhat.com>
8952
8953 * server.c (handle_status): Don't discard previous queued stop
8954 replies or thread's pending status here.
8955 (main) <disconnection>: Do it here instead.
8956
8957 2014-01-08 Pedro Alves <palves@redhat.com>
8958
8959 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8960 * server.c (visit_actioned_threads, handle_pending_status): New
8961 function.
8962 (handle_v_cont): Factor out parts to ...
8963 (resume): ... this new function. If in all-stop, and a thread
8964 being resumed has a pending status, report it without actually
8965 resuming.
8966 (myresume): Adjust to use the new 'resume' function.
8967 (clear_pending_status_callback, set_pending_status_callback)
8968 (find_status_pending_thread_callback): New functions.
8969 (handle_status): Handle the case of multiple threads having
8970 interesting statuses to report. Report threads' real last signal
8971 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8972 with an interesting thread to report the status for, instead of
8973 always reporting the status of the first thread.
8974
8975 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8976
8977 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8978 * gdbreplay.c (gdbreplay_version): Likewise.
8979
8980 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8981
8982 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8983 iov.iov_len with the real length in use.
8984
8985 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8986
8987 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8988 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8989 for all targets that use win32-low.c.
8990 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8991 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8992
8993 2013-12-13 Pedro Alves <palves@redhat.com>
8994
8995 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8996 if equal to TARGET_WAITKIND_LOADED.
8997 * win32-low.c (cached_status): New static global.
8998 (win32_wait): Add declaration.
8999 (do_initial_child_stuff): Flush all initial pending debug events
9000 up to the initial breakpoint.
9001 (win32_wait): If CACHED_STATUS was set, return that instead
9002 of doing a real wait. Remove the code resuming the execution
9003 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9004 during the initial phase. Also remove the code changing
9005 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9006 TARGET_WAITKIND_STOPPED.
9007
9008 2013-12-11 Yao Qi <yao@codesourcery.com>
9009
9010 * notif.c (handle_notif_ack): Return 0 if no notification
9011 matches.
9012
9013 2013-11-20 Doug Evans <dje@google.com>
9014
9015 * linux-low.c (linux_set_resume_request): Fix comment.
9016
9017 2013-11-20 Doug Evans <dje@google.com>
9018
9019 * linux-low.c (resume_status_pending_p): Tweak comment.
9020
9021 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9022
9023 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9024 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9025 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9026 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9027 (srv_amd64_regobj): Add amd64-mpx.o.
9028 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9029 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9030 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9031 * i387-fp.c (num_pl_bnd_register) Added constant.
9032 (num_pl_bnd_cfg_registers) Added constant.
9033 (struct i387_xsave) Added reserved area and MPX fields.
9034 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9035 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9036 function.
9037 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9038 (init_registers_amd64_mpx_linux): Declare new function.
9039 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9040 (x86_64_regmap): Add MPX registers.
9041 (x86_linux_read_description): Add MPX case.
9042 (initialize_low_arch): Initialize MPX targets.
9043
9044 2013-11-18 Tom Tromey <tromey@redhat.com>
9045
9046 * configure: Rebuild.
9047 * configure.ac: Don't check for stdlib.h.
9048 * gdbreplay.c: Unconditionally include stdlib.h.
9049
9050 2013-11-18 Tom Tromey <tromey@redhat.com>
9051
9052 * config.in: Rebuild.
9053 * configure: Rebuild.
9054 * configure.ac: Don't use AC_HEADER_DIRENT.
9055
9056 2013-11-18 Tom Tromey <tromey@redhat.com>
9057
9058 * server.h: Don't check HAVE_STRING_H.
9059 * gdbreplay.c: Don't check HAVE_STRING_H.
9060 * configure: Rebuild.
9061
9062 2013-11-18 Tom Tromey <tromey@redhat.com>
9063
9064 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9065 LIBGNU.
9066
9067 2013-11-08 Tom Tromey <tromey@redhat.com>
9068
9069 * configure, config.in: Rebuild.
9070 * configure.ac: Remove unused configury.
9071
9072 2013-11-08 Tom Tromey <tromey@redhat.com>
9073
9074 * acinclude.m4: Include common.m4, codeset.m4.
9075 * configure, config.in: Rebuild.
9076 * configure.ac: Use GDB_AC_COMMON.
9077
9078 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9079
9080 * linux-s390-low.c (HWCAP_S390_TE): New define.
9081 (s390_arch_setup): Consider the TE field in the HWCAP for
9082 determining 'have_regset_tdb'.
9083
9084 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9085
9086 PR gdb/16014
9087 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9088 call to sizeof.
9089
9090 2013-10-02 Pedro Alves <palves@redhat.com>
9091
9092 * server.c (process_serial_event): Don't output "GDBserver
9093 exiting" if GDB is connected through stdio.
9094 * target.c (mywait): Likewise, be silent if GDB is connected
9095 through stdio.
9096
9097 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9098
9099 * lynx-low.c (lynx_add_threads_after_attach): New function.
9100 (lynx_attach): Remove call to add_thread. Add call to
9101 lynx_add_threads_after_attach instead.
9102
9103 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9104
9105 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9106 * config.in, configure: Regenerated.
9107
9108 2013-09-18 Yao Qi <yao@codesourcery.com>
9109
9110 PR server/15959
9111 * server.c (start_inferior): Clear 'resume_info'.
9112
9113 2013-09-16 Jiong Wang <jiwang@tilera.com>
9114
9115 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9116 for each register.
9117
9118 2013-09-16 Jiong Wang <jiwang@tilera.com>
9119
9120 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9121 linux-tile-low.o to srv_tgtobj.
9122
9123 2013-09-16 Will Newton <will.newton@linaro.org>
9124
9125 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9126 out regs.
9127
9128 2013-09-06 Pedro Alves <palves@redhat.com>
9129
9130 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9131 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9132 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9133 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9134 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9135 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9136
9137 2013-09-06 Pedro Alves <palves@redhat.com>
9138
9139 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9140 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9141
9142 2013-09-06 Pedro Alves <palves@redhat.com>
9143
9144 * linux-amd64-ipa.c: Include tracepoint.h.
9145 * linux-i386-ipa.c: Include tracepoint.h.
9146
9147 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9148
9149 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9150 (ps_get_thread_area): New function.
9151
9152 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9153
9154 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9155 (initialize_low_arch): Call init_registers_crisv32 rather than
9156 init_register_crisv32.
9157
9158 2013-09-05 Pedro Alves <palves@redhat.com>
9159
9160 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9161 to ...
9162 * hostio.h: ... this new file.
9163 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9164 win32-low.c: Include hostio.h.
9165
9166 2013-09-05 Pedro Alves <palves@redhat.com>
9167
9168 * server.h (gdb_client_data, handler_func, callback_handler_func)
9169 (delete_file_handler, add_file_handler, append_callback_event)
9170 (delete_callback_event, start_event_loop, initialize_event_loop):
9171 Move to event-loop.h and include it.
9172 * event-loop.h: New file.
9173
9174 2013-09-05 Pedro Alves <palves@redhat.com>
9175
9176 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9177 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9178 (loaded_dll, unloaded_dll): Move to ...
9179 * dll.h: ... this new file.
9180 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9181
9182 2013-09-05 Pedro Alves <palves@redhat.com>
9183
9184 * server.h (current_process, get_thread_process, all_processes)
9185 (add_inferior_to_list, for_each_inferior, current_inferior)
9186 (remove_inferior, add_process, remove_process, find_process_pid)
9187 (have_started_inferiors_p, have_attached_inferiors_p)
9188 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9189 (clear_inferiors, find_inferior, find_inferior_id)
9190 (inferior_target_data, set_inferior_target_data)
9191 (inferior_regcache_data, set_inferior_regcache_data): Move to
9192 inferiors.h, and include it.
9193 * inferiors.h: New file.
9194
9195 2013-09-05 Pedro Alves <palves@redhat.com>
9196
9197 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9198 Move ...
9199 * ax.h: ... here.
9200
9201 2013-09-05 Pedro Alves <palves@redhat.com>
9202
9203 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9204 tracepoint.h.
9205 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9206 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9207 (handle_tracepoint_general_set, handle_tracepoint_query)
9208 (tracepoint_finished_step, tracepoint_was_hit)
9209 (release_while_stepping_state_list, current_traceframe)
9210 (in_readonly_region, traceframe_read_mem)
9211 (fetch_traceframe_registers, traceframe_read_sdata)
9212 (traceframe_read_info, struct fast_tpoint_collect_status)
9213 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9214 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9215 (supply_fast_tracepoint_registers)
9216 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9217 (ipa_tdesc, claim_trampoline_space)
9218 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9219 (agent_mem_read, agent_get_trace_state_variable_value)
9220 (agent_set_trace_state_variable_value, agent_tsv_read)
9221 (agent_mem_read_string, get_raw_reg_func_addr)
9222 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9223 * tracepoint.h: ... this new file.
9224
9225 2013-09-05 Pedro Alves <palves@redhat.com>
9226
9227 * server.h (perror_with_name, error, fatal, warning, paddress)
9228 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9229 include it.
9230 * utils.h: New file.
9231
9232 2013-09-05 Pedro Alves <palves@redhat.com>
9233
9234 * server.h (remote_debug, noack_mode, transport_is_reliable)
9235 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9236 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9237 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9238 (write_enn, initialize_async_io, enable_async_io)
9239 (disable_async_io, check_remote_input_interrupt_request)
9240 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9241 (dead_thread_notify, prepare_resume_reply)
9242 (decode_address_to_semicolon, decode_address, decode_m_packet)
9243 (decode_M_packet, decode_X_packet, decode_xfer_write)
9244 (decode_search_memory_packet, unhexify, hexify)
9245 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9246 (look_up_one_symbol, relocate_instruction)
9247 (monitor_output): Move to remote-utils.h, and include it.
9248 * remote-utils.h: New file.
9249
9250 2013-09-05 Pedro Alves <palves@redhat.com>
9251
9252 * server.h (_): Delete.
9253
9254 2013-09-02 Pedro Alves <palves@redhat.com>
9255
9256 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9257 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9258 allocated.
9259 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9260
9261 2013-09-02 Pierre Muller <muller@sourceware.org>
9262
9263 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9264 or WriteProcessMemory complete successfully and handle
9265 ERROR_PARTIAL_COPY error.
9266
9267 2013-09-02 Pedro Alves <palves@redhat.com>
9268
9269 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9270 error instead of EIO.
9271
9272 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9273
9274 PR server/15604
9275 * linux-low.c: Include filestuff.h.
9276 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9277 * lynx-low.c: Include filestuff.h.
9278 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9279 * server.c: Include filestuff.h.
9280 (main): Call notice_open_fds.
9281 * spu-low.c: Include filestuff.h.
9282 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9283
9284 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9285
9286 * Makefile.in: Explain why ../target and ../nat are not
9287 listed as include file search paths.
9288 (linux-waitpid.o): New object file rule.
9289 * configure.srv (srv_native_linux_obj): New variable.
9290 Replace all occurrences of linux native object files with
9291 $srv_native_linux_obj.
9292 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9293 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9294 (linux_enable_event_reporting): Remove declaration.
9295 (my_waitpid): Moved to common/linux-waitpid.c.
9296 (linux_wait_for_event): Pass ptid when calling
9297 linux_enable_event_reporting.
9298 (linux_supports_tracefork_flag): Remove.
9299 (linux_enable_event_reporting): Likewise.
9300 (linux_tracefork_grandchild): Remove.
9301 (STACK_SIZE): Moved to common/linux-ptrace.c.
9302 (linux_tracefork_child): Remove.
9303 (linux_test_for_tracefork): Remove.
9304 (linux_look_up_symbols): Call linux_supports_traceclone.
9305 (initialize_low): Remove call to linux_test_for_tracefork.
9306 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9307 common/linux-ptrace.h.
9308 (PTRACE_TYPE_ARG4): Likewise.
9309 Include linux-ptrace.h.
9310
9311 2013-08-21 Pedro Alves <palves@redhat.com>
9312
9313 * config.in: Renegerate.
9314
9315 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9316
9317 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9318 (SFILES): Remove $(srcdir)/common/target-common.c and
9319 add $(srcdir)/target/waitstatus.c.
9320 (OBS): Remove target-common.o and add waitstatus.o.
9321 (server_h): Remove $(srcdir)/../common/target-common.h and
9322 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9323 and $(srcdir)/../target/waitstatus.h.
9324 (target-common.o): Remove.
9325 (waitstatus.o): New target object file.
9326 * target.h: Do not include target-common.h and
9327 include target/resume.h, target/wait.h and
9328 target/waitstatus.h.
9329
9330 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9331
9332 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9333 to PTRACE_TYPE_ARG3.
9334 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9335 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9336 PTRACE_TYPE_ARG4.
9337 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9338 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9339
9340 2013-07-27 Jie Zhang <jie@codesourcery.com>
9341 Daniel Jacobowitz <dan@codesourcery.com>
9342 Yao Qi <yao@codesourcery.com>
9343
9344 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9345 (mips-linux-watch.o): New rule.
9346 (mips_linux_watch_h): New variable.
9347 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9348 srv_tgtobj.
9349 * linux-mips-low.c: Include mips-linux-watch.h.
9350 (struct arch_process_info, struct arch_lwp_info): New.
9351 (update_watch_registers_callback): New function.
9352 (mips_linux_new_process, mips_linux_new_thread) New functions.
9353 (mips_linux_prepare_to_resume, mips_insert_point): New
9354 functions.
9355 (mips_remove_point, mips_stopped_by_watchpoint): New
9356 functions.
9357 (rsp_bp_type_to_target_hw_bp_type): New function.
9358 (mips_stopped_data_address): New function.
9359 (the_low_target): Add watchpoint support functions.
9360
9361 2013-07-27 Yao Qi <yao@codesourcery.com>
9362
9363 * i386-low.c: Include break-common.h.
9364 (enum target_hw_bp_type): Remove.
9365
9366 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9367
9368 * Makefile.in (SFILES): /common/target-common.c.
9369 (OBS): Add target-common.o.
9370 (server_h): Add $(srcdir)/../common/target-common.h.
9371 (target-common.o): New target.
9372 * server.c (queue_stop_reply_callback): Free
9373 status string after use.
9374 * target.c (target_waitstatus_to_string): Remove.
9375 * target.h: Include target-common.h.
9376 (resume_kind): Likewise.
9377 (target_waitkind): Likewise.
9378 (target_waitstatus): Likewise.
9379 (TARGET_WNOHANG): Likewise.
9380
9381 2013-07-04 Yao Qi <yao@codesourcery.com>
9382
9383 * Makefile.in (host_alias): Use @host_noncanonical@.
9384 (target_alias): Use @target_noncanonical@.
9385 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9386 ACX_NONCANONICAL_HOST.
9387 * configure: Regenerated.
9388
9389 Revert:
9390 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9391
9392 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9393 * configure: Rebuild.
9394 * Makefile.in (version_host, version_target): Get from configure.
9395 (version.c): Use $(version_host) and $(version_target).
9396
9397 2013-07-03 Pedro Alves <palves@redhat.com>
9398
9399 * Makefile.in (config.status): Depend on development.sh.
9400 * acinclude.m4: Include libmcheck.m4.
9401 * configure: Regenerate.
9402
9403 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9404
9405 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9406 attribute inside the parentheses.
9407 (winapi_DebugSetProcessKillOnExit): Ditto.
9408 (winapi_DebugBreakProcess): Ditto.
9409 (winapi_GenerateConsoleCtrlEvent): Ditto.
9410
9411 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9412
9413 * notif.h (notif_event): Add a dummy member to avoid compiler
9414 errors.
9415
9416 2013-07-01 Pedro Alves <palves@redhat.com>
9417
9418 * hostio.c (HOSTIO_PATH_MAX): Define.
9419 (require_filename, handle_open, handle_unlink, handle_readlink):
9420 Use it.
9421
9422 2013-07-01 Pedro Alves <palves@redhat.com>
9423
9424 * server.h: Include "pathmax.h".
9425 * linux-low.c: Don't include sys/param.h.
9426 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9427 MAXPATHLEN.
9428 * win32-low.c: Don't include sys/param.h.
9429 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9430
9431 2013-07-01 Pedro Alves <palves@redhat.com>
9432
9433 * event-loop.c: Don't check HAVE_UNISTD_H before including
9434 <unistd.h>.
9435 * gdbreplay.c: Likewise.
9436 * remote-utils.c: Likewise.
9437 * server.c: Likewise.
9438 * configure.ac: Don't check for unistd.h.
9439 * configure: Regenerate.
9440
9441 2013-06-28 Tom Tromey <tromey@redhat.com>
9442
9443 * Makefile.in (version.c): Use version.in, not
9444 common/version.in.
9445
9446 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9447
9448 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9449 * configure: Rebuild.
9450 * Makefile.in (version_host, version_target): Get from configure.
9451 (version.c): Use $(version_host) and $(version_target).
9452
9453 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9454
9455 Fix trace-status to output user name without trailing colon.
9456 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9457
9458 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9459
9460 Fix trace-status to output proper start-time and stop-time.
9461 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9462 output start time and stop time in hex as gdb expects.
9463
9464 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9465
9466 * tracepoint.c (build_traceframe_info_xml): Output trace state
9467 variables present in the trace buffer.
9468
9469 2013-06-24 Tom Tromey <tromey@redhat.com>
9470
9471 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9472 create-version.sh.
9473 (version.o): Remove.
9474 * gdbreplay.c: Include version.h.
9475 (version, host_name): Don't declare.
9476 * server.h: Include version.h.
9477 (version, host_name): Don't declare.
9478
9479 2013-06-12 Pedro Alves <palves@redhat.com>
9480
9481 * linux-x86-low.c (linux_is_elf64): Delete global.
9482 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9483 with local linux_pid_exe_is_elf_64_file use.
9484
9485 2013-06-11 Pedro Alves <palves@redhat.com>
9486
9487 * linux-low.c (regset_disabled, disable_regset): New functions.
9488 (regsets_fetch_inferior_registers)
9489 (regsets_store_inferior_registers): Use them.
9490 (initialize_regsets_info); Don't allocate the disabled_regsets
9491 array here.
9492 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9493 comment.
9494
9495 2013-06-11 Pedro Alves <palves@redhat.com>
9496
9497 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9498 xmalloc.
9499
9500 2013-06-11 Pedro Alves <palves@redhat.com>
9501
9502 * linux-x86-low.c (initialize_low_arch): Call
9503 init_registers_x32_avx_linux.
9504
9505 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9506
9507 Fix compatibility with Android Bionic.
9508 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9509 it is not empty.
9510
9511 2013-06-07 Pedro Alves <palves@redhat.com>
9512
9513 PR server/14823
9514 * Makefile.in (OBS): Add tdesc.o.
9515 (IPA_OBJS): Add tdesc-ipa.o.
9516 (tdesc-ipa.o): New rule.
9517 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9518 interface.
9519 * linux-low.c (new_inferior): Delete.
9520 (disabled_regsets, num_regsets): Delete.
9521 (linux_add_process): Adjust to set the new per-process
9522 new_inferior flag.
9523 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9524 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9525 was a stop. When calling arch_setup, switch the current inferior
9526 to the thread that got an event.
9527 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9528 (regsets_fetch_inferior_registers)
9529 (regsets_store_inferior_registers): New regsets_info parameter.
9530 Adjust to use it.
9531 (linux_register_in_regsets): New regs_info parameter. Adjust to
9532 use it.
9533 (register_addr, fetch_register, store_register): New usrregs_info
9534 parameter. Adjust to use it.
9535 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9536 parameter regs_info. Adjust to use it.
9537 (linux_fetch_registers): Get the current inferior's regs_info, and
9538 adjust to use it.
9539 (linux_store_registers): Ditto.
9540 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9541 (initialize_low): Don't initialize the target_regsets here. Call
9542 initialize_low_arch.
9543 * linux-low.h (target_regsets): Delete declaration.
9544 (struct regsets_info): New.
9545 (struct usrregs_info): New.
9546 (struct regs_info): New.
9547 (struct process_info_private) <new_inferior>: New field.
9548 (struct linux_target_ops): Delete the num_regs, regmap, and
9549 regset_bitmap fields. New field regs_info.
9550 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9551 * i387-fp.c (num_xmm_registers): Delete.
9552 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9553 calls to new interface.
9554 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9555 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9556 Infer the number of xmm registers from the regcache's target
9557 description.
9558 * i387-fp.h (num_xmm_registers): Delete.
9559 * inferiors.c (add_thread): Don't install the thread's regcache
9560 here.
9561 * proc-service.c (gregset_info): Fetch the current inferior's
9562 regs_info. Adjust to use it.
9563 * regcache.c: Include tdesc.h.
9564 (register_bytes, reg_defs, num_registers)
9565 (gdbserver_expedite_regs): Delete.
9566 (get_thread_regcache): If the thread doesn't have a regcache yet,
9567 create one, instead of aborting gdbserver.
9568 (regcache_invalidate_one): Rename to ...
9569 (regcache_invalidate_thread): ... this.
9570 (regcache_invalidate_one): New.
9571 (regcache_invalidate): Only invalidate registers of the current
9572 process.
9573 (init_register_cache): Add target_desc parameter, and use it.
9574 (new_register_cache): Ditto. Assert the target description has a
9575 non zero registers_size.
9576 (regcache_cpy): Add assertions. Adjust.
9577 (realloc_register_cache, set_register_cache): Delete.
9578 (registers_to_string, registers_from_string): Adjust.
9579 (find_register_by_name, find_regno, find_register_by_number)
9580 (register_cache_size): Add target_desc parameter, and use it.
9581 (free_register_cache_thread, free_register_cache_thread_one)
9582 (regcache_release, register_cache_size): New.
9583 (register_size): Add target_desc parameter, and use it.
9584 (register_data, supply_register, supply_register_zeroed)
9585 (supply_regblock, supply_register_by_name, collect_register)
9586 (collect_register_as_string, collect_register_by_name): Adjust.
9587 * regcache.h (struct target_desc): Forward declare.
9588 (struct regcache) <tdesc>: New field.
9589 (init_register_cache, new_register_cache): Add target_desc
9590 parameter.
9591 (regcache_invalidate_thread): Declare.
9592 (regcache_invalidate_one): Delete declaration.
9593 (regcache_release): Declare.
9594 (find_register_by_number, register_cache_size, register_size)
9595 (find_regno): Add target_desc parameter.
9596 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9597 declarations.
9598 * remote-utils.c: Include tdesc.h.
9599 (outreg, prepare_resume_reply): Adjust.
9600 * server.c: Include tdesc.h.
9601 (gdbserver_xmltarget): Delete declaration.
9602 (get_features_xml, process_serial_event): Adjust.
9603 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9604 declare.
9605 (struct process_info) <tdesc>: New field.
9606 (ipa_tdesc): Declare.
9607 * tdesc.c: New file.
9608 * tdesc.h: New file.
9609 * tracepoint.c: Include tdesc.h.
9610 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9611 (get_context_regcache): Adjust to pass ipa_tdesc down.
9612 (do_action_at_tracepoint): Adjust to get the register cache size
9613 from the context regcache's description.
9614 (traceframe_walk_blocks): Adjust to get the register cache size
9615 from the current trace frame's description.
9616 (traceframe_get_pc): Adjust to get current trace frame's
9617 description and pass it down.
9618 (gdb_collect): Adjust to get the register cache size from the
9619 IPA's description.
9620 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9621 (gdbserver_xmltarget): Delete.
9622 (initialize_low_tracepoint): Set the ipa's target description.
9623 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9624 (initialize_low_tracepoint): Set the ipa's target description.
9625 * linux-x86-low.c: Include tdesc.h.
9626 [__x86_64__] (is_64bit_tdesc): New.
9627 (ps_get_thread_area, x86_get_thread_area): Use it.
9628 (i386_cannot_store_register): Rename to ...
9629 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9630 (i386_cannot_fetch_register): Rename to ...
9631 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9632 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9633 to new interface.
9634 (target_regsets): Rename to ...
9635 (x86_regsets): ... this.
9636 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9637 interface.
9638 (x86_siginfo_fixup): Use is_64bit_tdesc.
9639 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9640 (tdesc_x32_avx_linux, tdesc_x32_linux)
9641 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9642 Declare.
9643 (x86_linux_update_xmltarget): Delete.
9644 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9645 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9646 (AMD64_LINUX_USER64_CS): New.
9647 (x86_linux_read_description): New, based on
9648 x86_linux_update_xmltarget.
9649 (same_process_callback): New.
9650 (x86_arch_setup_process_callback): New.
9651 (x86_linux_update_xmltarget): New.
9652 (x86_regsets_info): New.
9653 (amd64_linux_regs_info): New.
9654 (i386_linux_usrregs_info): New.
9655 (i386_linux_regs_info): New.
9656 (x86_linux_regs_info): New.
9657 (x86_arch_setup): Reimplement.
9658 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9659 (x86_emit_ops): Ditto.
9660 (the_low_target): Adjust. Install x86_linux_regs_info,
9661 x86_cannot_fetch_register, and x86_cannot_store_register.
9662 (initialize_low_arch): New.
9663 * linux-ia64-low.c (tdesc_ia64): Declare.
9664 (ia64_fetch_register): Adjust.
9665 (ia64_usrregs_info, regs_info): New globals.
9666 (ia64_regs_info): New function.
9667 (the_low_target): Adjust.
9668 (initialize_low_arch): New function.
9669 * linux-sparc-low.c (tdesc_sparc64): Declare.
9670 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9671 Adjust.
9672 (sparc_arch_setup): New function.
9673 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9674 (the_low_target): Adjust.
9675 (initialize_low_arch): New function.
9676 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9677 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9678 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9679 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9680 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9681 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9682 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9683 (tdesc_powerpc_isa205_vsx64l): Declare.
9684 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9685 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9686 (ppc_set_pc, ppc_get_hwcap): Adjust.
9687 (ppc_usrregs_info): Forward declare.
9688 (!__powerpc64__) ppc_regmap_adjusted: New global.
9689 (ppc_arch_setup): Adjust to the current process'es target
9690 description.
9691 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9692 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9693 (ppc_store_evrregset): Adjust.
9694 (target_regsets): Rename to ...
9695 (ppc_regsets): ... this, and make static.
9696 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9697 (ppc_regs_info): New function.
9698 (the_low_target): Adjust.
9699 (initialize_low_arch): New function.
9700 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9701 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9702 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9703 (tdesc_s390x_linux64v2): Declare.
9704 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9705 (s390_fill_gregset, s390_store_last_break): Adjust.
9706 (target_regsets): Rename to ...
9707 (s390_regsets): ... this, and make static.
9708 (s390_get_pc, s390_set_pc): Adjust.
9709 (s390_get_hwcap): New target_desc parameter, and use it.
9710 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9711 (s390_arch_setup): Adjust to set the current process'es target
9712 description. Don't adjust the regmap.
9713 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9714 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9715 (regs_info_3264): New globals.
9716 (s390_regs_info): New function.
9717 (the_low_target): Adjust.
9718 (initialize_low_arch): New function.
9719 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9720 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9721 [__mips64] (init_registers_mips_linux)
9722 (init_registers_mips_dsp_linux): Delete defines.
9723 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9724 (have_dsp): New global.
9725 (mips_read_description): New, based on mips_arch_setup.
9726 (mips_arch_setup): Reimplement.
9727 (get_usrregs_info): New function.
9728 (mips_cannot_fetch_register, mips_cannot_store_register)
9729 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9730 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9731 (target_regsets): Rename to ...
9732 (mips_regsets): ... this, and make static.
9733 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9734 (dsp_regs_info, regs_info): New globals.
9735 (mips_regs_info): New function.
9736 (the_low_target): Adjust.
9737 (initialize_low_arch): New function.
9738 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9739 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9740 Declare.
9741 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9742 (arm_read_description): New, with bits factored from
9743 arm_arch_setup.
9744 (arm_arch_setup): Reimplement.
9745 (target_regsets): Rename to ...
9746 (arm_regsets): ... this, and make static.
9747 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9748 (arm_regs_info): New function.
9749 (the_low_target): Adjust.
9750 (initialize_low_arch): New function.
9751 * linux-m68k-low.c (tdesc_m68k): Declare.
9752 (target_regsets): Rename to ...
9753 (m68k_regsets): ... this, and make static.
9754 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9755 (m68k_regs_info): New function.
9756 (m68k_arch_setup): New function.
9757 (the_low_target): Adjust.
9758 (initialize_low_arch): New function.
9759 * linux-sh-low.c (tdesc_sharch): Declare.
9760 (target_regsets): Rename to ...
9761 (sh_regsets): ... this, and make static.
9762 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9763 (sh_regs_info, sh_arch_setup): New functions.
9764 (the_low_target): Adjust.
9765 (initialize_low_arch): New function.
9766 * linux-bfin-low.c (tdesc_bfin): Declare.
9767 (bfin_arch_setup): New function.
9768 (bfin_usrregs_info, regs_info): New globals.
9769 (bfin_regs_info): New function.
9770 (the_low_target): Adjust.
9771 (initialize_low_arch): New function.
9772 * linux-cris-low.c (tdesc_cris): Declare.
9773 (cris_arch_setup): New function.
9774 (cris_usrregs_info, regs_info): New globals.
9775 (cris_regs_info): New function.
9776 (the_low_target): Adjust.
9777 (initialize_low_arch): New function.
9778 * linux-cris-low.c (tdesc_crisv32): Declare.
9779 (cris_arch_setup): New function.
9780 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9781 (cris_regs_info): New function.
9782 (the_low_target): Adjust.
9783 (initialize_low_arch): New function.
9784 * linux-m32r-low.c (tdesc_m32r): Declare.
9785 (m32r_arch_setup): New function.
9786 (m32r_usrregs_info, regs_info): New globals.
9787 (m32r_regs_info): Adjust.
9788 (initialize_low_arch): New function.
9789 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9790 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9791 (tic6x_usrregs_info): Forward declare.
9792 (tic6x_read_description): New function, based on ...
9793 (tic6x_arch_setup): ... this. Reimplement.
9794 (target_regsets): Rename to ...
9795 (tic6x_regsets): ... this, and make static.
9796 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9797 (tic6x_regs_info): New function.
9798 (the_low_target): Adjust.
9799 (initialize_low_arch): New function.
9800 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9801 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9802 (target_regsets): Rename to ...
9803 (xtensa_regsets): ... this, and make static.
9804 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9805 globals.
9806 (xtensa_arch_setup, xtensa_regs_info): New functions.
9807 (the_low_target): Adjust.
9808 (initialize_low_arch): New function.
9809 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9810 (nios2_arch_setup): Set the current process'es tdesc.
9811 (target_regsets): Rename to ...
9812 (nios2_regsets): ... this.
9813 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9814 (nios2_regs_info): New function.
9815 (the_low_target): Adjust.
9816 (initialize_low_arch): New function.
9817 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9818 (aarch64_arch_setup): Set the current process'es tdesc.
9819 (target_regsets): Rename to ...
9820 (aarch64_regsets): ... this.
9821 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9822 (aarch64_regs_info): New function.
9823 (the_low_target): Adjust.
9824 (initialize_low_arch): New function.
9825 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9826 globals.
9827 (target_regsets): Rename to ...
9828 (tile_regsets): ... this.
9829 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9830 (tile_regs_info): New function.
9831 (tile_arch_setup): Set the current process'es tdesc.
9832 (the_low_target): Adjust.
9833 (initialize_low_arch): New function.
9834 * spu-low.c (tdesc_spu): Declare.
9835 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9836 * win32-arm-low.c (tdesc_arm): Declare.
9837 (arm_arch_setup): New function.
9838 (the_low_target): Install arm_arch_setup instead of
9839 init_registers_arm.
9840 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9841 (init_windows_x86): Rename to ...
9842 (i386_arch_setup): ... this. Set `win32_tdesc'.
9843 (the_low_target): Adjust.
9844 * win32-low.c (win32_tdesc): New global.
9845 (child_add_thread): Don't create the thread cache here.
9846 (do_initial_child_stuff): Set the new process'es tdesc.
9847 * win32-low.h (struct target_desc): Forward declare.
9848 (win32_tdesc): Declare.
9849 * lynx-i386-low.c (tdesc_i386): Declare global.
9850 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9851 * lynx-low.c (lynx_tdesc): New global.
9852 (lynx_add_process): Set the new process'es tdesc.
9853 * lynx-low.h (struct target_desc): Forward declare.
9854 (lynx_tdesc): Declare global.
9855 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9856 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9857 * nto-low.c (nto_tdesc): New global.
9858 (do_attach): Set the new process'es tdesc.
9859 * nto-low.h (struct target_desc): Forward declare.
9860 (nto_tdesc): Declare.
9861 * nto-x86-low.c (tdesc_i386): Declare.
9862 (nto_x86_arch_setup): Set `nto_tdesc'.
9863
9864 2013-06-04 Gary Benson <gbenson@redhat.com>
9865
9866 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9867 to qSupported response when appropriate.
9868 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9869 with nonzero-length annex.
9870 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9871 arguments supplied in annex.
9872
9873 2013-05-31 Doug Evans <dje@google.com>
9874
9875 PR server/15594
9876 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9877 64 bits in 64-cross-32 environment.
9878
9879 2013-05-28 Pedro Alves <palves@redhat.com>
9880
9881 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9882 (aarch64-without-fpu.c): Delete rule.
9883 * configure.srv (aarch64*-*-linux*): Remove references to
9884 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9885 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9886 declaration.
9887
9888 2013-05-24 Pedro Alves <palves@redhat.com>
9889
9890 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9891 instead of strchr/decode_address. Error if the range isn't split
9892 with a ','. Don't assume there's be a ':' in the action.
9893
9894 2013-05-23 Yao Qi <yao@codesourcery.com>
9895 Pedro Alves <palves@redhat.com>
9896
9897 * linux-low.c (lwp_in_step_range): New function.
9898 (linux_wait_1): If the thread was range stepping and stopped
9899 outside the stepping range, report the stop to GDB. Otherwise,
9900 continue stepping. Add range stepping debug output.
9901 (linux_set_resume_request): Copy the step range from the resume
9902 request to the lwp.
9903 (linux_supports_range_stepping): New.
9904 (linux_target_ops) <supports_range_stepping>: Set to
9905 linux_supports_range_stepping.
9906 * linux-low.h (struct linux_target_ops)
9907 <supports_range_stepping>: New field.
9908 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9909 * linux-x86-low.c (x86_supports_range_stepping): New.
9910 (the_low_target) <supports_range_stepping>: Set to
9911 x86_supports_range_stepping.
9912 * server.c (handle_v_cont): Handle 'r' action.
9913 (handle_v_requests): Append ";r" if the target supports range
9914 stepping.
9915 * target.h (struct thread_resume) <step_range_start,
9916 step_range_end>: New fields.
9917 (struct target_ops) <supports_range_stepping>:
9918 New field.
9919 (target_supports_range_stepping): New macro.
9920
9921 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9922
9923 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9924 confusion in comment.
9925
9926 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9927
9928 * lynx-low.c (struct process_info_private): New type.
9929 (lynx_add_process): New function.
9930 (lynx_create_inferior, lynx_attach): Replace calls to
9931 add_process by calls to lynx_add_process.
9932 (lynx_resume): If PTID is null, then try using
9933 current_process()->private->last_wait_event_ptid.
9934 Add comments.
9935 (lynx_clear_inferiors): Delete. The contents of that function
9936 has been inlined in lynx_mourn;
9937 (lynx_wait_1): Save the ptid in the process's private data.
9938 (lynx_mourn): Free the process' private data. Replace call
9939 to lynx_clear_inferiors by call to clear_inferiors.
9940
9941 2013-05-17 Yao Qi <yao@codesourcery.com>
9942
9943 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9944 the right place.
9945
9946 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9947
9948 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9949 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9950 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9951 PT_TEXT_END_ADDR guards. Update comments.
9952 (linux_target_op) <read_offsets>: Conditionally define to
9953 linux_read_offsets if the target is UCLIBC and if it defines
9954 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9955
9956 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9957 Andrew Jenner <andrew@codesourcery.com>
9958
9959 * Makefile.in (SFILES): Add linux-nios2-low.c.
9960 (clean): Add action to delete nios2-linux.c.
9961 (nios2-linux.c): New rule.
9962 * configure.srv: Add nios2*-*-linux*.
9963 * linux-nios2-low.c: New.
9964
9965 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9966
9967 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9968
9969 2013-04-25 Hui Zhu <hui@codesourcery.com>
9970
9971 PR gdb/15186
9972 * ax.c (ax_printf): Add fflush.
9973
9974 2013-04-22 Tom Tromey <tromey@redhat.com>
9975
9976 * Makefile.in (SFILES): Add filestuff.c.
9977 (OBS): Add filestuff.o.
9978 (filestuff.o): New target.
9979 * config.in, configure: Rebuild.
9980 * configure.ac: Check for fdwalk, pipe2.
9981
9982 2013-04-17 Pedro Alves <palves@redhat.com>
9983
9984 * configure.ac (USE_THREAD_DB): Delete variable.
9985 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9986 Don't AC_SUBST USE_THREAD_DB.
9987 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9988 * config.in, configure: Regenerate.
9989
9990 2013-04-16 Pedro Alves <palves@redhat.com>
9991
9992 * linux-low.h (struct lwp_info) <thread_known>: Move under
9993 the USE_THREAD_DB #ifdef.
9994
9995 2013-04-16 Pedro Alves <palves@redhat.com>
9996
9997 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9998 (linux-low.o): Delete rule.
9999 * linux-low.h: Always include "gdb_thread_db.h" instead of
10000 conditionally including thread_db.h.
10001 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10002 HAVE_THREAD_DB_H.
10003
10004 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10005
10006 * Makefile.in (install-only): Fix make install regression.
10007
10008 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10009
10010 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10011 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10012 installation.
10013 * gdbserver.1: Remove.
10014
10015 2013-03-22 Pedro Alves <palves@redhat.com>
10016
10017 * linux-low.c (handle_extended_wait): Don't call
10018 linux_enable_event_reporting.
10019
10020 2013-03-15 Tony Theodore <tonyt@logyst.com>
10021
10022 PR build/9098:
10023 * Makefile.in (SHELL): Use @SHELL@.
10024
10025 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10026
10027 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10028 compiler warning.
10029
10030 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10031
10032 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10033 Remove extraneous NULL element.
10034
10035 2013-03-13 Yao Qi <yao@codesourcery.com>
10036
10037 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10038 'V' block in trace frame.
10039
10040 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10041
10042 * target.h (struct target_ops): Add btrace ops.
10043 (target_supports_btrace): New macro.
10044 (target_enable_btrace): New macro.
10045 (target_disable_btrace): New macro.
10046 (target_read_btrace): New macro.
10047 * gdbthread.h (struct thread_info): Add btrace field.
10048 * server.c: Include btrace-common.h.
10049 (handle_btrace_general_set): New function.
10050 (handle_btrace_enable): New function.
10051 (handle_btrace_disable): New function.
10052 (handle_general_set): Call handle_btrace_general_set.
10053 (handle_qxfer_btrace): New function.
10054 (struct qxfer qxfer_packets[]): Add btrace entry.
10055 * inferiors.c (remove_thread): Disable btrace.
10056 * linux-low: Include linux-btrace.h.
10057 (linux_low_enable_btrace): New function.
10058 (linux_low_read_btrace): New function.
10059 (linux_target_ops): Add btrace ops.
10060 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10061 Add srv_linux_btrace=yes.
10062 (x86_64-*-linux*): Add linux-btrace.o.
10063 Add srv_linux_btrace=yes.
10064 * configure.ac: Define HAVE_LINUX_BTRACE.
10065 * config.in: Regenerated.
10066 * configure: Regenerated.
10067
10068 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10069
10070 * server.c (handle_qxfer): Preserve error message if -3 is
10071 returned.
10072 (qxfer): Document the -3 return value.
10073
10074 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10075
10076 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10077 (linux_btrace_h): New variable.
10078 (linux-btrace.o): New rule.
10079
10080 2013-03-08 Stan Shebs <stan@codesourcery.com>
10081 Hafiz Abid Qadeer <abidh@codesourcery.com>
10082
10083 * tracepoint.c (trace_buffer_size): New global.
10084 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10085 (init_trace_buffer): Change to one-argument function. Allocate
10086 trace buffer memory.
10087 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10088 handle QTBuffer:size packet.
10089 (cmd_bigqtbuffer_size): New function.
10090 (initialize_tracepoint): Call init_trace_buffer with
10091 DEFAULT_TRACE_BUFFER_SIZE.
10092 * server.c (handle_query): Add QTBuffer:size in the
10093 supported packets.
10094
10095 2013-03-07 Yao Qi <yao@codesourcery.com>
10096
10097 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10098 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10099 of -1.
10100 (cmd_qtsp): Adjust condition. Do post increment.
10101 Set cur_action and cur_step_action back to 0.
10102
10103 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10104
10105 PR server/15236
10106 * linux-low.c (linux_write_memory): Return early success if LEN is
10107 zero.
10108
10109 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10110
10111 * configure.srv: Add x86_64-*-cygwin* as target.
10112
10113 2013-02-28 Tom Tromey <tromey@redhat.com>
10114
10115 * configure.ac: Invoke AC_SYS_LARGEFILE.
10116 * configure, config.in: Rebuild.
10117
10118 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10119
10120 * win32-low.c: Throughout, fix format strings and casts of
10121 printf-like functions to avoid type related warnings on all
10122 platforms.
10123 (get_child_debug_event): Print dwDebugEventCode as hex since
10124 that's how it's usually documented.
10125
10126 2013-02-28 Yao Qi <yao@codesourcery.com>
10127
10128 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10129 pulongest.
10130
10131 2013-02-27 Jiong Wang <jiwang@tilera.com>
10132
10133 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10134 (reg-tilegx32.c): New rule.
10135 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10136 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10137 different register info initializer according to elf class.
10138 (init_registers_tilgx32): New function. The tilegx32 register info
10139 initializer.
10140 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10141 (tile_store_gregset): Likewise.
10142
10143 2013-02-27 Yao Qi <yao@codesourcery.com>
10144
10145 * server.c (process_point_options): Print debug message when
10146 debug_threads is true.
10147
10148 2013-02-26 Yao Qi <yao@codesourcery.com>
10149
10150 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10151
10152 2013-02-19 Pedro Alves <palves@redhat.com>
10153 Kai Tietz <ktietz@redhat.com>
10154
10155 PR gdb/15161
10156
10157 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10158 instead of strtoul to extract address from packet.
10159 (process_serial_event) <'z'>: Likewise.
10160
10161 2013-02-18 Yao Qi <yao@codesourcery.com>
10162
10163 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10164
10165 2013-02-14 Pedro Alves <palves@redhat.com>
10166
10167 Plug memory leak.
10168
10169 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10170 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10171
10172 2013-02-14 Pedro Alves <palves@redhat.com>
10173
10174 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10175
10176 2013-02-14 Pedro Alves <palves@redhat.com>
10177
10178 * tracepoint.c (save_string): Delete.
10179 (add_tracepoint_action): Use savestring instead of save_string.
10180
10181 2013-02-12 Pedro Alves <palves@redhat.com>
10182
10183 * linux-xtensa-low.c: Ditto.
10184 * xtensa-xtregs.c: Ditto.
10185
10186 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10187
10188 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10189 thread_db.
10190
10191 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10192
10193 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10194 aarch64_num_wp_regs and aarch64_num_bp_regs to
10195 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10196
10197 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10198
10199 * linux-aarch64-low.c (ps_get_thread_area): Replace
10200 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10201
10202 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10203 Marcus Shawcroft <marcus.shawcroft@arm.com>
10204 Nigel Stephens <nigel.stephens@arm.com>
10205 Yufeng Zhang <yufeng.zhang@arm.com>
10206
10207 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10208 (aarch64.c, aarch64-without-fpu.c): New targets.
10209 * configure.srv (aarch64*-*-linux*): New.
10210 * linux-aarch64-low.c: New file.
10211
10212 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10213
10214 * linux-low.c (handle_extended_wait, linux_create_inferior)
10215 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10216 (dequeue_one_deferred_signal, linux_resume_one_thread)
10217 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10218 (linux_tracefork_grandchild, linux_test_for_tracefork)
10219 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10220 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10221 where the argument is 0.
10222
10223 2013-01-25 Yao Qi <yao@codesourcery.com>
10224
10225 * event-loop.c: Include "queue.h".
10226 (gdb_event_p): New typedef.
10227 (struct gdb_event) <next_event>: Remove.
10228 (event_queue): Change to QUEUE(gdb_event_p).
10229 (async_queue_event): Remove.
10230 (gdb_event_xfree): New.
10231 (initialize_event_loop): New.
10232 (process_event): Use API from QUEUE.
10233 (wait_for_event): Likewise.
10234 * server.c (main): Call initialize_event_loop.
10235 * server.h (initialize_event_loop): Declare.
10236
10237 2013-01-18 Yao Qi <yao@codesourcery.com>
10238
10239 * ax.h (struct eval_agent_expr_context): New.
10240 (gdb_eval_agent_expr): Update declaration.
10241 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10242 TFRAME. Add new argument CTX.
10243 * server.h (struct eval_agent_expr_context): Declare.
10244 (agent_mem_read, agent_tsv_read): Update declaration.
10245 (agent_mem_read_string): Likewise.
10246 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10247 (add_traceframe_block): Add new argument TPOINT.
10248 Increase TPOINT->traceframe_usage.
10249 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10250 eval_tracepoint_agent_expr.
10251 (condition_true_at_tracepoint): Likewise.
10252 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10253 (agent_mem_read_string, agent_tsv_read): Likewise.
10254
10255 2013-01-16 Yao Qi <yao@codesourcery.com>
10256
10257 * linux-low.c (linux_resume_one_lwp): Don't check
10258 'lwp->bp_reinsert != 0'.
10259
10260 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10261 Pedro Alves <palves@redhat.com>
10262
10263 * lynx-low.c (ptrace_request_to_str): Define a temporary
10264 macro and use it to simplify this function's implementation.
10265
10266 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10267
10268 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10269 sets errno.
10270
10271 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10272
10273 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10274
10275 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10276
10277 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10278
10279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10280
10281 * lynx-low.c (lynx_resume): Use the resume_info parameter
10282 to determine the ptid for the lynx_ptrace call, unless
10283 it is equal to minus_one_ptid, in which case we use the
10284 ptid of the current_inferior.
10285 (lynx_wait_1): After having received a thread create/exit
10286 event, resume the inferior's execution using the signaling
10287 thread's ptid, rather than the old ptid.
10288
10289 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10290
10291 * lynx-low.c (lynx_resume): Delete variable ret.
10292
10293 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10294
10295 * gdbreplay.c (gdbreplay_version): Update copyright year.
10296 * server.c (gdbserver_version): Likewise.
10297
10298 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10299
10300 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10301 new thread.
10302
10303 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10304
10305 * lynx-low.c (ptrace_request_to_str): Add handling for
10306 PTRACE_GETTRACESIG.
10307
10308 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10309
10310 * lynx-low.c (lynx_attach): Delete variable new_process.
10311
10312 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10313
10314 * lynx-low.c (lynx_create_inferior): Delete variable
10315 new_process.
10316
10317 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10318
10319 * lynx-low.c (ptrace_request_to_str): Do not handle
10320 PTRACE_GETTHREADLIST if this macro does not exist.
10321
10322 2012-12-15 Yao Qi <yao@codesourcery.com>
10323
10324 * Makefile.in (OBS): Add notif.o.
10325 * notif.c, notif.h: New.
10326 * server.c: Include "notif.h".
10327 (struct vstop_notif) <next>: Remove.
10328 <base>: New field.
10329 (queue_stop_reply): Update.
10330 (push_event, send_next_stop_reply): Remove.
10331 (discard_queued_stop_replies): Update.
10332 (notif_stop): New variable.
10333 (handle_v_stopped): Remove.
10334 (handle_v_requests): Don't call handle_v_stopped. Call
10335 handle_ack_notif instead.
10336 (queue_stop_reply_callback): Call notif_event_enque instead
10337 of queue_stop_reply.
10338 (handle_status): Don't call send_next_stop_reply, call
10339 notif_write_event instead.
10340 (kill_inferior_callback): Likewise.
10341 (detach_or_kill_inferior_callback): Likewise.
10342 (main): Call initialize_notif.
10343 (process_serial_event): Call QUEUE_is_empty.
10344 (handle_target_event): Call notif_push instead of push event.
10345 * server.h (push_event): Remove declaration.
10346
10347 2012-12-10 Tom Tromey <tromey@redhat.com>
10348
10349 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10350 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10351 macros.
10352 (.c.o): Rewrite.
10353 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10354 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10355 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10356 (amd64-linux-ipa.o, ax.o): Rewrite.
10357 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10358 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10359 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10360 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10361 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10362 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10363 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10364 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10365 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10366 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10367 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10368 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10369 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10370 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10371 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10372 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10373 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10374 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10375 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10376 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10377 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10378 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10379 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10380 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10381 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10382 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10383 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10384 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10385 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10386 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10387 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10388 (reg-tilegx.o): Remove.
10389 (all_object_files): New macro.
10390 Include .deps files.
10391 * aclocal.m4, configure: Rebuild.
10392 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10393 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10394 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10395
10396 2012-12-05 Tom Tromey <tromey@redhat.com>
10397
10398 PR gdb/14917:
10399 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10400
10401 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10402
10403 * configure.ac: Check for linux/perf_event.h.
10404 * config.in: Regenerated.
10405 * configure: Regenerated.
10406
10407 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10408
10409 * hostio.c (handle_readlink): Decrease buffer size
10410 parameter passed to readlink by one byte.
10411
10412 2012-11-26 Yao Qi <yao@codesourcery.com>
10413
10414 * configure.ac (build_warnings): Append '-Wempty-body'.
10415 * configure: Regenerated.
10416 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10417 body.
10418
10419 2012-11-15 Pierre Muller <muller@sourceware.org>
10420
10421 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10422 * config.in: Regenerate.
10423 * configure: Regenerate.
10424 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10425 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10426 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10427 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10428 header.
10429 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10430 instead of <sys/wait.h> header.
10431 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10432
10433 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10434
10435 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10436 (various make rules): Remove -DGDBSERVER
10437
10438 2012-11-09 Yao Qi <yao@codesourcery.com>
10439
10440 * spu-low.c (current_ptid): Move it to ..
10441 * gdbthread.h: ... here. New.
10442 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10443 * server.c (myresume, process_serial_event): Likewise.
10444 * thread-db.c (thread_db_find_new_threads): Likewise.
10445 * tracepoint.c (run_inferior_command): Likewise.
10446
10447 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10448
10449 * server.c (handle_search_memory_1): Include access length in
10450 warning message.
10451
10452 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10453
10454 * linux-crisv32-low.c: Fix compile errors.
10455
10456 2012-09-04 Yao Qi <yao@codesourcery.com>
10457
10458 * tracepoint.c (cmd_qtsv): Adjust debug message.
10459 Don't check CUR_TPOINT.
10460
10461 2012-08-28 Yao Qi <yao@codesourcery.com>
10462
10463 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10464 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10465 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10466 Remove declarations of xmalloc, xreallloc, xstrdup and
10467 freeargv.
10468 * Makefile.in (libiberty_h): New.
10469 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10470 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10471
10472 2012-08-23 Yao Qi <yao@codesourcery.com>
10473
10474 * server.h: Remove declaration of 'xsnprintf'.
10475
10476 2012-08-22 Keith Seitz <keiths@redhat.com>
10477
10478 * server.h: Include build-gnulib-gbserver/config.h.
10479 * gdbreplay.c: Likewise.
10480
10481 2012-08-08 Doug Evans <dje@google.com>
10482
10483 * Makefile.in (SFILES): Add gdb_vecs.c.
10484 (OBS): Add gdb_vecs.o.
10485 (gdb_vecs_h, host_defs_h): New variables.
10486 (thread-db.o): Add $(gdb_vecs_h) dependency.
10487 (gdb_vecs.o): New rule.
10488 * thread-db.c: #include "gdb_vecs.h".
10489 (thread_db_load_search): Use a vector to iterate over path elements.
10490 Handle text appearing after "$pdir".
10491
10492 * configure.ac: Add check for strstr.
10493 * config.in: Regenerate.
10494 * configure: Regenerate.
10495
10496 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10497
10498 * hostio.c (handle_pread): If pread fails, fall back to attempting
10499 lseek/read.
10500 (handle_pwrite): Likewise for pwrite.
10501
10502 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10503
10504 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10505 between unsupported TYPE and unimplementable ADDR/LEN combination.
10506 (arm_insert_point): Act on new return value.
10507
10508 2012-07-31 Pedro Alves <palves@redhat.com>
10509
10510 * server.c (process_point_options): Only skip tokens if we find
10511 one that is unrecognized. Don't treat 'X' specially while
10512 skipping unrecognized tokens.
10513
10514 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10515
10516 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10517 to 4-byte-align HW breakpoint addresses for Thumb.
10518
10519 2012-07-27 Yao Qi <yao@codesourcery.com>
10520
10521 PR remote/14161.
10522
10523 * server.h: Declare gdb_agent_about_to_close.
10524 * target.c (kill_inferior): Include "agent.h".
10525 New. Send command 'kill'.
10526 * target.h (kill_inferior): Removed macro.
10527 * tracepoint.c (gdb_agent_about_to_close): New.
10528 (gdb_agent_helper_thread): Handle command 'close'.
10529 Wait endlessly until the inferior stops.
10530 Install gdb_agent_remove_socket to atexit hook.
10531 (agent_socket_name): New static variable.
10532 (gdb_agent_socket_init): Replace local variable 'name' with
10533 'agent_socket_name'.
10534 (gdb_agent_remove_socket): New.
10535
10536 2012-07-27 Yao Qi <yao@codesourcery.com>
10537
10538 * server.c (process_point_options): Stop at 'X' when parsing.
10539
10540 2012-07-19 Michael Eager <eager@eagercon.com>
10541
10542 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10543 to hw_execute.
10544 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10545 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10546 hardware breakpoint.
10547
10548 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10549
10550 * gdbserver/linux-low.c (initialize_low): Call
10551 linux_ptrace_init_warnings.
10552
10553 2012-07-02 Doug Evans <dje@google.com>
10554
10555 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10556 pointer to int.
10557
10558 2012-07-02 Stan Shebs <stan@codesourcery.com>
10559
10560 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10561 (ax.o): Add it to build rule.
10562 (ax-ipa.o): Ditto.
10563 (OBS): Add format.o.
10564 (IPA_OBS): Add format.o.
10565 * server.c (handle_query): Claim support for breakpoint commands.
10566 (process_point_options): Add command case.
10567 (process_serial_event): Leave running if there are printfs in
10568 effect.
10569 * mem-break.h (any_persistent_commands): Declare.
10570 (add_breakpoint_commands): Declare.
10571 (gdb_no_commands_at_breakpoint): Declare.
10572 (run_breakpoint_commands): Declare.
10573 * mem-break.c (struct point_command_list): New struct.
10574 (struct breakpoint): New field command_list.
10575 (any_persistent_commands): New function.
10576 (add_commands_to_breakpoint): New function.
10577 (add_breakpoint_commands): New function.
10578 (gdb_no_commands_at_breakpoint): New function.
10579 (run_breakpoint_commands): New function.
10580 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10581 locally.
10582 * ax.c: Include format.h.
10583 (ax_printf): New function.
10584 (gdb_eval_agent_expr): Add printf opcode.
10585
10586 2012-06-13 Yao Qi <yao@codesourcery.com>
10587
10588 * server.c (start_inferior): Remove duplicated writes to fields
10589 'last_resume_kind' and 'last_status' of 'current_inferior'.
10590
10591 2012-06-12 Yao Qi <yao@codesourcery.com>
10592 Pedro Alves <palves@redhat.com>
10593
10594 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10595 comment.
10596 * server.c (handle_v_cont): Extend comment.
10597
10598 2012-06-11 Yao Qi <yao@codesourcery.com>
10599
10600 * linux-low.c (linux_attach): Add 'static'.
10601
10602 2012-06-06 Yao Qi <yao@codesourcery.com>
10603
10604 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10605
10606 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10607
10608 Fix gcc -flto compilation warning.
10609 * server.c (main): Make variable multi_mode and attach volatile.
10610
10611 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10612
10613 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10614 if the platform doesn't know about it.
10615
10616 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10617
10618 * Makefile.in (SFILES): Add linux-tile-low.c.
10619 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10620 * configure.srv: Handle tilegx-*-linux*.
10621 * linux-tile-low.c: New file.
10622
10623 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10624
10625 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10626
10627 2012-05-24 Pedro Alves <palves@redhat.com>
10628
10629 PR gdb/7205
10630
10631 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10632
10633 2012-05-24 Pedro Alves <palves@redhat.com>
10634
10635 PR gdb/7205
10636
10637 Replace target_signal with gdb_signal throughout.
10638
10639 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10640
10641 * linux-low.c (linux_store_registers): Avoid the copying sequence
10642 when no data has been retrieved by ptrace.
10643
10644 2012-05-22 Will Deacon <will.deacon@arm.com>
10645
10646 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10647 Include asm/ptrace.h.
10648 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10649 already defined.
10650
10651 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10652
10653 * linux-low.c (linux_store_registers): Don't re-retrieve data
10654 with ptrace that has already been obtained from /proc. Always
10655 copy any data retrieved with ptrace to the buffer supplied.
10656
10657 2012-05-11 Yao Qi <yao@codesourcery.com>
10658 Pedro Alves <palves@redhat.com>
10659
10660 * linux-low.c (enum stopping_threads_kind): New.
10661 (stopping_threads): Change type to `enum stopping_threads_kind'.
10662 (handle_extended_wait): If stopping and suspending threads, leave
10663 the new_lwp suspended too.
10664 (linux_wait_for_event): Adjust.
10665 (stop_all_lwps): Set `stopping_threads' to
10666 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10667 whether we're suspending threads or just stopping them. Assert no
10668 recursion happens.
10669
10670 2012-04-29 Yao Qi <yao@codesourcery.com>
10671
10672 * server.h: Move some code to ...
10673 * gdbthread.h: ... here. New.
10674 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10675 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10676 (nto-low.o, win32-low.o): Likewise.
10677 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10678 * regcache.c, remote-utils.c, server.c: Likewise.
10679 * target.c, tracepoint.c, win32-low.c: Likewise.
10680
10681 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10682
10683 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10684 (PTRACE_ARG4_TYPE): Likewise.
10685 (PTRACE_XFER_TYPE): Likewise.
10686 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10687 ptrace to PTRACE_ARG3_TYPE.
10688 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10689 (PTRACE_ARG4_TYPE): Likewise.
10690 (PTRACE_XFER_TYPE): Likewise.
10691 (linux_detach_one_lwp): Cast fourth argument of
10692 ptrace to long then PTRACE_ARG4_TYPE.
10693 (regsets_fetch_inferior_registers): Cast third argument of
10694 ptrace to long then PTRACE_ARG3_TYPE.
10695 (regsets_store_inferior_registers): Likewise.
10696
10697 2012-04-20 Pedro Alves <palves@redhat.com>
10698
10699 * configure: Regenerate.
10700
10701 2012-04-19 Pedro Alves <palves@redhat.com>
10702
10703 * Makefile.in (GNULIB_BUILDDIR): New.
10704 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10705 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10706 (all, install-only, uninstall, clean-info, all-lib, clean): No
10707 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10708 (maintainer-clean realclean distclean): Use subdir_do.
10709 (subdir_do): New.
10710 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10711 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10712 * acinclude.m4: Include acx_configure_dir.m4.
10713 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10714 calls. Call AC_PROG_RANLIB. Configure gnulib using
10715 ACX_CONFIGURE_DIR.
10716 (GNULIB): New.
10717 (GNULIB_STDINT_H): Adjust.
10718 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10719 * gdbreplay.c: Include build-gnulib/config.h.
10720 * server.h: Likewise.
10721 * aclocal.m4: Regenerate.
10722 * config.in: Regenerate.
10723 * configure: Regenerate.
10724
10725 2012-04-19 Pedro Alves <palves@redhat.com>
10726
10727 * Makefile.in (LIBGNU, INCGNU): Adjust.
10728 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10729 (all, install-only, uninstall, clean-info, all-lib, clean)
10730 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10731 * configure.ac: Adjust AC_OUTPUT output.
10732 * aclocal.m4: Regenerate.
10733 * configure: Regenerate.
10734
10735 2012-04-19 Pedro Alves <palves@redhat.com>
10736
10737 * Makefile.in (generated_files): New.
10738 (server_h): Remove the explicit dependency on config.h, and depend
10739 on $generated_files.
10740
10741 2012-04-19 Pedro Alves <palves@redhat.com>
10742
10743 * Makefile.in (INCGNU): Add -Ignulib.
10744
10745 2012-04-19 Pedro Alves <palves@redhat.com>
10746
10747 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10748 (INCGNU): ... this, and spell out -I here.
10749 (GNULIB_LIB): Rename to ...
10750 (LIBGNU): ... this.
10751 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10752
10753 2012-04-19 Pedro Alves <palves@redhat.com>
10754
10755 * config.in: Regenerate.
10756
10757 2012-04-19 Pedro Alves <palves@redhat.com>
10758
10759 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10760 * server.h (memmem): Remove declaration.
10761 * config.in: Regenerate.
10762 * configure: Regenerate.
10763
10764 2012-04-19 Yao Qi <yao@codesourcery.com>
10765
10766 * Makefile.in (SFILES): Add common/vec.c.
10767 (OBS): Add vec.o.
10768 (vec.o): New rule.
10769
10770 2012-04-19 Yao Qi <yao@codesourcery.com>
10771
10772 * remote-utils.c (prepare_resume_reply): Replace with macro
10773 target_core_of_thread.
10774 * server.c (handle_qxfer_threads_proper): Likewise.
10775 * target.h (traget_core_of_thread): New macro.
10776
10777 2012-04-18 Pedro Alves <palves@redhat.com>
10778
10779 * aclocal.m4: Regenerate.
10780 * configure: Regenerate.
10781
10782 2012-04-16 Yao Qi <yao@codesourcery.com>
10783
10784 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10785 duplicated on address.
10786
10787 2012-04-16 Yao Qi <yao@codesourcery.com>
10788
10789 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10790 (struct tracepoint_action_ops) <send>: New field.
10791 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10792 (agent_expr_send, x_tracepoint_action_send): New.
10793 (l_tracepoint_action_send): New.
10794 (cmd_qtdp): Download and install tracepoint
10795 according to `use_agent'.
10796 (run_inferior_command): Add one more parameter `len'.
10797 Update callers.
10798 (tracepoint_send_agent): New.
10799 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10800
10801 2012-04-16 Yao Qi <yao@codesourcery.com>
10802
10803 * tracepoint.c (download_tracepoints): Moved to ...
10804 (cmd_qtstart): ... here.
10805
10806 2012-04-14 Yao Qi <yao@codesourcery.com>
10807
10808 * tracepoint.c: Include inttypes.h.
10809 (struct collect_memory_action): Use sized types.
10810 (struct tracepoint): Likewise.
10811 (cmd_qtdp, stop_tracing): Update print specifiers.
10812 (cmd_qtp, response_tracepoint): Likewise.
10813 (collect_data_at_tracepoint): Likewise.
10814 (collect_data_at_step): Likewise.
10815
10816 2012-04-14 Yao Qi <yao@codesourcery.com>
10817
10818 Import gnulib module inttypes.
10819 * aclocal.m4, config.in, configure: Regenerated.
10820
10821 2012-04-14 Yao Qi <yao@codesourcery.com>
10822
10823 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10824 Makefile and config.status at last.
10825
10826 2012-04-13 Yao Qi <yao@codesourcery.com>
10827
10828 * tracepoint.c: Include stdint.h unconditionally.
10829
10830 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10831
10832 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10833 on BFD_HAVE_SYS_PROCFS_TYPE.
10834 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10835 * configure: Regenerate.
10836 * config.in: Likewise.
10837
10838 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10839
10840 * Makefile.in (clean): Also remove x32.c x32-linux.c
10841 x32-avx.c x32-avx-linux.c.
10842 (x32.o): New target.
10843 (x32.c): Likewise.
10844 (x32-linux.o): Likewise.
10845 (x32-linux.c): Likewise.
10846 (x32-avx.o): Likewise.
10847 (x32-avx.c): Likewise.
10848 (x32-avx-linux.o): Likewise.
10849 (x32-avx-linux.c): Likewise.
10850
10851 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10852 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10853 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10854 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10855 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10856 i386/x32-avx-linux.xml.
10857
10858 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10859 (init_registers_x32_avx_linux): Likwise.
10860 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10861 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10862
10863 2012-04-13 Pedro Alves <palves@redhat.com>
10864
10865 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10866 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10867 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10868 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10869 the sub-make.
10870
10871 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10872
10873 * linux-x86-low.c (compat_x32_clock_t): New.
10874 (compat_x32_siginfo_t): Likewise.
10875 (compat_x32_siginfo_from_siginfo): Likewise.
10876 (siginfo_from_compat_x32_siginfo): Likewise.
10877 (linux_is_elf64): Likewise.
10878 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10879 and siginfo_from_compat_x32_siginfo for x32.
10880 (x86_arch_setup): Set linux_is_elf64.
10881
10882 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10883
10884 PR gdb/13969
10885 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10886 e_machine field.
10887 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10888 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10889 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10890 compatible with process.
10891
10892 2012-04-12 Yao Qi <yao@codesourcery.com>
10893
10894 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10895 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10896 (install-only, install-info, clean): Handle sub dir gnulib.
10897 (all-lib, am--refresh): New targets.
10898 (memmem.o): Remove target.
10899 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10900 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10901 (AC_REPLACE_FUNCS): Remove memmem.
10902 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10903 (AC_OUTPUT): Generate Makefile in gnulib/.
10904 * aclocal.m4, config.in, configure: Regenerated.
10905
10906 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10907
10908 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10909
10910 2012-04-05 Pedro Alves <palves@redhat.com>
10911
10912 -Werror=strict-aliasing
10913
10914 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10915 pointer.
10916
10917 2012-04-04 Pedro Alves <palves@redhat.com>
10918
10919 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10920 (sparc_store_gregset_from_stack, sparc_store_gregset)
10921 (sparc_breakpoint_at): Fix formatting.
10922
10923 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10924
10925 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10926 are available.
10927 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10928 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10929 * config.in: Regenerate.
10930 * configure: Likewise.
10931
10932 2012-03-29 Pedro Alves <palves@redhat.com>
10933
10934 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10935 Correct ptrace arguments.
10936
10937 2012-03-28 Pedro Alves <palves@redhat.com>
10938
10939 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10940 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10941 (IA64_FR1_REGNUM): New defines.
10942 (ia64_fetch_register): New.
10943 (the_low_target): Install it.
10944 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10945 field.
10946 * linux-low.c (linux_fetch_registers): Try the
10947 the_low_target.fetch_register hook first.
10948
10949 * linux-arm-low.c (the_low_target): Adjust.
10950 * linux-bfin-low.c (the_low_target): Adjust.
10951 * linux-cris-low.c (the_low_target): Adjust.
10952 * linux-crisv32-low.c (the_low_target): Adjust.
10953 * linux-m32r-low.c (the_low_target): Adjust.
10954 * linux-m68k-low.c (the_low_target): Adjust.
10955 * linux-mips-low.c (the_low_target): Adjust.
10956 * linux-ppc-low.c (the_low_target): Adjust.
10957 * linux-s390-low.c (the_low_target): Adjust.
10958 * linux-sh-low.c (the_low_target): Adjust.
10959 * linux-sparc-low.c (the_low_target): Adjust.
10960 * linux-tic6x-low.c (the_low_target): Adjust.
10961 * linux-x86-low.c (the_low_target): Adjust.
10962 * linux-xtensa-low.c (the_low_target): Adjust.
10963
10964 2012-03-26 Pedro Alves <palves@redhat.com>
10965
10966 * server.c (handle_qxfer_libraries): Don't bail early if
10967 the_target->qxfer_libraries_svr4 is not NULL.
10968
10969 2012-03-26 Pedro Alves <palves@redhat.com>
10970
10971 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10972
10973 2012-03-23 Pedro Alves <palves@redhat.com>
10974
10975 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10976 "library-list-svr4" element's start tag when the the DSO list is
10977 empty.
10978
10979 2012-03-23 Pedro Alves <palves@redhat.com>
10980
10981 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10982 a variable whose type size is the same as the inferior's pointer
10983 size.
10984
10985 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10986
10987 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10988 struct siginfo.
10989 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10990 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10991 * linux-low.h: Include <signal.h>.
10992 (struct siginfo): Remove forward declaration.
10993 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10994 struct siginfo.
10995
10996 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10997
10998 * .gitignore: Ignore more files.
10999
11000 2012-03-19 Pedro Alves <palves@redhat.com>
11001 Jan Kratochvil <jan.kratochvil@redhat.com>
11002
11003 * server.c (cont_thread, general_thread): Add describing comments.
11004 (start_inferior): Clear `cont_thread'.
11005 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11006 of a process.
11007
11008 2012-03-15 Yao Qi <yao@codesourcery.com>
11009
11010 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11011 handling to ...
11012 (cmd_qtdp): ... here.
11013
11014 2012-03-15 Yao Qi <yao@codesourcery.com>
11015
11016 * tracepoint.c (struct tracepoint_action_ops): New.
11017 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11018 (m_tracepoint_action_download): New.
11019 (r_tracepoint_action_download): New.
11020 (x_tracepoint_action_download): New.
11021 (l_tracepoint_action_download): New.
11022 (add_tracepoint_action): Install `action->ops' according type.
11023 (download_tracepoint_1): Move code `download' function pointer
11024 of various tracepoint_action_ops.
11025
11026 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11027
11028 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11029 linux_ptrace_attach_warnings.
11030
11031 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11032
11033 * Makefile.in (linux-ptrace.o): New.
11034 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11035 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11036 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11037 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11038 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11039 of these targets.
11040 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11041
11042 2012-03-08 Yao Qi <yao@codesourcery.com>
11043 Pedro Alves <palves@redhat.com>
11044
11045 Fix PR server/13392.
11046 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11047 offset of JMP insn.
11048 * tracepoint.c (remove_tracepoint): New.
11049 (cmd_qtdp): Call remove_tracepoint when failed to install.
11050
11051 2012-03-07 Pedro Alves <palves@redhat.com>
11052
11053 * linux-low.c (get_detach_signal): New.
11054 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11055 Pass on pending signals to PTRACE_DETACH. Check the result of the
11056 ptrace call.
11057 * server.c (program_signals, program_signals_p): New.
11058 (handle_general_set): Handle QProgramSignals.
11059 * server.h (program_signals, program_signals_p): Declare.
11060
11061 2012-03-05 Pedro Alves <palves@redhat.com>
11062 Jan Kratochvil <jan.kratochvil@redhat.com>
11063
11064 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11065 New comment why.
11066
11067 2012-03-03 Yao Qi <yao@codesourcery.com>
11068
11069 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11070 agent_look_up_symbols.
11071
11072 2012-03-03 Yao Qi <yao@codesourcery.com>
11073
11074 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11075 (linux-x86-low.o): Likewise.
11076 * server.h: Remove in_process_agent_loaded.
11077 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11078 common/agent.c.
11079 Update callers.
11080
11081 2012-03-03 Yao Qi <yao@codesourcery.com>
11082
11083 * tracepoint.c (gdb_agent_capability): New global.
11084 (in_process_agent_loaded_ust): Renamed to
11085 `in_process_agent_supports_ust'.
11086 Update callers.
11087 (in_process_agent_supports_ust): Call agent_capability_check.
11088 (clear_installed_tracepoints): Assert that agent supports
11089 agent.
11090
11091 2012-03-03 Yao Qi <yao@codesourcery.com>
11092
11093 * linux-low.c (linux_supports_agent): New.
11094 (linux_target_ops): Initialize field `supports_agent' with
11095 linux_supports_agent.
11096 * target.h (struct target_ops) <supports_agent>: New.
11097 (target_supports_agent): New macro.
11098 * server.c (handle_general_set): Handle packet 'QAgent'.
11099 (handle_query): Send `QAgent+'.
11100 * Makefile.in (server.o): Depends on agent.h.
11101
11102 2012-03-03 Yao Qi <yao@codesourcery.com>
11103
11104 * Makefile.in (OBS): Add agent.o.
11105 Add new rule for agent.o.
11106 Track dependence of tracepoint.c on agent.h.
11107 * tracepoint.c (run_inferior_command_1):
11108 (run_inferior_command): Call agent_run_command.
11109 (gdb_ust_connect_sync_socket): Deleted. Move it to
11110 common/agent.c.
11111 (resume_thread, stop_thread): Likewise.
11112 (gdb_ust_socket_init): Renamed to ...
11113 (gdb_agent_socket_init): ... New.
11114 (gdb_ust_thread): Renamed to ...
11115 (gdb_agent_helper_thread): ... New.
11116 (gdb_ust_init): Move some code to ...
11117 (gdb_agent_init): ... here. New.
11118 [HAVE_UST]: Call gdb_ust_init.
11119 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11120 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11121 * config.in, configure: Regenerated.
11122
11123 2012-03-02 Pedro Alves <palves@redhat.com>
11124
11125 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11126 * linux-low.c (struct simple_pid_list): New.
11127 (stopped_pids): New a struct simple_pid_list pointer.
11128 (add_to_pid_list, pull_pid_from_list): New.
11129 (handle_extended_wait): Don't assume the first signal new children
11130 report is SIGSTOP. Adjust call to pull_pid_from_list.
11131 (linux_wait_for_lwp): Adjust.
11132
11133 2012-03-02 Yao Qi <yao@codesourcery.com>
11134
11135 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11136 debug log.
11137
11138 2012-03-02 Yao Qi <yao@codesourcery.com>
11139
11140 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11141 `stop_pc' and `tpoint'. Update caller.
11142
11143 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11144
11145 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11146 * linux-low.c (use_linux_regsets): New macro.
11147 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11148 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11149 (linux_register_in_regsets): New function.
11150 (usr_fetch_inferior_registers): Skip registers covered by
11151 regsets.
11152 (usr_store_inferior_registers): Likewise.
11153 (usr_fetch_inferior_registers): New macro.
11154 (usr_store_inferior_registers): Likewise.
11155 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11156 (linux_store_registers): Likewise.
11157 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11158 prototype.
11159 (init_registers_mips64_dsp_linux): Likewise.
11160 (init_registers_mips_linux): New macro.
11161 (init_registers_mips_dsp_linux): Likewise.
11162 (mips_dsp_num_regs): Likewise.
11163 (DSP_BASE, DSP_CONTROL): New fallback macros.
11164 (mips_base_regs): New macro.
11165 (mips_regmap): Use it. Fix the size.
11166 (mips_dsp_regmap): New variable.
11167 (mips_dsp_regset_bitmap): Likewise.
11168 (mips_arch_setup): New function.
11169 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11170 than mips_regmap.
11171 (mips_cannot_store_register): Likewise.
11172 (the_low_target): Update .arch_setup, .num_regs and .regmap
11173 initializers. Add .regset_bitmap initializer.
11174 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11175 initializer.
11176 * linux-bfin-low.c (the_low_target): Likewise.
11177 * linux-cris-low.c (the_low_target): Likewise.
11178 * linux-crisv32-low.c (the_low_target): Likewise.
11179 * linux-ia64-low.c (the_low_target): Likewise.
11180 * linux-m32r-low.c (the_low_target): Likewise.
11181 * linux-m68k-low.c (the_low_target): Likewise.
11182 * linux-ppc-low.c (the_low_target): Likewise.
11183 * linux-s390-low.c (the_low_target): Likewise.
11184 * linux-sh-low.c (the_low_target): Likewise.
11185 * linux-sparc-low.c (the_low_target): Likewise.
11186 * linux-tic6x-low.c (the_low_target): Likewise.
11187 * linux-x86-low.c (the_low_target): Likewise.
11188 * linux-xtensa-low.c (the_low_target): Likewise.
11189 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11190 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11191 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11192 srv_xmlfiles.
11193 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11194 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11195
11196 2012-02-29 Yao Qi <yao@codesourcery.com>
11197 Pedro Alves <palves@redhat.com>
11198
11199 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11200 `step_over_finished' is true.
11201
11202 2012-02-27 Pedro Alves <palves@redhat.com>
11203
11204 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11205 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11206
11207 2012-02-27 Pedro Alves <palves@redhat.com>
11208
11209 PR server/9684
11210 * linux-low.c (pid_is_stopped): New.
11211 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11212
11213 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11214
11215 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11216 of conditions.
11217
11218 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11219
11220 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11221
11222 2012-02-24 Luis Machado <lgustavo@codesourcery>
11223
11224 * server.c (handle_query): Advertise support for target-side
11225 breakpoint condition evaluation.
11226 (process_point_options): New function.
11227 (process_serial_event): When inserting a breakpoint, check for
11228 a target-side condition that should be evaluated.
11229
11230 * mem-break.c: Include regcache.h and ax.h.
11231 (point_cond_list_t): New data structure.
11232 (breakpoint) <cond_list>: New field.
11233 (find_gdb_breakpoint_at): Make non-static.
11234 (delete_gdb_breakpoint_at): Clear any target-side
11235 conditions.
11236 (clear_gdb_breakpoint_conditions): New function.
11237 (add_condition_to_breakpoint): Likewise.
11238 (add_breakpoint_condition): Likewise.
11239 (gdb_condition_true_at_breakpoint): Likewise.
11240 (gdb_breakpoint_here): Return result directly instead
11241 of going through a local variable.
11242
11243 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11244 (clear_gdb_breakpoint_conditions): Likewise.
11245 (add_breakpoint_condition): Likewise.
11246 (gdb_condition_true_at_breakpoint): Likewise.
11247
11248 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11249 (need_step_over_p): Take target-side breakpoint condition into
11250 consideration.
11251
11252 2012-02-24 Luis Machado <lgustavo@codesourcery>
11253
11254 * server.h: Include tracepoint.h.
11255 (agent_mem_read, agent_get_trace_state_variable_value,
11256 agent_set_trace_state_variable_value,
11257 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11258 get_set_tsv_func_addr): New prototypes.
11259
11260 * ax.h: New include file.
11261 * ax.c: New source file.
11262
11263 * tracepoint.c: Include ax.h.
11264 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11265 agent_expr, eval_result_type): Move to ax.h.
11266 (parse_agent_expr): Rename to ...
11267 (gdb_parse_agent_expr): ... this, make it non-static and move
11268 to ax.h.
11269 (unparse_agent_expr) Rename to ...
11270 (gdb_unparse_agent_expr): ... this, make it non-static and move
11271 to ax.h.
11272 (eval_agent_expr): Rename to ...
11273 (eval_tracepoint_agent_expr): ... this.
11274 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11275 forward declarations.
11276 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11277 (agent_get_trace_state_variable_value): New function.
11278 (agent_set_trace_state_variable_value): New function.
11279 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11280 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11281 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11282 (condition_true_at_tracepoint): Likewise.
11283 (parse_agent_expr): Rename to ...
11284 (gdb_parse_agent_expr): ... this and move to ax.c.
11285 (unparse_agent_expr): Rename to ...
11286 (gdb_unparse_agent_expr): ... this and move to ax.c.
11287 (gdb_agent_op_name): Move to ax.c.
11288 (eval_agent_expr): Rename to ...
11289 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11290 and move to ax.c.
11291 (eval_tracepoint_agent_expr): New function.
11292 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11293 non-static.
11294 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11295 ax.c.
11296 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11297 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11298 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11299 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11300 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11301 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11302 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11303 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11304 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11305 (compile_bytecodes): Remove forward declaration.
11306 (is_goto_target): Move to ax.c.
11307 (compile_bytecodes): Move to ax.c and call
11308 agent_get_trace_state_variable_value (...) and
11309 agent_set_trace_state_variable_value (...).
11310
11311 * Makefile.in: Update ax.c and IPA dependencies.
11312
11313 2012-02-24 Pedro Alves <palves@redhat.com>
11314
11315 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11316 (cmd_bigqtbuffer_circular): ... this. Only handle
11317 'QTBuffer:circular:'.
11318 (handle_tracepoint_general_set): Adjust.
11319
11320 2012-02-16 Yao Qi <yao@codesourcery.com>
11321
11322 * inferiors.c: Move code to ...
11323 * dll.c: .... here. New.
11324 * server.h: Declare clear_dlls.
11325 * Makefile.in (SFILES): Add dll.c.
11326 (OBS): Add dll.o
11327 (dll.o): New rule.
11328
11329 2012-02-11 Yao Qi <yao@codesourcery.com>
11330
11331 * server.c: (handle_monitor_command): Add a new parameter
11332 `own_buf'.
11333 (handle_query): Update caller.
11334
11335 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11336
11337 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11338 * configure, config.in: Regenerate.
11339 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11340 is not defined.
11341
11342 2012-02-02 Pedro Alves <palves@redhat.com>
11343
11344 Try SIGKILL first, then PTRACE_KILL.
11345 * linux-low.c (linux_kill_one_lwp): New.
11346 (linux_kill_one_lwp): Rename to ...
11347 (kill_one_lwp_callback): ... this. Use the new
11348 linux_kill_one_lwp.
11349
11350 2012-02-02 Pedro Alves <palves@redhat.com>
11351
11352 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11353 inferior.
11354
11355 2012-01-27 Pedro Alves <palves@redhat.com>
11356
11357 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11358 (elf_64_file_p): Make static.
11359 (linux_pid_exe_is_elf_64_file): New.
11360 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11361 Delete declarations.
11362 (linux_pid_exe_is_elf_64_file): Declare.
11363 * linux-x86-low.c (x86_arch_setup): Use
11364 linux_pid_exe_is_elf_64_file.
11365
11366 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11367
11368 * linux-low.c (linux_wait_for_event_1): Rename to ...
11369 (linux_wait_for_event): ... here and merge it with former
11370 linux_wait_for_event - new variable wait_ptid, use it.
11371 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11372
11373 2012-01-23 Pedro Alves <palves@redhat.com>
11374
11375 * server.c (main): Avoid yet another case of infinite loop while
11376 detaching/killing after a longjmp.
11377
11378 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11379
11380 Code cleanup.
11381 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11382
11383 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11384
11385 * hostio.c (handle_readlink): New function.
11386 (handle_vFile): Call it to handle "vFile:readlink" packets.
11387
11388 2012-01-20 Pedro Alves <palves@redhat.com>
11389 Ulrich Weigand <ulrich.weigand@linaro.org>
11390
11391 * server.c (handle_v_requests): Only support vAttach and vRun to
11392 start multiple processes when in extended protocol mode.
11393
11394 2012-01-17 Pedro Alves <palves@redhat.com>
11395
11396 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11397 memalign plus mprotect to allocate the scratch buffer.
11398
11399 2012-01-13 Pedro Alves <palves@redhat.com>
11400
11401 * server.c (attach_inferior): Clear `cont_thread'.
11402
11403 2012-01-13 Pedro Alves <palves@redhat.com>
11404
11405 * server.c (main): Avoid infinite loop while detaching/killing
11406 after a longjmp.
11407
11408 2012-01-09 Doug Evans <dje@google.com>
11409
11410 * server.c (start_inferior): Set last_ptid in --wrapper case.
11411
11412 2012-01-06 Yao Qi <yao@codesourcery.com>
11413
11414 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11415 defined.
11416 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11417
11418 2012-01-04 Yao Qi <yao@codesourcery.com>
11419
11420 * tracepoint.c (cmd_qtdp): Print debug message
11421 for static tracepoint.
11422
11423 2012-01-04 Yao Qi <yao@codesourcery.com>
11424
11425 * tracepoint.c (trace_vdebug): Differentiate debug message
11426 between gdbserver and IPA.
11427
11428 2012-01-03 Yao Qi <yao@codesourcery.com>
11429
11430 * tracepoint.c (tracepoint_was_hit): Don't collect for
11431 static tracepoint.
11432
11433 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11434
11435 * terminal.h: Reformat copyright header.
11436
11437 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11438
11439 * server.c (gdbserver_version): Update copyright year.
11440 * gdbreplay.c (gdbreplay_version): Likewise.
11441
11442 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11443
11444 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11445
11446 Revert:
11447 2011-12-18 Hui Zhu <teawater@gmail.com>
11448 * linux-low.c (linux_create_inferior): Save return value to ret.
11449
11450 2011-12-18 Hui Zhu <teawater@gmail.com>
11451
11452 * linux-low.c (linux_create_inferior): Save return value to ret.
11453
11454 2011-12-16 Doug Evans <dje@google.com>
11455
11456 * linux-low.c (linux_create_inferior): If stdio connection,
11457 redirect stdin from /dev/null, stdout to stderr.
11458 * remote-utils.c (remote_is_stdio): New static global.
11459 (remote_connection_is_stdio): New function.
11460 (remote_prepare): Handle stdio connection.
11461 (remote_open): Ditto.
11462 (remote_close): Don't close stdin for stdio connections.
11463 (read_prim,write_prim): New functions. Replace all calls to
11464 read/write to these.
11465 * server.c (main): Watch for "-" argument. Move call to
11466 remote_prepare before start_inferior.
11467 * server.h (STDIO_CONNECTION_NAME): New macro.
11468 (remote_connection_is_stdio): Declare.
11469
11470 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11471 in debugging output.
11472
11473 2011-12-15 Yao Qi <yao@codesourcery.com>
11474
11475 * tracepoint.c: Include sys/syscall.h.
11476 (gdb_ust_thread): Remove preprocessor conditional.
11477
11478 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11479
11480 * linux-low.c (linux_detach_one_lwp): Call
11481 the_low_target.prepare_to_resume before detaching.
11482
11483 2011-12-14 Yao Qi <yao@codesourcery.com>
11484
11485 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11486 of write.
11487
11488 2011-12-14 Yao Qi <yao@codesourcery.com>
11489
11490 * i386-low.c (i386_low_stopped_data_address): Initialize local
11491 variable `control'.
11492
11493 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11494
11495 PR remote/13492
11496
11497 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11498 DR_CONTROL unless necessary. Extend comments.
11499 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11500 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11501
11502 2011-12-13 Yao Qi <yao@codesourcery.com>
11503
11504 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11505 macros.
11506 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11507
11508 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11509
11510 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11511 Print new debug message for such case.
11512
11513 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11514
11515 Fix overlapping memcpy.
11516 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11517 the read_inferior_memory transfer.
11518 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11519 write_inferior_memory transfer.
11520 (set_fast_tracepoint_jump): New variable buf. Use it for the
11521 read_inferior_memory and write_inferior_memory transfers.
11522 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11523 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11524 Use it for the write_inferior_memory transfer.
11525 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11526 buffers.
11527
11528 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11529
11530 * linux-low.c (fetch_register, store_register): Make code
11531 consistent, fix formatting.
11532
11533 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11534
11535 * linux-low.c (usr_store_inferior_registers): Factor out code
11536 to handle individual registers into...
11537 (store_register): ... this new function.
11538
11539 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11540
11541 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11542 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11543 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11544 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11545 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11546 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11547 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11548 (srv_xmlfiles): Add new XML files.
11549
11550 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11551 and <sys/uio.h>.
11552 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11553 (init_registers_s390_linux32v1): Add prototype.
11554 (init_registers_s390_linux32v2): Likewise.
11555 (init_registers_s390_linux64v1): Likewise.
11556 (init_registers_s390_linux64v2): Likewise.
11557 (init_registers_s390x_linux64v1): Likewise.
11558 (init_registers_s390x_linux64v2): Likewise.
11559 (s390_num_regs): Increment to 52.
11560 (s390_regmap): Add orig_r2 register.
11561 (s390_num_regs_3264): Increment to 68.
11562 (s390_regmap_3264): Add orig_r2 register.
11563 (s390_collect_ptrace_register): Handle orig_r2 register.
11564 (s390_supply_ptrace_register): Likewise.
11565 (s390_fill_last_break): New function.
11566 (s390_store_last_break): Likewise.
11567 (s390_fill_system_call): New function.
11568 (s390_store_system_call): Likewise.
11569 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11570 register sets.
11571 (s390_check_regset): New function.
11572 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11573 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11574 Update target_regsets for available register sets.
11575
11576 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11577 Jan Kratochvil <jan.kratochvil@redhat.com>
11578
11579 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11580 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11581 New.
11582 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11583 * linux-low.h (struct process_info_private): New member r_debug.
11584 * server.c (handle_qxfer_libraries): Call
11585 the_target->qxfer_libraries_svr4.
11586 (handle_qxfer_libraries_svr4): New function.
11587 (qxfer_packets): New entry "libraries-svr4".
11588 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11589 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11590 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11591 PACKET_qXfer_libraries_svr4.
11592
11593 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11594
11595 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11596 PSW address/mask between 8-byte and 16-byte formats.
11597 (s390_supply_ptrace_register): Likewise.
11598 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11599 basic addressing mode bit.
11600
11601 2011-11-24 Stan Shebs <stan@codesourcery.com>
11602
11603 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11604
11605 2011-11-17 Stan Shebs <stan@codesourcery.com>
11606
11607 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11608 (tracing_start_time): New global.
11609 (tracing_stop_time): New global.
11610 (tracing_user_name): New global.
11611 (tracing_notes): New global.
11612 (tracing_stop_note): New global.
11613 (cmd_qtstart): Set traceframe_usage, start_time.
11614 (stop_tracing): Set stop_time.
11615 (cmd_qtstatus): Report additional status.
11616 (cmd_qtp): New function.
11617 (handle_tracepoint_query): Call it.
11618 (cmd_qtnotes): New function.
11619 (handle_tracepoint_general_set): Call it.
11620 (get_timestamp): Rename from tsv_get_timestamp.
11621
11622 2011-11-14 Stan Shebs <stan@codesourcery.com>
11623 Kwok Cheung Yeung <kcy@codesourcery.com>
11624
11625 * linux-x86-low.c (small_jump_insn): New.
11626 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11627 trampoline and error message, build a trampoline and issue a small
11628 jump instruction to it.
11629 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11630 trampoline and error message.
11631 (x86_get_min_fast_tracepoint_insn_len): New.
11632 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11633 * linux-low.h (struct linux_target_ops): Add arguments to
11634 install_fast_tracepoint_jump_pad operation, add new operation.
11635 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11636 arguments.
11637 (linux_get_min_fast_tracepoint_insn_len): New function.
11638 (linux_target_op): Add new operation.
11639 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11640 (gdb_trampoline_buffer_end): Ditto.
11641 (gdb_trampoline_buffer_error): Ditto.
11642 (struct ipa_sym_addresses): Add fields for new IPA variables.
11643 (symbol_list): Add entries for new IPA variables.
11644 (struct tracepoint): Add fields to hold the address range of the
11645 trampoline used by the tracepoint.
11646 (trampoline_buffer_head): New static variable.
11647 (trampoline_buffer_tail): Ditto.
11648 (claim_trampoline_space): New function.
11649 (have_fast_tracepoint_trampoline_buffer): New function.
11650 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11651 structure.
11652 (install_fast_tracepoint): Ditto, also add error buffer argument.
11653 (cmd_qtminftpilen): New function.
11654 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11655 (fast_tracepoint_from_trampoline_address): New function.
11656 (fast_tracepoint_collecting): Handle trampoline as part of jump
11657 pad space.
11658 (set_trampoline_buffer_space): New function.
11659 (initialize_tracepoint): Initialize new IPA variables.
11660 * target.h (struct target_ops): Add arguments to
11661 install_fast_tracepoint_jump_pad operation, add new
11662 get_min_fast_tracepoint_insn_len operation.
11663 (target_get_min_fast_tracepoint_insn_len): New.
11664 (install_fast_tracepoint_jump_pad): Add arguments.
11665 * server.h (IPA_BUFSIZ): Define.
11666 * linux-i386-ipa.c: Include extra header files.
11667 (initialize_fast_tracepoint_trampoline_buffer): New function.
11668 (initialize_low_tracepoint): Call it.
11669 * server.h (set_trampoline_buffer_space): Declare.
11670 (claim_trampoline_space): Ditto.
11671 (have_fast_tracepoint_trampoline_buffer): Ditto.
11672
11673 2011-11-14 Yao Qi <yao@codesourcery.com>
11674
11675 * server.c (handle_query): Handle InstallInTrace for qSupported.
11676 * tracepoint.c (add_tracepoint): Sort list.
11677 (install_tracepoint, download_tracepoint): New.
11678 (cmd_qtdp): Call them to install and download tracepoints.
11679 (sort_tracepoints): Removed.
11680 (cmd_qtstart): Update.
11681
11682 2011-11-14 Yao Qi <yao@codesourcery.com>
11683
11684 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11685 * mem-break.h: Declare.
11686 * tracepoint.c (cmd_qtstart): Move some code to ...
11687 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11688 New.
11689 (download_tracepoints): Move some code to ...
11690 (download_tracepoint_1): ... here. New.
11691
11692 2011-11-08 Yao Qi <yao@codesourcery.com>
11693
11694 * remote-utils.c (relocate_instruction): A comment fix.
11695
11696 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11697
11698 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11699 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11700 dr_status_mirror and dr_control_mirror from debug_reg_state.
11701 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11702 (i386_initial_stuff): Remove use of deleted globals.
11703 (i386_get_thread_context, i386_set_thread_context,
11704 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11705 from debug_reg_state.
11706
11707 2011-11-05 Yao Qi <yao@codesourcery.com>
11708
11709 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11710 address as TPOINT's.
11711
11712 2011-11-02 Stan Shebs <stan@codesourcery.com>
11713
11714 * tracepoint.c (agent_mem_read_string): New function.
11715 (eval_agent_expr): Call it for tracenz.
11716 * server.c (handle_query): Report support for tracenz.
11717
11718 2011-11-02 Yao Qi <yao@codesourcery.com>
11719
11720 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11721
11722 2011-11-02 Yao Qi <yao@codesourcery.com>
11723
11724 * target.h: Fix a typo in comment.
11725
11726 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11727
11728 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11729 clobber the breakpoints' shadows with fast tracepoint jumps.
11730 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11731 * target.c (write_inferior_memory): Also pass MYADDR down to
11732 check_mem_write.
11733
11734 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11735
11736 * configure.ac: Check support for personality routine.
11737 * configure: Regenerate.
11738 * config.in: Likewise.
11739 * linux-low.c: Include <sys/personality.h>.
11740 Define ADDR_NO_RANDOMIZE if necessary.
11741 (linux_create_inferior): Disable address space randomization when
11742 forking inferior, if requested.
11743 (linux_supports_disable_randomization): New function.
11744 (linux_target_ops): Install it.
11745 * server.h (disable_randomization): Declare.
11746 * server.c (disable_randomization): New global variable.
11747 (handle_general_set): Handle QDisableRandomization.
11748 (handle_query): Likewise for qSupported.
11749 (main): Support --disable-randomization and --no-disable-randomization
11750 command line arguments.
11751 * target.h (struct target_ops): Add supports_disable_randomization.
11752 (target_supports_disable_randomization): New macro.
11753
11754 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11755
11756 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11757 ifdef check.
11758 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11759 [!PT_GETDSBT] (target_loadmap): New definition.
11760 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11761 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11762 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11763 and PT_GETDSBT to LINUX_LOADMAP.
11764 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11765 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11766
11767 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11768
11769 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11770 (arm_linux_hwbp_cap): New static variable.
11771 (arm_linux_get_hwbp_cap): Replace by ...
11772 (arm_linux_init_hwbp_cap): ... this new function.
11773 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11774 (arm_linux_get_hw_watchpoint_count): Likewise.
11775 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11776 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11777 (arm_prepare_to_resume): Use perror_with_name instead of error.
11778
11779 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11780
11781 * linux-arm-low.c: Include <signal.h>.
11782 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11783 (struct arm_linux_hwbp_cap): New data type.
11784 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11785 (struct arm_linux_hw_breakpoint): New data type.
11786 (MAX_BPTS, MAX_WPTS): Define.
11787 (struct arch_process_info, struct arch_lwp_info): New data types.
11788 (arm_linux_get_hwbp_cap): New function.
11789 (arm_linux_get_hw_breakpoint_count): Likewise.
11790 (arm_linux_get_hw_watchpoint_count): Likewise.
11791 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11792 (arm_hwbp_control_initialize): Likewise.
11793 (arm_hwbp_control_is_enabled): Likewise.
11794 (arm_hwbp_control_is_initialized): Likewise.
11795 (arm_hwbp_control_disable): Likewise.
11796 (arm_linux_hw_breakpoint_equal): Likewise.
11797 (arm_linux_hw_point_initialize): Likewise.
11798 (struct update_registers_data): New data structure.
11799 (update_registers_callback: New function.
11800 (arm_insert_point): Likewise.
11801 (arm_remove_point): Likewise.
11802 (arm_stopped_by_watchpoint): Likewise.
11803 (arm_stopped_data_address): Likewise.
11804 (arm_new_process): Likewise.
11805 (arm_new_thread): Likewise.
11806 (arm_prepare_to_resume): Likewise.
11807 (the_low_target): Register arm_insert_point, arm_remove_point,
11808 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11809 arm_new_thread, and arm_prepare_to_resume.
11810
11811 2011-09-15 Stan Shebs <stan@codesourcery.com>
11812
11813 * server.h (struct emit_ops): Add compare-goto fields.
11814 * tracepoint.c (gdb_agent_op_sizes): New table.
11815 (emit_eq_goto): New function.
11816 (emit_ne_goto): New function.
11817 (emit_lt_goto): New function.
11818 (emit_le_goto): New function.
11819 (emit_gt_goto): New function.
11820 (emit_ge_goto): New function.
11821 (is_goto_target): New function.
11822 (compile_bytecodes): Recognize special cases of compare-goto
11823 combinations and call specialized emitters for them.
11824 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11825 (amd64_emit_ne_goto): New function.
11826 (amd64_emit_lt_goto): New function.
11827 (amd64_emit_le_goto): New function.
11828 (amd64_emit_gt_goto): New function.
11829 (amd64_emit_ge_goto): New function.
11830 (amd64_emit_ops): Add the new functions.
11831 (i386_emit_eq_goto): New function.
11832 (i386_emit_ne_goto): New function.
11833 (i386_emit_lt_goto): New function.
11834 (i386_emit_le_goto): New function.
11835 (i386_emit_gt_goto): New function.
11836 (i386_emit_ge_goto): New function.
11837 (i386_emit_ops): Add the new functions.
11838
11839 2011-09-08 Stan Shebs <stan@codesourcery.com>
11840
11841 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11842 (i386_emit_epilogue): Restore %ebx.
11843
11844 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11845
11846 * server.c (step_thread): Remove definition.
11847 (process_serial_event): Don't handle Hs.
11848 * server.h (step_thread): Remove declaration.
11849 * target.c (set_desired_inferior): Remove use of step_thread.
11850
11851 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11852
11853 * linux-low.c: Include linux-procfs.h.
11854 (linux_attach_lwp_1): Update comments.
11855 (linux_attach): Scan for existing threads when attaching to a
11856 process that is the tgid.
11857 * Makefile.in: Update dependencies.
11858
11859 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11860
11861 * configure.srv: Add linux-procfs.o dependencies.
11862
11863 2011-08-14 Yao Qi <yao@codesourcery.com>
11864
11865 * target.h (struct target_ops): Fix indent.
11866 * win32-low.c (win32_target_ops): Fix comment.
11867
11868 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11869 Yao Qi <yao@codesourcery.com>
11870
11871 * Makefile.in (clean): Remove tic6x-*.c files.
11872 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11873 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11874 (tic6x-c64xp-linux.c): Likewise.
11875 * configure.srv: Add support for tic6x-*-uclinux.
11876 * linux-tic6x-low.c: New.
11877 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11878
11879 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11880 Yao Qi <yao@codesourcery.com>
11881
11882 * target.h (struct target_ops): Add read_loadmap.
11883 * linux-low.c (struct target_loadseg): New type.
11884 (struct target_loadmap): New type.
11885 (linux_read_loadmap): New function.
11886 (linux_target_ops): Add linux_read_loadmap.
11887 * server.c (handle_query): Support qXfer:fdpic:read packet.
11888 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11889 to NULL.
11890
11891 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11892
11893 * win32-low.c: Include <stdint.h>.
11894
11895 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11896
11897 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11898 to the inferior here.
11899 (i386_remove_aligned_watchpoint): Ditto.
11900 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11901 fit part of the watchpoint in the debug registers.
11902 (i386_update_inferior_debug_regs): New.
11903 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11904 registers, and only update the inferior on success.
11905 (i386_low_remove_watchpoint): Ditto.
11906
11907 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11908
11909 * linux-low.c (compare_ints, unique, list_threads, show_process,
11910 linux_core_of_thread): Delete.
11911 (linux_target_ops): Change linux_core_of_thread to
11912 linux_common_core_of_thread.
11913 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11914 * utils.c (malloc_failure): Change type of argument.
11915 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11916 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11917 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11918 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11919 (IPA_OBJS): Add common-utils-ipa.o.
11920 (ptid_h, linux_osdata_h): New macros.
11921 (server_h): Add common/common-utils.h, common/xml-utils.h,
11922 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11923 common/ptid.h.
11924 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11925 ptid.o, buffer.o): New rules.
11926 (linux-low.o): Add common/linux-osdata.h as a dependency.
11927 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11928 * configure.ac: Add AC_HEADER_DIRENT check.
11929 * config.in: Regenerate.
11930 * configure: Regenerate.
11931 * remote-utils.c (xml_escape_text): Delete.
11932 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11933 buffer_xml_printf): Move to common/buffer.c.
11934 * server.c (main): Remove call to initialize_inferiors.
11935 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11936 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11937 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11938 internal_error, gdb_assert, gdb_assert_fail): Delete.
11939 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11940 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11941 common/buffer.h.
11942 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11943 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11944 initialize_inferiors): Delete.
11945
11946 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11947
11948 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11949 symbol error.
11950
11951 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11952
11953 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11954 assertion.
11955 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11956
11957 2011-05-26 Yao Qi <yao@codesourcery.com>
11958
11959 * Makefile.in (thread-db.o): Track dependence to
11960 common/gdb_thread_db.h.
11961 * thread-db.c: include gdb_thread_db.h from right place.
11962
11963 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11964
11965 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11966 __FILE__ and __LINE__ to internal_error.
11967
11968 2011-05-13 Doug Evans <dje@google.com>
11969
11970 * thread-db.c (try_thread_db_load_from_sdir): New function.
11971 (try_thread_db_load_from_dir): New function.
11972 (thread_db_load_search): Handle $sdir, ignore $pdir.
11973 Remove trying of system directories if search of
11974 libthread-db-search-path fails, that is now done via $sdir.
11975
11976 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11977
11978 * server.c (handle_query): Add EnableDisableTracepoints to the list
11979 of supported features.
11980 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11981 tracepoints.
11982 (cmd_qtenable_disable): New.
11983 (cmd_qtstart): Install tracepoints even if disabled.
11984 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11985 receiving a QTEnable or QTDisable packet.
11986 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11987 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11988 tracepoints.
11989 (gdb_probe): Skip data collection if static tracepoint is disabled.
11990
11991 2011-05-10 Doug Evans <dje@google.com>
11992
11993 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11994
11995 2011-05-04 Doug Evans <dje@google.com>
11996
11997 * linux-low.c (linux_join): Skip process lookup.
11998 * spu-low.c (spu_join): Ditto.
11999 * server.c (join_inferiors_callback): Delete.
12000 (process_serial_event): For 'D' packet (detach) call join_inferior
12001 directly.
12002
12003 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12004
12005 * README: Don't mention xscale*-*-linux*.
12006 * configure.srv (xscale*-*-linux*): Don't handle target.
12007
12008 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12009
12010 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12011 casting pointers.
12012 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12013 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12014 (i386_emit_void_call_2): Likewise.
12015
12016 2011-04-26 Yao Qi <yao@codesourcery.com>
12017
12018 * linux-low.c: Move common macros to linux-ptrace.h.
12019 Include linux-ptrace.h.
12020 * Makefile.in (linux_ptrace_h): New.
12021 (linux-low.o): Depends on linux-ptrace.h.
12022
12023 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12024
12025 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12026 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12027 (remote_prepare): New function with most of the TCP code from ...
12028 (remote_open): ... here. Detect PORT here unconditionally. Move also
12029 setting transport_is_reliable.
12030 * server.c (run_once): New variable.
12031 (gdbserver_usage): Document it.
12032 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12033 the first run if RUN_ONCE.
12034 * server.h (run_once, remote_prepare): New declarations.
12035
12036 2011-04-19 Tom Tromey <tromey@redhat.com>
12037
12038 * win32-low.c (handle_load_dll): Remove duplicate "the".
12039
12040 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12041
12042 Remove support for old Cygwin 1.5 versions.
12043 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12044 function to avoid warning.
12045 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12046 warning.
12047
12048 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12049
12050 * gdbserver/server.h (Macro _): Define it if not available.
12051
12052 2011-03-14 Michael Snyder <msnyder@vmware.com>
12053
12054 * hostio.c (handle_close): Remove unnecessary null test.
12055
12056 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12057
12058 * Makefile.in (maintainer-clean realclean distclean): Remove
12059 "make ... subdir_do" command.
12060
12061 2011-03-10 Michael Snyder <msnyder@vmware.com>
12062
12063 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12064
12065 * server.c (handle_v_run): Free alloced buffer on early return.
12066
12067 2011-03-09 Yao Qi <yao@codesourcery.com>
12068
12069 Revert:
12070 2011-03-04 Yao Qi <yao@codesourcery.com>
12071
12072 * Makefile.in: Remove GNU make feature --directory.
12073
12074 2011-03-05 Yao Qi <yao@codesourcery.com>
12075
12076 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12077 (subdir_do): New make target. Copied from gdb/Makefile.
12078 (maintainer-clean, realclean, distclean, clean): Call corresponding
12079 make targets in common/Makefile.
12080
12081 2011-02-11 Yao Qi <yao@codesourcery.com>
12082
12083 * configure.ac: Call AC_PROG_RANLIB.
12084 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12085 * configure: Regenerate.
12086
12087 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12088
12089 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12090
12091 2011-03-06 Yao Qi <yao@codesourcery.com>
12092
12093 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
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-03-04 Yao Qi <yao@codesourcery.com>
12103
12104 * Makefile.in: Remove GNU make feature --directory.
12105
12106 2011-03-04 Michael Snyder <msnyder@vmware.com>
12107
12108 * server.c (queue_stop_reply): Call xmalloc not malloc.
12109
12110 2011-03-02 Michael Snyder <msnyder@vmware.com>
12111
12112 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12113
12114 2011-02-28 Michael Snyder <msnyder@vmware.com>
12115
12116 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12117 (cmd_qtframe): Ditto.
12118 (cmd_qtbuffer): Ditto.
12119 (cmd_bigqtbuffer): Ditto.
12120
12121 * utils.c (decimal2str): Initialize 'width' to nine, then
12122 don't mess with it.
12123
12124 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12125
12126 * hostio.c (require_data): Free *data, not data.
12127
12128 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12129
12130 * hostio.c (require_data): Use free, not xfree.
12131
12132 2011-02-27 Michael Snyder <msnyder@vmware.com>
12133
12134 * server.c (handle_query): Discard unused value.
12135
12136 * hostio.c (require_data): Free malloc memory before returning
12137 error.
12138
12139 2011-02-26 Michael Snyder <msnyder@vmware.com>
12140
12141 * linux-low.c (list_threads): Call closedir for dirent.
12142
12143 2011-02-27 Michael Snyder <msnyder@vmware.com>
12144
12145 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12146 a case statement falls through.
12147
12148 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12149
12150 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12151 in comparison.
12152
12153 2011-02-26 Michael Snyder <msnyder@vmware.com>
12154
12155 * utils.c (decimal2str): Eliminate dead code and dead param.
12156 (pulongest): Drop dead param from call to decimal2str.
12157 (plongest): Ditto.
12158
12159 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12160
12161 Revert the following patch (not approved yet):
12162 2011-02-21 Hui Zhu <teawater@gmail.com>
12163 * tracepoint.c (tp_printf): New function.
12164 (eval_agent_expr): Handle gdb_agent_op_printf.
12165
12166 2011-02-21 Hui Zhu <teawater@gmail.com>
12167
12168 * tracepoint.c (tp_printf): New function.
12169 (eval_agent_expr): Handle gdb_agent_op_printf.
12170
12171 2011-02-18 Tom Tromey <tromey@redhat.com>
12172
12173 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12174 (tracepoint.o): Likewise.
12175 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12176 (gdb_agent_op_names): Likewise.
12177
12178 2011-02-18 Tom Tromey <tromey@redhat.com>
12179
12180 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12181 gdb_agent_op_rot>: New constants.
12182 (gdb_agent_op_names): Add pick and roll.
12183 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12184 cases.
12185
12186 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12187
12188 * aclocal.m4: Regenerated with aclocal-1.11.1.
12189
12190 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12191
12192 * server.c (handle_qxfer_traceframe_info): New.
12193 (qxfer_packets): Register "traceframe-info".
12194 (handle_query): Report support for qXfer:traceframe-info:read+.
12195 * tracepoint.c (match_blocktype): New.
12196 (traceframe_find_block_type): Rename to ...
12197 (traceframe_walk_blocks): ... this. Add callback filter argument,
12198 and use it.
12199 (traceframe_find_block_type): New, reimplemented on top of
12200 traceframe_walk_blocks.
12201 (build_traceframe_info_xml): New.
12202 (traceframe_read_info): New.
12203 * server.h (traceframe_read_info): Declare.
12204
12205 2011-02-11 Yao Qi <yao@codesourcery.com>
12206
12207 * configure.ac: Call AC_PROG_RANLIB.
12208 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12209 * configure: Regenerate.
12210
12211 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12212
12213 * server.c (gdb_read_memory): Change return semantics to allow
12214 partial transfers.
12215 (handle_search_memory_1): Adjust.
12216 (process_serial_event) <'m' packet>: Handle partial transfers.
12217 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12218
12219 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12220
12221 * regcache.c (init_register_cache): Initialize
12222 regcache->register_status.
12223 (free_register_cache): Release regcache->register_status.
12224 (regcache_cpy): Copy register_status.
12225 (registers_to_string): Print 'x's for unavailable registers.
12226 (supply_register): Mark the register's status valid or
12227 unavailable, depending on whether a buffer was passed in or not.
12228 (supply_register_zeroed): New.
12229 (supply_regblock): Mark the registers' status valid or
12230 unavailable, depending on whether a buffer was passed in or not.
12231 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12232 (struct regcache): New `register_status' field.
12233 (supply_register_zeroed): Declare.
12234 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12235 supply_register_zeroed, rather than passing a NULL buffer to
12236 supply_register.
12237 * tracepoint.c (fetch_traceframe_registers): Update comment.
12238
12239 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12240
12241 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12242 buffer explicit.
12243
12244 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12245
12246 * server.h (decode_xfer_write): Change prototype.
12247 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12248 and don't extract the annex here.
12249 * server.c (decode_xfer_read): Remove `annex' parameter,
12250 and don't extract the annex here.
12251 (decode_xfer): New.
12252 (struct qxfer): New.
12253 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12254 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12255 (handle_qxfer_statictrace): New functions, abstracted out from
12256 handle_query, and made to use the struct qxfer interface.
12257 (handle_threads_qxfer_proper): Rename to ...
12258 (handle_qxfer_threads_proper): ... this.
12259 (handle_threads_qxfer): Rename to ...
12260 (handle_qxfer_threads): ... this. Adjust.
12261 (qxfer_packets): New array.
12262 (handle_qxfer): New function.
12263 (handle_query): Use handle_qxfer.
12264
12265 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12266
12267 * gdbreplay.c: Shorten lines of >= 80 columns.
12268 * linux-low.c: Ditto.
12269 * linux-ppc-low.c: Ditto.
12270 * linux-s390-low.c: Ditto.
12271 * linux-sparc-low.c: Ditto.
12272 * linux-x86-low.c: Ditto.
12273 * linux-xtensa-low.c: Ditto.
12274 * mem-break.c: Ditto.
12275 * nto-low.c: Ditto.
12276 * regcache.h: Ditto.
12277 * remote-utils.c: Ditto.
12278 * server.c: Ditto.
12279 * server.h: Ditto.
12280 * thread-db.c: Ditto.
12281 * tracepoint.c: Ditto.
12282 * utils.c: Ditto.
12283 * win32-low.h: Ditto.
12284
12285 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12286
12287 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12288 update.
12289
12290 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12291
12292 * server.c (gdbserver_version): Update copyright year in version
12293 output.
12294 * gdbreplay.c (gdbreplay_version): Ditto.
12295
12296 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12297
12298 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12299 * linux-bfin-low.c: New file.
12300 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12301 PT_DATA_ADDR for BFIN targets.
12302 * Makefile.in (SFILES): Add linux-bfin-low.c.
12303 (clean): Remove reg-bfin.c.
12304 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12305 * README: Mention supported Blackfin targets.
12306
12307 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12308
12309 * .gitignore: New file.
12310
12311 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12312
12313 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12314
12315 2010-10-22 Jie Zhang <jie@codesourcery.com>
12316
12317 * Makefile.in: Add FLAGS_TO_PASS variable.
12318 (install): Remove dependency of install-only and recursively
12319 invoke make for install-only.
12320
12321 2010-10-04 Doug Evans <dje@google.com>
12322
12323 * Makefile.in (uninstall): Use $(DESTDIR).
12324
12325 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12326
12327 PR gdb/11842
12328
12329 * linux-x86-low.c (compat_siginfo_from_siginfo)
12330 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12331 si_code is < 0. Check for si_code == SI_TIMER before checking for
12332 si_code < 0.
12333
12334 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12335
12336 * lynx-i386-low.c: New file.
12337 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12338
12339 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12340
12341 * lynx-low.c (ptrace_request_to_str): Remove handling for
12342 request values that have been removed in LynxOS 5.x.
12343
12344 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12345
12346 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12347 <ptrace.h>
12348
12349 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12350
12351 * configure.ac: Add --enable-inprocess-agent option.
12352 * configure: Rebuilt.
12353
12354 2010-09-06 Yao Qi <yao@codesourcery.com>
12355
12356 * linux-low.c (linux_kill): Remove unused variable.
12357 (linux_stabilize_threads): Likewise.
12358 * server.c (start_inferior): Likewise.
12359 (queue_stop_reply_callback): Likewise.
12360 * tracepoint.c (do_action_at_tracepoint): Likewise.
12361
12362 2010-09-06 Yao Qi <yao@codesourcery.com>
12363
12364 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12365 on return.
12366
12367 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12368
12369 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12370
12371 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12372
12373 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12374 "$(IPA_DEPFILES)".
12375
12376 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12377
12378 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12379 gdbserver/lynx-ppc-low.c: New files.
12380 * Makefile.in (lynx_low_h): New variable.
12381 (lynx-low.o, lynx-ppc-low.o): New rules.
12382 * configure.ac: On LynxOS, link with -lnetinet.
12383 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12384 * configure: regenerate.
12385
12386 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12387
12388 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12389 * configure.ac: Add check for vasprintf and vsnprintf.
12390 * configure, config.in: Regenerate.
12391 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12392
12393 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12394
12395 * gdbreplay.c: Move include of alloca.h up, next to include of
12396 malloc.h.
12397 * server.h: Add include of malloc.h.
12398 * mem-break.c: Remove include of malloc.h.
12399 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12400
12401 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12402
12403 * Makefile.in (memmem.o): Build with -Wno-error.
12404
12405 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12406
12407 * utils.c (xsnprintf): Make non-static.
12408 * server.h: Add xsnprintf declaration.
12409 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12410 replace calls to snprintf by calls to xsnprintf throughout.
12411
12412 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12413
12414 * configure.ac: Add configure check for alloca.
12415 * configure, config.in: Regenerate.
12416 * server.h: Include alloca.h if it exists.
12417 * gdbreplay.c: Include alloca.h if it exists.
12418
12419 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12420
12421 * linux-low.c (__SIGRTMIN): Define if not already defined.
12422 (linux_create_inferior): Check for __ANDROID__ rather than
12423 __SIGRTMIN.
12424 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12425 are already deferred.
12426 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12427 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12428 stopped and already has a pending signal to report.
12429 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12430 a pending signal to report or is moving out of a jump pad.
12431 (linux_init_signals): Check for __ANDROID__ rather than
12432 __SIGRTMIN.
12433
12434 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12435
12436 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12437 debug_threads check. Avoid a linear search when not doing debug
12438 output.
12439
12440 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12441
12442 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12443 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12444 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12445 (process_event): Change local fd's type to gdb_fildes_t.
12446 (create_file_handler): Adjust prototype.
12447 (delete_file_handler): Adjust prototype.
12448 (handle_file_event): Adjust prototype. Use pfildes.
12449 (create_file_event): Adjsut prototype.
12450 * remote-utils.c (remote_desc, listen_desc): Change type to
12451 gdb_fildes_t.
12452 * server.h: New gdb_fildes_t typedef.
12453 [USE_WIN32API]: Include winsock2.h.
12454 (delete_file_handler, add_file_handler): Adjust prototypes.
12455 (pfildes): Declare.
12456 * utils.c (pfildes): New.
12457
12458 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12459
12460 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12461 * configure: Regenerate.
12462
12463 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12464
12465 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12466 (linux_done_accessing_memory): ... this.
12467 (linux_target_ops): Adjust.
12468 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12469 * nto-low.c (nto_target_ops): Adjust comment.
12470 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12471 * spu-low.c (spu_target_ops): Adjust comment.
12472 * target.h (target_ops): Rename unprepare_to_access_memory field
12473 to done_accessing_memory.
12474 (unprepare_to_access_memory): Rename to ...
12475 (done_accessing_memory): ... this.
12476
12477 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12478
12479 * linux-low.c (linux_prepare_to_access_memory): New.
12480 (linux_unprepare_to_access_memory): New.
12481 (linux_target_ops): Install them.
12482 * server.c (read_memory): Rename to ...
12483 (gdb_read_memory): ... this. Use
12484 prepare_to_access_memory/prepare_to_access_memory.
12485 (write_memory): Rename to ...
12486 (gdb_write_memory): ... this. Use
12487 prepare_to_access_memory/prepare_to_access_memory.
12488 (handle_search_memory_1): Adjust.
12489 (process_serial_event): Adjust.
12490 * target.h (struct target_ops): New fields
12491 prepare_to_access_memory and unprepare_to_access_memory.
12492 (prepare_to_access_memory, unprepare_to_access_memory): New.
12493 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12494 prepare_to_access_memory/prepare_to_access_memory.
12495 * nto-low.c (nto_target_ops): Adjust.
12496 * spu-low.c (spu_target_ops): Adjust.
12497 * win32-low.c (win32_target_ops): Adjust.
12498
12499 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12500
12501 * Makefile.in (WARN_CFLAGS): Get it from configure.
12502 (WERROR_CFLAGS): New.
12503 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12504 * configure.ac: Introduce --enable-werror, which adds -Werror to
12505 the compiler command line. Enabled by default. Disable with
12506 --disable-werror. Add -Wdeclaration-after-statement
12507 Wpointer-arith and -Wformat-nonliteral to warning flags.
12508 * configure: Regenerate.
12509
12510 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12511
12512 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12513
12514 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12515
12516 * gdbreplay.c (remote_error): New.
12517 (gdbchar): New.
12518 (expect): Use gdbchar. Check for error reading from GDB.
12519 Clarify sync error output.
12520 (play): Check for errors writing to GDB.
12521 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12522 * remote-utils.c (getpkt): Check for errors writing to the remote
12523 descriptor.
12524
12525 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12526
12527 * linux-low.c (linux_wait_1): Move non-debugging code out of
12528 `debug_threads' control.
12529
12530 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12531
12532 * linux-low.c (linux_wait_1): Don't set last_status here.
12533 * server.c (push_event, queue_stop_reply_callback): Assert we're
12534 not pushing a TARGET_WAITKIND_IGNORE event.
12535 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12536 (myresume, handle_target_event): Set the thread's last_resume_kind
12537 and last_status from the target returned status.
12538
12539 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12540
12541 PR threads/10729
12542
12543 * linux-x86-low.c (update_debug_registers_callback): New.
12544 (i386_dr_low_set_addr): Use it.
12545 (i386_dr_low_get_addr): New.
12546 (i386_dr_low_set_control): Use update_debug_registers_callback.
12547 (i386_dr_low_get_control): New.
12548 (i386_dr_low_get_status): Adjust.
12549 * linux-low.c (linux_stop_lwp): New.
12550 * linux-low.h (linux_stop_lwp): Declare.
12551
12552 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12553 argument instead of a i386_debug_reg_state.
12554 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12555 a i386_debug_reg_state.
12556 (i386_insert_aligned_watchpoint): Adjust.
12557 (i386_remove_aligned_watchpoint): Adjust.
12558 (i386_low_stopped_data_address): Read the debug registers from the
12559 inferior instead of from the mirrors.
12560 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12561 (i386_dr_low_get_addr): Declare.
12562 (i386_dr_low_get_control): Declare.
12563 (i386_dr_low_get_status): Change prototype.
12564
12565 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12566 (i386_dr_low_get_addr): New.
12567 (i386_dr_low_get_control): New.
12568 (i386_dr_low_get_status): Adjust prototype. Return
12569 dr_status_mirror.
12570 (i386_initial_stuff): Clear dr_status_mirror and
12571 dr_control_mirror.
12572 (i386_get_thread_context): Adjust.
12573 (i386_set_thread_context): Adjust.
12574 (i386_thread_added): Adjust.
12575
12576 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12577
12578 * linux-low.h (linux_thread_area): Delete declaration.
12579
12580 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12581
12582 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12583 after its termination.
12584
12585 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12586
12587 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12588 (gdb_wants_all_stopped): Delete.
12589 (linux_wait_1): Don't call them.
12590 * server.c (handle_v_cont): Tag all threads as want-stopped.
12591 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12592 stopped as "client-wants-stopped".
12593
12594 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12595
12596 * Makefile.in (signals_h): New.
12597 (server_h): Depend on it.
12598 (server.o): Don't depend on $(signals_def).
12599 (signals.o): Depend on $(signals_def).
12600
12601 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12602
12603 * Makefile.in (signals_def): New.
12604 (server_h): Append include/gdb/signals.h and signals_def.
12605 (server.o): Append signals_def.
12606
12607 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12608
12609 * server.c (handle_target_event): Use target_signal_to_host for
12610 resume_info.sig initialization.
12611 * target.h (struct thread_resume) <sig>: New comment.
12612
12613 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12614
12615 * server.c (handle_query): strcpy() the returned string from paddress()
12616 instead of sprintf().
12617 * utils.c (paddress): Return phex_nz().
12618
12619 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12620
12621 * server.c (handle_v_cont): Call mourn_inferior if process
12622 just exited.
12623 (myresume): Likewise.
12624
12625 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12626
12627 Static tracepoints, and integration with UST.
12628
12629 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12630 * mem-break.c (uninsert_all_breakpoints)
12631 (reinsert_all_breakpoints): New.
12632 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12633 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12634 (gdb_agent_ust_loaded, helper_thread_id)
12635 (gdb_agent_helper_thread_id): New macros.
12636 (struct ipa_sym_addresses): Add addr_ust_loaded,
12637 addr_helper_thread_id, addr_cmd_buf.
12638 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12639 (in_process_agent_loaded_ust): New.
12640 (write_e_ust_not_loaded): New.
12641 (maybe_write_ipa_ust_not_loaded): New.
12642 (struct collect_static_trace_data_action): New.
12643 (enum tracepoint_type) <static_tracepoint>: New.
12644 (struct tracepoint) <handle>: Mention static tracepoints.
12645 (struct static_tracepoint_ctx): New.
12646 (CMD_BUF_SIZE): New.
12647 (add_tracepoint_action): Handle static tracepoint actions.
12648 (unprobe_marker_at): New.
12649 (clear_installed_tracepoints): Handle static tracepoints.
12650 (cmd_qtdp): Handle static tracepoints.
12651 (probe_marker_at): New.
12652 (cmd_qtstart): Handle static tracepoints.
12653 (response_tracepoint): Handle static tracepoints.
12654 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12655 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12656 (get_context_regcache): Handle static tracepoints.
12657 (do_action_at_tracepoint): Handle static tracepoint actions.
12658 (traceframe_find_block_type): Handle static trace data blocks.
12659 (traceframe_read_sdata): New.
12660 (download_tracepoints): Download static tracepoint actions.
12661 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12662 (GDB_PROBE_NAME): New.
12663 (ust_ops): New.
12664 (GET_UST_SYM): New.
12665 (USTF): New.
12666 (dlsym_ust): New.
12667 (ust_marker_to_static_tracepoint): New.
12668 (gdb_probe): New.
12669 (collect_ust_data_at_tracepoint): New.
12670 (gdb_ust_probe): New.
12671 (UNIX_PATH_MAX, SOCK_DIR): New.
12672 (gdb_ust_connect_sync_socket): New.
12673 (resume_thread, stop_thread): New.
12674 (run_inferior_command): New.
12675 (init_named_socket): New.
12676 (gdb_ust_socket_init): New.
12677 (cstr_to_hexstr): New.
12678 (next_st): New.
12679 (first_marker, next_marker): New.
12680 (response_ust_marker): New.
12681 (cmd_qtfstm, cmd_qtsstm): New.
12682 (unprobe_marker_at, probe_marker_at): New.
12683 (cmd_qtstmat, gdb_ust_thread): New.
12684 (gdb_ust_init): New.
12685 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12686 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12687 (ST_REGENTRY): New.
12688 (x86_64_st_collect_regmap): New.
12689 (X86_64_NUM_ST_COLLECT_GREGS): New.
12690 (AMD64_RIP_REGNUM): New.
12691 (supply_static_tracepoint_registers): New.
12692 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12693 (ST_REGENTRY): New.
12694 (i386_st_collect_regmap): New.
12695 (i386_NUM_ST_COLLECT_GREGS): New.
12696 (supply_static_tracepoint_registers): New.
12697 * server.c (handle_query): Handle qXfer:statictrace:read.
12698 <qSupported>: Report support for StaticTracepoints, and
12699 qXfer:statictrace:read features.
12700 * server.h (traceframe_read_sdata)
12701 (supply_static_tracepoint_registers): Declare.
12702 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12703 (unpack_varlen_hex): Include in IPA build.
12704 * Makefile.in (ustlibs, ustinc): New.
12705 (IPA_OBJS): Add remote-utils-ipa.o.
12706 ($(IPA_LIB)): Link -ldl and -lpthread.
12707 (UST_CFLAGS): New.
12708 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12709 * config.in, configure: Regenerate.
12710
12711 2010-06-20 Ian Lance Taylor <iant@google.com>
12712 Pedro Alves <pedro@codesourcery.com>
12713
12714 * linux-x86-low.c (always_true): Delete.
12715 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12716 trying to fool the compiler with always_true.
12717
12718 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12719
12720 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12721 conditions in gdbserver.
12722
12723 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12724
12725 * spu-low.c (spu_read_memory): Wrap around local store limit.
12726 (spu_write_memory): Likewise.
12727
12728 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12729
12730 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12731 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12732 LONGEST uses.
12733 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12734 uses.
12735 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12736 uses with LONGEST uses.
12737
12738 2010-06-14 Stan Shebs <stan@codesourcery.com>
12739 Pedro Alves <pedro@codesourcery.com>
12740
12741 Bytecode compiler.
12742
12743 * linux-x86-low.c: Include limits.h.
12744 (add_insns): New.
12745 (always_true): New.
12746 (EMIT_ASM): New.
12747 (EMIT_ASM32): New.
12748 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12749 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12750 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12751 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12752 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12753 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12754 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12755 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12756 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12757 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12758 (amd64_emit_void_call_2): New.
12759 (amd64_emit_ops): New.
12760 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12761 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12762 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12763 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12764 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12765 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12766 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12767 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12768 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12769 (i386_emit_stack_adjust, i386_emit_int_call_1)
12770 (i386_emit_void_call_2): New.
12771 (i386_emit_ops): New.
12772 (x86_emit_ops): New.
12773 (the_low_target): Install x86_emit_ops.
12774 * server.h (struct emit_ops): New.
12775 (get_raw_reg_func_addr): Declare.
12776 (current_insn_ptr, emit_error): Declare.
12777 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12778 (set_trace_state_variable_value): New defines.
12779 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12780 addr_get_trace_state_variable_value and
12781 addr_set_trace_state_variable_value.
12782 (symbol_list): New fields for get_raw_reg,
12783 get_trace_state_variable_value and set_trace_state_variable_value.
12784 (condfn): New typedef.
12785 (struct tracepoint): New field `compiled_cond'.
12786 (do_action_at_tracepoint): Clear compiled_cond.
12787 (get_trace_state_variable_value, set_trace_state_variable_value):
12788 Export in the IPA.
12789 (condition_true_at_tracepoint): If there's a compiled condition,
12790 run that.
12791 (current_insn_ptr, emit_error): New globals.
12792 (struct bytecode_address): New.
12793 (get_raw_reg_func_addr): New.
12794 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12795 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12796 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12797 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12798 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12799 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12800 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12801 (compile_tracepoint_condition, compile_bytecodes): New.
12802 * target.h (emit_ops): Forward declare.
12803 (struct target_ops): New field emit_ops.
12804 (target_emit_ops): New.
12805 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12806 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12807 * linux-low.c (linux_emit_ops): New.
12808 (linux_target_ops): Install it.
12809 * linux-low.h (struct linux_target_ops): New field emit_ops.
12810
12811 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12812
12813 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12814 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12815
12816 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12817 Stan Shebs <stan@codesourcery.com>
12818
12819 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12820 (all): Depend on $(extra_libraries).
12821 (install-only): Install the IPA.
12822 (IPA_OBJS, IPA_LIB): New.
12823 (clean): Remove the IPA lib.
12824 (IPAGENT_CFLAGS): New.
12825 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12826 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12827 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12828 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12829 * configure.ac: Check for atomic builtins support in the compiler.
12830 (IPA_DEPFILES, extra_libraries): Define.
12831 * configure.srv (ipa_obj): Add description.
12832 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12833 (i[34567]86-*-linux*): Set ipa_obj.
12834 (x86_64-*-linux*): Set ipa_obj.
12835 * linux-low.c (stabilizing_threads): New.
12836 (supports_fast_tracepoints): New.
12837 (linux_detach): Stabilize threads before detaching.
12838 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12839 the lwp is either not stabilizing, or is moving out of a jump pad.
12840 (linux_fast_tracepoint_collecting): New.
12841 (maybe_move_out_of_jump_pad): New.
12842 (enqueue_one_deferred_signal): New.
12843 (dequeue_one_deferred_signal): New.
12844 (linux_wait_for_event_1): If moving out of a jump pad, defer
12845 pending signals to later.
12846 (linux_stabilize_threads): New.
12847 (linux_wait_1): Check if threads need moving out of jump pads, and
12848 do it if so.
12849 (stuck_in_jump_pad_callback): New.
12850 (move_out_of_jump_pad_callback): New.
12851 (lwp_running): New.
12852 (linux_resume_one_lwp): Handle moving out of jump pads.
12853 (linux_set_resume_request): Dequeue deferred signals.
12854 (need_step_over_p): Also step over fast tracepoint jumps.
12855 (start_step_over): Also uninsert fast tracepoint jumps.
12856 (finish_step_over): Also reinsert fast tracepoint jumps.
12857 (linux_install_fast_tracepoint_jump): New.
12858 (linux_target_ops): Install linux_stabilize_threads and
12859 linux_install_fast_tracepoint_jump_pad.
12860 * linux-low.h (linux_target_ops) <get_thread_area,
12861 install_fast_tracepoint_jump_pad>: New fields.
12862 (struct lwp_info) <collecting_fast_tracepoint,
12863 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12864 (linux_get_thread_area): Declare.
12865 * linux-x86-low.c (jump_insn): New.
12866 (x86_get_thread_area): New.
12867 (append_insns): New.
12868 (push_opcode): New.
12869 (amd64_install_fast_tracepoint_jump_pad): New.
12870 (i386_install_fast_tracepoint_jump_pad): New.
12871 (x86_install_fast_tracepoint_jump_pad): New.
12872 (the_low_target): Install x86_get_thread_area and
12873 x86_install_fast_tracepoint_jump_pad.
12874 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12875 (struct fast_tracepoint_jump): New.
12876 (fast_tracepoint_jump_insn): New.
12877 (fast_tracepoint_jump_shadow): New.
12878 (find_fast_tracepoint_jump_at): New.
12879 (fast_tracepoint_jump_here): New.
12880 (delete_fast_tracepoint_jump): New.
12881 (set_fast_tracepoint_jump): New.
12882 (uninsert_fast_tracepoint_jumps_at): New.
12883 (reinsert_fast_tracepoint_jumps_at): New.
12884 (set_breakpoint_at): Use write_inferior_memory.
12885 (uninsert_raw_breakpoint): Use write_inferior_memory.
12886 (check_mem_read): Mask out fast tracepoint jumps.
12887 (check_mem_write): Mask out fast tracepoint jumps.
12888 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12889 (set_fast_tracepoint_jump): Declare.
12890 (delete_fast_tracepoint_jump)
12891 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12892 (reinsert_fast_tracepoint_jumps_at): Declare.
12893 * regcache.c: Don't compile many functions when building the
12894 in-process agent library.
12895 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12896 the register buffer in the heap.
12897 (free_register_cache): If the register buffer isn't owned by the
12898 regcache, don't free it.
12899 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12900 pre-existing register caches.
12901 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12902 type.
12903 (convert_ascii_to_int): : Constify `from' parameter type.
12904 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12905 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12906 the needed buffer in-place.
12907 (relocate_instruction): New.
12908 * server.c (handle_query) <qSymbols>: If the target supports
12909 tracepoints, give it a chance of looking up symbols. Report
12910 support for fast tracepoints.
12911 (handle_status): Stabilize threads.
12912 (process_serial_event): Adjust.
12913 * server.h (struct fast_tracepoint_jump): Forward declare.
12914 (struct process_info) <fast_tracepoint_jumps>: New field.
12915 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12916 (decode_X_packet, decode_M_packet): Adjust.
12917 (relocate_instruction): Declare.
12918 (in_process_agent_loaded): Declare.
12919 (tracepoint_look_up_symbols): Declare.
12920 (struct fast_tpoint_collect_status): Declare.
12921 (fast_tracepoint_collecting): Declare.
12922 (force_unlock_trace_buffer): Declare.
12923 (handle_tracepoint_bkpts): Declare.
12924 (initialize_low_tracepoint)
12925 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12926 * target.h (struct target_ops) <stabilize_threads,
12927 install_fast_tracepoint_jump_pad>: New fields.
12928 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12929 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12930 [HAVE_STDINT_H]: Include stdint.h.
12931 (trace_debug_1): Rename to ...
12932 (trace_vdebug): ... this.
12933 (trace_debug): Rename to ...
12934 (trace_debug_1): ... this. Add `level' parameter.
12935 (trace_debug): New.
12936 (ATTR_USED, ATTR_NOINLINE): New.
12937 (IP_AGENT_EXPORT): New.
12938 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12939 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12940 (about_to_request_buffer_space, trace_buffer_is_full)
12941 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12942 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12943 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12944 (traceframe_write_count, traceframes_created)
12945 (trace_state_variables)
12946 New renaming defines.
12947 (struct ipa_sym_addresses): New.
12948 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12949 (symbol_list): New.
12950 (ipa_sym_addrs): New.
12951 (all_tracepoint_symbols_looked_up): New.
12952 (in_process_agent_loaded): New.
12953 (write_e_ipa_not_loaded): New.
12954 (maybe_write_ipa_not_loaded): New.
12955 (tracepoint_look_up_symbols): New.
12956 (debug_threads) [IN_PROCESS_AGENT]: New.
12957 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12958 (UNKNOWN_SIDE_EFFECTS): New.
12959 (stop_tracing): New.
12960 (flush_trace_buffer): New.
12961 (stop_tracing_bkpt): New.
12962 (flush_trace_buffer_bkpt): New.
12963 (read_inferior_integer): New.
12964 (read_inferior_uinteger): New.
12965 (read_inferior_data_pointer): New.
12966 (write_inferior_data_pointer): New.
12967 (write_inferior_integer): New.
12968 (write_inferior_uinteger): New.
12969 (struct collect_static_trace_data_action): Delete.
12970 (enum tracepoint_type): New.
12971 (struct tracepoint) <type>: New field `type'.
12972 <actions_str, step_actions, step_actions_str>: Only include in
12973 GDBserver.
12974 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12975 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12976 (tracepoints): Use IP_AGENT_EXPORT.
12977 (last_tracepoint): Don't include in the IPA.
12978 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12979 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12980 (alloced_trace_state_variables): New.
12981 (trace_state_variables): Use IP_AGENT_EXPORT.
12982 (traceframe_t): Delete unused variable.
12983 (circular_trace_buffer): Don't include in the IPA.
12984 (trace_buffer_start): Delete.
12985 (struct trace_buffer_control): New.
12986 (trace_buffer_free): Delete.
12987 (struct ipa_trace_buffer_control): New.
12988 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12989 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12990 New.
12991 (trace_buffer_ctrl): New.
12992 (TRACE_BUFFER_CTRL_CURR): New.
12993 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12994 Reimplement as macros.
12995 (trace_buffer_wrap): Delete.
12996 (traceframe_write_count, traceframe_read_count)
12997 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12998 (struct tracepoint_hit_ctx) <type>: New field.
12999 (struct fast_tracepoint_ctx): New.
13000 (memory_barrier): New.
13001 (cmpxchg): New.
13002 (record_tracepoint_error): Update atomically in the IPA.
13003 (clear_inferior_trace_buffer): New.
13004 (about_to_request_buffer_space): New.
13005 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13006 updating the same buffer.
13007 (add_tracepoint): Default the tracepoint's type to trap
13008 tracepoint, and orig_size to -1.
13009 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13010 internal variables.
13011 (create_trace_state_variable): New parameter `gdb'. Handle it.
13012 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13013 (cmd_qtdp): Handle fast tracepoints.
13014 (cmd_qtdv): Adjust.
13015 (max_jump_pad_size): New.
13016 (gdb_jump_pad_head): New.
13017 (get_jump_space_head): New.
13018 (claim_jump_space): New.
13019 (sort_tracepoints): New.
13020 (MAX_JUMP_SIZE): New.
13021 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13022 IPA.
13023 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13024 support. Upload fast traceframes, and delete internal IPA
13025 breakpoints.
13026 (stop_tracing_handler): New.
13027 (flush_trace_buffer_handler): New.
13028 (cmd_qtstop): Upload fast tracepoints.
13029 (response_tracepoint): Handle fast tracepoints.
13030 (tracepoint_finished_step): Upload fast traceframes. Set the
13031 tracepoint hit context's tracepoint type.
13032 (handle_tracepoint_bkpts): New.
13033 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13034 type. Add comment about fast tracepoints.
13035 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13036 non-existing action_str field.
13037 (get_context_regcache): Handle fast tracepoints.
13038 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13039 to the regcache.
13040 (fast_tracepoint_from_jump_pad_address): New.
13041 (fast_tracepoint_from_ipa_tpoint_address): New.
13042 (collecting_t): New.
13043 (force_unlock_trace_buffer): New.
13044 (fast_tracepoint_collecting): New.
13045 (collecting): New.
13046 (gdb_collect): New.
13047 (write_inferior_data_ptr): New.
13048 (target_tp_heap): New.
13049 (target_malloc): New.
13050 (download_agent_expr): New.
13051 (UALIGN): New.
13052 (download_tracepoints): New.
13053 (download_trace_state_variables): New.
13054 (upload_fast_traceframes): New.
13055 (IPA_FIRST_TRACEFRAME): New.
13056 (IPA_NEXT_TRACEFRAME_1): New.
13057 (IPA_NEXT_TRACEFRAME): New.
13058 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13059 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13060 (gdb_jump_pad_buffer_end): New.
13061 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13062 (initialize_tracepoint): Adjust.
13063 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13064 buffer. Initialize the low module.
13065 * utils.c (PREFIX, TOOLNAME): New.
13066 (malloc_failure): Use PREFIX.
13067 (error): In the IPA, an error causes an exit.
13068 (fatal, warning): Use PREFIX.
13069 (internal_error): Use TOOLNAME.
13070 (NUMCELLS): Increase to 10.
13071 * configure, config.in: Regenerate.
13072
13073 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13074
13075 * server.c (handle_query) <qSupported>: Do two passes over the
13076 qSupported string to avoid nesting strtok.
13077
13078 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13079
13080 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13081 (CDEPS): New.
13082 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13083 -Wl,--dynamic-list.
13084 * configure: Regenerate.
13085 * proc-service.list: New.
13086
13087 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13088
13089 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13090 New comment.
13091
13092 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13093
13094 * gdbreplay.c (remote_open): Check error return from socket() call by
13095 its equality to -1 not by it being negative.
13096 * remote-utils.c (remote_open): Likewise.
13097
13098 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13099
13100 * config.h: Regenerate.
13101
13102 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13103
13104 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13105 doesn't provide PTRACE_GET_THREAD_AREA.
13106
13107 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13108
13109 * linux-m68k-low.c: Include <asm/ptrace.h>
13110 (ps_get_thread_area): Implement.
13111
13112 2010-05-03 Doug Evans <dje@google.com>
13113
13114 * event-loop.c (struct callback_event): New struct.
13115 (callback_list): New global.
13116 (append_callback_event, delete_callback_event): New functions.
13117 (process_callback): New function.
13118 (start_event_loop): Call it.
13119 * remote-utils.c (NOT_SCHEDULED): Define.
13120 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13121 moved out of readchar.
13122 (readchar): Rewrite. Call reschedule before returning.
13123 (reset_readchar): New function.
13124 (remote_close): Call it.
13125 (process_remaining, reschedule): New functions.
13126 * server.h (callback_handler_func): New typedef.
13127 (append_callback_event, delete_callback_event): Declare.
13128
13129 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13130
13131 * proc-service.c (ps_pglobal_lookup): Use
13132 thread_db_look_up_one_symbol.
13133 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13134 parameter. Use it instead of all_symbols_looked_up.
13135 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13136 field.
13137 (all_symbols_looked_up): Don't declare.
13138 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13139 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13140 field.
13141 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13142 Set all_symbols_looked_up here.
13143 (thread_db_look_up_one_symbol): New.
13144 (thread_db_get_tls_address): Adjust.
13145 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13146 thread_db object on the heap, and tentatively set it in the
13147 process structure.
13148 (thread_db_init): Don't set all_symbols_looked_up here.
13149 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13150
13151 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13152
13153 * linux-low.c (linux_kill, linux_detach): Adjust.
13154 (status_pending_p_callback): Remove redundant statement. Check
13155 for !TARGET_WAITIKIND_IGNORE, instead of
13156 TARGET_WAITKIND_STOPPED.
13157 (handle_tracepoints): Make sure LWP is locked. Adjust.
13158 (linux_wait_for_event_1): Adjust.
13159 (linux_cancel_breakpoints): New.
13160 (unsuspend_one_lwp): New.
13161 (unsuspend_all_lwps): New.
13162 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13163 (send_sigstop_callback): Change return type to int, add new
13164 `except' parameter and handle it.
13165 (suspend_and_send_sigstop_callback): New.
13166 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13167 pass them down. If SUSPEND, also increment the lwp's suspend
13168 count.
13169 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13170 (need_step_over_p): Don't consider suspended LWPs.
13171 (start_step_over): Adjust.
13172 (proceed_one_lwp): Change return type to int, add new `except'
13173 parameter and handle it.
13174 (unsuspend_and_proceed_one_lwp): New.
13175 (proceed_all_lwps): Use find_inferior instead of
13176 for_each_inferior.
13177 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13178 also decrement the suspend count of LWPs. Pass `except' down,
13179 instead of hacking its suspend count.
13180 (linux_pause_all): Add `freeze' parameter. Adjust.
13181 (linux_unpause_all): New.
13182 (linux_target_ops): Install linux_unpause_all.
13183 * server.c (handle_status): Adjust.
13184 * target.h (struct target_ops): New fields `unpause_all' and
13185 `cancel_breakpoints'. Add new parameter to `pause_all'.
13186 (pause_all): Add new `freeze' parameter.
13187 (unpause_all): New.
13188 (cancel_breakpoints): New.
13189 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13190 cancel breakpoints.
13191 (cmd_qtstart): Pause threads.
13192 (stop_tracing): Pause threads, and cancel breakpoints.
13193 * win32-low.c (win32_target_ops): Adjust.
13194
13195 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13196
13197 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13198 the inferior right away from here...
13199 (linux_wait_1): ... to here, and adjust to check the thread's
13200 last_resume_kind instead of the lwp's step or stop_expected flags.
13201
13202 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13203
13204 * README: Use consistent `GDB' and `GDBserver' spellings.
13205
13206 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13207
13208 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13209 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13210 (linux_detach_one_lwp): Assume the lwp is stopped.
13211 (any_thread_of): Delete.
13212 (linux_detach): Stop all lwps here. Don't blindly delete all
13213 breakpoints.
13214 (delete_lwp_callback): New.
13215 (linux_mourn): Delete all lwps of the process that is gone.
13216 (linux_wait_1): Don't delete the last lwp of the process here.
13217 * mem-break.h (mark_breakpoints_out): Declare.
13218 * mem-break.c (mark_breakpoints_out): New.
13219 (free_all_breakpoints): Use it.
13220 * server.c (handle_target_event): If the process is gone, mark
13221 breakpoints out.
13222 * thread-db.c (struct thread_db) <create_bp>: New field.
13223 (thread_db_enable_reporting): Fix prototype. Store a thread event
13224 breakpoint reference in the thread_db struct.
13225 (thread_db_load_search): Clear the thread_db object.
13226 (try_thread_db_load_1): Ditto.
13227 (switch_to_process): New.
13228 (disable_thread_event_reporting): Use it.
13229 (remove_thread_event_breakpoints): New.
13230 (thread_db_detach, thread_db_mourn): Use it.
13231
13232 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13233
13234 * linux-low.c (linux_enable_event_reporting): New.
13235 (linux_wait_for_event_1, handle_extended_wait): Use it.
13236
13237 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13238
13239 * linux-low.c (linux_kill_one_lwp, linux_kill)
13240 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13241 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13242 SIGSTOP even if the LWP is stopped.
13243 (send_sigstop_callback): New.
13244 (stop_all_lwps): Use send_sigstop_callback instead.
13245 (linux_resume_one_thread): Adjust.
13246 (proceed_one_lwp): Still proceed an LWP that the client has
13247 requested to stop, if we haven't reported it as stopped yet. Make
13248 sure that LWPs the client want stopped, have a pending SIGSTOP.
13249
13250 2010-04-26 Doug Evans <dje@google.com>
13251
13252 * server.c (handle_general_set): Make static.
13253
13254 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13255 Print received char after testing for error/eof instead of before.
13256 (input_interrupt): Tweak comment.
13257
13258 2010-04-23 Doug Evans <dje@google.com>
13259
13260 * server.c (start_inferior): Print inferior argv if --debug.
13261
13262 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13263
13264 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13265 * nto-x86-low.c: Include server.h
13266
13267 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13268
13269 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13270 be consistent with other sources of this directory.
13271 (init_registers_amd64): Correct name of source file of this function
13272 in the comment.
13273
13274 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13275
13276 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13277 64-bit executables.
13278
13279 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13280
13281 * win32-i386-low.c: Add 64-bit support.
13282 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13283 (init_registers_amd64): Declare.
13284 (mappings): Add 64-bit version of array.
13285 (init_windows_x86): New function.
13286 (the_low_target): Change init_arch field to init_windows_x86.
13287
13288 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13289
13290 * win32-low.c: Adapt to support also 64-bit architecture.
13291 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13292 (get_image_name): Use SIZE_T type for local variable `done'.
13293 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13294 (toolhelp_get_dll_name): Idem.
13295 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13296 Use uintptr_t typecast to avoid warning.
13297 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13298 (handle_exception): Use phex_nz to avoid warning.
13299 (win32_wait): Remove unused local variable `process'.
13300
13301 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13302
13303 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13304 `amd64-avx.o'.
13305
13306 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13307
13308 * configure.ac: Use `ws2_32' library for srv_mingw.
13309 * configure: Regenerate.
13310 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13311 * remote-utils.c: Likewise.
13312
13313 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13314
13315 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13316 if __x86_64__ is defined.
13317
13318 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13319
13320 * configure: Regenerate.
13321
13322 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13323
13324 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13325 * target.h (target_ops): New get_tib_address field.
13326 * win32-low.h (win32_thread_info): Add thread_local_base field.
13327 * win32-low.c (child_add_thread): Add tlb argument.
13328 Set thread_local_base field to TLB.
13329 (get_child_debug_event): Adapt to child_add_thread change.
13330 (win32_get_tib_address): New function.
13331 (win32_target_ops): Set get_tib_address field to
13332 win32_get_tib_address.
13333 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13334
13335 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13336
13337 * linux-low.c (linux_mourn): Also remove the process.
13338 * server.c (handle_target_event): Don't remove the process here.
13339 * nto-low.c (nto_mourn): New.
13340 (nto_target_ops): Install it.
13341 * spu-low.c (spu_mourn): New.
13342 (spu_target_ops): Install it.
13343 * win32-low.c (win32_mourn): New.
13344 (win32_target_ops): Install it.
13345
13346 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13347
13348 * server.h (buffer_xml_printf): Remove redundant `;'.
13349
13350 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13351
13352 * regcache.c (set_register_cache): Invalidate regcaches before
13353 changing the register cache layout.
13354 (regcache_invalidate_one): Allow a NULL regcache.
13355 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13356 regcaches before changing the register cache layout or the target
13357 regsets.
13358
13359 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13360
13361 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13362 variable warning on Linux/x86-64.
13363
13364 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13365
13366 GDBserver disconnected tracing support.
13367
13368 * linux-low.c (linux_remove_process): Delete.
13369 (add_lwp): Don't set last_resume_kind here.
13370 (linux_kill): Use `mourn'.
13371 (linux_detach): Use `thread_db_detach', and `mourn'.
13372 (linux_mourn): New.
13373 (linux_attach_lwp_1): Adjust comment.
13374 (linux_attach): last_resume_kind moved the thread_info; adjust.
13375 (status_pending_p_callback): Adjust.
13376 (linux_wait_for_event_1): Adjust.
13377 (count_events_callback, select_singlestep_lwp_callback)
13378 (select_event_lwp_callback, cancel_breakpoints_callback)
13379 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13380 (proceed_one_lwp): Adjust.
13381 (linux_async): Add debug output.
13382 (linux_thread_stopped): New.
13383 (linux_pause_all): New.
13384 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13385 linux_pause_all.
13386 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13387 (thread_db_free): Delete declaration.
13388 (thread_db_detach, thread_db_mourn): Declare.
13389 * thread-db.c (thread_db_init): Use thread_db_mourn.
13390 (thread_db_free): Delete, split in two.
13391 (disable_thread_event_reporting): New.
13392 (thread_db_detach): New.
13393 (thread_db_mourn): New.
13394
13395 * server.h (struct thread_info) <last_resume_kind>: New field.
13396 <attached>: Add comment.
13397 <gdb_detached>: New field.
13398 (handler_func): Change return type to int.
13399 (handle_serial_event, handle_target_event): Ditto.
13400 (gdb_connected): Declare.
13401 (tracing): Delete.
13402 (disconnected_tracing): Declare.
13403 (stop_tracing): Declare.
13404
13405 * server.c (handle_query) <qSupported>: Report support for
13406 disconnected tracing.
13407 (queue_stop_reply_callback): Account for running threads.
13408 (gdb_wants_thread_stopped): New.
13409 (gdb_wants_all_threads_stopped): New.
13410 (gdb_reattached_process): New.
13411 (handle_status): Clear the `gdb_detached' flag of all processes.
13412 In all-stop, stop all threads.
13413 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13414 (process_serial_event): If the remote connection breaks, or if an
13415 exit was forced with "monitor exit", force an event loop exit.
13416 Handle disconnected tracing on detach.
13417 (handle_serial_event): Adjust.
13418 (handle_target_event): If GDB isn't connected, forward events back
13419 to the inferior, unless the last process exited, in which case,
13420 exit gdbserver. Adjust interface.
13421
13422 * remote-utils.c (remote_open): Don't block in accept. Instead
13423 register an event loop source on the listen socket file
13424 descriptor. Refactor bits into ...
13425 (listen_desc): ... this new global.
13426 (gdb_connected): ... this new function.
13427 (enable_async_notification): ... this new function.
13428 (handle_accept_event): ... this new function.
13429 (remote_close): Clear remote_desc.
13430
13431 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13432
13433 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13434 New fields.
13435 (mourn_inferior): Define.
13436 (target_process_qsupported): Avoid the dangling else problem.
13437 (thread_stopped): Define.
13438 (pause_all): Define.
13439 (target_waitstatus_to_string): Declare.
13440 * target.c (target_waitstatus_to_string): New.
13441
13442 * tracepoint.c (tracing): Make extern.
13443 (disconnected_tracing): New.
13444 (stop_tracing): Make extern. Handle tracing stops due to GDB
13445 disconnecting.
13446 (cmd_qtdisconnected): New.
13447 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13448 (handle_tracepoint_general_set): Handle QTDisconnected.
13449
13450 * event-loop.c (event_handler_func): Change return type to int.
13451 (process_event): Bail out if the event handler wants the event
13452 loop to stop.
13453 (handle_file_event): Ditto.
13454 (start_event_loop): Bail out if the event handler wants the event
13455 loop to stop.
13456
13457 * nto-low.c (nto_target_ops): Adjust.
13458 * spu-low.c (spu_wait): Don't remove the process here.
13459 (spu_target_ops): Adjust.
13460 * win32-low.c (win32_wait): Don't remove the process here.
13461 (win32_target_ops): Adjust.
13462
13463 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13464
13465 * regcache.c (realloc_register_cache): Invalidate inferior's
13466 regcache before recreating it.
13467
13468 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13469
13470 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13471
13472 2010-04-09 Stan Shebs <stan@codesourcery.com>
13473 Pedro Alves <pedro@codesourcery.com>
13474
13475 * server.h (LONGEST): New.
13476 (struct thread_info) <while_stepping>: New field.
13477 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13478 Declare.
13479 (initialize_tracepoint, handle_tracepoint_general_set)
13480 (handle_tracepoint_query, tracepoint_finished_step)
13481 (tracepoint_was_hit, release_while_stepping_state_list):
13482 (current_traceframe): Declare.
13483 * server.c (handle_general_set): Handle tracepoint packets.
13484 (read_memory): New.
13485 (write_memory): New.
13486 (handle_search_memory_1): Use read_memory.
13487 (handle_query): Report support for conditional tracepoints, trace
13488 state variables, and tracepoint sources. Handle tracepoint
13489 queries.
13490 (main): Initialize the tracepoints module.
13491 (process_serial_event): Handle traceframe reads/writes.
13492
13493 * linux-low.c (handle_tracepoints): New.
13494 (linux_wait_1): Call it.
13495 (linux_resume_one_lwp): Handle while-stepping.
13496 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13497 (linux_target_ops): Install them.
13498 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13499 New field.
13500 * linux-x86-low.c (x86_supports_tracepoints): New.
13501 (the_low_target). Install it.
13502
13503 * mem-break.h (delete_breakpoint): Declare.
13504 * mem-break.c (delete_breakpoint): Make external.
13505
13506 * target.h (struct target_ops): Add `supports_tracepoints',
13507 `read_pc', and `write_pc' fields.
13508 (target_supports_tracepoints): Define.
13509 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13510 (phex_nz): New.
13511
13512 * regcache.h (struct regcache) <registers_owned>: New field.
13513 (init_register_cache, regcache_cpy): Declare.
13514 (regcache_read_pc, regcache_write_pc): Declare.
13515 (register_cache_size): Declare.
13516 (supply_regblock): Declare.
13517 * regcache.c (init_register_cache): New.
13518 (new_register_cache): Use it.
13519 (regcache_cpy): New.
13520 (register_cache_size): New.
13521 (supply_regblock): New.
13522 (regcache_read_pc, regcache_write_pc): New.
13523
13524 * tracepoint.c: New.
13525
13526 * Makefile.in (OBS): Add tracepoint.o.
13527 (tracepoint.o): New rule.
13528
13529 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13530
13531 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13532 (i386-mmx.o): New.
13533 (i386-mmx.c): Likewise.
13534 (i386-mmx-linux.o): Likewise.
13535 (i386-mmx-linux.c): Likewise.
13536
13537 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13538 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13539 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13540 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13541
13542 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13543 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13544 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13545
13546 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13547
13548 * Makefile.in (clean): Updated.
13549 (i386-avx.o): New.
13550 (i386-avx.c): Likewise.
13551 (i386-avx-linux.o): Likewise.
13552 (i386-avx-linux.c): Likewise.
13553 (amd64-avx.o): Likewise.
13554 (amd64-avx.c): Likewise.
13555 (amd64-avx-linux.o): Likewise.
13556 (amd64-avx-linux.c): Likewise.
13557
13558 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13559 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13560 (srv_amd64_regobj): Add amd64-avx.o.
13561 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13562 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13563 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13564 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13565 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13566 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13567 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13568
13569 * i387-fp.c: Include "i386-xstate.h".
13570 (i387_xsave): New.
13571 (i387_cache_to_xsave): Likewise.
13572 (i387_xsave_to_cache): Likewise.
13573 (x86_xcr0): Likewise.
13574
13575 * i387-fp.h (i387_cache_to_xsave): Likewise.
13576 (i387_xsave_to_cache): Likewise.
13577 (x86_xcr0): Likewise.
13578
13579 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13580 * linux-crisv32-low.c (target_regsets): Likewise.
13581 * linux-m68k-low.c (target_regsets): Likewise.
13582 * linux-mips-low.c (target_regsets): Likewise.
13583 * linux-ppc-low.c (target_regsets): Likewise.
13584 * linux-s390-low.c (target_regsets): Likewise.
13585 * linux-sh-low.c (target_regsets): Likewise.
13586 * linux-sparc-low.c (target_regsets): Likewise.
13587 * linux-xtensa-low.c (target_regsets): Likewise.
13588
13589 * linux-low.c: Include <sys/uio.h>.
13590 (regsets_fetch_inferior_registers): Support nt_type.
13591 (regsets_store_inferior_registers): Likewise.
13592 (linux_process_qsupported): New.
13593 (linux_target_ops): Add linux_process_qsupported.
13594
13595 * linux-low.h (regset_info): Add nt_type.
13596 (linux_target_ops): Add process_qsupported.
13597
13598 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13599 and <sys/uio.h>.
13600 (init_registers_i386_avx_linux): New.
13601 (init_registers_amd64_avx_linux): Likewise.
13602 (xmltarget_i386_linux_no_xml): Likewise.
13603 (xmltarget_amd64_linux_no_xml): Likewise.
13604 (PTRACE_GETREGSET): Likewise.
13605 (PTRACE_SETREGSET): Likewise.
13606 (x86_fill_xstateregset): Likewise.
13607 (x86_store_xstateregset): Likewise.
13608 (use_xml): Likewise.
13609 (x86_linux_update_xmltarget): Likewise.
13610 (x86_linux_process_qsupported): Likewise.
13611 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13612 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13613 init_registers_i386_linux here. Call
13614 x86_linux_update_xmltarget.
13615 (the_low_target): Add x86_linux_process_qsupported.
13616
13617 * server.c (handle_query): Call target_process_qsupported.
13618
13619 * target.h (target_ops): Add process_qsupported.
13620 (target_process_qsupported): New.
13621
13622 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13623
13624 * inferiors.c (add_thread): Set last_status kind to
13625 TARGET_WAITKIND_IGNORE.
13626 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13627 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13628 (linux_wait_1): Move `thread' local definition to block that uses
13629 it. Don't NULL initialize `event_child'.
13630 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13631 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13632 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13633
13634 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13635
13636 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13637 an extended waitstatus, or by a watchpoint.
13638 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13639 thread was stepping or has been stopped by a watchpoint.
13640
13641 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13642
13643 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13644 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13645 of another, then delete the previous, and validate all
13646 breakpoints.
13647 (validate_inserted_breakpoint): New.
13648 (delete_disabled_breakpoints): New.
13649 (validate_breakpoints): New.
13650 (check_mem_read): Validate breakpoints before trusting their
13651 shadow. Delete disabled breakpoints.
13652 (check_mem_write): Validate breakpoints before trusting they
13653 should be inserted. Delete disabled breakpoints.
13654 * mem-break.h (validate_breakpoints):
13655 * server.c (handle_query): Validate breakpoints when we see a
13656 qSymbol query.
13657
13658 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13659
13660 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13661 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13662 if we could tell there's a GDB breakpoint at stop_pc.
13663 (need_step_over_p): Don't do a step over if we find a GDB
13664 breakpoint at the resume PC.
13665
13666 * mem-break.c (struct raw_breakpoint): New.
13667 (enum bkpt_type): New type `gdb_breakpoint'.
13668 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13669 fields. New field `raw'.
13670 (find_raw_breakpoint_at): New.
13671 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13672 breakpoint instead.
13673 (set_breakpoint_at): Adjust.
13674 (delete_raw_breakpoint): New.
13675 (release_breakpoint): New.
13676 (delete_breakpoint): Rename to...
13677 (delete_breakpoint_1): ... this. Add proc parameter. Use
13678 release_breakpoint. Return ENOENT.
13679 (delete_breakpoint): Reimplement.
13680 (find_breakpoint_at): Delete.
13681 (find_gdb_breakpoint_at): New.
13682 (delete_breakpoint_at): Delete.
13683 (set_gdb_breakpoint_at): New.
13684 (delete_gdb_breakpoint_at): New.
13685 (gdb_breakpoint_here): New.
13686 (set_reinsert_breakpoint): Use release_breakpoint.
13687 (uninsert_breakpoint): Rename to ...
13688 (uninsert_raw_breakpoint): ... this.
13689 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13690 (reinsert_raw_breakpoint): Change parameter type to
13691 raw_breakpoint.
13692 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13693 instead.
13694 (check_breakpoints): Adjust. Use release_breakpoint.
13695 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13696 (breakpoint_inserted_here): Ditto.
13697 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13698 Don't trust the breakpoint's shadow if it is not inserted.
13699 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13700 (delete_all_breakpoints): Adjust.
13701 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13702 use delete_breakpoint_1.
13703
13704 * mem-break.h (breakpoints_supported): Delete declaration.
13705 (set_gdb_breakpoint_at): Declare.
13706 (gdb_breakpoint_here): Declare.
13707 (delete_breakpoint_at): Delete.
13708 (delete_gdb_breakpoint_at): Declare.
13709
13710 * server.h (struct raw_breakpoint): Forward declare.
13711 (struct process_info): New field `raw_breakpoints'.
13712
13713 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13714 breakpoints.
13715
13716 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13717
13718 * linux-low.c (status_pending_p_callback): Fix comment.
13719 (linux_wait_for_event_1): Move most of the internal breakpoint
13720 handling from here...
13721 (linux_wait_1): ... to here.
13722 (count_events_callback): New.
13723 (select_singlestep_lwp_callback): New.
13724 (select_event_lwp_callback): New.
13725 (cancel_breakpoints_callback): New.
13726 (select_event_lwp): New.
13727 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13728 priority to all LWPs that have had events that should be reported
13729 to the client. Cancel breakpoints when about to reporting the
13730 event to the client, not while stopping lwps. No longer cancel
13731 finished single-steps here.
13732 (cancel_finished_single_step): Delete.
13733 (cancel_finished_single_steps): Delete.
13734
13735 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13736
13737 * mem-break.c (enum bkpt_type): New.
13738 (struct breakpoint): New field `type'.
13739 (set_breakpoint_at): Change return type to struct breakpoint
13740 pointer. Set type to `other_breakpoint' by default.
13741 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13742 in the breakpoint list.
13743 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13744 (reinsert_breakpoint): Rename to ...
13745 (reinsert_raw_breakpoint): ... this.
13746 (reinsert_breakpoints_at): Adjust.
13747 * mem-break.h (struct breakpoint): Declare.
13748 (set_breakpoint_at): Change return type to struct breakpoint
13749 pointer.
13750
13751 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13752
13753 * server.c (handle_query): Assign, not compare.
13754
13755 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13756
13757 Teach linux gdbserver to step-over-breakpoints.
13758
13759 * linux-low.c (can_hardware_single_step): New.
13760 (supports_breakpoints): New.
13761 (handle_extended_wait): If stopping threads, read the stop pc of
13762 the new cloned LWP.
13763 (get_pc): New.
13764 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13765 low target doesn't support retrieving the PC.
13766 (add_lwp): Set last_resume_kind to resume_continue.
13767 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13768 (linux_attach): Don't clear stop_expected. Set the lwp's
13769 last_resume_kind to resume_stop.
13770 (linux_detach_one_lwp): Don't check for removed breakpoints.
13771 (check_removed_breakpoint): Delete.
13772 (status_pending_p): Rename to ...
13773 (status_pending_p_callback): ... this. Don't check for removed
13774 breakpoints. Don't consider threads that are stopped from GDB's
13775 perspective.
13776 (linux_wait_for_lwp): Always read the stop_pc here.
13777 (cancel_breakpoint): New.
13778 (step_over_bkpt): New global.
13779 (linux_wait_for_event_1): Implement stepping over breakpoints.
13780 (gdb_wants_lwp_stopped): New.
13781 (gdb_wants_all_stopped): New.
13782 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13783 single-step traps here. Store the thread's last reported target
13784 wait status.
13785 (send_sigstop): Don't clear stop_expected. Always set it,
13786 instead.
13787 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13788 (cancel_finished_single_step): New.
13789 (cancel_finished_single_steps): New.
13790 (wait_for_sigstop): Don't cancel finished single-step traps here.
13791 (linux_resume_one_lwp): Don't check for removed breakpoints.
13792 Don't set `step' on non-hardware step archs.
13793 (linux_set_resume_request): Ignore resume_stop requests if already
13794 stopping or stopped. Set the lwp's last_resume_kind.
13795 (resume_status_pending_p): Don't check for removed breakpoints.
13796 (need_step_over_p): New.
13797 (start_step_over): New.
13798 (finish_step_over): New.
13799 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13800 requests. Clear the thread's last reported target waitstatus.
13801 Don't use the `suspended' flag. Don't consider pending breakpoints.
13802 (linux_resume): Start a step-over if necessary.
13803 (proceed_one_lwp): New.
13804 (proceed_all_lwps): New.
13805 (unstop_all_lwps): New.
13806 * linux-low.h (struct lwp_info): Rewrite comment for the
13807 `suspended' flag. Add the `stop_pc' field. Delete the
13808 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13809 Add `'last_resume_kind' and `need_step_over' fields.
13810 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13811 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13812 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13813 (set_raw_breakpoint_at): New.
13814 (set_breakpoint_at): Rewrite to use it.
13815 (reinsert_breakpoint_handler): Delete.
13816 (set_reinsert_breakpoint): New.
13817 (reinsert_breakpoint_by_bp): Delete.
13818 (delete_reinsert_breakpoints): New.
13819 (uninsert_breakpoint): Rewrite.
13820 (uninsert_breakpoints_at): New.
13821 (reinsert_breakpoint): Rewrite.
13822 (reinsert_breakpoints_at): New.
13823 (check_breakpoints): Rewrite.
13824 (breakpoint_here): New.
13825 (breakpoint_inserted_here): New.
13826 (check_mem_read): Adjust.
13827 * mem-break.h (breakpoints_supported, breakpoint_here)
13828 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13829 (reinsert_breakpoint_by_bp): Delete declaration.
13830 (delete_reinsert_breakpoints): Declare.
13831 (reinsert_breakpoint): Delete declaration.
13832 (reinsert_breakpoints_at): Declare.
13833 (uninsert_breakpoint): Delete declaration.
13834 (uninsert_breakpoints_at): Declare.
13835 (check_breakpoints): Adjust prototype.
13836 * server.h: Adjust include order.
13837 (struct thread_info): Declare here. Add a `last_status' field.
13838
13839 2010-03-23 Michael Snyder <msnyder@vmware.com>
13840
13841 * server.c (crc32): New function.
13842 (handle_query): Add handling for 'qCRC:' request.
13843
13844 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13845
13846 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13847 lwp had been stopped by a watchpoint.
13848
13849 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13850
13851 * server.h (internal_error): Declare.
13852 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13853 * utils.c (internal_error): New function.
13854
13855 2010-03-15 Andreas Schwab <schwab@redhat.com>
13856
13857 * configure.srv: Fix typo setting srv_regobj.
13858
13859 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13860
13861 * linux-low.c (fetch_register): Avoid passing a non string literal
13862 format to `error'.
13863 (usr_store_inferior_registers): Ditto.
13864
13865 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13866
13867 * linux-low.c (linux_write_memory): Bail out early if peeking
13868 memory failed.
13869
13870 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13871
13872 * linux-low.h (struct lwp_info): New fields
13873 `stopped_by_watchpoint' and `stopped_data_address'.
13874 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13875 here, and cache them in the lwp object.
13876 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13877 directly.
13878 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13879 field.
13880 (linux_stopped_by_watchpoint): Rewrite.
13881 (linux_stopped_data_address): Rewrite.
13882
13883 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13884
13885 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13886 switching the current inferior, not before.
13887
13888 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13889
13890 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13891 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13892 i386-linux.c and amd64-linux.c.
13893 (reg-i386.o): Removed.
13894 (reg-i386.c): Likewise.
13895 (reg-i386-linux.o): Likewise.
13896 (reg-i386-linux.c): Likewise.
13897 (reg-x86-64.o): Likewise.
13898 (reg-x86-64.c): Likewise.
13899 (reg-x86-64-linux.o): Likewise.
13900 (reg-x86-64-linux.c): Likewise.
13901 (i386.o): New.
13902 (i386.c): Likewise.
13903 (i386-linux.o): Likewise.
13904 (i386-linux.c): Likewise.
13905 (amd64.o): Likewise.
13906 (amd64.c): Likewise.
13907 (amd64-linux.o): Likewise.
13908 (amd64-linux.c): Likewise.
13909
13910 * configure.srv (srv_i386_regobj): New.
13911 (srv_i386_linux_regobj): Likewise.
13912 (srv_amd64_regobj): Likewise.
13913 (srv_amd64_linux_regobj): Likewise.
13914 (srv_i386_32bit_xmlfiles): Likewise.
13915 (srv_i386_64bit_xmlfiles): Likewise.
13916 (srv_i386_xmlfiles): Likewise.
13917 (srv_amd64_xmlfiles): Likewise.
13918 (srv_i386_linux_xmlfiles): Likewise.
13919 (srv_amd64_linux_xmlfiles): Likewise.
13920 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13921 srv_xmlfiles to $srv_i386_xmlfiles.
13922 (i[34567]86-*-mingw32ce*): Likewise.
13923 (i[34567]86-*-mingw*): Likewise.
13924 (i[34567]86-*-nto*): Likewise.
13925 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13926 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13927 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13928 (x86_64-*-linux*): Likewise.
13929
13930 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13931 (init_registers_amd64_linux): New.
13932 (x86_arch_setup): Replace init_registers_x86_64_linux with
13933 init_registers_amd64_linux.
13934
13935 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13936
13937 * configure.ac: Check for libdl. If it is not available link against
13938 static libthread_db.
13939 * configure: Regenerate.
13940
13941 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13942
13943 PR9605
13944
13945 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13946 handing a read watchpoint.
13947 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13948
13949 2010-02-12 Doug Evans <dje@google.com>
13950
13951 * linux-low.c (linux_supports_tracefork_flag): Document.
13952 (linux_look_up_symbols): Add comment.
13953
13954 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13955
13956 * regcache.c (supply_register): Clear regcache if buf is NULL.
13957
13958 2010-02-02 Nicolas Roche <roche@sourceware.org>
13959 Joel Brobecker <brobecker@adacore.com>
13960
13961 * inferiors.c (find_inferior): Add function documentation.
13962 (unloaded_dll): Handle the case where the unloaded dll has not
13963 been previously registered in the dll list.
13964
13965 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13968 (thumb2_breakpoint): New.
13969 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13970
13971 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13972
13973 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13974 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13975 breakpoints.
13976
13977 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13978
13979 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13980
13981 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13982
13983 * linux-s390-low.c (s390_collect_ptrace_register)
13984 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13985
13986 2010-01-21 Doug Evans <dje@google.com>
13987
13988 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13989 (PTRACE_ARG4_TYPE): New macro.
13990 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13991 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13992 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13993 (usr_store_inferior_registers): Ditto.
13994 (linux_read_memory, linux_write_memory): Ditto.
13995 (linux_test_for_tracefork): Ditto.
13996
13997 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13998 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13999
14000 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14001
14002 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14003 target.
14004
14005 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14006
14007 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14008 prototype to take a regcache. Adjust.
14009
14010 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14011
14012 * regcache.h (struct thread_info): Forward declare.
14013 (struct regcache): New.
14014 (new_register_cache): Adjust prototype.
14015 (get_thread_regcache): Declare.
14016 (free_register_cache): Adjust prototype.
14017 (registers_to_string, registers_from_string): Ditto.
14018 (supply_register, supply_register_by_name, collect_register)
14019 (collect_register_as_string, collect_register_by_name): Ditto.
14020 * regcache.c (struct inferior_regcache_data): Delete.
14021 (get_regcache): Rename to ...
14022 (get_thread_regcache): ... this. Adjust. Switch inferior before
14023 fetching registers.
14024 (regcache_invalidate_one): Adjust.
14025 (regcache_invalidate): Fix prototype.
14026 (new_register_cache): Return the new register cache.
14027 (free_register_cache): Change prototype.
14028 (realloc_register_cache): Adjust.
14029 (registers_to_string): Change prototype to take a regcache. Adjust.
14030 (registers_from_string): Ditto.
14031 (register_data): Ditto.
14032 (supply_register): Ditto.
14033 (supply_register_by_name): Ditto.
14034 (collect_register): Ditto.
14035 (collect_register_as_string): Ditto.
14036 (collect_register_by_name): Ditto.
14037 * server.c (process_serial_event): Adjust.
14038 * linux-low.h (regset_fill_func, regset_store_func): Change
14039 prototype.
14040 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14041 Change prototype.
14042 * linux-low.c (get_stop_pc): Adjust.
14043 (check_removed_breakpoint): Adjust.
14044 (linux_wait_for_event): Adjust.
14045 (linux_resume_one_lwp): Adjust.
14046 (fetch_register): Add regcache parameter. Adjust.
14047 (usr_store_inferior_registers): Ditto.
14048 (regsets_fetch_inferior_registers): Ditto.
14049 (regsets_store_inferior_registers): Ditto.
14050 (linux_fetch_registers, linux_store_registers): Ditto.
14051 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14052 regcache. Adjust.
14053 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14054 Ditto.
14055 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14056 prototype to take a regcache.
14057 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14058 * remote-utils.c (convert_ascii_to_int, outreg)
14059 (prepare_resume_reply): Change prototype to take a regcache.
14060 Adjust.
14061 * target.h (struct target_ops) <fetch_registers, store_registers>:
14062 Change prototype to take a regcache.
14063 (fetch_inferior_registers, store_inferior_registers): Change
14064 prototype to take a regcache. Adjust.
14065 * proc-service.c (ps_lgetregs): Adjust.
14066 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14067 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14068 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14069 take a regcache. Adjust.
14070 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14071 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14072 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14073 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14074 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14075 (cris_cannot_fetch_register):
14076 (cris_breakpoint_at): Change prototype to take a regcache.
14077 Adjust.
14078 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14079 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14080 to take a regcache. Adjust.
14081 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14082 Adjust.
14083 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14084 take a regcache. Adjust.
14085 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14086 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14087 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14088 * linux-mips-low.c (mips_get_pc):
14089 (mips_set_pc): Change prototype to take a regcache. Adjust.
14090 (mips_reinsert_addr): Adjust.
14091 (mips_collect_register): Change prototype to take a regcache.
14092 Adjust.
14093 (mips_supply_register):
14094 (mips_collect_register_32bit, mips_supply_register_32bit)
14095 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14096 (mips_store_fpregset): Ditto.
14097 * linux-ppc-low.c (ppc_supply_ptrace_register)
14098 (ppc_supply_ptrace_register): Ditto.
14099 (parse_spufs_run): Adjust.
14100 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14101 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14102 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14103 take a regcache. Adjust.
14104 * linux-s390-low.c (s390_collect_ptrace_register)
14105 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14106 (s390_set_pc): Change prototype to take a regcache. Adjust.
14107 (s390_arch_setup): Adjust.
14108 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14109 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14110 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14111 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14112 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14113 regcache. Adjust.
14114 (sparc_breakpoint_at): Adjust.
14115 * linux-xtensa-low.c (xtensa_fill_gregset):
14116 (xtensa_store_gregset):
14117 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14118 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14119 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14120 prototype to take a regcache. Adjust.
14121 * win32-arm-low.c (arm_fetch_inferior_register)
14122 (arm_store_inferior_register): Change prototype to take a
14123 regcache. Adjust.
14124 * win32-i386-low.c (i386_fetch_inferior_register)
14125 (i386_store_inferior_register): Change prototype to take a
14126 regcache. Adjust.
14127 * win32-low.c (child_fetch_inferior_registers)
14128 (child_store_inferior_registers): Change prototype to take a
14129 regcache. Adjust.
14130 (win32_wait): Adjust.
14131 (win32_fetch_inferior_registers): Change prototype to take a
14132 regcache. Adjust.
14133 (win32_store_inferior_registers): Adjust.
14134 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14135 store_inferior_register>: Change prototype to take a regcache.
14136
14137 2010-01-20 Doug Evans <dje@google.com>
14138
14139 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14140 #ifdef.
14141 (linux_wait_for_event1, linux_init_signals): Ditto.
14142 (W_STOPCODE): Provide definition if missing.
14143
14144 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14145
14146 * linux-low.c (linux_core_of_thread): New.
14147 (compare_ints, show_process, list_threads): New.
14148 (linux_qxfer_osdata): Report threads and cores.
14149 (linux_target_op): Register linux_core_of_thread.
14150 * remote-utils.c (prepare_resume_reply): Report the core.
14151 (buffer_xml_printf): Support %d specifier.
14152 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14153 New.
14154 (handle_query): Handle qXfer:threads. Announce availability
14155 thereof.
14156 * target.h (struct target_ops): New field core_of_thread.
14157
14158 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14159
14160 * Makefile.in (clean): Remove new generated files.
14161 (reg-s390.o, reg-s390.c): Remove rules.
14162 (reg-s390x.o, reg-s390x.c): Likewise.
14163 (s390-linux32.o, s390-linux32.c): Add rules.
14164 (s390-linux64.o, s390-linux64.c): Likewise.
14165 (s390x-linux64.o, s390x-linux64.c): Likewise.
14166 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14167 * linux-s390-low.c: Include <elf.h>.
14168 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14169 (init_registers_s390): Remove prototype.
14170 (init_registers_s390x): Likewise.
14171 (init_registers_s390_linux32): Add prototype.
14172 (init_registers_s390_linux64): Likewise.
14173 (init_registers_s390x_linux64): Likewise.
14174 (s390_num_regs_3264): New define.
14175 (s390_regmap_3264): New global variable.
14176 (s390_cannot_fetch_register): Remove obsolete check.
14177 (s390_cannot_store_register): Likewise.
14178 (s390_collect_ptrace_register): Handle upper/lower register halves.
14179 (s390_supply_ptrace_register): Likewise.
14180 (s390_fill_gregset): Update to register number changes.
14181 (s390_get_hwcap): New routine.
14182 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14183 Install appropriate regmap and register set.
14184
14185 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14186
14187 * server.c (gdbserver_version): Update copyright year to 2010.
14188 * gdbreplay.c (gdbreplay_version): Likewise.
14189
14190 2009-12-28 Doug Evans <dje@google.com>
14191
14192 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14193 elf/external.h. Include <elf.h> instead but only if necessary.
14194
14195 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14196
14197 * linux-low.c (linux_remove_process): Remove `detaching'
14198 parameter. Don't release/detach from thread_db here.
14199 (linux_kill): Release/detach from thread_db here, ...
14200 (linux_detach): ... and here, before actually detaching.
14201 (linux_wait_1): ... and here, when a process exits.
14202 * thread-db.c (any_thread_of): New.
14203 (thread_db_free): Switch the current inferior to a thread of the
14204 passed in process.
14205
14206 2009-12-21 Doug Evans <dje@google.com>
14207
14208 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14209
14210 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14211 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14212 warning ifndef __NR_tkill. Move setting of errno there too.
14213 Delete unnecessary resetting of errno after syscall.
14214 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14215
14216 * configure.ac: Check for dladdr.
14217 * config.in: Regenerate.
14218 * configure: Regenerate.
14219 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14220 (try_thread_db_load): Update.
14221
14222 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14223
14224 2009-12-18 Doug Evans <dje@google.com>
14225
14226 * event-loop.c: Include unistd.h if it exists.
14227
14228 * linux-low.c (my_waitpid): Move definition away from being in
14229 between linux_tracefork_child/linux_test_for_tracefork.
14230
14231 * gdb_proc_service.h (psaddr_t): Fix type.
14232 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14233 signature to match glibc.
14234
14235 2009-12-16 Doug Evans <dje@google.com>
14236
14237 * linux-low.c (linux_read_memory): Fix argument to read.
14238
14239 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14240
14241 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14242 events, don't leave current_inferior pointing at null.
14243
14244 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14245
14246 * win32-low.c (LOG): Delete.
14247 (OUTMSG): Output to stderr.
14248 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14249 on compile time LOG macro.
14250 (win32_wait): Fix debug output.
14251
14252 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14253
14254 * win32-low.c (win32_add_one_solib): If the dll name is
14255 "ntdll.dll", prepend the system directory to the dll path.
14256
14257 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14260
14261 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14262 Vladimir Prus <vladimir@codesourcery.com>
14263
14264 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14265 * configure.ac: Check for __mcoldfire__ and set
14266 gdb_cv_m68k_is_coldfire.
14267 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14268 reg-cf.o and reg-m68k.o.
14269 * configure: Regenerated.
14270
14271 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14272
14273 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14274 Pass it to thread_db_free.
14275 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14276 proper `detaching' argument to linux_remove_process.
14277 * linux-low.h (thread_db_free): Add `detaching' parameter.
14278 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14279 to thread_db_free.
14280 (thread_db_free): Add `detaching' parameter. Only
14281 call td_ta_clear_event if detaching from process.
14282
14283 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14284
14285 * thread-db.c (thread_db_free): Fix typo.
14286
14287 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14288
14289 PR gdb/10838
14290 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14291
14292 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14293
14294 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14295 with an i686 compiler.
14296 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14297 needed.
14298 * configure: Rebuilt.
14299
14300 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14301
14302 PR gdb/10783
14303
14304 * server.c (handle_search_memory_1): Correct read_addr initialization
14305 in loop for searching subsequent chunks.
14306
14307 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14308
14309 * configure.ac: New --with-libthread-db option.
14310 * thread-db.c: Allow direct dependence on libthread_db.
14311 (thread_db_free): Adjust.
14312 * config.in: Regenerate.
14313 * configure: Likewise.
14314
14315 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14316
14317 PR gdb/10757
14318 * thread-db.c (attach_thread): New function.
14319 (maybe_attach_thread): Return success/failure.
14320 (find_new_threads_callback): Adjust.
14321 (thread_db_find_new_threads): Loop until no new threads.
14322
14323 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14324
14325 * proc-service.c (ps_lgetregs): Formatting.
14326
14327 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14328
14329 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14330 * configure.ac: Adjust.
14331 * linux-low.h (struct process_info_private): Move members to struct
14332 thread_db.
14333 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14334 * linux-low.c (linux_remove_process): Adjust.
14335 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14336 * server.c (handle_query): Move code ...
14337 (handle_monitor_command): ... here. New function.
14338 * target.h (struct target_ops): New member.
14339 * thread-db.c (struct thread_db): New.
14340 (libthread_db_search_path): New variable.
14341 (thread_db_create_event, thread_db_enable_reporting)
14342 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14343 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14344 (try_thread_db_load_1, dladdr_to_soname): New functions.
14345 (try_thread_db_load, thread_db_load_search): New functions.
14346 (thread_db_init): Search for libthread_db.
14347 (thread_db_free): New function.
14348 (thread_db_handle_monitor_command): Likewise.
14349 * config.in: Regenerate.
14350 * configure: Regenerate.
14351
14352 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14353
14354 * spu-low.c (spu_kill): Wait for inferior to terminate.
14355 Call clear_inferiors.
14356 (spu_detach): Call clear_inferiors.
14357
14358 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14359
14360 * aclocal.m4: Regenerate.
14361 * config.in: Likewise.
14362 * configure: Likewise.
14363
14364 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14365
14366 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14367 (parse_spufs_run): New function.
14368 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14369 (ppc_breakpoint_at): Handle SPU breakpoints.
14370
14371 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14372
14373 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14374 (SPUFS_MAGIC): Define.
14375 (spu_enumerate_spu_ids): New function.
14376 (linux_qxfer_spu): New function.
14377 (linux_target_ops): Install linux_qxfer_spu.
14378
14379 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14380
14381 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14382 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14383 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14384 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14385 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14386 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14387 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14388 (init_registers_powerpc_cell32l): Add prototype.
14389 (init_registers_powerpc_cell64l): Likewise.
14390 (ppc_arch_setup): Detect Cell/B.E. architecture.
14391
14392 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14393
14394 * Makefile.in (datarootdir): New variable.
14395
14396 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14397
14398 * linux-low.c (linux_write_memory): Update debugging output.
14399 * Makefile.in (clean): Add new descriptions.
14400 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14401 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14402 * configure.srv: Add new files for arm*-*-linux*.
14403 * linux-arm-low.c: Add new declarations.
14404 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14405 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14406 (HWCAP_VFPv3D16): New.
14407 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14408 instead of __IWMMXT__.
14409 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14410 (arm_arch_setup): New.
14411 (target_regsets): Remove #ifdef. Add VFP regset.
14412 (the_low_target): Use arm_arch_setup.
14413
14414 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14415
14416 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14417 the main thread again.
14418
14419 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14420
14421 Adding Neutrino gdbserver.
14422 * configure: Regenerated.
14423 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14424 * configure.srv (i[34567]86-*-nto*): New target.
14425 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14426 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14427 (nto_comctrl) [__QNX__]: New function.
14428 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14429
14430 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14431
14432 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14433 srv_tgtobj.
14434
14435 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14436 Pedro Alves <pedro@codesourcery.com>
14437
14438 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14439 don't support CONTEXT_EXTENDED_REGISTERS.
14440 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14441 (the_low_target): Install them.
14442 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14443 failing with ERROR_PIPE_NOT_CONNECTED.
14444
14445 2009-06-30 Doug Evans <dje@google.com>
14446 Pierre Muller <muller@ics.u-strasbg.fr>
14447
14448 Add h/w watchpoint support to x86-linux, win32-i386.
14449 * Makefile.in (SFILES): Add i386-low.c
14450 (i386_low_h): Define.
14451 (i386-low.o): Add dependencies.
14452 (linux-x86-low.o): Add i386-low.h dependency.
14453 (win32-i386-low.o): Ditto.
14454 * i386-low.c: New file.
14455 * i386-low.h: New file.
14456 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14457 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14458 * linux-low.c (linux_add_process): Initialize arch_private.
14459 (linux_remove_process): Free arch_private.
14460 (add_lwp): Initialize arch_private.
14461 (delete_lwp): Free arch_private.
14462 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14463 provided.
14464 * linux-low.h (process_info_private): New member arch_private.
14465 (lwp_info): New member arch_private.
14466 (linux_target_ops): New members new_process, new_thread,
14467 prepare_to_resume.
14468 (ptid_of): New macro.
14469 * linux-x86-low.c: Include stddef.h, i386-low.h.
14470 (arch_process_info): New struct.
14471 (arch_lwp_info): New struct.
14472 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14473 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14474 (i386_dr_low_get_status): New function.
14475 (x86_insert_point, x86_remove_point): New functions.
14476 (x86_stopped_by_watchpoint): New function.
14477 (x86_stopped_data_address): New function.
14478 (x86_linux_new_process, x86_linux_new_thread): New functions.
14479 (x86_linux_prepare_to_resume): New function.
14480 (the_low_target): Add entries for insert_point, remove_point,
14481 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14482 prepare_to_resume.
14483 * server.c (debug_hw_points): New global.
14484 (monitor_show_help): Document set debug-hw-points.
14485 (handle_query): Process "set debug-hw-points".
14486 * server.h (debug_hw_points): Declare.
14487 (paddress): Declare.
14488 * utils.c (NUMCELLS, CELLSIZE): New macros.
14489 (get_sell, xsnprintf, paddress): New functions.
14490 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14491 remove_point, stopped_by_watchpoint, stopped_data_address.
14492 * win32-i386-low.c: Include i386-low.h.
14493 (debug_reg_state): Replaces dr.
14494 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14495 (i386_dr_low_get_status): New function.
14496 (i386_insert_point, i386_remove_point): New functions.
14497 (i386_stopped_by_watchpoint): New function.
14498 (i386_stopped_data_address): New function.
14499 (i386_initial_stuff): Update.
14500 (get_thread_context,set_thread_context,i386_thread_added): Update.
14501 (the_low_target): Add entries for insert_point,
14502 remove_point, stopped_by_watchpoint, stopped_data_address.
14503 * win32-low.c (win32_insert_watchpoint): New function.
14504 (win32_remove_watchpoint): New function.
14505 (win32_stopped_by_watchpoint): New function.
14506 (win32_stopped_data_address): New function.
14507 (win32_target_ops): Add entries for insert_watchpoint,
14508 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14509 * win32-low.h (win32_target_ops): New members insert_point,
14510 remove_point, stopped_by_watchpoint, stopped_data_address.
14511
14512 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14513
14514 * server.c (process_serial_event): Re-return unsupported, not
14515 error, if the type isn't recognized. Re-allow supporting only
14516 insert or remove packets. Also call require_running for
14517 breakpoints. Add missing break statement to default case. Tidy.
14518 * target.h (struct target_ops): Rename insert_watchpoint to
14519 insert_point, and remove_watchpoint to remove_point.
14520
14521 * linux-low.h (struct linux_target_ops): Likewise.
14522 * linux-low.c (linux_insert_watchpoint): Rename to ...
14523 (linux_insert_point): ... this. Adjust.
14524 (linux_remove_watchpoint): Rename to ...
14525 (linux_remove_point): ... this. Adjust.
14526 (linux_target_ops): Adjust.
14527 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14528 (cris_insert_point): ... this.
14529 (cris_remove_watchpoint): Rename to ...
14530 (cris_remove_point): ... this.
14531 (the_low_target): Adjust.
14532
14533 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14534
14535 * server.c (handle_v_kill): Pass signal_pid to
14536 kill_inferior if multi_process is zero.
14537
14538 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14539
14540 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14541 * target.h (target_ops): Comment for *_watchpoint to make it clear
14542 the functions can get types '0' and '1'.
14543
14544 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14545
14546 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14547 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14548 * regcache.c (get_regcache): Likewise.
14549 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14550 * win32-low.c (child_fetch_inferior_registers): Remove check for
14551 regno 0.
14552
14553 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14554 Pedro Alves <pedro@codesourcery.com>
14555
14556 * target.h (struct target_ops) <supports_multi_process>: New
14557 callback.
14558 (target_supports_multi_process): New.
14559 * server.c (handle_query): Even if GDB reports support, only
14560 enable multi-process if the target also supports it. Report
14561 multi-process support only if the target backend supports it.
14562 * linux-low.c (linux_supports_multi_process): New function.
14563 (linux_target_ops): Install it as target_supports_multi_process
14564 callback.
14565
14566 2009-05-24 Doug Evans <dje@google.com>
14567
14568 Global renaming of find_thread_pid to find_thread_ptid.
14569 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14570 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14571 All callers updated.
14572
14573 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14574 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14575 directly.
14576
14577 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14578 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14579 (linux_resume_one_lwp): Ditto.
14580
14581 2009-05-23 Doug Evans <dje@google.com>
14582
14583 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14584 from struct inferior_list_entry * to struct lwp_info *.
14585 All callers updated.
14586
14587 2009-05-13 Doug Evans <dje@google.com>
14588
14589 * linux-x86-low.c: Don't include assert.h.
14590 (x86_siginfo_fixup): Use fatal, not assert.
14591 (x86_arch_setup): Fix comment.
14592
14593 2009-05-12 Doug Evans <dje@google.com>
14594
14595 Biarch support for i386/amd64 gdbserver.
14596 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14597 Add linux-x86-low.c.
14598 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14599 (linux-x86-low.o): Add.
14600 * linux-x86-64-low.c: Delete.
14601 * linux-i386-low.c: Delete.
14602 * linux-x86-low.c: New file.
14603 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14604 linux-x86-low.o.
14605 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14606 linux-x86-low.o.
14607 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14608 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14609 (linux_child_pid_to_exec_file): New function.
14610 (elf_64_header_p, elf_64_file_p): New functions.
14611 (siginfo_fixup): New function.
14612 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14613 give target a chance to convert layout.
14614 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14615 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14616
14617 2009-05-07 Doug Evans <dje@google.com>
14618
14619 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14620 (regsets_store_inferior_registers): Ditto.
14621
14622 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14623
14624 PR server/10048
14625
14626 * linux-low.c (must_set_ptrace_flags): Delete.
14627 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14628 of the global.
14629 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14630 `lwp->must_set_ptrace_flags' instead.
14631 (linux_wait_for_event_1): Set ptrace options here.
14632 (linux_wait_1): ... not here.
14633
14634 2009-04-30 Doug Evans <dje@google.com>
14635
14636 * inferiors.c (started_inferior_callback): New function.
14637 (attached_inferior_callback): New function.
14638 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14639 * server.c (print_started_pid, print_attached_pid): New functions.
14640 (detach_or_kill_for_exit): New function.
14641 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14642 * server.h (have_started_inferiors_p): Declare.
14643 (have_attached_inferiors_p): Declare.
14644
14645 * inferiors.c (remove_process): Fix memory leak, free process.
14646 * linux-low.c (linux_remove_process): New function.
14647 (linux_kill): Call it instead of remove_process.
14648 (linux_detach, linux_wait_1): Ditto.
14649
14650 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14651
14652 * configure.srv: Add x86 Windows CE target.
14653
14654 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14655
14656 * inferiors.c (get_thread_process): Make global.
14657 * server.h (get_thread_process): Add prototype.
14658 * thread-db.c (find_one_thread): Use get_thread_process
14659 instead of current_process.
14660 (thread_db_get_tls_address): Do not crash if called when
14661 thread layer is not yet initialized.
14662
14663 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14664
14665 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14666 * spu-low.c (current_tid): Rename to ...
14667 (current_ptid): ... this.
14668 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14669 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14670 ptid_get_lwp (current_ptid) instead of current_tid.
14671 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14672 instead of current_tid. Use find_process_pid to verify pid
14673 argument is valid. Pass proper argument to remove_process.
14674 (spu_thread_alive): Compare current_ptid instead of current_tid.
14675 (spu_resume): Likewise.
14676
14677 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14678
14679 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14680 variable.
14681
14682 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14683
14684 Implement the multiprocess extensions, and add linux multiprocess
14685 support.
14686
14687 * server.h (ULONGEST): Declare.
14688 (struct ptid, ptid_t): New.
14689 (minus_one_ptid, null_ptid): Declare.
14690 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14691 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14692 (struct inferior_list_entry): Change `id' type from unsigned from
14693 to ptid_t.
14694 (struct sym_cache, struct breakpoint, struct
14695 process_info_private): Forward declare.
14696 (struct process_info): Declare.
14697 (current_process): Declare.
14698 (all_processes): Declare.
14699 (initialize_inferiors): Declare.
14700 (add_thread): Adjust to use ptid_t.
14701 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14702 (add_process, remove_process, find_thread_pid): Declare.
14703 (find_inferior_id): Adjust to use ptid_t.
14704 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14705 (multi_process): Declare.
14706 (push_event): Adjust to use ptid_t.
14707 (read_ptid, write_ptid): Declare.
14708 (prepare_resume_reply): Adjust to use ptid_t.
14709 (clear_symbol_cache): Declare.
14710 * inferiors.c (all_processes): New.
14711 (null_ptid, minus_one_ptid): New.
14712 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14713 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14714 (add_thread): Change unsigned long to ptid. Remove gdb_id
14715 parameter. Adjust.
14716 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14717 (gdb_id_to_thread): Rename to ...
14718 (find_thread_pid): ... this. Change unsigned long to ptid.
14719 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14720 (loaded_dll, pull_pid_from_list): Adjust.
14721 (add_process, remove_process, find_process_pid)
14722 (get_thread_process, current_process, initialize_inferiors): New.
14723 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14724 (struct target_waitstatus) <related_pid>: Ditto.
14725 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14726 return type to int.
14727 (struct target_ops) <join>: Add `pid' argument.
14728 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14729 (struct target_ops) <wait>: Add `ptid' field. Change return type
14730 to ptid.
14731 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14732 (mywait): Add `ptid' argument. Change return type to ptid_t.
14733 (target_pid_to_str): Declare.
14734 * target.c (set_desired_inferior): Adjust to use ptids.
14735 (mywait): Add new `ptid' argument. Adjust.
14736 (target_pid_to_str): New.
14737 * mem-break.h (free_all_breakpoints): Declare.
14738 * mem-break.c (breakpoints): Delelete.
14739 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14740 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14741 to use per-process breakpoint list.
14742 (free_all_breakpoints): New.
14743 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14744 (symbol_cache, all_symbols_looked_up): Delete.
14745 (hexchars): New.
14746 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14747 read_ptid): New.
14748 (prepare_resume_reply): Change ptid argument's type from unsigned
14749 long to ptid_t. Adjust. Implement W;process and X;process.
14750 (free_sym_cache, clear_symbol_cache): New.
14751 (look_up_one_symbol): Adjust to per-process symbol cache. *
14752 * server.c (cont_thread, general_thread, step_thread): Change type
14753 to ptid_t.
14754 (attached): Delete.
14755 (multi_process): New.
14756 (last_ptid): Change type to ptid_t.
14757 (struct vstop_notif) <ptid>: Change type to ptid_t.
14758 (queue_stop_reply, push_event): Change `ptid' argument's type to
14759 ptid_t.
14760 (discard_queued_stop_replies): Add `pid' argument.
14761 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14762 changes. Don't reference the `attached' global.
14763 (attach_inferior): Adjust to mywait interface changes.
14764 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14765 features. Handle and report "multiprocess+". Handle
14766 "qAttached:PID".
14767 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14768 changes.
14769 (handle_v_kill): New.
14770 (handle_v_stopped): Adjust to use target_pid_to_str.
14771 (handle_v_requests): Allow multiple attaches and runs when
14772 multiprocess extensions are in effect. Handle "vKill".
14773 (myresume): Adjust to use ptids.
14774 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14775 (handle_status): Adjust to discard_queued_stop_replies interface
14776 change.
14777 (first_thread_of, kill_inferior_callback)
14778 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14779 (main): Call initialize_inferiors. Adjust to use ptids, killing
14780 and detaching from all inferiors. Handle multiprocess packet
14781 variants.
14782 * linux-low.h: Include gdb_proc_service.h.
14783 (struct process_info_private): New.
14784 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14785 <lwpid_of>: Use ptid_get_lwp.
14786 (get_lwp_thread): Adjust.
14787 (struct lwp_info): Add `dead' member.
14788 (find_lwp_pid): Declare.
14789 * linux-low.c (thread_db_active): Delete.
14790 (new_inferior): Adjust comment.
14791 (inferior_pid): Delete.
14792 (linux_add_process): New.
14793 (handle_extended_wait): Adjust.
14794 (add_lwp): Change unsigned long to ptid.
14795 (linux_create_inferior): Add process to processes table. Adjust
14796 to use ptids. Don't set new_inferior here.
14797 (linux_attach_lwp): Rename to ...
14798 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14799 it. Adjust to use ptids.
14800 (linux_attach_lwp): New.
14801 (linux_attach): Add process to processes table. Don't set
14802 new_inferior here.
14803 (struct counter): New.
14804 (second_thread_of_pid_p, last_thread_of_process_p): New.
14805 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14806 multiple processes.
14807 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14808 processes. Remove process from process table.
14809 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14810 to multiple processes.
14811 (any_thread_of): New.
14812 (linux_detach): Add `pid' argument, and handle it. Remove process
14813 from processes table.
14814 (linux_join): Add `pid' argument. Handle it.
14815 (linux_thread_alive): Change unsighed long argument to ptid_t.
14816 Consider dead lwps as not being alive.
14817 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14818 threads we're not interested in.
14819 (same_lwp, find_lwp_pid): New.
14820 (linux_wait_for_lwp): Change `pid' argument's type from int to
14821 ptid_t. Adjust.
14822 (linux_wait_for_event): Rename to ...
14823 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14824 from int to ptid_t. Adjust.
14825 (linux_wait_for_event): New.
14826 (linux_wait_1): Add `ptid' argument. Change return type to
14827 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14828 that exit from the process table.
14829 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14830 Adjust.
14831 (mark_lwp_dead): New.
14832 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14833 stopping all threads, mark its main lwp as dead.
14834 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14835 ptids.
14836 (fetch_register, usr_store_inferior_registers)
14837 (regsets_fetch_inferior_registers)
14838 (regsets_store_inferior_registers, linux_read_memory)
14839 (linux_write_memory): Inline `inferior_pid'.
14840 (linux_look_up_symbols): Adjust to use per-process
14841 `thread_db_active'.
14842 (linux_request_interrupt): Adjust to use ptids.
14843 (linux_read_auxv): Inline `inferior_pid'.
14844 (initialize_low): Don't reference thread_db_active.
14845 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14846 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14847 (ps_getpid): Return the pid of the current inferior.
14848 * thread-db.c (proc_handle, thread_agent): Delete.
14849 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14850 per-process data.
14851 (find_one_thread): Change argument type to ptid_t. Adjust to
14852 per-process data.
14853 (maybe_attach_thread): Adjust to per-process data and ptids.
14854 (thread_db_find_new_threads): Ditto.
14855 (thread_db_init): Ditto.
14856 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14857 processes table. Adjust to use ptids.
14858 (spu_kill, spu_detach): Adjust interface. Remove process from
14859 processes table.
14860 (spu_join, spu_thread_alive): Adjust interface.
14861 (spu_wait): Adjust interface. Remove process from processes
14862 table. Adjust to use ptids.
14863 * win32-low.c (current_inferior_tid): Delete.
14864 (current_inferior_ptid): New.
14865 (debug_event_ptid): New.
14866 (thread_rec): Take a ptid. Adjust.
14867 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14868 (child_delete_thread): Ditto.
14869 (do_initial_child_stuff): Add `attached' argument. Add process to
14870 processes table.
14871 (child_fetch_inferior_registers, child_store_inferior_registers):
14872 Adjust.
14873 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14874 (win32_attach): Pass 1 to do_initial_child_stuff.
14875 (win32_kill): Adjust interface. Remove process from processes
14876 table.
14877 (win32_detach): Ditto.
14878 (win32_join): Adjust interface.
14879 (win32_thread_alive): Take a ptid.
14880 (win32_resume): Adjust to use ptids.
14881 (get_child_debug_event): Ditto.
14882 (win32_wait): Adjust interface. Remove exiting process from
14883 processes table.
14884
14885 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14886
14887 Non-stop mode support.
14888
14889 * server.h (non_stop): Declare.
14890 (gdb_client_data, handler_func): Declare.
14891 (delete_file_handler, add_file_handler, start_event_loop):
14892 Declare.
14893 (handle_serial_event, handle_target_event, push_event)
14894 (putpkt_notif): Declare.
14895 * target.h (enum resume_kind): New.
14896 (struct thread_resume): Replace `step' field by `kind' field.
14897 (TARGET_WNOHANG): Define.
14898 (struct target_ops) <wait>: Add `options' argument.
14899 <supports_non_stop, async, start_non_stop>: New fields.
14900 (target_supports_non_stop, target_async): New.
14901 (start_non_stop): Declare.
14902 (mywait): Add `options' argument.
14903 * target.c (mywait): Add `options' argument. Print child exit
14904 notifications here.
14905 (start_non_stop): New.
14906 * server.c (non_stop, own_buf, mem_buf): New globals.
14907 (struct vstop_notif): New.
14908 (notif_queue): New global.
14909 (queue_stop_reply, push_event, discard_queued_stop_replies)
14910 (send_next_stop_reply): New.
14911 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14912 interface changes.
14913 (attach_inferior): In non-stop mode, don't wait for the target
14914 here.
14915 (handle_general_set): Handle QNonStop.
14916 (handle_query): When handling qC, return the current general
14917 thread, instead of the first thread of the list.
14918 (handle_query): If the backend supports non-stop mode, include
14919 QNonStop+ in the qSupported query response.
14920 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14921 and non-stop mode.
14922 (handle_v_attach, handle_v_run): Handle non-stop mode.
14923 (handle_v_stopped): New.
14924 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14925 (myresume): Adjust to use resume_kind. Handle non-stop.
14926 (queue_stop_reply_callback): New.
14927 (handle_status): Handle non-stop mode.
14928 (main): Clear non_stop flag on reconnection. Use the event-loop.
14929 Refactor serial protocol handling from here ...
14930 (process_serial_event): ... to this new function. When GDB
14931 selects any thread, select one here. In non-stop mode, wait until
14932 GDB acks all pending events before exiting.
14933 (handle_serial_event, handle_target_event): New.
14934 * remote-utils.c (remote_open): Install remote_desc in the event
14935 loop.
14936 (remote_close): Remove remote_desc from the event loop.
14937 (putpkt_binary): Rename to...
14938 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14939 (putpkt_binary): New as wrapper around putpkt_binary_1.
14940 (putpkt_notif): New.
14941 (prepare_resume_reply): In non-stop mode, don't change the
14942 general_thread.
14943 * event-loop.c: New.
14944 * Makefile.in (OBJ): Add event-loop.o.
14945 (event-loop.o): New rule.
14946
14947 * linux-low.h (pid_of): Moved here.
14948 (lwpid_of): New.
14949 (get_lwp_thread): Use lwpid_of.
14950 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14951 * linux-low.c (pid_of): Delete.
14952 (inferior_pid): Use lwpid_of.
14953 (linux_event_pipe): New.
14954 (target_is_async_p): New.
14955 (delete_lwp): New.
14956 (handle_extended_wait): Use lwpid_of.
14957 (add_lwp): Don't set lwpid field.
14958 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14959 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14960 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14961 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14962 first. Adjust to linux_wait_for_event interface changes. Use
14963 lwpid_of.
14964 (linux_detach): Don't delete the main lwp here.
14965 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14966 (status_pending_p): Don't consider explicitly suspended lwps.
14967 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14968 pointer. Add OPTIONS argument. Change return type to int. Use
14969 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14970 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14971 pointer. Add status pointer argument. Return a pid instead of a
14972 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14973 changes. In non-stop mode, don't switch to a random thread.
14974 (linux_wait): Rename to...
14975 (linux_wait_1): ... this. Add target_options argument, and handle
14976 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14977 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14978 clean exit and signal exit code. Don't stop all threads in
14979 non-stop mode. In all-stop mode, only stop all threads when
14980 reporting a stop to GDB. Handle explicit thread stop requests.
14981 (async_file_flush, async_file_mark): New.
14982 (linux_wait): New.
14983 (send_sigstop): Use lwpid_of.
14984 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14985 interface changes. In non-stop mode, don't switch to a random
14986 thread.
14987 (linux_resume_one_lwp): Use lwpid_of.
14988 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14989 (linux_resume_one_thread): ... this. Handle resume_stop. In
14990 non-stop mode, don't look for pending flag in all threads.
14991 (resume_status_pending_p): Don't consider explicitly suspended
14992 threads.
14993 (my_waitpid): Reimplement. Emulate __WALL.
14994 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14995 Use lwpid_of.
14996 (sigchld_handler, linux_supports_non_stop, linux_async)
14997 (linux_start_non_stop): New.
14998 (linux_target_ops): Register linux_supports_non_stop, linux_async
14999 and linux_start_non_stop.
15000 (initialize_low): Install SIGCHLD handler.
15001 * thread-db.c (thread_db_create_event, find_one_thread)
15002 (thread_db_get_tls_address): Use lwpid_of.
15003 * win32-low.c (win32_detach): Adjust to use resume_kind.
15004 (win32_wait): Add `options' argument.
15005 * spu-low.c (spu_resume): Adjust to use resume_kind.
15006 (spu_wait): Add `options' argument.
15007
15008 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15009
15010 Decouple target code from remote protocol.
15011
15012 * target.h (enum target_waitkind): New.
15013 (struct target_waitstatus): New.
15014 (struct target_ops) <wait>: Return an unsigned long. Take a
15015 target_waitstatus pointer instead of a char pointer.
15016 (mywait): Likewise.
15017 * target.c (mywait): Change prototype to return an unsigned long.
15018 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15019 * server.h (thread_from_wait, old_thread_from_wait): Delete
15020 declarations.
15021 (prepare_resume_reply): Change prototype to take a
15022 target_waitstatus.
15023 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15024 (last_status, last_ptid): New.
15025 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15026 pid instead of a signal.
15027 (attach_inferior): Remove "status" and "signal" parameters.
15028 Adjust.
15029 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15030 not as an address.
15031 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15032 (handle_v_requests, myresume): Remove "status" and "signal"
15033 parameters. Adjust.
15034 (handle_status): New.
15035 (main): Delete local `status'. Adjust.
15036 * remote-utils.c: Include target.h.
15037 (prepare_resume_reply): Change prototype to take a
15038 target_waitstatus. Adjust.
15039
15040 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15041 interface.
15042 * spu-low.c (spu_wait): Adjust.
15043 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15044 Delete.
15045 (win32_wait): Adjust.
15046
15047 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15048
15049 * target.h (struct thread_resume): Delete leave_stopped member.
15050 (struct target_ops): Add a `n' argument to the `resume' callback.
15051 * server.c (start_inferior): Adjust.
15052 (handle_v_cont, myresume): Adjust.
15053 * linux-low.c (check_removed_breakpoint): Adjust to resume
15054 interface change, and to removed leave_stopped field.
15055 (resume_ptr): Delete.
15056 (struct thread_resume_array): New.
15057 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15058 resume interface change.
15059 (linux_continue_one_thread, linux_queue_one_thread)
15060 (resume_status_pending_p): Check if the resume field is NULL
15061 instead of checking the leave_stopped member.
15062 (linux_resume): Adjust to the target resume interface change.
15063 * spu-low.c (spu_resume): Adjust to the target resume interface
15064 change.
15065 * win32-low.c (win32_detach, win32_resume): Ditto.
15066
15067 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15068
15069 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15070 flag.
15071 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15072 pending.
15073 (linux_continue_one_thread): Only preserve the stepping flag if
15074 there's a pending breakpoint.
15075
15076 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15077
15078 * server.c (main): After the inferior having exited, call
15079 remote_close before exiting gdbserver.
15080
15081 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15082
15083 Fix size of FPSCR in Power 7 processors.
15084 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15085 (PPC_FEATURE_HAS_DFP): New #define.
15086 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15087 size of the FPSCR.
15088
15089 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15090
15091 * server.c (handle_query) Whitespace and formatting.
15092
15093 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15094
15095 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15096 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15097 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15098 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15099 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15100 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15101 Makefile.in, configure.ac: Fix whitespace throughout.
15102 * configure: Regenerate.
15103
15104 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15105
15106 * inferiors.c (find_inferior): Make it safe for the callback
15107 function to delete the currently iterated inferior.
15108
15109 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15110
15111 * Makefile.in (linuw_low_h): Move higher.
15112 (thread-db.o): Depend on $(linux_low_h).
15113
15114 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15115
15116 Rename "process" to "lwp" throughout.
15117
15118 * linux-low.c (all_processes): Rename to...
15119 (all_lwps): ... this.
15120 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15121 (add_process): Rename to ...
15122 (add_lwp): ... this. Adjust.
15123 (linux_create_inferior): Adjust.
15124 (linux_attach_lwp): Adjust.
15125 (linux_attach): Adjust.
15126 (linux_kill_one_process): Rename to ...
15127 (linux_kill_one_lwp): ... this. Adjust.
15128 (linux_kill): Adjust.
15129 (linux_detach_one_process): Rename to ...
15130 (linux_detach_one_lwp): ... this. Adjust.
15131 (linux_detach): Adjust.
15132 (check_removed_breakpoint): Adjust.
15133 (status_pending_p): Adjust.
15134 (linux_wait_for_process): Rename to ...
15135 (linux_wait_for_lwp): ... this. Adjust.
15136 (linux_wait_for_event): Adjust.
15137 (send_sigstop): Adjust.
15138 (wait_for_sigstop): Adjust.
15139 (stop_all_processes): Rename to ...
15140 (stop_all_lwps): ... this.
15141 (linux_resume_one_process): Rename to ...
15142 (linux_resume_one_lwp): ... this. Adjust.
15143 (linux_set_resume_request, linux_continue_one_thread)
15144 (linux_queue_one_thread, resume_status_pending_p)
15145 (usr_store_inferior_registers, regsets_store_inferior_registers)
15146 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15147 Adjust.
15148 * linux-low.h (get_process): Rename to ...
15149 (get_lwp): ... this. Adjust.
15150 (get_thread_process): Rename to ...
15151 (get_thread_lwp): ... this. Adjust.
15152 (get_process_thread): Rename to ...
15153 (get_lwp_thread): ... this. Adjust.
15154 (struct process_info): Rename to ...
15155 (struct lwp_info): ... this.
15156 (all_processes): Rename to ...
15157 (all_lwps): ... this.
15158 * proc-service.c (ps_lgetregs): Adjust.
15159 * thread-db.c (thread_db_create_event, find_one_thread)
15160 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15161
15162 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15163
15164 * server.c (handle_query): Handle "qAttached".
15165
15166 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15167
15168 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15169 GPLv3, update license URL.
15170
15171 2009-03-01 Doug Evans <dje@google.com>
15172
15173 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15174 (server_h): Add gdb_signals.h.
15175 (signals.o): Update.
15176 * server.h (target_signal_from_host,target_signal_to_host_p)
15177 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15178
15179 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15180
15181 * remote-utils.c (getpkt): Also generate remote-debug
15182 information if noack_mode is set.
15183
15184 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15185
15186 * server.c (handle_query): Report qXfer:siginfo:read and
15187 qXfer:siginfo:write as supported and handle them.
15188 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15189 * linux-low.c (linux_xfer_siginfo): New.
15190 (linux_target_ops): Set it.
15191
15192 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15193
15194 * server.c (gdbserver_usage): Mention --remote-debug.
15195 (main): Accept '--remote-debug' switch.
15196
15197 2009-01-18 Doug Evans <dje@google.com>
15198
15199 * regcache.c (new_register_cache): No need to check result of xcalloc.
15200 * server.c (handle_search_memory): Back out calls to xmalloc,
15201 result is checked and error is returned to user upon failure.
15202 (handle_query): Ditto. Add more checks for result of malloc.
15203 (handle_v_cont): Check result of malloc, report error back to
15204 user upon failure.
15205 (handle_v_run): Ditto. Call freeargv.
15206 * server.h (freeargv): Declare.
15207 * utils.c (freeargv): New fn.
15208
15209 2009-01-15 Doug Evans <dje@google.com>
15210
15211 * gdbreplay.c (perror_with_name): Make arg const char *.
15212 * server.h (target_signal_to_name): Make return type const char *.
15213 * thread-db.c (thread_db_err_str): Make return type const char *.
15214 * utils.c (perror_with_name): Make arg const char *.
15215
15216 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15217
15218 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15219 when handling a EXIT_PROCESS_DEBUG_EVENT.
15220
15221 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15222
15223 * gdbreplay.c (gdbreplay_version): Update copyright year.
15224 * server.c (gdbserver_version): Likewise.
15225
15226 2009-01-05 Doug Evans <dje@google.com>
15227
15228 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15229 (handle_extended_wait): Improve comment.
15230
15231 2008-12-13 Doug Evans <dje@google.com>
15232
15233 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15234 * server.h (ATTR_MALLOC): New macro.
15235 (xmalloc,xcalloc,xstrdup): Declare.
15236 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15237 * inferiors.c: Ditto.
15238 * linux-low.c: Ditto.
15239 * mem-break.c: Ditto.
15240 * regcache.c: Ditto.
15241 * remote-utils.c: Ditto.
15242 * server.c: Ditto.
15243 * target.c: Ditto.
15244 * win32-low.c: Ditto.
15245
15246 2008-12-12 Doug Evans <dje@google.com>
15247
15248 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15249 in debugging printf.
15250
15251 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15252
15253 2008-12-09 Doug Evans <dje@google.com>
15254
15255 * linux-low.h (struct process_info): Delete member tid, unused.
15256 * thread-db.c (find_one_thread): Update.
15257 (maybe_attach_thread): Update.
15258
15259 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15260
15261 * target.h (struct target_ops): Add qxfer_osdata member.
15262 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15263 and dirent.h.
15264 (linux_qxfer_osdata): New functions.
15265 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15266 callback.
15267 * server.c (handle_query): Handle "qXfer:osdata:read:".
15268 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15269 (buffer_xml_printf): New functions.
15270 * server.h (struct buffer): New.
15271 (buffer_grow_str, buffer_grow_str0): New macros.
15272 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15273 (buffer_xml_printf): Declare.
15274
15275 2008-11-24 Doug Evans <dje@google.com>
15276
15277 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15278
15279 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15280
15281 * server.c (handle_v_run): Always use the supplied argument list.
15282
15283 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15284
15285 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15286 (xtensa_regmap_table): Add entry for scompare1.
15287
15288 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15289
15290 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15291 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15292 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15293 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15294 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15295 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15296 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15297 XML target descriptions.
15298 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15299 when inferior is running on an ISA 2.05 or later processor. Add
15300 special case to return offset for full 64-bit slot of FPSCR when
15301 in 32-bits.
15302
15303 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15304
15305 * Makefile.in (SFILES, clean): Added sparc64 files.
15306 (reg-sparc64.o, reg-sparc64.c): New.
15307 * configure.srv (sparc*-*-linux*): New configuration.
15308 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15309 syscall arguments for SPARC.
15310 (regsets_store_inferior_registers): Likewise.
15311 * linux-sparc-low.c: New file.
15312
15313 2008-10-21 Doug Evans <dje@google.com>
15314
15315 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15316 (READLINE_DIR,READLINE_DEP): Delete.
15317 (INTERNAL_CFLAGS): Update.
15318 (LINTFLAGS): Update.
15319
15320 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15321
15322 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15323 whole argv from the last run, not just argv[0].
15324
15325 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15326
15327 * regcache.c (new_register_cache): Return NULL if the register
15328 cache size isn't known yet.
15329 (free_register_cache): Avoid dereferencing a NULL regcache.
15330
15331 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15332
15333 * configure.srv: Merge MIPS and MIPS64.
15334
15335 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15336
15337 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15338
15339 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15340
15341 * Makefile.in: Add required vsx dependencies.
15342
15343 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15344 Declare init_registers_powerpc_vsx32l.
15345 Declare init_registers_powerpc_vsx64l.
15346 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15347 (ppc_arch_setup): Check for VSX in hwcap.
15348 (ppc_fill_vsxregset): New function.
15349 (ppc_store_vsxregset): New function.
15350 Add new VSX entry in regset_info target_regsets.
15351
15352 * configure.srv: Add new VSX dependencies.
15353
15354 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15355
15356 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15357 (remote_open): Set or clear transport_is_reliable.
15358 (putpkt_binary): Don't expect acks in noack mode.
15359 (getpkt): Don't send ack/nac in noack mode.
15360 * server.c (handle_general_set): Handle QStartNoAckMode.
15361 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15362 qSupported.
15363 (main): Reset noack_mode on every connection.
15364 * server.h (noack_mode): Declare.
15365
15366 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15367
15368 * Makefile.in (GDBREPLAY_OBS): New variable.
15369 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15370
15371 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15372 Daniel Jacobowitz <dan@codesourcery.com>
15373
15374 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15375 (usr_store_inferior_registers): Likewise.
15376 (regsets_store_inferior_registers): Likewise.
15377
15378 2008-07-31 Rolf Jansen <rj@surtec.com>
15379 Pedro Alves <pedro@codesourcery.com>
15380
15381 * configure.ac: Check for memmem declaration.
15382 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15383 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15384 (disable_packet_qfThreadInfo): Unconditionally compile.
15385 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15386 * configure, config.in: Regenerate.
15387
15388 2008-07-28 Doug Kwan <dougkwan@google.com>
15389
15390 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15391 (linux_write_memory): Remove declaration of errno.
15392
15393 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15394
15395 * linux-low.c (handle_extended_wait): Do not use "status"
15396 variable uninitialized.
15397
15398 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15399
15400 * server.c (handle_v_attach): Inhibit reporting dll changes.
15401
15402 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15403
15404 * remote-utils.c (prepare_resume_reply): If requested, don't
15405 output "thread:TID" in the T stop reply.
15406
15407 * server.c (disable_packet_vCont, disable_packet_Tthread)
15408 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15409 (handle_query): If requested, disable support for qC, qfThreadInfo
15410 and qsThreadInfo.
15411 (handle_v_requests): If requested, disable support for vCont.
15412 (gdbserver_show_disableable): New.
15413 (main): Handle --disable-packet and --disable-packet=LIST.
15414
15415 * server.h (disable_packet_vCont, disable_packet_Tthread)
15416 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15417
15418 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15419
15420 * server.c (gdbserver_usage): Mention --version.
15421
15422 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15423
15424 * Makefile.in (gdbreplay.o): New rule.
15425
15426 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15427
15428 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15429 message, not gdbserver.
15430
15431 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15432 Nathan Sidwell <nathan@codesourcery.com>
15433 Joseph Myers <joseph@codesourcery.com>
15434
15435 * acinclude.m4: Include ../../config/acx.m4.
15436 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15437 * configure, config.in: Regenerate.
15438 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15439 * server.c (gdbserver_version): Print PKGVERSION.
15440 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15441 (main): Adjust gdbserver_usage calls.
15442 * gdbreplay.c (version, host_name): Add declarations.
15443 (gdbreplay_version, gdbreplay_usage): New.
15444 (main): Accept --version and --help options.
15445
15446 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15447
15448 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15449 (arm_breakpoint_at): Handle Thumb.
15450 (the_low_target): Add comment.
15451
15452 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15453
15454 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15455
15456 2008-05-09 Doug Evans <dje@google.com>
15457
15458 * server.h (decode_search_memory_packet): Declare.
15459 * remote-utils.c (decode_search_memory_packet): New fn.
15460 * server.c (handle_search_memory_1): New fn.
15461 (handle_search_memory): New fn.
15462 (handle_query): Process qSearch:memory packets.
15463
15464 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15465
15466 * regcache.c (registers_length): Remove.
15467 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15468 full register packet.
15469 * regcache.h (registers_length): Remove prototype.
15470 * server.h (PBUFSIZ): Define to 16384.
15471
15472 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15473
15474 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15475 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15476 powerpc-64l.o, and powerpc-altivec64l.o.
15477 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15478 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15479 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15480 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15481 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15482 to srv_xmlfiles.
15483
15484 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15485 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15486 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15487 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15488 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15489 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15490 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15491 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15492 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15493 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15494 (clean): Update.
15495
15496 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15497 (init_registers_powerpc_32l): ... this new prototype.
15498 (init_registers_powerpc_32): Remove, replace by ...
15499 (init_registers_powerpc_altivec32l): ... this new prototype.
15500 (init_registers_powerpc_e500): Remove, replace by ...
15501 (init_registers_powerpc_e500l): ... this new prototype.
15502 (init_registers_ppc64): Remove, replace by ...
15503 (init_registers_powerpc_64l): ... this new prototype.
15504 (init_registers_powerpc_64): Remove, replace by ...
15505 (init_registers_powerpc_altivec64l): ... this new prototype.
15506 (ppc_num_regs): Set to 73.
15507 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15508 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15509 (ppc_cannot_store_register): Handle orig_r3 and trap.
15510 (ppc_arch_setup): Update init_registers_... calls.
15511 (ppc_fill_gregset): Handle orig_r3 and trap.
15512
15513 * inferiors.c (clear_inferiors): Reset current_inferior.
15514
15515 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15516
15517 * acinclude.m4: Add override.m4.
15518 * configure: Regenerate.
15519
15520 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15521
15522 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15523 initial call to init_register_ppc64.
15524
15525 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15526
15527 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15528 single powerpc*-*-linux* case.
15529 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15530
15531 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15532
15533 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15534 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15535 from reg_xmlfiles.
15536 * linux-ppc-low.c: Include <elf.h>.
15537 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15538 (ppc_hwcap): New global variable.
15539 (ppc_regmap): Remove __SPE__ #ifdef sections.
15540 (ppc_regmap_e500): New global variable.
15541 (ppc_cannot_store_register): Update __SPE__ special case.
15542 (ppc_get_hwcap): New function.
15543 (ppc_arch_setup): Use it to determine whether inferior supports
15544 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15545 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15546 Do not access registers if target does not support AltiVec.
15547 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15548 Do not access registers if target does not support SPE.
15549 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15550
15551 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15552
15553 * linux-low.c (disabled_regsets, num_regsets): New.
15554 (use_regsets_p): Delete.
15555 (linux_wait_for_process): Clear disabled_regsets.
15556 (regsets_fetch_inferior_registers): Check and set it.
15557 (regsets_store_inferior_registers): Likewise.
15558 (linux_fetch_registers, linux_store_registers): Do not use
15559 use_regsets_p.
15560 (initialize_low): Allocate disabled_regsets.
15561
15562 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15563
15564 * Makefile.in (LIBOBJS): New.
15565 (OBS): Use LIBOBJS.
15566 (memmem.o): New rule.
15567 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15568 * configure: Regenerated.
15569
15570 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15571
15572 * server.c (handle_query): Never return "unsupported" for
15573 qXfer:features:read queries.
15574
15575 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15576
15577 * server.c (get_features_xml): Fix inverted condition.
15578 (handle_query): Always support qXfer:feature:read.
15579
15580 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15581
15582 * server.c (wrapper_argv): New.
15583 (start_inferior): Handle wrapper_argv. If set, expect an extra
15584 trap.
15585 (gdbserver_usage): Document --wrapper.
15586 (main): Parse --wrapper.
15587
15588 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15589
15590 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15591 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15592 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15593 (ppc_set_pc): Likewise.
15594 (ppc_arch_setup): New function.
15595 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15596 of collect_register.
15597 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15598
15599 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15600
15601 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15602 instead of linux-ppc64-low.o.
15603 * linux-ppc64-low.c: Remove file.
15604 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15605 (linux-ppc64-low.o): Remove rule.
15606
15607 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15608 (init_registers_powerpc_64): Likewise.
15609 (ppc_regmap): Conditionally define depending on __powerpc64__.
15610 (ppc_cannot_store_register): Do not special-case "fpscr" when
15611 compiled on __powerpc64__.
15612 (ppc_collect_ptrace_register): New function.
15613 (ppc_supply_ptrace_register): New function.
15614 (ppc_breakpoint): Change type to "unsigned int".
15615 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15616 (the_low_target): Conditionally provide initializers for the
15617 arch_setup member depending on __powerpc64__. Install
15618 collect_ptrace_register and supply_ptrace_register members.
15619
15620 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15621
15622 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15623 * server.c (gdbserver_xmltarget): Define.
15624 (get_features_xml): Use it to replace "target.xml" and arch_string.
15625
15626 * configure.srv: Remove srv_xmltarget. Add XML files that were
15627 mentioned there to srv_xmlfiles instead. Remove conditional tests
15628 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15629 srv_xmlfiles and srv_regobj to include all possible choices.
15630 * configure.ac (srv_xmltarget): Remove.
15631 (srv_xmlfiles): Do not add "target.xml".
15632 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15633 checks for supplementary target information.
15634 * configure: Regenerate.
15635 * Makefile.in (XML_TARGET): Remove.
15636 (target.xml): Remove rule.
15637 (clean): Do not clean up target.xml.
15638 (.PRECIOUS): Do not mention target.xml.
15639
15640 * target.h (struct target_ops): Remove arch_string member.
15641 * linux-low.c (linux_arch_string): Remove.
15642 (linux_target_ops): Remove arch_string initializer.
15643 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15644 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15645 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15646 * spu-low.c (spu_arch_string): Remove.
15647 (spu_target_ops): Remove arch_string initializer.
15648 * win32-low.c (win32_arch_string): Remove.
15649 (win32_target_ops): Remove arch_string initializer.
15650 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15651 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15652 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15653
15654 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15655
15656 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15657 by collect_ptrace_register and supply_ptrace_register hooks.
15658 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15659 instead of checking for the_low_target.left_pad_xfer.
15660 (usr_store_inferior_registers): Use collect_ptrace_register callback
15661 instead of checking for the_low_target.left_pad_xfer.
15662
15663 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15664 (s390_supply_ptrace_register): Likewise.
15665 (s390_fill_gregset): Call s390_collect_ptrace_register.
15666 (the_low_target): Update.
15667
15668 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15669 (ppc_supply_ptrace_register): Likewise.
15670 (the_low_target): Update.
15671
15672 * linux-i386-low.c (the_low_target): Update.
15673 * linux-x86-64-low.c (the_low_target): Update.
15674
15675 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15676
15677 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15678 reg-s390.o and reg-s390x.o.
15679
15680 * linux-low.c (new_inferior): New global variable.
15681 (linux_create_inferior, linux_attach): Set it.
15682 (linux_wait_for_process): Call the_low_target.arch_setup after the
15683 target has stopped for the first time.
15684 (initialize_low): Do not call the_low_target.arch_setup.
15685
15686 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15687 (s390_set_pc): Likewise.
15688 (s390_arch_setup): New function.
15689 (the_low_target): Use s390_arch_setup as arch_setup routine.
15690
15691 * regcache.c (realloc_register_cache): New function.
15692 (set_register_cache): Call it for each existing regcache.
15693
15694 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15695
15696 * server.h (init_registers): Remove prototype.
15697
15698 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15699 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15700 instead of init_registers ().
15701 * linux-arm-low.c (init_registers_arm): Add prototype.
15702 (init_registers_arm_with_iwmmxt): Likewise.
15703 (the_low_target): Add initializer for arch_setup field.
15704 * linux-cris-low.c (init_registers_cris): Add prototype.
15705 (the_low_target): Add initializer for arch_setup field.
15706 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15707 (the_low_target): Add initializer for arch_setup field.
15708 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15709 (the_low_target): Add initializer for arch_setup field.
15710 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15711 (the_low_target): Add initializer for arch_setup field.
15712 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15713 (the_low_target): Add initializer for arch_setup field.
15714 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15715 (the_low_target): Add initializer for arch_setup field.
15716 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15717 (init_registers_mips64_linux): Likewise.
15718 (the_low_target): Add initializer for arch_setup field.
15719 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15720 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15721 (the_low_target): Add initializer for arch_setup field.
15722 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15723 (init_registers_powerpc_64): Likewise.
15724 (the_low_target): Add initializer for arch_setup field.
15725 * linux-s390-low.c (init_registers_s390): Add prototype.
15726 (init_registers_s390x): Likewise.
15727 (the_low_target): Add initializer for arch_setup field.
15728 * linux-sh-low.c (init_registers_sh): Add prototype.
15729 (the_low_target): Add initializer for arch_setup field.
15730 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15731 (the_low_target): Add initializer for arch_setup field.
15732 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15733 (the_low_target): Add initializer for arch_setup field.
15734
15735 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15736 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15737 instead of init_registers ().
15738 * win32-arm-low.c (init_registers_arm): Add prototype.
15739 (the_low_target): Add initializer for arch_setup field.
15740 * win32-i386-low.c (init_registers_i386): Add prototype.
15741 (the_low_target): Add initializer for arch_setup field.
15742
15743 * spu-low.c (init_registers_spu): Add prototype.
15744 (initialize_low): Call initialie_registers_spu () instead of
15745 initialize_registers ().
15746
15747 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15748
15749 * server.c (handle_v_requests): When handling the vRun and vAttach
15750 packets, if already debugging a process, don't kill it. Return an
15751 error instead.
15752
15753 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15754
15755 * server.c (handle_query): Correct length check.
15756
15757 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15758
15759 * win32-low.c (do_initial_child_stuff): Add process handle
15760 parameter. Set current_process_handle and current_process_id from the
15761 parameters. Clear globals.
15762 (win32_create_inferior): Don't set current_process_handle and
15763 current_process_id here. Instead pass them on the call to
15764 do_initial_child_stuff.
15765 (win32_attach): Likewise.
15766 (win32_clear_inferiors): New.
15767 (win32_kill): Don't close the current process handle or the
15768 current thread handle here. Instead call win32_clear_inferiors.
15769 (win32_detach): Don't open a new handle to the process. Call
15770 win32_clear_inferiors.
15771 (win32_join): Don't rely on current_process_handle; open a new
15772 handle using the process id.
15773 (win32_wait): Call win32_clear_inferiors when the inferior process
15774 has exited.
15775
15776 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15777
15778 * server.c (monitor_show_help): Add "exit".
15779
15780 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15781
15782 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15783 (clean): Add reg-xtensa.c.
15784 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15785 * configure.srv (xtensa*-*-linux*) New target.
15786 * linux-xtensa-low.c: New.
15787 * xtensa-xtregs.c: New.
15788
15789 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15790
15791 * hostio.c: Don't include errno.h.
15792 (errno_to_fileio_errno): Move to hostio-errno.
15793 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15794 error number outputting to the target->hostio_last_error callback.
15795 (hostio_packet_error): Use FILEIO_EINVAL directly.
15796 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15797 calls to hostio_error.
15798 * hostio-errno.c: New.
15799 * server.h (hostio_last_error_from_errno): Declare.
15800 * target.h (target_ops): Add hostio_last_error member.
15801 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15802 as hostio_last_error handler.
15803 * spu-low.c (spu_target_ops): Likewise.
15804 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15805 (wince_hostio_last_error): New functions.
15806 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15807 as hostio_last_error handler.
15808 (win32_target_ops) [!_WIN32_WCE]: Register
15809 hostio_last_error_from_errno as hostio_last_error handler.
15810 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15811 (hostio-errno.o): New rule.
15812 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15813 * configure.srv (srv_hostio_err_objs): New variable. Default to
15814 hostio-errno.o.
15815 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15816 * configure: Regenerate.
15817
15818 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15821 (linux_kill, linux_detach): Clean up the process list.
15822 * remote-utils.c (remote_open): Improve port number parsing.
15823 (putpkt_binary, input_interrupt): Only send interrupts if the target
15824 is running.
15825 * server.c (extended_protocol): Make static.
15826 (attached): Define earlier.
15827 (exit_requested, response_needed, program_argv): New variables.
15828 (target_running): New.
15829 (start_inferior): Clear attached here.
15830 (attach_inferior): Set attached here.
15831 (require_running): Define.
15832 (handle_query): Use require_running and target_running. Implement
15833 "monitor exit".
15834 (handle_v_attach, handle_v_run): New.
15835 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15836 (gdbserver_usage): Update.
15837 (main): Redo argument parsing. Handle --debug and --multi. Handle
15838 --attach along with other options or after the port. Save
15839 program_argv. Support no initial program. Resynchronize
15840 communication with GDB after an error. Handle "monitor exit".
15841 Use require_running and target_running. Always allow the extended
15842 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15843 restart in extended mode.
15844 * README: Refer to the GDB manual. Update --attach usage.
15845
15846 2007-12-20 Andreas Schwab <schwab@suse.de>
15847
15848 * linux-low.c (STACK_SIZE): Define.
15849 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15850 (linux_test_for_tracefork): Likewise.
15851
15852 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15853
15854 * linux-low.c (linux_wait_for_event): Update messages. Do not
15855 reinsert auto-delete breakpoints.
15856 * mem-break.c (struct breakpoint): Change return type of handler to
15857 int.
15858 (set_breakpoint_at): Update handler type.
15859 (reinsert_breakpoint_handler): Return 1 instead of calling
15860 delete_breakpoint.
15861 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15862 setting a new one.
15863 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15864 * mem-break.h (set_breakpoint_at): Update handler type.
15865 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15866 * win32-low.c (auto_delete_breakpoint): New.
15867 (get_child_debug_event): Use it.
15868
15869 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * configure.ac: Check for pread and pwrite.
15872 * hostio.c (handle_pread): Fall back to lseek and read.
15873 (handle_pwrite): Fall back to lseek and write.
15874 * config.in, configure: Regenerated.
15875
15876 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * server.c (myresume): Add own_buf argument.
15879 (main): Update calls.
15880
15881 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15884 * remote-utils.c (remote_open): Do not call disable_async_io.
15885 (block_async_io): Delete.
15886 (unblock_async_io): Make static.
15887 (initialize_async_io): New.
15888 * server.c (handle_v_cont): Handle async I/O here.
15889 (myresume): Likewise. Move other common resume tasks here...
15890 (main): ... from here. Call initialize_async_io. Disable async
15891 I/O before the main loop.
15892 * server.h (initialize_async_io): Declare.
15893 (block_async_io, unblock_async_io): Delete prototypes.
15894 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15895
15896 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15897
15898 * remote-utils.c (readchar): Allow binary data in received messages.
15899
15900 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15901
15902 * win32-low.c (attaching): New global.
15903 (win32_create_inferior): Clear the `attaching' global.
15904 (win32_attach): Set the `attaching' global.
15905 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15906 attaching. Only set a breakpoint at the entry point if not
15907 attaching.
15908
15909 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15910
15911 * server.c (main): Don't report dll events on the initial
15912 connection on attaches.
15913
15914 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15915
15916 * server.c (main): Relax numerical bases supported for the pid of
15917 the --attach command line argument.
15918
15919 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15920
15921 * win32-low.c (win32_attach): Call OpenProcess before
15922 DebugActiveProcess, not after. Add last error output to error
15923 call.
15924
15925 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15926
15927 * win32-low.c (win32_get_thread_context)
15928 (win32_set_thread_context): New functions.
15929 (thread_rec): Use win32_get_thread_context.
15930 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15931 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15932 field.
15933
15934 2007-12-03 Leo Zayas
15935 Pedro Alves <pedro_alves@portugalmail.pt>
15936
15937 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15938 global variables.
15939 (child_add_thread): Minor cleanup.
15940 (child_continue): Resume artificially suspended threads before
15941 calling ContinueDebugEvent.
15942 (suspend_one_thread): New.
15943 (fake_breakpoint_event): New.
15944 (get_child_debug_event): Change return type to int. Check here if
15945 gdb sent an interrupt request. If a soft interrupt was requested,
15946 fake a breakpoint event. Return 0 if there is no event to handle,
15947 and 1 otherwise.
15948 (win32_wait): Don't check here if gdb sent an interrupt request.
15949 Ensure there is a valid event to handle.
15950 (win32_request_interrupt): Add soft interruption method as last
15951 resort.
15952
15953 2007-12-03 Leo Zayas
15954 Pedro Alves <pedro_alves@portugalmail.pt>
15955
15956 * win32-low.h (win32_thread_info): Add descriptions to the
15957 structure members. Replace `suspend_count' counter by a
15958 `suspended' flag.
15959 * win32-low.c (thread_rec): Update condition of when to get the
15960 context from the inferior. Rely on ContextFlags being set if it
15961 has already been retrieved. Only suspend the inferior thread if
15962 we haven't already. Warn if that fails.
15963 (continue_one_thread): s/suspend_count/suspended/. Only call
15964 ResumeThread once. Warn if that fails.
15965
15966 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * win32-low.c (win32_wait): Don't read from the inferior when it
15969 has already exited.
15970
15971 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15972
15973 * Makefile.in (win32_low_h): New variable.
15974 (win32-low.o): Add dependency on $(win32_low_h).
15975 (win32-arm-low.o, win32-i386-low.o): New rules.
15976
15977 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15978
15979 * hostio.c: Correct copyright year.
15980
15981 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15982
15983 * Makefile.in (OBS): Add hostio.o.
15984 (hostio.o): New rule.
15985 * server.h (handle_vFile): Declare.
15986 * hostio.c: New file.
15987 * server.c (handle_v_requests): Take packet_len and new_packet_len
15988 for binary packets. Call handle_vFile.
15989 (main): Update call to handle_v_requests.
15990
15991 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15992
15993 * linux-low.c: Include <sched.h>.
15994
15995 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15996
15997 * linux-low.c (linux_tracefork_grandchild): New.
15998 (linux_tracefork_child): Use clone.
15999 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16000
16001 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16002
16003 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16004
16005 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16006
16007 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16008
16009 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * inferiors.c (change_inferior_id): Delete.
16012 (add_pid_to_list, pull_pid_from_list): New.
16013 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16014 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16015 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16016 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16017 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16018 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16019 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16020 (using_threads): Always set to 1.
16021 (handle_extended_wait): New.
16022 (add_process): Do not set TID.
16023 (linux_create_inferior): Set must_set_ptrace_flags.
16024 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16025 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16026 (linux_thread_alive): Rename TID argument to LWPID.
16027 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16028 (linux_wait_for_event): Do not use TID or check using_threads. Update
16029 call to dead_thread_notify. Call handle_extended_wait.
16030 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16031 (send_sigstop): Delete sigstop_sent.
16032 (wait_for_sigstop): Avoid TID.
16033 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16034 (linux_test_for_tracefork): New.
16035 (linux_lookup_signals): Use thread_db_active and
16036 linux_supports_tracefork_flag.
16037 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16038 * linux-low.h (get_process_thread): Avoid TID.
16039 (struct process_ifo): Move thread_known and tid to the end. Remove
16040 sigstop_sent.
16041 (linux_attach_lwp, thread_db_init): Update prototypes.
16042 * server.h (change_inferior_id): Delete prototype.
16043 (add_pid_to_list, pull_pid_from_list): New prototypes.
16044 * thread-db.c (thread_db_use_events): New.
16045 (find_first_thread): Rename to...
16046 (find_one_thread): ...this. Update callers and messages. Do not
16047 call fatal. Check thread_db_use_events. Do not call
16048 change_inferior_id or new_thread_notify.
16049 (maybe_attach_thread): Update. Do not call new_thread_notify.
16050 (thread_db_init): Set thread_db_use_events. Check use_events.
16051 * utils.c (fatal, warning): Correct message prefix.
16052
16053 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16054
16055 * Makefile.in (clean): Remove new files.
16056 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16057 (powerpc-64.o, powerpc-64.c): New rules.
16058 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16059 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16060 with SPE.
16061 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16062 SPE targets.
16063 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16064 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16065 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16066 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16067 (target_regsets): Add AltiVec and SPE register sets.
16068 * configure.ac: Check for AltiVec and SPE.
16069 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16070 (ppc_fill_vrregset, ppc_store_vrregset): New.
16071 (target_regsets): Add AltiVec register set.
16072 * configure: Regenerated.
16073
16074 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16075
16076 * linux-low.c (O_LARGEFILE): Define.
16077 (linux_read_memory): Use /proc/PID/mem.
16078 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16079 * configure, config.in: Regenerated.
16080
16081 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16082
16083 * linux-low.c (linux_wait_for_event): Do not pass signals while
16084 single-stepping.
16085
16086 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16087
16088 * win32-low.c (create_process): New.
16089 (win32_create_inferior): Use create_process instead of
16090 CreateProcess. If create_process failed retry appending an ".exe"
16091 suffix. Store the GetLastError result immediatelly after
16092 create_process calls and use it on the call to error.
16093
16094 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16095
16096 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16097
16098 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16099
16100 * configure.ac: Switch license to GPLv3.
16101
16102 2007-08-01 Michael Snyder <msnyder@access-company.com>
16103
16104 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16105
16106 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16107
16108 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16109 typedef.
16110 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16111 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16112 CloseToolhelp32Snapshot.
16113 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16114 CloseToolhelp32Snapshot.
16115
16116 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16117
16118 * server.c (main): Check for inferior exit before main loop.
16119
16120 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16121
16122 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16123 instead of on tmp_desc.
16124
16125 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16126 Daniel Jacobowitz <dan@codesourcery.com>
16127
16128 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16129 (add_thread): Minor cleanups.
16130 (clear_inferiors): Move lower in the file. Clear the DLL
16131 list.
16132 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16133 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16134 (xml_escape_text): New.
16135 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16136 for qSupported.
16137 (handle_v_cont): Report errors.
16138 (gdbserver_version): Update.
16139 (main): Correct size of own_buf. Do not report initial DLL events.
16140 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16141 (unloaded_dll, xml_escape_text): New.
16142 * win32-low.c (enum target_waitkind): Update comments.
16143 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16144 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16145 (win32_EnumProcessModules, win32_GetModuleInformation)
16146 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16147 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16148 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16149 (win32_Module32First, win32_Module32Next, load_toolhelp)
16150 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16151 (get_child_debug_event): Handle DLL events.
16152 (win32_wait): Likewise.
16153
16154 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16155
16156 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16157 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16158
16159 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16160
16161 * win32-low.c (handle_output_debug_string): Ignore event if not
16162 waiting.
16163
16164 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16165
16166 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16167
16168 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16169
16170 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16171
16172 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16173
16174 * inferiors.c (change_inferior_id): Add comment.
16175 * linux-low.c (check_removed_breakpoint): Add an early
16176 prototype. Improve debug output.
16177 (linux_attach): Doc update.
16178 (linux_detach_one_process, linux_detach): Clean up before releasing
16179 each process.
16180 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16181 * linux-low.h (struct process_info): Doc improvement.
16182 * mem-break.c (delete_all_breakpoints): New.
16183 * mem-break.h (delete_all_breakpoints): New prototype.
16184 * thread-db.c (find_first_thread): New.
16185 (thread_db_create_event): Call it instead of
16186 thread_db_find_new_threads. Clean up unused variables.
16187 (maybe_attach_thread): Remove first thread handling.
16188 (thread_db_find_new_threads): Use find_first_thread.
16189 (thread_db_get_tls_address): Likewise.
16190
16191 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16192
16193 * thread-db.c (thread_db_find_new_threads): Add prototype.
16194 (thread_db_create_event): Check for the main thread before adding
16195 a new thread.
16196 (maybe_attach_thread): Only enable event reporting if TID == 0.
16197 (thread_db_get_tls_address): Check for new threads.
16198
16199 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16200
16201 * linux-low.c (linux_create_inferior): Try execv before execvp.
16202 * spu-low.c (spu_create_inferior): Likewise.
16203
16204 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16205
16206 * linux-low.c (linux_create_inferior): Change execv to execvp.
16207 * spu-low.c (spu_create_inferior): Likewies.
16208
16209 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16210
16211 * Makefile.in (clean): Clean new files instead of deleted ones.
16212 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16213 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16214 rules.
16215 * configure.srv: Specify XML files and new regformats for MIPS and
16216 MIPS64 GNU/Linux.
16217 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16218 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16219 an entry for the restart register.
16220 (mips_cannot_fetch_register, mips_cannot_store_register)
16221 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16222 register names to match the XML descriptions.
16223 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16224 restart register instead of $0.
16225
16226 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16227 Markus Deuling <deuling@de.ibm.com>
16228
16229 * remote-utils.c (decode_xfer_write): New function.
16230 * server.h (decode_xfer_write): Add prototype.
16231 * server.c (handle_query): Add PACKET_LEN argument. Support
16232 qXfer:spu:read and qXfer:spu:write packets.
16233 (main): Pass packet_len to handle_query.
16234 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16235 * target.h (target_ops): Add qxfer_spu.
16236
16237 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16238
16239 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16240 accessing non-seekable spufs files.
16241
16242 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16243
16244 * server.c (handle_query): Add reply for qC packet.
16245
16246 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16247 Leo Zayas <lerele@champenstudios@com>
16248
16249 * server.h (check_remote_input_interrupt_request): New function.
16250 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16251 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16252 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16253 (check_remote_input_interrupt_request): New function.
16254 * server.h (check_remote_input_interrupt_request): Declare.
16255 * win32-low.c (winapi_DebugBreakProcess,
16256 winapi_GenerateConsoleCtrlEvent): New typedefs.
16257 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16258 to 250 ms.
16259 (win32_wait): Check for remote interrupt request
16260 with check_remote_input_interrupt_request.
16261 (win32_request_interrupt): New function.
16262 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16263
16264 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16265
16266 * win32-low.c (debug_registers_changed,
16267 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16268 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16269 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16270 (thread_rec): Get context using the low target.
16271 (child_add_thread): Call thread_added on the low target,
16272 which does the same thing.
16273 (regptr): Delete.
16274 (do_initial_child_stuff): Remove debug registers references.
16275 Set context using the low target. Resume threads after
16276 setting the contexts.
16277 (child_continue): Remove dead variable. Remove debug
16278 registers references.
16279 (child_fetch_inferior_registers): Go through the low target.
16280 (do_child_store_inferior_registers): Remove.
16281 (child_store_inferior_registers): Go through the low target.
16282 (win32_resume): Remove debug registers references.
16283 Set context using the low target.
16284 (handle_exception): Change return type to void. Don't record
16285 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16286 first chance exception.
16287 (get_child_debug_event): Change return type to void. Remove
16288 goto loop. Always return after waiting for debug event.
16289 (win32_wait): Convert to switch statement. Handle spurious
16290 events.
16291
16292 * win32-i386-low.c (debug_registers_changed,
16293 debug_registers_used): New.
16294 (initial_stuff): Rename to ...
16295 (i386_initial_stuff): ... this. Clear debug registers
16296 state variables.
16297 (store_debug_registers): Delete.
16298 (i386_get_thread_context): New.
16299 (load_debug_registers): Delete.
16300 (i386_set_thread_context): New.
16301 (i386_thread_added): New.
16302 (single_step): Rename to ...
16303 (i386_single_step): ... this.
16304 (do_fetch_inferior_registers): Rename to ...
16305 (i386_fetch_inferior_register): ... this.
16306 (i386_store_inferior_register): New.
16307 (the_low_target): Adapt to new interface.
16308
16309 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16310 (arm_get_thread_context): New.
16311 (arm_set_thread_context): New.
16312 (regptr): New.
16313 (do_fetch_inferior_registers): Rename to ...
16314 (arm_fetch_inferior_register): ... this.
16315 (arm_store_inferior_register): New.
16316 (arm_wince_breakpoint): Reimplement as unsigned long.
16317 (arm_wince_breakpoint_len): Define.
16318 (the_low_target): Adapt to new interface.
16319
16320 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16321 load_debug_registers. Add get_thread_context, set_thread_context,
16322 thread_added and store_inferior_register. Rename
16323 fetch_inferior_registers to fetch_inferior_register.
16324 (regptr): Remove declaration.
16325
16326 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16327
16328 * linux-low.c (linux_detach): Change return type to int. Return 0.
16329 * spu-low.c (spu_detach): Likewise.
16330
16331 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16332
16333 * target.h (target_ops): Change return type of detach to int.
16334 Add join.
16335 (join_inferior): New.
16336 * server.c (main): Don't skip detach support on mingw32.
16337 If the inferior doesn't support detaching return error.
16338 Call join_inferior instead of using waitpid.
16339 * linux-low.c (linux_join): New.
16340 (linux_target_op): Add linux_join.
16341 * spu-low.c (spu_join): New.
16342 (spu_target_ops): Add spu_join.
16343 * win32-low.c (win32_detach): Adapt to new interface.
16344 Reopen current_process_handle before detaching. Issue a child
16345 resume before detaching.
16346 (win32_join): New.
16347 (win32_target_op): Add win32_join.
16348
16349 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16350
16351 * win32-low.c (win32-attach): Fix return value.
16352 * target.h (target_ops): Describe ATTACH return values.
16353
16354 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16355
16356 * win32-low.c (GETPROCADDRESS): Define.
16357 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16358 (winapi_DebugSetProcessKillOnExit): Likewise.
16359 (win32_create_inferior): Force usage of ansi CreateProcessA.
16360 (win32_attach): Use GETPROCADDRESS.
16361 (win32_detach): Likewise.
16362
16363 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16364
16365 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16366
16367 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16368
16369 * win32-low.c: Commit leftover changes from 2007-03-29.
16370
16371 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16372
16373 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16374 fields short instead of int. Add explicit padding.
16375 (i387_cache_to_fsave): Remove unnecessary casts.
16376 (i387_fsave_to_cache): Doc fix.
16377 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16378
16379 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16380
16381 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16382 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16383
16384 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16385
16386 * configure.srv (arm*-*-mingw32ce*): Move near the other
16387 arm targets.
16388
16389 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16390
16391 * configure.ac: Add errno checking.
16392 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16393 sys/file.h and malloc.h.
16394 (AC_CHECK_DECLS): Add perror.
16395 (srv_mingwce): Handle.
16396 * configure.srv (i[34567]86-*-cygwin*): Add
16397 win32-i386-low.o to srv_tgtobj.
16398 (i[34567]86-*-mingw*): Likewise.
16399 (arm*-*-mingw32ce*): Add case.
16400 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16401 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16402 [__MINGW32CE__] (strerror): New function.
16403 [__MINGW32CE__] (errno): Define to GetLastError.
16404 [__MINGW32CE__] (COUNTOF): New macro.
16405 (remote_open): Remove extra close call.
16406 * mem-break.c (delete_breakpoint_at): New function.
16407 * mem-break.h (delete_breakpoint_at): Declare.
16408 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16409 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16410 [USE_WIN32API] (read, write): Add char* casts.
16411 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16412 * server.h: Include wincecompat.h on Windows CE.
16413 [HAVE_ERRNO_H]: Check.
16414 (perror): Declare if not declared.
16415 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16416 (perror_with_name): Remove errno declaration.
16417 * wincecompat.h: New.
16418 * wincecompat.c: New.
16419 * win32-low.h: New.
16420 * win32-arm-low.c: New.
16421 * win32-i386-low.c: New.
16422 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16423 (OUTMSG2): Make it safe.
16424 (_T): New macro.
16425 (COUNTOF): New macro.
16426 (NUM_REGS): Get it from the low target.
16427 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16428 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16429 (thread_rec): Let low target handle debug registers.
16430 (child_add_thread): Likewise.
16431 (child_init_thread_list): Likewise.
16432 (continue_one_thread): Likewise.
16433 (regptr): New.
16434 (do_child_fetch_inferior_registers): Move to ...
16435 * win32-i386-low.c: ... here, and rename to ...
16436 (do_fetch_inferior_registers): ... this.
16437 * win32-low.c (child_fetch_inferior_registers):
16438 Go through the low target.
16439 (do_child_store_inferior_registers): Use regptr.
16440 (strwinerror): New function.
16441 (win32_create_inferior): Handle Windows CE.
16442 Use strwinerror instead of strerror on Windows error
16443 codes. Add program to the error output.
16444 Don't close the main thread handle on Windows CE.
16445 (win32_attach): Use coredll.dll on Windows CE.
16446 (win32_kill): Close current process and current
16447 thread handles.
16448 (win32_detach): Use coredll.dll on Windows CE.
16449 (win32_resume): Let low target handle debug registers, and
16450 step request.
16451 (handle_exception): Add/Remove initial breakpoint. Avoid
16452 non-existant WSTOPSIG on Windows CE.
16453 (win32_read_inferior_memory): Cast to remove warning.
16454 (win32_arch_string): Go through the low target.
16455 (initialize_low): Call set_breakpoint_data with the low
16456 target's breakpoint.
16457 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16458 FOP_REGNUM, mappings): Move to ...
16459 * win32-i386-low.c: ... here.
16460 * win32-low.c (win32_thread_info): Move to ...
16461 * win32-low.h: ... here.
16462 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16463 win32-arm-low.c and wincecompat.c.
16464 (all:): Add $EXEEXT.
16465 (install-only:): Likewise.
16466 (gdbserver:): Likewise.
16467 (gdbreplay:): Likewise.
16468 * config.in: Regenerate.
16469 * configure: Regenerate.
16470
16471 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16472
16473 * win32-low.c: Rename typedef thread_info to
16474 win32_thread_info throughout.
16475
16476 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16477
16478 * win32-i386-low.c: Rename to ...
16479 * win32-low.c: ... this.
16480 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16481 * Makefile.in: Likewise.
16482
16483 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16484
16485 * remote-utils.c (monitor_output): Constify msg parameter.
16486 * server.h (monitor_output): Likewise.
16487 * win32-i386-low.c (handle_output_debug_string): New.
16488 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16489 handle_output_debug_string.
16490 (get_child_debug_event): Likewise.
16491
16492 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16493
16494 * server.c (main): Correct strtoul check.
16495
16496 2007-03-27 Jon Ringle <jon@ringle.org>
16497
16498 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16499
16500 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16501
16502 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16503
16504 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16505
16506 * terminal.h: Check HAVE_SGTTY_H.
16507
16508 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16509
16510 * remote-utils.c (remote_open): Print out the assigned port number.
16511
16512 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16513
16514 * remote-utils.c (monitor_output): New function.
16515 * server.c (debug_threads): Define here.
16516 (monitor_show_help): New function.
16517 (handle_query): Handle qRcmd.
16518 (main): Do not handle 'd' packet.
16519 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16520 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16521 of debug_threads.
16522
16523 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16524
16525 * Makefile.in (EXEEXT): New.
16526 (clean): Use $(EXEEXT).
16527
16528 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16529
16530 * target.h (target_ops): Rename send_signal to request_interrupt,
16531 and remove enum target_signal parameter.
16532 * linux-low.c (linux_request_interrupt): Rename from
16533 linux_send_signal, and always send SIGINT.
16534 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16535 and always send SIGINT.
16536 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16537 of send_signal.
16538 (input_interrupt): Likewise.
16539
16540 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16541
16542 * server.c (get_features_xml): Check if target implemented
16543 arch_string.
16544 * win32-i386-low.c (win32_arch_string): New.
16545 (win32_target_ops): Add win32_arch_string as arch_string member.
16546
16547 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16548
16549 * spu-low.c (spu_arch_string): New.
16550 (spu_target_ops): Add spu_arch_string.
16551
16552 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16553
16554 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16555 * configure.ac: Do not check for terminal.h.
16556 * configure, config.in: Regenerated.
16557
16558 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16559
16560 * Makefile.in (OBS): Add $(XML_BUILTIN).
16561 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16562 (clean): Update.
16563 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16564 (arm-with-iwmmxt.c): New.
16565 * config.in, configure: Regenerate.
16566 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16567 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16568 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16569 (arm*-*-linux*): Add iWMMXt and regset support.
16570 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16571 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16572 (arm_store_wmmxregset, target_regsets): New.
16573 * server.c (get_features_xml): Take annex argument. Check builtin
16574 XML documents.
16575 (handle_query): Handle multiple annexes.
16576
16577 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16578
16579 * remote-utils.c [USE_WIN32API] (read, write): Define.
16580 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16581 write.
16582
16583 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16584
16585 * linux-i386-low.c (the_low_target): Set arch_string.
16586 * linux-x86-64-low.c (the_low_target): Likewise.
16587 * linux-low.c (linux_arch_string): New.
16588 (linux_target_ops): Add it.
16589 * linux-low.h (struct linux_target_ops): Add arch_string.
16590 * server.c (write_qxfer_response): Use const void * for DATA.
16591 (get_features_xml): New.
16592 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16593 * target.h (struct target_ops): Add arch_string method.
16594
16595 2007-01-03 Denis Pilat <denis.pilat@st.com>
16596 Daniel Jacobowitz <dan@codesourcery.com>
16597
16598 * linux-low.c (linux_kill): Handle being called with no threads.
16599 * win32-i386-low.c (win32_kill): Likewise.
16600 (get_child_debug_event): Clear current_process_handle.
16601
16602 2006-12-30 Denis PILAT <denis.pilat@st.com>
16603 Daniel Jacobowitz <dan@codesourcery.com>
16604
16605 * remote-utils.c (remote_open): Check the type of specified
16606 serial port devices before opening them.
16607 * server.c (main): Kill the inferior if an error occurs during
16608 the first remote_open.
16609
16610 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16611
16612 * README: Update supported targets.
16613
16614 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16615
16616 * Makefile.in (clean): Remove reg-mips64.c.
16617 (reg-mips64.c, reg-mips64.o): New rules.
16618 * configure.srv: Handle mips64. Include regset support for mips.
16619 * linux-mips-low.c (union mips_register): New.
16620 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16621 (mips_breakpoint, mips_breakpoint_at): Use int.
16622 (mips_collect_register, mips_supply_register)
16623 (mips_collect_register_32bit, mips_supply_register_32bit)
16624 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16625 (mips_store_fpregset, target_regsets): New.
16626 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16627
16628 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16629
16630 * configure.srv: Add target "spu*-*-*".
16631 * Makefile.in (clean): Remove reg-spu.c.
16632 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16633 * spu-low.c: New file.
16634
16635 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * configure.ac: Correct td_thr_tls_get_addr test.
16638 * configure: Regenerated.
16639
16640 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16641
16642 * linux-low.c (linux_wait_for_event): Reformat. Use the
16643 pass_signals array.
16644 * remote-utils.c (decode_address_to_semicolon): New.
16645 * server.c (pass_signals, handle_general_set): New.
16646 (handle_query): Mention QPassSignals for qSupported.
16647 (main): Call handle_general_set.
16648 * server.h (pass_signals, decode_address_to_semicolon): New.
16649
16650 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16651
16652 * server.c (handle_query): Correct error handling for read_auxv.
16653
16654 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16655
16656 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16657 and srv_linux_thread_db to yes.
16658 * linux-s390-low.c (s390_fill_gregset): New function.
16659 (target_regsets): Define data structure.
16660
16661 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16662
16663 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16664 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16665 * config.in, configure: Regenerated.
16666 * inferiors.c (gdb_id_to_thread): New function.
16667 (gdb_id_to_thread_id): Use it.
16668 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16669 * linux-low.h (struct process_info): Add th member.
16670 (thread_db_get_tls_address): New prototype.
16671 * remote-utils.c (decode_address): Make non-static.
16672 * server.c (handle_query): Handle qGetTLSAddr.
16673 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16674 * target.h (struct target_ops): Add get_tls_address.
16675 * thread-db.c (maybe_attach_thread): Save the thread handle.
16676 (thread_db_get_tls_address): New.
16677
16678 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16679
16680 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16681 (linux_resume_one_process): Take a siginfo_t *. Update all
16682 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16683 (struct pending_signals): Add a siginfo_t.
16684 (linux_wait_for_process): Always set last_status.
16685 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16686 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16687 * linux-low.h (struct process_info): Add last_status.
16688
16689 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16690
16691 * remote-utils.c (try_rle): New function.
16692 (putpkt_binary): Use it.
16693
16694 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16695
16696 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16697 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16698 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16699 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16700 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16701 point registers.
16702
16703 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16704
16705 * server.c (terminal_fd): New variable.
16706 (old_foreground_pgrp): Likewise.
16707 (restore_old_foreground_pgrp): New function.
16708 (start_inferior): Record the terminal file descriptor in terminal_fd
16709 and its original foreground group in old_foreground_pgrp. Register
16710 restore_old_foreground_pgrp with atexit().
16711
16712 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16713
16714 * server.c (handle_query): Correct qPart to qXfer.
16715
16716 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16717
16718 * configure.ac: Check for more headers which are missing on
16719 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16720 * configure.srv: Add Cygwin and mingw32.
16721 * remote-utils.c: Don't include headers unconditionally which
16722 are missing on mingw32. Include <winsock.h> for mingw32.
16723 (remote_open): Adjust for mingw32 support. Flush
16724 standard error after writing to it.
16725 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16726 (unblock_async_io, enable_async_io, disable_async_io)
16727 (readchar, getpkt): Update for Winsock support.
16728 (prepare_resume_reply): Expect a protocol signal number.
16729 * server.c: Disable <sys/wait.h> on mingw32.
16730 (start_inferior): Adjust for mingw32 support. Flush
16731 standard error after writing to it.
16732 (attach_inferior): Likewise. Use protocol signal
16733 numbers.
16734 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16735 and names.
16736 * win32-i386-low.c: New file.
16737 * Makefile.in (XM_CLIBS): Set.
16738 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16739 (win32-i386-low.o): New dependency rule.
16740 * linux-low.c (linux_wait): Use target signal numbers.
16741 * target.h (struct target_ops): Doc fix.
16742 * server.h (target_signal_to_name): New prototype.
16743 * gdbreplay.c: Don't include headers unconditionally which
16744 are missing on mingw32. Include <winsock.h> for mingw32.
16745 (remote_close, remote_open): Adjust for Winsock support.
16746 * configure, config.in: Regenerated.
16747
16748 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16749
16750 * server.c (decode_xfer_read, write_qxfer_response): New.
16751 (handle_query): Take a packet length argument. Handle
16752 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16753 the qSupported response.
16754 (main): Update call to handle_query.
16755
16756 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16757
16758 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16759 (putpkt_binary): Renamed from putpkt and adjusted for binary
16760 data.
16761 (putpkt): New wrapper for putpkt_binary.
16762 (readchar): Don't mask off the high bit.
16763 (decode_X_packet): New function.
16764 * server.c (main): Call putpkt_binary if a handler sets the packet
16765 length. Save the length of the incoming packet. Handle 'X'.
16766 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16767
16768 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * server.c (handle_query): Handle qSupported.
16771
16772 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16773
16774 * remote-utils.c (all_symbols_looked_up): New variable.
16775 (look_up_one_symbol): Check it.
16776 * server.h (look_up_one_symbol): New declaration.
16777 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16778
16779 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16780
16781 * Makefile.in (linux-arm-low.o): Update dependencies.
16782 * linux-arm-low.c: Include "gdb_proc_service.h".
16783 (PTRACE_GET_THREAD_AREA): Define.
16784 (ps_get_thread_area): New function.
16785
16786 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16787
16788 * configure.srv (m68k*-*-uclinux*): New target.
16789 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16790 (linux_resume_one_process): Remove extraneous cast.
16791 (linux_read_offsets): New.
16792 (linux_target_op): Add linux_read_offsets on mmuless systems.
16793 * server.c (handle_query): Add qOffsets logic.
16794 * target.h (struct target_ops): Add read_offsets.
16795
16796 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16797
16798 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16799 (PTRACE_GET_THREAD_AREA): Define.
16800 (ps_get_thread_area): New function.
16801 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16802 (linux-x86-64-low.o): Update.
16803
16804 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16805
16806 * configure.ac: Remove checks for prfpregset_t.
16807 * gdb_proc_service.h: New file.
16808 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16809 new "gdb_proc_service.h".
16810 * proc-service.c: Likewise.
16811 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16812 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16813 * Makefile.in (gdb_proc_service_h): Updated.
16814 * configure, config.in: Regenerated.
16815
16816 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * remote-utils.c (prepare_resume_reply): Move declaration
16819 of gdb_id_from_wait to the top of the block.
16820
16821 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16822
16823 * linux-low.c (regsets_store_inferior_registers): Read the regset
16824 from the target before filling it.
16825
16826 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16827
16828 * server.c (attach_inferior): Return SIGTRAP for a successful
16829 attach.
16830
16831 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16832
16833 * Makefile.in (OBS): Add version.o.
16834 (STAGESTUFF): Delete.
16835 (version.o): Add dependencies.
16836 (version.c): Replace rule.
16837 (clean): Remove version.c.
16838 * server.c (gdbserver_version): New.
16839 (gdbserver_usage): Use printf.
16840 (main): Handle --version and --help.
16841 * server.h (version, host_name): Add declarations.
16842
16843 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16844
16845 * linux-arm-low.c:
16846 * linux-arm-low.c:
16847 * inferiors.c:
16848 * i387-fp.h:
16849 * i387-fp.c:
16850 * gdbreplay.c:
16851 * regcache.c:
16852 * proc-service.c:
16853 * mem-break.h:
16854 * mem-break.c:
16855 * linux-x86-64-low.c:
16856 * linux-sh-low.c:
16857 * linux-s390-low.c:
16858 * linux-ppc64-low.c:
16859 * linux-ppc-low.c:
16860 * linux-mips-low.c:
16861 * linux-m68k-low.c:
16862 * linux-m32r-low.c:
16863 * linux-low.h:
16864 * linux-low.c:
16865 * linux-ia64-low.c:
16866 * linux-i386-low.c:
16867 * linux-crisv32-low.c:
16868 * thread-db.c:
16869 * terminal.h:
16870 * target.h:
16871 * target.c:
16872 * server.h:
16873 * server.c:
16874 * remote-utils.c:
16875 * regcache.h:
16876 * utils.c:
16877 * Makefile.in:
16878 * configure.ac:
16879 * gdbserver.1: Add (C) after Copyright. Update the FSF
16880 address.
16881
16882 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16883
16884 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16885 (arm_breakpoint_at): Recognize both breakpoints.
16886 (the_low_target): Use the correct breakpoint instruction.
16887
16888 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16889
16890 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16891 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16892 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16893 (the_low_target): Update.
16894
16895 2005-10-25 Andreas Schwab <schwab@suse.de>
16896
16897 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16898
16899 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16900 (ia64_num_regs): Reduce to 462.
16901
16902 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16903
16904 * acinclude.m4: Correct quoting.
16905 * aclocal.m4: Regenerated.
16906
16907 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16908 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16909 (thread_db_init): Call thread_db_err_str.
16910 * configure.ac: Check for TD_VERSION.
16911 * config.in, configure: Regenerated.
16912
16913 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16914
16915 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16916
16917 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16920 is not available. Define HAVE_PTRACE_GETREGS if it is.
16921 * config.in, configure: Regenerated.
16922 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16923 * linux-i386-low.c, linux-m68k-low.c: Update to use
16924 HAVE_PTRACE_GETREGS.
16925 * linux-low.c (regsets_fetch_inferior_registers)
16926 (regsets_store_inferior_registers): Only return 0 if we processed
16927 GENERAL_REGS.
16928 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16929 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16930
16931 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16932
16933 * inferiors.c (struct thread_info): Add gdb_id.
16934 (add_thread): Add gdb_id argument.
16935 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16936 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16937 calls to add_thread.
16938 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16939 * server.c (handle_query): Use thread_to_gdb_id.
16940 (handle_v_cont, main): Use gdb_id_to_thread_id.
16941 * server.h (add_thread): Update prototype.
16942 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16943 prototypes.
16944
16945 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16946
16947 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16948 left-padded registers.
16949 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16950 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16951
16952 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16953
16954 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16955 * configure: Regenerate.
16956 * config.in: Regenerate.
16957 * server.h (NEED_DECLARATION_STRERROR):
16958 Replace with !HAVE_DECL_STRERROR.
16959
16960 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16961
16962 * linux-low.c (linux_wait, linux_send_signal): Don't test
16963 an unsigned long variable for > 0 if it could be MAX_ULONG.
16964 * server.c (myresume): Likewise.
16965 * target.c (set_desired_inferior): Likewise.
16966
16967 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16968
16969 * configure.ac: Simplify and improve check for socklen_t.
16970 * configure, config.in: Regenerate.
16971
16972 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16973
16974 * acconfig.h: Remove.
16975 * configure.ac: Add a test for socklen_t. Use three-argument
16976 AC_DEFINE throughout.
16977 * config.in: Regenerated using autoheader 2.59.
16978 * configure: Regenerated.
16979
16980 * gdbreplay.c (socklen_t): Provide a default.
16981 (remote_open): Use socklen_t.
16982 * remote-utils.c (socklen_t): Provide a default.
16983 (remote_open): Use socklen_t.
16984 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16985 unsigned char.
16986
16987 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16988 char for buffers.
16989 * linux-low.c (linux_read_memory, linux_write_memory)
16990 (linux_read_auxv): Likewise.
16991 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16992 (check_mem_write): Likewise.
16993 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16994 Likewise.
16995 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16996 (registers_from_string, register_data): Likewise.
16997 * server.c (handle_query, main): Likewise.
16998 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16999 (decode_M_packet): Likewise.
17000 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17001 * target.h (struct target_ops): Update read_memory, write_memory,
17002 and read_auxv.
17003 (read_inferior_memory, write_inferior_memory): Update.
17004 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17005 to unsigned char *.
17006 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17007 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17008 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17009 linux-s390-low.c, linux-sh-low.c: Update for changes in
17010 read_inferior_memory and the_low_target->breakpoint.
17011
17012 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17013
17014 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17015 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17016 * configure.srv: Add powerpc64-*-linux*.
17017 * linux-ppc64-low.c: New file.
17018
17019 2005-05-23 Orjan Friberg <orjanf@axis.com>
17020
17021 * linux-cris-low.c: New file with support for CRIS.
17022 * linux-crisv32-low.c: Ditto for CRISv32.
17023 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17024 (clean): Add reg-cris.c and reg-crisv32.c.
17025 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17026 reg-crisv32.o, and reg-crisv32.c to make rules.
17027 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17028 recognized targets.
17029
17030 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17031
17032 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17033 of sizeof (PTRACE_XFER_TYPE).
17034 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17035
17036 2005-05-12 Orjan Friberg <orjanf@axis.com>
17037
17038 * target.h (struct target_ops): Add insert_watchpoint,
17039 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17040 pointers for hardware watchpoint support.
17041 * linux-low.h (struct linux_target_ops): Ditto.
17042 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17043 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17044 to linux_target_ops.
17045 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17046 reply packet.
17047 * server.c (main): Recognize 'Z' and 'z' packets.
17048
17049 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17050
17051 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17052 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17053 (the_low_target): Add new members.
17054
17055 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17056
17057 * proc-service.c (ps_lgetregs): Search all_processes instead of
17058 all_threads.
17059
17060 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17061
17062 * server.c (start_inferior): Change return type to int.
17063 (attach_inferior): Change sigptr to int *.
17064 (handle_v_cont, handle_v_requests): Change signal to int *.
17065 (main): Change signal to int.
17066
17067 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17068
17069 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17070 * configure.srv: Add m32r*-*-linux*.
17071 * linux-m32r-low.c: New file.
17072
17073 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17074
17075 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17076
17077 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17078
17079 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17080 Take unsigned long arguments for PIDs.
17081 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17082 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17083 (wait_for_sigstop, linux_resume_one_process)
17084 (regsets_fetch_inferior_registers, linux_send_signal)
17085 (linux_read_auxv): Likewise. Update the types of variables holding
17086 PIDs. Update format string specifiers.
17087 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17088 * remote-utils.c (prepare_resume_reply): Likewise.
17089 * server.c (cont_thread, general_thread, step_thread)
17090 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17091 unsigned long.
17092 (handle_query): Update format specifiers.
17093 (handle_v_cont, main): Use strtoul for thread IDs.
17094 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17095 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17096 (general_thread, step_thread, thread_from_wait)
17097 (old_thread_from_wait): Update.
17098 * target.h (struct thread_resume): Use unsigned long for THREAD.
17099 (struct target_ops): Use unsigned long for arguments to attach and
17100 thread_alive.
17101
17102 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17103
17104 * acinclude.m4: Include bfd/bfd.m4 directly.
17105 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17106 <agriffis@toolchain.org>.
17107 * aclocal.m4, configure: Regenerated.
17108
17109 2005-01-07 Andrew Cagney <cagney@gnu.org>
17110
17111 * configure.ac: Rename configure.in, require autoconf 2.59.
17112 * configure: Re-generate.
17113
17114 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17115
17116 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17117 LIBS when finished.
17118 * aclocal.m4: Regenerated.
17119 * configure: Regenerated.
17120
17121 2004-11-21 Andreas Schwab <schwab@suse.de>
17122
17123 * linux-m68k-low.c (m68k_num_gregs): Define.
17124 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17125 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17126 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17127 (m68k_breakpoint_at): New. Add to the_low_target.
17128
17129 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17130 srv_linux_thread_db to yes.
17131
17132 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17133
17134 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17135 (ARCH_SET_FS): Likewise.
17136 (ARCH_GET_FS): Likewise.
17137 (ARCH_GET_GS): Likewise.
17138
17139 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17140
17141 * linux-i386-low.c (ps_get_thread_area): New.
17142 * linux-x86-64-low.c (ps_get_thread_area): New.
17143 * linux-low.c: Include <sys/syscall.h>.
17144 (linux_kill_one_process): Don't kill the first thread here.
17145 (linux_kill): Kill the first thread here.
17146 (kill_lwp): New function.
17147 (send_sigstop, linux_send_signal): Use it.
17148 * proc-service.c: Clean up #ifdefs.
17149 (fpregset_info): Delete.
17150 (ps_lgetregs): Update and enable implementation.
17151 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17152 implementations.
17153 * remote-utils.c (struct sym_cache, symbol_cache): New.
17154 (input_interrupt): Print a clearer message.
17155 (async_io_enabled): New variable.
17156 (enable_async_io, disable_async_io): Use it. Update comments.
17157 (look_up_one_symbol): Use the symbol cache.
17158 * thread-db.c (thread_db_look_up_symbols): New function.
17159 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17160
17161 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17162
17163 * configure.in: Test for -rdynamic.
17164 * configure: Regenerated.
17165 * Makefile (INTERNAL_LDFLAGS): New.
17166 (gdbserver, gdbreplay): Use it.
17167
17168 2004-09-02 Andrew Cagney <cagney@gnu.org>
17169
17170 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17171
17172 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17173
17174 * linux-low.c (linux_wait): Clear all_processes list also.
17175
17176 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17177
17178 * linux-low.c: Include <errno.h>. Remove extern declaration of
17179 errno.
17180
17181 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17182
17183 * gdbreplay.c, server.h, utils.c: Update copyright years.
17184
17185 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17186
17187 * server.c (main): Print child status or termination signal from
17188 variable 'signal', not 'sig'.
17189
17190 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17191
17192 * linux-low.c (linux_read_memory): Change return type to
17193 int. Check for and return error from ptrace().
17194 * target.c (read_inferior_memory): Change return type to int. Pass
17195 back return status from the_target->read_memory().
17196 * target.h (struct target_ops): Adapt *read_memory() prototype.
17197 Update comment.
17198 (read_inferior_memory): Adapt prototype.
17199 * server.c (main): Return an error packet if
17200 read_inferior_memory() returns an error.
17201
17202 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17203
17204 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17205 Unify with other clean targets.
17206
17207 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17208
17209 * server.c (handle_v_cont): Call set_desired_inferior.
17210
17211 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17212
17213 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17214
17215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17216
17217 * linux-low.c (linux_wait): Unblock async I/O.
17218 (linux_resume): Block and enable async I/O.
17219 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17220 * server.h (block_async_io, unblock_async_io): Add prototypes.
17221
17222 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17223
17224 * remote-utils.c (remote_open): Print a status notice after
17225 opening a TCP port.
17226 * server.c (attach_inferior): Print a status notice after
17227 attaching.
17228
17229 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17230
17231 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17232
17233 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17234
17235 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17236 error packet.
17237 * server.c, target.h: Update copyright years.
17238
17239 2004-02-25 Roland McGrath <roland@redhat.com>
17240
17241 * target.h (struct target_ops): New member `read_auxv'.
17242 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17243 * linux-low.c (linux_read_auxv): New function.
17244 (linux_target_ops): Initialize `read_auxv' member to that.
17245
17246 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17247
17248 Committed by Jim Blandy <jimb@redhat.com>.
17249
17250 * linux-s390-low.c (s390_num_regs): Update.
17251 (s390_regmap): Remove control registers. Use __s390x__ predefine
17252 instead of GPR_SIZE to distiguish s390 and s390x targets.
17253
17254 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17255
17256 * linux-low.c: Update copyright year.
17257 (check_removed_breakpoint): Clear pending_is_breakpoint.
17258 (linux_set_resume_request, linux_queue_one_thread)
17259 (resume_status_pending_p): New functions.
17260 (linux_continue_one_thread): Use process->resume.
17261 (linux_resume): Only resume threads if there are no pending events.
17262 * linux-low.h (struct process_info): Add resume request
17263 pointer.
17264
17265 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17266
17267 * regcache.c (new_register_cache): Clear the allocated register
17268 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17269
17270 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17271
17272 * linux-low.c (linux_resume): Take a struct thread_resume *
17273 argument.
17274 (linux_wait): Update call.
17275 (resume_ptr): New static variable.
17276 (linux_continue_one_thread): Renamed from
17277 linux_continue_one_process. Use resume_ptr.
17278 (linux_resume): Use linux_continue_one_thread.
17279 * server.c (handle_v_cont, handle_v_requests): New functions.
17280 (myresume): New function.
17281 (main): Handle 'v' case.
17282 * target.h (struct thread_resume): New type.
17283 (struct target_ops): Change argument of "resume" to struct
17284 thread_resume *.
17285 (myresume): Delete macro.
17286
17287 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17288
17289 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17290 (uninstall): Support DESTDIR.
17291
17292 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17293
17294 * configure.srv: Add xscale*linux copy of arm*linux entry.
17295
17296 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17297
17298 * linux-arm-low.c (arm_reinsert_addr): New function.
17299 (the_low_target): Add arm_reinsert_addr.
17300
17301 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17302
17303 * mem-break.c: Remove whitespace at end of file.
17304
17305 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17306
17307 * configure.in: Check whether we need to prototype strerror.
17308 * server.h: Optionally prototype strerror.
17309 * gdbreplay.c (perror_with_name): Use strerror.
17310 * linux-low.c (linux_attach_lwp): Use strerror.
17311 * utils.c (perror_with_name): Use strerror.
17312 * config.in, configure: Regenerated.
17313
17314 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17315
17316 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17317 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17318
17319 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17320
17321 * Makefile.in (SFILES): Update.
17322 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17323 low-sun3.c: Remove files.
17324
17325 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17326
17327 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17328 (linux_detach_one_process, linux_detach): New functions.
17329 (linux_target_ops): Add linux_detach.
17330 * server.c (main): Handle 'D' packet.
17331 * target.h (struct target_ops): Add "detach" member.
17332 (detach_inferior): Define.
17333
17334 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17335
17336 From Kelley Cook <kelleycook@wideopenwest.com>:
17337 * configure.srv: Accept i[34567]86 variants.
17338
17339 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17340
17341 * linux-low.c (linux_wait_for_event): Correct comment typos.
17342 (linux_resume_one_process): Call check_removed_breakpoint.
17343 (linux_send_signal): New function.
17344 (linux_target_ops): Add linux_send_signal.
17345 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17346 of kill.
17347 * target.h (struct target_ops): Add send_signal.
17348
17349 2003-05-29 Jim Blandy <jimb@redhat.com>
17350
17351 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17352 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17353 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17354 away part of the register's value.
17355
17356 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17357
17358 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17359 (linux_wait_for_event, linux_init_signals): Likewise.
17360
17361 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17362
17363 * configure.in: Check for stdlib.h.
17364 * configure: Regenerated.
17365 * config.in: Regenerated.
17366
17367 2003-01-04 Andreas Schwab <schwab@suse.de>
17368
17369 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17370
17371 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17372
17373 * Makefile.in: Remove obsolete code.
17374
17375 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17378 defined(PT_FPR0_HI).
17379
17380 2002-11-17 Stuart Hughes <seh@zee2.com>
17381
17382 * linux-arm-low.c (arm_num_regs): Increase.
17383 (arm_regmap): Include status register.
17384
17385 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17386
17387 * linux-low.c (register_addr): Remove incorrect -1 check.
17388
17389 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17390
17391 * linux-low.c (linux_create_inferior): Call setpgid. Return
17392 the new PID.
17393 (unstopped_p, linux_signal_pid): Remove.
17394 (linux_target_ops): Remove linux_signal_pid.
17395 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17396 global instead of target method.
17397 * target.h (struct target_ops): Remove signal_pid. Update comment
17398 for create_inferior.
17399 * server.c (signal_pid): New variable.
17400 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17401 gdbserver. Set the child to be the foreground process group.
17402 (attach_inferior): Set signal_pid.
17403
17404 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17405
17406 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17407
17408 2002-08-20 Jim Blandy <jimb@redhat.com>
17409
17410 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17411 default for this.
17412
17413 2002-08-01 Andrew Cagney <cagney@redhat.com>
17414
17415 * Makefile.in: Make chill references obsolete.
17416
17417 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17418
17419 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17420 * configure: Regenerate.
17421 * config.in: Regenerate.
17422
17423 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17424
17425 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17426 (perror_with_name, remote_close, remote_open, expect, play): Static.
17427
17428 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17429
17430 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17431 byte offsets instead of an array of indexes.
17432 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17433
17434 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17435
17436 * regcache.c: Add comment.
17437
17438 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17439
17440 * thread-db.c: New file.
17441 * proc-service.c: New file.
17442 * acinclude.m4: New file.
17443 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17444 proc-service.o, and thread-db.o.
17445 (linux-low.o): Add USE_THREAD_DB.
17446 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17447 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17448 * aclocal.m4: Regenerated.
17449 * config.in: Regenerated.
17450 * configure: Regenerated.
17451 * configure.in: Check for proc_service.h, sys/procfs.h,
17452 thread_db.h, and linux/elf.h headrs.
17453 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17454 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17455 Check for -lthread_db and thread support.
17456 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17457 PowerPC, and SuperH.
17458 * i387-fp.c: Constify arguments.
17459 * i387-fp.h: Likewise.
17460 * inferiors.c: (struct thread_info): Renamed from
17461 `struct inferior_info'. Remove PID member. Use generic inferior
17462 list header. All uses updated.
17463 (inferiors, signal_pid): Removed.
17464 (all_threads): New variable.
17465 (get_thread): Define.
17466 (add_inferior_to_list): New function.
17467 (for_each_inferior): New function.
17468 (change_inferior_id): New function.
17469 (add_inferior): Removed.
17470 (remove_inferior): New function.
17471 (add_thread): New function.
17472 (free_one_thread): New function.
17473 (remove_thread): New function.
17474 (clear_inferiors): Use for_each_inferior and free_one_thread.
17475 (find_inferior): New function.
17476 (find_inferior_id): New function.
17477 (inferior_target_data): Update argument type.
17478 (set_inferior_target_data): Likewise.
17479 (inferior_regcache_data): Likewise.
17480 (set_inferior_regcache_data): Likewise.
17481 * linux-low.c (linux_bp_reinsert): Remove.
17482 (all_processes, stopping_threads, using_thrads)
17483 (struct pending_signals, debug_threads, pid_of): New.
17484 (inferior_pid): Replace with macro.
17485 (struct inferior_linux_data): Remove.
17486 (get_stop_pc, add_process): New functions.
17487 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17488 Use add_process and add_thread.
17489 (linux_attach_lwp): New function, based on old linux_attach. Use
17490 add_process and add_thread. Set stop_expected for new threads.
17491 (linux_attach): New function.
17492 (linux_kill_one_process): New function.
17493 (linux_kill): Kill all LWPs.
17494 (linux_thread_alive): Use find_inferior_id.
17495 (check_removed_breakpoints, status_pending_p): New functions.
17496 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17497 Update. Use WNOHANG. Wait for cloned processes also. Update process
17498 struct for the found process.
17499 (linux_wait_for_event): New function.
17500 (linux_wait): Use it. Support LWPs.
17501 (send_sigstop, wait_for_sigstop, stop_all_processes)
17502 (linux_resume_one_process, linux_continue_one_process): New functions.
17503 (linux_resume): Support LWPs.
17504 (REGISTER_RAW_SIZE): Remove.
17505 (fetch_register): Use register_size instead. Call supply_register.
17506 (usr_store_inferior_registers): Likewise. Call collect_register.
17507 Fix recursive case.
17508 (regsets_fetch_inferior_registers): Improve error message.
17509 (regsets_store_inferior_registers): Add debugging.
17510 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17511 (unstopped_p, linux_signal_pid): New functions.
17512 (linux_target_ops): Add linux_signal_pid.
17513 (linux_init_signals): New function.
17514 (initialize_low): Call it. Initialize using_threads.
17515 * regcache.c (inferior_regcache_data): Add valid
17516 flag.
17517 (get_regcache): Fetch registers lazily. Add fetch argument
17518 and update all callers.
17519 (regcache_invalidate_one, regcache_invalidate): New
17520 functions.
17521 (new_register_cache): Renamed from create_register_cache.
17522 Return the new regcache.
17523 (free_register_cache): Change argument to a void *.
17524 (registers_to_string, registers_from_string): Call get_regcache
17525 with fetch flag set.
17526 (register_data): Make static. Pass fetch flag to get_regcache.
17527 (supply_register): Call get_regcache with fetch flag clear.
17528 (collect_register): Call get_regcache with fetch flag set.
17529 (collect_register_as_string): New function.
17530 * regcache.h: Update.
17531 * remote-utils.c (putpkt): Flush after debug output and use
17532 stderr.
17533 Handle input interrupts while waiting for an ACK.
17534 (input_interrupt): Use signal_pid method.
17535 (getpkt): Flush after debug output and use stderr.
17536 (outreg): Use collect_register_as_string.
17537 (new_thread_notify, dead_thread_notify): New functions.
17538 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17539 and general_thread.
17540 (look_up_one_symbol): Flush after debug output.
17541 * server.c (step_thread, server_waiting): New variables.
17542 (start_inferior): Don't use signal_pid. Update call to mywait.
17543 (attach_inferior): Update call to mywait.
17544 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17545 (main): Don't fetch/store registers explicitly. Use
17546 set_desired_inferior. Support proposed ``Hs'' packet. Update
17547 calls to mywait.
17548 * server.h: Update.
17549 (struct inferior_list, struct_inferior_list_entry): New.
17550 * target.c (set_desired_inferior): New.
17551 (write_inferior_memory): Constify.
17552 (mywait): New function.
17553 * target.h: Update.
17554 (struct target_ops): New signal_pid method.
17555 (mywait): Removed macro, added prototype.
17556
17557 * linux-low.h (regset_func): Removed.
17558 (regset_fill_func, regset_store_func): New.
17559 (enum regset_type): New.
17560 (struct regset_info): Add type field. Use new operation types.
17561 (struct linux_target_ops): stop_pc renamed to get_pc.
17562 Add decr_pc_after_break and breakpoint_at.
17563 (get_process, get_thread_proess, get_process_thread)
17564 (strut process_info, all_processes, linux_attach_lwp)
17565 (thread_db_init): New.
17566
17567 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17568 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17569 (the_low_target): Add new members.
17570 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17571 (i386_store_fpxregset): Constify.
17572 (target_regsets): Add new kind identifier.
17573 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17574 (i386_set_pc): Add debugging.
17575 (i386_breakpoint_at): New function.
17576 (the_low_target): Add new members.
17577 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17578 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17579 (mips_breakpoint_at): New.
17580 (the_low_target): Add new members.
17581 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17582 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17583 (the_low_target): Add new members.
17584 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17585 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17586 (the_low_target): Add new members.
17587 * linux-x86-64-low.c (target_regsets): Add new kind
17588 identifier.
17589
17590 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17591
17592 From Martin Pool <mbp@samba.org>:
17593 * server.c (gdbserver_usage): New function.
17594 (main): Call it.
17595
17596 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17597
17598 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17599 stop_at -> stop_pc.
17600
17601 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17602
17603 * Makefile.in: Remove obsolete code.
17604
17605 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17606
17607 * linux-low.c (regsets_fetch_inferior_registers),
17608 (regsets_store_inferior_registers): Removed cast to int from
17609 ptrace() calls.
17610 * regcache.h: Added declaration of struct inferior_info.
17611
17612 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17613
17614 * inferiors.c (struct inferior_info): Add regcache_data.
17615 (add_inferior): Call create_register_cache.
17616 (clear_inferiors): Call free_register_cache.
17617 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17618 * regcache.c (struct inferior_regcache_data): New.
17619 (registers): Remove.
17620 (get_regcache): New function.
17621 (create_register_cache, free_register_cache): New functions.
17622 (set_register_cache): Don't initialize the register cache here.
17623 (registers_to_string, registers_from_string, register_data): Call
17624 get_regcache.
17625 * regcache.h: Add prototypes.
17626 * server.h: Likewise.
17627
17628 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17629
17630 * mem-break.c: New file.
17631 * mem-break.h: New file.
17632 * Makefile.in: Add mem-break.o rule; update server.h
17633 dependencies.
17634 * inferiors.c (struct inferior_info): Add target_data
17635 member.
17636 (clear_inferiors): Free target_data member if set.
17637 (inferior_target_data, set_inferior_target_data): New functions.
17638 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17639 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17640 * linux-low.c (linux_bp_reinsert): New variable.
17641 (struct inferior_linux_data): New.
17642 (linux_create_inferior): Use set_inferior_target_data.
17643 (linux_attach): Likewise. Call add_inferior.
17644 (linux_wait_for_one_inferior): New function.
17645 (linux_wait): Call it.
17646 (linux_write_memory): Add const.
17647 (initialize_low): Call set_breakpoint_data.
17648 * linux-low.h (struct linux_target_ops): Add breakpoint
17649 handling members.
17650 * server.c (attach_inferior): Remove extra add_inferior
17651 call.
17652 * server.h: Include mem-break.h. Update inferior.c
17653 prototypes.
17654 * target.c (read_inferior_memory)
17655 (write_inferior_memory): New functions.
17656 * target.h (read_inferior_memory)
17657 (write_inferior_memory): Change macros to prototypes.
17658 (struct target_ops): Update comments. Add const to write_memory
17659 definition.
17660
17661 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17662
17663 * linux-low.c (usr_store_inferior_registers): Support
17664 registers which are allowed to fail to store.
17665 * linux-low.h (linux_target_ops): Likewise.
17666 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17667 (ppc_cannot_store_register): FPSCR may not be storable.
17668
17669 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17670
17671 * server.h: Include <string.h> if HAVE_STRING_H.
17672 * ChangeLog: Correct paths in last ChangeLog entry.
17673
17674 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17675
17676 * linux-low.h: Remove obsolete prototypes.
17677 (struct linux_target_ops): New.
17678 (extern the_low_target): New.
17679 * linux-low.c (num_regs, regmap): Remove declarations.
17680 (register_addr): Use the_low_target explicitly.
17681 (fetch_register): Likewise.
17682 (usr_fetch_inferior_registers): Likewise.
17683 (usr_store_inferior_registers): Likewise.
17684 * linux-arm-low.c (num_regs): Remove.
17685 (arm_num_regs): Define.
17686 (arm_regmap): Renamed from regmap, made static.
17687 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17688 made static.
17689 (arm_cannot_store_register): Renamed from cannot_store_register,
17690 made static.
17691 (the_low_target): New.
17692 * linux-i386-low.c (num_regs): Remove.
17693 (i386_num_regs): Define.
17694 (i386_regmap): Renamed from regmap, made static.
17695 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17696 made static.
17697 (i386_cannot_store_register): Renamed from cannot_store_register,
17698 made static.
17699 (the_low_target): New.
17700 * linux-ia64-low.c (num_regs): Remove.
17701 (ia64_num_regs): Define.
17702 (ia64_regmap): Renamed from regmap, made static.
17703 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17704 made static.
17705 (ia64_cannot_store_register): Renamed from cannot_store_register,
17706 made static.
17707 (the_low_target): New.
17708 * linux-m68k-low.c (num_regs): Remove.
17709 (m68k_num_regs): Define.
17710 (m68k_regmap): Renamed from regmap, made static.
17711 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17712 made static.
17713 (m68k_cannot_store_register): Renamed from cannot_store_register,
17714 made static.
17715 (the_low_target): New.
17716 * linux-mips-low.c (num_regs): Remove.
17717 (mips_num_regs): Define.
17718 (mips_regmap): Renamed from regmap, made static.
17719 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17720 made static.
17721 (mips_cannot_store_register): Renamed from cannot_store_register,
17722 made static.
17723 (the_low_target): New.
17724 * linux-ppc-low.c (num_regs): Remove.
17725 (ppc_num_regs): Define.
17726 (ppc_regmap): Renamed from regmap, made static.
17727 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17728 made static.
17729 (ppc_cannot_store_register): Renamed from cannot_store_register,
17730 made static.
17731 (the_low_target): New.
17732 * linux-s390-low.c (num_regs): Remove.
17733 (s390_num_regs): Define.
17734 (s390_regmap): Renamed from regmap, made static.
17735 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17736 made static.
17737 (s390_cannot_store_register): Renamed from cannot_store_register,
17738 made static.
17739 (the_low_target): New.
17740 * linux-sh-low.c (num_regs): Remove.
17741 (sh_num_regs): Define.
17742 (sh_regmap): Renamed from regmap, made static.
17743 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17744 made static.
17745 (sh_cannot_store_register): Renamed from cannot_store_register,
17746 made static.
17747 (the_low_target): New.
17748 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17749 (the_low_target): New.
17750
17751 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17752
17753 * Makefile.in: Add stamp-h target.
17754 * configure.in: Create stamp-h.
17755 * configure: Regenerated.
17756
17757 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17758
17759 * inferiors.c: New file.
17760 * target.c: New file.
17761 * target.h: New file.
17762 * Makefile.in: Add target.o and inferiors.o. Update
17763 dependencies.
17764 * linux-low.c (inferior_pid): New static variable,
17765 moved from server.c.
17766 (linux_create_inferior): Renamed from create_inferior.
17767 Call add_inferior. Return 0 on success instead of a PID.
17768 (linux_attach): Renamed from myattach.
17769 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17770 (linux_thread_alive): Renamed from mythread_alive.
17771 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17772 child dies.
17773 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17774 (regsets_store_inferior_registers): Correct error message.
17775 Add missing ``return 0''.
17776 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17777 (linux_store_registers): Renamed from store_inferior_registers.
17778 (linux_read_memory): Renamed from read_inferior_memory.
17779 (linux_write_memory): Renamed from write_inferior_memory.
17780 (linux_target_ops): New structure.
17781 (initialize_low): Call set_target_ops ().
17782 * remote-utils.c (unhexify): New function.
17783 (hexify): New function.
17784 (input_interrupt): Send signals to ``signal_pid''.
17785 * server.c (inferior_pid): Remove.
17786 (start_inferior): Update create_inferior call.
17787 (attach_inferior): Call add_inferior.
17788 (handle_query): New function.
17789 (main): Call handle_query for `q' packets.
17790 * server.h: Include "target.h". Remove obsolete prototypes.
17791 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17792
17793 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17794
17795 * Makefile.in: Add WARN_CFLAGS. Update configury
17796 dependencies.
17797 * configure.in: Check for <string.h>
17798 * configure: Regenerate.
17799 * config.in: Regenerate.
17800 * gdbreplay.c: Include needed system headers.
17801 (remote_open): Remove strchr prototype.
17802 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17803 * regcache.c (supply_register): Change buf argument to const void *.
17804 (supply_register_by_name): Likewise.
17805 (collect_register): Change buf argument to void *.
17806 (collect_register_by_name): Likewise.
17807 * regcache.h: Add missing prototypes.
17808 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17809 * server.c (handle_query): New function.
17810 (attached): New static variable, moved out of main.
17811 (main): Quiet longjmp clobber warnings.
17812 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17813 * utils.c (error): Remove NORETURN.
17814 (fatal): Likewise.
This page took 0.426582 seconds and 4 git commands to generate.