[gdb] Fix more typos in comments (2)
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-10-26 Tom de Vries <tdevries@suse.de>
2
3 * linux-aarch64-low.c: Fix typos in comments.
4 * linux-arm-low.c: Same.
5 * linux-low.c: Same.
6 * linux-ppc-low.c: Same.
7 * proc-service.c: Same.
8 * regcache.h: Same.
9 * server.c: Same.
10 * tracepoint.c: Same.
11 * win32-low.c: Same.
12
13 2019-10-25 Tom Tromey <tromey@adacore.com>
14
15 * utils.c (xstrdup): Remove.
16
17 2019-10-23 Tom Tromey <tom@tromey.com>
18
19 * configure, config.in: Rebuild.
20
21 2019-10-23 Tom Tromey <tom@tromey.com>
22
23 * configure: Rebuild.
24 * acinclude.m4: Use m4_include, not sinclude.
25
26 2019-10-17 Tom Tromey <tromey@adacore.com>
27
28 * configure: Rebuild.
29 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
30 in AC_CONFIG_FILES invocation.
31 * Makefile.in (stamp-h, Makefile): Use new-style config.status
32 invocation.
33
34 2019-10-16 Christian Biesinger <cbiesinger@google.com>
35
36 * server.c: Include xml-builtin.h.
37 (get_xml_features): Don't declare xml_builtins here.
38
39 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
40
41 * Makefile.in: Remove references to vec-ipa.o.
42
43 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
44
45 * Makefile.in: Remove references to vec.c.
46
47 2019-10-02 Christian Biesinger <cbiesinger@google.com>
48
49 * server.c (server_waiting): Change to bool.
50 (extended_protocol): Likewise.
51 (response_needed): Likewise.
52 (exit_requested): Likewise.
53 (run_once): Likewise.
54 (report_no_resumed): Likewise.
55 (non_stop): Likewise.
56 (disable_packet_vCont): Likewise.
57 (disable_packet_Tthread): Likewise.
58 (disable_packet_qC): Likewise.
59 (disable_packet_qfThreadInfo): Likewise.
60 (handle_general_set): Update.
61 (handle_detach): Update.
62 (handle_monitor_command): Update.
63 (handle_query): Update.
64 (captured_main): Update.
65 (process_serial_event): Update.
66 * server.h (server_waiting): Change to bool.
67 (disable_packet_vCont): Likewise.
68 (disable_packet_Tthread): Likewise.
69 (disable_packet_qC): Likewise.
70 (disable_packet_qfThreadInfo): Likewise.
71 (run_once): Likewise.
72 (non_stop): Likewise.
73 * target.c (target_stop_and_wait): Update.
74
75 2019-10-02 Tom Tromey <tromey@adacore.com>
76
77 * Makefile.in (SFILES): Add common-inferior.c.
78 (OBS): Add common-inferior.o.
79 * server.c (startup_with_shell): Don't define.
80
81 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
82
83 * linux-low.c (linux_low_read_btrace): Update for change to
84 std::vector.
85
86 2019-09-20 Christian Biesinger <cbiesinger@google.com>
87
88 * debug.c (debug_threads): Remove comment in favor of the header.
89 * debug.h (using_threads): Add declaration.
90 (debug_threads): Add comment.
91 * linux-aarch64-low.c: Include debug.h and remove declaration of
92 debug_threads.
93 * nto-low.c: Likewise.
94 * remote-utils.c: Likewise.
95 * thread-db.c: Likewise.
96
97 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
98
99 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
100 and powerpc-cell64l-ipa.o.
101 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
102 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
103 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
104 (spu*-*-*): Remove.
105
106 * spu-low.c: Remove file.
107
108 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
109 (parse_spufs_run): Remove.
110 (ppc_get_pc): Remove Cell/B.E. support.
111 (ppc_set_pc): Likewise.
112 (ppc_breakpoint_at): Likewise.
113 (ppc_arch_setup): Likewise.
114 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
115 tdesc_powerpc_cell32l.
116 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
117 or init_registers_powerpc_cell32l.
118 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
119 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
120 or init_registers_powerpc_cell32l.
121 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
122 (init_registers_powerpc_cell32l): Remove prototype.
123 (init_registers_powerpc_cell64l): Likewise.
124
125 * target.h (struct target_ops): Remove qxfer_spu member.
126 * server.c (handle_qxfer_spu): Remove.
127 (qxfer_packets): Remove entry for "spu".
128 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
129 * linux-low.c (SPUFS_MAGIC): Remove.
130 (spu_enumerate_spu_ids): Remove.
131 (linux_qxfer_spu): Remove.
132 (linux_target_ops): Remove qxfer_spu member.
133 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
134 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
135 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
136
137 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
138
139 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
140 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
141 * config.in: Regenerate.
142 * configure: Regenerate.
143
144 2019-08-15 Tom Tromey <tromey@adacore.com>
145
146 * target.c (target_write_memory): Use gdb::byte_vector.
147
148 2019-08-15 Tom Tromey <tromey@adacore.com>
149
150 * tracepoint.c (write_inferior_data_pointer)
151 (write_inferior_integer, write_inferior_int8)
152 (write_inferior_uinteger, m_tracepoint_action_download)
153 (r_tracepoint_action_download, x_tracepoint_action_download)
154 (l_tracepoint_action_download, clear_inferior_trace_buffer)
155 (download_agent_expr, download_tracepoint_1)
156 (download_trace_state_variables, upload_fast_traceframes): Update.
157 * server.c (gdb_write_memory): Update.
158 * remote-utils.c (relocate_instruction): Update.
159 * proc-service.c (ps_pdwrite): Update.
160 * mem-break.c (remove_memory_breakpoint)
161 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
162 (uninsert_fast_tracepoint_jumps_at)
163 (reinsert_fast_tracepoint_jumps_at): Update.
164 * linux-x86-low.c (append_insns)
165 (i386_install_fast_tracepoint_jump_pad)
166 (amd64_write_goto_address, i386_write_goto_address): Update.
167 * linux-s390-low.c (append_insns, s390_write_goto_address):
168 Update.
169 * linux-ppc-low.c (ppc_relocate_instruction)
170 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
171 (ppc_write_goto_address): Update.
172 * linux-aarch64-low.c (append_insns): Update.
173 * target.h (struct target_ops): Update.
174 (write_inferior_memory): Don't declare.
175 * target.c (target_write_memory): Rename from
176 write_inferior_memory. Remove old target_write_memory.
177
178 2019-08-15 Tom Tromey <tromey@adacore.com>
179
180 * target.c (write_inferior_memory): Use std::vector.
181
182 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
183
184 PR build/24886
185 * configure.ac: Drop enable-libmcheck support.
186 * configure, config.in: Rebuild.
187 * acinclude.m4: Don't include it.
188
189 2019-07-19 Alan Hayward <alan.hayward@arm.com>
190
191 * configure.srv: Remove Arm xml files.
192
193 2019-07-19 Alan Hayward <alan.hayward@arm.com>
194
195 * configure.srv: Add new files. Remove xml generated files.
196 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
197 registers.
198 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
199 * linux-aarch32-tdesc.c: New file.
200 * linux-aarch32-tdesc.h: New file.
201 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
202 * linux-arm-low.c (init_registers_arm, tdesc_arm)
203 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
204 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
205 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
206 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
207 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
208 (arm_read_description): Call arm_linux_read_description.
209 (initialize_low_arch): Don't init registers.
210 * linux-arm-tdesc.c: New file.
211 * linux-arm-tdesc.h: New file.
212
213 2019-07-10 Alan Hayward <alan.hayward@arm.com>
214
215 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
216 Move counter inside for.
217 (arm_read_description): Check ptrace earlier.
218 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
219
220 2019-07-09 Tom Tromey <tom@tromey.com>
221
222 * configure: Rebuild.
223 * configure.ac: Change common to gdbsupport.
224 * acinclude.m4: Change common to gdbsupport.
225 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
226 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
227 common to gdbsupport.
228 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
229 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
230 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
231 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
232 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
233 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
234 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
235 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
236 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
237 common to gdbsupport.
238
239 2019-07-04 Alan Hayward <alan.hayward@arm.com>
240
241 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
242 defines.
243 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
244
245 2019-07-04 Alan Hayward <alan.hayward@arm.com>
246
247 * configure.srv: Remove legacy xml.
248 * linux-aarch64-low.c (initialize_low_arch): Remove
249 initialize_low_tdesc call.
250 * linux-aarch64-tdesc-selftest.c: Remove file.
251 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
252 * linux-x86-low.c (initialize_low_arch): Remove
253 initialize_low_tdesc call.
254 * linux-x86-tdesc-selftest.c: Remove file.
255 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
256
257 2019-06-20 Tom de Vries <tdevries@suse.de>
258
259 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
260 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
261
262 2019-06-19 Tom de Vries <tdevries@suse.de>
263
264 * debug.h (debug_write): Change return type to ssize_t.
265 * debug.c (debug_write): Same.
266
267 2019-06-14 Tom Tromey <tom@tromey.com>
268
269 * configure.ac: Use new path to gnulib.
270 * configure: Rebuild.
271 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
272 to gnulib.
273
274 2019-06-11 Tom Tromey <tom@tromey.com>
275
276 * Makefile.in (SFILES): Add alloc.c.
277 (OBS): Add alloc.o.
278 (IPA_OBJS): Add alloc-ipa.o.
279 (alloc-ipa.o): New target.
280 (%.o: ../%.c): New pattern rule.
281
282 2019-06-10 Tom Tromey <tromey@adacore.com>
283
284 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
285 end warning with a newline.
286 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
287 newline.
288 * thread-db.c (attach_thread): Don't end warning with a newline.
289 (thread_db_notice_clone): Likewise.
290 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
291 newline.
292 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
293 end warning with a newline.
294
295 2019-06-04 Pedro Alves <palves@redhat.com>
296
297 * server.c (captured_main): Use make_unique_xstrdup.
298
299 2019-06-02 Tom Tromey <tom@tromey.com>
300
301 * gdbreplay.c (fromhex): Remove.
302 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
303
304 2019-05-29 Tom Tromey <tromey@adacore.com>
305
306 * configure: Rebuild.
307
308 2019-05-06 Kevin Buettner <kevinb@redhat.com>
309
310 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
311 sign extension code on 32-bit builds.
312
313 2019-05-03 Eli Zaretskii <eliz@gnu.org>
314
315 * remote-utils.c:
316 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
317
318 2019-04-19 Tom Tromey <tom@tromey.com>
319
320 * server.c (struct vstop_notif): Derive from notif_event.
321 <base>: Remove.
322 (queue_stop_reply): Update.
323 (remove_all_on_match_ptid): Change type. Rewrite.
324 (discard_queued_stop_replies): Rewrite.
325 (in_queued_stop_replies_ptid): Change type.
326 (in_queued_stop_replies): Rewrite.
327 (notif_stop): Update.
328 (queue_stop_reply_callback): Update.
329 (captured_main): Don't call initialize_notif.
330 (push_stop_notification): Update.
331 * notif.c (notif_write_event, handle_notif_ack)
332 (notif_event_enque, notif_push): Update.
333 (notif_event_xfree, initialize_notif): Remove.
334 * notif.h (struct notif_event): Include <list>, not
335 "common/queue.h".
336 (struct notif_server) <queue>: Now a std::list.
337 (notif_event_p): Remove typedef.
338 (initialize_notif): Don't declare.
339 (struct notif_event): Add virtual destructor.
340
341 2019-04-17 Alan Hayward <alan.hayward@arm.com>
342
343 * ax.c (ax_vdebug): Call debug_printf.
344 * debug.c (debug_write): New function.
345 * debug.h (debug_write): New declaration.
346 * linux-low.c (sigchld_handler): Call debug_write.
347
348 2019-04-17 Alan Hayward <alan.hayward@arm.com>
349
350 * debug.c (debug_set_output): New function.
351 (debug_vprintf): Send output to debug_file.
352 (debug_flush): Likewise.
353 * debug.h (debug_set_output): New declaration.
354 * server.c (handle_monitor_command): Add debug-file option.
355 (captured_main): Likewise.
356
357 2019-04-17 Alan Hayward <alan.hayward@arm.com>
358
359 * debug.c (remote_debug): Add definition.
360 * debug.h (remote_debug): Add declaration.
361 * hostio.c (remote_debug): Remove declaration.
362 * remote-utils.c (struct ui_file): Likewise.
363 (remote_debug): Likewise.
364 * remote-utils.h (remote_debug): Likewise,
365 * server.c (remote_debug): Remove definition.
366
367 2019-04-10 Kevin Buettner <kevinb@redhat.com>
368
369 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
370 when using a 64-bit gdbserver.
371
372 2019-04-09 Tom Tromey <tromey@adacore.com>
373
374 * linux-low.c (select_event_lwp): Use find_thread_in_random.
375
376 2019-04-08 Tom Tromey <tom@tromey.com>
377
378 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
379 throw.
380 (linux_resume_one_lwp): Likewise.
381
382 2019-04-08 Tom Tromey <tom@tromey.com>
383
384 * gdbreplay.c: Update.
385 * linux-low.c: Update.
386 * server.c: Update.
387
388 2019-04-08 Tom Tromey <tom@tromey.com>
389
390 * server.c: Use C++ exception handling.
391 * linux-low.c: Use C++ exception handling.
392 * gdbreplay.c: Use C++ exception handling.
393
394 2019-04-08 Tom Tromey <tom@tromey.com>
395
396 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
397 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
398 (captured_main, main): Update.
399 * gdbreplay.c (main): Update.
400
401 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
402
403 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
404 value in argument pointer, return 1 if the entry is found and 0
405 otherwise. Move comment.
406 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
407 * linux-low.h (linux_get_auxv): Declare.
408 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
409
410 2019-04-05 Tom Tromey <tromey@adacore.com>
411
412 * server.c (gdbserver_usage): Use upper-case for metasyntactic
413 variables.
414
415 2019-03-28 Alan Hayward <alan.hayward@arm.com>
416
417 * linux-low.c (AT_HWCAP2): Add define if not already included.
418
419 2019-03-26 Alan Hayward <alan.hayward@arm.com>
420
421 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
422 (aarch64_arch_setup): Call linux_get_hwcap.
423 * linux-arm-low.c (arm_get_hwcap): Remove function.
424 (arm_read_description): Call linux_get_hwcap.
425 * linux-low.c (linux_get_auxv): New function.
426 (linux_get_hwcap): Likewise.
427 (linux_get_hwcap2): Likewise.
428 * linux-low.h (linux_get_hwcap): New declaration.
429 (linux_get_hwcap2): Likewise.
430 * linux-ppc-low.c (ppc_get_auxv): Remove function.
431 (ppc_arch_setup): Call linux_get_hwcap.
432 * linux-s390-low.c (s390_get_hwcap): Remove function.
433 (s390_arch_setup): Call linux_get_hwcap.
434
435 2019-03-22 Alan Hayward <alan.hayward@arm.com>
436 Jiong Wang <jiong.wang@arm.com>
437
438 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
439 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
440 to fail.
441 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
442
443 2019-03-22 Alan Hayward <alan.hayward@arm.com>
444 Jiong Wang <jiong.wang@arm.com>
445
446 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
447 (aarch64_get_hwcap): New function.
448 (aarch64_arch_setup): Read APIA hwcap.
449
450 2019-03-22 Alan Hayward <alan.hayward@arm.com>
451 Jiong Wang <jiong.wang@arm.com>
452
453 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
454 (initialize_low_tracepoint): Likewise.
455 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
456 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
457 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
458 (aarch64_linux_read_description): Likewise.
459 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
460
461 2019-03-12 John Baldwin <jhb@FreeBSD.org>
462
463 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
464 i386_create_target_description for 'segments' parameter.
465 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
466 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
467 * win32-i386-low.c (i386_arch_setup): Likewise.
468
469 2019-03-12 Tom Tromey <tromey@adacore.com>
470
471 * linux-low.c (iterate_over_lwps): Update.
472
473 2019-03-06 Tom Tromey <tom@tromey.com>
474
475 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
476 (captured_main): Use SCOPE_EXIT.
477
478 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
479
480 * configure.srv: Use '$enable_unittest' instead of '$development'
481 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
482 case.
483
484 2019-02-27 Tom Tromey <tromey@adacore.com>
485
486 * gdbreplay.c (logchar): Handle \r\n.
487
488 2019-02-07 Alan Hayward <alan.hayward@arm.com>
489
490 * linux-low.c (linux_attach): Add process before lwp.
491 * server.c (attach_inferior): Check if already attached.
492
493 2019-02-07 Tom Tromey <tom@tromey.com>
494
495 * x86-tdesc.h: Rename include guard.
496 * x86-low.h: Add include guard.
497 * wincecompat.h: Rename include guard.
498 * win32-low.h: Add include guard.
499 * utils.h: Rename include guard.
500 * tracepoint.h: Rename include guard.
501 * tdesc.h: Rename include guard.
502 * target.h: Rename include guard.
503 * server.h: Rename include guard.
504 * remote-utils.h: Rename include guard.
505 * regcache.h: Rename include guard.
506 * nto-low.h: Rename include guard.
507 * notif.h: Add include guard.
508 * mem-break.h: Rename include guard.
509 * lynx-low.h: Add include guard.
510 * linux-x86-tdesc.h: Add include guard.
511 * linux-s390-tdesc.h: Add include guard.
512 * linux-ppc-tdesc-init.h: Add include guard.
513 * linux-low.h: Add include guard.
514 * linux-aarch64-tdesc.h: Add include guard.
515 * linux-aarch32-low.h: Add include guard.
516 * inferiors.h: Rename include guard.
517 * i387-fp.h: Rename include guard.
518 * hostio.h: Rename include guard.
519 * gdbthread.h: Rename include guard.
520 * gdb_proc_service.h: Rename include guard.
521 * event-loop.h: Rename include guard.
522 * dll.h: Rename include guard.
523 * debug.h: Rename include guard.
524 * ax.h: Rename include guard.
525
526 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
527
528 PR gdb/23985
529 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
530 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
531
532 2019-01-25 Tom Tromey <tom@tromey.com>
533
534 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
535
536 2019-01-25 Tom Tromey <tom@tromey.com>
537
538 * win32-low.c: Fix common/ includes.
539 * win32-i386-low.c: Fix common/ includes.
540 * tracepoint.c: Fix common/ includes.
541 * thread-db.c: Fix common/ includes.
542 * target.h: Fix common/ includes.
543 * symbol.c: Fix common/ includes.
544 * spu-low.c: Fix common/ includes.
545 * server.h: Fix common/ includes.
546 * server.c: Fix common/ includes.
547 * remote-utils.c: Fix common/ includes.
548 * regcache.h: Fix common/ includes.
549 * regcache.c: Fix common/ includes.
550 * nto-x86-low.c: Fix common/ includes.
551 * notif.h: Fix common/ includes.
552 * mem-break.h: Fix common/ includes.
553 * lynx-low.c: Fix common/ includes.
554 * lynx-i386-low.c: Fix common/ includes.
555 * linux-x86-tdesc-selftest.c: Fix common/ includes.
556 * linux-x86-low.c: Fix common/ includes.
557 * linux-low.c: Fix common/ includes.
558 * inferiors.h: Fix common/ includes.
559 * i387-fp.c: Fix common/ includes.
560 * hostio.c: Fix common/ includes.
561 * hostio-errno.c: Fix common/ includes.
562 * gdbthread.h: Fix common/ includes.
563 * gdbreplay.c: Fix common/ includes.
564 * fork-child.c: Fix common/ includes.
565 * event-loop.c: Fix common/ includes.
566 * ax.c:
567 (enum gdb_agent_op): Fix common/ includes.
568
569 2019-01-21 Tom Tromey <tom@tromey.com>
570
571 * tracepoint.c: Fix includes.
572 * remote-utils.c: Fix includes.
573 * linux-x86-low.c: Fix includes.
574
575 2019-01-01 Joel Brobecker <brobecker@adacore.com>
576
577 * gdbreplay.c (gdbreplay_version): Update copyright year in
578 version message.
579 * server.c (gdbserver_version): Likewise.
580
581 2018-12-05 Alan Hayward <alan.hayward@arm.com>
582
583 * linux-low.c (add_lwp): Switch ordering.
584
585 2018-11-29 Tom Tromey <tom@tromey.com>
586
587 * win32-low.c (win32_join): Take pid, not process.
588 * target.h (struct target_ops) <join>: Change argument type.
589 (join_inferior): Change argument name.
590 * spu-low.c (spu_join): Take pid, not process.
591 * server.c (handle_detach): Preserve pid before destroying
592 process.
593 * lynx-low.c (lynx_join): Take pid, not process.
594 * linux-low.c (linux_join): Take pid, not process.
595
596 2018-11-23 Alan Hayward <alan.hayward@arm.com>
597
598 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
599 (aarch64_cannot_fetch_register): Likewise.
600 (struct linux_target_ops): Update references.
601
602 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
603
604 * linux-ppc-low.c: Include nat/linux-ptrace.h.
605
606 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
607
608 * configure.srv (ipa_ppc_linux_regobj): Add
609 powerpc-isa207-htm-vsx32l-ipa.o and
610 powerpc-isa207-htm-vsx64l-ipa.o.
611 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
612 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
613 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
614 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
615 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
616 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
617 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
618 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
619 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
620 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
621 (init_registers_powerpc_isa207_htm_vsx32l)
622 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
623 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
624 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
625 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
626 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
627 (ppc_store_tm_ctarregset): New functions.
628 (ppc_regsets): Add entries for HTM regsets.
629 (ppc_arch_setup): Set htm in features struct when needed. Set
630 sizes for the HTM regsets.
631 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
632 (initialize_low_arch): Call
633 init_registers_powerpc_isa207_htm_vsx32l and
634 init_registers_powerpc_isa207_htm_vsx64l.
635 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
636 PPC_TDESC_ISA207_HTM_VSX.
637 (initialize_low_tracepoint): Call
638 init_registers_powerpc_isa207_htm_vsx32l and
639 init_registers_powerpc_isa207_htm_vsx64l.
640
641 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
642
643 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
644 rs6000/power-linux-pmu.xml to srv_xmlfiles.
645 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
646 (ppc_store_pmuregset): New functions.
647 (ppc_regsets): Add entries for ebb and pmu regsets.
648 (ppc_arch_setup): Set isa207 in features struct if the ebb and
649 pmu regsets are available. Set sizes for these regsets.
650
651 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
652
653 * configure.srv (ipa_ppc_linux_regobj): Add
654 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
655 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
656 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
657 rs6000/powerpc-isa207-vsx32l.xml, and
658 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
659 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
660 <PPC_TDESC_ISA207_VSX>: New enum value.
661 (init_registers_powerpc_isa207_vsx32l): Declare.
662 (init_registers_powerpc_isa207_vsx64l): Declare.
663 * linux-ppc-low.c (ppc_fill_tarregset): New function.
664 (ppc_store_tarregset): New function.
665 (ppc_regsets): Add entry for the TAR regset.
666 (ppc_arch_setup): Set isa207 in features struct when needed. Set
667 size for the TAR regsets.
668 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
669 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
670 and init_registers_powerpc_isa207_vsx64l.
671 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
672 (initialize_low_tracepoint): Call
673 init_registers_powerpc_isa207_vsx32l and
674 init_registers_powerpc_isa207_vsx64l.
675
676 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
677 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
678
679 * configure.srv (ipa_ppc_linux_regobj): Add
680 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
681 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
682 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
683 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
684 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
685 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
686 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
687 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
688 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
689 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
690 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
691 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
692 (ppc_hwcap): Add comment.
693 (ppc_hwcap2): New global.
694 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
695 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
696 (ppc_regsets): Add entries for the DSCR and PPR regsets.
697 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
698 when needed. Set sizes for the the DSCR and PPR regsets.
699 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
700 (initialize_low_arch): Call
701 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
702 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
703 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
704 PPC_TDESC_ISA205_PPR_DSCR_VSX.
705 (initialize_low_tracepoint): Call
706 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
707 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
708
709 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
710
711 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
712
713 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
714 Simon Marchi <simark@simark.ca>
715
716 * acinclude.m4: Include "../selftest.m4".
717 * configure: Regenerate.
718 * configure.ac: Use "GDB_AC_SELFTEST".
719 * configure.srv: Use "$enable_unittests" instead of
720 "$development" when checking whether unit tests have been
721 enabled.
722 * server.c (captured_main): Update message informing that
723 selftests have been disabled.
724
725 2018-10-04 Tom Tromey <tom@tromey.com>
726
727 * configure: Rebuild.
728
729 2018-10-04 Tom Tromey <tom@tromey.com>
730
731 * server.c (handle_status): Rename inner "thread".
732 (process_serial_event): Declare "res" in 'm' case.
733 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
734 (iterate_over_lwps): Rename inner "thread".
735 (linux_qxfer_libraries_svr4): Rename inner "len".
736 * gdbthread.h (find_thread_in_random): Rename inner "thread".
737
738 2018-10-01 Gary Benson <gbenson@redhat.com>
739
740 * gdb_proc_service.h: Moved common code to
741 common/gdb_proc_service.h.
742
743 2018-10-01 Gary Benson <gbenson@redhat.com>
744
745 * gdb_proc_service.h: Synchronize comments and whitespace with
746 GDB's version of this file.
747
748 2018-09-25 Tom Tromey <tom@tromey.com>
749
750 * configure: Rebuild.
751 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
752
753 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
754
755 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
756 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
757 ($(IPA_LIB)): Sort IPA_OBJS.
758
759 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * Makefile.in: Remove references to $(ADD_DEPS).
762
763 2018-09-16 Tom Tromey <tom@tromey.com>
764
765 * remote-utils.c (remote_open): Use GNU style for metasyntactic
766 variables.
767 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
768 variables.
769
770 2018-09-05 Tom Tromey <tom@tromey.com>
771
772 * configure: Rebuild.
773
774 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
775
776 PR build/23399
777 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
778
779 2018-08-27 Tom Tromey <tom@tromey.com>
780
781 PR build/23087:
782 * configure: Rebuild.
783
784 2018-08-27 Tom Tromey <tom@tromey.com>
785
786 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
787 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
788 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
789 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
790 (s390x_emit_stack_adjust): Add casts to unsigned char.
791
792 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
793
794 PR gdb/23374
795 PR gdb/23375
796 * server.h (struct client_state) <disable_randomization>:
797 Initialize to 1.
798
799 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
800
801 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
802 variable.
803 (mips_supply_ptrace_register): Likewise.
804
805 2018-07-22 Tom Tromey <tom@tromey.com>
806
807 * configure: Rebuild.
808
809 2018-07-22 Tom Tromey <tom@tromey.com>
810
811 * win32-low.c (win32_create_inferior): Remove unused variables.
812 * gdbreplay.c (remote_open): Remove unused variable.
813 * remote-utils.c (remote_prepare): Remove unused variable.
814 * x86-tdesc.h (X86_TDESC_H): Define.
815 (amd64_expedite_regs): Define conditionally.
816 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
817 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
818 * remote-utils.c (readchar): Remove unused variable.
819
820 2018-07-13 Pedro Alves <palves@redhat.com>
821
822 * linux-low.c (linux_kill): Change parameter to process_info
823 pointer instead of pid. Adjust.
824 * lynx-low.c (lynx_kill): Likewise.
825 * nto-low.c (nto_kill): Likewise.
826 * spu-low.c (spu_kill): Likewise.
827 * win32-low.c (win32_kill): Likewise.
828 * server.c (handle_v_kill, kill_inferior_callback)
829 (detach_or_kill_for_exit): Adjust.
830 * target.c (kill_inferior): Change parameter to process_info
831 pointer instead of pid. Adjust.
832 * target.h (struct target_ops) <kill>: Change parameter to
833 process_info pointer instead of pid. Adjust all implementations
834 and callers.
835 (kill_inferior): Likewise.
836
837 2018-07-13 Pedro Alves <palves@redhat.com>
838
839 * linux-low.c (linux_detach, linux_join): Change parameter to
840 process_info pointer instead of pid. Adjust.
841 * lynx-low.c (lynx_detach, lynx_join): Likewise.
842 * nto-low.c (nto_detach): Likewise.
843 * spu-low.c (spu_detach, spu_join): Likewise.
844 * win32-low.c (win32_detach, win32_join): Likewise.
845 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
846 * target.h (struct target_ops) <detach, join>: Change parameter to
847 process_info pointer instead of pid. Adjust all implementations
848 and callers.
849 (detach_inferior, join_inferior): Rename 'pid' parameter to
850 'proc'.
851
852 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
853 Jan Kratochvil <jan.kratochvil@redhat.com>
854 Paul Fertser <fercerpav@gmail.com>
855 Tsutomu Seki <sekiriki@gmail.com>
856
857 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
858 (OBS): Add 'common/netstuff.o'.
859 (GDBREPLAY_OBS): Likewise.
860 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
861 (remote_open): Implement support for IPv6
862 connections.
863 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
864 and 'wspiapi.h'.
865 (handle_accept_event): Accept connections from IPv6 sources.
866 (remote_prepare): Handle IPv6-style hostnames; implement
867 support for IPv6 connections.
868 (remote_open): Implement support for printing connections from
869 IPv6 sources.
870
871 2018-07-11 Pedro Alves <palves@redhat.com>
872
873 PR gdb/23377
874 * mem-break.c (any_persistent_commands): Add process_info
875 parameter and use it instead of relying on the current process.
876 Change return type to bool.
877 * mem-break.h (any_persistent_commands): Add process_info
878 parameter and change return type to bool.
879 * server.c (handle_detach): Remove require_running_or_return call.
880 Look up the process_info for the process we're about to detach.
881 If not found, return back error to GDB. Adjust
882 any_persistent_commands call to pass down a process pointer.
883
884 2018-07-11 Pedro Alves <palves@redhat.com>
885
886 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
887 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
888 instead of collect_register_by_name.
889 * regcache.c (regcache_raw_get_unsigned_by_name): New.
890 * regcache.h (regcache_raw_get_unsigned_by_name): New.
891
892 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
893 Pedro Alves <palves@redhat.com>
894
895 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
896
897 2018-07-03 Tom Tromey <tom@tromey.com>
898
899 * linux-low.c: Update.
900 * lynx-low.c: Update.
901 * mem-break.c: Update.
902 * nto-low.c: Update.
903 * remote-utils.c: Update.
904 * server.c: Update.
905 * spu-low.c: Update.
906 * target.c: Update.
907 * win32-low.c: Update.
908
909 2018-07-03 Tom Tromey <tom@tromey.com>
910
911 * server.c: Update.
912
913 2018-07-03 Tom Tromey <tom@tromey.com>
914
915 * linux-low.c: Update.
916
917 2018-07-03 Tom Tromey <tom@tromey.com>
918
919 * target.c: Update.
920
921 2018-07-03 Tom Tromey <tom@tromey.com>
922
923 * linux-low.c: Update.
924 * linux-mips-low.c: Update.
925 * lynx-low.c: Update.
926 * nto-low.c: Update.
927 * remote-utils.c: Update.
928 * server.c: Update.
929 * spu-low.c: Update.
930 * target.c: Update.
931 * thread-db.c: Update.
932
933 2018-07-03 Tom Tromey <tom@tromey.com>
934
935 * linux-low.c: Update.
936 * linux-mips-low.c: Update.
937 * lynx-low.c: Update.
938 * mem-break.c: Update.
939 * nto-low.c: Update.
940 * remote-utils.c: Update.
941 * server.c: Update.
942 * spu-low.c: Update.
943 * target.c: Update.
944 * tracepoint.c: Update.
945
946 2018-07-03 Tom Tromey <tom@tromey.com>
947
948 * linux-low.c: Update.
949 * linux-ppc-low.c: Update.
950 * linux-x86-low.c: Update.
951 * proc-service.c: Update.
952 * server.c: Update.
953 * spu-low.c: Update.
954 * thread-db.c: Update.
955 * win32-low.c: Update.
956
957 2018-07-03 Tom Tromey <tom@tromey.com>
958
959 * linux-low.c: Update.
960 * lynx-low.c: Update.
961 * nto-low.c: Update.
962 * remote-utils.c: Update.
963 * spu-low.c: Update.
964 * thread-db.c: Update.
965 * win32-low.c: Update.
966
967 2018-06-29 Joel Brobecker <brobecker@adacore.com>
968
969 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
970 parameter in call to 'amd64_create_target_description'.
971
972 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
973
974 * x86-tdesc.h: Remove executable permission flag.
975
976 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
977
978 * configure.ac: Remove AC_PREREQ, add missing quoting.
979 * configure: Re-generate.
980 * config.in: Re-generate.
981 * aclocal.m4: Re-generate.
982
983 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
984
985 * tracepoint.h (current_traceframe): Remove declaration.
986
987 2018-06-18 Alan Hayward <alan.hayward@arm.com>
988
989 * linux-aarch64-low.c (is_sve_tdesc): New function.
990 (aarch64_sve_regs_copy_to_regcache): Likewise.
991 (aarch64_sve_regs_copy_from_regcache): Likewise.
992 (aarch64_regs_info): Add SVE checks.
993 (initialize_low_arch): Initialize SVE.
994
995 2018-06-18 Alan Hayward <alan.hayward@arm.com>
996
997 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
998
999 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1000
1001 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1002 (initialize_low_tracepoint): Likewise
1003 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1004 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1005 param.
1006 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1007 checks.
1008 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1009
1010 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1011
1012 * server.h (PBUFSIZ): Increase size
1013
1014 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1015
1016 * regcache.c (regcache::raw_compare): New function.
1017 * regcache.h (regcache::raw_compare): New declaration.
1018
1019 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1020
1021 * regcache.c (new_register_cache): Use new.
1022 (free_register_cache): Use delete.
1023 (register_data): Use const.
1024 (supply_register): Move body inside regcache.
1025 (regcache::raw_supply): New override function.
1026 (collect_register): Move body inside regcache.
1027 (regcache::raw_collect): New override function.
1028 (regcache::get_register_status): New override function.
1029 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1030
1031 2018-06-09 Tom Tromey <tom@tromey.com>
1032
1033 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1034 declare queue.
1035 (event_queue): Use std::queue.
1036 (gdb_event_xfree): Remove.
1037 (initialize_event_loop, process_event, wait_for_event): Update.
1038
1039 2018-06-08 Stan Cox <scox@redhat.com>
1040
1041 * win32-low.c (win32_create_inferior): last_ptid and last_status
1042 moved to client_state.
1043
1044 2018-06-08 Pedro Alves <palves@redhat.com>
1045
1046 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1047 common/common-exceptions.o, common/common-utils.o,
1048 common/errors.o, common/print-utils.o and utils.o.
1049 * gdbreplay.c: Include "common-defs.h" instead of the two
1050 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1051 string.h or alloca.h.
1052 (perror_with_name): Delete.
1053 (remote_open): Use xstrdup instead of strdup.
1054 (main): Rename to ...
1055 (captured_main): ... this.
1056 (main): New.
1057
1058 2018-06-08 Tom Tromey <tom@tromey.com>
1059
1060 * linux-low.c (linux_low_read_btrace): Update.
1061
1062 2018-06-04 Stan Cox <scox@redhat.com>
1063
1064 * server.h (struct client_state): New.
1065 * server.c (cont_thread, general_thread, multi_process)
1066 (report_fork_events, report_vfork_events, report_exec_events)
1067 (report_thread_events, swbreak_feature, hwbreak_feature)
1068 (vCont_supported, disable_randomization, pass_signals)
1069 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1070 Moved to client_state.
1071 * remote-utils.c (remote_debug, noack_mode)
1072 (transport_is_reliable): Moved to client_state.
1073 * tracepoint.c (current_traceframe): Moved to client_state.
1074
1075 Update all callers.
1076 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1077 linux-low.c, remote-utils.h, target.c: Use client_state.
1078
1079 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1080
1081 * configure.srv: Add new c/h file.
1082
1083 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1084
1085 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1086 null VQ.
1087
1088 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1089
1090 * gdb.arch/mips-fpregset-core.exp: New test.
1091 * gdb.arch/mips-fpregset-core.c: New test source.
1092
1093 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1094
1095 PR server/23198
1096 * hostio.c (require_int): Do not report overflow for integers
1097 between 0xfffffff and 0x7fffffff.
1098
1099 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1100
1101 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1102 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1103 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1104 functions.
1105 (the_low_target): Wire them.
1106
1107 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1108
1109 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1110 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1111 mode. Call collect_register_by_name with vscr using
1112 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1113 (ppc_store_vrregset): Add and set vscr_offset variable as in
1114 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1115 vscr_offset.
1116
1117 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1118
1119 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1120 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1121 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1122
1123 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1124
1125 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1126 (ppc_store_vsxregset): Likewise.
1127 (ppc_fill_vrregset): Likewise.
1128 (ppc_store_vrregset): Likewise.
1129 (ppc_fill_evrregset): Likewise.
1130 (ppc_store_evrregset): Likewise.
1131 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1132 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1133 needed.
1134
1135 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1136
1137 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1138 wordsize of the inferior. Call ppc_linux_target_wordsize.
1139
1140 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1141
1142 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1143 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1144 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1145 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1146 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1147 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1148 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1149 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1150 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1151 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1152 (tdesc_powerpc_e500l): Remove.
1153 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1154 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1155 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1156 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1157 linux-ppc-tdesc.h.
1158 (ppc_arch_setup): Remove target description matching code. Fill a
1159 ppc_linux_features struct and call ppc_linux_match_description
1160 with it.
1161
1162 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1163
1164 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1165 width of the requested register exceeds the width of the
1166 `ptrace' data type.
1167 (mips_cannot_store_register): Likewise.
1168
1169 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1170
1171 * linux-mips-low.c (mips_fetch_register): New function. Update
1172 preceding comment.
1173 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1174 (the_low_target): Wire `mips_fetch_register'.
1175
1176 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1177
1178 * lynx-i386-low.c (LYNXOS_178): New macro.
1179 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1180 the layout on LynxOS-178.
1181 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1182 handle floating point registers that are not supported by
1183 LynxOS-178.
1184
1185 2018-05-10 Tom Tromey <tom@tromey.com>
1186
1187 * configure: Rebuild.
1188
1189 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1190
1191 PR server/23158:
1192 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1193 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1194 Use it to set the expedite_regs field in the given tdesc.
1195 * x86-tdesc.h: New file.
1196 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1197 Adjust following the addition of the new expedite_regs parameter
1198 to init_target_desc.
1199 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1200 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1201 (i386_linux_read_description, amd64_linux_read_description):
1202 Adjust following the addition of the new expedite_regs parameter
1203 to init_target_desc.
1204 * lynx-i386-low.c: #include "x86-tdesc.h".
1205 (lynx_i386_arch_setup): Adjust following the addition of the new
1206 expedite_regs parameter to init_target_desc.
1207 * nto-x86-low.c: #include "x86-tdesc.h".
1208 (nto_x86_arch_setup): Adjust following the addition of the new
1209 expedite_regs parameter to init_target_desc.
1210 * win32-i386-low.c: #include "x86-tdesc.h".
1211 (i386_arch_setup): Adjust following the addition of the new
1212 expedite_regs parameter to init_target_desc.
1213
1214 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1215
1216 PR server/23158:
1217 * win32-low.c (win32_create_inferior): Add call to my_wait
1218 setting last_status global.
1219
1220 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1221
1222 PR server/23158:
1223 * win32-low.c (create_process): Only call gdb_tilde_expand if
1224 inferior_cwd is not NULL.
1225
1226 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1227
1228 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1229 registers to the cache if their values have changed.
1230 (i387_xsave_to_cache): Provide default values for x87 control
1231 registers when these features are available, but disabled.
1232 * regcache.c (supply_register_by_name_zeroed): New function.
1233 * regcache.h (supply_register_by_name_zeroed): Declare new
1234 function.
1235
1236 2018-05-07 Tom Tromey <tom@tromey.com>
1237
1238 * configure: Rebuild.
1239
1240 2018-05-04 Tom Tromey <tom@tromey.com>
1241
1242 * configure: Rebuild.
1243
1244 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1245 Pedro Alves <palves@redhat.com>
1246
1247 * linux-aarch64-low.c (aarch64_stopped_data_address):
1248 Likewise.
1249
1250 2018-04-27 Tom Tromey <tom@tromey.com>
1251
1252 * configure: Rebuild.
1253
1254 2018-04-23 Tom Tromey <tom@tromey.com>
1255
1256 * configure: Rebuild.
1257
1258 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1259
1260 * Makefile.in (depcomp): Add "..".
1261 (all_deps_files): New and use it.
1262
1263 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1264
1265 * configure.srv (aarch64*-*-linux*): Don't include xml.
1266 (i[34567]86-*-cygwin*): Likewise.
1267 (i[34567]86-*-linux*): Likewise.
1268 (i[34567]86-*-lynxos*): Likewise.
1269 (i[34567]86-*-mingw32ce*): Likewise.
1270 (i[34567]86-*-mingw*): Likewise.
1271 (i[34567]86-*-nto*): Likewise.
1272 (tic6x-*-uclinux): Likewise.
1273 (x86_64-*-linux*): Likewise.
1274 (x86_64-*-mingw*): Likewise.
1275 (x86_64-*-cygwin*): Likewise.
1276
1277 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1278
1279 * tdesc.c: Remove xml parameter.
1280
1281 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1282
1283 * server.c (get_features_xml): Remove cast.
1284 * tdesc.c (void target_desc::accept): Fill in function.
1285 (tdesc_get_features_xml): Remove old xml creation.
1286 (print_xml_feature::visit_pre): Add xml vistor.
1287 * tdesc.h (struct target_desc): Make xmltarget mutable.
1288 (tdesc_get_features_xml): Remove declaration.
1289
1290 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1291
1292 * tdesc.c (tdesc_architecture_name): Add new function.
1293 (tdesc_osabi_name): Likewise.
1294 (tdesc_get_features_xml): Use new functions.
1295
1296 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1297
1298 * tdesc.c (tdesc_create_flags): Remove.
1299 (tdesc_add_flag): Likewise.
1300 (tdesc_named_type): Likewise.
1301 (tdesc_create_union): Likewise.
1302 (tdesc_create_struct): Likewise.
1303 (tdesc_create_vector): Likewise.
1304 (tdesc_add_bitfield): Likewise.
1305 (tdesc_add_field): Likewise.
1306 (tdesc_set_struct_size): Likewise.
1307
1308 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1309
1310 * tdesc.c (~target_desc): Remove implictly deleted items.
1311 (init_target_desc): Iterate all features.
1312 (tdesc_get_features_xml): Use vector.
1313 (tdesc_create_feature): Create feature.
1314 * tdesc.h (tdesc_feature) Remove
1315 (target_desc): Add features.
1316
1317 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1318
1319 * Makefile.in: Add common/tdesc.c
1320 * tdesc.c (init_target_desc): init all reg_defs from register
1321 vector.
1322 (tdesc_create_reg): Create tdesc_reg.
1323 * tdesc.h (tdesc_feature): Add register vector.
1324
1325 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1326
1327 * tdesc.h (struct target_desc) <features>: Change type to
1328 std::vector<std::string>.
1329 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1330 changes.
1331 (tdesc_get_features_xml): Likewise.
1332 (tdesc_create_feature): Likewise.
1333
1334 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1335
1336 * regcache.c (find_register_by_number): Return a ref.
1337 (find_regno): Use references.
1338 (register_size): Likewise.
1339 (register_data): Likewise.
1340 * tdesc.c (target_desc::~target_desc): Remove free calls.
1341 (target_desc::operator==): Use std::vector compare.
1342 (init_target_desc): Use reference.
1343 (tdesc_create_reg): Use reg constructors.
1344 * tdesc.h (struct target_desc): Replace pointer with object.
1345
1346 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1347
1348 * regcache.c (find_register_by_number): Make static.
1349 (find_regno): Use find_register_by_number
1350 * regcache.h (struct reg): Remove declaration.
1351
1352 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1353
1354 * tdesc.c (target_desc::~target_desc): Move to here.
1355 (target_desc::operator==): Likewise.
1356 * tdesc.h (target_desc::~target_desc): Move from here.
1357 (target_desc::operator==): Likewise.
1358
1359 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1360
1361 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1362
1363 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1364
1365 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1366 S390_TDESC_GS.
1367 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1368 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1369 and init_registers_s390_gs_linux64.
1370
1371 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1372
1373 * linux-s390-low.c (s390_fill_gs): Remove function.
1374 (s390_fill_gsbc): Remove function.
1375 (s390_regsets): Set fill functions for the guarded storage regsets
1376 to NULL.
1377
1378 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1379
1380 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1381 the word size. Add comment.
1382 (s390_get_wordsize): New function.
1383 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1384 pswm with it. Instead, use s390_get_wordsize to determine the
1385 word size first and derive the correct tdesc from that directly.
1386
1387 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * Makefile.in: Include silent-rules.mk.
1390 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1391 (COMPILE): Add ECHO_CXX.
1392 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1393 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1394 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1395 (version-generated.c): Add ECHO_GEN.
1396 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1397 (IPAGENT_COMPILE): Add ECHO_CXX.
1398 (%-generated.c): Add ECHO_REGDAT.
1399
1400 2018-03-14 Tom Tromey <tom@tromey.com>
1401
1402 PR cli/14977:
1403 * ax.c (ax_printf): Special case for NULL.
1404
1405 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1406
1407 * linux-low.c (linux_qxfer_libraries_svr4): Use
1408 xml_escape_text_append.
1409
1410 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1413
1414 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1415
1416 * server.c (handle_general_set): Remove unnecessary xstrdup.
1417
1418 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1419
1420 * server.c (parse_debug_format_options): Adjust to
1421 delim_string_to_char_ptr_vec changes.
1422 * thread-db.c (thread_db_load_search): Adjust to
1423 dirnames_to_char_ptr_vec changes.
1424
1425 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1426
1427 * target.h (target_enable_btrace, target_disable_btrace)
1428 (target_read_btrace, target_read_btrace_conf): Turn macro into
1429 inline function. Throw error if target method is not defined.
1430 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1431 check for btrace target method. Be prepared to handle exceptions
1432 from btrace target methods.
1433
1434 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1435
1436 * server.c (captured_main): Change order of error message printed
1437 when the current working directory cannot be found.
1438
1439 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1440
1441 * server.c: Include "filenames.h" and "pathstuff.h".
1442 (program_name): Delete variable.
1443 (program_path): New anonymous class.
1444 (get_exec_wrapper): Use "program_path" instead of
1445 "program_name".
1446 (handle_v_run): Likewise.
1447 (captured_main): Likewise.
1448 (process_serial_event): Likewise.
1449
1450 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1451
1452 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1453 (OBJS): Add "pathstuff.o".
1454 * server.c (current_directory): New global variable.
1455 (captured_main): Initialize "current_directory".
1456
1457 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1458
1459 * tdesc.c: Use common/tdesc.h.
1460 * tdesc.h: Likewise.
1461
1462 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1463 Simon Marchi <simon.marchi@ericsson.com>
1464
1465 * Makefile.in: Switch order of make rules.
1466
1467 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1468
1469 * Makefile.in: Add common directory in build.
1470 * configure.ac: Add common reference.
1471 * configure: Regenerate.
1472
1473 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1474
1475 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1476 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1477 * spu-low.c (spu_target_ops): Likewise.
1478 * win32-low.c (win32_target_ops): Likewise.
1479 * server.c (supported_btrace_packets): Report packets unconditionally.
1480 * target.h (target_ops) <supports_btrace>: Remove.
1481 (target_supports_btrace): Remove.
1482
1483 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1484
1485 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1486 (handle_btrace_disable): Change return type to void. Use exceptions
1487 to report errors.
1488 (handle_btrace_general_set): Catch exception and copy message to
1489 return message.
1490
1491 2018-02-08 Tom Tromey <tom@tromey.com>
1492
1493 * linux-low.c (install_software_single_step_breakpoints): Use
1494 make_scoped_restore.
1495 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1496 (do_restore_current_thread_cleanup): Remove.
1497 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1498 declare.
1499
1500 2018-02-08 Tom Tromey <tom@tromey.com>
1501
1502 * mem-break.c (set_raw_breakpoint_at): Use
1503 gdb::unique_xmalloc_ptr.
1504
1505 2018-01-30 Pedro Alves <palves@redhat.com>
1506
1507 PR gdb/13211
1508 * target.c (target_terminal::terminal_state): Rename to ...
1509 (target_terminal::m_terminal_state): ... this.
1510
1511 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1512
1513 * linux-low.c (handle_extended_wait): Surround call to
1514 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1515
1516 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1517
1518 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1519 linux_ptrace_attach_fail_reason_string now returning an
1520 std::string.
1521 (linux_attach): Likewise.
1522 * thread-db.c (attach_thread): Likewise.
1523
1524 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1525
1526 PR gdb/21559
1527 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1528 checking for fs_base/gs_base fields in struct user_regs_struct.
1529 * configure: Regenerate.
1530
1531 2018-01-16 Yao Qi <yao.qi@linaro.org>
1532
1533 PR gdb/18749
1534 * linux-low.c (fetch_register): Call supply_register instead of
1535 error.
1536
1537 2018-01-08 Yao Qi <yao.qi@linaro.org>
1538 Simon Marchi <simon.marchi@ericsson.com>
1539
1540 * Makefile.in (OBS): Remove selftest.o.
1541 * configure.ac: Set srv_selftest_objs if $development is true.
1542 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1543 * configure: Re-generated.
1544 * server.c (captured_main): Wrap variable selftest_filter with
1545 GDB_SELF_TEST.
1546
1547 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1548
1549 * server.c (parse_debug_format_options): Return std::string.
1550 (handle_monitor_command, captured_main): Adjust.
1551
1552 2018-01-05 Pedro Alves <palves@redhat.com>
1553
1554 PR gdb/18653
1555 * server.c (captured_main): Pass quiet=false to
1556 save_original_signals_state.
1557
1558 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1559
1560 * gdbreplay.c (gdbreplay_version): Update copyright year in
1561 version message.
1562 * server.c (gdbserver_version): Likewise.
1563
1564 2017-12-08 Tom Tromey <tom@tromey.com>
1565
1566 * ax.c (ax_printf): Update.
1567
1568 2017-12-07 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1571 aarch64_linux_read_description.
1572 * linux-amd64-ipa.c (idx2mask): New array.
1573 (get_ipa_tdesc): Move idx2mask out.
1574 (initialize_low_tracepoint): Initialize target descriptions.
1575 * linux-i386-ipa.c (idx2mask): New array.
1576 (get_ipa_tdesc): Move idx2mask out.
1577 (initialize_low_tracepoint): Initialize target descriptions.
1578
1579 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * tdesc.c (struct tdesc_type): Change return type.
1582 (tdesc_add_flag): Change parameter type.
1583 (tdesc_add_bitfield): Likewise.
1584 (tdesc_add_field): Likewise.
1585 (tdesc_set_struct_size): Likewise.
1586
1587 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1588
1589 * regcache.c (registers_to_string): Remove unused variable.
1590
1591 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1592
1593 * inferiors.c (for_each_inferior_with_data): Remove.
1594 * inferiors.h (for_each_inferior_with_data): Remove.
1595 * server.c (handle_qxfer_threads_worker): Change parameter type.
1596 (handle_qxfer_threads_proper): Use for_each_thread.
1597
1598 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1599
1600 * inferiors.c (for_each_inferior): Remove.
1601 (clear_inferiors): Use for_each_thread.
1602 * inferiors.h (for_each_inferior): Remove.
1603 * linux-low.c (linux_wait_for_event_filtered): Use
1604 for_each_thread.
1605 (linux_stabilize_threads): Likewise.
1606 * regcache.c (regcache_release): Likewise.
1607 * server.c (gdb_wants_all_threads_stopped): Likewise.
1608 (clear_pending_status_callback): Remove.
1609 (handle_status): Use for_each_thread.
1610 (captured_main): Likewise.
1611 * win32-low.c (child_init_thread_list): Likewise.
1612 (win32_clear_inferiors): Likewise.
1613 (fake_breakpoint_event): Likewise.
1614
1615 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1616
1617 * inferiors.h (find_inferior): Remove.
1618 * inferiors.c (find_inferior): Remove.
1619
1620 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1621
1622 * linux-low.c (resume_status_pending_p): Update comment.
1623 (need_step_over_p): Update comment.
1624
1625 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1626
1627 * linux-low.c (proceed_one_lwp): Return void, change parameter
1628 type.
1629 (unsuspend_and_proceed_one_lwp): Likewise.
1630 (proceed_all_lwps): Use for_each_thread.
1631 (unstop_all_lwps): Likewise.
1632
1633 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * linux-low.c (linux_resume_one_thread): Return void, take
1636 parameter directly.
1637 (linux_resume): Use for_each_thread.
1638
1639 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1640
1641 * linux-low.c (send_sigstop_callback): Return void, change
1642 parameter type. Rename to...
1643 (send_sigstop): ... this.
1644 (suspend_and_send_sigstop_callback): Return void, change parameter
1645 type. Rename to...
1646 (suspend_and_send_sigstop): ... this.
1647 (stop_all_lwps): Use for_each_thread.
1648
1649 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 * linux-low.c (lwp_running): Return bool, remove unused
1652 argument.
1653 (linux_stabilize_threads): Use find_thread.
1654
1655 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1656
1657 * linux-low.c (select_singlestep_lwp_callback): Remove.
1658 (count_events_callback): Remove.
1659 (select_event_lwp_callback): Remove.
1660 (select_event_lwp): Use find_thread/for_each_thread.
1661
1662 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * linux-low.c (not_stopped_callback): Return bool, take filter
1665 argument directly.
1666 (linux_wait_for_event_filtered): Use find_thread.
1667 (linux_wait_1): Likewise.
1668
1669 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1670
1671 * linux-low.c (same_lwp): Remove.
1672 (find_lwp_pid): Use find_thread.
1673
1674 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1675
1676 * linux-low.c (delete_lwp_callback): Remove.
1677 (linux_mourn): Use for_each_thread.
1678
1679 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1680
1681 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1682 args parameter, don't check for pid.
1683 (linux_detach): Use for_each_thread.
1684
1685 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1686
1687 * linux-low.c (struct counter): Remove.
1688 (second_thread_of_pid_p): Remove.
1689 (last_thread_of_process_p): Use find_thread.
1690
1691 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * inferiors.c (find_inferior_in_random): Remove.
1694 * inferiors.h (find_inferior_in_random): Remove.
1695 * linux-low.c (status_pending_p_callback): Return bool, accept
1696 parameter ptid directly.
1697 (linux_wait_for_event_filtered): Use find_thread_in_random.
1698 (linux_wait_1): Likewise.
1699
1700 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1701
1702 * inferiors.c (find_inferior_id): Remove.
1703 (find_thread_ptid): Move implemention from find_inferior_id to
1704 here.
1705 * inferiors.h (find_inferior_id): Remove.
1706 * server.c (handle_status): Use find_thread_ptid.
1707 (process_serial_event): Likewise.
1708 * thread-db.c (find_one_thread): Likewise.
1709 (thread_db_thread_handle): Likewise.
1710 * win32-low.c (thread_rec): Likewise.
1711 (child_delete_thread): Likewise.
1712 (win32_thread_alive): Likewise.
1713 (get_child_debug_event): Likewise.
1714
1715 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1716
1717 * linux-mips-low.c (update_watch_registers_callback): Return
1718 void, remove pid_p parameter, don't check for pid.
1719 (mips_insert_point, mips_remove_point): Use for_each_thread.
1720
1721 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * lynx.low (lynx_delete_thread_callback): Remove.
1724 (lynx_mourn): Use for_each_thread.
1725
1726 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1727
1728 * regcache.c (regcache_invalidate_one): Remove.
1729 (regcache_invalidate_pid): use for_each_thread.
1730
1731 2017-11-26 Tom Tromey <tom@tromey.com>
1732
1733 * linux-low.c (linux_create_inferior): Update.
1734
1735 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1736
1737 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1738
1739 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1740
1741 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1742 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1743 * linux-aarch64-tdesc-selftest.c: New file.
1744 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1745
1746 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1747
1748 * configure.srv: Add new file.
1749 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1750 * linux-aarch64-tdesc-selftest.c: New file.
1751 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1752
1753 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1754
1755 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1756 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1757 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1758
1759 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1760
1761 * configure.srv: Add new files.
1762 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1763 aarch64_linux_read_description.
1764 * linux-aarch64-low.c (aarch64_linux_read_description):
1765 Merge with aarch64_arch_setup.
1766 (aarch64_arch_setup): Call aarch64_linux_read_description.
1767 * linux-aarch64-tdesc.c: New file.
1768 * linux-aarch64-tdesc.h: New file.
1769
1770 2017-11-24 Yao Qi <yao.qi@linaro.org>
1771
1772 * configure.srv: Set $srv_regobj for tic6x-linux.
1773 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1774 (tic6x_read_description): Move some code to tic6x_arch_setup.
1775 (tic6x_tdesc_test): New function.
1776 (initialize_low_arch): Call selftests::register_test.
1777
1778 2017-11-22 Yao Qi <yao.qi@linaro.org>
1779
1780 * remote-utils.c (prepare_resume_reply): Use memcpy.
1781
1782 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1783
1784 * linux-low.c (kill_one_lwp_callback): Return void, take
1785 argument directly, don't filter on pid.
1786 (linux_kill): Use for_each_thread.
1787
1788 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * linux-low.c (need_step_over_p): Return bool, remove dummy
1791 argument.
1792 (linux_resume, proceed_all_lwps): Use find_thread.
1793
1794 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1795
1796 * linux-low.c (resume_status_pending_p): Return bool, remove
1797 flag_p argument.
1798 (linux_resume): Use find_thread.
1799
1800 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1801
1802 * linux-low.c (struct thread_resume_array): Remove.
1803 (linux_set_resume_request): Return void, take arguments
1804 directly.
1805 (linux_resume): Use for_each_thread.
1806
1807 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1808
1809 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1810 return bool, remove data argument.
1811 (linux_stabilize_threads): Use find_thread.
1812
1813 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1814
1815 * linux-low.c (unsuspend_one_lwp): Remove.
1816 (unsuspend_all_lwps): Use for_each_thread, inline code from
1817 unsuspend_one_lwp.
1818
1819 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1820
1821 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1822 * linux-low.c (struct iterate_over_lwps_args): Remove.
1823 (iterate_over_lwps_filter): Remove.
1824 (iterate_over_lwps): Use find_thread.
1825
1826 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1827
1828 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1829 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1830 code from reset_lwp_ptrace_options_callback.
1831
1832 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1833
1834 * linux-arm-low.c (struct update_registers_data): Remove.
1835 (update_registers_callback): Return void, take arguments
1836 directly, don't check thread's pid.
1837 (arm_insert_point, arm_remove_point): Use for_each_thread.
1838
1839 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1840
1841 * win32-low.c (continue_one_thread): Return void, take argument
1842 directly.
1843 (child_continue): Use for_each_thread.
1844
1845 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1846
1847 * win32-i386-low.c (update_debug_registers_callback): Rename
1848 to ...
1849 (update_debug_registers): ... this, return void, remove pid_p arg.
1850 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1851
1852 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1853
1854 * inferiors.h (struct process_info): Add constructor, initialize
1855 fields..
1856 <syscalls_to_catch>: Change type to std::vector<int>.
1857 * inferiors.c (add_process): Allocate process_info with new.
1858 (remove_process): Free process_info with delete.
1859 * linux-low.c (handle_extended_wait): Adjust.
1860 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1861 * server.c (handle_general_set): Adjust.
1862
1863 2017-11-16 Pedro Alves <palves@redhat.com>
1864
1865 * remote-utils.c (remote_close): Block SIGIO signals instead of
1866 uninstalling the SIGIO handler.
1867
1868 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1869
1870 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1871
1872 2017-11-16 Yao Qi <yao.qi@linaro.org>
1873
1874 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1875 (tic6x_store_gregset): Likewise.
1876 (tic6x_usrregs_info): Move it up.
1877
1878 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1879
1880 * Makefile.in: Update arch rules.
1881 * configure.srv: Explicitly mark arch/ files.
1882
1883 2017-11-13 Andreas Schwab <schwab@suse.de>
1884
1885 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1886 function.
1887 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1888
1889 2017-11-06 Pedro Alves <palves@redhat.com>
1890
1891 * config.in, configure: Regenerate.
1892
1893 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * target.c (struct thread_search): Remove.
1896 (thread_search_callback): Remove.
1897 (prepare_to_access_memory): Use for_each_thread instead of
1898 find_inferior. Inline code from thread_search_callback.
1899
1900 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1901
1902 * server.c (struct visit_actioned_threads_data): Remove.
1903 (visit_actioned_threads): Change prototype to take arguments
1904 directly.
1905 (resume): Use find_thread instead of find_inferior.
1906
1907 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1908
1909 * server.c (queue_stop_reply_callback): Change prototype, return
1910 void.
1911 (find_status_pending_thread_callback): Remove.
1912 (handle_status): Replace find_inferior with find_thread and
1913 for_each_thread.
1914
1915 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1916
1917 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1918 with REGNO.
1919 (aarch64_store_gregset): Likewise.
1920 (aarch64_fill_fpregset): Likewise.
1921 (aarch64_store_fpregset): Likewise.
1922
1923 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * gdbthread.h (find_thread, for_each_thread): New functions.
1926 * inferiors.c (thread_of_pid): Remove.
1927 (find_any_thread_of_pid): Use find_thread.
1928 * linux-low.c (num_lwps): Use for_each_thread.
1929
1930 2017-10-17 Yao Qi <yao.qi@linaro.org>
1931
1932 * Makefile.in: Remove one rule.
1933 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1934
1935 2017-10-17 Yao Qi <yao.qi@linaro.org>
1936
1937 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1938 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1939
1940 2017-10-17 Yao Qi <yao.qi@linaro.org>
1941
1942 * configure.srv: Rename arm.o with arch/arm.o.
1943
1944 2017-10-17 Yao Qi <yao.qi@linaro.org>
1945
1946 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1947 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1948 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1949 (arch-i386.o, arch-amd64.o): Remove rules.
1950 (arch/%.o): New rule.
1951 Update POSTCOMPILE and COMPILE.pre.
1952 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1953 * configure: Re-generated.
1954 * configure.srv: Replace arch-i386.o with arch/i386.o.
1955 Replace arch-amd64.o with arch/amd64.o.
1956
1957 2017-10-16 Yao Qi <yao.qi@linaro.org>
1958
1959 * configure: Regenerated.
1960
1961 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1962
1963 * inferiors.h: (struct inferior_list): Remove.
1964 (struct inferior_list_entry); Remove.
1965 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1966 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1967 get_first_inferior): Remove.
1968 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1969 find_inferior_id, find_inferior_in_random): Change signature.
1970 * inferiors.c (all_threads): Change type to
1971 std::list<thread_info *>.
1972 (get_thread): Remove macro.
1973 (find_inferior, find_inferior_id): Change signature, implement
1974 using find_thread.
1975 (find_inferior_in_random): Change signature, implement using
1976 find_thread_in_random.
1977 (for_each_inferior, for_each_inferior_with_data): Change
1978 signature, implement using for_each_thread.
1979 (add_inferior_to_list, remove_inferior): Remove.
1980 (add_thread, get_first_thread, thread_of_pid,
1981 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1982 (get_first_inferior, one_inferior_p, clear_inferior_list):
1983 Remove.
1984 (clear_inferiors, get_thread_process): Update.
1985 * gdbthread.h: Include <list>.
1986 (struct thread_info) <entry>: Remove field.
1987 <id>: New field.
1988 (all_threads): Change type to std::list<thread_info *>.
1989 (get_first_inferior): Add doc.
1990 (find_thread, for_each_thread, find_thread_in_random): New
1991 functions.
1992 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1993 * linux-arm-low.c (update_registers_callback): Update.
1994 * linux-low.c (second_thread_of_pid_p): Update.
1995 (kill_one_lwp_callback, linux_detach_lwp_callback,
1996 delete_lwp_callback, status_pending_p_callback, same_lwp,
1997 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1998 iterate_over_lwps, not_stopped_callback,
1999 resume_stopped_resumed_lwps, count_events_callback,
2000 select_singlestep_lwp_callback, select_event_lwp_callback,
2001 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2002 suspend_and_send_sigstop_callback, wait_for_sigstop,
2003 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2004 lwp_running, linux_set_resume_request, resume_status_pending_p,
2005 need_step_over_p, start_step_over, linux_resume_one_thread,
2006 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2007 reset_lwp_ptrace_options_callback): Update.
2008 * linux-mips-low.c (update_watch_registers_callback): Update.
2009 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2010 Update.
2011 (free_register_cache_thread_one): Remove.
2012 (regcache_release): Update.
2013 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2014 handle_qxfer_threads_worker): Update.
2015 (handle_query): Update, use list iterator.
2016 (visit_actioned_threads, handle_pending_status,
2017 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2018 clear_pending_status_callback, set_pending_status_callback,
2019 find_status_pending_thread_callback, handle_status,
2020 process_serial_event): Update.
2021 * target.c (thread_search_callback): Update.
2022 * thread-db.c (thread_db_get_tls_address): Update.
2023 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2024 Update.
2025 * win32-i386-low.c (update_debug_registers_callback): Update.
2026 * win32-low.c (delete_thread_info, child_delete_thread,
2027 continue_one_thread, suspend_one_thread,
2028 get_child_debug_event): Adjust.
2029
2030 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2031
2032 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2033 * inferiors.h: Include <list>.
2034 (struct process_info) <entry>: Remove field.
2035 <pid>: New field.
2036 (pid_of): Change macro to function.
2037 (ptid_of, lwpid_of): Remove macro.
2038 (all_processes): Change type to std::list<process_info *>.
2039 (ALL_PROCESSES): Remove macro.
2040 (for_each_process, find_process): New function.
2041 * inferiors.c (all_processes): Change type to
2042 std::list<process_info *>.
2043 (find_thread_process): Adjust.
2044 (add_process): Likewise.
2045 (remove_process): Likewise.
2046 (find_process_pid): Likewise.
2047 (get_first_process): Likewise.
2048 (started_inferior_callback): Remove.
2049 (have_started_inferiors_p): Adjust.
2050 (attached_inferior_callback): Remove.
2051 (have_attached_inferiors_p): Adjust.
2052 * linux-low.c (check_zombie_leaders): Likewise.
2053 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2054 (x86_linux_update_xmltarget): Adjust.
2055 * server.c (handle_query): Likewise.
2056 (gdb_reattached_process): Remove.
2057 (handle_status): Adjust.
2058 (kill_inferior_callback): Likewise.
2059 (detach_or_kill_inferior): Remove.
2060 (print_started_pid): Likewise.
2061 (print_attached_pid): Likewise.
2062 (detach_or_kill_for_exit): Update.
2063 (process_serial_event): Likewise.
2064 * linux-arm-low.c (arm_new_fork): Likewise.
2065
2066 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2067
2068 * dll.h: Include <list>.
2069 (struct dll_info): Add constructor.
2070 <entry>: Remove field.
2071 (all_dlls): Change type to std::list<dll_info>.
2072 * dll.c: Include <algorithm>.
2073 (get_dll): Remove macro.
2074 (all_dlls): Change type to std::list<dll_info *>.
2075 (free_one_dll): Remove.
2076 (match_dll): Likewise.
2077 (loaded_dll): Adjust.
2078 (unloaded_dll): Adjust to all_dlls type change, use
2079 std::find_if. Inline code from match_dll.
2080 (clear_dlls): Adjust to all_dlls type change.
2081 * server.c (emit_dll_description): Remove.
2082 (handle_qxfer_libraries): Adjust to all_dlls type change,
2083 integrate emit_dll_description's functionality.
2084
2085 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2086
2087 * linux-low.h (struct linux_target_ops) <delete_process>: New
2088 field.
2089 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2090 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2091 (struct linux_target_ops): Add delete_process callback.
2092 * linux-arm-low.c (arm_delete_process): New.
2093 (struct linux_target_ops): Add delete_process callback.
2094 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2095 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2096 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2097 * linux-mips-low.c (mips_linux_delete_process): New.
2098 (struct linux_target_ops): Add delete_process callback.
2099 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2100 * linux-s390-low.c (struct linux_target_ops): Likewise.
2101 * linux-sh-low.c (struct linux_target_ops): Likewise.
2102 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2103 * linux-tile-low.c (struct linux_target_ops): Likewise.
2104 * linux-x86-low.c (x86_linux_delete_process): New.
2105 (struct linux_target_ops): Add delete_process callback.
2106 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2107
2108 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2109
2110 * linux-aarch64-low.c (the_low_target): Add thread delete
2111 callback.
2112 * linux-arm-low.c (arm_delete_thread): New function.
2113 (the_low_target): Add thread delete callback.
2114 * linux-bfin-low.c (the_low_target): Likewise.
2115 * linux-crisv32-low.c (the_low_target): Likewise.
2116 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2117 set.
2118 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2119 field.
2120 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2121 * linux-mips-low.c (mips_linux_delete_thread): New function.
2122 (the_low_target): Add thread delete callback.
2123 * linux-ppc-low.c (the_low_target): Likewise.
2124 * linux-s390-low.c (the_low_target): Likewise.
2125 * linux-sh-low.c (the_low_target): Likewise.
2126 * linux-tic6x-low.c (the_low_target): Likewise.
2127 * linux-tile-low.c (the_low_target): Likewise.
2128 * linux-x86-low.c (the_low_target): Likewise.
2129 * linux-xtensa-low.c (the_low_target): Likewise.
2130
2131 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2132
2133 * win32-low.c: Include "common-inferior.h".
2134
2135 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2136
2137 * inferiors.c (set_inferior_cwd): New function.
2138 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2139 (handle_query): Inform that QSetWorkingDir is supported.
2140 * win32-low.c (create_process): Pass the inferior's cwd to
2141 CreateProcess.
2142
2143 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2144
2145 * inferiors.c (current_inferior_cwd): New global variable.
2146 (get_inferior_cwd): New function.
2147 * inferiors.h (struct process_info) <cwd>: New field.
2148
2149 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2150
2151 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2152 (OBS): Add gdb_tilde_expand.o.
2153
2154 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2155
2156 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2157 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2158
2159 2017-09-29 Pedro Alves <palves@redhat.com>
2160
2161 * ax.c (gdb_parse_agent_expr): Constify.
2162 * ax.h (gdb_parse_agent_expr): Constify.
2163 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2164 Constify.
2165 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2166 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2167 * remote-utils.h (read_ptid): Constify.
2168 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2169 (process_point_options, process_serial_event): Constify.
2170 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2171 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2172 (cmd_qtbuffer): Constify.
2173
2174 2017-09-29 Pedro Alves <palves@redhat.com>
2175
2176 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2177 fails.
2178
2179 2017-09-29 Pedro Alves <palves@redhat.com>
2180
2181 * linux-low.c (handle_extended_wait): Pass parent thread instead
2182 of process to thread_db_notice_clone.
2183 * linux-low.h (thread_db_notice_clone): Replace parent process
2184 parameter with parent thread parameter.
2185 * thread-db.c (find_one_thread): Add comment.
2186 (thread_db_notice_clone): Replace parent process parameter with
2187 parent thread parameter. Temporarily switch to the parent thread.
2188
2189 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2190
2191 * gdbthread.h: Include "common-gdbthread.h".
2192 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2193 "if" when validating the ptid.
2194 * remote-utils.c: Include "gdbthread.h".
2195 (prepare_resume_reply): Use "switch_to_thread".
2196 * target.c (done_accessing_memory): Likewise.
2197
2198 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2199
2200 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2201 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2202 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2203 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2204 s390x-gs-linux64-ipa.o to ipa_obj.
2205 * linux-s390-low.c (HWCAP_S390_GS): New define.
2206 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2207 New functions.
2208 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2209 (s390_arch_setup): Check for guarded-storage support and choose
2210 appropriate tdesc.
2211 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2212 init_registers_s390x_gs_linux64.
2213 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2214 enum value.
2215 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2216 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2217
2218 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2221
2222 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2223
2224 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2225 (thread_db_thread_handle): Declare.
2226 * linux-low.c (linux_target_ops): Initialize thread_handle.
2227 * server.c (handle_qxfer_threads_worker): Add support for
2228 "handle" attribute.
2229 * target.h (struct target_ops): Add new function pointer,
2230 thread_handle.
2231 (target_thread_handle): Define.
2232 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2233 field in lwp.
2234 (thread_db_thread_handle): New function.
2235
2236 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2237
2238 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2239 * linux-low.h (thread_db_notice_clone): Declare.
2240 * thread-db.c (thread_db_notice_clone): New function.
2241
2242 2017-09-21 Pedro Alves <palves@redhat.com>
2243
2244 * server.c (gdb_read_memory, handle_status, process_serial_event)
2245 (handle_serial_event, handle_target_event): Adjust to
2246 set_desired_thread prototype change.
2247 * target.c (set_desired_thread): Remove 'use_general' parameter
2248 and adjust.
2249 * target.h (set_desired_thread): Remove 'use_general' parameter.
2250
2251 2017-09-20 Tom Tromey <tom@tromey.com>
2252
2253 * target.c (target_terminal::terminal_state): Define.
2254 (target_terminal::init): Rename from target_terminal_init.
2255 (target_terminal::inferior): Rename from
2256 target_terminal_inferior.
2257 (target_terminal::ours): Rename from target_terminal_ours.
2258 (target_terminal::ours_for_output, target_terminal::info): New.
2259
2260 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2261
2262 * server.c (accumulate_file_name_length): Remove.
2263 (emit_dll_description): Adjust to std::string change.
2264 (handle_qxfer_libraries): Use std::string to hold document.
2265
2266 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2267
2268 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2269 return type of xml_escape_text.
2270 * server.c (emit_dll_description): Likewise.
2271
2272 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2273
2274 * server.c (captured_main): Accept argument for --selftest.
2275 Update run_tests call.
2276 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2277 when registering selftests.
2278
2279 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2280
2281 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2282 instead of "VEC" for "target_desc.reg_defs".
2283 (regcache_cpy): Likewise.
2284 (registers_to_string): Likewise.
2285 (registers_from_string): Likewise.
2286 (find_regno): Likewise.
2287 (supply_regblock): Likewise.
2288 (regcache_raw_read_unsigned): Likewise.
2289 * tdesc.c (init_target_desc): Likewise.
2290 (tdesc_create_reg): Likewise.
2291 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2292 (struct target_desc) <reg_defs>: Convert to "std::vector".
2293 (target_desc): Do not initialize "reg_defs".
2294 (~target_desc): Update code to use "std::vector" instead of "VEC"
2295 for "target_desc.reg_defs".
2296 (operator==): Likewise.
2297
2298 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2299
2300 * inferiors.h (thread_to_gdb_id): Remove.
2301 * inferiors.c (thread_to_gdb_id): Remove.
2302 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2303 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2304 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2305 Likewise.
2306 * nto-low.c (nto_fetch_registers, nto_store_registers,
2307 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2308
2309 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2310
2311 * inferiors.h (gdb_id_to_thread_id): Remove.
2312 * inferiors.c (gdb_id_to_thread_id): Remove.
2313 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2314 removal. Move pid declaration closer to where it's used.
2315
2316 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * server.c (handle_detach): New function.
2319 (process_serial_event): Move code out, call handle_detach.
2320
2321 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2322
2323 * server.c (require_running): Rename to ...
2324 (require_running_or_return): ... this ...
2325 (require_running_or_break): ... and this.
2326 (handle_query, process_serial_event): Adjust.
2327
2328 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * linux-low.c (linux_set_resume_request): Remove unused
2331 variables.
2332
2333 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 * server.c (first_thread_of): Remove.
2336 (process_serial_event): Replace usage of first_thread_of with
2337 find_any_thread_of_pid.
2338 * tracepoint.c (same_process_p): Remove.
2339 (gdb_agent_about_to_close): Replace usage of same_process_p with
2340 find_any_thread_of_pid.
2341 * linux-x86-low.c (same_process_callback): Remove.
2342 (x86_arch_setup_process_callback): Replace usage of
2343 same_process_callback with find_any_thread_of_pid.
2344 * thread-db.c (any_thread_of): Remove.
2345 (switch_to_process): Replace usage of any_thread_of with
2346 find_any_thread_of_pid.
2347 * inferiors.c (thread_pid_matches_callback): Remove.
2348 (find_thread_process): Adjust to use find_any_thread_of_pid.
2349
2350 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2351
2352 * regcache.c (get_thread_regcache): Guard calls to "memset"
2353 with "!VEC_empty".
2354
2355 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2356
2357 * linux-low.c (handle_extended_wait): Use
2358 "allocate_target_description" instead of "XNEW".
2359 * linux-x86-low.c (initialize_low_arch): Likewise.
2360
2361 2017-09-05 Yao Qi <yao.qi@linaro.org>
2362
2363 * configure.srv (srv_i386_regobj): Remove.
2364 (srv_amd64_regobj): Remove.
2365 (srv_regobj): Set it to "" for x86 non-linux targets.
2366 * linux-x86-tdesc.c (i386_linux_read_description):
2367 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2368 (init_registers_i386): Remove the declaration.
2369 (tdesc_i386): Remove the declaration.
2370 (lynx_i386_arch_setup): Call i386_create_target_description.
2371 * nto-x86-low.c: Likewise.
2372 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2373 [!__x86_64__]: include arch/i386.h.
2374 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2375
2376 2017-09-05 Yao Qi <yao.qi@linaro.org>
2377
2378 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2379 i386/amd64-XXX-linux from it.
2380
2381 2017-09-05 Yao Qi <yao.qi@linaro.org>
2382
2383 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2384 false.
2385 (ipa_amd64_linux_regobj): Remove.
2386 (ipa_x32_linux_regobj): Remove.
2387
2388 2017-09-05 Yao Qi <yao.qi@linaro.org>
2389
2390 * Makefile.in (arch-amd64.o): New rule.
2391 * configure.srv: Append arch-amd64.o.
2392 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2393 (get_ipa_tdesc): Call amd64_linux_read_description.
2394 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2395 and init_registers_amd64_XXX.
2396 * linux-x86-low.c (x86_linux_read_description): Call
2397 amd64_linux_read_description.
2398 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2399 (initialize_low_arch): Don't call init_registers_x32_XXX and
2400 init_registers_amd64_XXX.
2401 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2402 and tdesc_amd64_XXX.
2403 [__x86_64__] (amd64_tdesc_test): New function.
2404 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2405 and init_registers_amd64_XXX.
2406 * linux-x86-tdesc.c: Include arch/amd64.h.
2407 (xcr0_to_tdesc_idx): New function.
2408 (i386_linux_read_description): New function.
2409 (amd64_get_ipa_tdesc_idx): New function.
2410 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2411 (amd64_get_ipa_tdesc): Declare.
2412
2413 2017-09-05 Yao Qi <yao.qi@linaro.org>
2414
2415 * configure.srv (srv_i386_linux_xmlfiles): Remove
2416 i386/i386-XXX-linux.xml from it.
2417
2418 2017-09-05 Yao Qi <yao.qi@linaro.org>
2419
2420 * configure.srv: Set srv_i386_linux_regobj empty if $development
2421 is false.
2422 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2423 initialize_low_tdesc.
2424 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2425 with #if initialize_low_tdesc.
2426 * linux-x86-tdesc-selftest.c: New file.
2427 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2428
2429 2017-09-05 Yao Qi <yao.qi@linaro.org>
2430
2431 * Makefile.in (arch-i386.o): New rule.
2432 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2433 (x86_64-*-linux*): Likewise.
2434 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2435 include arch/i386.h.
2436 (i386_linux_read_description): Remove code and call
2437 i386_create_target_description.
2438 * tdesc.c (allocate_target_description): New function.
2439 * tdesc.h (set_tdesc_architecture): Remove declaration.
2440 (set_tdesc_osabi): Likewise.
2441
2442 2017-09-05 Yao Qi <yao.qi@linaro.org>
2443
2444 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2445 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2446 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2447 .xmltarget.
2448 * server.c (get_features_xml): Call tdesc_get_features_xml.
2449 * tdesc.c (set_tdesc_architecture): New function.
2450 (set_tdesc_osabi): New function.
2451 (tdesc_get_features_xml): New function.
2452 (tdesc_create_feature): Add an argument.
2453 * tdesc.h (struct target_desc) <features>: New field.
2454 <arch, osabi>: New field.
2455 (~target_desc): xfree features, arch, and osabi.
2456 (target_desc::oerator==): Don't compare .xmltarget.
2457 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2458 (set_tdesc_osabi): Likewise.
2459 (tdesc_get_features_xml): Likewise.
2460
2461 2017-09-05 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-x86-tdesc.c: Include selftest.h.
2464 (i386_tdesc_test): New function.
2465 (initialize_low_tdesc): Call selftests::register_test.
2466 * tdesc.h: Include regdef.h.
2467 (target_desc): Override operator == and !=.
2468
2469 2017-09-05 Yao Qi <yao.qi@linaro.org>
2470
2471 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2472 (ipa_obj): Likewise.
2473 * linux-i386-ipa.c: Include common/x86-xstate.h
2474 (get_ipa_tdesc): Call i386_linux_read_description.
2475 (initialize_low_tracepoint): Don't call init_registers_XXX
2476 functions, call initialize_low_tdesc instead.
2477 * linux-x86-low.c (x86_linux_read_description): Call
2478 i386_linux_read_description.
2479 (initialize_low_arch): Don't call init_registers_i386_XXX
2480 functions, call initialize_low_tdesc.
2481 * linux-x86-tdesc.c: New file.
2482 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2483 (i386_get_ipa_tdesc_idx): Declare.
2484 (i386_get_ipa_tdesc): Declare.
2485 (initialize_low_tdesc): Declare.
2486
2487 2017-09-05 Yao Qi <yao.qi@linaro.org>
2488
2489 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2490 instead of 0.
2491
2492 2017-09-05 Yao Qi <yao.qi@linaro.org>
2493
2494 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2495 * regcache.c (get_thread_regcache): Use VEC_length.
2496 (init_register_cache): Likewise.
2497 (regcache_cpy): Likewise.
2498 (registers_to_string): Iterate reg_defs via VEC_iterate.
2499 (find_regno): Likewise.
2500 (find_register_by_number): Use VEC_index.
2501 (register_size): Call find_register_by_number.
2502 (register_data): Call find_register_by_number.
2503 (supply_regblock): Use VEC_length.
2504 (regcache_raw_read_unsigned): Likewise.
2505 * tdesc.c (init_target_desc): Iterate reg_defs via
2506 VEC_iterate.
2507 (default_description): Update initializer.
2508 (copy_target_description): Don't update field num_registers.
2509 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2510 <num_registers>: Remove.
2511
2512 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2513
2514 * Makefile.in (.SECONDARY): Define target.
2515
2516 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2517
2518 * linux-low.c (linux_wait_1): Adjust.
2519 * server.c (queue_stop_reply_callback): Adjust.
2520
2521 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2522
2523 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2524 QEnvironmentUnset and QEnvironmentReset packets.
2525 (handle_query): Inform remote that QEnvironmentHexEncoded,
2526 QEnvironmentUnset and QEnvironmentReset are supported.
2527
2528 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2529
2530 * inferiors.h (inferior_target_data): Rename to ...
2531 (thread_target_data): ... this.
2532 (inferior_regcache_data): Rename to ...
2533 (thread_regcache_data): ... this.
2534 (set_inferior_regcache_data): Rename to ...
2535 (set_thread_regcache_data): ... this.
2536 * inferiors.c (inferior_target_data): Rename to ...
2537 (thread_target_data): ... this.
2538 (inferior_regcache_data): Rename to ...
2539 (thread_regcache_data): ... this.
2540 (set_inferior_regcache_data): Rename to ...
2541 (set_thread_regcache_data): ... this.
2542 (free_one_thread): Update.
2543 * linux-low.h (get_thread_lwp): Update.
2544 * regcache.c (get_thread_regcache): Update.
2545 (regcache_invalidate_thread): Update.
2546 (free_register_cache_thread): Update.
2547 * win32-i386-low.c (update_debug_registers_callback): Update.
2548 (win32_get_current_dr): Update.
2549 * win32-low.c (thread_rec): Update.
2550 (delete_thread_info): Update.
2551 (continue_one_thread): Update.
2552 (suspend_one_thread): Update.
2553
2554 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2555
2556 * inferiors.c (set_inferior_target_data): Remove.
2557 * inferiors.h (set_inferior_target_data): Remove.
2558
2559 2017-08-18 Yao Qi <yao.qi@linaro.org>
2560
2561 * Makefile.in (OBS): Add selftest.o.
2562 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2563 * configure, config.in: Re-generated.
2564 * server.c: Include common/sefltest.h.
2565 (captured_main): Handle option --selftest.
2566
2567 2017-08-09 Yao Qi <yao.qi@linaro.org>
2568
2569 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2570 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2571 i386-avx-mpx.o and i386-mmx.o.
2572 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2573 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2574 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2575 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2576 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2577 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2578 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2579 i386/amd64-avx-mpx.xml.
2580
2581 2017-08-09 Yao Qi <yao.qi@linaro.org>
2582
2583 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2584 and x32-avx-avx512.o.
2585 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2586 i386/x32-avx-avx512.xml.
2587
2588 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2589
2590 * tracepoint.h (enum class fast_tpoint_collect_result): New
2591 enumeration.
2592 (fast_tracepoint_collecting): Change return type to
2593 fast_tpoint_collect_result.
2594 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2595 * linux-low.h: Include tracepoint.h.
2596 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2597 fast_tpoint_collect_result.
2598 * linux-low.c (handle_tracepoints): Adjust.
2599 (linux_fast_tracepoint_collecting): Change return type to
2600 fast_tpoint_collect_result.
2601 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2602 linux_wait_1, stuck_in_jump_pad_callback,
2603 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2604 proceed_one_lwp): Adjust to type change.
2605
2606 2017-07-10 Yao Qi <yao.qi@linaro.org>
2607
2608 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2609
2610 2017-06-29 Yao Qi <yao.qi@linaro.org>
2611
2612 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2613 Remove.
2614 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2615
2616 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2619
2620 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2621
2622 * linux-low.c (linux_create_inferior): Adjust code to access the
2623 environment information via 'gdb_environ' class.
2624 * lynx-low.c (lynx_create_inferior): Likewise.
2625 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2626 (get_environ): Return a pointer to 'our_environ'.
2627 (captured_main): Initialize 'our_environ'.
2628 * server.h (get_environ): Adjust prototype.
2629 * spu-low.c (spu_create_inferior): Adjust code to access the
2630 environment information via 'gdb_environ' class.
2631
2632 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2635 usage of "register" keyword.
2636
2637 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2638
2639 * configure: Re-generate.
2640
2641 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2642
2643 * configure: Re-generate.
2644
2645 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2646
2647 * Makefile.in (COMPILE.pre): Add "-x c++".
2648
2649 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2650
2651 * fork-child.c: Conditionally include <signal.h>.
2652
2653 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2654
2655 * server.c (handle_general_set): Handle new packet
2656 "QStartupWithShell".
2657 (handle_query): Add "QStartupWithShell" to the list of supported
2658 packets.
2659 (gdbserver_usage): Add help text explaining the
2660 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2661 options.
2662 (captured_main): Recognize and act upon the presence of the new
2663 CLI options.
2664
2665 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2666 Pedro Alves <palves@redhat.com>
2667
2668 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2669 * configure: Regenerate.
2670 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2671 "fork-inferior.o".
2672 (i[34567]86-*-lynxos*): Likewise.
2673 (spu*-*-*): Likewise.
2674 * fork-child.c: New file.
2675 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2676 and "environ.h".
2677 (linux_ptrace_fun): New function.
2678 (linux_create_inferior): Adjust function prototype to reflect
2679 change on "target.h". Adjust function code to use
2680 "fork_inferior".
2681 (linux_request_interrupt): Delete "signal_pid".
2682 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2683 (lynx_ptrace_fun): New function.
2684 (lynx_create_inferior): Adjust function prototype to reflect
2685 change on "target.h". Adjust function code to use
2686 "fork_inferior".
2687 * nto-low.c (nto_create_inferior): Adjust function prototype and
2688 code to reflect change on "target.h". Update comments.
2689 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2690 "common-terminal.h" and "environ.h".
2691 (terminal_fd): Moved to fork-child.c.
2692 (old_foreground_pgrp): Likewise.
2693 (restore_old_foreground_pgrp): Likewise.
2694 (last_status): Make it global.
2695 (last_ptid): Likewise.
2696 (our_environ): New variable.
2697 (startup_with_shell): Likewise.
2698 (program_name): Likewise.
2699 (program_argv): Rename to...
2700 (program_args): ...this.
2701 (wrapper_argv): New variable.
2702 (start_inferior): Delete function.
2703 (get_exec_wrapper): New function.
2704 (get_exec_file): Likewise.
2705 (get_environ): Likewise.
2706 (prefork_hook): Likewise.
2707 (post_fork_inferior): Likewise.
2708 (postfork_hook): Likewise.
2709 (postfork_child_hook): Likewise.
2710 (handle_v_run): Update code to deal with arguments coming from the
2711 remote host. Update calls from "start_inferior" to
2712 "create_inferior".
2713 (captured_main): Likewise. Initialize environment variable. Call
2714 "have_job_control".
2715 * server.h (post_fork_inferior): New prototype.
2716 (get_environ): Likewise.
2717 (last_status): Declare.
2718 (last_ptid): Likewise.
2719 (signal_pid): Likewise.
2720 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2721 (spu_ptrace_fun): New function.
2722 (spu_create_inferior): Adjust function prototype to reflect change
2723 on "target.h". Adjust function code to use "fork_inferior".
2724 * target.c (target_terminal_init): New function.
2725 (target_terminal_inferior): Likewise.
2726 (target_terminal_ours): Likewise.
2727 * target.h: Include <vector>.
2728 (struct target_ops) <create_inferior>: Update prototype.
2729 (create_inferior): Update macro.
2730 * utils.c (gdb_flush_out_err): New function.
2731 * win32-low.c (win32_create_inferior): Adjust function prototype
2732 and code to reflect change on "target.h".
2733
2734 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2735
2736 * inferiors.c (switch_to_thread): New function.
2737
2738 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2739
2740 * Makefile.in (SFILE): Add "common/job-control.c".
2741 (OBS): Add "job-control.o".
2742
2743 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2744
2745 * Makefile: Remove "@host_makefile_frag@".
2746
2747 2017-05-05 Pedro Alves <palves@redhat.com>
2748
2749 * configure: Regenerate.
2750
2751 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2752
2753 * configure: Regenerate.
2754
2755 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2756
2757 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2758 software_single_step change of return type to
2759 std::vector<CORE_ADDR>.
2760 * linux-low.c (install_software_single_step_breakpoints):
2761 Likewise.
2762 * linux-low.h (install_software_single_step_breakpoints):
2763 Likewise.
2764
2765 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2766
2767 * remote-utils.c: Include "gdb_termios.h" instead of
2768 "terminal.h".
2769 * terminal.h: Delete file.
2770
2771 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2772
2773 * server.c: Include <vector>.
2774 <program_argv, wrapper_argv>: Convert to std::vector.
2775 (start_inferior): Rewrite function to use C++.
2776 (handle_v_run): Likewise. Update code that calculates the argv
2777 based on the vRun packet; use C++.
2778 (captured_main): Likewise.
2779
2780 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2781
2782 * server.c (handle_v_cont): Initialize thread_resume::thread
2783 with null_ptid.
2784
2785 2017-04-05 Pedro Alves <palves@redhat.com>
2786
2787 * configure: Regenerate.
2788
2789 2017-04-05 Pedro Alves <palves@redhat.com>
2790
2791 * gdbreplay.c (sync_error): Constify.
2792 * linux-x86-low.c (push_opcode): Constify.
2793
2794 2017-04-05 Pedro Alves <palves@redhat.com>
2795
2796 * win32-low.c (get_child_debug_event)
2797 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2798 Report TARGET_WAITKIND_SPURIOUS instead.
2799
2800 2017-04-05 Pedro Alves <palves@redhat.com>
2801
2802 * remote-utils.c (remote_prepare, remote_open): Constify.
2803 * remote-utils.h (remote_prepare, remote_open): Constify.
2804 * server.c (captured_main): Constify 'port' handling.
2805
2806 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2807
2808 * Makefile.in (clean): Clear .deps.
2809
2810 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2811
2812 * .gitignore: Remove generated files, replace with wildcard.
2813 * (clean): Replace removal of generated files with wildcard.
2814 (version.c): Replace with...
2815 (version-generated.c): ...this.
2816 (xml-builtin.c): Replace with...
2817 (xml-builtin-generated.c): ...this.
2818 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2819 (%.c: *regformats*): Replace with...
2820 (%-generated.c: *regformats*): ...this.
2821
2822 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2823
2824 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2825 (xtensa_fill_gregset): Call collect_register_by_name for
2826 threadptr register.
2827 (xtensa_store_gregset): Call supply_register_by_name for
2828 threadptr register.
2829
2830 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2831
2832 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2833 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2834 (xtensa_store_gregset): Call supply_register for all registers in
2835 a0_regnum..a0_regnum + C0_NREGS range.
2836
2837 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2838
2839 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2840 (ax-ipa.o: ax.c): Remove.
2841 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2842 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2843 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2844 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2845 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2846
2847 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2848
2849 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2850 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2851 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2852 (errors-ipa.o: ../common/errors.c): Remove.
2853 (format-ipa.o: ../common/format.c): Remove.
2854 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2855
2856 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2857
2858 * Makefile.in (%-ipa.o: %.c): New rule.
2859 (tracepoint-ipa.o: tracepoint.c): Remove.
2860 (utils-ipa.o: utils.c): Remove.
2861 (remote-utils-ipa.o: remote-utils.c): Remove.
2862 (regcache-ipa.o: regcache.c): Remove.
2863 (i386-linux-ipa.o: i386-linux.c): Remove.
2864 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2865 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2866 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2867 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2868 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2869 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2870 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2871 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2872 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2873 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2874 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2875 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2876 (aarch64-ipa.o: aarch64.c): Remove.
2877 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2878 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2879 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2880 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2881 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2882 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2883 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2884 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2885 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2886 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2887 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2888 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2889 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2890 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2891 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2892 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2893 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2894 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2895 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2896 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2897 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2898 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2899 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2900 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2901 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2902 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2903 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2904 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2905 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2906 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2907 (tdesc-ipa.o: tdesc.c): Remove.
2908 (x32-linux-ipa.o: x32-linux.c): Remove.
2909 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2910 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2911
2912 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2913
2914 * Makefile.in (%.o: ../arch/%.c): New rule.
2915 (arm.o: ../arch/arm.c): Remove.
2916 (arm-linux.o: ../arch/arm-linux.c): Remove.
2917 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2918 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2919
2920 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2921
2922 * Makefile.in (%.o: ../nat/%.c): New rule.
2923 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2924 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2925 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2926 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2927 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2928 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2929 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2930 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2931 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2932 (linux-personality.o: ../nat/linux-personality.c): Remove.
2933 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2934 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2935 (x86-linux.o: ../nat/x86-linux.c): Remove.
2936 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2937 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2938
2939 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2940
2941 * Makefile.in (%.o: ../common/%.c): New rule.
2942 (signals.o: ../common/signals.c): Remove.
2943 (print-utils.o: ../common/print-utils.c): Remove.
2944 (rsp-low.o: ../common/rsp-low.c): Remove.
2945 (common-utils.o: ../common/common-utils.c): Remove.
2946 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2947 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2948 (vec.o: ../common/vec.c): Remove.
2949 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2950 (xml-utils.o: ../common/xml-utils.c): Remove.
2951 (ptid.o: ../common/ptid.c): Remove.
2952 (buffer.o: ../common/buffer.c): Remove.
2953 (format.o: ../common/format.c): Remove.
2954 (filestuff.o: ../common/filestuff.c): Remove.
2955 (agent.o: ../common/agent.c): Remove.
2956 (errors.o: ../common/errors.c): Remove.
2957 (environ.o: ../common/environ.c): Remove.
2958 (common-debug.o: ../common/common-debug.c): Remove.
2959 (cleanups.o: ../common/cleanups.c): Remove.
2960 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2961 (fileio.o: ../common/fileio.c): Remove.
2962 (common-regcache.o: ../common/common-regcache.c): Remove.
2963 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2964 (new-op.o: ../common/new-op.c): Remove.
2965 (btrace-common.o: ../common/btrace-common.c): Remove.
2966
2967 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2968
2969 * Makefile.in (%.o: ../target/%.c): New rule.
2970 (waitstatus.o: ../target/waitstatus.c): Remove.
2971
2972 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2973
2974 * Makefile.in
2975 (%.c: ../regformats/%.dat,
2976 (%.c: ../regformats/arm/%.dat,
2977 (%.c: ../regformats/i386/%.dat,
2978 (%.c: ../regformats/rs6000/%.dat): New rules.
2979 (aarch64.c): Remove.
2980 (reg-arm.c): Remove.
2981 (arm-with-iwmmxt.c): Remove.
2982 (arm-with-vfpv2.c): Remove.
2983 (arm-with-vfpv3.c): Remove.
2984 (arm-with-neon.c): Remove.
2985 (reg-bfin.c): Remove.
2986 (reg-cris.c): Remove.
2987 (reg-crisv32.c): Remove.
2988 (i386.c): Remove.
2989 (i386-linux.c): Remove.
2990 (i386-avx.c): Remove.
2991 (i386-avx-linux.c): Remove.
2992 (i386-avx-avx512.c): Remove.
2993 (i386-avx-avx512-linux.c): Remove.
2994 (i386-mpx.c): Remove.
2995 (i386-mpx-linux.c): Remove.
2996 (i386-avx-mpx-avx512-pku.c): Remove.
2997 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2998 (i386-avx-mpx.c): Remove.
2999 (i386-avx-mpx-linux.c): Remove.
3000 (i386-mmx.c): Remove.
3001 (i386-mmx-linux.c): Remove.
3002 (reg-ia64.c): Remove.
3003 (reg-m32r.c): Remove.
3004 (reg-m68k.c): Remove.
3005 (reg-cf.c): Remove.
3006 (mips-linux.c): Remove.
3007 (mips-dsp-linux.c): Remove.
3008 (mips64-linux.c): Remove.
3009 (mips64-dsp-linux.c): Remove.
3010 (nios2-linux.c): Remove.
3011 (powerpc-32.c): Remove.
3012 (powerpc-32l.c): Remove.
3013 (powerpc-altivec32l.c): Remove.
3014 (powerpc-cell32l.c): Remove.
3015 (powerpc-vsx32l.c): Remove.
3016 (powerpc-isa205-32l.c): Remove.
3017 (powerpc-isa205-altivec32l.c): Remove.
3018 (powerpc-isa205-vsx32l.c): Remove.
3019 (powerpc-e500l.c): Remove.
3020 (powerpc-64l.c): Remove.
3021 (powerpc-altivec64l.c): Remove.
3022 (powerpc-cell64l.c): Remove.
3023 (powerpc-vsx64l.c): Remove.
3024 (powerpc-isa205-64l.c): Remove.
3025 (powerpc-isa205-altivec64l.c): Remove.
3026 (powerpc-isa205-vsx64l.c): Remove.
3027 (s390-linux32.c): Remove.
3028 (s390-linux32v1.c): Remove.
3029 (s390-linux32v2.c): Remove.
3030 (s390-linux64.c): Remove.
3031 (s390-linux64v1.c): Remove.
3032 (s390-linux64v2.c): Remove.
3033 (s390-te-linux64.c): Remove.
3034 (s390-vx-linux64.c): Remove.
3035 (s390-tevx-linux64.c): Remove.
3036 (s390x-linux64.c): Remove.
3037 (s390x-linux64v1.c): Remove.
3038 (s390x-linux64v2.c): Remove.
3039 (s390x-te-linux64.c): Remove.
3040 (s390x-vx-linux64.c): Remove.
3041 (s390x-tevx-linux64.c): Remove.
3042 (tic6x-c64xp-linux.c): Remove.
3043 (tic6x-c64x-linux.c): Remove.
3044 (tic6x-c62x-linux.c): Remove.
3045 (reg-sh.c): Remove.
3046 (reg-sparc64.c): Remove.
3047 (reg-spu.c): Remove.
3048 (amd64.c): Remove.
3049 (amd64-linux.c): Remove.
3050 (amd64-avx.c): Remove.
3051 (amd64-avx-linux.c): Remove.
3052 (amd64-avx-avx512.c): Remove.
3053 (amd64-avx-avx512-linux.c): Remove.
3054 (amd64-mpx.c): Remove.
3055 (amd64-mpx-linux.c): Remove.
3056 (amd64-avx-mpx-avx512-pku.c): Remove.
3057 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3058 (amd64-avx-mpx.c): Remove.
3059 (amd64-avx-mpx-linux.c): Remove.
3060 (x32.c): Remove.
3061 (x32-linux.c): Remove.
3062 (x32-avx.c): Remove.
3063 (x32-avx-linux.c): Remove.
3064 (x32-avx-avx512.c): Remove.
3065 (x32-avx-avx512-linux.c): Remove.
3066 (reg-xtensa.c): Remove.
3067 (reg-tilegx.c): Remove.
3068 (reg-tilegx32.c): Remove.
3069
3070 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3071
3072 * Makefile.in (SFILES): Add "common/environ.c".
3073 (OBJS): Add "common/environ.h".
3074
3075 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3076
3077 * configure.ac: Check if the fs_base and gs_base members of
3078 `struct user_regs_struct' exist.
3079 * config.in: Regenerated.
3080 * configure: Likewise.
3081
3082 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3083
3084 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3085 target_read_memory.
3086 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3087 (get_next_pcs_syscall_next_pc): Likewise.
3088
3089 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3090
3091 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3092 * nto-x86-low.c: Likewise.
3093
3094 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3095
3096 * Makefile.in: Include disable-implicit-rules.mk.
3097
3098 2016-11-23 Pedro Alves <palves@redhat.com>
3099
3100 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3101 (debug_vprintf): Use std::chrono::steady_clock instead of
3102 gettimeofday. Use '.' instead of ':'.
3103 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3104 (get_timestamp): Use std::chrono::steady_clock instead of
3105 gettimeofday.
3106
3107 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3108
3109 * Makefile.in: Fix whitespace formatting.
3110
3111 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3112
3113 * Makefile.in (SFILES, OBS): Flatten list and order
3114 alphabetically.
3115
3116 2016-11-23 Pedro Alves <palves@redhat.com>
3117
3118 * event-loop.c (handle_file_event): Use warning.
3119 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3120 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3121 Use warning.
3122
3123 2016-11-23 Pedro Alves <palves@redhat.com>
3124
3125 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3126 output.
3127 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3128 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3129 debug_printf and debug_flush for debug output.
3130 * server.c (handle_general_set): Likewise.
3131 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3132 output.
3133
3134 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3135
3136 * Makefile.in (.c.o): Replace rule with ...
3137 (%.o: %.c): ... this one.
3138
3139 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3140
3141 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3142 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3143 make.
3144 * configure.ac: Remove checks for the make program.
3145 * configure: Re-generate.
3146
3147 2016-10-28 Pedro Alves <palves@redhat.com>
3148
3149 * Makefile.in (CXX_DIALECT): Get from configure.
3150 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3151 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3152 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3153 * config.in: Regenerate.
3154 * configure: Regenerate.
3155
3156 2016-10-27 Yao Qi <yao.qi@linaro.org>
3157
3158 * linux-low.c (linux_supports_range_stepping): Return true if
3159 can_software_single_step return true.
3160
3161 2016-10-27 Yao Qi <yao.qi@linaro.org>
3162
3163 * inferiors.c (find_inferior_in_random): New function.
3164 * inferiors.h (find_inferior_in_random): Declare.
3165 * linux-low.c (linux_wait_for_event_filtered): Call
3166 find_inferior_in_random instead of find_inferior.
3167
3168 2016-10-27 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-low.c (linux_wait_1): If single-step breakpoints are
3171 inserted, remove them.
3172
3173 2016-10-26 Pedro Alves <palves@redhat.com>
3174
3175 * linux-low.c (handle_extended_wait): Link parent/child fork
3176 threads.
3177 (linux_wait_1): Unlink them.
3178 (linux_set_resume_request): Ignore resume requests for
3179 already-resumed and unhandled fork child threads.
3180 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3181 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3182 New functions.
3183 (handle_v_requests) <vCont>: Don't call require_running.
3184 * server.h (in_queued_stop_replies): New declaration.
3185
3186 2016-10-24 Yao Qi <yao.qi@linaro.org>
3187
3188 PR server/20733
3189 * linux-aarch64-low.c (append_insns): Cast the return value to
3190 'uint32_t *'.
3191
3192 2016-10-10 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3195
3196 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3197
3198 * target.c (target_supports_multi_process): New function, moved
3199 from...
3200 * target.h (target_supports_multi_process): ... here. Remove
3201 macro.
3202
3203 2016-10-05 Tom Tromey <tom@tromey.com>
3204
3205 PR remote/20655:
3206 * tracepoint.c (handle_tracepoint_bkpts): Check
3207 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3208
3209 2016-10-05 Yao Qi <yao.qi@linaro.org>
3210
3211 * configure.srv: Update the path of arm-*.xml files.
3212
3213 2016-10-05 Terry Guo <terry.guo@arm.com>
3214 Yao Qi <yao.qi@linaro.org>
3215
3216 * Makefile.in: Adjust the path of rules.
3217 * configure.srv: Update the path of xml files.
3218 * regformats/arm-with-iwmmxt.dat: Regenerated.
3219 * regformats/arm-with-neon.dat: Likewise.
3220 * regformats/arm-with-vfpv2.dat: Likewise.
3221 * regformats/arm-with-vfpv3.dat Likewise.
3222
3223 2016-09-30 Yao Qi <yao.qi@linaro.org>
3224
3225 PR gdbserver/20627
3226 * target.c (target_stop_and_wait): Don't call
3227 target_continue_no_signal, use resume_stop instead.
3228
3229 2016-09-26 Yao Qi <yao.qi@linaro.org>
3230
3231 * linux-low.c (linux_wait_1): Call debug_exit.
3232
3233 2016-09-23 Pedro Alves <palves@redhat.com>
3234
3235 * Makefile.in (SFILES): Add common/new-op.c.
3236 (OBS): Add common/new-op.o.
3237 (new-op.o): New rule.
3238
3239 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3240
3241 * .gitinore: Ignore more files.
3242
3243 2016-09-21 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3246 23.
3247
3248 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3249
3250 * server.c (start_inferior): Call target_mourn_inferior instead of
3251 mourn_inferior; pass ptid_t argument to it.
3252 (resume): Likewise.
3253 (handle_target_event): Likewise.
3254 * target.c (target_mourn_inferior): New function.
3255 * target.h (mourn_inferior): Delete macro.
3256
3257 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3258
3259 * linux-low.c (lwp_is_stepping): New function.
3260
3261 2016-09-06 Carl Love <cel@us.ibm.com>
3262
3263 * server.c (start_inferior): Fixed comment, requested comment change
3264 didn't get updated correctly. Removed reference to ptrace () call as
3265 it is only true on Linux systems.
3266
3267 2016-09-06 Carl Love <cel@us.ibm.com>
3268
3269 * server.c (start_inferior): Do not call
3270 function target_post_create_inferior () if the
3271 inferior process has already exited.
3272
3273 2016-09-05 Pedro Alves <palves@redhat.com>
3274
3275 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3276 (COMPILE.pre, CC_LD): Use CXX directly.
3277 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3278 * acinclude.m4: Don't include build-with-cxx.m4.
3279 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3280 * configure: Regenerate.
3281
3282 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3283
3284 PR gdb/19495
3285 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3286 call writing data to own_buf.
3287
3288 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3289
3290 * target.c (mywait): Call target_wait instead of
3291 the_target->wait.
3292 (target_wait): New function.
3293
3294 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3295
3296 * server.c (start_inferior): New variable 'ptid'. Replace calls
3297 to the_target->resume by target_continue{,_no_signal}, depending
3298 on the case.
3299 * target.c (target_stop_and_wait): Call target_continue_no_signal
3300 instead of the_target->resume.
3301 (target_continue): New function.
3302
3303 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3304
3305 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3306
3307 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3308
3309 PR server/20491
3310 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3311 ps_prochandle.
3312 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3313 * linux-arm-low.c (ps_get_thread_area): Likewise.
3314 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3315 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3316 * linux-mips-low.c (ps_get_thread_area): Likewise.
3317 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3318 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3319 * linux-x86-low.c (ps_get_thread_area): Likewise.
3320 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3321
3322 2016-08-19 Pedro Alves <palves@redhat.com>
3323
3324 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3325
3326 2016-08-19 Pedro Alves <palves@redhat.com>
3327
3328 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3329 comment. Use memcpy instead of casting through unsigned long.
3330
3331 2016-08-19 Pedro Alves <palves@redhat.com>
3332
3333 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3334 allocating around 0x80000000.
3335
3336 2016-08-19 Pedro Alves <palves@redhat.com>
3337
3338 PR gdb/20415
3339 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3340 (x32-avx512-linux-ipa.o): New rules.
3341 * configure.ac (x86_64-*-linux*): New x32 check.
3342 * configure.srv (ipa_x32_linux_regobj): New.
3343 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3344 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3345 descriptions.
3346 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3347 descriptions.
3348 * configure: Regenerate.
3349
3350 2016-08-09 Pedro Alves <palves@redhat.com>
3351
3352 PR gdb/18653
3353 * Makefile.in (OBS): Add signals-state-save-restore.o.
3354 (signals-state-save-restore.o): New rule.
3355 * config.in: Regenerate.
3356 * configure: Regenerate.
3357 * linux-low.c: Include "signals-state-save-restore.h".
3358 (linux_create_inferior): Call
3359 restore_original_signals_state.
3360 * server.c: Include "dispositions-save-restore.h".
3361 (captured_main): Call save_original_signals_state.
3362
3363 2016-08-05 Pedro Alves <palves@redhat.com>
3364
3365 * configure: Regenerate.
3366
3367 2016-08-04 Yao Qi <yao.qi@linaro.org>
3368
3369 * linux-low.c (regsets_fetch_inferior_registers): Check
3370 errno is ESRCH or not.
3371
3372 2016-08-02 Yao Qi <yao.qi@linaro.org>
3373
3374 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3375 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3376 (thread_db_load_search): Update.
3377 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3378 td_ta_set_event and td_ta_event_getmsg.
3379
3380 2016-07-26 Pedro Alves <palves@redhat.com>
3381
3382 PR server/20414
3383 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3384 of unsigned long for 64-bit registers and use uint32_t instead of
3385 unsigned int for 32-bit registers.
3386
3387 2016-07-26 Pedro Alves <palves@redhat.com>
3388
3389 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3390 to 'ptrace'.
3391
3392 2016-07-21 Tom Tromey <tom@tromey.com>
3393
3394 * configure: Rebuild.
3395
3396 2016-07-21 Yao Qi <yao.qi@linaro.org>
3397
3398 * mem-break.c (find_gdb_breakpoint): Cast bp to
3399 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3400
3401 2016-07-21 Yao Qi <yao.qi@linaro.org>
3402
3403 * server.c (handle_v_requests): Support s and S actions
3404 if target_supports_software_single_step return true.
3405
3406 2016-07-21 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3409 is resume_step, call maybe_hw_step.
3410 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3411 and unstop them.
3412 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3413 breakpoints or not.
3414 (proceed_one_lwp): If resume request is resume_step, install
3415 reinsert breakpoints and call maybe_hw_step.
3416
3417 2016-07-21 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-low.c (proceed_one_lwp): Declare.
3420 (linux_resume_one_thread): Remove local variable 'step'.
3421 Lift code enqueue signal. Call proceed_one_lwp instead of
3422 linux_resume_one_lwp.
3423
3424 2016-07-21 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-low.c (linux_resume_one_thread): Call
3427 enqueue_pending_signal.
3428
3429 2016-07-21 Yao Qi <yao.qi@linaro.org>
3430
3431 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3432 * inferiors.c (do_restore_current_thread_cleanup): New function.
3433 (make_cleanup_restore_current_thread): Likewise.
3434 * linux-low.c (install_software_single_step_breakpoints): Call
3435 make_cleanup_restore_current_thread. Switch current_thread to
3436 thread.
3437
3438 2016-07-21 Yao Qi <yao.qi@linaro.org>
3439
3440 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3441 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3442 (clone_one_breakpoint): Likewise.
3443 (delete_reinsert_breakpoints): Change parameter to thread.
3444 Callers updated.
3445 (has_reinsert_breakpoints): Likewise.
3446 (uninsert_reinsert_breakpoints): Likewise.
3447 (reinsert_reinsert_breakpoints): Likewise.
3448 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3449 (delete_reinsert_breakpoints): Likewise.
3450 (reinsert_reinsert_breakpoints): Likewise.
3451 (uninsert_reinsert_breakpoints): Likewise.
3452 (has_reinsert_breakpoints): Likewise.
3453
3454 2016-07-21 Yao Qi <yao.qi@linaro.org>
3455
3456 * inferiors.c (get_thread_process): Make parameter const.
3457 * inferiors.h (get_thread_process): Update declaration.
3458 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3459 Add new parameters child_thread and parent_thread. Callers
3460 updated.
3461 * mem-break.h (clone_all_breakpoints): Update declaration.
3462
3463 2016-07-21 Yao Qi <yao.qi@linaro.org>
3464
3465 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3466 <command_list, handler>: Remove.
3467 (struct gdb_breakpoint): New.
3468 (struct other_breakpoint): New.
3469 (struct reinsert_breakpoint): New.
3470 (is_gdb_breakpoint): New function.
3471 (any_persistent_commands): Update command_list if
3472 is_gdb_breakpoint returns true.
3473 (set_breakpoint): Create breakpoints according to their types.
3474 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3475 (set_gdb_breakpoint_1): Likewise.
3476 (set_gdb_breakpoint): Likewise.
3477 (clear_breakpoint_conditions): Change parameter type to
3478 'struct gdb_breakpoint *'.
3479 (clear_breakpoint_commands): Likewise.
3480 (clear_breakpoint_conditions_and_commands): Likewise.
3481 (add_condition_to_breakpoint): Likewise.
3482 (add_breakpoint_condition): Likewise.
3483 (add_commands_to_breakpoint): Likewise.
3484 (check_breakpoints): Check other_breakpoint.
3485 (clone_one_breakpoint): Clone breakpopint according to its type.
3486 * mem-break.h (struct gdb_breakpoint): Declare.
3487 (set_gdb_breakpoint): Update declaration.
3488 (clear_breakpoint_conditions_and_commands): Likewise.
3489 (add_breakpoint_condition): Likewise.
3490 (add_breakpoint_commands): Likewise.
3491 * server.c (process_point_options): Change parameter type to
3492 'struct gdb_breakpoint *'.
3493
3494 2016-07-21 Yao Qi <yao.qi@linaro.org>
3495
3496 * mem-break.c (set_breakpoint_at): Rename it to ...
3497 (set_breakpoint_type_at): ... it.
3498 (set_breakpoint_at): Call set_breakpoint_type_at.
3499 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3500 * mem-break.h (set_breakpoint_at): Update comments.
3501
3502 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3503
3504 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3505 to buf parameter.
3506 (nios2_store_gregset): Likewise.
3507
3508 2016-07-01 Pedro Alves <palves@redhat.com>
3509 Antoine Tremblay <antoine.tremblay@ericsson.com>
3510
3511 * linux-low.c: Change interface to take the target lwp_info
3512 pointer directly and return void. Handle detaching from a zombie
3513 thread.
3514 (linux_detach_lwp_callback): New function.
3515 (linux_detach): Detach from the leader thread after detaching from
3516 the clone threads.
3517
3518 2016-06-28 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3521 for variable new_offset.
3522 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3523 (aarch64_ftrace_insn_reloc_cb): Likewise.
3524 (aarch64_ftrace_insn_reloc_tb): Likewise.
3525 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3526 PRIx64 instead of PRIx32.
3527
3528 2016-06-28 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3531 (the_low_target): Install arm_get_syscall_trapinfo.
3532
3533 2016-06-28 Yao Qi <yao.qi@linaro.org>
3534
3535 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3536 function.
3537 (the_low_target): Install aarch64_get_syscall_trapinfo.
3538
3539 2016-06-28 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3542 Callers updated.
3543 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3544 Remove parameter sysno.
3545 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3546 sysret.
3547
3548 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3549
3550 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3551 (s390_emit_ne_goto): Likewise.
3552 (s390_emit_lt_goto): Likewise.
3553 (s390_emit_le_goto): Likewise.
3554 (s390_emit_gt_goto): Likewise.
3555 (s390_emit_ge_goto): Likewise.
3556 (s390x_emit_eq_goto): Likewise.
3557 (s390x_emit_ne_goto): Likewise.
3558 (s390x_emit_lt_goto): Likewise.
3559 (s390x_emit_le_goto): Likewise.
3560 (s390x_emit_gt_goto): Likewise.
3561 (s390x_emit_ge_goto): Likewise.
3562 (s390_emit_ops_impl): Mark variable static.
3563 (s390x_emit_ops): Likewise.
3564
3565 2016-06-17 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-low.c (handle_extended_wait): Call
3568 uninsert_reinsert_breakpoints for the parent process. Remove
3569 reinsert breakpoints from the child process. Reinsert them to
3570 the parent process when vfork is done.
3571 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3572 (reinsert_reinsert_breakpoints): New function.
3573 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3574 (reinsert_reinsert_breakpoints): Declare.
3575
3576 2016-06-17 Yao Qi <yao.qi@linaro.org>
3577
3578 * linux-low.c (handle_extended_wait): If the parent is doing
3579 step-over, remove the reinsert breakpoints from the forked child.
3580
3581 2016-06-17 Yao Qi <yao.qi@linaro.org>
3582
3583 * linux-low.c (unsuspend_all_lwps): Declare.
3584 (linux_low_filter_event): If thread exited, call finish_step_over.
3585 If step-over is finished, unsuspend other threads.
3586
3587 2016-06-17 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-low.c (linux_resume_one_lwp_throw): Assert
3590 has_reinsert_breakpoints returns false.
3591 * mem-break.c (delete_disabled_breakpoints): Assert
3592 bp type isn't reinsert_breakpoint.
3593
3594 2016-06-17 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-low.c (maybe_hw_step): New function.
3597 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3598 (finish_step_over): Switch current_thread to lwp temporarily,
3599 and assert has_reinsert_breakpoints returns true.
3600 (proceed_one_lwp): Call maybe_hw_step.
3601 * mem-break.c (has_reinsert_breakpoints): New function.
3602 * mem-break.h (has_reinsert_breakpoints): Declare.
3603
3604 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3605
3606 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3607
3608 2016-05-17 Yao Qi <yao.qi@linaro.org>
3609
3610 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3611 instead of find_inferior.
3612
3613 2016-05-05 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3616 Initialize res to zero.
3617
3618 2016-05-05 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3621 to uint32_t.
3622
3623 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3624
3625 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3626 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3627 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3628
3629 2016-04-28 Par Olsson <par.olsson@windriver.com>
3630 Simon Marchi <simon.marchi@ericsson.com>
3631
3632 * tracepoint.c (write_inferior_int8): New function.
3633 (cmd_qtenable_disable): Write enable flag using
3634 write_inferior_int8.
3635
3636 2016-04-25 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3639 (need_step_over_p): Return zero if the LWP has pending signals
3640 can be delivered on software single step target.
3641
3642 2016-04-25 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3645 return instead of error.
3646
3647 2016-04-22 Yao Qi <yao.qi@linaro.org>
3648
3649 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3650 to 23.
3651
3652 2016-04-22 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3655 signal when stepping over breakpoint with software single
3656 step.
3657
3658 2016-04-21 Pedro Alves <palves@redhat.com>
3659
3660 * linux-s390-low.c (s390_collect_ptrace_register)
3661 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3662 add casts.
3663 (s390_check_regset): Use void * instead of gdb_byte *.
3664
3665 2016-04-20 Pedro Alves <palves@redhat.com>
3666
3667 * configure: Renegerate.
3668
3669 2016-04-20 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3672 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3673 number 16.
3674 (arm_store_gregset): Likewise.
3675
3676 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3677
3678 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3679 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3680 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3681 (amd64-avx-mpx-linux.c): New rules.
3682 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3683 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3684 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3685 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3686 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3687 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3688 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3689 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3690 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3691 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3692 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3693 * linux-x86-low.c (x86_linux_read_description): Add case for
3694 X86_XSTATE_AVX_MPX_MASK.
3695 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3696 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3697 init_registers_i386_avx_mpx_linux.
3698 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3699 (initialize_low_tracepoint): Call
3700 init_registers_i386_avx_mpx_linux.
3701 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3702 (initialize_low_tracepoint): Call
3703 init_registers_amd64_avx_mpx_linux.
3704 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3705 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3706 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3707 declarations.
3708
3709 2016-04-18 Pedro Alves <palves@redhat.com>
3710
3711 * configure: Regenerate.
3712
3713 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3714
3715 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3716 (aarch64_emit_sub): Likewise.
3717
3718 2016-04-12 Pedro Alves <palves@redhat.com>
3719
3720 * utils.c (prepare_to_throw_exception): Delete.
3721
3722 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3723
3724 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3725
3726 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3727
3728 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3729
3730 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3731
3732 * linux-aarch64-ipa.c: Add <elf.h> include.
3733 * linux-ppc-ipa.c: Add <elf.h> include.
3734 * linux-s390-ipa.c: Add <elf.h> include.
3735
3736 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3737
3738 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3739 (get_raw_reg_ptr): Likewise.
3740 (get_trace_state_variable_value_ptr): Likewise.
3741 (set_trace_state_variable_value_ptr): Likewise.
3742 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3743 char *.
3744
3745 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3746 Marcin Kościelnicki <koriakin@0x04.net>
3747
3748 PR/17221
3749 * linux-ppc-low.c (emit_insns): New function.
3750 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3751 (ppc_emit_prologue): New function.
3752 (ppc_emit_epilogue): New function.
3753 (ppc_emit_add): New function.
3754 (ppc_emit_sub): New function.
3755 (ppc_emit_mul): New function.
3756 (ppc_emit_lsh): New function.
3757 (ppc_emit_rsh_signed): New function.
3758 (ppc_emit_rsh_unsigned): New function.
3759 (ppc_emit_ext): New function.
3760 (ppc_emit_zero_ext): New function.
3761 (ppc_emit_log_not): New function.
3762 (ppc_emit_bit_and): New function.
3763 (ppc_emit_bit_or): New function.
3764 (ppc_emit_bit_xor): New function.
3765 (ppc_emit_bit_not): New function.
3766 (ppc_emit_equal): New function.
3767 (ppc_emit_less_signed): New function.
3768 (ppc_emit_less_unsigned): New function.
3769 (ppc_emit_ref): New function.
3770 (ppc_emit_const): New function.
3771 (ppc_emit_reg): New function.
3772 (ppc_emit_pop): New function.
3773 (ppc_emit_stack_flush): New function.
3774 (ppc_emit_swap): New function.
3775 (ppc_emit_stack_adjust): New function.
3776 (ppc_emit_call): New function.
3777 (ppc_emit_int_call_1): New function.
3778 (ppc_emit_void_call_2): New function.
3779 (ppc_emit_if_goto): New function.
3780 (ppc_emit_goto): New function.
3781 (ppc_emit_eq_goto): New function.
3782 (ppc_emit_ne_goto): New function.
3783 (ppc_emit_lt_goto): New function.
3784 (ppc_emit_le_goto): New function.
3785 (ppc_emit_gt_goto): New function.
3786 (ppc_emit_ge_goto): New function.
3787 (ppc_write_goto_address): New function.
3788 (ppc_emit_ops_impl): New static variable.
3789 (ppc64v1_emit_prologue): New function.
3790 (ppc64v2_emit_prologue): New function.
3791 (ppc64_emit_epilogue): New function.
3792 (ppc64_emit_add): New function.
3793 (ppc64_emit_sub): New function.
3794 (ppc64_emit_mul): New function.
3795 (ppc64_emit_lsh): New function.
3796 (ppc64_emit_rsh_signed): New function.
3797 (ppc64_emit_rsh_unsigned): New function.
3798 (ppc64_emit_ext): New function.
3799 (ppc64_emit_zero_ext): New function.
3800 (ppc64_emit_log_not): New function.
3801 (ppc64_emit_bit_and): New function.
3802 (ppc64_emit_bit_or): New function.
3803 (ppc64_emit_bit_xor): New function.
3804 (ppc64_emit_bit_not): New function.
3805 (ppc64_emit_equal): New function.
3806 (ppc64_emit_less_signed): New function.
3807 (ppc64_emit_less_unsigned): New function.
3808 (ppc64_emit_ref): New function.
3809 (ppc64_emit_const): New function.
3810 (ppc64v1_emit_reg): New function.
3811 (ppc64v2_emit_reg): New function.
3812 (ppc64_emit_pop): New function.
3813 (ppc64_emit_stack_flush): New function.
3814 (ppc64_emit_swap): New function.
3815 (ppc64v1_emit_call): New function.
3816 (ppc64v2_emit_call): New function.
3817 (ppc64v1_emit_int_call_1): New function.
3818 (ppc64v2_emit_int_call_1): New function.
3819 (ppc64v1_emit_void_call_2): New function.
3820 (ppc64v2_emit_void_call_2): New function.
3821 (ppc64_emit_if_goto): New function.
3822 (ppc64_emit_eq_goto): New function.
3823 (ppc64_emit_ne_goto): New function.
3824 (ppc64_emit_lt_goto): New function.
3825 (ppc64_emit_le_goto): New function.
3826 (ppc64_emit_gt_goto): New function.
3827 (ppc64_emit_ge_goto): New function.
3828 (ppc64v1_emit_ops_impl): New static variable.
3829 (ppc64v2_emit_ops_impl): New static variable.
3830 (ppc_emit_ops): New function.
3831 (linux_low_target): Wire in ppc_emit_ops.
3832
3833 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3834 Marcin Kościelnicki <koriakin@0x04.net>
3835
3836 PR/17221
3837 * Makefile.in: Add powerpc-*-ipa.o
3838 * configure.srv: Add ipa_obj for powerpc*-linux.
3839 * linux-ppc-ipa.c: New file.
3840 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3841 includes.
3842 (PPC_FIELD): New macro.
3843 (PPC_SEXT): New macro.
3844 (PPC_OP6): New macro.
3845 (PPC_BO): New macro.
3846 (PPC_LI): New macro.
3847 (PPC_BD): New macro.
3848 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3849 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3850 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3851 (ppc_get_thread_area): New function.
3852 (is_elfv2_inferior): New function.
3853 (gen_ds_form): New function.
3854 (GEN_STD): New macro.
3855 (GEN_STDU): New macro.
3856 (GEN_LD): New macro.
3857 (GEN_LDU): New macro.
3858 (gen_d_form): New function.
3859 (GEN_ADDI): New macro.
3860 (GEN_ADDIS): New macro.
3861 (GEN_LI): New macro.
3862 (GEN_LIS): New macro.
3863 (GEN_ORI): New macro.
3864 (GEN_ORIS): New macro.
3865 (GEN_LWZ): New macro.
3866 (GEN_STW): New macro.
3867 (GEN_STWU): New macro.
3868 (gen_xfx_form): New function.
3869 (GEN_MFSPR): New macro.
3870 (GEN_MTSPR): New macro.
3871 (GEN_MFCR): New macro.
3872 (GEN_MTCR): New macro.
3873 (GEN_SYNC): New macro.
3874 (GEN_LWSYNC): New macro.
3875 (gen_x_form): New function.
3876 (GEN_OR): New macro.
3877 (GEN_MR): New macro.
3878 (GEN_LWARX): New macro.
3879 (GEN_STWCX): New macro.
3880 (GEN_CMPW): New macro.
3881 (gen_md_form): New function.
3882 (GEN_RLDICL): New macro.
3883 (GEN_RLDICR): New macro.
3884 (gen_i_form): New function.
3885 (GEN_B): New macro.
3886 (GEN_BL): New macro.
3887 (gen_b_form): New function.
3888 (GEN_BNE): New macro.
3889 (GEN_LOAD): New macro.
3890 (GEN_STORE): New macro.
3891 (gen_limm): New function.
3892 (gen_atomic_xchg): New function.
3893 (gen_call): New function.
3894 (ppc_relocate_instruction): New function.
3895 (ppc_install_fast_tracepoint_jump_pad): New function.
3896 (ppc_get_min_fast_tracepoint_insn_len): New function.
3897 (ppc_get_ipa_tdesc_idx): New function.
3898 (the_low_target): Wire in the new functions.
3899 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3900 tdescs.
3901 * linux-ppc-tdesc.h: New file.
3902
3903 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3904
3905 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3906 (alloc_jump_pad_buffer): New function.
3907 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3908 (alloc_jump_pad_buffer): New function.
3909 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3910 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3911 (alloc_jump_pad_buffer): New function.
3912 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3913 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3914 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3915 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3916
3917 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3918
3919 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3920 * linux-amd64-ipa.c: Likewise.
3921 * linux-i386-ipa.c: Likewise.
3922 * linux-s390-ipa.c: Likewise.
3923 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3924 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3925 set_trace_state_variable_value_ptr.
3926 (struct ipa_sym_addresses): Likewise.
3927 (symbol_list): Likewise.
3928 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3929 accessing gdb_collect directly.
3930 (gdb_collect_ptr_type): New typedef.
3931 (get_raw_reg_ptr_type): New typedef.
3932 (get_trace_state_variable_value_ptr_type): New typedef.
3933 (set_trace_state_variable_value_ptr_type): New typedef.
3934 (gdb_collect_ptr): New global.
3935 (get_raw_reg_ptr): New global.
3936 (get_trace_state_variable_value_ptr): New global.
3937 (set_trace_state_variable_value_ptr): New global.
3938 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3939 accessing get_raw_reg directly.
3940 (get_get_tsv_func_addr): Likewise for
3941 get_trace_state_variable_value_ptr.
3942 (get_set_tsv_func_addr): Likewise for
3943 set_trace_state_variable_value_ptr.
3944 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3945
3946 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3947
3948 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3949
3950 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3951
3952 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3953 packets.
3954 (relocate_instruction): Remove own_buf.
3955 * server.c (own_buf): Make global.
3956 (handle_v_requests): Make global.
3957 * server.h (own_buf): New declaration.
3958 (handle_v_requests): New prototype.
3959
3960 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3961
3962 PR 18377
3963 * linux-s390-low.c (add_insns): New function.
3964 (s390_emit_prologue): New function.
3965 (s390_emit_epilogue): New function.
3966 (s390_emit_add): New function.
3967 (s390_emit_sub): New function.
3968 (s390_emit_mul): New function.
3969 (s390_emit_lsh): New function.
3970 (s390_emit_rsh_signed): New function.
3971 (s390_emit_rsh_unsigned): New function.
3972 (s390_emit_ext): New function.
3973 (s390_emit_log_not): New function.
3974 (s390_emit_bit_and): New function.
3975 (s390_emit_bit_or): New function.
3976 (s390_emit_bit_xor): New function.
3977 (s390_emit_bit_not): New function.
3978 (s390_emit_equal): New function.
3979 (s390_emit_less_signed): New function.
3980 (s390_emit_less_unsigned): New function.
3981 (s390_emit_ref): New function.
3982 (s390_emit_if_goto): New function.
3983 (s390_emit_goto): New function.
3984 (s390_write_goto_address): New function.
3985 (s390_emit_litpool): New function.
3986 (s390_emit_const): New function.
3987 (s390_emit_call): New function.
3988 (s390_emit_reg): New function.
3989 (s390_emit_pop): New function.
3990 (s390_emit_stack_flush): New function.
3991 (s390_emit_zero_ext): New function.
3992 (s390_emit_swap): New function.
3993 (s390_emit_stack_adjust): New function.
3994 (s390_emit_set_r2): New function.
3995 (s390_emit_int_call_1): New function.
3996 (s390_emit_void_call_2): New function.
3997 (s390_emit_eq_goto): New function.
3998 (s390_emit_ne_goto): New function.
3999 (s390_emit_lt_goto): New function.
4000 (s390_emit_le_goto): New function.
4001 (s390_emit_gt_goto): New function.
4002 (s390_emit_ge_goto): New function.
4003 (s390x_emit_prologue): New function.
4004 (s390x_emit_epilogue): New function.
4005 (s390x_emit_add): New function.
4006 (s390x_emit_sub): New function.
4007 (s390x_emit_mul): New function.
4008 (s390x_emit_lsh): New function.
4009 (s390x_emit_rsh_signed): New function.
4010 (s390x_emit_rsh_unsigned): New function.
4011 (s390x_emit_ext): New function.
4012 (s390x_emit_log_not): New function.
4013 (s390x_emit_bit_and): New function.
4014 (s390x_emit_bit_or): New function.
4015 (s390x_emit_bit_xor): New function.
4016 (s390x_emit_bit_not): New function.
4017 (s390x_emit_equal): New function.
4018 (s390x_emit_less_signed): New function.
4019 (s390x_emit_less_unsigned): New function.
4020 (s390x_emit_ref): New function.
4021 (s390x_emit_if_goto): New function.
4022 (s390x_emit_const): New function.
4023 (s390x_emit_call): New function.
4024 (s390x_emit_reg): New function.
4025 (s390x_emit_pop): New function.
4026 (s390x_emit_stack_flush): New function.
4027 (s390x_emit_zero_ext): New function.
4028 (s390x_emit_swap): New function.
4029 (s390x_emit_stack_adjust): New function.
4030 (s390x_emit_int_call_1): New function.
4031 (s390x_emit_void_call_2): New function.
4032 (s390x_emit_eq_goto): New function.
4033 (s390x_emit_ne_goto): New function.
4034 (s390x_emit_lt_goto): New function.
4035 (s390x_emit_le_goto): New function.
4036 (s390x_emit_gt_goto): New function.
4037 (s390x_emit_ge_goto): New function.
4038 (s390_emit_ops): New function.
4039 (struct linux_target_ops): Fill in emit_ops hook.
4040
4041 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4042
4043 PR 18377
4044 * Makefile.in: Add s390 IPA files.
4045 * configure.srv: Build IPA for s390.
4046 * linux-s390-ipa.c: New file.
4047 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4048 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4049 (tdesc_s390_linux32): Likewise.
4050 (init_registers_s390_linux32v1): Likewise.
4051 (tdesc_s390_linux32v1): Likewise.
4052 (init_registers_s390_linux32v2): Likewise.
4053 (tdesc_s390_linux32v2): Likewise.
4054 (init_registers_s390_linux64): Likewise.
4055 (tdesc_s390_linux64): Likewise.
4056 (init_registers_s390_linux64v1): Likewise.
4057 (tdesc_s390_linux64v1): Likewise.
4058 (init_registers_s390_linux64v2): Likewise.
4059 (tdesc_s390_linux64v2): Likewise.
4060 (init_registers_s390_te_linux64): Likewise.
4061 (tdesc_s390_te_linux64): Likewise.
4062 (init_registers_s390_vx_linux64): Likewise.
4063 (tdesc_s390_vx_linux64): Likewise.
4064 (init_registers_s390_tevx_linux64): Likewise.
4065 (tdesc_s390_tevx_linux64): Likewise.
4066 (init_registers_s390x_linux64): Likewise.
4067 (tdesc_s390x_linux64): Likewise.
4068 (init_registers_s390x_linux64v1): Likewise.
4069 (tdesc_s390x_linux64v1): Likewise.
4070 (init_registers_s390x_linux64v2): Likewise.
4071 (tdesc_s390x_linux64v2): Likewise.
4072 (init_registers_s390x_te_linux64): Likewise.
4073 (tdesc_s390x_te_linux64): Likewise.
4074 (init_registers_s390x_vx_linux64): Likewise.
4075 (tdesc_s390x_vx_linux64): Likewise.
4076 (init_registers_s390x_tevx_linux64): Likewise.
4077 (tdesc_s390x_tevx_linux64): Likewise.
4078 (have_hwcap_s390_vx): New static variable.
4079 (s390_arch_setup): Fill have_hwcap_s390_vx.
4080 (s390_get_thread_area): New function.
4081 (s390_ft_entry_gpr_esa): New const.
4082 (s390_ft_entry_gpr_zarch): New const.
4083 (s390_ft_entry_misc): New const.
4084 (s390_ft_entry_fr): New const.
4085 (s390_ft_entry_vr): New const.
4086 (s390_ft_main_31): New const.
4087 (s390_ft_main_64): New const.
4088 (s390_ft_exit_fr): New const.
4089 (s390_ft_exit_vr): New const.
4090 (s390_ft_exit_misc): New const.
4091 (s390_ft_exit_gpr_esa): New const.
4092 (s390_ft_exit_gpr_zarch): New const.
4093 (append_insns): New function.
4094 (s390_relocate_instruction): New function.
4095 (s390_install_fast_tracepoint_jump_pad): New function.
4096 (s390_get_min_fast_tracepoint_insn_len): New function.
4097 (s390_get_ipa_tdesc_idx): New function.
4098 (struct linux_target_ops): Wire in the above functions.
4099 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4100 * linux-s390-tdesc.h: New file.
4101
4102 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4103
4104 * linux-s390-low.c (s390_supports_tracepoints): New function.
4105 (struct linux_target_ops): Fill supports_tracepoints hook.
4106
4107 2016-03-18 Yao Qi <yao.qi@linaro.org>
4108
4109 * linux-low.c (lwp_signal_can_be_delivered): New function.
4110 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4111
4112 2016-03-18 Yao Qi <yao.qi@linaro.org>
4113
4114 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4115 0 if signal is enqueued. Remove 'signal' from one debugging
4116 message. Move one debugging message to some lines below.
4117 Remove code setting 'signal' to 0.
4118
4119 2016-03-18 Yao Qi <yao.qi@linaro.org>
4120
4121 * linux-low.c (linux_low_filter_event): Remove redundant
4122 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4123
4124 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4125
4126 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4127 (struct linux_target_ops): Wire in the above.
4128
4129 2016-03-03 Yao Qi <yao.qi@linaro.org>
4130
4131 * linux-low.c: Update comments to start_step_over.
4132
4133 2016-03-03 Yao Qi <yao.qi@linaro.org>
4134
4135 PR server/19736
4136 * linux-low.c (handle_extended_wait): Set child suspended
4137 if event_lwp->bp_reinsert isn't zero.
4138
4139 2016-03-02 Yao Qi <yao.qi@linaro.org>
4140
4141 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4142 enqueue_pending_signal.
4143
4144 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4145
4146 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4147 is actually loaded.
4148
4149 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4150
4151 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4152 (s390_regmap_3264) [!__s390x__]: New global.
4153 (s390_collect_ptrace_register): Skip map entries containing -1.
4154 (s390_supply_ptrace_register): Ditto.
4155 (s390_fill_gprs_high): New function.
4156 (s390_store_gprs_high): New function.
4157 (s390_regsets): Add NT_S390_HIGH_GPRS.
4158 (s390_get_hwcap): Enable on 31-bit.
4159 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4160 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4161 Detect NT_S390_HIGH_GPRS.
4162 (s390_usrregs_info_3264): Enable on 31-bit.
4163 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4164 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4165
4166 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4167
4168 PR gdb/13808
4169 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4170 * configure.srv: Ditto.
4171 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4172 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4173 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4174 (init_registers_amd64_linux): Remove prototype.
4175 (tdesc_amd64_linux): Remove declaration.
4176 (get_ipa_tdesc): New function.
4177 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4178 initialize remaining tdescs.
4179 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4180 (init_registers_i386_linux): Remove prototype.
4181 (tdesc_i386_linux): Remove declaration.
4182 (get_ipa_tdesc): New function.
4183 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4184 initialize remaining tdescs.
4185 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4186 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4187 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4188 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4189 (x86_get_ipa_tdesc_idx): New function.
4190 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4191 * linux-x86-tdesc.h: New file.
4192 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4193 (target_get_ipa_tdesc_idx): New macro.
4194 * tracepoint.c (ipa_tdesc_idx): New macro.
4195 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4196 (symbol_list): Add ipa_tdesc_idx.
4197 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4198 (ipa_tdesc): Remove.
4199 (ipa_tdesc_idx): New variable.
4200 (get_context_regcache): Use get_ipa_tdesc.
4201 (gdb_collect): Ditto.
4202 (gdb_probe): Ditto.
4203 * tracepoint.h (get_ipa_tdesc): New prototype.
4204 (ipa_tdesc): Remove.
4205
4206 2016-02-24 Pedro Alves <palves@redhat.com>
4207
4208 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4209 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4210 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4211 Factor out common code between the USE_SIGTRAP_SIGINFO and
4212 !USE_SIGTRAP_SIGINFO blocks.
4213 (linux_low_filter_event): Call save_stop_reason instead of
4214 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4215 Update comments.
4216 (linux_wait_1): Update comments.
4217
4218 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4219
4220 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4221 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4222 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4223 ppc_insert_point, ppc_remove_point.
4224
4225 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4226
4227 * linux-s390-low.c (s390_supports_z_point_type): New function.
4228 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4229
4230 2016-02-16 Yao Qi <yao.qi@linaro.org>
4231
4232 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4233 PC. Get pc from regcache_read_pc.
4234
4235 2016-02-12 Yao Qi <yao.qi@linaro.org>
4236
4237 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4238 or linux_get_pc_32bit.
4239 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4240
4241 2016-02-12 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4244 arm_linux_get_next_pcs_fixup.
4245
4246 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4247
4248 * tracepoint.c (x_tracepoint_action_download): Change
4249 write_inferior_data_ptr to write_inferior_data_pointer.
4250 (cmd_qtstart): Likewise.
4251 (write_inferior_data_ptr): Remove.
4252 (download_agent_expr): Change write_inferior_data_ptr to
4253 write_inferior_data_pointer.
4254 (download_tracepoint_1): Likewise.
4255 (download_tracepoint): Likewise.
4256 (download_trace_state_variables): Likewise.
4257
4258 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4259 Marcin Kościelnicki <koriakin@0x04.net>
4260
4261 * tracepoint.c (struct tracepoint_action_ops): Remove.
4262 (struct tracepoint_action): Remove ops.
4263 (m_tracepoint_action_download, r_tracepoint_action_download)
4264 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4265 size and offset accordingly.
4266 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4267 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4268 (tracepoint_action_send, tracepoint_action_download): New functions.
4269 Helpers for trace action handlers.
4270 (add_tracepoint_action): Remove setup actions ops.
4271 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4272
4273 2016-02-10 Yao Qi <yao.qi@linaro.org>
4274
4275 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4276
4277 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4278
4279 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4280 to AC_OUTPUT.
4281 * configure: Regenerate.
4282
4283 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4284
4285 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4286 void * to gdb_byte *.
4287 * linux-low.c (siginfo_fixup): Likewise.
4288 (linux_xfer_siginfo): Likewise.
4289 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4290 Likewise.
4291 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4292
4293 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4294
4295 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4296 to srv_tgtobj.
4297 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4298 to srv_tgtobj.
4299 * linux-x86-low.c [__x86_64__]: Include
4300 "nat/amd64-linux-siginfo.h".
4301 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4302 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4303 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4304 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4305 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4306 (cpt_si_fd, si_timerid, si_overrun): Move from
4307 nat/amd64-linux-siginfo.c.
4308 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4309
4310 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4311
4312 * server.c (skip_to_semicolon): Remove.
4313 (process_point_options): Use strchrnul instead of
4314 skip_to_semicolon.
4315
4316 2016-01-26 Yao Qi <yao.qi@linaro.org>
4317
4318 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4319 * linux-low.c (install_software_single_step_breakpoints): Don't
4320 call regcache_read_pc.
4321 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4322 argument pc.
4323
4324 2016-01-26 Yao Qi <yao.qi@linaro.org>
4325
4326 * linux-low.c (install_software_single_step_breakpoints): Call
4327 regcache_read_pc instead of get_pc.
4328
4329 2016-01-26 Yao Qi <yao.qi@linaro.org>
4330
4331 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4332 (unblock_async_io): Rename to ...
4333 (block_unblock_async_io): ... it. New function.
4334 (enable_async_io): Don't install SIGIO handler. Unblock it
4335 instead.
4336 (disable_async_io): Don't ignore SIGIO. Block it instead.
4337 (initialize_async_io): Install SIGIO handler. Don't call
4338 unblock_async_io.
4339
4340 2016-01-26 Yao Qi <yao.qi@linaro.org>
4341
4342 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4343 first character is '\003', call *the_target->request_interrupt.
4344
4345 2016-01-25 Yao Qi <yao.qi@linaro.org>
4346
4347 * remote-utils.c (new_thread_notify): Remove.
4348 (dead_thread_notify): Likewise.
4349 * remote-utils.h (new_thread_notify): Remove declaration.
4350 (dead_thread_notify): Likewise.
4351
4352 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4353
4354 * gdb.trace/pending.exp: Fix expected message on continue.
4355
4356 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4357
4358 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4359 it works properly on big-endian machines where sizeof (CORE_ADDR)
4360 != sizeof (void *).
4361
4362 2016-01-21 Pedro Alves <palves@redhat.com>
4363
4364 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4365 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4366 * configure: Regenerate.
4367
4368 2016-01-21 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4371 is_thumb and set it according to CPSR saved on the stack.
4372 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4373 arm_sigreturn_next_pc.
4374
4375 2016-01-18 Yao Qi <yao.qi@linaro.org>
4376
4377 * linux-low.c (linux_set_pc_64bit): New function.
4378 (linux_get_pc_64bit): New function.
4379 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4380 Declare.
4381 * linux-sparc-low.c (debug_threads): Remove declaration.
4382 (sparc_get_pc): Remove.
4383 (the_low_target): Use linux_get_pc_64bit instead of
4384 sparc_get_pc.
4385 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4386 (the_low_target): Use linux_get_pc_64bit and
4387 linux_set_pc_64bit.
4388
4389 2016-01-18 Yao Qi <yao.qi@linaro.org>
4390
4391 * linux-arm-low.c (debug_threads): Remove declaration.
4392 (arm_get_pc, arm_set_pc): Remove.
4393 (the_low_target): Use linux_get_pc_32bit and
4394 linux_set_pc_32bit.
4395 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4396 (the_low_target): Use linux_get_pc_32bit and
4397 linux_set_pc_32bit.
4398 * linux-cris-low.c (debug_threads): Remove declaration.
4399 (cris_get_pc, cris_set_pc,): Remove.
4400 (the_low_target): Use linux_get_pc_32bit and
4401 linux_set_pc_32bit.
4402 * linux-crisv32-low.c (debug_threads): Remove declaration.
4403 (cris_get_pc, cris_set_pc): Remove.
4404 (the_low_target): Use linux_get_pc_32bit and
4405 linux_set_pc_32bit.
4406 * linux-low.c: Include inttypes.h.
4407 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4408 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4409 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4410 (the_low_target): Use linux_get_pc_32bit and
4411 linux_set_pc_32bit.
4412 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4413 (the_low_target): Use linux_get_pc_32bit and
4414 linux_set_pc_32bit.
4415 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4416 (the_low_target): Use linux_get_pc_32bit and
4417 linux_set_pc_32bit.
4418 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4419 (the_low_target): Use linux_get_pc_32bit and
4420 linux_set_pc_32bit.
4421 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4422 (the_low_target): Use linux_get_pc_32bit and
4423 linux_set_pc_32bit.
4424
4425 2016-01-18 Gary Benson <gbenson@redhat.com>
4426
4427 * configure.ac (AC_FUNC_FORK): New check.
4428 * config.in: Regenerate.
4429 * configure: Likewise.
4430
4431 2016-01-14 Yao Qi <yao.qi@linaro.org>
4432
4433 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4434 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4435 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4436 arm_get_next_pcs_ctor.
4437
4438 2016-01-12 Josh Stone <jistone@redhat.com>
4439 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4440
4441 * inferiors.h: Include "gdb_vecs.h".
4442 (struct process_info): Add syscalls_to_catch.
4443 * inferiors.c (remove_process): Free syscalls_to_catch.
4444 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4445 syscall_return stops.
4446 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4447 * server.c (handle_general_set): Handle QCatchSyscalls.
4448 (handle_query): Report support for QCatchSyscalls.
4449 * target.h (struct target_ops): Add supports_catch_syscall.
4450 (target_supports_catch_syscall): New macro.
4451 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4452 (struct lwp_info): Add syscall_state.
4453 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4454 Maintain syscall_state and syscalls_to_catch across exec.
4455 (get_syscall_trapinfo): New function, proxy to the_low_target.
4456 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4457 (linux_low_filter_event): Toggle syscall_state entry/return for
4458 syscall traps, and set it ignored for all others.
4459 (gdb_catching_syscalls_p): New function.
4460 (gdb_catch_this_syscall_p): New function.
4461 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4462 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4463 (linux_supports_catch_syscall): New function.
4464 (linux_target_ops): Install it.
4465 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4466 (the_low_target): Install it.
4467
4468 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4469
4470 * acinclude.m4: Include new ../warning.m4 file.
4471 * configure: Regenerated.
4472 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4473
4474 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4475
4476 * ax.c (is_goto_target): Mark static.
4477 * linux-low.c (register_addr): Likewise.
4478 (linux_fetch_registers, linux_store_registers): Likewise.
4479 * mem-break.c (any_persistent_commands): Fix old prototype.
4480 (add_commands_to_breakpoint): Mark static.
4481 * regcache.c (find_register_by_name): Delete unused func.
4482 * remote-utils.c (hex_or_minus_one): Mark static.
4483 * server.c (monitor_show_help): Mark static.
4484 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4485 handle_v_requests): Likewise.
4486
4487 2016-01-12 Pedro Alves <palves@redhat.com>
4488
4489 Remove use of the registered trademark symbol throughout.
4490
4491 2016-01-08 Yao Qi <yao.qi@linaro.org>
4492
4493 * remote-utils.c (getpkt): If c is '\003', call target hook
4494 request_interrupt.
4495
4496 2016-01-06 Yao Qi <yao.qi@linaro.org>
4497
4498 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4499 linux-aarch32-low.c.
4500 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4501 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4502 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4503 (thumb2_breakpoint): Declare.
4504 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4505 linux-aarch32-low.h.
4506 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4507 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4508 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4509
4510 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4511
4512 * gdbreplay.c (gdbreplay_version): Change copyright year in
4513 version message.
4514 * server.c (gdbserver_version): Likewise.
4515
4516 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4517
4518 * server.c (crc32_table): Delete.
4519 (crc32): Use libiberty's xcrc32 function.
4520
4521 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4522
4523 * lynx-low.c (lynx_delete_thread_callback): New function.
4524 (lynx_mourn): Properly delete our process and all of its
4525 threads. Remove call to clear_inferiors.
4526
4527 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4528
4529 * target.c (thread_search_callback): Add check that
4530 the thread_stopped target callback is not NULL before
4531 calling it.
4532
4533 2015-12-21 Yao Qi <yao.qi@linaro.org>
4534
4535 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4536 arm breakpoint.
4537
4538 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4539
4540 * server.c (handle_query): Call target_supports_software_single_step.
4541
4542 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4543
4544 * linux-low.c (single_step): New function.
4545 (linux_resume_one_lwp_throw): Call single_step.
4546 (start_step_over): Likewise.
4547
4548 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4549
4550 * Makefile.in (SFILES): Append arch/arm-linux.c,
4551 arch/arm-get-next-pcs.c.
4552 (arm-linux.o): New rule.
4553 (arm-get-next-pcs.o): New rule.
4554 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4555 arm-linux.o.
4556 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4557 to linux-aarch32-low.c.
4558 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4559 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4560 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4561 (thumb2_breakpoint_len): Likewise.
4562 (arm_is_thumb_mode): Make non-static.
4563 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4564 from linux-aarch32-low.c.
4565 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4566 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4567 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4568 (thumb2_breakpoint_len): Likewise.
4569 (arm_is_thumb_mode): New declaration.
4570 * linux-arm-low.c: Include arch/arm-linux.h
4571 aarch/arm-get-next-pcs.h, sys/syscall.h.
4572 (get_next_pcs_ops): New struct.
4573 (get_next_pcs_addr_bits_remove): New function.
4574 (get_next_pcs_is_thumb): New function.
4575 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4576 (arm_sigreturn_next_pc): Likewise.
4577 (get_next_pcs_syscall_next_pc): Likewise.
4578 (arm_gdbserver_get_next_pcs): Likewise.
4579 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4580 Initialize.
4581 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4582 * server.h: Include gdb_vecs.h.
4583
4584 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4585
4586 * Makefile.in (SFILES): Append common/common-regcache.c.
4587 (OBS): Append common-regcache.o.
4588 (common-regcache.o): New rule.
4589 * regcache.c (init_register_cache): Initialize cache to
4590 REG_UNAVAILABLE.
4591 (regcache_raw_read_unsigned): New function.
4592 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4593 register_status enum.
4594
4595 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4596
4597 * linux-aarch64-low.c (the_low_targets): Rename
4598 breakpoint_reinsert_addr to get_next_pcs.
4599 * linux-arm-low.c (the_low_targets): Likewise.
4600 * linux-bfin-low.c (the_low_targets): Likewise.
4601 * linux-cris-low.c (the_low_targets): Likewise.
4602 * linux-crisv32-low.c (the_low_targets): Likewise.
4603 * linux-low.c (can_software_single_step): Likewise.
4604 (install_software_single_step_breakpoints): New function.
4605 (start_step_over): Use install_software_single_step_breakpoints.
4606 * linux-low.h: New CORE_ADDR vector.
4607 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4608 get_next_pcs.
4609 * linux-mips-low.c (the_low_targets): Likewise.
4610 * linux-nios2-low.c (the_low_targets): Likewise.
4611 * linux-sparc-low.c (the_low_targets): Likewise.
4612
4613 2015-12-17 Pedro Alves <palves@redhat.com>
4614
4615 * linux-low.c (linux_kill_one_lwp): Remove references to
4616 LinuxThreads.
4617 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4618 to 'kill'.
4619 (linux_init_signals): Delete.
4620 (initialize_low): Adjust.
4621 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4622
4623 2015-12-16 Pedro Alves <palves@redhat.com>
4624
4625 * configure.ac (compiler warning flags): When testing a
4626 -Wno-foo option, check whether -Wfoo works instead.
4627 * configure: Regenerate.
4628
4629 2015-12-11 Don Breazeal <donb@codesourcery.com>
4630
4631 * server.c (process_serial_event): Don't exit from gdbserver
4632 in remote mode if there are still active inferiors.
4633
4634 2015-12-11 Yao Qi <yao.qi@linaro.org>
4635
4636 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4637 arm_breakpoint_at if the process is 32-bit.
4638
4639 2015-12-11 Yao Qi <yao.qi@linaro.org>
4640
4641 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4642 arm breakpoint.
4643
4644 2015-12-07 Yao Qi <yao.qi@linaro.org>
4645
4646 * configure.srv: Append arm.o to srv_tgtobj for
4647 aarch64*-*-linux* target.
4648 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4649 from linux-arm-low.c.
4650 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4651 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4652 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4653 (thumb2_breakpoint_len): Likewise.
4654 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4655 (arm_breakpoint_kinds): Likewise.
4656 (arm_breakpoint_kind_from_pc): Likewise.
4657 (arm_sw_breakpoint_from_kind): Likewise.
4658 (arm_breakpoint_kind_from_current_state): Likewise.
4659 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4660 (arm_sw_breakpoint_from_kind): Declare.
4661 (arm_breakpoint_kind_from_current_state): Declare.
4662 (arm_breakpoint_at): Declare.
4663 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4664 arm_sw_breakpoint_from_kind if process is 32-bit.
4665 (aarch64_breakpoint_kind_from_pc): New function.
4666 (aarch64_breakpoint_kind_from_current_state): New function.
4667 (the_low_target): Initialize fields breakpoint_kind_from_pc
4668 and breakpoint_kind_from_current_state.
4669 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4670 linux-aarch32-low.c.
4671 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4672 (arm_breakpoint, arm_breakpoint_len): Likewise.
4673 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4674 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4675 (arm_is_thumb_mode): Likewise.
4676 (arm_breakpoint_at): Likewise.
4677 (arm_breakpoint_kind_from_pc): Likewise.
4678 (arm_sw_breakpoint_from_kind): Likewise.
4679 (arm_breakpoint_kind_from_current_state): Likewise.
4680
4681 Revert:
4682 2015-08-04 Yao Qi <yao.qi@linaro.org>
4683
4684 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4685 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4686 * server.c (extended_protocol): Remove "static".
4687 * server.h (extended_protocol): Declare it.
4688
4689 2015-12-04 Josh Stone <jistone@redhat.com>
4690
4691 * target.h (struct target_ops) <arch_setup>: Rename to ...
4692 (struct target_ops) <post_create_inferior>: ... this.
4693 (target_arch_setup): Rename to ...
4694 (target_post_create_inferior): ... this, calling post_create_inferior.
4695 * server.c (start_inferior): Update target_arch_setup calls to
4696 target_post_create_inferior.
4697 * linux-low.c (linux_low_ptrace_options): Forward declare.
4698 (linux_arch_setup): Update its comment for general use.
4699 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4700 (struct linux_target_ops): Use linux_post_create_inferior.
4701 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4702 to post_create_inferior.
4703 * nto-low.c (struct nto_target_ops): Likewise.
4704 * spu-low.c (struct spu_target_ops): Likewise.
4705 * win32-low.c (struct win32_target_ops): Likewise.
4706
4707 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4708
4709 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4710
4711 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4712
4713 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4714 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4715 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4716 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4717 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4718 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4719 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4720 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4721 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4722 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4723 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4724 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4725
4726 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4727
4728 * linux-low.c (linux_look_up_symbols): Don't call
4729 linux_supports_traceclone.
4730 * linux-low.h (thread_db_init): Remove use_events argument.
4731 * thread-db.c (thread_db_use_event): Remove global variable.
4732 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4733 (struct thread_db) <td_create_bp>: Remove field.
4734 (thread_db_create_event): Remove function.
4735 (thread_db_enable_reporting): Likewise.
4736 (find_one_thread): Don't check for thread_db_use_events.
4737 (attach_thread): Likewise.
4738 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4739 (try_thread_db_load_1): Don't check for thread_db_use_events.
4740 (thread_db_init): Remove use_events argument and thread events
4741 handling.
4742 (remove_thread_event_breakpoints): Remove function.
4743 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4744
4745 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4746
4747 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4748 New function.
4749 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4750 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4751 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4752 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4753 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4754 Initialize.
4755 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4756 New function.
4757 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4758 * linux-low.c (can_hardware_single_step): Use
4759 supports_hardware_single_step.
4760 (can_software_single_step): New function.
4761 (start_step_over): Call can_software_single_step.
4762 (linux_supports_hardware_single_step): New function.
4763 (struct target_ops) <supports_software_single_step>: Initialize.
4764 * linux-low.h (struct linux_target_ops)
4765 <supports_hardware_single_step>: Initialize.
4766 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4767 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4768 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4769 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4770 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4771 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4772 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4773 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4774 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4775 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4776 Initialize.
4777 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4778 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4779 Initialize.
4780 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4781 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4782 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4783 New function.
4784 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4785 * target.h (struct target_ops): <supports_software_single_step>:
4786 New field.
4787 (target_supports_software_single_step): New macro.
4788
4789 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4790
4791 * linux-low.c (linux_wait_1): Fix pc advance condition.
4792 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4793 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4794
4795 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4796
4797 * linux-arm-low.c (arm_is_thumb_mode): New function.
4798 (arm_breakpoint_at): Use arm_is_thumb_mode.
4799 (arm_breakpoint_kind_from_current_state): New function.
4800 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4801 Initialize.
4802 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4803 (linux_breakpoint_kind_from_current_state): New function.
4804 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4805 * linux-low.h (struct linux_target_ops)
4806 <breakpoint_kind_from_current_state>: New field.
4807 * target.h (struct target_ops): Likewise.
4808 (target_breakpoint_kind_from_current_state): New macro.
4809
4810 2015-11-30 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (linux_resume): Wake up the event loop before
4813 returning.
4814
4815 2015-11-30 Pedro Alves <palves@redhat.com>
4816
4817 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4818 check.
4819 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4820 to -1.
4821 * target.c (struct thread_search): New structure.
4822 (thread_search_callback): New function.
4823 (prev_general_thread): New global.
4824 (prepare_to_access_memory, done_accessing_memory): New functions.
4825 * target.h (prepare_to_access_memory, done_accessing_memory):
4826 Replace macros with function declarations.
4827
4828 2015-11-30 Pedro Alves <palves@redhat.com>
4829
4830 PR 14618
4831 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4832 report TARGET_WAITKIND_NO_RESUMED.
4833 * remote-utils.c (prepare_resume_reply): Handle
4834 TARGET_WAITKIND_NO_RESUMED.
4835 * server.c (report_no_resumed): New global.
4836 (handle_query) <qSupported>: Handle "no-resumed+". Report
4837 "no-resumed+" support.
4838 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4839 return error if the client doesn't support no-resumed events.
4840 (push_stop_notification): New function.
4841 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4842 events if the client supports them.
4843
4844 2015-11-30 Pedro Alves <palves@redhat.com>
4845
4846 * linux-low.c (thread_still_has_status_pending_p): Don't check
4847 vCont;t here.
4848 (lwp_resumed): New function.
4849 (status_pending_p_callback): Return early if the LWP is not
4850 supposed to be resumed.
4851
4852 2015-11-30 Pedro Alves <palves@redhat.com>
4853
4854 * linux-low.c (handle_extended_wait): Assert that the LWP's
4855 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4856 thread create events, leave the new child's status pending.
4857 (linux_low_filter_event): If GDB wants to hear about thread exit
4858 events, leave the LWP marked dead and don't delete it.
4859 (linux_wait_for_event_filtered): Don't check for thread exit.
4860 (filter_exit_event): New function.
4861 (linux_wait_1): Use it, when returning an exit event.
4862 (linux_resume_one_lwp_throw): Assert that the LWP's
4863 waitstatus is TARGET_WAITKIND_IGNORE.
4864 * remote-utils.c (prepare_resume_reply): Handle
4865 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4866 * server.c (report_thread_events): New global.
4867 (handle_general_set): Handle QThreadEvents.
4868 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4869 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4870 TARGET_WAITKIND_THREAD_EXITED.
4871 * server.h (report_thread_events): Declare.
4872
4873 2015-11-30 Pedro Alves <palves@redhat.com>
4874
4875 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4876 the thread's last_resume_kind was resume_stop.
4877
4878 2015-11-30 Pedro Alves <palves@redhat.com>
4879
4880 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4881 before returning.
4882
4883 2015-11-30 Pedro Alves <palves@redhat.com>
4884
4885 * server.c (handle_v_requests): Handle vCtrlC.
4886
4887 2015-11-30 Pedro Alves <palves@redhat.com>
4888
4889 * gdbthread.h (find_any_thread_of_pid): Declare.
4890 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4891 functions.
4892 * server.c (handle_query): If current_thread is NULL, look for
4893 another thread of the selected process.
4894
4895 2015-11-26 Daniel Colascione <dancol@dancol.org>
4896 Simon Marchi <simon.marchi@ericsson.com>
4897
4898 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4899 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4900 name in reply.
4901 * target.h (struct target_ops) <thread_name>: New field.
4902 (target_thread_name): New macro.
4903
4904 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4905
4906 * regcache.h (regcache_invalidate_pid): Add declaration.
4907 * regcache.c (regcache_invalidate_pid): New function, extracted
4908 from regcache_invalidate.
4909 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4910 Add trivial documentation comment.
4911 * lynx-low.c: Use regcache_invalidate_pid instead of
4912 regcache_invalidate.
4913
4914 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4915
4916 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4917 and Elf64_auxv_t if the target is Android.
4918
4919 2015-11-22 Doug Evans <xdje42@gmail.com>
4920
4921 * target.h: #include <sys/types.h>.
4922
4923 2015-11-19 Pedro Alves <palves@redhat.com>
4924
4925 * linux-low.c (linux_process_qsupported): Change prototype.
4926 Adjust.
4927 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4928 Change prototype.
4929 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4930 and adjust to loop over all features.
4931 * server.c (handle_query) <qSupported>: Adjust to call
4932 target_process_qsupported once, passing it a vector of unprocessed
4933 features.
4934 * target.h (struct target_ops) <process_qsupported>: Change
4935 prototype.
4936 (target_process_qsupported): Adjust.
4937
4938 2015-11-19 Pedro Alves <palves@redhat.com>
4939
4940 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4941 mode.
4942 * configure: Regenerate.
4943
4944 2015-11-19 Pedro Alves <palves@redhat.com>
4945
4946 * configure: Regenerate.
4947
4948 2015-11-19 Yao Qi <yao.qi@linaro.org>
4949
4950 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4951 type to uint32_t.
4952
4953 2015-11-19 Yao Qi <yao.qi@linaro.org>
4954
4955 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4956 (struct aarch64_operand): Move enum out.
4957
4958 2015-11-19 Yao Qi <yao.qi@linaro.org>
4959
4960 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4961 struct user_fpsimd_state *.
4962 (aarch64_store_fpregset): Likewise.
4963
4964 2015-11-19 Yao Qi <yao.qi@linaro.org>
4965
4966 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4967 struct user_pt_regs *.
4968 (aarch64_store_gregset): Likewise.
4969
4970 2015-11-18 Pedro Alves <palves@redhat.com>
4971
4972 * Makefile.in (all_object_files): Add $IPA_OBJS.
4973
4974 2015-11-17 Pedro Alves <palves@redhat.com>
4975
4976 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4977 GDB_SIGNAL_0 and gdb_signal_to_string.
4978
4979 2015-11-17 Pedro Alves <palves@redhat.com>
4980
4981 * win32-low.c (handle_output_debug_string): Remove parameter.
4982 (win32_kill): Remove our_status local and adjust call to
4983 handle_output_debug_string.
4984 (get_child_debug_event): Adjust call to
4985 handle_output_debug_string.
4986
4987 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4988
4989 * linux-mips-low.c (mips_fill_gregset): Add cast.
4990 (mips_store_gregset): Likewise.
4991 (mips_fill_fpregset): Likewise.
4992 (mips_store_fpregset): Likewise.
4993
4994 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4995
4996 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4997 priv.
4998
4999 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5000
5001 * linux-mips-low.c (mips_linux_new_thread): Change type of
5002 watch_type to enum target_hw_bp_type.
5003
5004 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5005
5006 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5007 Change return type to arm_hwbp_type.
5008
5009 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5010
5011 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5012 (arm_store_gregset): Likewise.
5013 * linux-arm-low.c (arm_get_hwcap): Likewise.
5014 (arm_read_description): Likewise.
5015
5016 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5017
5018 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5019
5020 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5021
5022 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5023 (ppc_fill_vsxregset): Likewise.
5024 (ppc_store_vsxregset): Likewise.
5025 (ppc_fill_vrregset): Likewise.
5026 (ppc_store_vrregset): Likewise.
5027 (ppc_fill_evrregset): Likewise.
5028 (ppc_store_evrregset): Likewise.
5029
5030 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5031
5032 * linux-ppc-low.c (ppc_usrregs_info): Remove
5033 forward-declaration.
5034 (ppc_arch_setup): Move lower in file.
5035
5036 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5037
5038 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5039 (ps_pdwrite): Likewise.
5040
5041 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5042
5043 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5044 to after assert checks.
5045
5046 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5047
5048 * proc-service.c (ps_pdread): Add/adjust casts.
5049 (ps_pdwrite): Add/adjust casts.
5050
5051 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5052
5053 * server.c (handle_search_memory_1): Cast return value of
5054 memmem.
5055
5056 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5057
5058 * server.c (write_qxfer_response): Change type of data to
5059 gdb_byte *.
5060
5061 2015-10-29 Pedro Alves <palves@redhat.com>
5062
5063 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5064
5065 2015-10-29 Pedro Alves <palves@redhat.com>
5066
5067 * tracepoint.c (clear_installed_tracepoints): Add casts.
5068
5069 2015-10-29 Pedro Alves <palves@redhat.com>
5070
5071 * server.c (handle_v_cont, process_serial_event): Add enum
5072 gdb_signal casts to signal parsing code.
5073
5074 2015-10-29 Pedro Alves <palves@redhat.com>
5075
5076 * linux-low.h (NULL_REGSET): Define.
5077 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5078 * linux-arm-low.c (arm_regsets): Likewise.
5079 * linux-crisv32-low.c (cris_regsets): Likewise.
5080 * linux-m68k-low.c (m68k_regsets): Likewise.
5081 * linux-mips-low.c (mips_regsets): Likewise.
5082 * linux-nios2-low.c (nios2_regsets): Likewise.
5083 * linux-ppc-low.c (ppc_regsets): Likewise.
5084 * linux-s390-low.c (s390_regsets): Likewise.
5085 * linux-sh-low.c (sh_regsets): Likewise.
5086 * linux-sparc-low.c (sparc_regsets): Likewise.
5087 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5088 * linux-tile-low.c (tile_regsets): Likewise.
5089 * linux-x86-low.c (x86_regsets): Likewise.
5090 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5091
5092 2015-10-29 Pedro Alves <palves@redhat.com>
5093
5094 * linux-low.h (NULL_REGSET): Define.
5095 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5096 * linux-arm-low.c (arm_regsets): Likewise.
5097 * linux-crisv32-low.c (cris_regsets): Likewise.
5098 * linux-m68k-low.c (m68k_regsets): Likewise.
5099 * linux-mips-low.c (mips_regsets): Likewise.
5100 * linux-nios2-low.c (nios2_regsets): Likewise.
5101 * linux-ppc-low.c (ppc_regsets): Likewise.
5102 * linux-s390-low.c (s390_regsets): Likewise.
5103 * linux-sh-low.c (sh_regsets): Likewise.
5104 * linux-sparc-low.c (sparc_regsets): Likewise.
5105 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5106 * linux-tile-low.c (tile_regsets): Likewise.
5107 * linux-x86-low.c (x86_regsets): Likewise.
5108 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5109
5110 2015-10-26 Doug Evans <dje@google.com>
5111
5112 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5113
5114 2015-10-26 Doug Evans <dje@google.com>
5115
5116 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5117
5118 2015-10-26 Doug Evans <dje@google.com>
5119
5120 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5121 for debug_printf.
5122 (attach_thread, find_new_threads_callback): Ditto.
5123
5124 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5125
5126 * mem-break.h (set_breakpoint_data): Remove.
5127
5128 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5129
5130 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5131 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5132 (initialize_low): Remove set_breakpoint_data call.
5133 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5134 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5135 (initialize_low): Remove set_breakpoint_data call.
5136 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5137 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5138 (initialize_low): Remove set_breakpoint_data call.
5139
5140 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5141
5142 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5143 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5144 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5145 * target.h (target_breakpoint_kind_from_pc): New macro.
5146
5147 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5148
5149 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5150 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5151 the default breakpoint kind.
5152
5153 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5154
5155 * linux-arm-low.c (arm_supports_z_point_type): Add software
5156 breakpoint support.
5157
5158 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5159
5160 * linux-arm-low.c: Refactor breakpoint definitions.
5161 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5162 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5163
5164 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5165
5166 * Makefile.in: Add arm.c/o.
5167 * configure.srv: Likewise.
5168 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5169 (arm_breakpoint_kind_from_pc): New function.
5170 (arm_sw_breakpoint_from_kind): Return proper kind.
5171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5172
5173 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5174
5175 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5176 removal.
5177 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5178 (struct raw_breakpoint) <size>: Remove.
5179 (struct raw_breakpoint) <kind>: Add.
5180 (bp_size): New function.
5181 (bp_opcode): Likewise.
5182 (find_raw_breakpoint_at): Adjust for kind.
5183 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5184 (remove_memory_breakpoint): Adjust for kind call bp_size.
5185 (set_raw_breakpoint_at): Adjust for kind.
5186 (set_breakpoint): Likewise.
5187 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5188 (delete_raw_breakpoint): Adjust for kind.
5189 (delete_breakpoint): Likewise.
5190 (find_gdb_breakpoint): Likewise.
5191 (set_gdb_breakpoint_1): Likewise.
5192 (set_gdb_breakpoint): Likewise.
5193 (delete_gdb_breakpoint_1): Likewise.
5194 (delete_gdb_breakpoint): Likewise.
5195 (uninsert_raw_breakpoint): Likewise.
5196 (reinsert_raw_breakpoint): Likewise.
5197 (set_breakpoint_data): Remove.
5198 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5199 (check_mem_read): Adjust for kind call bp_size.
5200 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5201 (clone_one_breakpoint): Adjust for kind.
5202 * mem-break.h (set_gdb_breakpoint): Likewise.
5203 (delete_gdb_breakpoint): Likewise.
5204 * server.c (process_serial_event): Likewise.
5205
5206 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5207
5208 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5209 (struct linux_target_ops) <breakpoint>: Remove.
5210 (struct linux_target_ops) <breakpoint_len>: Remove.
5211 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5212 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5213 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5214 (arm_sw_breakpoint_from_kind): New function.
5215 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5216 (struct linux_target_ops) <breakpoint>: Remove.
5217 (struct linux_target_ops) <breakpoint_len>: Remove.
5218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5220 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5221 (struct linux_target_ops) <breakpoint>: Remove.
5222 (struct linux_target_ops) <breakpoint_len>: Remove.
5223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5225 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5226 (struct linux_target_ops) <breakpoint>: Remove.
5227 (struct linux_target_ops) <breakpoint_len>: Remove.
5228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5230 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5231 and sw_breakpoint_from_kind to increment the pc.
5232 (linux_breakpoint_kind_from_pc): New function.
5233 (linux_sw_breakpoint_from_kind): New function.
5234 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5235 (initialize_low): Call breakpoint_kind_from_pc and
5236 sw_breakpoint_from_kind to replace breakpoint_data/len.
5237 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5238 New field.
5239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5240 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5241 (struct linux_target_ops) <breakpoint>: Remove.
5242 (struct linux_target_ops) <breakpoint_len>: Remove.
5243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5245 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5246 (struct linux_target_ops) <breakpoint>: Remove.
5247 (struct linux_target_ops) <breakpoint_len>: Remove.
5248 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5250 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5251 (struct linux_target_ops) <breakpoint>: Remove.
5252 (struct linux_target_ops) <breakpoint_len>: Remove.
5253 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5254 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5255 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5256 (struct linux_target_ops) <breakpoint>: Remove.
5257 (struct linux_target_ops) <breakpoint_len>: Remove.
5258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5260 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5261 (struct linux_target_ops) <breakpoint>: Remove.
5262 (struct linux_target_ops) <breakpoint_len>: Remove.
5263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5265 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5266 (struct linux_target_ops) <breakpoint>: Remove.
5267 (struct linux_target_ops) <breakpoint_len>: Remove.
5268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5270 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5271 (struct linux_target_ops) <breakpoint>: Remove.
5272 (struct linux_target_ops) <breakpoint_len>: Remove.
5273 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5274 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5275 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5276 (struct linux_target_ops) <breakpoint>: Remove.
5277 (struct linux_target_ops) <breakpoint_len>: Remove.
5278 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5279 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5280 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5281 (struct linux_target_ops) <breakpoint>: Remove.
5282 (struct linux_target_ops) <breakpoint_len>: Remove.
5283 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5284 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5285 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5286 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5287 (struct linux_target_ops) <breakpoint>: Remove.
5288 (struct linux_target_ops) <breakpoint_len>: Remove.
5289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5291 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5292 (struct linux_target_ops) <breakpoint>: Remove.
5293 (struct linux_target_ops) <breakpoint_len>: Remove.
5294 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5295 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5296
5297 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5298
5299 * linux-cris-low.c (cris_get_pc): Remove void arg.
5300
5301 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5302
5303 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5304 variable name.
5305
5306 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5307
5308 * inferiors.c (thread_pid_matches_callback): New function.
5309 (find_thread_process): New function.
5310 (remove_thread): Reset current_thread.
5311 (remove_process): Assert threads have been removed first.
5312
5313 2015-10-15 Yao Qi <yao.qi@linaro.org>
5314
5315 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5316 if it is 3.
5317 (aarch64_remove_point): Likewise.
5318 * regcache.c (regcache_register_size): New function.
5319
5320 2015-10-12 Yao Qi <yao.qi@linaro.org>
5321
5322 * linux-aarch64-low.c: Update all callers as emit_load_store
5323 is renamed to aarch64_emit_load_store.
5324
5325 2015-10-12 Yao Qi <yao.qi@linaro.org>
5326
5327 * linux-aarch64-low.c: Update all callers of function renaming
5328 from emit_insn to aarch64_emit_insn.
5329
5330 2015-10-12 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5333 arch/aarch64-insn.h.
5334 (struct aarch64_memory_operand): Likewise.
5335 (ENCODE): Likewise.
5336 (emit_insn): Move to arch/aarch64-insn.c.
5337 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5338 (emit_load_store): Move to arch/aarch64-insn.c.
5339 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5340 (can_encode_int32): Remove.
5341
5342 2015-10-12 Yao Qi <yao.qi@linaro.org>
5343
5344 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5345 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5346 (aarch64_relocate_instruction): Likewise.
5347 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5348 (struct aarch64_insn_visitor): Likewise.
5349
5350 2015-10-12 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5353 (struct aarch64_insn_visitor): New.
5354 (struct aarch64_insn_relocation_data): New.
5355 (aarch64_ftrace_insn_reloc_b): New function.
5356 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5357 (aarch64_ftrace_insn_reloc_cb): Likewise.
5358 (aarch64_ftrace_insn_reloc_tb): Likewise.
5359 (aarch64_ftrace_insn_reloc_adr): Likewise.
5360 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5361 (aarch64_ftrace_insn_reloc_others): Likewise.
5362 (visitor): New.
5363 (aarch64_relocate_instruction): Use visitor.
5364
5365 2015-10-12 Yao Qi <yao.qi@linaro.org>
5366
5367 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5368 int. Add argument buf.
5369 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5370 aarch64_relocate_instruction.
5371
5372 2015-10-12 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5375 argument insn. Remove local variable insn. Don't call
5376 target_read_uint32.
5377 (aarch64_install_fast_tracepoint_jump_pad): Call
5378 target_read_uint32.
5379
5380 2015-09-30 Yao Qi <yao.qi@linaro.org>
5381
5382 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5383 (emit_load_store_pair): Likewise.
5384
5385 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5386
5387 * dll.c (match_dll): Add cast(s).
5388 (unloaded_dll): Likewise.
5389 * linux-low.c (second_thread_of_pid_p): Likewise.
5390 (delete_lwp_callback): Likewise.
5391 (count_events_callback): Likewise.
5392 (select_event_lwp_callback): Likewise.
5393 (linux_set_resume_request): Likewise.
5394 * server.c (accumulate_file_name_length): Likewise.
5395 (emit_dll_description): Likewise.
5396 (handle_qxfer_threads_worker): Likewise.
5397 (visit_actioned_threads): Likewise.
5398 * thread-db.c (any_thread_of): Likewise.
5399 * tracepoint.c (same_process_p): Likewise.
5400 (match_blocktype): Likewise.
5401 (build_traceframe_info_xml): Likewise.
5402
5403 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5404
5405 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5406 assignment.
5407 (gdb_unparse_agent_expr): Likewise.
5408 * hostio.c (require_data): Likewise.
5409 (handle_pread): Likewise.
5410 * linux-low.c (disable_regset): Likewise.
5411 (fetch_register): Likewise.
5412 (store_register): Likewise.
5413 (get_dynamic): Likewise.
5414 (linux_qxfer_libraries_svr4): Likewise.
5415 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5416 (set_fast_tracepoint_jump): Likewise.
5417 (uninsert_fast_tracepoint_jumps_at): Likewise.
5418 (reinsert_fast_tracepoint_jumps_at): Likewise.
5419 (validate_inserted_breakpoint): Likewise.
5420 (clone_agent_expr): Likewise.
5421 * regcache.c (init_register_cache): Likewise.
5422 * remote-utils.c (putpkt_binary_1): Likewise.
5423 (decode_M_packet): Likewise.
5424 (decode_X_packet): Likewise.
5425 (look_up_one_symbol): Likewise.
5426 (relocate_instruction): Likewise.
5427 (monitor_output): Likewise.
5428 * server.c (handle_search_memory): Likewise.
5429 (handle_qxfer_exec_file): Likewise.
5430 (handle_qxfer_libraries): Likewise.
5431 (handle_qxfer): Likewise.
5432 (handle_query): Likewise.
5433 (handle_v_cont): Likewise.
5434 (handle_v_run): Likewise.
5435 (captured_main): Likewise.
5436 * target.c (write_inferior_memory): Likewise.
5437 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5438 * tracepoint.c (init_trace_buffer): Likewise.
5439 (add_tracepoint_action): Likewise.
5440 (add_traceframe): Likewise.
5441 (add_traceframe_block): Likewise.
5442 (cmd_qtdpsrc): Likewise.
5443 (cmd_qtdv): Likewise.
5444 (cmd_qtstatus): Likewise.
5445 (response_source): Likewise.
5446 (response_tsv): Likewise.
5447 (cmd_qtnotes): Likewise.
5448 (gdb_collect): Likewise.
5449 (initialize_tracepoint): Likewise.
5450
5451 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5452
5453 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5454 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5455 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5456 <NOP>: New.
5457 (enum aarch64_condition_codes): New enum.
5458 (w0): New static global.
5459 (fp): Likewise.
5460 (lr): Likewise.
5461 (struct aarch64_memory_operand) <type>: New
5462 MEMORY_OPERAND_POSTINDEX type.
5463 (postindex_memory_operand): New helper function.
5464 (emit_ret): New function.
5465 (emit_load_store_pair): New function, factored out of emit_stp
5466 with support for MEMORY_OPERAND_POSTINDEX.
5467 (emit_stp): Rewrite using emit_load_store_pair.
5468 (emit_ldp): New function.
5469 (emit_load_store): Likewise.
5470 (emit_ldr): Mention post-index instruction in comment.
5471 (emit_ldrh): New function.
5472 (emit_ldrb): New function.
5473 (emit_ldrsw): Mention post-index instruction in comment.
5474 (emit_str): Likewise.
5475 (emit_subs): New function.
5476 (emit_cmp): Likewise.
5477 (emit_and): Likewise.
5478 (emit_orr): Likewise.
5479 (emit_orn): Likewise.
5480 (emit_eor): Likewise.
5481 (emit_mvn): Likewise.
5482 (emit_lslv): Likewise.
5483 (emit_lsrv): Likewise.
5484 (emit_asrv): Likewise.
5485 (emit_mul): Likewise.
5486 (emit_sbfm): Likewise.
5487 (emit_sbfx): Likewise.
5488 (emit_ubfm): Likewise.
5489 (emit_ubfx): Likewise.
5490 (emit_csinc): Likewise.
5491 (emit_cset): Likewise.
5492 (emit_nop): Likewise.
5493 (emit_ops_insns): New helper function.
5494 (emit_pop): Likewise.
5495 (emit_push): Likewise.
5496 (aarch64_emit_prologue): New function.
5497 (aarch64_emit_epilogue): Likewise.
5498 (aarch64_emit_add): Likewise.
5499 (aarch64_emit_sub): Likewise.
5500 (aarch64_emit_mul): Likewise.
5501 (aarch64_emit_lsh): Likewise.
5502 (aarch64_emit_rsh_signed): Likewise.
5503 (aarch64_emit_rsh_unsigned): Likewise.
5504 (aarch64_emit_ext): Likewise.
5505 (aarch64_emit_log_not): Likewise.
5506 (aarch64_emit_bit_and): Likewise.
5507 (aarch64_emit_bit_or): Likewise.
5508 (aarch64_emit_bit_xor): Likewise.
5509 (aarch64_emit_bit_not): Likewise.
5510 (aarch64_emit_equal): Likewise.
5511 (aarch64_emit_less_signed): Likewise.
5512 (aarch64_emit_less_unsigned): Likewise.
5513 (aarch64_emit_ref): Likewise.
5514 (aarch64_emit_if_goto): Likewise.
5515 (aarch64_emit_goto): Likewise.
5516 (aarch64_write_goto_address): Likewise.
5517 (aarch64_emit_const): Likewise.
5518 (aarch64_emit_call): Likewise.
5519 (aarch64_emit_reg): Likewise.
5520 (aarch64_emit_pop): Likewise.
5521 (aarch64_emit_stack_flush): Likewise.
5522 (aarch64_emit_zero_ext): Likewise.
5523 (aarch64_emit_swap): Likewise.
5524 (aarch64_emit_stack_adjust): Likewise.
5525 (aarch64_emit_int_call_1): Likewise.
5526 (aarch64_emit_void_call_2): Likewise.
5527 (aarch64_emit_eq_goto): Likewise.
5528 (aarch64_emit_ne_goto): Likewise.
5529 (aarch64_emit_lt_goto): Likewise.
5530 (aarch64_emit_le_goto): Likewise.
5531 (aarch64_emit_gt_goto): Likewise.
5532 (aarch64_emit_ge_got): Likewise.
5533 (aarch64_emit_ops_impl): New static global variable.
5534 (aarch64_emit_ops): New target function, return
5535 &aarch64_emit_ops_impl.
5536 (struct linux_target_ops): Install it.
5537
5538 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5539
5540 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5541 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5542 aarch64-ipa.o.
5543 * linux-aarch64-ipa.c: New file.
5544 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5545 and endian.h.
5546 (aarch64_get_thread_area): New target method.
5547 (extract_signed_bitfield): New helper function.
5548 (aarch64_decode_ldr_literal): New function.
5549 (enum aarch64_opcodes): New enum.
5550 (struct aarch64_register): New struct.
5551 (struct aarch64_operand): New struct.
5552 (x0): New static global.
5553 (x1): Likewise.
5554 (x2): Likewise.
5555 (x3): Likewise.
5556 (x4): Likewise.
5557 (w2): Likewise.
5558 (ip0): Likewise.
5559 (sp): Likewise.
5560 (xzr): Likewise.
5561 (aarch64_register): New helper function.
5562 (register_operand): Likewise.
5563 (immediate_operand): Likewise.
5564 (struct aarch64_memory_operand): New struct.
5565 (offset_memory_operand): New helper function.
5566 (preindex_memory_operand): Likewise.
5567 (enum aarch64_system_control_registers): New enum.
5568 (ENCODE): New macro.
5569 (emit_insn): New helper function.
5570 (emit_b): New function.
5571 (emit_bcond): Likewise.
5572 (emit_cb): Likewise.
5573 (emit_tb): Likewise.
5574 (emit_blr): Likewise.
5575 (emit_stp): Likewise.
5576 (emit_ldp_q_offset): Likewise.
5577 (emit_stp_q_offset): Likewise.
5578 (emit_load_store): Likewise.
5579 (emit_ldr): Likewise.
5580 (emit_ldrsw): Likewise.
5581 (emit_str): Likewise.
5582 (emit_ldaxr): Likewise.
5583 (emit_stxr): Likewise.
5584 (emit_stlr): Likewise.
5585 (emit_data_processing_reg): Likewise.
5586 (emit_data_processing): Likewise.
5587 (emit_add): Likewise.
5588 (emit_sub): Likewise.
5589 (emit_mov): Likewise.
5590 (emit_movk): Likewise.
5591 (emit_mov_addr): Likewise.
5592 (emit_mrs): Likewise.
5593 (emit_msr): Likewise.
5594 (emit_sevl): Likewise.
5595 (emit_wfe): Likewise.
5596 (append_insns): Likewise.
5597 (can_encode_int32_in): New helper function.
5598 (aarch64_relocate_instruction): New function.
5599 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5600 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5601 (struct linux_target_ops): Install aarch64_get_thread_area,
5602 aarch64_install_fast_tracepoint_jump_pad and
5603 aarch64_get_min_fast_tracepoint_insn_len.
5604
5605 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5606
5607 * Makefile.in (aarch64-insn.o): New rule.
5608 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5609
5610 2015-09-21 Yao Qi <yao.qi@linaro.org>
5611
5612 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5613
5614 2015-09-21 Yao Qi <yao.qi@linaro.org>
5615
5616 * tracepoint.c (max_jump_pad_size): Remove.
5617
5618 2015-09-18 Yao Qi <yao.qi@linaro.org>
5619
5620 * linux-aarch64-low.c: Don't include sys/uio.h.
5621 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5622
5623 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5624
5625 * tracepoint.c (eval_result_type): Change prototype.
5626 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5627
5628 2015-09-15 Pedro Alves <palves@redhat.com>
5629
5630 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5631 Check whether to report exec events instead of checking whether
5632 multiprocess is enabled.
5633
5634 2015-09-15 Pedro Alves <palves@redhat.com>
5635
5636 PR remote/18965
5637 * remote-utils.c (prepare_resume_reply): Merge
5638 TARGET_WAITKIND_VFORK_DONE switch case with the
5639 TARGET_WAITKIND_FORKED case.
5640
5641 2015-09-15 Yao Qi <yao.qi@linaro.org>
5642
5643 * server.c (handle_query): Check string comparison using
5644 "else if" instead of "if".
5645
5646 2015-09-15 Yao Qi <yao.qi@linaro.org>
5647
5648 * server.c (vCont_supported): New global variable.
5649 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5650 matches. Append ";vContSupported+" to own_buf.
5651 (handle_v_requests): Append ";s;S" to own_buf if target supports
5652 hardware single step or vCont_supported is false.
5653 (capture_main): Set vCont_supported to zero.
5654
5655 2015-09-15 Yao Qi <yao.qi@linaro.org>
5656
5657 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5658 it to ...
5659 (linux_supports_hardware_single_step): ... New function.
5660 (linux_target_ops): Update.
5661 * lynx-low.c (lynx_target_ops): Set field
5662 supports_hardware_single_step to target_can_do_hardware_single_step.
5663 * nto-low.c (nto_target_ops): Likewise.
5664 * spu-low.c (spu_target_ops): Likewise.
5665 * win32-low.c (win32_target_ops): Likewise.
5666 * target.c (target_can_do_hardware_single_step): New function.
5667 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5668 Remove. <supports_hardware_single_step>: New field.
5669 (target_supports_conditional_breakpoints): Remove.
5670 (target_supports_hardware_single_step): New macro.
5671 (target_can_do_hardware_single_step): Declare.
5672 * server.c (handle_query): Use target_supports_hardware_single_step
5673 instead of target_supports_conditional_breakpoints.
5674
5675 2015-09-15 Yao Qi <yao.qi@linaro.org>
5676
5677 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5678 function.
5679 (struct linux_target_ops the_low_target): Install
5680 aarch64_linux_siginfo_fixup.
5681
5682 2015-09-11 Don Breazeal <donb@codesourcery.com>
5683 Luis Machado <lgustavo@codesourcery.com>
5684
5685 * linux-low.c (linux_mourn): Static declaration.
5686 (linux_arch_setup): Move in front of
5687 handle_extended_wait.
5688 (linux_arch_setup_thread): New function.
5689 (handle_extended_wait): Handle exec events. Call
5690 linux_arch_setup_thread. Make event_lwp argument a
5691 pointer-to-a-pointer.
5692 (check_zombie_leaders): Do not check stopped threads.
5693 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5694 (linux_low_filter_event): Add lwp and thread for exec'ing
5695 non-leader thread if leader thread has been deleted.
5696 Refactor code into linux_arch_setup_thread and call it.
5697 Pass child lwp pointer by reference to handle_extended_wait.
5698 (linux_wait_for_event_filtered): Update comment.
5699 (linux_wait_1): Prevent clobbering exec event status.
5700 (linux_supports_exec_events): New function.
5701 (linux_target_ops) <supports_exec_events>: Initialize new member.
5702 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5703 new member.
5704 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5705 * server.c (report_exec_events): New global variable.
5706 (handle_query): Handle qSupported query for exec-events feature.
5707 (captured_main): Initialize report_exec_events.
5708 * server.h (report_exec_events): Declare new global variable.
5709 * target.h (struct target_ops) <supports_exec_events>: New
5710 member.
5711 (target_supports_exec_events): New macro.
5712 * win32-low.c (win32_target_ops) <supports_exec_events>:
5713 Initialize new member.
5714
5715 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5716
5717 * linux-low.c (linux_low_enable_btrace): Remove.
5718 (linux_target_ops): Replace linux_low_enable_btrace with
5719 linux_enable_btrace.
5720
5721 2015-09-03 Yao Qi <yao.qi@linaro.org>
5722
5723 * linux-aarch64-low.c (aarch64_insert_point): Call
5724 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5725 returns true.
5726
5727 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5728
5729 * linux-low.c (check_stopped_by_breakpoint): Use
5730 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5731
5732 2015-08-27 Pedro Alves <palves@redhat.com>
5733
5734 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5735
5736 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5737
5738 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5739 the XNEW-family equivalent.
5740 (compile_bytecodes): Likewise.
5741 * dll.c (loaded_dll): Likewise.
5742 * event-loop.c (append_callback_event): Likewise.
5743 (create_file_handler): Likewise.
5744 (create_file_event): Likewise.
5745 * hostio.c (handle_open): Likewise.
5746 * inferiors.c (add_thread): Likewise.
5747 (add_process): Likewise.
5748 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5749 * linux-arm-low.c (arm_new_process): Likewise.
5750 (arm_new_thread): Likewise.
5751 * linux-low.c (add_to_pid_list): Likewise.
5752 (linux_add_process): Likewise.
5753 (handle_extended_wait): Likewise.
5754 (add_lwp): Likewise.
5755 (enqueue_one_deferred_signal): Likewise.
5756 (enqueue_pending_signal): Likewise.
5757 (linux_resume_one_lwp_throw): Likewise.
5758 (linux_resume_one_thread): Likewise.
5759 (linux_read_memory): Likewise.
5760 (linux_write_memory): Likewise.
5761 * linux-mips-low.c (mips_linux_new_process): Likewise.
5762 (mips_linux_new_thread): Likewise.
5763 (mips_add_watchpoint): Likewise.
5764 * linux-x86-low.c (initialize_low_arch): Likewise.
5765 * lynx-low.c (lynx_add_process): Likewise.
5766 * mem-break.c (set_raw_breakpoint_at): Likewise.
5767 (set_breakpoint): Likewise.
5768 (add_condition_to_breakpoint): Likewise.
5769 (add_commands_to_breakpoint): Likewise.
5770 (clone_agent_expr): Likewise.
5771 (clone_one_breakpoint): Likewise.
5772 * regcache.c (new_register_cache): Likewise.
5773 * remote-utils.c (look_up_one_symbol): Likewise.
5774 * server.c (queue_stop_reply): Likewise.
5775 (start_inferior): Likewise.
5776 (queue_stop_reply_callback): Likewise.
5777 (handle_target_event): Likewise.
5778 * spu-low.c (fetch_ppc_memory): Likewise.
5779 (store_ppc_memory): Likewise.
5780 * target.c (set_target_ops): Likewise.
5781 * thread-db.c (thread_db_load_search): Likewise.
5782 (try_thread_db_load_1): Likewise.
5783 * tracepoint.c (add_tracepoint): Likewise.
5784 (add_tracepoint_action): Likewise.
5785 (create_trace_state_variable): Likewise.
5786 (cmd_qtdpsrc): Likewise.
5787 (cmd_qtro): Likewise.
5788 (add_while_stepping_state): Likewise.
5789 * win32-low.c (child_add_thread): Likewise.
5790 (get_image_name): Likewise.
5791
5792 2015-08-25 Yao Qi <yao.qi@linaro.org>
5793
5794 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5795
5796 2015-08-25 Yao Qi <yao.qi@linaro.org>
5797
5798 * Makefile.in (aarch64-linux.o): New rule.
5799 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5800 srv_tgtobj.
5801 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5802 (aarch64_init_debug_reg_state): Make it extern.
5803 (aarch64_linux_prepare_to_resume): Remove.
5804
5805 2015-08-25 Yao Qi <yao.qi@linaro.org>
5806
5807 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5808 lwp_arch_private_info and ptid_of_lwp.
5809
5810 2015-08-25 Yao Qi <yao.qi@linaro.org>
5811
5812 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5813 Find proc_info by find_process_pid. All callers updated.
5814
5815 2015-08-25 Yao Qi <yao.qi@linaro.org>
5816
5817 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5818 Remove.
5819 (debug_reg_change_callback): Remove.
5820 (aarch64_notify_debug_reg_change): Remove.
5821
5822 2015-08-25 Yao Qi <yao.qi@linaro.org>
5823
5824 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5825 Call current_lwp_ptid.
5826
5827 2015-08-25 Yao Qi <yao.qi@linaro.org>
5828
5829 * linux-aarch64-low.c (debug_reg_change_callback): Use
5830 debug_printf.
5831
5832 2015-08-25 Yao Qi <yao.qi@linaro.org>
5833
5834 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5835
5836 2015-08-25 Yao Qi <yao.qi@linaro.org>
5837
5838 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5839
5840 2015-08-25 Yao Qi <yao.qi@linaro.org>
5841
5842 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5843 the code.
5844
5845 2015-08-25 Yao Qi <yao.qi@linaro.org>
5846
5847 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5848 Remove.
5849 (debug_reg_change_callback): Remove argument entry and add argument
5850 lwp. Remove local variable thread. Don't print thread id in the
5851 debugging output. Don't check whether pid of thread equals to pid.
5852 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5853 iterate_over_lwps instead find_inferior.
5854
5855 2015-08-24 Pedro Alves <palves@redhat.com>
5856
5857 * inferiors.c (get_first_process): New function.
5858 * inferiors.h (get_first_process): New declaration.
5859 * remote-utils.c (read_ptid): Default to the first process in the
5860 list, instead of to the current thread's process.
5861
5862 2015-08-24 Pedro Alves <palves@redhat.com>
5863
5864 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5865 * event-loop.c: Likewise.
5866 * remote-utils.c: Likewise.
5867 * tracepoint.c: Likewise.
5868
5869 2015-08-24 Pedro Alves <palves@redhat.com>
5870
5871 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5872 ptid_get_lwp.
5873
5874 2015-08-21 Pedro Alves <palves@redhat.com>
5875
5876 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5877 instead of literal 1.
5878
5879 2015-08-21 Pedro Alves <palves@redhat.com>
5880
5881 * tdesc.c (default_description): Explicitly zero-initialize.
5882
5883 2015-08-21 Pedro Alves <palves@redhat.com>
5884
5885 PR gdb/18749
5886 * inferiors.c (remove_thread): Discard any pending stop reply for
5887 this thread.
5888 * server.c (remove_all_on_match_pid): Rename to ...
5889 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5890 instead of a pid.
5891 (discard_queued_stop_replies): Change parameter to a ptid. Now
5892 extern.
5893 (handle_v_kill, kill_inferior_callback, captured_main)
5894 (process_serial_event): Adjust.
5895 * server.h (discard_queued_stop_replies): Declare.
5896
5897 2015-08-21 Pedro Alves <palves@redhat.com>
5898
5899 * linux-low.c (wait_for_sigstop): Always switch to no thread
5900 selected if the previously current thread dies.
5901 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5902 process instead of the current thread's.
5903 * remote-utils.c (input_interrupt): Don't check if there's no
5904 current thread.
5905 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5906 current thread to the general thread fails, error out.
5907 (handle_qxfer_auxv, handle_qxfer_libraries)
5908 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5909 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5910 (handle_query): Check if there's a thread selected instead of
5911 checking whether there's any thread in the thread list.
5912 (handle_qxfer_threads, handle_qxfer_btrace)
5913 (handle_qxfer_btrace_conf): Don't error out early if there's no
5914 thread in the thread list.
5915 (handle_v_cont, myresume): Don't set the current thread to the
5916 continue thread.
5917 (process_serial_event) <Hg handling>: Also set thread_id if the
5918 previous general thread is still alive.
5919 (process_serial_event) <g/G handling>: If setting the current
5920 thread to the general thread fails, error out.
5921 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5922 thread's lwp instead of the current thread's.
5923 * target.c (set_desired_thread): If the desired thread was not
5924 found, leave the current thread pointing to NULL. Return an int
5925 (boolean) indicating success.
5926 * target.h (set_desired_thread): Change return type to int.
5927
5928 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5929
5930 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5931 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5932 #includes.
5933 (ps_get_thread_area): New function.
5934
5935 2015-08-19 Gary Benson <gbenson@redhat.com>
5936
5937 * hostio.c (handle_pread): Do not attempt to read more data
5938 than hostio_reply_with_data can fit in a packet.
5939
5940 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5941
5942 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5943
5944 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5945
5946 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5947
5948 2015-08-06 Pedro Alves <palves@redhat.com>
5949
5950 * tracepoint.c (expr_eval_result): Now an int.
5951
5952 2015-08-06 Pedro Alves <palves@redhat.com>
5953
5954 * gdbthread.h (struct regcache): Forward declare.
5955 (struct thread_info) <regcache_data>: Now a struct regcache
5956 pointer.
5957 * inferiors.c (inferior_regcache_data)
5958 (set_inferior_regcache_data): Now work with struct regcache
5959 pointers.
5960 * inferiors.h (struct regcache): Forward declare.
5961 (inferior_regcache_data, set_inferior_regcache_data): Now work
5962 with struct regcache pointers.
5963 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5964 (free_register_cache_thread): Remove struct regcache pointer
5965 casts.
5966
5967 2015-08-06 Pedro Alves <palves@redhat.com>
5968
5969 * server.c (captured_main): On error, print the exception message
5970 to stderr, and if run_once is set, throw a quit.
5971
5972 2015-08-06 Pedro Alves <palves@redhat.com>
5973
5974 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5975 the current thread.
5976
5977 2015-08-06 Pedro Alves <palves@redhat.com>
5978
5979 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5980 reading beyond the passed in buffer length.
5981
5982 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5983
5984 * tracepoint.c (symbol_list) <required>: Remove.
5985
5986 2015-08-06 Pedro Alves <palves@redhat.com>
5987
5988 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5989 count if stopping and suspending threads.
5990 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5991 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5992 (linux_detach): Complete an ongoing step-over.
5993 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5994 throughout.
5995 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5996 (linux_wait_1): If passing a signal to the inferior after
5997 finishing a step-over, unsuspend and re-resume all lwps. If we
5998 see a single-step event but the thread should be continuing, don't
5999 pass the trap to gdb.
6000 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6001 internal_error instead of gdb_assert.
6002 (enqueue_pending_signal): New function.
6003 (check_ptrace_stopped_lwp_gone): Add debug output.
6004 (start_step_over): Use internal_error instead of gdb_assert.
6005 (complete_ongoing_step_over): New function.
6006 (linux_resume_one_thread): Don't resume a suspended thread.
6007 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6008 it stepping.
6009
6010 2015-08-06 Pedro Alves <palves@redhat.com>
6011
6012 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6013 (linux_thread_alive): Use lwp_is_marked_dead.
6014 (extended_event_reported): Delete.
6015 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6016 instead of extended_event_reported.
6017 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6018 as well.
6019 (lwp_is_marked_dead): New function.
6020 (lwp_running): Use lwp_is_marked_dead.
6021 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6022 comment.
6023
6024 2015-08-06 Pedro Alves <palves@redhat.com>
6025
6026 * linux-low.c (linux_wait_1): Move fork event output out of the
6027 !report_to_gdb check. Pass event_child->waitstatus to
6028 target_waitstatus_to_string instead of ourstatus.
6029
6030 2015-08-04 Yao Qi <yao.qi@linaro.org>
6031
6032 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6033 if current_thread is 32 bit.
6034
6035 2015-08-04 Yao Qi <yao.qi@linaro.org>
6036
6037 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6038 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6039 * server.c (extended_protocol): Remove "static".
6040 * server.h (extended_protocol): Declare it.
6041
6042 2015-08-04 Yao Qi <yao.qi@linaro.org>
6043
6044 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6045 both aarch64 and aarch32.
6046 (aarch64_set_pc): Likewise.
6047
6048 2015-08-04 Yao Qi <yao.qi@linaro.org>
6049
6050 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6051 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6052 arm-with-neon.xml to srv_xmlfiles.
6053 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6054 (is_64bit_tdesc): New function.
6055 (aarch64_linux_read_description): New function.
6056 (aarch64_arch_setup): Call aarch64_linux_read_description.
6057 (regs_info): Rename to regs_info_aarch64.
6058 (aarch64_regs_info): Return right regs_info.
6059 (initialize_low_arch): Call initialize_low_arch_aarch32.
6060
6061 2015-08-04 Yao Qi <yao.qi@linaro.org>
6062
6063 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6064 * linux-aarch32-low.c: New file.
6065 * linux-aarch32-low.h: New file.
6066 * linux-arm-low.c (arm_fill_gregset): Move it to
6067 linux-aarch32-low.c.
6068 (arm_store_gregset): Likewise.
6069 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6070 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6071 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6072 (regs_info): Rename to regs_info_arm.
6073 (arm_regs_info): Return regs_info_aarch32 if
6074 have_ptrace_getregset is 1 and target description is
6075 arm_with_neon or arm_with_vfpv3.
6076 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6077 Call initialize_low_arch_aarch32 instead.
6078
6079 2015-08-04 Yao Qi <yao.qi@linaro.org>
6080
6081 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6082 * linux-low.c: ... here.
6083 * linux-low.h (have_ptrace_getregset): Declare it.
6084
6085 2015-08-04 Pedro Alves <palves@redhat.com>
6086
6087 * thread-db.c (struct thread_db): Use new typedefs.
6088 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6089 CHK calls.
6090 (disable_thread_event_reporting): Cast result of dlsym to
6091 destination function pointer type.
6092 (thread_db_mourn): Use td_ta_delete_ftype.
6093
6094 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6095
6096 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6097 arch variant.
6098 (CDX_BREAKPOINT): Define for R2.
6099 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6100 (the_low_target): Add comments.
6101
6102 2015-07-30 Yao Qi <yao.qi@linaro.org>
6103
6104 * linux-arm-low.c (arm_hwcap): Remove it.
6105 (arm_read_description): New local variable arm_hwcap. Don't
6106 set arm_hwcap to zero.
6107
6108 2015-07-30 Yao Qi <yao.qi@linaro.org>
6109
6110 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6111 Use regcache->tdesc instead.
6112 (arm_store_wmmxregset): Likewise.
6113 (arm_fill_vfpregset): Likewise.
6114 (arm_store_vfpregset): Likewise.
6115
6116 2015-07-30 Yao Qi <yao.qi@linaro.org>
6117
6118 * linux-arm-low.c: Include arch/arm.h.
6119 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6120 (arm_store_gregset): Likewise.
6121
6122 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6123
6124 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6125 ptrace's 4th parameter.
6126
6127 2015-07-27 Yao Qi <yao.qi@linaro.org>
6128
6129 * configure.srv (case aarch64*-*-linux*): Don't set
6130 srv_linux_usrregs.
6131
6132 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6133
6134 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6135 sys/ptrace.h.
6136 * linux-arm-low.c: Likewise.
6137 * linux-cris-low.c: Likewise.
6138 * linux-crisv32-low.c: Likewise.
6139 * linux-low.c: Likewise.
6140 * linux-m68k-low.c: Likewise.
6141 * linux-mips-low.c: Likewise.
6142 * linux-nios2-low.c: Likewise.
6143 * linux-s390-low.c: Likewise.
6144 * linux-sparc-low.c: Likewise.
6145 * linux-tic6x-low.c: Likewise.
6146 * linux-tile-low.c: Likewise.
6147 * linux-x86-low.c: Likewise.
6148
6149 2015-07-24 Pedro Alves <palves@redhat.com>
6150
6151 * config.in: Regenerate.
6152 * configure: Regenerate.
6153
6154 2015-07-24 Pedro Alves <palves@redhat.com>
6155
6156 * acinclude.m4: Include ../ptrace.m4.
6157 * configure.ac: Call GDB_AC_PTRACE.
6158 * config.in, configure: Regenerate.
6159
6160 2015-07-24 Yao Qi <yao.qi@linaro.org>
6161
6162 * linux-low.c (linux_create_inferior): Remove setting to
6163 proc->priv->new_inferior.
6164 (linux_attach): Likewise.
6165 (linux_low_filter_event): Likewise.
6166 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6167
6168 2015-07-24 Yao Qi <yao.qi@linaro.org>
6169
6170 * linux-low.c (linux_arch_setup): New function.
6171 (linux_low_filter_event): If proc->tdesc is NULL and
6172 proc->attached is true, call the_low_target.arch_setup.
6173 Otherwise, keep status pending, and return.
6174 (linux_resume_one_lwp_throw): Don't call get_pc if
6175 thread->while_stepping isn't NULL. Don't call
6176 get_thread_regcache if proc->tdesc is NULL.
6177 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6178 (linux_target_ops): Install arch_setup.
6179 * server.c (start_inferior): Call the_target->arch_setup.
6180 * target.h (struct target_ops) <arch_setup>: New field.
6181 (target_arch_setup): New marco.
6182 * lynx-low.c (lynx_target_ops): Update.
6183 * nto-low.c (nto_target_ops): Update.
6184 * spu-low.c (spu_target_ops): Update.
6185 * win32-low.c (win32_target_ops): Update.
6186
6187 2015-07-24 Yao Qi <yao.qi@linaro.org>
6188
6189 * linux-low.c (linux_add_process): Don't set
6190 proc->priv->new_inferior.
6191 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6192 (linux_attach): Likewise.
6193
6194 2015-07-24 Yao Qi <yao.qi@linaro.org>
6195
6196 * server.c (start_inferior): Code refactor.
6197
6198 2015-07-24 Yao Qi <yao.qi@linaro.org>
6199
6200 * server.c (process_serial_event): Set general_thread.
6201
6202 2015-07-21 Yao Qi <yao.qi@linaro.org>
6203
6204 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6205 aarch64_linux_get_debug_reg_capacity.
6206
6207 2015-07-17 Yao Qi <yao.qi@linaro.org>
6208
6209 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6210 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6211 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6212 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6213 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6214 (AARCH64_HWP_ALIGNMENT): Likewise.
6215 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6216 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6217 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6218 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6219 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6220 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6221 (struct aarch64_debug_reg_state): Likewise.
6222 (struct arch_lwp_info): Likewise.
6223 (aarch64_align_watchpoint): Likewise.
6224 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6225 (aarch64_watchpoint_length): Likewise.
6226 (aarch64_point_encode_ctrl_reg): Likewise
6227 (aarch64_point_is_aligned): Likewise.
6228 (aarch64_align_watchpoint): Likewise.
6229 (aarch64_linux_set_debug_regs):
6230 (aarch64_dr_state_insert_one_point): Likewise.
6231 (aarch64_dr_state_remove_one_point): Likewise.
6232 (aarch64_handle_breakpoint): Likewise.
6233 (aarch64_handle_aligned_watchpoint): Likewise.
6234 (aarch64_handle_unaligned_watchpoint): Likewise.
6235 (aarch64_handle_watchpoint): Likewise.
6236
6237 2015-07-17 Yao Qi <yao.qi@linaro.org>
6238
6239 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6240 and don't aarch64_get_debug_reg_state. All callers update.
6241 (aarch64_handle_aligned_watchpoint): Likewise.
6242 (aarch64_handle_unaligned_watchpoint): Likewise.
6243 (aarch64_handle_watchpoint): Likewise.
6244 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6245 (aarch64_remove_point): Likewise.
6246
6247 2015-07-17 Yao Qi <yao.qi@linaro.org>
6248
6249 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6250 debug_printf.
6251 (aarch64_handle_unaligned_watchpoint): Likewise.
6252
6253 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6254
6255 Revert the previous 3 commits:
6256 Move gdb_regex* to common/
6257 Move linux_find_memory_regions_full & co.
6258 gdbserver build-id attribute generator
6259
6260 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6261 Jan Kratochvil <jan.kratochvil@redhat.com>
6262
6263 gdbserver build-id attribute generator.
6264 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6265 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6266 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6267 (find_phdr): New.
6268 (get_dynamic): Use find_pdhr to traverse program headers.
6269 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6270 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6271 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6272 (get_hex_build_id): New.
6273 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6274 to reply XML document.
6275
6276 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6277 Jan Kratochvil <jan.kratochvil@redhat.com>
6278
6279 * target.c: Include target/target-utils.h and fcntl.h.
6280 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6281 (target_fileio_read_stralloc): New functions.
6282
6283 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6284
6285 * Makefile.in (OBS): Add gdb_regex.o.
6286 (gdb_regex.o): New.
6287 * config.in: Rebuilt.
6288 * configure: Rebuilt.
6289
6290 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6291 Jan Kratochvil <jan.kratochvil@redhat.com>
6292
6293 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6294 * Makefile.in (OBS): Add target-utils.o.
6295 (linux-maps.o, target-utils.o): New.
6296 * configure.srv (srv_linux_obj): Add linux-maps.o.
6297
6298 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6299
6300 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6301 function, return 1.
6302 (the_low_target): Install it.
6303
6304 2015-07-14 Pedro Alves <palves@redhat.com>
6305
6306 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6307 Instead, ignore ECHILD, and throw an error for other errnos.
6308
6309 2015-07-10 Pedro Alves <palves@redhat.com>
6310
6311 * event-loop.c (struct callback_event) <data>: Change type to
6312 gdb_client_data instance instead of gdb_client_data pointer.
6313 (append_callback_event): Adjust.
6314
6315 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6316
6317 * linux-aarch64-low.c: Add comments for each linux_target_ops
6318 method. Remove comments already covered in target_ops and
6319 linux_target_ops definitions.
6320 (the_low_target): Add comments for each unimplemented method.
6321
6322 2015-07-09 Yao Qi <yao.qi@linaro.org>
6323
6324 * linux-aarch64-low.c (aarch64_regmap): Remove.
6325 (aarch64_usrregs_info): Remove.
6326 (regs_info): Set field usrregs to NULL.
6327
6328 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6329
6330 * linux-low.c: Include "rsp-low.h"
6331 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6332 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6333 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6334 (handle_btrace_enable_pt): New.
6335 (handle_btrace_general_set): Support "pt".
6336 (handle_btrace_conf_general_set): Support "pt:size".
6337
6338 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6339
6340 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6341 Z_PACKET_SW_BP.
6342
6343 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6344
6345 * linux-aarch64-low.c: Remove comment about endianness.
6346 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6347 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6348 memcmp.
6349
6350 2015-06-24 Gary Benson <gbenson@redhat.com>
6351
6352 * linux-i386-ipa.c (stdint.h): Do not include.
6353 * lynx-i386-low.c (stdint.h): Likewise.
6354 * lynx-ppc-low.c (stdint.h): Likewise.
6355 * mem-break.c (stdint.h): Likewise.
6356 * thread-db.c (stdint.h): Likewise.
6357 * tracepoint.c (stdint.h): Likewise.
6358 * win32-low.c (stdint.h): Likewise.
6359
6360 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6361
6362 * server.c (write_qxfer_response): Update call to
6363 remote_escape_output.
6364
6365 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6366 Jan Kratochvil <jan.kratochvil@redhat.com>
6367
6368 Merge multiple hex conversions.
6369 * gdbreplay.c (tohex): Rename to 'fromhex'.
6370 (logchar): Use fromhex.
6371
6372 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6373
6374 * server.c (handle_qxfer_libraries): Set `version' attribute for
6375 <library-list>.
6376
6377 2015-06-10 Gary Benson <gbenson@redhat.com>
6378
6379 * target.h (struct target_ops) <multifs_open>: New field.
6380 <multifs_unlink>: Likewise.
6381 <multifs_readlink>: Likewise.
6382 * linux-low.c (nat/linux-namespaces.h): New include.
6383 (linux_target_ops): Initialize the_target->multifs_open,
6384 the_target->multifs_unlink and the_target->multifs_readlink.
6385 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6386 * hostio.c (hostio_fs_pid): New static variable.
6387 (hostio_handle_new_gdb_connection): New function.
6388 (handle_setfs): Likewise.
6389 (handle_open): Use the_target->multifs_open as appropriate.
6390 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6391 (handle_readlink): Use the_target->multifs_readlink as
6392 appropriate.
6393 (handle_vFile): Handle vFile:setfs packets.
6394 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6395 after target_handle_new_gdb_connection.
6396
6397 2015-06-10 Gary Benson <gbenson@redhat.com>
6398
6399 * configure.ac (AC_CHECK_FUNCS): Add setns.
6400 * config.in: Regenerate.
6401 * configure: Likewise.
6402 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6403 (linux-namespaces.o): New rule.
6404 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6405
6406 2015-06-09 Gary Benson <gbenson@redhat.com>
6407
6408 * hostio.c (handle_open): Process mode argument with
6409 fileio_to_host_mode.
6410
6411 2015-06-01 Yao Qi <yao.qi@linaro.org>
6412
6413 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6414 * linux-x86-low.c: Likewise.
6415
6416 2015-05-28 Don Breazeal <donb@codesourcery.com>
6417
6418 * linux-low.c (handle_extended_wait): Initialize
6419 thread_info.last_resume_kind for new fork children.
6420
6421 2015-05-15 Pedro Alves <palves@redhat.com>
6422
6423 * target.h (target_handle_new_gdb_connection): Rewrite using if
6424 wrapped in do/while.
6425
6426 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6427
6428 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6429 * configure, config.in: Regenerate.
6430 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6431 Declare typedef.
6432
6433 2015-05-12 Don Breazeal <donb@codesourcery.com>
6434
6435 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6436 PTRACE_EVENT_VFORK_DONE.
6437 (linux_low_ptrace_options, extended_event_reported): Add vfork
6438 events.
6439 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6440 and "vforkdone" for RSP 'T' Stop Reply Packet.
6441 * server.h (report_vfork_events): Declare
6442 global variable.
6443
6444 2015-05-12 Don Breazeal <donb@codesourcery.com>
6445
6446 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6447 (the_low_target) <new_fork>: Initialize new member.
6448 * linux-arm-low.c (arm_new_fork): New function.
6449 (the_low_target) <new_fork>: Initialize new member.
6450 * linux-low.c (handle_extended_wait): Call new target function
6451 new_fork.
6452 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6453 * linux-mips-low.c (mips_add_watchpoint): New function
6454 extracted from mips_insert_point.
6455 (the_low_target) <new_fork>: Initialize new member.
6456 (mips_linux_new_fork): New function.
6457 (mips_insert_point): Call mips_add_watchpoint.
6458 * linux-x86-low.c (x86_linux_new_fork): New function.
6459 (the_low_target) <new_fork>: Initialize new member.
6460
6461 2015-05-12 Don Breazeal <donb@codesourcery.com>
6462
6463 * linux-low.c (handle_extended_wait): Implement return value,
6464 rename argument 'event_child' to 'event_lwp', handle
6465 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6466 (linux_low_ptrace_options): New function.
6467 (linux_low_filter_event): Call linux_low_ptrace_options,
6468 use different argument fo linux_enable_event_reporting,
6469 use return value from handle_extended_wait.
6470 (extended_event_reported): New function.
6471 (linux_wait_1): Call extended_event_reported and set
6472 status to report fork events.
6473 (linux_write_memory): Add pid to debug message.
6474 (reset_lwp_ptrace_options_callback): New function.
6475 (linux_handle_new_gdb_connection): New function.
6476 (linux_target_ops): Initialize new structure member.
6477 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6478 * lynx-low.c: Initialize new structure member.
6479 * remote-utils.c (prepare_resume_reply): Implement stop reason
6480 "fork" for "T" stop message.
6481 * server.c (handle_query): Call handle_new_gdb_connection.
6482 * server.h (report_fork_events): Declare global flag.
6483 * target.h (struct target_ops) <handle_new_gdb_connection>:
6484 New member.
6485 (target_handle_new_gdb_connection): New macro.
6486 * win32-low.c: Initialize new structure member.
6487
6488 2015-05-12 Don Breazeal <donb@codesourcery.com>
6489
6490 * mem-break.c (APPEND_TO_LIST): Define macro.
6491 (clone_agent_expr): New function.
6492 (clone_one_breakpoint): New function.
6493 (clone_all_breakpoints): New function.
6494 * mem-break.h: Declare new functions.
6495
6496 2015-05-12 Don Breazeal <donb@codesourcery.com>
6497
6498 * linux-low.c (linux_supports_fork_events): New function.
6499 (linux_supports_vfork_events): New function.
6500 (linux_target_ops): Initialize new structure members.
6501 (initialize_low): Call linux_check_ptrace_features.
6502 * lynx-low.c (lynx_target_ops): Initialize new structure
6503 members.
6504 * server.c (report_fork_events, report_vfork_events):
6505 New global flags.
6506 (handle_query): Add new features to qSupported packet and
6507 response.
6508 (captured_main): Initialize new global variables.
6509 * target.h (struct target_ops) <supports_fork_events>:
6510 New member.
6511 <supports_vfork_events>: New member.
6512 (target_supports_fork_events): New macro.
6513 (target_supports_vfork_events): New macro.
6514 * win32-low.c (win32_target_ops): Initialize new structure
6515 members.
6516
6517 2015-05-12 Gary Benson <gbenson@redhat.com>
6518
6519 * server.c (handle_qxfer_exec_file): Use current process
6520 if annex is empty.
6521
6522 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6523
6524 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6525 Remove HAVE_PTRACE_GETREGS conditionals.
6526 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6527 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6528
6529 2015-05-08 Yao Qi <yao.qi@linaro.org>
6530
6531 * linux-low.c (linux_supports_conditional_breakpoints): New
6532 function.
6533 (linux_target_ops): Install new target method.
6534 * lynx-low.c (lynx_target_ops): Install NULL hook for
6535 supports_conditional_breakpoints.
6536 * nto-low.c (nto_target_ops): Likewise.
6537 * spu-low.c (spu_target_ops): Likewise.
6538 * win32-low.c (win32_target_ops): Likewise.
6539 * server.c (handle_query): Check
6540 target_supports_conditional_breakpoints.
6541 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6542 New field.
6543 (target_supports_conditional_breakpoints): New macro.
6544
6545 2015-05-06 Pedro Alves <palves@redhat.com>
6546
6547 PR server/18081
6548 * server.c (start_inferior): If the process exits, mourn it.
6549
6550 2015-04-21 Gary Benson <gbenson@redhat.com>
6551
6552 * hostio.c (fileio_open_flags_to_host): Factored out to
6553 fileio_to_host_openflags in common/fileio.c. Single use
6554 updated.
6555
6556 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6557
6558 * linux-xtensa-low.c (xtensa_fill_gregset)
6559 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6560 XCHAL_HAVE_LOOP.
6561
6562 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6563
6564 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6565 (regs_info): Replace usrregs pointer with NULL.
6566
6567 2015-04-17 Gary Benson <gbenson@redhat.com>
6568
6569 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6570 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6571 * server.c (handle_qxfer_exec_file): New function.
6572 (qxfer_packets): Add exec-file entry.
6573 (handle_query): Report qXfer:exec-file:read as supported packet.
6574
6575 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6576
6577 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6578
6579 2015-04-09 Gary Benson <gbenson@redhat.com>
6580
6581 * hostio-errno.c (errno_to_fileio_error): Remove function.
6582 Update caller to use remote_fileio_to_fio_error.
6583
6584 2015-04-09 Yao Qi <yao.qi@linaro.org>
6585
6586 * linux-low.c (linux_insert_point): Call
6587 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6588 (linux_remove_point): Call remove_memory_breakpoint if type is
6589 raw_bkpt_type_sw.
6590 * linux-x86-low.c (x86_insert_point): Don't call
6591 insert_memory_breakpoint.
6592 (x86_remove_point): Don't call remove_memory_breakpoint.
6593
6594 2015-04-01 Pedro Alves <palves@redhat.com>
6595 Cleber Rosa <crosa@redhat.com>
6596
6597 * server.c (gdbserver_usage): Reorganize and extend the usage
6598 message.
6599
6600 2015-03-24 Pedro Alves <palves@redhat.com>
6601
6602 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6603 output. Also dump TRAP_TRACE.
6604 (linux_low_filter_event): In debug output, distinguish a
6605 resume_stop SIGSTOP from a delayed SIGSTOP.
6606
6607 2015-03-24 Gary Benson <gbenson@redhat.com>
6608
6609 * linux-x86-low.c (x86_linux_new_thread): Moved to
6610 nat/x86-linux.c.
6611 (x86_linux_prepare_to_resume): Likewise.
6612
6613 2015-03-24 Gary Benson <gbenson@redhat.com>
6614
6615 * Makefile.in (x86-linux-dregs.o): New rule.
6616 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6617 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6618 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6619 (x86_linux_dr_get): Likewise.
6620 (x86_linux_dr_set): Likewise.
6621 (update_debug_registers_callback): Likewise.
6622 (x86_linux_dr_set_addr): Likewise.
6623 (x86_linux_dr_get_addr): Likewise.
6624 (x86_linux_dr_set_control): Likewise.
6625 (x86_linux_dr_get_control): Likewise.
6626 (x86_linux_dr_get_status): Likewise.
6627 (x86_linux_update_debug_registers): Likewise.
6628
6629 2015-03-24 Gary Benson <gbenson@redhat.com>
6630
6631 * linux-x86-low.c (x86_linux_update_debug_registers):
6632 New function, factored out from...
6633 (x86_linux_prepare_to_resume): ...this.
6634
6635 2015-03-24 Gary Benson <gbenson@redhat.com>
6636
6637 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6638 (x86_linux_dr_set): Likewise.
6639 (update_debug_registers_callback): Likewise.
6640 (x86_linux_dr_set_addr): Likewise.
6641 (x86_linux_dr_get_addr): Likewise.
6642 (x86_linux_dr_set_control): Likewise.
6643 (x86_linux_dr_get_control): Likewise.
6644 (x86_linux_dr_get_status): Likewise.
6645 (x86_linux_prepare_to_resume): Likewise.
6646
6647 2015-03-24 Gary Benson <gbenson@redhat.com>
6648
6649 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6650 Use perror_with_name. Pass string through gettext.
6651 (x86_linux_dr_set): Likewise.
6652
6653 2015-03-24 Gary Benson <gbenson@redhat.com>
6654
6655 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6656 (x86_linux_dr_set_addr): ...this.
6657 (x86_dr_low_get_addr): Rename to...
6658 (x86_linux_dr_get_addr): ...this.
6659 (x86_dr_low_set_control): Rename to...
6660 (x86_linux_dr_set_control): ...this.
6661 (x86_dr_low_get_control): Rename to...
6662 (x86_linux_dr_get_control): ...this.
6663 (x86_dr_low_get_status): Rename to...
6664 (x86_linux_dr_get_status): ...this.
6665 (x86_dr_low): Update with new function names.
6666
6667 2015-03-24 Gary Benson <gbenson@redhat.com>
6668
6669 * Makefile.in (x86-linux.o): New rule.
6670 * configure.srv: Add x86-linux.o to relevant targets.
6671 * linux-low.c (lwp_set_arch_private_info): New function.
6672 (lwp_arch_private_info): Likewise.
6673 * linux-x86-low.c: Include nat/x86-linux.h.
6674 (arch_lwp_info): Removed structure.
6675 (update_debug_registers_callback):
6676 Use lwp_set_debug_registers_changed.
6677 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6678 and lwp_set_debug_registers_changed.
6679 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6680
6681 2015-03-24 Gary Benson <gbenson@redhat.com>
6682
6683 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6684 * linux-arm-low.c (arm_new_thread): Likewise.
6685 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6686 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6687 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6688 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6689
6690 2015-03-24 Gary Benson <gbenson@redhat.com>
6691
6692 * linux-low.c (ptid_of_lwp): New function.
6693 (lwp_is_stopped): Likewise.
6694 (lwp_stop_reason): Likewise.
6695 * linux-x86-low.c (update_debug_registers_callback):
6696 Use lwp_is_stopped.
6697 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6698 lwp_stop_reason.
6699
6700 2015-03-24 Gary Benson <gbenson@redhat.com>
6701
6702 * linux-low.h (linux_stop_lwp): Remove declaration.
6703
6704 2015-03-24 Gary Benson <gbenson@redhat.com>
6705
6706 * linux-low.h: Include nat/linux-nat.h.
6707 * linux-low.c (iterate_over_lwps_args): New structure.
6708 (iterate_over_lwps_filter): New function.
6709 (iterate_over_lwps): Likewise.
6710 * linux-x86-low.c (update_debug_registers_callback):
6711 Update signature to what iterate_over_lwps expects.
6712 Remove PID check that iterate_over_lwps now performs.
6713 (x86_dr_low_set_addr): Use iterate_over_lwps.
6714 (x86_dr_low_set_control): Likewise.
6715
6716 2015-03-24 Gary Benson <gbenson@redhat.com>
6717
6718 * linux-x86-low.c (x86_debug_reg_state): New function.
6719 (x86_linux_prepare_to_resume): Use the above.
6720
6721 2015-03-24 Gary Benson <gbenson@redhat.com>
6722
6723 * linux-low.c (current_lwp_ptid): New function.
6724 * linux-x86-low.c: Include nat/linux-nat.h.
6725 (x86_dr_low_get_addr): Use current_lwp_ptid.
6726 (x86_dr_low_get_control): Likewise.
6727 (x86_dr_low_get_status): Likewise.
6728
6729 2015-03-20 Pedro Alves <palves@redhat.com>
6730
6731 * tracepoint.c (cmd_qtstatus): Make "str" const.
6732
6733 2015-03-20 Pedro Alves <palves@redhat.com>
6734
6735 * server.c (handle_general_set): Make "req_str" const.
6736
6737 2015-03-19 Pedro Alves <palves@redhat.com>
6738
6739 * linux-low.c (linux_resume_one_lwp): Rename to ...
6740 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6741 instead call perror_with_name.
6742 (check_ptrace_stopped_lwp_gone): New function.
6743 (linux_resume_one_lwp): Reimplement as wrapper around
6744 linux_resume_one_lwp_throw that swallows errors if the LWP is
6745 gone.
6746
6747 2015-03-19 Pedro Alves <palves@redhat.com>
6748
6749 * linux-low.c (count_events_callback, select_event_lwp_callback):
6750 No longer check whether the thread has resume_stop as last resume
6751 kind.
6752
6753 2015-03-19 Pedro Alves <palves@redhat.com>
6754
6755 * linux-low.c (count_events_callback, select_event_lwp_callback):
6756 Use the lwp's status_pending_p field, not the thread's.
6757
6758 2015-03-19 Pedro Alves <palves@redhat.com>
6759
6760 * linux-low.c (select_event_lwp_callback): Update comments to
6761 no longer mention SIGTRAP.
6762
6763 2015-03-18 Gary Benson <gbenson@redhat.com>
6764
6765 * server.c (handle_query): Do not report vFile:fstat as supported.
6766
6767 2015-03-11 Gary Benson <gbenson@redhat.com>
6768
6769 * hostio.c (sys/types.h): New include.
6770 (sys/stat.h): Likewise.
6771 (common-remote-fileio.h): Likewise.
6772 (handle_fstat): New function.
6773 (handle_vFile): Handle vFile:fstat packets.
6774
6775 2015-03-11 Gary Benson <gbenson@redhat.com>
6776
6777 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6778 struct stat.st_blocks and struct stat.st_blksize.
6779 * configure: Regenerate.
6780 * config.in: Likewise.
6781 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6782 (OBS): Add common-remote-fileio.o.
6783 (common-remote-fileio.o): New rule.
6784
6785 2015-03-09 Pedro Alves <palves@redhat.com>
6786
6787 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6788 'struct sockaddr' pointer in 'accept' call.
6789
6790 2015-03-09 Pedro Alves <palves@redhat.com>
6791
6792 Revert:
6793 2015-03-07 Pedro Alves <palves@redhat.com>
6794 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6795 or <winsock2.h> here. Instead include "gdb_socket.h".
6796 (remote_open): Use union gdb_sockaddr_u.
6797 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6798 or <winsock2.h> here. Instead include "gdb_socket.h".
6799 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6800 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6801 or <sys/un.h>.
6802 (init_named_socket, gdb_agent_helper_thread): Use union
6803 gdb_sockaddr_u.
6804
6805 2015-03-07 Pedro Alves <palves@redhat.com>
6806
6807 * configure.ac (build_warnings): Move
6808 -Wdeclaration-after-statement to the C-specific set.
6809 * configure: Regenerate.
6810
6811 2015-03-07 Pedro Alves <palves@redhat.com>
6812
6813 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6814 or <winsock2.h> here. Instead include "gdb_socket.h".
6815 (remote_open): Use union gdb_sockaddr_u.
6816 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6817 or <winsock2.h> here. Instead include "gdb_socket.h".
6818 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6819 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6820 or <sys/un.h>.
6821 (init_named_socket, gdb_agent_helper_thread): Use union
6822 gdb_sockaddr_u.
6823
6824 2015-03-07 Pedro Alves <palves@redhat.com>
6825
6826 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6827 instead.
6828
6829 2015-03-06 Yao Qi <yao.qi@linaro.org>
6830
6831 * linux-aarch64-low.c (aarch64_insert_point): Use
6832 show_debug_regs as a boolean.
6833 (aarch64_remove_point): Likewise.
6834
6835 2015-03-05 Pedro Alves <palves@redhat.com>
6836
6837 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6838 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6839 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6840 * nto-low.c (nto_target_ops): Likewise.
6841 * spu-low.c (spu_target_ops): Likewise.
6842 * win32-low.c (win32_target_ops): Likewise.
6843
6844 2015-03-04 Pedro Alves <palves@redhat.com>
6845
6846 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6847 Decide whether a breakpoint triggered based on the SIGTRAP's
6848 siginfo.si_code.
6849 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6850 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6851 (linux_low_filter_event): Check for breakpoints before checking
6852 watchpoints.
6853 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6854 siginfo.si_code.
6855 (linux_stopped_by_sw_breakpoint)
6856 (linux_supports_stopped_by_sw_breakpoint)
6857 (linux_stopped_by_hw_breakpoint)
6858 (linux_supports_stopped_by_hw_breakpoint): New functions.
6859 (linux_target_ops): Install new target methods.
6860
6861 2015-03-04 Pedro Alves <palves@redhat.com>
6862
6863 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6864 * server.c (swbreak_feature, hwbreak_feature): New globals.
6865 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6866 (captured_main): Clear swbreak_feature and hwbreak_feature.
6867 * server.h (swbreak_feature, hwbreak_feature): Declare.
6868 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6869 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6870 supports_stopped_by_hw_breakpoint>: New fields.
6871 (target_supports_stopped_by_sw_breakpoint)
6872 (target_stopped_by_sw_breakpoint)
6873 (target_supports_stopped_by_hw_breakpoint)
6874 (target_stopped_by_hw_breakpoint): Declare.
6875
6876 2015-03-04 Pedro Alves <palves@redhat.com>
6877
6878 enum lwp_stop_reason -> enum target_stop_reason
6879 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6880 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6881 (linux_wait_1, stuck_in_jump_pad_callback)
6882 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6883 (linux_stopped_by_watchpoint):
6884 * linux-low.h (enum lwp_stop_reason): Delete.
6885 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6886 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6887
6888 2015-03-04 Yao Qi <yao.qi@linaro.org>
6889
6890 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6891
6892 2015-03-03 Gary Benson <gbenson@redhat.com>
6893
6894 * hostio.c (handle_vFile): Fix prefix lengths.
6895
6896 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6897
6898 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6899 ptr_bits.
6900
6901 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6902
6903 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6904 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6905 (clean): Add "rm -f" for above C files.
6906 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6907 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6908 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6909 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6910 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6911 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6912 (init_registers_s390x_vx_linux64)
6913 (init_registers_s390x_tevx_linux64)
6914 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6915 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6916 declarations.
6917 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6918 (s390_store_vxrs_high): New functions.
6919 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6920 NT_S390_VXRS_HIGH.
6921 (s390_arch_setup): Add logic for selecting one of the new target
6922 descriptions. Activate the new vector regsets if applicable.
6923 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6924 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6925 and init_registers_s390x_tevx_linux64.
6926
6927 2015-03-01 Pedro Alves <palves@redhat.com>
6928
6929 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6930 parameter.
6931
6932 2015-02-27 Pedro Alves <palves@redhat.com>
6933
6934 * linux-x86-low.c (u_debugreg_offset): New function.
6935 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6936
6937 2015-02-27 Pedro Alves <palves@redhat.com>
6938
6939 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6940 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6941 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6942 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6943 (ps_lsetfpregs, ps_getpid)
6944 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6945 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6946 (ps_lsetxregs, ps_plog): Declare.
6947
6948 2015-02-27 Pedro Alves <palves@redhat.com>
6949
6950 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6951 IP_AGENT_EXPORT_FUNC.
6952 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6953 IP_AGENT_EXPORT_FUNC.
6954 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6955 (IP_AGENT_EXPORT): Delete.
6956 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6957 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6958 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6959 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6960 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6961 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6962 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6963 (traceframe_read_count, traceframe_write_count)
6964 (traceframes_created, trace_state_variables, get_raw_reg)
6965 (get_trace_state_variable_value, set_trace_state_variable_value)
6966 (ust_loaded, helper_thread_id, cmd_buf): Use
6967 IPA_SYM_EXPORTED_NAME.
6968 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6969 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6970 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6971 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6972 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6973 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6974 EXTERN_C_PUSH/EXTERN_C_POP.
6975 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6976 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6977 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6978 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6979 (traceframe_write_count, traceframe_read_count)
6980 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6981 (about_to_request_buffer_space, get_trace_state_variable_value)
6982 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6983 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6984 EXTERN_C_PUSH/EXTERN_C_POP.
6985 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6986 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6987 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6988 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6989 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6990 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6991 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6992 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6993 Define.
6994 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6995 (IP_AGENT_EXPORT_VAR_DECL): Define.
6996 (tracing): Declare.
6997 (gdb_agent_get_raw_reg): Declare.
6998
6999 2015-02-27 Tom Tromey <tromey@redhat.com>
7000 Pedro Alves <palves@redhat.com>
7001
7002 Rename symbols whose names are reserved C++ keywords throughout.
7003
7004 2015-02-27 Pedro Alves <palves@redhat.com>
7005
7006 * Makefile.in (COMPILER): New, get it from autoconf.
7007 (CXX): Get from autoconf instead.
7008 (COMPILE.pre): Use COMPILER.
7009 (CC-LD): Rename to ...
7010 (CC_LD): ... this. Use COMPILER.
7011 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7012 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7013 * acinclude.m4: Include build-with-cxx.m4.
7014 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7015 Disable -Werror by default if building in C++ mode.
7016 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7017 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7018 the C++ compiler. Save/restore CXXFLAGS too.
7019 * configure: Regenerate.
7020
7021 2015-02-27 Pedro Alves <palves@redhat.com>
7022
7023 * acinclude.m4: Include libiberty.m4.
7024 * configure.ac: Call libiberty_INIT.
7025 * config.in, configure: Regenerate.
7026
7027 2015-02-26 Pedro Alves <palves@redhat.com>
7028
7029 * linux-low.c (linux_wait_1): When incrementing the PC past a
7030 program breakpoint always use the_low_target.breakpoint_len as
7031 increment, rather than the maximum between that and
7032 the_low_target.decr_pc_after_break.
7033
7034 2015-02-23 Pedro Alves <palves@redhat.com>
7035
7036 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7037 thread was doing a step-over; always adjust the PC if
7038 we stepped over a permanent breakpoint.
7039 (linux_wait_1): If we stepped over breakpoint that was on top of a
7040 permanent breakpoint, manually advance the PC past it.
7041
7042 2015-02-23 Pedro Alves <palves@redhat.com>
7043
7044 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7045 modes.
7046 (x86_fill_gregset, x86_store_gregset): Use it when handling
7047 $orig_eax.
7048
7049 2015-02-20 Pedro Alves <palves@redhat.com>
7050
7051 * thread-db.c: Include "nat/linux-procfs.h".
7052 (thread_db_init): Skip listing new threads if the kernel supports
7053 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7054
7055 2015-02-20 Pedro Alves <palves@redhat.com>
7056
7057 * linux-low.c (status_pending_p_callback): Use ptid_match.
7058
7059 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7060
7061 PR breakpoints/16812
7062 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7063 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7064 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7065
7066 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7067
7068 PR breakpoints/15956
7069 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7070
7071 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7072
7073 * linux-low.c (linux_low_btrace_conf): Print size.
7074 * server.c (handle_btrace_conf_general_set): New.
7075 (hanle_general_set): Call handle_btrace_conf_general_set.
7076 (handle_query): Report Qbtrace-conf:bts:size as supported.
7077
7078 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7079
7080 * linux-low.c (linux_low_enable_btrace): Update parameters.
7081 (linux_low_btrace_conf): New.
7082 (linux_target_ops)<to_btrace_conf>: Initialize.
7083 * server.c (current_btrace_conf): New.
7084 (handle_btrace_enable): Rename to ...
7085 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7086 to target_enable_btrace. Update comment. Update users.
7087 (handle_qxfer_btrace_conf): New.
7088 (qxfer_packets): Add btrace-conf entry.
7089 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7090 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7091 (target_ops)<read_btrace_conf>: New.
7092 (target_enable_btrace): Update parameters.
7093 (target_read_btrace_conf): New.
7094
7095 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7096
7097 * server.c (handle_btrace_general_set): Remove call to
7098 target_supports_btrace.
7099 (supported_btrace_packets): New.
7100 (handle_query): Call supported_btrace_packets.
7101 * target.h: include btrace-common.h.
7102 (btrace_target_info): Removed.
7103 (supports_btrace, target_supports_btrace): Update parameters.
7104
7105 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7106
7107 * Makefile.in (SFILES): Add common/btrace-common.c.
7108 (OBS): Add common/btrace-common.o.
7109 (btrace-common.o): Add build rules.
7110 * linux-low: Include btrace-common.h.
7111 (linux_low_read_btrace): Use struct btrace_data. Call
7112 btrace_data_init and btrace_data_fini.
7113
7114 2015-02-06 Pedro Alves <palves@redhat.com>
7115
7116 * thread-db.c (find_new_threads_callback): Add debug output.
7117
7118 2015-02-04 Pedro Alves <palves@redhat.com>
7119
7120 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7121 (resume_stopped_resumed_lwps): New function.
7122 (linux_wait_for_event_filtered): Use it.
7123
7124 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7125
7126 * Makefile.in (SFILES): Add linux-personality.c.
7127 (linux-personality.o): New rule.
7128 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7129 list of objects to be built.
7130 * linux-low.c: Include nat/linux-personality.h.
7131 (linux_create_inferior): Remove code to disable address space
7132 randomization (moved to ../nat/linux-personality.c). Create
7133 cleanup to disable address space randomization.
7134
7135 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7136
7137 * Makefile.in (posix-strerror.o): New rule.
7138 (mingw-strerror.o): Likewise.
7139 * configure: Regenerated.
7140 * configure.ac: Source file ../common/common.host. Initialize new
7141 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7142
7143 2015-01-14 Yao Qi <yao@codesourcery.com>
7144
7145 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7146 (ppc-linux.o): New rule.
7147 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7148 * configure.ac: AC_CHECK_FUNCS(getauxval).
7149 * config.in: Re-generated.
7150 * configure: Re-generated.
7151 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7152 ppc64_64bit_inferior_p
7153
7154 2015-01-14 Yao Qi <yao@codesourcery.com>
7155
7156 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7157 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7158 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7159 (PT_ORIG_R3, PT_TRAP): Likewise.
7160 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7161 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7162 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7163
7164 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7165
7166 * i387-fp.c (i387_cache_to_xsave): In look over
7167 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7168 zmmh_low_space field by use of zmmh_high_space.
7169
7170 2015-01-09 Pedro Alves <palves@redhat.com>
7171
7172 * linux-low.c (step_over_bkpt): Move higher up in the file.
7173 (handle_extended_wait): Don't store the stop_pc here.
7174 (get_stop_pc): Adjust comments and rename to ...
7175 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7176 stopped for a software breakpoint or hardware breakpoint.
7177 (thread_still_has_status_pending_p): New function.
7178 (status_pending_p_callback): Use
7179 thread_still_has_status_pending_p. If the event is no longer
7180 interesting, resume the LWP.
7181 (handle_tracepoints): Add assert.
7182 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7183 (wstatus_maybe_breakpoint): New function.
7184 (cancel_breakpoint): Delete function.
7185 (check_stopped_by_watchpoint): New function, factored out from
7186 linux_low_filter_event.
7187 (lp_status_maybe_breakpoint): Delete function.
7188 (linux_low_filter_event): Remove filter_ptid argument.
7189 Leave thread group exits pending here. Store the LWP's stop PC.
7190 Always leave events pending.
7191 (linux_wait_for_event_filtered): Pull all events out of the
7192 kernel, and leave them all pending.
7193 (count_events_callback, select_event_lwp_callback): Consider all
7194 events.
7195 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7196 (select_event_lwp): Only give preference to the stepping LWP in
7197 all-stop mode. Adjust comments.
7198 (ignore_event): New function.
7199 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7200 references to cancel_breakpoints. Adjust to renames. Also give
7201 equal priority to all LWPs that have had events in non-stop mode.
7202 If reporting a software breakpoint event, unadjust the LWP's PC.
7203 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7204 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7205 Adjust.
7206 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7207 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7208 (linux_stopped_by_watchpoint): Adjust.
7209 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7210 * linux-low.h (enum lwp_stop_reason): New.
7211 (struct lwp_info) <stop_pc>: Adjust comment.
7212 <stopped_by_watchpoint>: Delete field.
7213 <stop_reason>: New field.
7214 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7215 * mem-break.c (software_breakpoint_inserted_here)
7216 (hardware_breakpoint_inserted_here): New function.
7217 * mem-break.h (software_breakpoint_inserted_here)
7218 (hardware_breakpoint_inserted_here): Declare.
7219 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7220 (cancel_breakpoints): Delete.
7221 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7222 (upload_fast_traceframes): Remove references to
7223 cancel_breakpoints.
7224
7225 2015-01-09 Pedro Alves <palves@redhat.com>
7226
7227 * thread-db.c (find_new_threads_callback): Ignore thread if the
7228 kernel thread ID is -1.
7229
7230 2015-01-09 Pedro Alves <palves@redhat.com>
7231
7232 * linux-low.c (linux_attach_fail_reason_string): Move to
7233 nat/linux-ptrace.c, and rename.
7234 (linux_attach_lwp): Update comment.
7235 (attach_proc_task_lwp_callback): New function.
7236 (linux_attach): Adjust to rename and use
7237 linux_proc_attach_tgid_threads.
7238 (linux_attach_fail_reason_string): Delete declaration.
7239
7240 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7241
7242 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7243 * server.c (gdbserver_version): Likewise.
7244
7245 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7246
7247 * remote-utils.c: Include ctype.h.
7248 (input_interrupt): Explicitly handle the case when the char
7249 received is the NUL byte. Improve the printing of non-ASCII
7250 characters.
7251
7252 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7253
7254 * linux-low.c (linux_low_filter_event): Update call to
7255 linux_enable_event_reporting following the addition of
7256 a new parameter to that function.
7257
7258 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7259
7260 PR server/17457
7261 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7262 (AARCH64_FPCR_REGNO): Likewise.
7263 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7264 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7265 (aarch64_store_fpregset): Likewise.
7266
7267 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7268
7269 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7270 Remove FIXME comment about assumption about N.
7271
7272 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7273
7274 * configure.ac: If large-file support is disabled in GDBserver,
7275 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7276 * configure: Regenerate.
7277
7278 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7279
7280 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7281 warning upon ENODATA from ptrace.
7282 * linux-s390-low.c (s390_store_tdb): New.
7283 (s390_regsets): Add regset for NT_S390_TDB.
7284
7285 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7286
7287 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7288 without a fill_function.
7289 * linux-s390-low.c (s390_fill_last_break): Remove.
7290 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7291 (s390_arch_setup): Use regset's size instead of fill_function for
7292 loop end condition.
7293
7294 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7295
7296 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7297 the regset's store function when ptrace returned an error.
7298 * regcache.c (get_thread_regcache): Invalidate register cache
7299 before fetching inferior's registers.
7300
7301 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7302
7303 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7304 while-loop as for-loop.
7305 (regsets_store_inferior_registers): Likewise.
7306
7307 2014-11-28 Yao Qi <yao@codesourcery.com>
7308
7309 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7310 * config.in, configure: Re-generate.
7311 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7312 is defined.
7313
7314 2014-11-21 Yao Qi <yao@codesourcery.com>
7315
7316 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7317 (AC_CHECK_HEADERS): Remove malloc.h.
7318 * configure: Re-generated.
7319 * config.in: Re-generated.
7320 * server.h: Don't include alloca.h and malloc.h.
7321 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7322 Don't include malloc.h.
7323
7324 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7325
7326 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7327 corresponding ERRNO check in same block.
7328
7329 2014-11-12 Pedro Alves <palves@redhat.com>
7330
7331 * server.c (cont_thread): Update comment.
7332 (start_inferior, attach_inferior): No longer clear cont_thread.
7333 (handle_v_cont): No longer set cont_thread.
7334 (captured_main): Clear cont_thread each time a GDB connects.
7335
7336 2014-11-12 Pedro Alves <palves@redhat.com>
7337
7338 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7339 thread, and don't resume all threads if the Hc thread has exited.
7340
7341 2014-11-12 Pedro Alves <palves@redhat.com>
7342
7343 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7344 the process group instead of to a specific LWP.
7345
7346 2014-10-15 Pedro Alves <palves@redhat.com>
7347
7348 PR server/17487
7349 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7350 parameter.
7351 (arm_set_thread_context): Delete.
7352 (the_low_target): Adjust.
7353 * win32-i386-low.c (debug_registers_changed)
7354 (debug_registers_used): Delete.
7355 (update_debug_registers_callback): New function.
7356 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7357 needing to update their debug registers.
7358 (win32_get_current_dr): New function.
7359 (x86_dr_low_get_addr, x86_dr_low_get_control)
7360 (x86_dr_low_get_status): Fetch the debug register from the thread
7361 record's context.
7362 (i386_initial_stuff): Adjust.
7363 (i386_get_thread_context): Remove current_event parameter. Don't
7364 clear debug_registers_changed nor copy DR values to
7365 debug_reg_state.
7366 (i386_set_thread_context): Delete.
7367 (i386_prepare_to_resume): New function.
7368 (i386_thread_added): Mark the thread as needing to update irs
7369 debug registers.
7370 (the_low_target): Remove i386_set_thread_context and install
7371 i386_prepare_to_resume.
7372 * win32-low.c (win32_get_thread_context): Adjust.
7373 (win32_set_thread_context): Use SetThreadContext
7374 directly.
7375 (win32_prepare_to_resume): New function.
7376 (win32_require_context): New function, factored out from ...
7377 (thread_rec): ... this.
7378 (continue_one_thread): Call win32_prepare_to_resume on each thread
7379 we're about to continue.
7380 (win32_resume): Call win32_prepare_to_resume on the event thread.
7381 * win32-low.h (struct win32_thread_info)
7382 <debug_registers_changed>: New field.
7383 (struct win32_target_ops): Change prototype of set_thread_context,
7384 delete set_thread_context and add prepare_to_resume.
7385 (win32_require_context): New declaration.
7386
7387 2014-10-08 Gary Benson <gbenson@redhat.com>
7388
7389 * server.h: Do not include common-exceptions.h.
7390
7391 2014-10-08 Gary Benson <gbenson@redhat.com>
7392
7393 * server.h: Do not include cleanups.h.
7394
7395 2014-09-30 James Hogan <james.hogan@imgtec.com>
7396
7397 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7398 mips64-dsp-linux.c.
7399
7400 2014-09-23 Yao Qi <yao@codesourcery.com>
7401
7402 * linux-low.c (lp_status_maybe_breakpoint): New function.
7403 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7404 (count_events_callback): Likewise.
7405 (select_event_lwp_callback): Likewise.
7406 (cancel_breakpoints_callback): Likewise.
7407
7408 2014-09-19 Don Breazeal <donb@codesourcery.com>
7409
7410 * linux-low.c (handle_extended_wait): Call
7411 linux_ptrace_get_extended_event.
7412 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7413 linux_is_extended_waitstatus.
7414
7415 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7416
7417 * Makefile.in (CPPFLAGS): Define.
7418 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7419 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7420
7421 2014-09-16 Gary Benson <gbenson@redhat.com>
7422
7423 * inferiors.h (current_inferior): Renamed as...
7424 (current_thread): New variable. All uses updated.
7425 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7426 (maybe_move_out_of_jump_pad): Likewise.
7427 (cancel_breakpoint): Likewise.
7428 (linux_low_filter_event): Likewise.
7429 (wait_for_sigstop): Likewise.
7430 (linux_resume_one_lwp): Likewise.
7431 (need_step_over_p): Likewise.
7432 (start_step_over): Likewise.
7433 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7434 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7435 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7436 and save_inferior as saved_thread.
7437 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7438 saved_thread.
7439 (regcache_invalidate_thread): Likewise.
7440 * remote-utils.c (prepare_resume_reply): Likewise.
7441 * thread-db.c (thread_db_get_tls_address): Likewise.
7442 (disable_thread_event_reporting): Likewise.
7443 (remove_thread_event_breakpoints): Likewise.
7444 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7445 as saved_thread.
7446 * target.h (set_desired_inferior): Renamed as...
7447 (set_desired_thread): New declaration. All uses updated.
7448 * server.c (myresume): Updated comment to reference thread instead
7449 of inferior.
7450 (handle_serial_event): Likewise.
7451 (handle_target_event): Likewise.
7452
7453 2014-09-12 Tom Tromey <tromey@redhat.com>
7454 Gary Benson <gbenson@redhat.com>
7455
7456 * regcache.h: Include common-regcache.h.
7457 (regcache_read_pc): Don't declare.
7458 * regcache.c (get_thread_regcache_for_ptid): New function.
7459
7460 2014-09-11 Tom Tromey <tromey@redhat.com>
7461 Gary Benson <gbenson@redhat.com>
7462
7463 * symbol.c: New file.
7464 * Makefile.in (SFILES): Add symbol.c.
7465 (OBS): Add symbol.o.
7466
7467 2014-09-11 Gary Benson <gbenson@redhat.com>
7468
7469 * target.c (target_stop_ptid, target_continue_ptid): New
7470 functions.
7471
7472 2014-09-11 Tom Tromey <tromey@redhat.com>
7473 Gary Benson <gbenson@redhat.com>
7474
7475 * target.h: Include target/target.h.
7476 * target.c (target_read_memory, target_read_uint32)
7477 (target_write_memory): New functions.
7478
7479 2014-09-11 Gary Benson <gbenson@redhat.com>
7480
7481 * server.h (debug_hw_points): Don't declare.
7482 * server.c (debug_hw_points): Don't define. Replace all uses
7483 with show_debug_regs.
7484 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7485 all uses with show_debug_regs.
7486
7487 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7488
7489 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7490 endianness into account.
7491 (ppc_supply_ptrace_register): Likewise.
7492
7493 2014-09-03 James Hogan <james.hogan@imgtec.com>
7494
7495 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7496 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7497
7498 2014-09-03 Gary Benson <gbenson@redhat.com>
7499
7500 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7501 ALL_DEBUG_ADDRESS_REGISTERS.
7502
7503 2014-09-02 Gary Benson <gbenson@redhat.com>
7504
7505 * i386-low.h: Renamed as...
7506 * x86-low.h: New file. All type, function and variable name
7507 prefixes changed from "i386_" to "x86_". All references updated.
7508 * i386-low.c: Renamed as...
7509 * x86-low.c: New file. All type, function and variable name
7510 prefixes changed from "i386_" to "x86_". All references updated.
7511
7512 2014-09-02 Gary Benson <gbenson@redhat.com>
7513
7514 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7515 (x86_linux_new_thread): Likewise.
7516
7517 2014-08-29 Gary Benson <gbenson@redhat.com>
7518
7519 * server.h (setjmp.h): Do not include.
7520 (toplevel): Do not declare.
7521 (common-exceptions.h): Include.
7522 (cleanups.h): Likewise.
7523 * server.c (toplevel): Do not define.
7524 (exit_code): New static global.
7525 (detach_or_kill_for_exit_cleanup): New function.
7526 (main): New function. Original main renamed to...
7527 (captured_main): New function.
7528 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7529
7530 2014-08-29 Gary Benson <gbenson@redhat.com>
7531
7532 * Makefile.in (SFILES): Add common/common-exceptions.c.
7533 (OBS): Add common-exceptions.o.
7534 (common-exceptions.o): New rule.
7535 * utils.c (prepare_to_throw_exception): New function.
7536
7537 2014-08-29 Gary Benson <gbenson@redhat.com>
7538
7539 * config.in: Regenerate.
7540 * configure: Likewise.
7541
7542 2014-08-29 Gary Benson <gbenson@redhat.com>
7543
7544 * Makefile.in (SFILES): Add common/cleanups.c.
7545 (OBS): cleanups.o.
7546 (cleanups.o): New rule.
7547
7548 2014-08-29 Gary Benson <gbenson@redhat.com>
7549
7550 * utils.c (internal_vwarning): New function.
7551
7552 2014-08-28 Gary Benson <gbenson@redhat.com>
7553
7554 * utils.h (fatal): Remove declaration.
7555 * utils.c (fatal): Remove function.
7556
7557 2014-08-28 Gary Benson <gbenson@redhat.com>
7558
7559 * tracepoint.c (gdb_agent_init): Replace fatal with
7560 perror_with_name.
7561 (initialize_tracepoint): Likewise.
7562
7563 2014-08-28 Gary Benson <gbenson@redhat.com>
7564
7565 * remote-utils.c (remote_prepare): Replace fatal with error.
7566
7567 2014-08-28 Gary Benson <gbenson@redhat.com>
7568
7569 * linux-low.c (linux_async): Replace fatal with warning.
7570 Tidy up and return.
7571 (linux_start_non_stop): Return -1 if linux_async failed.
7572
7573 2014-08-28 Gary Benson <gbenson@redhat.com>
7574
7575 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7576 gdb_assert.
7577 (i386_dr_low_get_addr): Remove vague comment.
7578 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7579 gdb_assert.
7580
7581 2014-08-28 Gary Benson <gbenson@redhat.com>
7582
7583 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7584 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7585 internal_error.
7586 (linux_resume_one_lwp): Likewise.
7587 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7588 gdb_assert.
7589 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7590 with internal_error.
7591 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7592 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7593 (find_register_by_name): Replace fatal with internal_error.
7594 (find_regno): Likewise.
7595 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7596 * thread-db.c (thread_db_create_event): Likewise.
7597 (thread_db_load_search): Likewise.
7598 (try_thread_db_load_1): Likewise.
7599 * tracepoint.c (get_jump_space_head): Replace fatal with
7600 internal_error.
7601 (claim_trampoline_space): Likewise.
7602 (have_fast_tracepoint_trampoline_buffer): Likewise.
7603 (cmd_qtstart): Likewise.
7604 (stop_tracing): Likewise.
7605 (fast_tracepoint_collecting): Likewise.
7606 (target_malloc): Likewise.
7607 (download_tracepoint): Likewise.
7608 (download_trace_state_variables): Replace check with gdb_assert.
7609 (upload_fast_traceframes): Replace fatal with internal_error.
7610
7611 2014-08-19 Tom Tromey <tromey@redhat.com>
7612 Gary Benson <gbenson@redhat.com>
7613
7614 * Makefile.in (SFILES): Add common/common-debug.c.
7615 (OBS): Add common-debug.o.
7616 (common-debug.o): New rule.
7617 * debug.h (debug_printf): Don't declare.
7618 * debug.c (debug_printf): Renamed and rewritten as...
7619 (debug_vprintf): New function.
7620
7621 2014-08-19 Gary Benson <gbenson@redhat.com>
7622
7623 * utils.h: Do not include print-utils.h.
7624
7625 2014-08-19 Tom Tromey <tromey@redhat.com>
7626 Gary Benson <gbenson@redhat.com>
7627
7628 * server.h: Add static assertion.
7629 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7630
7631 2014-08-19 Tom Tromey <tromey@redhat.com>
7632 Gary Benson <gbenson@redhat.com>
7633
7634 * Makefile.in (SFILES): Add common/errors.c.
7635 (OBS): Add errors.o.
7636 (IPA_OBS): Add errors-ipa.o.
7637 (errors.o): New rule.
7638 (errors-ipa.o): Likewise.
7639 * utils.h (perror_with_name, error, warning): Don't declare.
7640 * utils.c (warning): Renamed and rewritten as...
7641 (vwarning): New function.
7642 (error): Renamed and rewritten as...
7643 (verror): New function.
7644 (internal_error): Renamed and rewritten as...
7645 (internal_verror): New function.
7646
7647 2014-08-07 Gary Benson <gbenson@redhat.com>
7648
7649 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7650 * configure: Regenerate.
7651 * config.in: Likewise.
7652 * server.h: Do not include errno.h.
7653 * event-loop.c: Likewise.
7654 * hostio-errno.c: Likewise.
7655 * linux-low.c: Likewise.
7656 * remote-utils.c: Likewise.
7657 * spu-low.c: Likewise.
7658 * utils.c: Likewise.
7659 * gdbreplay.c: Unconditionally include errno.h.
7660
7661 2014-08-07 Gary Benson <gbenson@redhat.com>
7662
7663 * server.h: Do not include string.h.
7664 * event-loop.c: Likewise.
7665 * linux-low.c: Likewise.
7666 * regcache.c: Likewise.
7667 * remote-utils.c: Likewise.
7668 * spu-low.c: Likewise.
7669 * utils.c: Likewise.
7670
7671 2014-08-07 Gary Benson <gbenson@redhat.com>
7672
7673 * server.h: Do not include gdb_assert.h.
7674
7675 2014-08-07 Gary Benson <gbenson@redhat.com>
7676
7677 * server.h: Do not include common-utils.h.
7678
7679 2014-08-07 Gary Benson <gbenson@redhat.com>
7680
7681 * server.h: Do not include ptid.h.
7682 * notif.h: Likewise.
7683
7684 2014-08-07 Gary Benson <gbenson@redhat.com>
7685
7686 * server.h: Do not include gdb_locale.h.
7687
7688 2014-08-07 Gary Benson <gbenson@redhat.com>
7689
7690 * server.h: Do not include gdb/signals.h.
7691 * win32-low.c: Likewise.
7692
7693 2014-08-07 Gary Benson <gbenson@redhat.com>
7694
7695 * server.h: Do not include pathmax.h.
7696
7697 2014-08-07 Gary Benson <gbenson@redhat.com>
7698
7699 * server.h: Do not include libiberty.h.
7700 * linux-bfin-low.c: Likewise.
7701
7702 2014-08-07 Gary Benson <gbenson@redhat.com>
7703
7704 * server.h: Do not include ansidecl.h.
7705
7706 2014-08-07 Gary Benson <gbenson@redhat.com>
7707
7708 * linux-x86-low.c: Do not include stddef.h.
7709 * lynx-ppc-low.c: Likewise.
7710 * tracepoint.c: Likewise.
7711
7712 2014-08-07 Gary Benson <gbenson@redhat.com>
7713
7714 * server.h: Do not include stdarg.h.
7715 * nto-low.c: Likewise.
7716
7717 2014-08-07 Gary Benson <gbenson@redhat.com>
7718
7719 * server.h: Do not include stdlib.h.
7720 * inferiors.c: Likewise.
7721 * linux-low.c: Likewise.
7722 * regcache.c: Likewise.
7723 * spu-low.c: Likewise.
7724 * tracepoint.c: Likewise.
7725 * utils.c: Likewise.
7726
7727 2014-08-07 Gary Benson <gbenson@redhat.com>
7728
7729 * server.h: Do not include stdio.h.
7730 * linux-low.c: Likewise.
7731 * remote-utils.c: Likewise.
7732 * spu-low.c: Likewise.
7733 * utils.c: Likewise.
7734 * wincecompat.c: Likewise.
7735
7736 2014-08-06 Gary Benson <gbenson@redhat.com>
7737
7738 * regcache.c (init_register_cache): Move conditionals inside if.
7739
7740 2014-08-06 Gary Benson <gbenson@redhat.com>
7741
7742 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7743
7744 2014-07-31 Gary Benson <gbenson@redhat.com>
7745
7746 * ax.h: Do not include server.h.
7747 * gdbthread.h: Likewise.
7748 * lynx-low.h: Likewise.
7749 * notif.h: Likewise.
7750
7751 2014-07-30 Gary Benson <gbenson@redhat.com>
7752
7753 * server.h: Include common-defs.h.
7754 Do not include config.h or build-gnulib-gdbserver/config.h.
7755
7756 2014-07-30 Gary Benson <gbenson@redhat.com>
7757
7758 * hostio-errno.c: Move server.h to top of includes list.
7759 * inferiors.c: Likewise.
7760 * linux-x86-low.c: Likewise.
7761 * notif.c: Include server.h.
7762
7763 2014-07-24 Tom Tromey <tromey@redhat.com>
7764 Gary Benson <gbenson@redhat.com>
7765
7766 * server.h (CORE_ADDR): Now unsigned.
7767
7768 2014-07-16 Pedro Alves <palves@redhat.com>
7769
7770 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7771
7772 2014-07-15 Pedro Alves <palves@redhat.com>
7773
7774 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7775 copy.
7776
7777 2014-07-11 Pedro Alves <palves@redhat.com>
7778
7779 * linux-low.c (kill_wait_lwp): New function, based on
7780 kill_one_lwp_callback, but use my_waitpid directly.
7781 (kill_one_lwp_callback, linux_kill): Use it.
7782
7783 2014-06-23 Pedro Alves <palves@redhat.com>
7784
7785 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7786 before setting DR0..DR3.
7787
7788 2014-06-20 Gary Benson <gbenson@redhat.com>
7789
7790 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7791 * configure: Regenerated.
7792 * config.in: Likewise.
7793
7794 2014-06-20 Gary Benson <gbenson@redhat.com>
7795
7796 * Makefile.in (SFILES): Update locations for files moved
7797 from common to nat.
7798 (object file files): Reordered.
7799
7800 2014-06-20 Gary Benson <gbenson@redhat.com>
7801
7802 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7803 (i386_dr_low_set_addr): Likewise.
7804 (i386_dr_low_get_addr): Likewise.
7805 (i386_dr_low_can_set_control): Likewise.
7806 (i386_dr_low_set_control): Likewise.
7807 (i386_dr_low_get_control): Likewise.
7808 (i386_dr_low_get_status): Likewise.
7809 (i386_get_debug_register_length): Likewise.
7810 * linux-x86-low.c (i386_dr_low_set_addr):
7811 Changed signature. Made static.
7812 (i386_dr_low_get_addr): Likewise.
7813 (i386_dr_low_set_control): Likewise.
7814 (i386_dr_low_get_control): Likewise.
7815 (i386_dr_low_get_status): Likewise.
7816 (i386_dr_low): New global variable.
7817 * win32-i386-low.c (i386_dr_low_set_addr):
7818 Changed signature. Made static.
7819 (i386_dr_low_get_addr): Likewise.
7820 (i386_dr_low_set_control): Likewise.
7821 (i386_dr_low_get_control): Likewise.
7822 (i386_dr_low_get_status): Likewise.
7823 (i386_dr_low): New global variable.
7824
7825 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7826
7827 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7828 * Makefile.in (AR, AR_FLAGS): Define.
7829 * configure: Regenerate.
7830
7831 2014-06-19 Gary Benson <gbenson@redhat.com>
7832
7833 * Makefile.in (i386-dregs.o): New rule.
7834 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7835 * i386-low.c (target.h): Remove include.
7836 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7837 (DR_CONTROL_SHIFT): Likewise.
7838 (DR_CONTROL_SIZE): Likewise.
7839 (DR_RW_EXECUTE): Likewise.
7840 (DR_RW_WRITE): Likewise.
7841 (DR_RW_READ): Likewise.
7842 (DR_RW_IORW): Likewise.
7843 (DR_LEN_1): Likewise.
7844 (DR_LEN_2): Likewise.
7845 (DR_LEN_4): Likewise.
7846 (DR_LEN_8): Likewise.
7847 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7848 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7849 (DR_ENABLE_SIZE): Likewise.
7850 (DR_LOCAL_SLOWDOWN): Likewise.
7851 (DR_GLOBAL_SLOWDOWN): Likewise.
7852 (DR_CONTROL_RESERVED): Likewise.
7853 (I386_DR_CONTROL_MASK): Likewise.
7854 (I386_DR_VACANT): Likewise.
7855 (I386_DR_LOCAL_ENABLE): Likewise.
7856 (I386_DR_GLOBAL_ENABLE): Likewise.
7857 (I386_DR_DISABLE): Likewise.
7858 (I386_DR_SET_RW_LEN): Likewise.
7859 (I386_DR_GET_RW_LEN): Likewise.
7860 (I386_DR_WATCH_HIT): Likewise.
7861 (i386_wp_op_t): Likewise.
7862 (i386_show_dr): Likewise.
7863 (i386_length_and_rw_bits): Likewise.
7864 (i386_insert_aligned_watchpoint): Likewise.
7865 (i386_remove_aligned_watchpoint): Likewise.
7866 (i386_handle_nonaligned_watchpoint): Likewise.
7867 i386_update_inferior_debug_regs(): Likewise.
7868 (i386_dr_insert_watchpoint): Likewise.
7869 (i386_dr_remove_watchpoint): Likewise.
7870 (i386_dr_region_ok_for_watchpoint): Likewise.
7871 (i386_dr_stopped_data_address): Likewise.
7872 (i386_dr_stopped_by_watchpoint): Likewise.
7873
7874 2014-06-19 Gary Benson <gbenson@redhat.com>
7875
7876 * i386-low.c (i386_dr_show): Renamed to
7877 i386_show_dr and made static. All uses updated.
7878 (i386_dr_length_and_rw_bits): Renamed to
7879 i386_length_and_rw_bits and made static.
7880 All uses updated.
7881 (i386_dr_insert_aligned_watchpoint): Renamed to
7882 i386_insert_aligned_watchpoint and made static.
7883 All uses updated.
7884 (i386_dr_remove_aligned_watchpoint): Renamed to
7885 i386_remove_aligned_watchpoint and made static.
7886 All uses updated.
7887 (i386_dr_update_inferior_debug_regs): Renamed to
7888 i386_update_inferior_debug_regs and made static.
7889 All uses updated.
7890
7891 2014-06-18 Gary Benson <gbenson@redhat.com>
7892
7893 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7894 (i386_dr_low_can_set_control): Likewise.
7895 (i386_get_debug_register_length): Likewise.
7896 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7897 (i386_dr_low_can_set_control): Likewise.
7898 (i386_get_debug_register_length): Likewise.
7899
7900 2014-06-17 Gary Benson <gbenson@redhat.com>
7901
7902 * i386-low.h (i386-dregs.h): New include.
7903 (DR_FIRSTADDR): Now in i386-dregs.h.
7904 (DR_LASTADDR): Likewise.
7905 (DR_NADDR): Likewise.
7906 (DR_STATUS): Likewise.
7907 (DR_CONTROL): Likewise.
7908 (i386_debug_reg_state): Likewise.
7909 (i386_dr_insert_watchpoint): Likewise.
7910 (i386_dr_remove_watchpoint): Likewise.
7911 (i386_dr_region_ok_for_watchpoint): Likewise.
7912 (i386_dr_stopped_data_address): Likewise.
7913 (i386_dr_stopped_by_watchpoint): Likewise.
7914 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7915
7916 2014-06-18 Gary Benson <gbenson@redhat.com>
7917
7918 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7919 i386_dr_insert_watchpoint.
7920 (i386_low_remove_watchpoint): Renamed to
7921 i386_dr_remove_watchpoint.
7922 (i386_low_region_ok_for_watchpoint): Renamed to
7923 i386_dr_region_ok_for_watchpoint.
7924 (i386_low_stopped_data_address): Renamed to
7925 i386_dr_stopped_data_address.
7926 (i386_low_stopped_by_watchpoint): Renamed to
7927 i386_dr_stopped_by_watchpoint.
7928 * i386-low.c (i386_show_dr): Renamed to
7929 i386_dr_show and made nonstatic. All uses updated.
7930 (i386_length_and_rw_bits): Renamed to
7931 i386_dr_length_and_rw_bits and made nonstatic.
7932 All uses updated.
7933 (i386_insert_aligned_watchpoint): Renamed to
7934 i386_dr_insert_aligned_watchpoint and made nonstatic.
7935 All uses updated.
7936 (i386_remove_aligned_watchpoint): Renamed to
7937 i386_dr_remove_aligned_watchpoint and made nonstatic.
7938 All uses updated.
7939 (i386_update_inferior_debug_regs): Renamed to
7940 i386_dr_update_inferior_debug_regs and made nonstatic.
7941 All uses updated.
7942 (i386_low_insert_watchpoint): Renamed to
7943 i386_dr_insert_watchpoint. All uses updated.
7944 (i386_low_remove_watchpoint): Renamed to
7945 i386_dr_remove_watchpoint. All uses updated.
7946 (i386_low_region_ok_for_watchpoint): Renamed to
7947 i386_dr_region_ok_for_watchpoint. All uses updated.
7948 (i386_low_stopped_data_address): Renamed to
7949 i386_dr_stopped_data_address. All uses updated.
7950 (i386_low_stopped_by_watchpoint): Renamed to
7951 i386_dr_stopped_by_watchpoint. All uses updated.
7952
7953 2014-06-18 Gary Benson <gbenson@redhat.com>
7954
7955 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7956 (i386_dr_low_can_set_control): Likewise.
7957 (i386_insert_aligned_watchpoint): New check.
7958
7959 2014-06-18 Gary Benson <gbenson@redhat.com>
7960
7961 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7962 Renamed to state.
7963
7964 2014-06-18 Gary Benson <gbenson@redhat.com>
7965
7966 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7967 instead of fatal and error.
7968 (i386_handle_nonaligned_watchpoint): Likewise.
7969
7970 2014-06-18 Gary Benson <gbenson@redhat.com>
7971
7972 * i386-low.c (i386_get_debug_register_length): New macro.
7973 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7974 (i386_show_dr): Use debug_printf instead of fprintf. Use
7975 phex to format values.
7976
7977 2014-06-18 Gary Benson <gbenson@redhat.com>
7978
7979 * i386-low.h: Comment changes.
7980 * i386-low.c: Likewise.
7981
7982 2014-06-18 Gary Benson <gbenson@redhat.com>
7983
7984 * i386-low.c: Whitespace changes.
7985
7986 2014-06-12 Tom Tromey <tromey@redhat.com>
7987
7988 * utils.c (freeargv): Remove.
7989
7990 2014-06-12 Tom Tromey <tromey@redhat.com>
7991
7992 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7993 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7994 (parse_debug_format_options): Likewise.
7995 (gdbserver_usage): Likewise.
7996 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7997 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7998 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7999 against libiberty.
8000 ($(LIBGNU)): Depend on libiberty.
8001 (all-lib): Recurse into all subdirs.
8002 (install-only): Invoke "install" target in subdirs.
8003 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8004 targets.
8005 * configure: Rebuild.
8006 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8007 for vasprintf, vsnprintf, or gettimeofday.
8008 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8009 srv_tgtobj.
8010
8011 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8012
8013 * development.sh: Delete.
8014 * Makefile.in (config.status): Adjust dependency on development.sh.
8015 * configure.ac: Adjust development.sh source call.
8016 * configure: Regenerate.
8017
8018 2014-06-02 Pedro Alves <palves@redhat.com>
8019
8020 * ax.c (gdb_free_agent_expr): New function.
8021 * ax.h (gdb_free_agent_expr): New declaration.
8022 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8023 list.
8024 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8025 static.
8026 (clear_breakpoint_conditions_and_commands): New function.
8027 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8028 (clear_breakpoint_conditions_and_commands): New declaration.
8029
8030 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8031
8032 * linux-aarch64-low.c (asm/ptrace.h): Include.
8033
8034 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8035
8036 Fix TLS access for -static -pthread.
8037 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8038 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8039 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8040
8041 2014-05-20 Pedro Alves <palves@redhat.com>
8042
8043 * linux-aarch64-low.c (aarch64_insert_point)
8044 (aarch64_remove_point): No longer check whether the type is
8045 supported here. Adjust to new interface.
8046 (the_low_target): Install aarch64_supports_z_point_type as
8047 supports_z_point_type method.
8048 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8049 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8050 instead of a Z packet char. Adjust.
8051 (arm_supports_z_point_type): New function.
8052 (arm_insert_point, arm_remove_point): Adjust to new interface.
8053 (the_low_target): Install arm_supports_z_point_type.
8054 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8055 (cris_insert_point, cris_remove_point): Adjust to new interface.
8056 Don't check whether the type is supported here.
8057 (the_low_target): Install cris_supports_z_point_type.
8058 * linux-low.c (linux_supports_z_point_type): New function.
8059 (linux_insert_point, linux_remove_point): Adjust to new interface.
8060 * linux-low.h (struct linux_target_ops) <insert_point,
8061 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8062 raw_breakpoint pointer parameter.
8063 <supports_z_point_type>: New method.
8064 * linux-mips-low.c (mips_supports_z_point_type): New function.
8065 (mips_insert_point, mips_remove_point): Adjust to new interface.
8066 Use mips_supports_z_point_type.
8067 (the_low_target): Install mips_supports_z_point_type.
8068 * linux-ppc-low.c (the_low_target): Install NULL as
8069 supports_z_point_type method.
8070 * linux-s390-low.c (the_low_target): Install NULL as
8071 supports_z_point_type method.
8072 * linux-sparc-low.c (the_low_target): Install NULL as
8073 supports_z_point_type method.
8074 * linux-x86-low.c (x86_supports_z_point_type): New function.
8075 (x86_insert_point): Adjust to new insert_point interface. Use
8076 insert_memory_breakpoint. Adjust to new
8077 i386_low_insert_watchpoint interface.
8078 (x86_remove_point): Adjust to remove_point interface. Use
8079 remove_memory_breakpoint. Adjust to new
8080 i386_low_remove_watchpoint interface.
8081 (the_low_target): Install x86_supports_z_point_type.
8082 * lynx-low.c (lynx_target_ops): Install NULL as
8083 supports_z_point_type callback.
8084 * nto-low.c (nto_supports_z_point_type): New.
8085 (nto_insert_point, nto_remove_point): Adjust to new interface.
8086 (nto_target_ops): Install nto_supports_z_point_type.
8087 * mem-break.c: Adjust intro comment.
8088 (struct raw_breakpoint) <raw_type, size>: New fields.
8089 <inserted>: Update comment.
8090 <shlib_disabled>: Delete field.
8091 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8092 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8093 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8094 (raw_bkpt_type_to_target_hw_bp_type): New function.
8095 (find_enabled_raw_code_breakpoint_at): New function.
8096 (find_raw_breakpoint_at): New type and size parameters. Use them.
8097 (insert_memory_breakpoint): New function, based off
8098 set_raw_breakpoint_at.
8099 (remove_memory_breakpoint): New function.
8100 (set_raw_breakpoint_at): Reimplement.
8101 (set_breakpoint): New, based on set_breakpoint_at.
8102 (set_breakpoint_at): Reimplement.
8103 (delete_raw_breakpoint): Go through the_target->remove_point
8104 instead of assuming memory breakpoints.
8105 (find_gdb_breakpoint_at): Delete.
8106 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8107 (find_gdb_breakpoint): New function.
8108 (set_gdb_breakpoint_at): Delete.
8109 (z_type_supported): New function.
8110 (set_gdb_breakpoint_1): New function, loosely based off
8111 set_gdb_breakpoint_at.
8112 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8113 (delete_gdb_breakpoint_at): Delete.
8114 (delete_gdb_breakpoint_1): New function, loosely based off
8115 delete_gdb_breakpoint_at.
8116 (delete_gdb_breakpoint): New function.
8117 (clear_gdb_breakpoint_conditions): Rename to ...
8118 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8119 breakpoint.
8120 (add_condition_to_breakpoint): Make static.
8121 (add_breakpoint_condition): Take a struct breakpoint pointer
8122 instead of an address. Adjust.
8123 (gdb_condition_true_at_breakpoint): Rename to ...
8124 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8125 z_type parameter.
8126 (gdb_condition_true_at_breakpoint): Reimplement.
8127 (add_breakpoint_commands): Take a struct breakpoint pointer
8128 instead of an address. Adjust.
8129 (gdb_no_commands_at_breakpoint): Rename to ...
8130 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8131 parameter. Return true if no breakpoint was found. Change debug
8132 output.
8133 (gdb_no_commands_at_breakpoint): Reimplement.
8134 (run_breakpoint_commands): Rename to ...
8135 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8136 and change return type to boolean.
8137 (run_breakpoint_commands): New function.
8138 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8139 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8140 breakpoint. Go through the_target->remove_point instead of
8141 assuming memory breakpoint.
8142 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8143 software and hardware breakpoints.
8144 (reinsert_raw_breakpoint): Go through the_target->insert_point
8145 instead of assuming memory breakpoint.
8146 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8147 software and hardware breakpoints.
8148 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8149 Check both software and hardware breakpoints.
8150 (validate_inserted_breakpoint): Assert the breakpoint is a
8151 software breakpoint. Set the inserted flag to -1 instead of
8152 setting shlib_disabled.
8153 (delete_disabled_breakpoints): Adjust.
8154 (validate_breakpoints): Only validate software breakpoints.
8155 Adjust to inserted flag change.
8156 (check_mem_read, check_mem_write): Skip breakpoint types other
8157 than software breakpoints. Adjust to inserted flag change.
8158 * mem-break.h (enum raw_bkpt_type): New enum.
8159 (raw_breakpoint, struct process_info): Forward declare.
8160 (Z_packet_to_target_hw_bp_type): Delete declaration.
8161 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8162 (set_gdb_breakpoint, delete_gdb_breakpoint)
8163 (clear_breakpoint_conditions): New declarations.
8164 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8165 (breakpoint_inserted_here): Update comment.
8166 (add_breakpoint_condition, add_breakpoint_commands): Replace
8167 address parameter with a breakpoint pointer parameter.
8168 (gdb_breakpoint_here): Update comment.
8169 (delete_gdb_breakpoint_at): Delete.
8170 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8171 * server.c (process_point_options): Take a struct breakpoint
8172 pointer instead of an address. Adjust.
8173 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8174 delete_gdb_breakpoint.
8175 * spu-low.c (spu_target_ops): Install NULL as
8176 supports_z_point_type method.
8177 * target.h: Include mem-break.h.
8178 (struct target_ops) <prepare_to_access_memory>: Update comment.
8179 <supports_z_point_type>: New field.
8180 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8181 instead of a char. Also take a raw breakpoint pointer.
8182 * win32-arm-low.c (the_low_target): Install NULL as
8183 supports_z_point_type.
8184 * win32-i386-low.c (i386_supports_z_point_type): New function.
8185 (i386_insert_point, i386_remove_point): Adjust to new interface.
8186 (the_low_target): Install i386_supports_z_point_type.
8187 * win32-low.c (win32_supports_z_point_type): New function.
8188 (win32_insert_point, win32_remove_point): Adjust to new interface.
8189 (win32_target_ops): Install win32_supports_z_point_type.
8190 * win32-low.h (struct win32_target_ops):
8191 <supports_z_point_type>: New method.
8192 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8193 instead of a char. Also take a raw breakpoint pointer.
8194
8195 2014-05-20 Pedro Alves <palves@redhat.com>
8196
8197 * mem-break.h: Include break-common.h.
8198 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8199 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8200 (Z_packet_to_target_hw_bp_type): New declaration.
8201 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8202 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8203 (Z_PACKET_ACCESS_WP): Delete macros.
8204 (Z_packet_to_hw_type): Delete function.
8205 * i386-low.h: Don't include break-common.h here.
8206 (Z_packet_to_hw_type): Delete declaration.
8207 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8208 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8209 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8210 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8211 * linux-aarch64-low.c: Don't include break-common.h here.
8212 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8213 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8214 (Z_packet_to_target_hw_bp_type): Delete function.
8215 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8216 function.
8217 (mips_insert_point, mips_remove_point): Use
8218 Z_packet_to_target_hw_bp_type.
8219
8220 2014-05-20 Pedro Alves <palves@redhat.com>
8221
8222 * linux-aarch64-low.c: Include break-common.h.
8223 (enum target_point_type): Delete.
8224 (Z_packet_to_point_type): Rename to ...
8225 (Z_packet_to_target_hw_bp_type): ... this, and return a
8226 target_hw_bp_type instead.
8227 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8228 instead of an enum target_point_type.
8229 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8230 breakpoint type.
8231 (aarch64_dr_state_insert_one_point)
8232 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8233 (aarch64_handle_aligned_watchpoint)
8234 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8235 Take an enum target_hw_bp_type instead of an enum
8236 target_point_type.
8237 (aarch64_supports_z_point_type): New function.
8238 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8239 use Z_packet_to_target_hw_bp_type.
8240
8241 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8242
8243 * configure.ac: Only use -Werror by default when DEVELOPMENT
8244 is true.
8245 * configure: Regenerate.
8246
8247 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8248
8249 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8250 * linux-x86-low.c (X86_64_USER_REGS): New.
8251 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8252
8253 2014-04-28 Yao Qi <yao@codesourcery.com>
8254
8255 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8256 name.
8257
8258 2014-04-25 Pedro Alves <palves@redhat.com>
8259
8260 PR server/16255
8261 * linux-low.c (linux_attach_fail_reason_string): New function.
8262 (linux_attach_lwp): Delete.
8263 (linux_attach_lwp_1): Rename to ...
8264 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8265 argument. Remove "initial" parameter. Return int instead of
8266 void. Don't error or warn here.
8267 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8268 failure to attach to the tgid. Call warning when failing to
8269 attach to an lwp.
8270 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8271 argument. Remove "initial" parameter. Return int instead of
8272 void. Don't error or warn here.
8273 (linux_attach_fail_reason_string): New declaration.
8274 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8275 interface change. Use linux_attach_fail_reason_string.
8276
8277 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8278 Walfred Tedeschi <walfred.tedeschi@intel.com>
8279
8280 * Makefile.in: Added rules to handle new files
8281 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8282 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8283 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8284 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8285 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8286 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8287 x32-avx512-linux.o.
8288 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8289 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8290 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8291 i386/x32-avx512.xml.
8292 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8293 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8294 i386/x32-avx512-linux.xml.
8295 * i387-fp.c (num_avx512_k_registers): New constant for number
8296 of K registers.
8297 (num_avx512_zmmh_low_registers): New constant for number of
8298 lower ZMM registers (0-15).
8299 (num_avx512_zmmh_high_registers): New constant for number of
8300 higher ZMM registers (16-31).
8301 (num_avx512_ymmh_registers): New contant for number of higher
8302 YMM registers (ymm16-31 added by avx521 on x86_64).
8303 (num_avx512_xmm_registers): New constant for number of higher
8304 XMM registers (xmm16-31 added by AVX512 on x86_64).
8305 (struct i387_xsave): Add space for AVX512 registers.
8306 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8307 Add code to handle AVX512 registers.
8308 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8309 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8310 prototypei from generated file.
8311 (tdesc_amd64_avx512_linux): Likewise.
8312 (init_registers_x32_avx512_linux): Likewise.
8313 (tdesc_x32_avx512_linux): Likewise.
8314 (init_registers_i386_avx512_linux): Likewise.
8315 (tdesc_i386_avx512_linux): Likewise.
8316 (x86_64_regmap): Add AVX512 registers.
8317 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8318 mask.
8319 (initialize_low_arch): Add code to initialize AVX512 registers.
8320
8321 2014-04-23 Pedro Alves <palves@redhat.com>
8322
8323 * mem-break.c (find_gdb_breakpoint_at): Make static.
8324 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8325
8326 2014-04-23 Pedro Alves <palves@redhat.com>
8327
8328 * i386-low.c: Don't include break-common.h here.
8329 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8330 prototype to take target_hw_bp_type as argument instead of a Z
8331 packet char.
8332 * i386-low.h: Include break-common.h here.
8333 (Z_packet_to_hw_type): Declare.
8334 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8335 prototypes.
8336 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8337 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8338 (x86_remove_point): Convert the packet number to a
8339 target_hw_bp_type before calling i386_low_remove_watchpoint.
8340 * win32-i386-low.c (i386_insert_point): Convert the packet number
8341 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8342 (i386_remove_point): Convert the packet number to a
8343 target_hw_bp_type before calling i386_low_remove_watchpoint.
8344
8345 2014-04-23 Pedro Alves <palves@redhat.com>
8346
8347 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8348
8349 2014-04-10 Pedro Alves <palves@redhat.com>
8350
8351 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8352 Check if the condition or command is NULL before checking if the
8353 breakpoint is known. On success, return true.
8354 * mem-break.h (add_breakpoint_condition): Document return.
8355 (add_breakpoint_commands): Add describing comment.
8356 * server.c (skip_to_semicolon): New function.
8357 (process_point_options): Use it.
8358
8359 2014-04-09 Pedro Alves <palves@redhat.com>
8360
8361 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8362 to lwpid_of.
8363
8364 2014-02-27 Pedro Alves <palves@redhat.com>
8365
8366 PR 12702
8367 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8368 macros.
8369 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8370 output.
8371 (last_thread_of_process_p): Take a PID argument instead of a
8372 thread pointer.
8373 (linux_wait_for_lwp): Delete.
8374 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8375 functions.
8376 (linux_low_filter_event): New function, party factored out from
8377 linux_wait_for_event.
8378 (linux_wait_for_event): Rename to ...
8379 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8380 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8381 sigsuspend. Check for zombie leaders.
8382 (linux_wait_for_event): Reimplement as wrapper around
8383 linux_wait_for_event_filtered.
8384 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8385 a normal or signal exit is seen, it's the whole process exiting.
8386 (wait_for_sigstop): No longer a for_each_inferior callback.
8387 Rewrite on top of linux_wait_for_event_filtered.
8388 (stop_all_lwps): Call wait_for_sigstop directly.
8389 * server.c (resume, handle_target_event): Handle
8390 TARGET_WAITKIND_NO_RESUMED.
8391
8392 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8393
8394 * win32-low.c (psapi_get_dll_name,
8395 * win32_CreateToolhelp32Snapshot): Delete.
8396 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8397 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8398 Delete.
8399 (handle_load_dll): Add function description.
8400 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8401
8402 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8403
8404 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8405 Add comment.
8406 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8407 base address when calling win32_add_one_solib.
8408 (handle_load_dll): Delete local variable load_addr.
8409 Remove 0x1000 offset applied to DLL base address when calling
8410 win32_add_one_solib.
8411 (handle_unload_dll): Add comment.
8412
8413 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8414
8415 * win32-low.c (win32_add_all_dlls): Renames
8416 win32_ensure_ntdll_loaded. Rewrite function documentation.
8417 Adjust implementation to always load all DLLs.
8418 Add 0x1000 offset to DLL base address when calling
8419 win32_add_one_solib.
8420 (child_initialization_done): New static global.
8421 (do_initial_child_stuff): Set child_initialization_done to
8422 zero during child initialization, and 1 after. Replace call
8423 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8424 Add comment.
8425 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8426 (handle_unload_dll): Add function documentation.
8427 (get_child_debug_event): Ignore load and unload DLL events
8428 during child initialization.
8429
8430 2014-02-20 Doug Evans <dje@google.com>
8431
8432 Remove global all_lwps.
8433 * inferiors.h (ptid_of): Move here from linux-low.h.
8434 (pid_of, lwpid_of): Ditto.
8435 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8436 parameter is a struct thread_info * now.
8437 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8438 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8439 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8440 directly.
8441 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8442 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8443 * linux-arm-low.c (update_registers_callback): Update, "entry"
8444 parameter is a struct thread_info * now.
8445 Fetch lwpid from current_inferior directly.
8446 (arm_insert_point): Pass &all_threads to find_inferior instead of
8447 &all_lwps.
8448 (arm_remove_point): Ditto.
8449 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8450 (arm_prepare_to_resume): Fetch pid from thread.
8451 (arm_read_description): Fetch lwpid from current_inferior directly.
8452 * linux-low.c (all_lwps): Delete.
8453 (delete_lwp): Delete call to remove_inferior.
8454 (handle_extended_wait): Fetch lwpid from thread.
8455 (add_lwp): Don't set lwp->entry.id. Remove call to
8456 add_inferior_to_list.
8457 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8458 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8459 (kill_one_lwp_callback): Ditto.
8460 (linux_kill): Don't dereference NULL pointer.
8461 Fetch ptid,lwpid from thread.
8462 (get_detach_signal): Fetch ptid from thread.
8463 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8464 Simplify call to regcache_invalidate_thread.
8465 (delete_lwp_callback): Update, "entry" parameter is a
8466 struct thread_info * now. Fetch pid from thread.
8467 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8468 (status_pending_p_callback): Update, "entry" parameter is a
8469 struct thread_info * now. Fetch ptid from thread.
8470 (find_lwp_pid): Update, "entry" parameter is a
8471 struct thread_info * now.
8472 (linux_wait_for_lwp): Fetch pid from thread.
8473 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8474 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8475 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8476 (dequeue_one_deferred_signal): Ditto.
8477 (cancel_breakpoint): Fetch ptid from current_inferior.
8478 (linux_wait_for_event): Pass &all_threads to find_inferior,
8479 not &all_lwps. Fetch ptid, lwpid from thread.
8480 (count_events_callback): Update, "entry" parameter is a
8481 struct thread_info * now.
8482 (select_singlestep_lwp_callback): Ditto.
8483 (select_event_lwp_callback): Ditto.
8484 (cancel_breakpoints_callback): Ditto.
8485 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8486 not &all_lwps.
8487 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8488 (unsuspend_one_lwp): Update, "entry" parameter is a
8489 struct thread_info * now.
8490 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8491 not &all_lwps.
8492 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8493 Fetch lwpid from thread, not lwp.
8494 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8495 Pass &all_threads to find_inferior, not &all_lwps.
8496 (send_sigstop): Fetch lwpid from thread, not lwp.
8497 (send_sigstop_callback): Update, "entry" parameter is a
8498 struct thread_info * now.
8499 (suspend_and_send_sigstop_callback): Ditto.
8500 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8501 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8502 struct thread_info * now.
8503 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8504 from thread, lwp.
8505 (lwp_running): Update, "entry" parameter is a
8506 struct thread_info * now.
8507 (stop_all_lwps): Fetch ptid from thread.
8508 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8509 (linux_resume_one_lwp): Fetch lwpid from thread.
8510 (linux_set_resume_request): Update, "entry" parameter is a
8511 struct thread_info * now. Fetch pid, lwpid from thread.
8512 (resume_status_pending_p): Update, "entry" parameter is a
8513 struct thread_info * now.
8514 (need_step_over_p): Ditto. Fetch lwpid from thread.
8515 (start_step_over): Fetch lwpid from thread.
8516 (linux_resume_one_thread): Update, "entry" parameter is a
8517 struct thread_info * now. Fetch lwpid from thread.
8518 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8519 (proceed_one_lwp): Update, "entry" parameter is a
8520 struct thread_info * now. Fetch lwpid from thread.
8521 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8522 struct thread_info * now.
8523 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8524 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8525 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8526 directly.
8527 (regsets_store_inferior_registers): Ditto.
8528 (fetch_register, store_register): Ditto.
8529 (linux_read_memory, linux_write_memory): Ditto.
8530 (linux_request_interrupt): Ditto.
8531 (linux_read_auxv): Ditto.
8532 (linux_xfer_siginfo): Ditto.
8533 (linux_qxfer_spu): Ditto.
8534 (linux_qxfer_libraries_svr4): Ditto.
8535 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8536 moved to inferiors.h.
8537 (get_lwp): Delete.
8538 (get_thread_lwp): Update.
8539 (struct lwp_info): Delete member "entry". Simplify comment for
8540 member "thread".
8541 (all_lwps): Delete.
8542 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8543 current_inferior directly.
8544 (update_watch_registers_callback): Update, "entry" parameter is a
8545 struct thread_info * now. Fetch pid from thread.
8546 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8547 (mips_insert_point): Fetch lwpid from current_inferior.
8548 Pass &all_threads to find_inferior, not &all_lwps.
8549 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8550 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8551 directly.
8552 (mips_stopped_data_address): Ditto.
8553 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8554 directly.
8555 * linux-tile-low.c (tile_arch_setup): Ditto.
8556 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8557 (update_debug_registers_callback): Update, "entry" parameter is a
8558 struct thread_info * now. Fetch pid from thread.
8559 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8560 Pass &all_threads to find_inferior, not &all_lwps.
8561 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8562 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8563 Pass &all_threads to find_inferior, not &all_lwps.
8564 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8565 (i386_dr_low_get_status): Ditto.
8566 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8567 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8568 (x86_linux_read_description): Ditto.
8569 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8570
8571 2014-02-20 Doug Evans <dje@google.com>
8572
8573 * inferiors.c (get_first_inferior): Fix buglet.
8574
8575 2014-02-19 Doug Evans <dje@google.com>
8576
8577 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8578 * inferiors.c (add_thread): Change result type to struct thread_info *.
8579 All callers updated.
8580 (add_lwp): Call add_thread here instead of in callers.
8581 All callers updated.
8582 * linux-low.h (get_lwp_thread): Rewrite.
8583 (struct lwp_info): New member "thread".
8584
8585 2014-02-19 Doug Evans <dje@google.com>
8586
8587 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8588 All callers updated.
8589
8590 2014-02-19 Doug Evans <dje@google.com>
8591
8592 * inferiors.c (add_thread): Fix whitespace.
8593
8594 2014-02-19 Doug Evans <dje@google.com>
8595
8596 * dll.c (clear_dlls): Replace accessing list implemention details
8597 with API function.
8598 * gdbthread.h (get_first_thread): Declare.
8599 * inferiors.c (for_each_inferior_with_data): New function.
8600 (get_first_thread): New function.
8601 (find_thread_ptid): Simplify.
8602 (get_first_inferior): New function.
8603 (clear_list): Delete.
8604 (one_inferior_p): New function.
8605 (clear_inferior_list): New function.
8606 (clear_inferiors): Update.
8607 * inferiors.h (for_each_inferior_with_data): Declare.
8608 (clear_inferior_list): Declare.
8609 (one_inferior_p): Declare.
8610 (get_first_inferior): Declare.
8611 * linux-low.c (linux_wait_for_event): Replace accessing list
8612 implemention details with API function.
8613 * server.c (target_running): Ditto.
8614 (accumulate_file_name_length): New function.
8615 (emit_dll_description): New function.
8616 (handle_qxfer_libraries): Replace accessing list implemention
8617 details with API function.
8618 (handle_qxfer_threads_worker): New function.
8619 (handle_qxfer_threads_proper): Replace accessing list implemention
8620 details with API function.
8621 (handle_query): Ditto.
8622 (visit_actioned_threads_callback_ftype): New typedef.
8623 (visit_actioned_threads_data): New struct.
8624 (visit_actioned_threads): Rewrite to be find_inferior callback.
8625 (resume): Call find_inferior.
8626 (handle_status): Replace accessing list implemention
8627 details with API function.
8628 (process_serial_event): Replace accessing list implemention details
8629 with API function.
8630 * target.c (set_desired_inferior): Replace accessing list implemention
8631 details with API function.
8632 * tracepoint.c (same_process_p): New function.
8633 (gdb_agent_about_to_close): Replace accessing list implemention
8634 details with API function.
8635 * win32-low.c (child_delete_thread): Replace accessing list
8636 implemention details with API function.
8637 (match_dll_by_basename): New function.
8638 (dll_is_loaded_by_basename): New function.
8639 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8640 details call to dll_is_loaded_by_basename.
8641
8642 2014-02-19 Doug Evans <dje@google.com>
8643
8644 * dll.h (struct dll_info): Add comment.
8645 * gdbthread.h (struct thread_info): Add comment.
8646 (current_ptid): Simplify.
8647 * inferiors.c (add_process): Update.
8648 (remove_process): Update.
8649 * inferiors.h (struct process_info): Rename member "head" to "entry".
8650 * linux-low.c (delete_lwp): Update.
8651 (add_lwp): Update.
8652 (last_thread_of_process_p): Update.
8653 (kill_one_lwp_callback, linux_kill): Update.
8654 (status_pending_p_callback): Update.
8655 (wait_for_sigstop): Update. Simplify read of ptid.
8656 (start_step_over): Update.
8657 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8658 (get_lwp_thread): Update.
8659 (struct lwp_info): Rename member "head" to "entry".
8660 * regcache.h (inferior_list_entry): Delete.
8661 * server.c (kill_inferior_callback): Update.
8662 (detach_or_kill_inferior_callback): Update.
8663 (print_started_pid): Update.
8664 (print_attached_pid): Update.
8665 (process_serial_event): Simplify read of ptid.
8666 * thread-db.c (thread_db_create_event): Update.
8667 (thread_db_get_tls_address): Update.
8668 * win32-low.c (current_inferior_ptid): Simplify.
8669
8670 2014-02-19 Tom Tromey <tromey@redhat.com>
8671
8672 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8673 argument.
8674 (target_supports_btrace): Update.
8675
8676 2014-02-14 Yao Qi <yao@codesourcery.com>
8677
8678 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8679 (rsp-low-ipa.o): New target.
8680
8681 2014-02-12 Tom Tromey <tromey@redhat.com>
8682
8683 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8684 convert_ascii_to_int.
8685 * regcache.c (registers_to_string): Likewise.
8686 * remote-utils.c (decode_M_packet): Likewise.
8687 * server.c (process_serial_event): Likewise.
8688
8689 2014-02-12 Tom Tromey <tromey@redhat.com>
8690
8691 * server.c (handle_query, handle_v_run): Use hex2bin, not
8692 unhexify.
8693 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8694
8695 2014-02-12 Tom Tromey <tromey@redhat.com>
8696
8697 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8698 convert_int_to_ascii.
8699 * regcache.c (registers_to_string, collect_register_as_string):
8700 Likewise.
8701 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8702 Likewise.
8703 * server.c (process_serial_event): Likewise.
8704 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8705 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8706
8707 2014-02-12 Tom Tromey <tromey@redhat.com>
8708
8709 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8710 bin2hex, not hexify.
8711 * tracepoint.c (cmd_qtstatus): Likewise.
8712
8713 2014-02-12 Tom Tromey <tromey@redhat.com>
8714
8715 * remote-utils.c (monitor_output): Pass explicit length to
8716 hexify.
8717
8718 2014-02-12 Tom Tromey <tromey@redhat.com>
8719
8720 * tracepoint.c: Include rsp-low.h.
8721 * server.c: Include rsp-low.h.
8722 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8723 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8724 declare.
8725 * remote-utils.c: Include rsp-low.h.
8726 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8727 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8728 (convert_int_to_ascii, convert_ascii_to_int): Move to
8729 common/rsp-low.c.
8730 * regcache.c: Include rsp-low.h.
8731 * ax.c: Include rsp-low.h.
8732 * Makefile.in (SFILES): Add common/rsp-low.c.
8733 (OBS): Add rsp-low.o.
8734 (rsp-low.o): New target.
8735
8736 2014-02-12 Tom Tromey <tromey@redhat.com>
8737
8738 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8739 Include print-utils.h.
8740 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8741 (plongest, thirty_two, phex_nz): Remove.
8742 * Makefile.in (SFILES): Add common/print-utils.c.
8743 (OBS): Add print-utils.o.
8744 (print-utils-ipa.o): New target.
8745 (print-utils.o): New target.
8746 (IPA_OBJS): Add print-utils-ipa.o.
8747
8748 2014-02-06 Tom Tromey <tromey@redhat.com>
8749
8750 * Makefile.in (SFILES): Fix indentation.
8751
8752 2014-02-05 Doug Evans <dje@google.com>
8753
8754 * linux-low.c (linux_wait_for_event): Improve comment.
8755 (linux_wait_1): Keep current_inferior in sync with event_child.
8756
8757 2014-01-22 Doug Evans <dje@google.com>
8758
8759 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8760
8761 2014-01-22 Doug Evans <dje@google.com>
8762
8763 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8764 * configure: Regenerate.
8765 * config.in: Regenerate.
8766 * Makefile.in (SFILES): Add debug.c.
8767 (OBS): Add debug.o.
8768 * debug.c: New file.
8769 * debug.h: New file.
8770 * linux-aarch64-low.c (*): Update all debugging printfs to use
8771 debug_printf instead of fprintf.
8772 * linux-arm-low.c (*): Ditto.
8773 * linux-cris-low.c (*): Ditto.
8774 * linux-crisv32-low.c (*): Ditto.
8775 * linux-m32r-low.c (*): Ditto.
8776 * linux-sparc-low.c (*): Ditto.
8777 * linux-x86.c (*): Ditto.
8778 * linux-low.c (*): Ditto.
8779 (linux_wait_1): Add calls to debug_enter, debug_exit.
8780 (linux_wait): Remove redundant debugging printf.
8781 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8782 (linux_resume, unstop_all_lwps): Ditto.
8783 * mem-break.c (*): Update all debugging printfs to use
8784 debug_printf instead of fprintf.
8785 * remote-utils.c (*): Ditto.
8786 * thread-db.c (*): Ditto.
8787 * server.c #include <ctype.h>, "gdb_vecs.h".
8788 (debug_threads): Moved to debug.c.
8789 (*): Update all debugging printfs to use debug_printf instead of
8790 fprintf.
8791 (start_inferior): Replace call to fflush with call to debug_flush.
8792 (monitor_show_help): Mention set debug-format.
8793 (parse_debug_format_options): New function.
8794 (handle_monitor_command): Handle "monitor set debug-format".
8795 (gdbserver_usage): Mention --debug-format.
8796 (main): Parse --debug-format.
8797 * server.h (debug_threads): Declaration moved to debug.h.
8798 #include "debug.h".
8799 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8800 trace_debug_1 that uses debug_printf.
8801 (tracepoint_look_up_symbols): Update all debugging printfs to use
8802 debug_printf instead of fprintf.
8803
8804 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8805
8806 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8807 sys/ptrace.h.
8808
8809 2014-01-17 Pedro Alves <palves@redhat.com>
8810
8811 PR build/16445
8812 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8813 defined after including gdb_proc_service.h.
8814
8815 2014-01-16 Doug Evans <dje@google.com>
8816
8817 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8818 (match_dll): Use it.
8819
8820 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8821
8822 * target.h (target_ops) <read_btrace>: Change parameters and
8823 return type to allow error reporting.
8824 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8825 trace reading errors on.
8826 * linux-low.c (linux_low_read_btrace): Pass trace reading
8827 errors on.
8828 (linux_low_disable_btrace): New.
8829
8830 2014-01-15 Doug Evans <dje@google.com>
8831
8832 * inferiors.c (thread_id_to_gdb_id): Delete.
8833 * inferiors.h (thread_id_to_gdb_id): Delete.
8834
8835 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8836
8837 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8838 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8839 versions.
8840
8841 2014-01-08 Pedro Alves <palves@redhat.com>
8842
8843 * server.c (handle_status): Don't discard previous queued stop
8844 replies or thread's pending status here.
8845 (main) <disconnection>: Do it here instead.
8846
8847 2014-01-08 Pedro Alves <palves@redhat.com>
8848
8849 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8850 * server.c (visit_actioned_threads, handle_pending_status): New
8851 function.
8852 (handle_v_cont): Factor out parts to ...
8853 (resume): ... this new function. If in all-stop, and a thread
8854 being resumed has a pending status, report it without actually
8855 resuming.
8856 (myresume): Adjust to use the new 'resume' function.
8857 (clear_pending_status_callback, set_pending_status_callback)
8858 (find_status_pending_thread_callback): New functions.
8859 (handle_status): Handle the case of multiple threads having
8860 interesting statuses to report. Report threads' real last signal
8861 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8862 with an interesting thread to report the status for, instead of
8863 always reporting the status of the first thread.
8864
8865 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8866
8867 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8868 * gdbreplay.c (gdbreplay_version): Likewise.
8869
8870 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8871
8872 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8873 iov.iov_len with the real length in use.
8874
8875 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8876
8877 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8878 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8879 for all targets that use win32-low.c.
8880 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8881 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8882
8883 2013-12-13 Pedro Alves <palves@redhat.com>
8884
8885 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8886 if equal to TARGET_WAITKIND_LOADED.
8887 * win32-low.c (cached_status): New static global.
8888 (win32_wait): Add declaration.
8889 (do_initial_child_stuff): Flush all initial pending debug events
8890 up to the initial breakpoint.
8891 (win32_wait): If CACHED_STATUS was set, return that instead
8892 of doing a real wait. Remove the code resuming the execution
8893 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8894 during the initial phase. Also remove the code changing
8895 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8896 TARGET_WAITKIND_STOPPED.
8897
8898 2013-12-11 Yao Qi <yao@codesourcery.com>
8899
8900 * notif.c (handle_notif_ack): Return 0 if no notification
8901 matches.
8902
8903 2013-11-20 Doug Evans <dje@google.com>
8904
8905 * linux-low.c (linux_set_resume_request): Fix comment.
8906
8907 2013-11-20 Doug Evans <dje@google.com>
8908
8909 * linux-low.c (resume_status_pending_p): Tweak comment.
8910
8911 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8912
8913 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8914 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8915 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8916 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8917 (srv_amd64_regobj): Add amd64-mpx.o.
8918 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8919 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8920 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8921 * i387-fp.c (num_pl_bnd_register) Added constant.
8922 (num_pl_bnd_cfg_registers) Added constant.
8923 (struct i387_xsave) Added reserved area and MPX fields.
8924 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8925 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8926 function.
8927 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8928 (init_registers_amd64_mpx_linux): Declare new function.
8929 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8930 (x86_64_regmap): Add MPX registers.
8931 (x86_linux_read_description): Add MPX case.
8932 (initialize_low_arch): Initialize MPX targets.
8933
8934 2013-11-18 Tom Tromey <tromey@redhat.com>
8935
8936 * configure: Rebuild.
8937 * configure.ac: Don't check for stdlib.h.
8938 * gdbreplay.c: Unconditionally include stdlib.h.
8939
8940 2013-11-18 Tom Tromey <tromey@redhat.com>
8941
8942 * config.in: Rebuild.
8943 * configure: Rebuild.
8944 * configure.ac: Don't use AC_HEADER_DIRENT.
8945
8946 2013-11-18 Tom Tromey <tromey@redhat.com>
8947
8948 * server.h: Don't check HAVE_STRING_H.
8949 * gdbreplay.c: Don't check HAVE_STRING_H.
8950 * configure: Rebuild.
8951
8952 2013-11-18 Tom Tromey <tromey@redhat.com>
8953
8954 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8955 LIBGNU.
8956
8957 2013-11-08 Tom Tromey <tromey@redhat.com>
8958
8959 * configure, config.in: Rebuild.
8960 * configure.ac: Remove unused configury.
8961
8962 2013-11-08 Tom Tromey <tromey@redhat.com>
8963
8964 * acinclude.m4: Include common.m4, codeset.m4.
8965 * configure, config.in: Rebuild.
8966 * configure.ac: Use GDB_AC_COMMON.
8967
8968 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8969
8970 * linux-s390-low.c (HWCAP_S390_TE): New define.
8971 (s390_arch_setup): Consider the TE field in the HWCAP for
8972 determining 'have_regset_tdb'.
8973
8974 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8975
8976 PR gdb/16014
8977 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8978 call to sizeof.
8979
8980 2013-10-02 Pedro Alves <palves@redhat.com>
8981
8982 * server.c (process_serial_event): Don't output "GDBserver
8983 exiting" if GDB is connected through stdio.
8984 * target.c (mywait): Likewise, be silent if GDB is connected
8985 through stdio.
8986
8987 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8988
8989 * lynx-low.c (lynx_add_threads_after_attach): New function.
8990 (lynx_attach): Remove call to add_thread. Add call to
8991 lynx_add_threads_after_attach instead.
8992
8993 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8994
8995 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8996 * config.in, configure: Regenerated.
8997
8998 2013-09-18 Yao Qi <yao@codesourcery.com>
8999
9000 PR server/15959
9001 * server.c (start_inferior): Clear 'resume_info'.
9002
9003 2013-09-16 Jiong Wang <jiwang@tilera.com>
9004
9005 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9006 for each register.
9007
9008 2013-09-16 Jiong Wang <jiwang@tilera.com>
9009
9010 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9011 linux-tile-low.o to srv_tgtobj.
9012
9013 2013-09-16 Will Newton <will.newton@linaro.org>
9014
9015 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9016 out regs.
9017
9018 2013-09-06 Pedro Alves <palves@redhat.com>
9019
9020 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9021 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9022 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9023 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9024 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9025 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9026
9027 2013-09-06 Pedro Alves <palves@redhat.com>
9028
9029 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9030 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9031
9032 2013-09-06 Pedro Alves <palves@redhat.com>
9033
9034 * linux-amd64-ipa.c: Include tracepoint.h.
9035 * linux-i386-ipa.c: Include tracepoint.h.
9036
9037 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9038
9039 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9040 (ps_get_thread_area): New function.
9041
9042 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9043
9044 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9045 (initialize_low_arch): Call init_registers_crisv32 rather than
9046 init_register_crisv32.
9047
9048 2013-09-05 Pedro Alves <palves@redhat.com>
9049
9050 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9051 to ...
9052 * hostio.h: ... this new file.
9053 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9054 win32-low.c: Include hostio.h.
9055
9056 2013-09-05 Pedro Alves <palves@redhat.com>
9057
9058 * server.h (gdb_client_data, handler_func, callback_handler_func)
9059 (delete_file_handler, add_file_handler, append_callback_event)
9060 (delete_callback_event, start_event_loop, initialize_event_loop):
9061 Move to event-loop.h and include it.
9062 * event-loop.h: New file.
9063
9064 2013-09-05 Pedro Alves <palves@redhat.com>
9065
9066 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9067 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9068 (loaded_dll, unloaded_dll): Move to ...
9069 * dll.h: ... this new file.
9070 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9071
9072 2013-09-05 Pedro Alves <palves@redhat.com>
9073
9074 * server.h (current_process, get_thread_process, all_processes)
9075 (add_inferior_to_list, for_each_inferior, current_inferior)
9076 (remove_inferior, add_process, remove_process, find_process_pid)
9077 (have_started_inferiors_p, have_attached_inferiors_p)
9078 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9079 (clear_inferiors, find_inferior, find_inferior_id)
9080 (inferior_target_data, set_inferior_target_data)
9081 (inferior_regcache_data, set_inferior_regcache_data): Move to
9082 inferiors.h, and include it.
9083 * inferiors.h: New file.
9084
9085 2013-09-05 Pedro Alves <palves@redhat.com>
9086
9087 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9088 Move ...
9089 * ax.h: ... here.
9090
9091 2013-09-05 Pedro Alves <palves@redhat.com>
9092
9093 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9094 tracepoint.h.
9095 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9096 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9097 (handle_tracepoint_general_set, handle_tracepoint_query)
9098 (tracepoint_finished_step, tracepoint_was_hit)
9099 (release_while_stepping_state_list, current_traceframe)
9100 (in_readonly_region, traceframe_read_mem)
9101 (fetch_traceframe_registers, traceframe_read_sdata)
9102 (traceframe_read_info, struct fast_tpoint_collect_status)
9103 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9104 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9105 (supply_fast_tracepoint_registers)
9106 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9107 (ipa_tdesc, claim_trampoline_space)
9108 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9109 (agent_mem_read, agent_get_trace_state_variable_value)
9110 (agent_set_trace_state_variable_value, agent_tsv_read)
9111 (agent_mem_read_string, get_raw_reg_func_addr)
9112 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9113 * tracepoint.h: ... this new file.
9114
9115 2013-09-05 Pedro Alves <palves@redhat.com>
9116
9117 * server.h (perror_with_name, error, fatal, warning, paddress)
9118 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9119 include it.
9120 * utils.h: New file.
9121
9122 2013-09-05 Pedro Alves <palves@redhat.com>
9123
9124 * server.h (remote_debug, noack_mode, transport_is_reliable)
9125 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9126 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9127 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9128 (write_enn, initialize_async_io, enable_async_io)
9129 (disable_async_io, check_remote_input_interrupt_request)
9130 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9131 (dead_thread_notify, prepare_resume_reply)
9132 (decode_address_to_semicolon, decode_address, decode_m_packet)
9133 (decode_M_packet, decode_X_packet, decode_xfer_write)
9134 (decode_search_memory_packet, unhexify, hexify)
9135 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9136 (look_up_one_symbol, relocate_instruction)
9137 (monitor_output): Move to remote-utils.h, and include it.
9138 * remote-utils.h: New file.
9139
9140 2013-09-05 Pedro Alves <palves@redhat.com>
9141
9142 * server.h (_): Delete.
9143
9144 2013-09-02 Pedro Alves <palves@redhat.com>
9145
9146 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9147 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9148 allocated.
9149 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9150
9151 2013-09-02 Pierre Muller <muller@sourceware.org>
9152
9153 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9154 or WriteProcessMemory complete successfully and handle
9155 ERROR_PARTIAL_COPY error.
9156
9157 2013-09-02 Pedro Alves <palves@redhat.com>
9158
9159 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9160 error instead of EIO.
9161
9162 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9163
9164 PR server/15604
9165 * linux-low.c: Include filestuff.h.
9166 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9167 * lynx-low.c: Include filestuff.h.
9168 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9169 * server.c: Include filestuff.h.
9170 (main): Call notice_open_fds.
9171 * spu-low.c: Include filestuff.h.
9172 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9173
9174 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9175
9176 * Makefile.in: Explain why ../target and ../nat are not
9177 listed as include file search paths.
9178 (linux-waitpid.o): New object file rule.
9179 * configure.srv (srv_native_linux_obj): New variable.
9180 Replace all occurrences of linux native object files with
9181 $srv_native_linux_obj.
9182 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9183 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9184 (linux_enable_event_reporting): Remove declaration.
9185 (my_waitpid): Moved to common/linux-waitpid.c.
9186 (linux_wait_for_event): Pass ptid when calling
9187 linux_enable_event_reporting.
9188 (linux_supports_tracefork_flag): Remove.
9189 (linux_enable_event_reporting): Likewise.
9190 (linux_tracefork_grandchild): Remove.
9191 (STACK_SIZE): Moved to common/linux-ptrace.c.
9192 (linux_tracefork_child): Remove.
9193 (linux_test_for_tracefork): Remove.
9194 (linux_look_up_symbols): Call linux_supports_traceclone.
9195 (initialize_low): Remove call to linux_test_for_tracefork.
9196 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9197 common/linux-ptrace.h.
9198 (PTRACE_TYPE_ARG4): Likewise.
9199 Include linux-ptrace.h.
9200
9201 2013-08-21 Pedro Alves <palves@redhat.com>
9202
9203 * config.in: Renegerate.
9204
9205 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9206
9207 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9208 (SFILES): Remove $(srcdir)/common/target-common.c and
9209 add $(srcdir)/target/waitstatus.c.
9210 (OBS): Remove target-common.o and add waitstatus.o.
9211 (server_h): Remove $(srcdir)/../common/target-common.h and
9212 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9213 and $(srcdir)/../target/waitstatus.h.
9214 (target-common.o): Remove.
9215 (waitstatus.o): New target object file.
9216 * target.h: Do not include target-common.h and
9217 include target/resume.h, target/wait.h and
9218 target/waitstatus.h.
9219
9220 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9221
9222 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9223 to PTRACE_TYPE_ARG3.
9224 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9225 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9226 PTRACE_TYPE_ARG4.
9227 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9228 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9229
9230 2013-07-27 Jie Zhang <jie@codesourcery.com>
9231 Daniel Jacobowitz <dan@codesourcery.com>
9232 Yao Qi <yao@codesourcery.com>
9233
9234 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9235 (mips-linux-watch.o): New rule.
9236 (mips_linux_watch_h): New variable.
9237 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9238 srv_tgtobj.
9239 * linux-mips-low.c: Include mips-linux-watch.h.
9240 (struct arch_process_info, struct arch_lwp_info): New.
9241 (update_watch_registers_callback): New function.
9242 (mips_linux_new_process, mips_linux_new_thread) New functions.
9243 (mips_linux_prepare_to_resume, mips_insert_point): New
9244 functions.
9245 (mips_remove_point, mips_stopped_by_watchpoint): New
9246 functions.
9247 (rsp_bp_type_to_target_hw_bp_type): New function.
9248 (mips_stopped_data_address): New function.
9249 (the_low_target): Add watchpoint support functions.
9250
9251 2013-07-27 Yao Qi <yao@codesourcery.com>
9252
9253 * i386-low.c: Include break-common.h.
9254 (enum target_hw_bp_type): Remove.
9255
9256 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9257
9258 * Makefile.in (SFILES): /common/target-common.c.
9259 (OBS): Add target-common.o.
9260 (server_h): Add $(srcdir)/../common/target-common.h.
9261 (target-common.o): New target.
9262 * server.c (queue_stop_reply_callback): Free
9263 status string after use.
9264 * target.c (target_waitstatus_to_string): Remove.
9265 * target.h: Include target-common.h.
9266 (resume_kind): Likewise.
9267 (target_waitkind): Likewise.
9268 (target_waitstatus): Likewise.
9269 (TARGET_WNOHANG): Likewise.
9270
9271 2013-07-04 Yao Qi <yao@codesourcery.com>
9272
9273 * Makefile.in (host_alias): Use @host_noncanonical@.
9274 (target_alias): Use @target_noncanonical@.
9275 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9276 ACX_NONCANONICAL_HOST.
9277 * configure: Regenerated.
9278
9279 Revert:
9280 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9281
9282 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9283 * configure: Rebuild.
9284 * Makefile.in (version_host, version_target): Get from configure.
9285 (version.c): Use $(version_host) and $(version_target).
9286
9287 2013-07-03 Pedro Alves <palves@redhat.com>
9288
9289 * Makefile.in (config.status): Depend on development.sh.
9290 * acinclude.m4: Include libmcheck.m4.
9291 * configure: Regenerate.
9292
9293 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9294
9295 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9296 attribute inside the parentheses.
9297 (winapi_DebugSetProcessKillOnExit): Ditto.
9298 (winapi_DebugBreakProcess): Ditto.
9299 (winapi_GenerateConsoleCtrlEvent): Ditto.
9300
9301 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9302
9303 * notif.h (notif_event): Add a dummy member to avoid compiler
9304 errors.
9305
9306 2013-07-01 Pedro Alves <palves@redhat.com>
9307
9308 * hostio.c (HOSTIO_PATH_MAX): Define.
9309 (require_filename, handle_open, handle_unlink, handle_readlink):
9310 Use it.
9311
9312 2013-07-01 Pedro Alves <palves@redhat.com>
9313
9314 * server.h: Include "pathmax.h".
9315 * linux-low.c: Don't include sys/param.h.
9316 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9317 MAXPATHLEN.
9318 * win32-low.c: Don't include sys/param.h.
9319 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9320
9321 2013-07-01 Pedro Alves <palves@redhat.com>
9322
9323 * event-loop.c: Don't check HAVE_UNISTD_H before including
9324 <unistd.h>.
9325 * gdbreplay.c: Likewise.
9326 * remote-utils.c: Likewise.
9327 * server.c: Likewise.
9328 * configure.ac: Don't check for unistd.h.
9329 * configure: Regenerate.
9330
9331 2013-06-28 Tom Tromey <tromey@redhat.com>
9332
9333 * Makefile.in (version.c): Use version.in, not
9334 common/version.in.
9335
9336 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9337
9338 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9339 * configure: Rebuild.
9340 * Makefile.in (version_host, version_target): Get from configure.
9341 (version.c): Use $(version_host) and $(version_target).
9342
9343 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9344
9345 Fix trace-status to output user name without trailing colon.
9346 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9347
9348 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9349
9350 Fix trace-status to output proper start-time and stop-time.
9351 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9352 output start time and stop time in hex as gdb expects.
9353
9354 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9355
9356 * tracepoint.c (build_traceframe_info_xml): Output trace state
9357 variables present in the trace buffer.
9358
9359 2013-06-24 Tom Tromey <tromey@redhat.com>
9360
9361 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9362 create-version.sh.
9363 (version.o): Remove.
9364 * gdbreplay.c: Include version.h.
9365 (version, host_name): Don't declare.
9366 * server.h: Include version.h.
9367 (version, host_name): Don't declare.
9368
9369 2013-06-12 Pedro Alves <palves@redhat.com>
9370
9371 * linux-x86-low.c (linux_is_elf64): Delete global.
9372 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9373 with local linux_pid_exe_is_elf_64_file use.
9374
9375 2013-06-11 Pedro Alves <palves@redhat.com>
9376
9377 * linux-low.c (regset_disabled, disable_regset): New functions.
9378 (regsets_fetch_inferior_registers)
9379 (regsets_store_inferior_registers): Use them.
9380 (initialize_regsets_info); Don't allocate the disabled_regsets
9381 array here.
9382 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9383 comment.
9384
9385 2013-06-11 Pedro Alves <palves@redhat.com>
9386
9387 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9388 xmalloc.
9389
9390 2013-06-11 Pedro Alves <palves@redhat.com>
9391
9392 * linux-x86-low.c (initialize_low_arch): Call
9393 init_registers_x32_avx_linux.
9394
9395 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9396
9397 Fix compatibility with Android Bionic.
9398 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9399 it is not empty.
9400
9401 2013-06-07 Pedro Alves <palves@redhat.com>
9402
9403 PR server/14823
9404 * Makefile.in (OBS): Add tdesc.o.
9405 (IPA_OBJS): Add tdesc-ipa.o.
9406 (tdesc-ipa.o): New rule.
9407 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9408 interface.
9409 * linux-low.c (new_inferior): Delete.
9410 (disabled_regsets, num_regsets): Delete.
9411 (linux_add_process): Adjust to set the new per-process
9412 new_inferior flag.
9413 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9414 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9415 was a stop. When calling arch_setup, switch the current inferior
9416 to the thread that got an event.
9417 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9418 (regsets_fetch_inferior_registers)
9419 (regsets_store_inferior_registers): New regsets_info parameter.
9420 Adjust to use it.
9421 (linux_register_in_regsets): New regs_info parameter. Adjust to
9422 use it.
9423 (register_addr, fetch_register, store_register): New usrregs_info
9424 parameter. Adjust to use it.
9425 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9426 parameter regs_info. Adjust to use it.
9427 (linux_fetch_registers): Get the current inferior's regs_info, and
9428 adjust to use it.
9429 (linux_store_registers): Ditto.
9430 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9431 (initialize_low): Don't initialize the target_regsets here. Call
9432 initialize_low_arch.
9433 * linux-low.h (target_regsets): Delete declaration.
9434 (struct regsets_info): New.
9435 (struct usrregs_info): New.
9436 (struct regs_info): New.
9437 (struct process_info_private) <new_inferior>: New field.
9438 (struct linux_target_ops): Delete the num_regs, regmap, and
9439 regset_bitmap fields. New field regs_info.
9440 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9441 * i387-fp.c (num_xmm_registers): Delete.
9442 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9443 calls to new interface.
9444 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9445 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9446 Infer the number of xmm registers from the regcache's target
9447 description.
9448 * i387-fp.h (num_xmm_registers): Delete.
9449 * inferiors.c (add_thread): Don't install the thread's regcache
9450 here.
9451 * proc-service.c (gregset_info): Fetch the current inferior's
9452 regs_info. Adjust to use it.
9453 * regcache.c: Include tdesc.h.
9454 (register_bytes, reg_defs, num_registers)
9455 (gdbserver_expedite_regs): Delete.
9456 (get_thread_regcache): If the thread doesn't have a regcache yet,
9457 create one, instead of aborting gdbserver.
9458 (regcache_invalidate_one): Rename to ...
9459 (regcache_invalidate_thread): ... this.
9460 (regcache_invalidate_one): New.
9461 (regcache_invalidate): Only invalidate registers of the current
9462 process.
9463 (init_register_cache): Add target_desc parameter, and use it.
9464 (new_register_cache): Ditto. Assert the target description has a
9465 non zero registers_size.
9466 (regcache_cpy): Add assertions. Adjust.
9467 (realloc_register_cache, set_register_cache): Delete.
9468 (registers_to_string, registers_from_string): Adjust.
9469 (find_register_by_name, find_regno, find_register_by_number)
9470 (register_cache_size): Add target_desc parameter, and use it.
9471 (free_register_cache_thread, free_register_cache_thread_one)
9472 (regcache_release, register_cache_size): New.
9473 (register_size): Add target_desc parameter, and use it.
9474 (register_data, supply_register, supply_register_zeroed)
9475 (supply_regblock, supply_register_by_name, collect_register)
9476 (collect_register_as_string, collect_register_by_name): Adjust.
9477 * regcache.h (struct target_desc): Forward declare.
9478 (struct regcache) <tdesc>: New field.
9479 (init_register_cache, new_register_cache): Add target_desc
9480 parameter.
9481 (regcache_invalidate_thread): Declare.
9482 (regcache_invalidate_one): Delete declaration.
9483 (regcache_release): Declare.
9484 (find_register_by_number, register_cache_size, register_size)
9485 (find_regno): Add target_desc parameter.
9486 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9487 declarations.
9488 * remote-utils.c: Include tdesc.h.
9489 (outreg, prepare_resume_reply): Adjust.
9490 * server.c: Include tdesc.h.
9491 (gdbserver_xmltarget): Delete declaration.
9492 (get_features_xml, process_serial_event): Adjust.
9493 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9494 declare.
9495 (struct process_info) <tdesc>: New field.
9496 (ipa_tdesc): Declare.
9497 * tdesc.c: New file.
9498 * tdesc.h: New file.
9499 * tracepoint.c: Include tdesc.h.
9500 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9501 (get_context_regcache): Adjust to pass ipa_tdesc down.
9502 (do_action_at_tracepoint): Adjust to get the register cache size
9503 from the context regcache's description.
9504 (traceframe_walk_blocks): Adjust to get the register cache size
9505 from the current trace frame's description.
9506 (traceframe_get_pc): Adjust to get current trace frame's
9507 description and pass it down.
9508 (gdb_collect): Adjust to get the register cache size from the
9509 IPA's description.
9510 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9511 (gdbserver_xmltarget): Delete.
9512 (initialize_low_tracepoint): Set the ipa's target description.
9513 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9514 (initialize_low_tracepoint): Set the ipa's target description.
9515 * linux-x86-low.c: Include tdesc.h.
9516 [__x86_64__] (is_64bit_tdesc): New.
9517 (ps_get_thread_area, x86_get_thread_area): Use it.
9518 (i386_cannot_store_register): Rename to ...
9519 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9520 (i386_cannot_fetch_register): Rename to ...
9521 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9522 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9523 to new interface.
9524 (target_regsets): Rename to ...
9525 (x86_regsets): ... this.
9526 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9527 interface.
9528 (x86_siginfo_fixup): Use is_64bit_tdesc.
9529 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9530 (tdesc_x32_avx_linux, tdesc_x32_linux)
9531 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9532 Declare.
9533 (x86_linux_update_xmltarget): Delete.
9534 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9535 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9536 (AMD64_LINUX_USER64_CS): New.
9537 (x86_linux_read_description): New, based on
9538 x86_linux_update_xmltarget.
9539 (same_process_callback): New.
9540 (x86_arch_setup_process_callback): New.
9541 (x86_linux_update_xmltarget): New.
9542 (x86_regsets_info): New.
9543 (amd64_linux_regs_info): New.
9544 (i386_linux_usrregs_info): New.
9545 (i386_linux_regs_info): New.
9546 (x86_linux_regs_info): New.
9547 (x86_arch_setup): Reimplement.
9548 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9549 (x86_emit_ops): Ditto.
9550 (the_low_target): Adjust. Install x86_linux_regs_info,
9551 x86_cannot_fetch_register, and x86_cannot_store_register.
9552 (initialize_low_arch): New.
9553 * linux-ia64-low.c (tdesc_ia64): Declare.
9554 (ia64_fetch_register): Adjust.
9555 (ia64_usrregs_info, regs_info): New globals.
9556 (ia64_regs_info): New function.
9557 (the_low_target): Adjust.
9558 (initialize_low_arch): New function.
9559 * linux-sparc-low.c (tdesc_sparc64): Declare.
9560 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9561 Adjust.
9562 (sparc_arch_setup): New function.
9563 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9564 (the_low_target): Adjust.
9565 (initialize_low_arch): New function.
9566 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9567 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9568 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9569 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9570 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9571 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9572 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9573 (tdesc_powerpc_isa205_vsx64l): Declare.
9574 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9575 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9576 (ppc_set_pc, ppc_get_hwcap): Adjust.
9577 (ppc_usrregs_info): Forward declare.
9578 (!__powerpc64__) ppc_regmap_adjusted: New global.
9579 (ppc_arch_setup): Adjust to the current process'es target
9580 description.
9581 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9582 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9583 (ppc_store_evrregset): Adjust.
9584 (target_regsets): Rename to ...
9585 (ppc_regsets): ... this, and make static.
9586 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9587 (ppc_regs_info): New function.
9588 (the_low_target): Adjust.
9589 (initialize_low_arch): New function.
9590 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9591 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9592 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9593 (tdesc_s390x_linux64v2): Declare.
9594 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9595 (s390_fill_gregset, s390_store_last_break): Adjust.
9596 (target_regsets): Rename to ...
9597 (s390_regsets): ... this, and make static.
9598 (s390_get_pc, s390_set_pc): Adjust.
9599 (s390_get_hwcap): New target_desc parameter, and use it.
9600 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9601 (s390_arch_setup): Adjust to set the current process'es target
9602 description. Don't adjust the regmap.
9603 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9604 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9605 (regs_info_3264): New globals.
9606 (s390_regs_info): New function.
9607 (the_low_target): Adjust.
9608 (initialize_low_arch): New function.
9609 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9610 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9611 [__mips64] (init_registers_mips_linux)
9612 (init_registers_mips_dsp_linux): Delete defines.
9613 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9614 (have_dsp): New global.
9615 (mips_read_description): New, based on mips_arch_setup.
9616 (mips_arch_setup): Reimplement.
9617 (get_usrregs_info): New function.
9618 (mips_cannot_fetch_register, mips_cannot_store_register)
9619 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9620 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9621 (target_regsets): Rename to ...
9622 (mips_regsets): ... this, and make static.
9623 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9624 (dsp_regs_info, regs_info): New globals.
9625 (mips_regs_info): New function.
9626 (the_low_target): Adjust.
9627 (initialize_low_arch): New function.
9628 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9629 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9630 Declare.
9631 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9632 (arm_read_description): New, with bits factored from
9633 arm_arch_setup.
9634 (arm_arch_setup): Reimplement.
9635 (target_regsets): Rename to ...
9636 (arm_regsets): ... this, and make static.
9637 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9638 (arm_regs_info): New function.
9639 (the_low_target): Adjust.
9640 (initialize_low_arch): New function.
9641 * linux-m68k-low.c (tdesc_m68k): Declare.
9642 (target_regsets): Rename to ...
9643 (m68k_regsets): ... this, and make static.
9644 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9645 (m68k_regs_info): New function.
9646 (m68k_arch_setup): New function.
9647 (the_low_target): Adjust.
9648 (initialize_low_arch): New function.
9649 * linux-sh-low.c (tdesc_sharch): Declare.
9650 (target_regsets): Rename to ...
9651 (sh_regsets): ... this, and make static.
9652 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9653 (sh_regs_info, sh_arch_setup): New functions.
9654 (the_low_target): Adjust.
9655 (initialize_low_arch): New function.
9656 * linux-bfin-low.c (tdesc_bfin): Declare.
9657 (bfin_arch_setup): New function.
9658 (bfin_usrregs_info, regs_info): New globals.
9659 (bfin_regs_info): New function.
9660 (the_low_target): Adjust.
9661 (initialize_low_arch): New function.
9662 * linux-cris-low.c (tdesc_cris): Declare.
9663 (cris_arch_setup): New function.
9664 (cris_usrregs_info, regs_info): New globals.
9665 (cris_regs_info): New function.
9666 (the_low_target): Adjust.
9667 (initialize_low_arch): New function.
9668 * linux-cris-low.c (tdesc_crisv32): Declare.
9669 (cris_arch_setup): New function.
9670 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9671 (cris_regs_info): New function.
9672 (the_low_target): Adjust.
9673 (initialize_low_arch): New function.
9674 * linux-m32r-low.c (tdesc_m32r): Declare.
9675 (m32r_arch_setup): New function.
9676 (m32r_usrregs_info, regs_info): New globals.
9677 (m32r_regs_info): Adjust.
9678 (initialize_low_arch): New function.
9679 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9680 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9681 (tic6x_usrregs_info): Forward declare.
9682 (tic6x_read_description): New function, based on ...
9683 (tic6x_arch_setup): ... this. Reimplement.
9684 (target_regsets): Rename to ...
9685 (tic6x_regsets): ... this, and make static.
9686 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9687 (tic6x_regs_info): New function.
9688 (the_low_target): Adjust.
9689 (initialize_low_arch): New function.
9690 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9691 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9692 (target_regsets): Rename to ...
9693 (xtensa_regsets): ... this, and make static.
9694 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9695 globals.
9696 (xtensa_arch_setup, xtensa_regs_info): New functions.
9697 (the_low_target): Adjust.
9698 (initialize_low_arch): New function.
9699 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9700 (nios2_arch_setup): Set the current process'es tdesc.
9701 (target_regsets): Rename to ...
9702 (nios2_regsets): ... this.
9703 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9704 (nios2_regs_info): New function.
9705 (the_low_target): Adjust.
9706 (initialize_low_arch): New function.
9707 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9708 (aarch64_arch_setup): Set the current process'es tdesc.
9709 (target_regsets): Rename to ...
9710 (aarch64_regsets): ... this.
9711 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9712 (aarch64_regs_info): New function.
9713 (the_low_target): Adjust.
9714 (initialize_low_arch): New function.
9715 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9716 globals.
9717 (target_regsets): Rename to ...
9718 (tile_regsets): ... this.
9719 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9720 (tile_regs_info): New function.
9721 (tile_arch_setup): Set the current process'es tdesc.
9722 (the_low_target): Adjust.
9723 (initialize_low_arch): New function.
9724 * spu-low.c (tdesc_spu): Declare.
9725 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9726 * win32-arm-low.c (tdesc_arm): Declare.
9727 (arm_arch_setup): New function.
9728 (the_low_target): Install arm_arch_setup instead of
9729 init_registers_arm.
9730 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9731 (init_windows_x86): Rename to ...
9732 (i386_arch_setup): ... this. Set `win32_tdesc'.
9733 (the_low_target): Adjust.
9734 * win32-low.c (win32_tdesc): New global.
9735 (child_add_thread): Don't create the thread cache here.
9736 (do_initial_child_stuff): Set the new process'es tdesc.
9737 * win32-low.h (struct target_desc): Forward declare.
9738 (win32_tdesc): Declare.
9739 * lynx-i386-low.c (tdesc_i386): Declare global.
9740 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9741 * lynx-low.c (lynx_tdesc): New global.
9742 (lynx_add_process): Set the new process'es tdesc.
9743 * lynx-low.h (struct target_desc): Forward declare.
9744 (lynx_tdesc): Declare global.
9745 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9746 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9747 * nto-low.c (nto_tdesc): New global.
9748 (do_attach): Set the new process'es tdesc.
9749 * nto-low.h (struct target_desc): Forward declare.
9750 (nto_tdesc): Declare.
9751 * nto-x86-low.c (tdesc_i386): Declare.
9752 (nto_x86_arch_setup): Set `nto_tdesc'.
9753
9754 2013-06-04 Gary Benson <gbenson@redhat.com>
9755
9756 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9757 to qSupported response when appropriate.
9758 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9759 with nonzero-length annex.
9760 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9761 arguments supplied in annex.
9762
9763 2013-05-31 Doug Evans <dje@google.com>
9764
9765 PR server/15594
9766 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9767 64 bits in 64-cross-32 environment.
9768
9769 2013-05-28 Pedro Alves <palves@redhat.com>
9770
9771 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9772 (aarch64-without-fpu.c): Delete rule.
9773 * configure.srv (aarch64*-*-linux*): Remove references to
9774 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9775 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9776 declaration.
9777
9778 2013-05-24 Pedro Alves <palves@redhat.com>
9779
9780 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9781 instead of strchr/decode_address. Error if the range isn't split
9782 with a ','. Don't assume there's be a ':' in the action.
9783
9784 2013-05-23 Yao Qi <yao@codesourcery.com>
9785 Pedro Alves <palves@redhat.com>
9786
9787 * linux-low.c (lwp_in_step_range): New function.
9788 (linux_wait_1): If the thread was range stepping and stopped
9789 outside the stepping range, report the stop to GDB. Otherwise,
9790 continue stepping. Add range stepping debug output.
9791 (linux_set_resume_request): Copy the step range from the resume
9792 request to the lwp.
9793 (linux_supports_range_stepping): New.
9794 (linux_target_ops) <supports_range_stepping>: Set to
9795 linux_supports_range_stepping.
9796 * linux-low.h (struct linux_target_ops)
9797 <supports_range_stepping>: New field.
9798 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9799 * linux-x86-low.c (x86_supports_range_stepping): New.
9800 (the_low_target) <supports_range_stepping>: Set to
9801 x86_supports_range_stepping.
9802 * server.c (handle_v_cont): Handle 'r' action.
9803 (handle_v_requests): Append ";r" if the target supports range
9804 stepping.
9805 * target.h (struct thread_resume) <step_range_start,
9806 step_range_end>: New fields.
9807 (struct target_ops) <supports_range_stepping>:
9808 New field.
9809 (target_supports_range_stepping): New macro.
9810
9811 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9812
9813 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9814 confusion in comment.
9815
9816 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9817
9818 * lynx-low.c (struct process_info_private): New type.
9819 (lynx_add_process): New function.
9820 (lynx_create_inferior, lynx_attach): Replace calls to
9821 add_process by calls to lynx_add_process.
9822 (lynx_resume): If PTID is null, then try using
9823 current_process()->private->last_wait_event_ptid.
9824 Add comments.
9825 (lynx_clear_inferiors): Delete. The contents of that function
9826 has been inlined in lynx_mourn;
9827 (lynx_wait_1): Save the ptid in the process's private data.
9828 (lynx_mourn): Free the process' private data. Replace call
9829 to lynx_clear_inferiors by call to clear_inferiors.
9830
9831 2013-05-17 Yao Qi <yao@codesourcery.com>
9832
9833 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9834 the right place.
9835
9836 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9837
9838 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9839 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9840 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9841 PT_TEXT_END_ADDR guards. Update comments.
9842 (linux_target_op) <read_offsets>: Conditionally define to
9843 linux_read_offsets if the target is UCLIBC and if it defines
9844 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9845
9846 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9847 Andrew Jenner <andrew@codesourcery.com>
9848
9849 * Makefile.in (SFILES): Add linux-nios2-low.c.
9850 (clean): Add action to delete nios2-linux.c.
9851 (nios2-linux.c): New rule.
9852 * configure.srv: Add nios2*-*-linux*.
9853 * linux-nios2-low.c: New.
9854
9855 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9856
9857 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9858
9859 2013-04-25 Hui Zhu <hui@codesourcery.com>
9860
9861 PR gdb/15186
9862 * ax.c (ax_printf): Add fflush.
9863
9864 2013-04-22 Tom Tromey <tromey@redhat.com>
9865
9866 * Makefile.in (SFILES): Add filestuff.c.
9867 (OBS): Add filestuff.o.
9868 (filestuff.o): New target.
9869 * config.in, configure: Rebuild.
9870 * configure.ac: Check for fdwalk, pipe2.
9871
9872 2013-04-17 Pedro Alves <palves@redhat.com>
9873
9874 * configure.ac (USE_THREAD_DB): Delete variable.
9875 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9876 Don't AC_SUBST USE_THREAD_DB.
9877 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9878 * config.in, configure: Regenerate.
9879
9880 2013-04-16 Pedro Alves <palves@redhat.com>
9881
9882 * linux-low.h (struct lwp_info) <thread_known>: Move under
9883 the USE_THREAD_DB #ifdef.
9884
9885 2013-04-16 Pedro Alves <palves@redhat.com>
9886
9887 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9888 (linux-low.o): Delete rule.
9889 * linux-low.h: Always include "gdb_thread_db.h" instead of
9890 conditionally including thread_db.h.
9891 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9892 HAVE_THREAD_DB_H.
9893
9894 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9895
9896 * Makefile.in (install-only): Fix make install regression.
9897
9898 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9899
9900 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9901 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9902 installation.
9903 * gdbserver.1: Remove.
9904
9905 2013-03-22 Pedro Alves <palves@redhat.com>
9906
9907 * linux-low.c (handle_extended_wait): Don't call
9908 linux_enable_event_reporting.
9909
9910 2013-03-15 Tony Theodore <tonyt@logyst.com>
9911
9912 PR build/9098:
9913 * Makefile.in (SHELL): Use @SHELL@.
9914
9915 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9916
9917 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9918 compiler warning.
9919
9920 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9921
9922 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9923 Remove extraneous NULL element.
9924
9925 2013-03-13 Yao Qi <yao@codesourcery.com>
9926
9927 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9928 'V' block in trace frame.
9929
9930 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9931
9932 * target.h (struct target_ops): Add btrace ops.
9933 (target_supports_btrace): New macro.
9934 (target_enable_btrace): New macro.
9935 (target_disable_btrace): New macro.
9936 (target_read_btrace): New macro.
9937 * gdbthread.h (struct thread_info): Add btrace field.
9938 * server.c: Include btrace-common.h.
9939 (handle_btrace_general_set): New function.
9940 (handle_btrace_enable): New function.
9941 (handle_btrace_disable): New function.
9942 (handle_general_set): Call handle_btrace_general_set.
9943 (handle_qxfer_btrace): New function.
9944 (struct qxfer qxfer_packets[]): Add btrace entry.
9945 * inferiors.c (remove_thread): Disable btrace.
9946 * linux-low: Include linux-btrace.h.
9947 (linux_low_enable_btrace): New function.
9948 (linux_low_read_btrace): New function.
9949 (linux_target_ops): Add btrace ops.
9950 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9951 Add srv_linux_btrace=yes.
9952 (x86_64-*-linux*): Add linux-btrace.o.
9953 Add srv_linux_btrace=yes.
9954 * configure.ac: Define HAVE_LINUX_BTRACE.
9955 * config.in: Regenerated.
9956 * configure: Regenerated.
9957
9958 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9959
9960 * server.c (handle_qxfer): Preserve error message if -3 is
9961 returned.
9962 (qxfer): Document the -3 return value.
9963
9964 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9965
9966 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9967 (linux_btrace_h): New variable.
9968 (linux-btrace.o): New rule.
9969
9970 2013-03-08 Stan Shebs <stan@codesourcery.com>
9971 Hafiz Abid Qadeer <abidh@codesourcery.com>
9972
9973 * tracepoint.c (trace_buffer_size): New global.
9974 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9975 (init_trace_buffer): Change to one-argument function. Allocate
9976 trace buffer memory.
9977 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9978 handle QTBuffer:size packet.
9979 (cmd_bigqtbuffer_size): New function.
9980 (initialize_tracepoint): Call init_trace_buffer with
9981 DEFAULT_TRACE_BUFFER_SIZE.
9982 * server.c (handle_query): Add QTBuffer:size in the
9983 supported packets.
9984
9985 2013-03-07 Yao Qi <yao@codesourcery.com>
9986
9987 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9988 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9989 of -1.
9990 (cmd_qtsp): Adjust condition. Do post increment.
9991 Set cur_action and cur_step_action back to 0.
9992
9993 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9994
9995 PR server/15236
9996 * linux-low.c (linux_write_memory): Return early success if LEN is
9997 zero.
9998
9999 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10000
10001 * configure.srv: Add x86_64-*-cygwin* as target.
10002
10003 2013-02-28 Tom Tromey <tromey@redhat.com>
10004
10005 * configure.ac: Invoke AC_SYS_LARGEFILE.
10006 * configure, config.in: Rebuild.
10007
10008 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10009
10010 * win32-low.c: Throughout, fix format strings and casts of
10011 printf-like functions to avoid type related warnings on all
10012 platforms.
10013 (get_child_debug_event): Print dwDebugEventCode as hex since
10014 that's how it's usually documented.
10015
10016 2013-02-28 Yao Qi <yao@codesourcery.com>
10017
10018 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10019 pulongest.
10020
10021 2013-02-27 Jiong Wang <jiwang@tilera.com>
10022
10023 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10024 (reg-tilegx32.c): New rule.
10025 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10026 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10027 different register info initializer according to elf class.
10028 (init_registers_tilgx32): New function. The tilegx32 register info
10029 initializer.
10030 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10031 (tile_store_gregset): Likewise.
10032
10033 2013-02-27 Yao Qi <yao@codesourcery.com>
10034
10035 * server.c (process_point_options): Print debug message when
10036 debug_threads is true.
10037
10038 2013-02-26 Yao Qi <yao@codesourcery.com>
10039
10040 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10041
10042 2013-02-19 Pedro Alves <palves@redhat.com>
10043 Kai Tietz <ktietz@redhat.com>
10044
10045 PR gdb/15161
10046
10047 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10048 instead of strtoul to extract address from packet.
10049 (process_serial_event) <'z'>: Likewise.
10050
10051 2013-02-18 Yao Qi <yao@codesourcery.com>
10052
10053 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10054
10055 2013-02-14 Pedro Alves <palves@redhat.com>
10056
10057 Plug memory leak.
10058
10059 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10060 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10061
10062 2013-02-14 Pedro Alves <palves@redhat.com>
10063
10064 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10065
10066 2013-02-14 Pedro Alves <palves@redhat.com>
10067
10068 * tracepoint.c (save_string): Delete.
10069 (add_tracepoint_action): Use savestring instead of save_string.
10070
10071 2013-02-12 Pedro Alves <palves@redhat.com>
10072
10073 * linux-xtensa-low.c: Ditto.
10074 * xtensa-xtregs.c: Ditto.
10075
10076 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10077
10078 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10079 thread_db.
10080
10081 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10082
10083 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10084 aarch64_num_wp_regs and aarch64_num_bp_regs to
10085 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10086
10087 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10088
10089 * linux-aarch64-low.c (ps_get_thread_area): Replace
10090 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10091
10092 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10093 Marcus Shawcroft <marcus.shawcroft@arm.com>
10094 Nigel Stephens <nigel.stephens@arm.com>
10095 Yufeng Zhang <yufeng.zhang@arm.com>
10096
10097 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10098 (aarch64.c, aarch64-without-fpu.c): New targets.
10099 * configure.srv (aarch64*-*-linux*): New.
10100 * linux-aarch64-low.c: New file.
10101
10102 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10103
10104 * linux-low.c (handle_extended_wait, linux_create_inferior)
10105 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10106 (dequeue_one_deferred_signal, linux_resume_one_thread)
10107 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10108 (linux_tracefork_grandchild, linux_test_for_tracefork)
10109 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10110 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10111 where the argument is 0.
10112
10113 2013-01-25 Yao Qi <yao@codesourcery.com>
10114
10115 * event-loop.c: Include "queue.h".
10116 (gdb_event_p): New typedef.
10117 (struct gdb_event) <next_event>: Remove.
10118 (event_queue): Change to QUEUE(gdb_event_p).
10119 (async_queue_event): Remove.
10120 (gdb_event_xfree): New.
10121 (initialize_event_loop): New.
10122 (process_event): Use API from QUEUE.
10123 (wait_for_event): Likewise.
10124 * server.c (main): Call initialize_event_loop.
10125 * server.h (initialize_event_loop): Declare.
10126
10127 2013-01-18 Yao Qi <yao@codesourcery.com>
10128
10129 * ax.h (struct eval_agent_expr_context): New.
10130 (gdb_eval_agent_expr): Update declaration.
10131 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10132 TFRAME. Add new argument CTX.
10133 * server.h (struct eval_agent_expr_context): Declare.
10134 (agent_mem_read, agent_tsv_read): Update declaration.
10135 (agent_mem_read_string): Likewise.
10136 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10137 (add_traceframe_block): Add new argument TPOINT.
10138 Increase TPOINT->traceframe_usage.
10139 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10140 eval_tracepoint_agent_expr.
10141 (condition_true_at_tracepoint): Likewise.
10142 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10143 (agent_mem_read_string, agent_tsv_read): Likewise.
10144
10145 2013-01-16 Yao Qi <yao@codesourcery.com>
10146
10147 * linux-low.c (linux_resume_one_lwp): Don't check
10148 'lwp->bp_reinsert != 0'.
10149
10150 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10151 Pedro Alves <palves@redhat.com>
10152
10153 * lynx-low.c (ptrace_request_to_str): Define a temporary
10154 macro and use it to simplify this function's implementation.
10155
10156 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10157
10158 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10159 sets errno.
10160
10161 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10162
10163 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10164
10165 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10166
10167 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10168
10169 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10170
10171 * lynx-low.c (lynx_resume): Use the resume_info parameter
10172 to determine the ptid for the lynx_ptrace call, unless
10173 it is equal to minus_one_ptid, in which case we use the
10174 ptid of the current_inferior.
10175 (lynx_wait_1): After having received a thread create/exit
10176 event, resume the inferior's execution using the signaling
10177 thread's ptid, rather than the old ptid.
10178
10179 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10180
10181 * lynx-low.c (lynx_resume): Delete variable ret.
10182
10183 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10184
10185 * gdbreplay.c (gdbreplay_version): Update copyright year.
10186 * server.c (gdbserver_version): Likewise.
10187
10188 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10189
10190 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10191 new thread.
10192
10193 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10194
10195 * lynx-low.c (ptrace_request_to_str): Add handling for
10196 PTRACE_GETTRACESIG.
10197
10198 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10199
10200 * lynx-low.c (lynx_attach): Delete variable new_process.
10201
10202 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10203
10204 * lynx-low.c (lynx_create_inferior): Delete variable
10205 new_process.
10206
10207 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10208
10209 * lynx-low.c (ptrace_request_to_str): Do not handle
10210 PTRACE_GETTHREADLIST if this macro does not exist.
10211
10212 2012-12-15 Yao Qi <yao@codesourcery.com>
10213
10214 * Makefile.in (OBS): Add notif.o.
10215 * notif.c, notif.h: New.
10216 * server.c: Include "notif.h".
10217 (struct vstop_notif) <next>: Remove.
10218 <base>: New field.
10219 (queue_stop_reply): Update.
10220 (push_event, send_next_stop_reply): Remove.
10221 (discard_queued_stop_replies): Update.
10222 (notif_stop): New variable.
10223 (handle_v_stopped): Remove.
10224 (handle_v_requests): Don't call handle_v_stopped. Call
10225 handle_ack_notif instead.
10226 (queue_stop_reply_callback): Call notif_event_enque instead
10227 of queue_stop_reply.
10228 (handle_status): Don't call send_next_stop_reply, call
10229 notif_write_event instead.
10230 (kill_inferior_callback): Likewise.
10231 (detach_or_kill_inferior_callback): Likewise.
10232 (main): Call initialize_notif.
10233 (process_serial_event): Call QUEUE_is_empty.
10234 (handle_target_event): Call notif_push instead of push event.
10235 * server.h (push_event): Remove declaration.
10236
10237 2012-12-10 Tom Tromey <tromey@redhat.com>
10238
10239 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10240 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10241 macros.
10242 (.c.o): Rewrite.
10243 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10244 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10245 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10246 (amd64-linux-ipa.o, ax.o): Rewrite.
10247 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10248 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10249 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10250 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10251 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10252 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10253 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10254 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10255 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10256 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10257 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10258 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10259 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10260 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10261 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10262 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10263 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10264 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10265 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10266 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10267 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10268 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10269 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10270 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10271 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10272 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10273 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10274 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10275 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10276 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10277 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10278 (reg-tilegx.o): Remove.
10279 (all_object_files): New macro.
10280 Include .deps files.
10281 * aclocal.m4, configure: Rebuild.
10282 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10283 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10284 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10285
10286 2012-12-05 Tom Tromey <tromey@redhat.com>
10287
10288 PR gdb/14917:
10289 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10290
10291 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10292
10293 * configure.ac: Check for linux/perf_event.h.
10294 * config.in: Regenerated.
10295 * configure: Regenerated.
10296
10297 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10298
10299 * hostio.c (handle_readlink): Decrease buffer size
10300 parameter passed to readlink by one byte.
10301
10302 2012-11-26 Yao Qi <yao@codesourcery.com>
10303
10304 * configure.ac (build_warnings): Append '-Wempty-body'.
10305 * configure: Regenerated.
10306 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10307 body.
10308
10309 2012-11-15 Pierre Muller <muller@sourceware.org>
10310
10311 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10312 * config.in: Regenerate.
10313 * configure: Regenerate.
10314 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10315 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10316 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10317 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10318 header.
10319 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10320 instead of <sys/wait.h> header.
10321 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10322
10323 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10324
10325 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10326 (various make rules): Remove -DGDBSERVER
10327
10328 2012-11-09 Yao Qi <yao@codesourcery.com>
10329
10330 * spu-low.c (current_ptid): Move it to ..
10331 * gdbthread.h: ... here. New.
10332 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10333 * server.c (myresume, process_serial_event): Likewise.
10334 * thread-db.c (thread_db_find_new_threads): Likewise.
10335 * tracepoint.c (run_inferior_command): Likewise.
10336
10337 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10338
10339 * server.c (handle_search_memory_1): Include access length in
10340 warning message.
10341
10342 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10343
10344 * linux-crisv32-low.c: Fix compile errors.
10345
10346 2012-09-04 Yao Qi <yao@codesourcery.com>
10347
10348 * tracepoint.c (cmd_qtsv): Adjust debug message.
10349 Don't check CUR_TPOINT.
10350
10351 2012-08-28 Yao Qi <yao@codesourcery.com>
10352
10353 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10354 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10355 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10356 Remove declarations of xmalloc, xreallloc, xstrdup and
10357 freeargv.
10358 * Makefile.in (libiberty_h): New.
10359 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10360 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10361
10362 2012-08-23 Yao Qi <yao@codesourcery.com>
10363
10364 * server.h: Remove declaration of 'xsnprintf'.
10365
10366 2012-08-22 Keith Seitz <keiths@redhat.com>
10367
10368 * server.h: Include build-gnulib-gbserver/config.h.
10369 * gdbreplay.c: Likewise.
10370
10371 2012-08-08 Doug Evans <dje@google.com>
10372
10373 * Makefile.in (SFILES): Add gdb_vecs.c.
10374 (OBS): Add gdb_vecs.o.
10375 (gdb_vecs_h, host_defs_h): New variables.
10376 (thread-db.o): Add $(gdb_vecs_h) dependency.
10377 (gdb_vecs.o): New rule.
10378 * thread-db.c: #include "gdb_vecs.h".
10379 (thread_db_load_search): Use a vector to iterate over path elements.
10380 Handle text appearing after "$pdir".
10381
10382 * configure.ac: Add check for strstr.
10383 * config.in: Regenerate.
10384 * configure: Regenerate.
10385
10386 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10387
10388 * hostio.c (handle_pread): If pread fails, fall back to attempting
10389 lseek/read.
10390 (handle_pwrite): Likewise for pwrite.
10391
10392 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10393
10394 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10395 between unsupported TYPE and unimplementable ADDR/LEN combination.
10396 (arm_insert_point): Act on new return value.
10397
10398 2012-07-31 Pedro Alves <palves@redhat.com>
10399
10400 * server.c (process_point_options): Only skip tokens if we find
10401 one that is unrecognized. Don't treat 'X' specially while
10402 skipping unrecognized tokens.
10403
10404 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10405
10406 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10407 to 4-byte-align HW breakpoint addresses for Thumb.
10408
10409 2012-07-27 Yao Qi <yao@codesourcery.com>
10410
10411 PR remote/14161.
10412
10413 * server.h: Declare gdb_agent_about_to_close.
10414 * target.c (kill_inferior): Include "agent.h".
10415 New. Send command 'kill'.
10416 * target.h (kill_inferior): Removed macro.
10417 * tracepoint.c (gdb_agent_about_to_close): New.
10418 (gdb_agent_helper_thread): Handle command 'close'.
10419 Wait endlessly until the inferior stops.
10420 Install gdb_agent_remove_socket to atexit hook.
10421 (agent_socket_name): New static variable.
10422 (gdb_agent_socket_init): Replace local variable 'name' with
10423 'agent_socket_name'.
10424 (gdb_agent_remove_socket): New.
10425
10426 2012-07-27 Yao Qi <yao@codesourcery.com>
10427
10428 * server.c (process_point_options): Stop at 'X' when parsing.
10429
10430 2012-07-19 Michael Eager <eager@eagercon.com>
10431
10432 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10433 to hw_execute.
10434 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10435 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10436 hardware breakpoint.
10437
10438 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10439
10440 * gdbserver/linux-low.c (initialize_low): Call
10441 linux_ptrace_init_warnings.
10442
10443 2012-07-02 Doug Evans <dje@google.com>
10444
10445 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10446 pointer to int.
10447
10448 2012-07-02 Stan Shebs <stan@codesourcery.com>
10449
10450 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10451 (ax.o): Add it to build rule.
10452 (ax-ipa.o): Ditto.
10453 (OBS): Add format.o.
10454 (IPA_OBS): Add format.o.
10455 * server.c (handle_query): Claim support for breakpoint commands.
10456 (process_point_options): Add command case.
10457 (process_serial_event): Leave running if there are printfs in
10458 effect.
10459 * mem-break.h (any_persistent_commands): Declare.
10460 (add_breakpoint_commands): Declare.
10461 (gdb_no_commands_at_breakpoint): Declare.
10462 (run_breakpoint_commands): Declare.
10463 * mem-break.c (struct point_command_list): New struct.
10464 (struct breakpoint): New field command_list.
10465 (any_persistent_commands): New function.
10466 (add_commands_to_breakpoint): New function.
10467 (add_breakpoint_commands): New function.
10468 (gdb_no_commands_at_breakpoint): New function.
10469 (run_breakpoint_commands): New function.
10470 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10471 locally.
10472 * ax.c: Include format.h.
10473 (ax_printf): New function.
10474 (gdb_eval_agent_expr): Add printf opcode.
10475
10476 2012-06-13 Yao Qi <yao@codesourcery.com>
10477
10478 * server.c (start_inferior): Remove duplicated writes to fields
10479 'last_resume_kind' and 'last_status' of 'current_inferior'.
10480
10481 2012-06-12 Yao Qi <yao@codesourcery.com>
10482 Pedro Alves <palves@redhat.com>
10483
10484 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10485 comment.
10486 * server.c (handle_v_cont): Extend comment.
10487
10488 2012-06-11 Yao Qi <yao@codesourcery.com>
10489
10490 * linux-low.c (linux_attach): Add 'static'.
10491
10492 2012-06-06 Yao Qi <yao@codesourcery.com>
10493
10494 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10495
10496 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10497
10498 Fix gcc -flto compilation warning.
10499 * server.c (main): Make variable multi_mode and attach volatile.
10500
10501 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10502
10503 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10504 if the platform doesn't know about it.
10505
10506 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10507
10508 * Makefile.in (SFILES): Add linux-tile-low.c.
10509 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10510 * configure.srv: Handle tilegx-*-linux*.
10511 * linux-tile-low.c: New file.
10512
10513 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10514
10515 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10516
10517 2012-05-24 Pedro Alves <palves@redhat.com>
10518
10519 PR gdb/7205
10520
10521 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10522
10523 2012-05-24 Pedro Alves <palves@redhat.com>
10524
10525 PR gdb/7205
10526
10527 Replace target_signal with gdb_signal throughout.
10528
10529 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10530
10531 * linux-low.c (linux_store_registers): Avoid the copying sequence
10532 when no data has been retrieved by ptrace.
10533
10534 2012-05-22 Will Deacon <will.deacon@arm.com>
10535
10536 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10537 Include asm/ptrace.h.
10538 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10539 already defined.
10540
10541 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10542
10543 * linux-low.c (linux_store_registers): Don't re-retrieve data
10544 with ptrace that has already been obtained from /proc. Always
10545 copy any data retrieved with ptrace to the buffer supplied.
10546
10547 2012-05-11 Yao Qi <yao@codesourcery.com>
10548 Pedro Alves <palves@redhat.com>
10549
10550 * linux-low.c (enum stopping_threads_kind): New.
10551 (stopping_threads): Change type to `enum stopping_threads_kind'.
10552 (handle_extended_wait): If stopping and suspending threads, leave
10553 the new_lwp suspended too.
10554 (linux_wait_for_event): Adjust.
10555 (stop_all_lwps): Set `stopping_threads' to
10556 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10557 whether we're suspending threads or just stopping them. Assert no
10558 recursion happens.
10559
10560 2012-04-29 Yao Qi <yao@codesourcery.com>
10561
10562 * server.h: Move some code to ...
10563 * gdbthread.h: ... here. New.
10564 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10565 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10566 (nto-low.o, win32-low.o): Likewise.
10567 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10568 * regcache.c, remote-utils.c, server.c: Likewise.
10569 * target.c, tracepoint.c, win32-low.c: Likewise.
10570
10571 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10572
10573 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10574 (PTRACE_ARG4_TYPE): Likewise.
10575 (PTRACE_XFER_TYPE): Likewise.
10576 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10577 ptrace to PTRACE_ARG3_TYPE.
10578 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10579 (PTRACE_ARG4_TYPE): Likewise.
10580 (PTRACE_XFER_TYPE): Likewise.
10581 (linux_detach_one_lwp): Cast fourth argument of
10582 ptrace to long then PTRACE_ARG4_TYPE.
10583 (regsets_fetch_inferior_registers): Cast third argument of
10584 ptrace to long then PTRACE_ARG3_TYPE.
10585 (regsets_store_inferior_registers): Likewise.
10586
10587 2012-04-20 Pedro Alves <palves@redhat.com>
10588
10589 * configure: Regenerate.
10590
10591 2012-04-19 Pedro Alves <palves@redhat.com>
10592
10593 * Makefile.in (GNULIB_BUILDDIR): New.
10594 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10595 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10596 (all, install-only, uninstall, clean-info, all-lib, clean): No
10597 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10598 (maintainer-clean realclean distclean): Use subdir_do.
10599 (subdir_do): New.
10600 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10601 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10602 * acinclude.m4: Include acx_configure_dir.m4.
10603 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10604 calls. Call AC_PROG_RANLIB. Configure gnulib using
10605 ACX_CONFIGURE_DIR.
10606 (GNULIB): New.
10607 (GNULIB_STDINT_H): Adjust.
10608 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10609 * gdbreplay.c: Include build-gnulib/config.h.
10610 * server.h: Likewise.
10611 * aclocal.m4: Regenerate.
10612 * config.in: Regenerate.
10613 * configure: Regenerate.
10614
10615 2012-04-19 Pedro Alves <palves@redhat.com>
10616
10617 * Makefile.in (LIBGNU, INCGNU): Adjust.
10618 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10619 (all, install-only, uninstall, clean-info, all-lib, clean)
10620 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10621 * configure.ac: Adjust AC_OUTPUT output.
10622 * aclocal.m4: Regenerate.
10623 * configure: Regenerate.
10624
10625 2012-04-19 Pedro Alves <palves@redhat.com>
10626
10627 * Makefile.in (generated_files): New.
10628 (server_h): Remove the explicit dependency on config.h, and depend
10629 on $generated_files.
10630
10631 2012-04-19 Pedro Alves <palves@redhat.com>
10632
10633 * Makefile.in (INCGNU): Add -Ignulib.
10634
10635 2012-04-19 Pedro Alves <palves@redhat.com>
10636
10637 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10638 (INCGNU): ... this, and spell out -I here.
10639 (GNULIB_LIB): Rename to ...
10640 (LIBGNU): ... this.
10641 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10642
10643 2012-04-19 Pedro Alves <palves@redhat.com>
10644
10645 * config.in: Regenerate.
10646
10647 2012-04-19 Pedro Alves <palves@redhat.com>
10648
10649 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10650 * server.h (memmem): Remove declaration.
10651 * config.in: Regenerate.
10652 * configure: Regenerate.
10653
10654 2012-04-19 Yao Qi <yao@codesourcery.com>
10655
10656 * Makefile.in (SFILES): Add common/vec.c.
10657 (OBS): Add vec.o.
10658 (vec.o): New rule.
10659
10660 2012-04-19 Yao Qi <yao@codesourcery.com>
10661
10662 * remote-utils.c (prepare_resume_reply): Replace with macro
10663 target_core_of_thread.
10664 * server.c (handle_qxfer_threads_proper): Likewise.
10665 * target.h (traget_core_of_thread): New macro.
10666
10667 2012-04-18 Pedro Alves <palves@redhat.com>
10668
10669 * aclocal.m4: Regenerate.
10670 * configure: Regenerate.
10671
10672 2012-04-16 Yao Qi <yao@codesourcery.com>
10673
10674 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10675 duplicated on address.
10676
10677 2012-04-16 Yao Qi <yao@codesourcery.com>
10678
10679 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10680 (struct tracepoint_action_ops) <send>: New field.
10681 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10682 (agent_expr_send, x_tracepoint_action_send): New.
10683 (l_tracepoint_action_send): New.
10684 (cmd_qtdp): Download and install tracepoint
10685 according to `use_agent'.
10686 (run_inferior_command): Add one more parameter `len'.
10687 Update callers.
10688 (tracepoint_send_agent): New.
10689 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10690
10691 2012-04-16 Yao Qi <yao@codesourcery.com>
10692
10693 * tracepoint.c (download_tracepoints): Moved to ...
10694 (cmd_qtstart): ... here.
10695
10696 2012-04-14 Yao Qi <yao@codesourcery.com>
10697
10698 * tracepoint.c: Include inttypes.h.
10699 (struct collect_memory_action): Use sized types.
10700 (struct tracepoint): Likewise.
10701 (cmd_qtdp, stop_tracing): Update print specifiers.
10702 (cmd_qtp, response_tracepoint): Likewise.
10703 (collect_data_at_tracepoint): Likewise.
10704 (collect_data_at_step): Likewise.
10705
10706 2012-04-14 Yao Qi <yao@codesourcery.com>
10707
10708 Import gnulib module inttypes.
10709 * aclocal.m4, config.in, configure: Regenerated.
10710
10711 2012-04-14 Yao Qi <yao@codesourcery.com>
10712
10713 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10714 Makefile and config.status at last.
10715
10716 2012-04-13 Yao Qi <yao@codesourcery.com>
10717
10718 * tracepoint.c: Include stdint.h unconditionally.
10719
10720 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10721
10722 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10723 on BFD_HAVE_SYS_PROCFS_TYPE.
10724 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10725 * configure: Regenerate.
10726 * config.in: Likewise.
10727
10728 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10729
10730 * Makefile.in (clean): Also remove x32.c x32-linux.c
10731 x32-avx.c x32-avx-linux.c.
10732 (x32.o): New target.
10733 (x32.c): Likewise.
10734 (x32-linux.o): Likewise.
10735 (x32-linux.c): Likewise.
10736 (x32-avx.o): Likewise.
10737 (x32-avx.c): Likewise.
10738 (x32-avx-linux.o): Likewise.
10739 (x32-avx-linux.c): Likewise.
10740
10741 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10742 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10743 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10744 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10745 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10746 i386/x32-avx-linux.xml.
10747
10748 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10749 (init_registers_x32_avx_linux): Likwise.
10750 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10751 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10752
10753 2012-04-13 Pedro Alves <palves@redhat.com>
10754
10755 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10756 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10757 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10758 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10759 the sub-make.
10760
10761 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10762
10763 * linux-x86-low.c (compat_x32_clock_t): New.
10764 (compat_x32_siginfo_t): Likewise.
10765 (compat_x32_siginfo_from_siginfo): Likewise.
10766 (siginfo_from_compat_x32_siginfo): Likewise.
10767 (linux_is_elf64): Likewise.
10768 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10769 and siginfo_from_compat_x32_siginfo for x32.
10770 (x86_arch_setup): Set linux_is_elf64.
10771
10772 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10773
10774 PR gdb/13969
10775 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10776 e_machine field.
10777 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10778 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10779 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10780 compatible with process.
10781
10782 2012-04-12 Yao Qi <yao@codesourcery.com>
10783
10784 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10785 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10786 (install-only, install-info, clean): Handle sub dir gnulib.
10787 (all-lib, am--refresh): New targets.
10788 (memmem.o): Remove target.
10789 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10790 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10791 (AC_REPLACE_FUNCS): Remove memmem.
10792 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10793 (AC_OUTPUT): Generate Makefile in gnulib/.
10794 * aclocal.m4, config.in, configure: Regenerated.
10795
10796 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10797
10798 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10799
10800 2012-04-05 Pedro Alves <palves@redhat.com>
10801
10802 -Werror=strict-aliasing
10803
10804 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10805 pointer.
10806
10807 2012-04-04 Pedro Alves <palves@redhat.com>
10808
10809 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10810 (sparc_store_gregset_from_stack, sparc_store_gregset)
10811 (sparc_breakpoint_at): Fix formatting.
10812
10813 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10814
10815 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10816 are available.
10817 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10818 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10819 * config.in: Regenerate.
10820 * configure: Likewise.
10821
10822 2012-03-29 Pedro Alves <palves@redhat.com>
10823
10824 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10825 Correct ptrace arguments.
10826
10827 2012-03-28 Pedro Alves <palves@redhat.com>
10828
10829 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10830 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10831 (IA64_FR1_REGNUM): New defines.
10832 (ia64_fetch_register): New.
10833 (the_low_target): Install it.
10834 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10835 field.
10836 * linux-low.c (linux_fetch_registers): Try the
10837 the_low_target.fetch_register hook first.
10838
10839 * linux-arm-low.c (the_low_target): Adjust.
10840 * linux-bfin-low.c (the_low_target): Adjust.
10841 * linux-cris-low.c (the_low_target): Adjust.
10842 * linux-crisv32-low.c (the_low_target): Adjust.
10843 * linux-m32r-low.c (the_low_target): Adjust.
10844 * linux-m68k-low.c (the_low_target): Adjust.
10845 * linux-mips-low.c (the_low_target): Adjust.
10846 * linux-ppc-low.c (the_low_target): Adjust.
10847 * linux-s390-low.c (the_low_target): Adjust.
10848 * linux-sh-low.c (the_low_target): Adjust.
10849 * linux-sparc-low.c (the_low_target): Adjust.
10850 * linux-tic6x-low.c (the_low_target): Adjust.
10851 * linux-x86-low.c (the_low_target): Adjust.
10852 * linux-xtensa-low.c (the_low_target): Adjust.
10853
10854 2012-03-26 Pedro Alves <palves@redhat.com>
10855
10856 * server.c (handle_qxfer_libraries): Don't bail early if
10857 the_target->qxfer_libraries_svr4 is not NULL.
10858
10859 2012-03-26 Pedro Alves <palves@redhat.com>
10860
10861 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10862
10863 2012-03-23 Pedro Alves <palves@redhat.com>
10864
10865 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10866 "library-list-svr4" element's start tag when the the DSO list is
10867 empty.
10868
10869 2012-03-23 Pedro Alves <palves@redhat.com>
10870
10871 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10872 a variable whose type size is the same as the inferior's pointer
10873 size.
10874
10875 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10876
10877 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10878 struct siginfo.
10879 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10880 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10881 * linux-low.h: Include <signal.h>.
10882 (struct siginfo): Remove forward declaration.
10883 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10884 struct siginfo.
10885
10886 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10887
10888 * .gitignore: Ignore more files.
10889
10890 2012-03-19 Pedro Alves <palves@redhat.com>
10891 Jan Kratochvil <jan.kratochvil@redhat.com>
10892
10893 * server.c (cont_thread, general_thread): Add describing comments.
10894 (start_inferior): Clear `cont_thread'.
10895 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10896 of a process.
10897
10898 2012-03-15 Yao Qi <yao@codesourcery.com>
10899
10900 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10901 handling to ...
10902 (cmd_qtdp): ... here.
10903
10904 2012-03-15 Yao Qi <yao@codesourcery.com>
10905
10906 * tracepoint.c (struct tracepoint_action_ops): New.
10907 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10908 (m_tracepoint_action_download): New.
10909 (r_tracepoint_action_download): New.
10910 (x_tracepoint_action_download): New.
10911 (l_tracepoint_action_download): New.
10912 (add_tracepoint_action): Install `action->ops' according type.
10913 (download_tracepoint_1): Move code `download' function pointer
10914 of various tracepoint_action_ops.
10915
10916 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10917
10918 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10919 linux_ptrace_attach_warnings.
10920
10921 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10922
10923 * Makefile.in (linux-ptrace.o): New.
10924 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10925 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10926 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10927 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10928 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10929 of these targets.
10930 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10931
10932 2012-03-08 Yao Qi <yao@codesourcery.com>
10933 Pedro Alves <palves@redhat.com>
10934
10935 Fix PR server/13392.
10936 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10937 offset of JMP insn.
10938 * tracepoint.c (remove_tracepoint): New.
10939 (cmd_qtdp): Call remove_tracepoint when failed to install.
10940
10941 2012-03-07 Pedro Alves <palves@redhat.com>
10942
10943 * linux-low.c (get_detach_signal): New.
10944 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10945 Pass on pending signals to PTRACE_DETACH. Check the result of the
10946 ptrace call.
10947 * server.c (program_signals, program_signals_p): New.
10948 (handle_general_set): Handle QProgramSignals.
10949 * server.h (program_signals, program_signals_p): Declare.
10950
10951 2012-03-05 Pedro Alves <palves@redhat.com>
10952 Jan Kratochvil <jan.kratochvil@redhat.com>
10953
10954 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10955 New comment why.
10956
10957 2012-03-03 Yao Qi <yao@codesourcery.com>
10958
10959 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10960 agent_look_up_symbols.
10961
10962 2012-03-03 Yao Qi <yao@codesourcery.com>
10963
10964 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10965 (linux-x86-low.o): Likewise.
10966 * server.h: Remove in_process_agent_loaded.
10967 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10968 common/agent.c.
10969 Update callers.
10970
10971 2012-03-03 Yao Qi <yao@codesourcery.com>
10972
10973 * tracepoint.c (gdb_agent_capability): New global.
10974 (in_process_agent_loaded_ust): Renamed to
10975 `in_process_agent_supports_ust'.
10976 Update callers.
10977 (in_process_agent_supports_ust): Call agent_capability_check.
10978 (clear_installed_tracepoints): Assert that agent supports
10979 agent.
10980
10981 2012-03-03 Yao Qi <yao@codesourcery.com>
10982
10983 * linux-low.c (linux_supports_agent): New.
10984 (linux_target_ops): Initialize field `supports_agent' with
10985 linux_supports_agent.
10986 * target.h (struct target_ops) <supports_agent>: New.
10987 (target_supports_agent): New macro.
10988 * server.c (handle_general_set): Handle packet 'QAgent'.
10989 (handle_query): Send `QAgent+'.
10990 * Makefile.in (server.o): Depends on agent.h.
10991
10992 2012-03-03 Yao Qi <yao@codesourcery.com>
10993
10994 * Makefile.in (OBS): Add agent.o.
10995 Add new rule for agent.o.
10996 Track dependence of tracepoint.c on agent.h.
10997 * tracepoint.c (run_inferior_command_1):
10998 (run_inferior_command): Call agent_run_command.
10999 (gdb_ust_connect_sync_socket): Deleted. Move it to
11000 common/agent.c.
11001 (resume_thread, stop_thread): Likewise.
11002 (gdb_ust_socket_init): Renamed to ...
11003 (gdb_agent_socket_init): ... New.
11004 (gdb_ust_thread): Renamed to ...
11005 (gdb_agent_helper_thread): ... New.
11006 (gdb_ust_init): Move some code to ...
11007 (gdb_agent_init): ... here. New.
11008 [HAVE_UST]: Call gdb_ust_init.
11009 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11010 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11011 * config.in, configure: Regenerated.
11012
11013 2012-03-02 Pedro Alves <palves@redhat.com>
11014
11015 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11016 * linux-low.c (struct simple_pid_list): New.
11017 (stopped_pids): New a struct simple_pid_list pointer.
11018 (add_to_pid_list, pull_pid_from_list): New.
11019 (handle_extended_wait): Don't assume the first signal new children
11020 report is SIGSTOP. Adjust call to pull_pid_from_list.
11021 (linux_wait_for_lwp): Adjust.
11022
11023 2012-03-02 Yao Qi <yao@codesourcery.com>
11024
11025 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11026 debug log.
11027
11028 2012-03-02 Yao Qi <yao@codesourcery.com>
11029
11030 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11031 `stop_pc' and `tpoint'. Update caller.
11032
11033 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11034
11035 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11036 * linux-low.c (use_linux_regsets): New macro.
11037 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11038 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11039 (linux_register_in_regsets): New function.
11040 (usr_fetch_inferior_registers): Skip registers covered by
11041 regsets.
11042 (usr_store_inferior_registers): Likewise.
11043 (usr_fetch_inferior_registers): New macro.
11044 (usr_store_inferior_registers): Likewise.
11045 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11046 (linux_store_registers): Likewise.
11047 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11048 prototype.
11049 (init_registers_mips64_dsp_linux): Likewise.
11050 (init_registers_mips_linux): New macro.
11051 (init_registers_mips_dsp_linux): Likewise.
11052 (mips_dsp_num_regs): Likewise.
11053 (DSP_BASE, DSP_CONTROL): New fallback macros.
11054 (mips_base_regs): New macro.
11055 (mips_regmap): Use it. Fix the size.
11056 (mips_dsp_regmap): New variable.
11057 (mips_dsp_regset_bitmap): Likewise.
11058 (mips_arch_setup): New function.
11059 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11060 than mips_regmap.
11061 (mips_cannot_store_register): Likewise.
11062 (the_low_target): Update .arch_setup, .num_regs and .regmap
11063 initializers. Add .regset_bitmap initializer.
11064 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11065 initializer.
11066 * linux-bfin-low.c (the_low_target): Likewise.
11067 * linux-cris-low.c (the_low_target): Likewise.
11068 * linux-crisv32-low.c (the_low_target): Likewise.
11069 * linux-ia64-low.c (the_low_target): Likewise.
11070 * linux-m32r-low.c (the_low_target): Likewise.
11071 * linux-m68k-low.c (the_low_target): Likewise.
11072 * linux-ppc-low.c (the_low_target): Likewise.
11073 * linux-s390-low.c (the_low_target): Likewise.
11074 * linux-sh-low.c (the_low_target): Likewise.
11075 * linux-sparc-low.c (the_low_target): Likewise.
11076 * linux-tic6x-low.c (the_low_target): Likewise.
11077 * linux-x86-low.c (the_low_target): Likewise.
11078 * linux-xtensa-low.c (the_low_target): Likewise.
11079 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11080 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11081 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11082 srv_xmlfiles.
11083 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11084 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11085
11086 2012-02-29 Yao Qi <yao@codesourcery.com>
11087 Pedro Alves <palves@redhat.com>
11088
11089 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11090 `step_over_finished' is true.
11091
11092 2012-02-27 Pedro Alves <palves@redhat.com>
11093
11094 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11095 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11096
11097 2012-02-27 Pedro Alves <palves@redhat.com>
11098
11099 PR server/9684
11100 * linux-low.c (pid_is_stopped): New.
11101 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11102
11103 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11104
11105 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11106 of conditions.
11107
11108 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11109
11110 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11111
11112 2012-02-24 Luis Machado <lgustavo@codesourcery>
11113
11114 * server.c (handle_query): Advertise support for target-side
11115 breakpoint condition evaluation.
11116 (process_point_options): New function.
11117 (process_serial_event): When inserting a breakpoint, check for
11118 a target-side condition that should be evaluated.
11119
11120 * mem-break.c: Include regcache.h and ax.h.
11121 (point_cond_list_t): New data structure.
11122 (breakpoint) <cond_list>: New field.
11123 (find_gdb_breakpoint_at): Make non-static.
11124 (delete_gdb_breakpoint_at): Clear any target-side
11125 conditions.
11126 (clear_gdb_breakpoint_conditions): New function.
11127 (add_condition_to_breakpoint): Likewise.
11128 (add_breakpoint_condition): Likewise.
11129 (gdb_condition_true_at_breakpoint): Likewise.
11130 (gdb_breakpoint_here): Return result directly instead
11131 of going through a local variable.
11132
11133 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11134 (clear_gdb_breakpoint_conditions): Likewise.
11135 (add_breakpoint_condition): Likewise.
11136 (gdb_condition_true_at_breakpoint): Likewise.
11137
11138 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11139 (need_step_over_p): Take target-side breakpoint condition into
11140 consideration.
11141
11142 2012-02-24 Luis Machado <lgustavo@codesourcery>
11143
11144 * server.h: Include tracepoint.h.
11145 (agent_mem_read, agent_get_trace_state_variable_value,
11146 agent_set_trace_state_variable_value,
11147 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11148 get_set_tsv_func_addr): New prototypes.
11149
11150 * ax.h: New include file.
11151 * ax.c: New source file.
11152
11153 * tracepoint.c: Include ax.h.
11154 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11155 agent_expr, eval_result_type): Move to ax.h.
11156 (parse_agent_expr): Rename to ...
11157 (gdb_parse_agent_expr): ... this, make it non-static and move
11158 to ax.h.
11159 (unparse_agent_expr) Rename to ...
11160 (gdb_unparse_agent_expr): ... this, make it non-static and move
11161 to ax.h.
11162 (eval_agent_expr): Rename to ...
11163 (eval_tracepoint_agent_expr): ... this.
11164 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11165 forward declarations.
11166 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11167 (agent_get_trace_state_variable_value): New function.
11168 (agent_set_trace_state_variable_value): New function.
11169 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11170 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11171 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11172 (condition_true_at_tracepoint): Likewise.
11173 (parse_agent_expr): Rename to ...
11174 (gdb_parse_agent_expr): ... this and move to ax.c.
11175 (unparse_agent_expr): Rename to ...
11176 (gdb_unparse_agent_expr): ... this and move to ax.c.
11177 (gdb_agent_op_name): Move to ax.c.
11178 (eval_agent_expr): Rename to ...
11179 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11180 and move to ax.c.
11181 (eval_tracepoint_agent_expr): New function.
11182 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11183 non-static.
11184 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11185 ax.c.
11186 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11187 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11188 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11189 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11190 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11191 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11192 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11193 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11194 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11195 (compile_bytecodes): Remove forward declaration.
11196 (is_goto_target): Move to ax.c.
11197 (compile_bytecodes): Move to ax.c and call
11198 agent_get_trace_state_variable_value (...) and
11199 agent_set_trace_state_variable_value (...).
11200
11201 * Makefile.in: Update ax.c and IPA dependencies.
11202
11203 2012-02-24 Pedro Alves <palves@redhat.com>
11204
11205 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11206 (cmd_bigqtbuffer_circular): ... this. Only handle
11207 'QTBuffer:circular:'.
11208 (handle_tracepoint_general_set): Adjust.
11209
11210 2012-02-16 Yao Qi <yao@codesourcery.com>
11211
11212 * inferiors.c: Move code to ...
11213 * dll.c: .... here. New.
11214 * server.h: Declare clear_dlls.
11215 * Makefile.in (SFILES): Add dll.c.
11216 (OBS): Add dll.o
11217 (dll.o): New rule.
11218
11219 2012-02-11 Yao Qi <yao@codesourcery.com>
11220
11221 * server.c: (handle_monitor_command): Add a new parameter
11222 `own_buf'.
11223 (handle_query): Update caller.
11224
11225 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11226
11227 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11228 * configure, config.in: Regenerate.
11229 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11230 is not defined.
11231
11232 2012-02-02 Pedro Alves <palves@redhat.com>
11233
11234 Try SIGKILL first, then PTRACE_KILL.
11235 * linux-low.c (linux_kill_one_lwp): New.
11236 (linux_kill_one_lwp): Rename to ...
11237 (kill_one_lwp_callback): ... this. Use the new
11238 linux_kill_one_lwp.
11239
11240 2012-02-02 Pedro Alves <palves@redhat.com>
11241
11242 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11243 inferior.
11244
11245 2012-01-27 Pedro Alves <palves@redhat.com>
11246
11247 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11248 (elf_64_file_p): Make static.
11249 (linux_pid_exe_is_elf_64_file): New.
11250 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11251 Delete declarations.
11252 (linux_pid_exe_is_elf_64_file): Declare.
11253 * linux-x86-low.c (x86_arch_setup): Use
11254 linux_pid_exe_is_elf_64_file.
11255
11256 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11257
11258 * linux-low.c (linux_wait_for_event_1): Rename to ...
11259 (linux_wait_for_event): ... here and merge it with former
11260 linux_wait_for_event - new variable wait_ptid, use it.
11261 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11262
11263 2012-01-23 Pedro Alves <palves@redhat.com>
11264
11265 * server.c (main): Avoid yet another case of infinite loop while
11266 detaching/killing after a longjmp.
11267
11268 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11269
11270 Code cleanup.
11271 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11272
11273 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11274
11275 * hostio.c (handle_readlink): New function.
11276 (handle_vFile): Call it to handle "vFile:readlink" packets.
11277
11278 2012-01-20 Pedro Alves <palves@redhat.com>
11279 Ulrich Weigand <ulrich.weigand@linaro.org>
11280
11281 * server.c (handle_v_requests): Only support vAttach and vRun to
11282 start multiple processes when in extended protocol mode.
11283
11284 2012-01-17 Pedro Alves <palves@redhat.com>
11285
11286 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11287 memalign plus mprotect to allocate the scratch buffer.
11288
11289 2012-01-13 Pedro Alves <palves@redhat.com>
11290
11291 * server.c (attach_inferior): Clear `cont_thread'.
11292
11293 2012-01-13 Pedro Alves <palves@redhat.com>
11294
11295 * server.c (main): Avoid infinite loop while detaching/killing
11296 after a longjmp.
11297
11298 2012-01-09 Doug Evans <dje@google.com>
11299
11300 * server.c (start_inferior): Set last_ptid in --wrapper case.
11301
11302 2012-01-06 Yao Qi <yao@codesourcery.com>
11303
11304 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11305 defined.
11306 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11307
11308 2012-01-04 Yao Qi <yao@codesourcery.com>
11309
11310 * tracepoint.c (cmd_qtdp): Print debug message
11311 for static tracepoint.
11312
11313 2012-01-04 Yao Qi <yao@codesourcery.com>
11314
11315 * tracepoint.c (trace_vdebug): Differentiate debug message
11316 between gdbserver and IPA.
11317
11318 2012-01-03 Yao Qi <yao@codesourcery.com>
11319
11320 * tracepoint.c (tracepoint_was_hit): Don't collect for
11321 static tracepoint.
11322
11323 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11324
11325 * terminal.h: Reformat copyright header.
11326
11327 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11328
11329 * server.c (gdbserver_version): Update copyright year.
11330 * gdbreplay.c (gdbreplay_version): Likewise.
11331
11332 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11333
11334 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11335
11336 Revert:
11337 2011-12-18 Hui Zhu <teawater@gmail.com>
11338 * linux-low.c (linux_create_inferior): Save return value to ret.
11339
11340 2011-12-18 Hui Zhu <teawater@gmail.com>
11341
11342 * linux-low.c (linux_create_inferior): Save return value to ret.
11343
11344 2011-12-16 Doug Evans <dje@google.com>
11345
11346 * linux-low.c (linux_create_inferior): If stdio connection,
11347 redirect stdin from /dev/null, stdout to stderr.
11348 * remote-utils.c (remote_is_stdio): New static global.
11349 (remote_connection_is_stdio): New function.
11350 (remote_prepare): Handle stdio connection.
11351 (remote_open): Ditto.
11352 (remote_close): Don't close stdin for stdio connections.
11353 (read_prim,write_prim): New functions. Replace all calls to
11354 read/write to these.
11355 * server.c (main): Watch for "-" argument. Move call to
11356 remote_prepare before start_inferior.
11357 * server.h (STDIO_CONNECTION_NAME): New macro.
11358 (remote_connection_is_stdio): Declare.
11359
11360 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11361 in debugging output.
11362
11363 2011-12-15 Yao Qi <yao@codesourcery.com>
11364
11365 * tracepoint.c: Include sys/syscall.h.
11366 (gdb_ust_thread): Remove preprocessor conditional.
11367
11368 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11369
11370 * linux-low.c (linux_detach_one_lwp): Call
11371 the_low_target.prepare_to_resume before detaching.
11372
11373 2011-12-14 Yao Qi <yao@codesourcery.com>
11374
11375 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11376 of write.
11377
11378 2011-12-14 Yao Qi <yao@codesourcery.com>
11379
11380 * i386-low.c (i386_low_stopped_data_address): Initialize local
11381 variable `control'.
11382
11383 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11384
11385 PR remote/13492
11386
11387 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11388 DR_CONTROL unless necessary. Extend comments.
11389 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11390 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11391
11392 2011-12-13 Yao Qi <yao@codesourcery.com>
11393
11394 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11395 macros.
11396 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11397
11398 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11399
11400 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11401 Print new debug message for such case.
11402
11403 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11404
11405 Fix overlapping memcpy.
11406 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11407 the read_inferior_memory transfer.
11408 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11409 write_inferior_memory transfer.
11410 (set_fast_tracepoint_jump): New variable buf. Use it for the
11411 read_inferior_memory and write_inferior_memory transfers.
11412 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11413 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11414 Use it for the write_inferior_memory transfer.
11415 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11416 buffers.
11417
11418 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11419
11420 * linux-low.c (fetch_register, store_register): Make code
11421 consistent, fix formatting.
11422
11423 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11424
11425 * linux-low.c (usr_store_inferior_registers): Factor out code
11426 to handle individual registers into...
11427 (store_register): ... this new function.
11428
11429 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11430
11431 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11432 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11433 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11434 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11435 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11436 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11437 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11438 (srv_xmlfiles): Add new XML files.
11439
11440 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11441 and <sys/uio.h>.
11442 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11443 (init_registers_s390_linux32v1): Add prototype.
11444 (init_registers_s390_linux32v2): Likewise.
11445 (init_registers_s390_linux64v1): Likewise.
11446 (init_registers_s390_linux64v2): Likewise.
11447 (init_registers_s390x_linux64v1): Likewise.
11448 (init_registers_s390x_linux64v2): Likewise.
11449 (s390_num_regs): Increment to 52.
11450 (s390_regmap): Add orig_r2 register.
11451 (s390_num_regs_3264): Increment to 68.
11452 (s390_regmap_3264): Add orig_r2 register.
11453 (s390_collect_ptrace_register): Handle orig_r2 register.
11454 (s390_supply_ptrace_register): Likewise.
11455 (s390_fill_last_break): New function.
11456 (s390_store_last_break): Likewise.
11457 (s390_fill_system_call): New function.
11458 (s390_store_system_call): Likewise.
11459 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11460 register sets.
11461 (s390_check_regset): New function.
11462 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11463 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11464 Update target_regsets for available register sets.
11465
11466 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11467 Jan Kratochvil <jan.kratochvil@redhat.com>
11468
11469 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11470 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11471 New.
11472 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11473 * linux-low.h (struct process_info_private): New member r_debug.
11474 * server.c (handle_qxfer_libraries): Call
11475 the_target->qxfer_libraries_svr4.
11476 (handle_qxfer_libraries_svr4): New function.
11477 (qxfer_packets): New entry "libraries-svr4".
11478 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11479 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11480 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11481 PACKET_qXfer_libraries_svr4.
11482
11483 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11484
11485 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11486 PSW address/mask between 8-byte and 16-byte formats.
11487 (s390_supply_ptrace_register): Likewise.
11488 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11489 basic addressing mode bit.
11490
11491 2011-11-24 Stan Shebs <stan@codesourcery.com>
11492
11493 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11494
11495 2011-11-17 Stan Shebs <stan@codesourcery.com>
11496
11497 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11498 (tracing_start_time): New global.
11499 (tracing_stop_time): New global.
11500 (tracing_user_name): New global.
11501 (tracing_notes): New global.
11502 (tracing_stop_note): New global.
11503 (cmd_qtstart): Set traceframe_usage, start_time.
11504 (stop_tracing): Set stop_time.
11505 (cmd_qtstatus): Report additional status.
11506 (cmd_qtp): New function.
11507 (handle_tracepoint_query): Call it.
11508 (cmd_qtnotes): New function.
11509 (handle_tracepoint_general_set): Call it.
11510 (get_timestamp): Rename from tsv_get_timestamp.
11511
11512 2011-11-14 Stan Shebs <stan@codesourcery.com>
11513 Kwok Cheung Yeung <kcy@codesourcery.com>
11514
11515 * linux-x86-low.c (small_jump_insn): New.
11516 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11517 trampoline and error message, build a trampoline and issue a small
11518 jump instruction to it.
11519 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11520 trampoline and error message.
11521 (x86_get_min_fast_tracepoint_insn_len): New.
11522 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11523 * linux-low.h (struct linux_target_ops): Add arguments to
11524 install_fast_tracepoint_jump_pad operation, add new operation.
11525 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11526 arguments.
11527 (linux_get_min_fast_tracepoint_insn_len): New function.
11528 (linux_target_op): Add new operation.
11529 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11530 (gdb_trampoline_buffer_end): Ditto.
11531 (gdb_trampoline_buffer_error): Ditto.
11532 (struct ipa_sym_addresses): Add fields for new IPA variables.
11533 (symbol_list): Add entries for new IPA variables.
11534 (struct tracepoint): Add fields to hold the address range of the
11535 trampoline used by the tracepoint.
11536 (trampoline_buffer_head): New static variable.
11537 (trampoline_buffer_tail): Ditto.
11538 (claim_trampoline_space): New function.
11539 (have_fast_tracepoint_trampoline_buffer): New function.
11540 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11541 structure.
11542 (install_fast_tracepoint): Ditto, also add error buffer argument.
11543 (cmd_qtminftpilen): New function.
11544 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11545 (fast_tracepoint_from_trampoline_address): New function.
11546 (fast_tracepoint_collecting): Handle trampoline as part of jump
11547 pad space.
11548 (set_trampoline_buffer_space): New function.
11549 (initialize_tracepoint): Initialize new IPA variables.
11550 * target.h (struct target_ops): Add arguments to
11551 install_fast_tracepoint_jump_pad operation, add new
11552 get_min_fast_tracepoint_insn_len operation.
11553 (target_get_min_fast_tracepoint_insn_len): New.
11554 (install_fast_tracepoint_jump_pad): Add arguments.
11555 * server.h (IPA_BUFSIZ): Define.
11556 * linux-i386-ipa.c: Include extra header files.
11557 (initialize_fast_tracepoint_trampoline_buffer): New function.
11558 (initialize_low_tracepoint): Call it.
11559 * server.h (set_trampoline_buffer_space): Declare.
11560 (claim_trampoline_space): Ditto.
11561 (have_fast_tracepoint_trampoline_buffer): Ditto.
11562
11563 2011-11-14 Yao Qi <yao@codesourcery.com>
11564
11565 * server.c (handle_query): Handle InstallInTrace for qSupported.
11566 * tracepoint.c (add_tracepoint): Sort list.
11567 (install_tracepoint, download_tracepoint): New.
11568 (cmd_qtdp): Call them to install and download tracepoints.
11569 (sort_tracepoints): Removed.
11570 (cmd_qtstart): Update.
11571
11572 2011-11-14 Yao Qi <yao@codesourcery.com>
11573
11574 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11575 * mem-break.h: Declare.
11576 * tracepoint.c (cmd_qtstart): Move some code to ...
11577 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11578 New.
11579 (download_tracepoints): Move some code to ...
11580 (download_tracepoint_1): ... here. New.
11581
11582 2011-11-08 Yao Qi <yao@codesourcery.com>
11583
11584 * remote-utils.c (relocate_instruction): A comment fix.
11585
11586 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11587
11588 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11589 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11590 dr_status_mirror and dr_control_mirror from debug_reg_state.
11591 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11592 (i386_initial_stuff): Remove use of deleted globals.
11593 (i386_get_thread_context, i386_set_thread_context,
11594 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11595 from debug_reg_state.
11596
11597 2011-11-05 Yao Qi <yao@codesourcery.com>
11598
11599 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11600 address as TPOINT's.
11601
11602 2011-11-02 Stan Shebs <stan@codesourcery.com>
11603
11604 * tracepoint.c (agent_mem_read_string): New function.
11605 (eval_agent_expr): Call it for tracenz.
11606 * server.c (handle_query): Report support for tracenz.
11607
11608 2011-11-02 Yao Qi <yao@codesourcery.com>
11609
11610 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11611
11612 2011-11-02 Yao Qi <yao@codesourcery.com>
11613
11614 * target.h: Fix a typo in comment.
11615
11616 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11617
11618 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11619 clobber the breakpoints' shadows with fast tracepoint jumps.
11620 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11621 * target.c (write_inferior_memory): Also pass MYADDR down to
11622 check_mem_write.
11623
11624 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11625
11626 * configure.ac: Check support for personality routine.
11627 * configure: Regenerate.
11628 * config.in: Likewise.
11629 * linux-low.c: Include <sys/personality.h>.
11630 Define ADDR_NO_RANDOMIZE if necessary.
11631 (linux_create_inferior): Disable address space randomization when
11632 forking inferior, if requested.
11633 (linux_supports_disable_randomization): New function.
11634 (linux_target_ops): Install it.
11635 * server.h (disable_randomization): Declare.
11636 * server.c (disable_randomization): New global variable.
11637 (handle_general_set): Handle QDisableRandomization.
11638 (handle_query): Likewise for qSupported.
11639 (main): Support --disable-randomization and --no-disable-randomization
11640 command line arguments.
11641 * target.h (struct target_ops): Add supports_disable_randomization.
11642 (target_supports_disable_randomization): New macro.
11643
11644 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11645
11646 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11647 ifdef check.
11648 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11649 [!PT_GETDSBT] (target_loadmap): New definition.
11650 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11651 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11652 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11653 and PT_GETDSBT to LINUX_LOADMAP.
11654 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11655 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11656
11657 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11658
11659 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11660 (arm_linux_hwbp_cap): New static variable.
11661 (arm_linux_get_hwbp_cap): Replace by ...
11662 (arm_linux_init_hwbp_cap): ... this new function.
11663 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11664 (arm_linux_get_hw_watchpoint_count): Likewise.
11665 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11666 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11667 (arm_prepare_to_resume): Use perror_with_name instead of error.
11668
11669 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11670
11671 * linux-arm-low.c: Include <signal.h>.
11672 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11673 (struct arm_linux_hwbp_cap): New data type.
11674 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11675 (struct arm_linux_hw_breakpoint): New data type.
11676 (MAX_BPTS, MAX_WPTS): Define.
11677 (struct arch_process_info, struct arch_lwp_info): New data types.
11678 (arm_linux_get_hwbp_cap): New function.
11679 (arm_linux_get_hw_breakpoint_count): Likewise.
11680 (arm_linux_get_hw_watchpoint_count): Likewise.
11681 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11682 (arm_hwbp_control_initialize): Likewise.
11683 (arm_hwbp_control_is_enabled): Likewise.
11684 (arm_hwbp_control_is_initialized): Likewise.
11685 (arm_hwbp_control_disable): Likewise.
11686 (arm_linux_hw_breakpoint_equal): Likewise.
11687 (arm_linux_hw_point_initialize): Likewise.
11688 (struct update_registers_data): New data structure.
11689 (update_registers_callback: New function.
11690 (arm_insert_point): Likewise.
11691 (arm_remove_point): Likewise.
11692 (arm_stopped_by_watchpoint): Likewise.
11693 (arm_stopped_data_address): Likewise.
11694 (arm_new_process): Likewise.
11695 (arm_new_thread): Likewise.
11696 (arm_prepare_to_resume): Likewise.
11697 (the_low_target): Register arm_insert_point, arm_remove_point,
11698 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11699 arm_new_thread, and arm_prepare_to_resume.
11700
11701 2011-09-15 Stan Shebs <stan@codesourcery.com>
11702
11703 * server.h (struct emit_ops): Add compare-goto fields.
11704 * tracepoint.c (gdb_agent_op_sizes): New table.
11705 (emit_eq_goto): New function.
11706 (emit_ne_goto): New function.
11707 (emit_lt_goto): New function.
11708 (emit_le_goto): New function.
11709 (emit_gt_goto): New function.
11710 (emit_ge_goto): New function.
11711 (is_goto_target): New function.
11712 (compile_bytecodes): Recognize special cases of compare-goto
11713 combinations and call specialized emitters for them.
11714 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11715 (amd64_emit_ne_goto): New function.
11716 (amd64_emit_lt_goto): New function.
11717 (amd64_emit_le_goto): New function.
11718 (amd64_emit_gt_goto): New function.
11719 (amd64_emit_ge_goto): New function.
11720 (amd64_emit_ops): Add the new functions.
11721 (i386_emit_eq_goto): New function.
11722 (i386_emit_ne_goto): New function.
11723 (i386_emit_lt_goto): New function.
11724 (i386_emit_le_goto): New function.
11725 (i386_emit_gt_goto): New function.
11726 (i386_emit_ge_goto): New function.
11727 (i386_emit_ops): Add the new functions.
11728
11729 2011-09-08 Stan Shebs <stan@codesourcery.com>
11730
11731 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11732 (i386_emit_epilogue): Restore %ebx.
11733
11734 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11735
11736 * server.c (step_thread): Remove definition.
11737 (process_serial_event): Don't handle Hs.
11738 * server.h (step_thread): Remove declaration.
11739 * target.c (set_desired_inferior): Remove use of step_thread.
11740
11741 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11742
11743 * linux-low.c: Include linux-procfs.h.
11744 (linux_attach_lwp_1): Update comments.
11745 (linux_attach): Scan for existing threads when attaching to a
11746 process that is the tgid.
11747 * Makefile.in: Update dependencies.
11748
11749 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11750
11751 * configure.srv: Add linux-procfs.o dependencies.
11752
11753 2011-08-14 Yao Qi <yao@codesourcery.com>
11754
11755 * target.h (struct target_ops): Fix indent.
11756 * win32-low.c (win32_target_ops): Fix comment.
11757
11758 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11759 Yao Qi <yao@codesourcery.com>
11760
11761 * Makefile.in (clean): Remove tic6x-*.c files.
11762 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11763 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11764 (tic6x-c64xp-linux.c): Likewise.
11765 * configure.srv: Add support for tic6x-*-uclinux.
11766 * linux-tic6x-low.c: New.
11767 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11768
11769 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11770 Yao Qi <yao@codesourcery.com>
11771
11772 * target.h (struct target_ops): Add read_loadmap.
11773 * linux-low.c (struct target_loadseg): New type.
11774 (struct target_loadmap): New type.
11775 (linux_read_loadmap): New function.
11776 (linux_target_ops): Add linux_read_loadmap.
11777 * server.c (handle_query): Support qXfer:fdpic:read packet.
11778 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11779 to NULL.
11780
11781 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11782
11783 * win32-low.c: Include <stdint.h>.
11784
11785 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11786
11787 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11788 to the inferior here.
11789 (i386_remove_aligned_watchpoint): Ditto.
11790 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11791 fit part of the watchpoint in the debug registers.
11792 (i386_update_inferior_debug_regs): New.
11793 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11794 registers, and only update the inferior on success.
11795 (i386_low_remove_watchpoint): Ditto.
11796
11797 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11798
11799 * linux-low.c (compare_ints, unique, list_threads, show_process,
11800 linux_core_of_thread): Delete.
11801 (linux_target_ops): Change linux_core_of_thread to
11802 linux_common_core_of_thread.
11803 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11804 * utils.c (malloc_failure): Change type of argument.
11805 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11806 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11807 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11808 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11809 (IPA_OBJS): Add common-utils-ipa.o.
11810 (ptid_h, linux_osdata_h): New macros.
11811 (server_h): Add common/common-utils.h, common/xml-utils.h,
11812 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11813 common/ptid.h.
11814 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11815 ptid.o, buffer.o): New rules.
11816 (linux-low.o): Add common/linux-osdata.h as a dependency.
11817 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11818 * configure.ac: Add AC_HEADER_DIRENT check.
11819 * config.in: Regenerate.
11820 * configure: Regenerate.
11821 * remote-utils.c (xml_escape_text): Delete.
11822 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11823 buffer_xml_printf): Move to common/buffer.c.
11824 * server.c (main): Remove call to initialize_inferiors.
11825 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11826 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11827 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11828 internal_error, gdb_assert, gdb_assert_fail): Delete.
11829 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11830 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11831 common/buffer.h.
11832 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11833 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11834 initialize_inferiors): Delete.
11835
11836 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11837
11838 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11839 symbol error.
11840
11841 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11842
11843 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11844 assertion.
11845 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11846
11847 2011-05-26 Yao Qi <yao@codesourcery.com>
11848
11849 * Makefile.in (thread-db.o): Track dependence to
11850 common/gdb_thread_db.h.
11851 * thread-db.c: include gdb_thread_db.h from right place.
11852
11853 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11854
11855 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11856 __FILE__ and __LINE__ to internal_error.
11857
11858 2011-05-13 Doug Evans <dje@google.com>
11859
11860 * thread-db.c (try_thread_db_load_from_sdir): New function.
11861 (try_thread_db_load_from_dir): New function.
11862 (thread_db_load_search): Handle $sdir, ignore $pdir.
11863 Remove trying of system directories if search of
11864 libthread-db-search-path fails, that is now done via $sdir.
11865
11866 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11867
11868 * server.c (handle_query): Add EnableDisableTracepoints to the list
11869 of supported features.
11870 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11871 tracepoints.
11872 (cmd_qtenable_disable): New.
11873 (cmd_qtstart): Install tracepoints even if disabled.
11874 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11875 receiving a QTEnable or QTDisable packet.
11876 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11877 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11878 tracepoints.
11879 (gdb_probe): Skip data collection if static tracepoint is disabled.
11880
11881 2011-05-10 Doug Evans <dje@google.com>
11882
11883 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11884
11885 2011-05-04 Doug Evans <dje@google.com>
11886
11887 * linux-low.c (linux_join): Skip process lookup.
11888 * spu-low.c (spu_join): Ditto.
11889 * server.c (join_inferiors_callback): Delete.
11890 (process_serial_event): For 'D' packet (detach) call join_inferior
11891 directly.
11892
11893 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11894
11895 * README: Don't mention xscale*-*-linux*.
11896 * configure.srv (xscale*-*-linux*): Don't handle target.
11897
11898 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11899
11900 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11901 casting pointers.
11902 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11903 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11904 (i386_emit_void_call_2): Likewise.
11905
11906 2011-04-26 Yao Qi <yao@codesourcery.com>
11907
11908 * linux-low.c: Move common macros to linux-ptrace.h.
11909 Include linux-ptrace.h.
11910 * Makefile.in (linux_ptrace_h): New.
11911 (linux-low.o): Depends on linux-ptrace.h.
11912
11913 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11914
11915 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11916 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11917 (remote_prepare): New function with most of the TCP code from ...
11918 (remote_open): ... here. Detect PORT here unconditionally. Move also
11919 setting transport_is_reliable.
11920 * server.c (run_once): New variable.
11921 (gdbserver_usage): Document it.
11922 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11923 the first run if RUN_ONCE.
11924 * server.h (run_once, remote_prepare): New declarations.
11925
11926 2011-04-19 Tom Tromey <tromey@redhat.com>
11927
11928 * win32-low.c (handle_load_dll): Remove duplicate "the".
11929
11930 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11931
11932 Remove support for old Cygwin 1.5 versions.
11933 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11934 function to avoid warning.
11935 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11936 warning.
11937
11938 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11939
11940 * gdbserver/server.h (Macro _): Define it if not available.
11941
11942 2011-03-14 Michael Snyder <msnyder@vmware.com>
11943
11944 * hostio.c (handle_close): Remove unnecessary null test.
11945
11946 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11947
11948 * Makefile.in (maintainer-clean realclean distclean): Remove
11949 "make ... subdir_do" command.
11950
11951 2011-03-10 Michael Snyder <msnyder@vmware.com>
11952
11953 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11954
11955 * server.c (handle_v_run): Free alloced buffer on early return.
11956
11957 2011-03-09 Yao Qi <yao@codesourcery.com>
11958
11959 Revert:
11960 2011-03-04 Yao Qi <yao@codesourcery.com>
11961
11962 * Makefile.in: Remove GNU make feature --directory.
11963
11964 2011-03-05 Yao Qi <yao@codesourcery.com>
11965
11966 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11967 (subdir_do): New make target. Copied from gdb/Makefile.
11968 (maintainer-clean, realclean, distclean, clean): Call corresponding
11969 make targets in common/Makefile.
11970
11971 2011-02-11 Yao Qi <yao@codesourcery.com>
11972
11973 * configure.ac: Call AC_PROG_RANLIB.
11974 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11975 * configure: Regenerate.
11976
11977 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11978
11979 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11980
11981 2011-03-06 Yao Qi <yao@codesourcery.com>
11982
11983 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11984
11985 2011-03-05 Yao Qi <yao@codesourcery.com>
11986
11987 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11988 (subdir_do): New make target. Copied from gdb/Makefile.
11989 (maintainer-clean, realclean, distclean, clean): Call corresponding
11990 make targets in common/Makefile.
11991
11992 2011-03-04 Yao Qi <yao@codesourcery.com>
11993
11994 * Makefile.in: Remove GNU make feature --directory.
11995
11996 2011-03-04 Michael Snyder <msnyder@vmware.com>
11997
11998 * server.c (queue_stop_reply): Call xmalloc not malloc.
11999
12000 2011-03-02 Michael Snyder <msnyder@vmware.com>
12001
12002 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12003
12004 2011-02-28 Michael Snyder <msnyder@vmware.com>
12005
12006 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12007 (cmd_qtframe): Ditto.
12008 (cmd_qtbuffer): Ditto.
12009 (cmd_bigqtbuffer): Ditto.
12010
12011 * utils.c (decimal2str): Initialize 'width' to nine, then
12012 don't mess with it.
12013
12014 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12015
12016 * hostio.c (require_data): Free *data, not data.
12017
12018 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12019
12020 * hostio.c (require_data): Use free, not xfree.
12021
12022 2011-02-27 Michael Snyder <msnyder@vmware.com>
12023
12024 * server.c (handle_query): Discard unused value.
12025
12026 * hostio.c (require_data): Free malloc memory before returning
12027 error.
12028
12029 2011-02-26 Michael Snyder <msnyder@vmware.com>
12030
12031 * linux-low.c (list_threads): Call closedir for dirent.
12032
12033 2011-02-27 Michael Snyder <msnyder@vmware.com>
12034
12035 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12036 a case statement falls through.
12037
12038 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12039
12040 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12041 in comparison.
12042
12043 2011-02-26 Michael Snyder <msnyder@vmware.com>
12044
12045 * utils.c (decimal2str): Eliminate dead code and dead param.
12046 (pulongest): Drop dead param from call to decimal2str.
12047 (plongest): Ditto.
12048
12049 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12050
12051 Revert the following patch (not approved yet):
12052 2011-02-21 Hui Zhu <teawater@gmail.com>
12053 * tracepoint.c (tp_printf): New function.
12054 (eval_agent_expr): Handle gdb_agent_op_printf.
12055
12056 2011-02-21 Hui Zhu <teawater@gmail.com>
12057
12058 * tracepoint.c (tp_printf): New function.
12059 (eval_agent_expr): Handle gdb_agent_op_printf.
12060
12061 2011-02-18 Tom Tromey <tromey@redhat.com>
12062
12063 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12064 (tracepoint.o): Likewise.
12065 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12066 (gdb_agent_op_names): Likewise.
12067
12068 2011-02-18 Tom Tromey <tromey@redhat.com>
12069
12070 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12071 gdb_agent_op_rot>: New constants.
12072 (gdb_agent_op_names): Add pick and roll.
12073 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12074 cases.
12075
12076 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12077
12078 * aclocal.m4: Regenerated with aclocal-1.11.1.
12079
12080 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12081
12082 * server.c (handle_qxfer_traceframe_info): New.
12083 (qxfer_packets): Register "traceframe-info".
12084 (handle_query): Report support for qXfer:traceframe-info:read+.
12085 * tracepoint.c (match_blocktype): New.
12086 (traceframe_find_block_type): Rename to ...
12087 (traceframe_walk_blocks): ... this. Add callback filter argument,
12088 and use it.
12089 (traceframe_find_block_type): New, reimplemented on top of
12090 traceframe_walk_blocks.
12091 (build_traceframe_info_xml): New.
12092 (traceframe_read_info): New.
12093 * server.h (traceframe_read_info): Declare.
12094
12095 2011-02-11 Yao Qi <yao@codesourcery.com>
12096
12097 * configure.ac: Call AC_PROG_RANLIB.
12098 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12099 * configure: Regenerate.
12100
12101 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12102
12103 * server.c (gdb_read_memory): Change return semantics to allow
12104 partial transfers.
12105 (handle_search_memory_1): Adjust.
12106 (process_serial_event) <'m' packet>: Handle partial transfers.
12107 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12108
12109 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12110
12111 * regcache.c (init_register_cache): Initialize
12112 regcache->register_status.
12113 (free_register_cache): Release regcache->register_status.
12114 (regcache_cpy): Copy register_status.
12115 (registers_to_string): Print 'x's for unavailable registers.
12116 (supply_register): Mark the register's status valid or
12117 unavailable, depending on whether a buffer was passed in or not.
12118 (supply_register_zeroed): New.
12119 (supply_regblock): Mark the registers' status valid or
12120 unavailable, depending on whether a buffer was passed in or not.
12121 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12122 (struct regcache): New `register_status' field.
12123 (supply_register_zeroed): Declare.
12124 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12125 supply_register_zeroed, rather than passing a NULL buffer to
12126 supply_register.
12127 * tracepoint.c (fetch_traceframe_registers): Update comment.
12128
12129 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12130
12131 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12132 buffer explicit.
12133
12134 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12135
12136 * server.h (decode_xfer_write): Change prototype.
12137 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12138 and don't extract the annex here.
12139 * server.c (decode_xfer_read): Remove `annex' parameter,
12140 and don't extract the annex here.
12141 (decode_xfer): New.
12142 (struct qxfer): New.
12143 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12144 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12145 (handle_qxfer_statictrace): New functions, abstracted out from
12146 handle_query, and made to use the struct qxfer interface.
12147 (handle_threads_qxfer_proper): Rename to ...
12148 (handle_qxfer_threads_proper): ... this.
12149 (handle_threads_qxfer): Rename to ...
12150 (handle_qxfer_threads): ... this. Adjust.
12151 (qxfer_packets): New array.
12152 (handle_qxfer): New function.
12153 (handle_query): Use handle_qxfer.
12154
12155 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12156
12157 * gdbreplay.c: Shorten lines of >= 80 columns.
12158 * linux-low.c: Ditto.
12159 * linux-ppc-low.c: Ditto.
12160 * linux-s390-low.c: Ditto.
12161 * linux-sparc-low.c: Ditto.
12162 * linux-x86-low.c: Ditto.
12163 * linux-xtensa-low.c: Ditto.
12164 * mem-break.c: Ditto.
12165 * nto-low.c: Ditto.
12166 * regcache.h: Ditto.
12167 * remote-utils.c: Ditto.
12168 * server.c: Ditto.
12169 * server.h: Ditto.
12170 * thread-db.c: Ditto.
12171 * tracepoint.c: Ditto.
12172 * utils.c: Ditto.
12173 * win32-low.h: Ditto.
12174
12175 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12176
12177 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12178 update.
12179
12180 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12181
12182 * server.c (gdbserver_version): Update copyright year in version
12183 output.
12184 * gdbreplay.c (gdbreplay_version): Ditto.
12185
12186 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12187
12188 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12189 * linux-bfin-low.c: New file.
12190 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12191 PT_DATA_ADDR for BFIN targets.
12192 * Makefile.in (SFILES): Add linux-bfin-low.c.
12193 (clean): Remove reg-bfin.c.
12194 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12195 * README: Mention supported Blackfin targets.
12196
12197 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12198
12199 * .gitignore: New file.
12200
12201 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12202
12203 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12204
12205 2010-10-22 Jie Zhang <jie@codesourcery.com>
12206
12207 * Makefile.in: Add FLAGS_TO_PASS variable.
12208 (install): Remove dependency of install-only and recursively
12209 invoke make for install-only.
12210
12211 2010-10-04 Doug Evans <dje@google.com>
12212
12213 * Makefile.in (uninstall): Use $(DESTDIR).
12214
12215 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12216
12217 PR gdb/11842
12218
12219 * linux-x86-low.c (compat_siginfo_from_siginfo)
12220 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12221 si_code is < 0. Check for si_code == SI_TIMER before checking for
12222 si_code < 0.
12223
12224 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12225
12226 * lynx-i386-low.c: New file.
12227 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12228
12229 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12230
12231 * lynx-low.c (ptrace_request_to_str): Remove handling for
12232 request values that have been removed in LynxOS 5.x.
12233
12234 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12235
12236 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12237 <ptrace.h>
12238
12239 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12240
12241 * configure.ac: Add --enable-inprocess-agent option.
12242 * configure: Rebuilt.
12243
12244 2010-09-06 Yao Qi <yao@codesourcery.com>
12245
12246 * linux-low.c (linux_kill): Remove unused variable.
12247 (linux_stabilize_threads): Likewise.
12248 * server.c (start_inferior): Likewise.
12249 (queue_stop_reply_callback): Likewise.
12250 * tracepoint.c (do_action_at_tracepoint): Likewise.
12251
12252 2010-09-06 Yao Qi <yao@codesourcery.com>
12253
12254 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12255 on return.
12256
12257 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12258
12259 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12260
12261 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12262
12263 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12264 "$(IPA_DEPFILES)".
12265
12266 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12267
12268 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12269 gdbserver/lynx-ppc-low.c: New files.
12270 * Makefile.in (lynx_low_h): New variable.
12271 (lynx-low.o, lynx-ppc-low.o): New rules.
12272 * configure.ac: On LynxOS, link with -lnetinet.
12273 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12274 * configure: regenerate.
12275
12276 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12277
12278 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12279 * configure.ac: Add check for vasprintf and vsnprintf.
12280 * configure, config.in: Regenerate.
12281 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12282
12283 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12284
12285 * gdbreplay.c: Move include of alloca.h up, next to include of
12286 malloc.h.
12287 * server.h: Add include of malloc.h.
12288 * mem-break.c: Remove include of malloc.h.
12289 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12290
12291 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12292
12293 * Makefile.in (memmem.o): Build with -Wno-error.
12294
12295 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12296
12297 * utils.c (xsnprintf): Make non-static.
12298 * server.h: Add xsnprintf declaration.
12299 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12300 replace calls to snprintf by calls to xsnprintf throughout.
12301
12302 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12303
12304 * configure.ac: Add configure check for alloca.
12305 * configure, config.in: Regenerate.
12306 * server.h: Include alloca.h if it exists.
12307 * gdbreplay.c: Include alloca.h if it exists.
12308
12309 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12310
12311 * linux-low.c (__SIGRTMIN): Define if not already defined.
12312 (linux_create_inferior): Check for __ANDROID__ rather than
12313 __SIGRTMIN.
12314 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12315 are already deferred.
12316 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12317 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12318 stopped and already has a pending signal to report.
12319 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12320 a pending signal to report or is moving out of a jump pad.
12321 (linux_init_signals): Check for __ANDROID__ rather than
12322 __SIGRTMIN.
12323
12324 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12325
12326 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12327 debug_threads check. Avoid a linear search when not doing debug
12328 output.
12329
12330 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12331
12332 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12333 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12334 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12335 (process_event): Change local fd's type to gdb_fildes_t.
12336 (create_file_handler): Adjust prototype.
12337 (delete_file_handler): Adjust prototype.
12338 (handle_file_event): Adjust prototype. Use pfildes.
12339 (create_file_event): Adjsut prototype.
12340 * remote-utils.c (remote_desc, listen_desc): Change type to
12341 gdb_fildes_t.
12342 * server.h: New gdb_fildes_t typedef.
12343 [USE_WIN32API]: Include winsock2.h.
12344 (delete_file_handler, add_file_handler): Adjust prototypes.
12345 (pfildes): Declare.
12346 * utils.c (pfildes): New.
12347
12348 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12349
12350 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12351 * configure: Regenerate.
12352
12353 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12354
12355 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12356 (linux_done_accessing_memory): ... this.
12357 (linux_target_ops): Adjust.
12358 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12359 * nto-low.c (nto_target_ops): Adjust comment.
12360 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12361 * spu-low.c (spu_target_ops): Adjust comment.
12362 * target.h (target_ops): Rename unprepare_to_access_memory field
12363 to done_accessing_memory.
12364 (unprepare_to_access_memory): Rename to ...
12365 (done_accessing_memory): ... this.
12366
12367 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12368
12369 * linux-low.c (linux_prepare_to_access_memory): New.
12370 (linux_unprepare_to_access_memory): New.
12371 (linux_target_ops): Install them.
12372 * server.c (read_memory): Rename to ...
12373 (gdb_read_memory): ... this. Use
12374 prepare_to_access_memory/prepare_to_access_memory.
12375 (write_memory): Rename to ...
12376 (gdb_write_memory): ... this. Use
12377 prepare_to_access_memory/prepare_to_access_memory.
12378 (handle_search_memory_1): Adjust.
12379 (process_serial_event): Adjust.
12380 * target.h (struct target_ops): New fields
12381 prepare_to_access_memory and unprepare_to_access_memory.
12382 (prepare_to_access_memory, unprepare_to_access_memory): New.
12383 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12384 prepare_to_access_memory/prepare_to_access_memory.
12385 * nto-low.c (nto_target_ops): Adjust.
12386 * spu-low.c (spu_target_ops): Adjust.
12387 * win32-low.c (win32_target_ops): Adjust.
12388
12389 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12390
12391 * Makefile.in (WARN_CFLAGS): Get it from configure.
12392 (WERROR_CFLAGS): New.
12393 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12394 * configure.ac: Introduce --enable-werror, which adds -Werror to
12395 the compiler command line. Enabled by default. Disable with
12396 --disable-werror. Add -Wdeclaration-after-statement
12397 Wpointer-arith and -Wformat-nonliteral to warning flags.
12398 * configure: Regenerate.
12399
12400 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12401
12402 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12403
12404 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12405
12406 * gdbreplay.c (remote_error): New.
12407 (gdbchar): New.
12408 (expect): Use gdbchar. Check for error reading from GDB.
12409 Clarify sync error output.
12410 (play): Check for errors writing to GDB.
12411 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12412 * remote-utils.c (getpkt): Check for errors writing to the remote
12413 descriptor.
12414
12415 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12416
12417 * linux-low.c (linux_wait_1): Move non-debugging code out of
12418 `debug_threads' control.
12419
12420 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12421
12422 * linux-low.c (linux_wait_1): Don't set last_status here.
12423 * server.c (push_event, queue_stop_reply_callback): Assert we're
12424 not pushing a TARGET_WAITKIND_IGNORE event.
12425 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12426 (myresume, handle_target_event): Set the thread's last_resume_kind
12427 and last_status from the target returned status.
12428
12429 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12430
12431 PR threads/10729
12432
12433 * linux-x86-low.c (update_debug_registers_callback): New.
12434 (i386_dr_low_set_addr): Use it.
12435 (i386_dr_low_get_addr): New.
12436 (i386_dr_low_set_control): Use update_debug_registers_callback.
12437 (i386_dr_low_get_control): New.
12438 (i386_dr_low_get_status): Adjust.
12439 * linux-low.c (linux_stop_lwp): New.
12440 * linux-low.h (linux_stop_lwp): Declare.
12441
12442 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12443 argument instead of a i386_debug_reg_state.
12444 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12445 a i386_debug_reg_state.
12446 (i386_insert_aligned_watchpoint): Adjust.
12447 (i386_remove_aligned_watchpoint): Adjust.
12448 (i386_low_stopped_data_address): Read the debug registers from the
12449 inferior instead of from the mirrors.
12450 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12451 (i386_dr_low_get_addr): Declare.
12452 (i386_dr_low_get_control): Declare.
12453 (i386_dr_low_get_status): Change prototype.
12454
12455 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12456 (i386_dr_low_get_addr): New.
12457 (i386_dr_low_get_control): New.
12458 (i386_dr_low_get_status): Adjust prototype. Return
12459 dr_status_mirror.
12460 (i386_initial_stuff): Clear dr_status_mirror and
12461 dr_control_mirror.
12462 (i386_get_thread_context): Adjust.
12463 (i386_set_thread_context): Adjust.
12464 (i386_thread_added): Adjust.
12465
12466 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12467
12468 * linux-low.h (linux_thread_area): Delete declaration.
12469
12470 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12471
12472 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12473 after its termination.
12474
12475 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12476
12477 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12478 (gdb_wants_all_stopped): Delete.
12479 (linux_wait_1): Don't call them.
12480 * server.c (handle_v_cont): Tag all threads as want-stopped.
12481 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12482 stopped as "client-wants-stopped".
12483
12484 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12485
12486 * Makefile.in (signals_h): New.
12487 (server_h): Depend on it.
12488 (server.o): Don't depend on $(signals_def).
12489 (signals.o): Depend on $(signals_def).
12490
12491 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12492
12493 * Makefile.in (signals_def): New.
12494 (server_h): Append include/gdb/signals.h and signals_def.
12495 (server.o): Append signals_def.
12496
12497 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12498
12499 * server.c (handle_target_event): Use target_signal_to_host for
12500 resume_info.sig initialization.
12501 * target.h (struct thread_resume) <sig>: New comment.
12502
12503 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12504
12505 * server.c (handle_query): strcpy() the returned string from paddress()
12506 instead of sprintf().
12507 * utils.c (paddress): Return phex_nz().
12508
12509 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12510
12511 * server.c (handle_v_cont): Call mourn_inferior if process
12512 just exited.
12513 (myresume): Likewise.
12514
12515 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12516
12517 Static tracepoints, and integration with UST.
12518
12519 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12520 * mem-break.c (uninsert_all_breakpoints)
12521 (reinsert_all_breakpoints): New.
12522 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12523 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12524 (gdb_agent_ust_loaded, helper_thread_id)
12525 (gdb_agent_helper_thread_id): New macros.
12526 (struct ipa_sym_addresses): Add addr_ust_loaded,
12527 addr_helper_thread_id, addr_cmd_buf.
12528 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12529 (in_process_agent_loaded_ust): New.
12530 (write_e_ust_not_loaded): New.
12531 (maybe_write_ipa_ust_not_loaded): New.
12532 (struct collect_static_trace_data_action): New.
12533 (enum tracepoint_type) <static_tracepoint>: New.
12534 (struct tracepoint) <handle>: Mention static tracepoints.
12535 (struct static_tracepoint_ctx): New.
12536 (CMD_BUF_SIZE): New.
12537 (add_tracepoint_action): Handle static tracepoint actions.
12538 (unprobe_marker_at): New.
12539 (clear_installed_tracepoints): Handle static tracepoints.
12540 (cmd_qtdp): Handle static tracepoints.
12541 (probe_marker_at): New.
12542 (cmd_qtstart): Handle static tracepoints.
12543 (response_tracepoint): Handle static tracepoints.
12544 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12545 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12546 (get_context_regcache): Handle static tracepoints.
12547 (do_action_at_tracepoint): Handle static tracepoint actions.
12548 (traceframe_find_block_type): Handle static trace data blocks.
12549 (traceframe_read_sdata): New.
12550 (download_tracepoints): Download static tracepoint actions.
12551 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12552 (GDB_PROBE_NAME): New.
12553 (ust_ops): New.
12554 (GET_UST_SYM): New.
12555 (USTF): New.
12556 (dlsym_ust): New.
12557 (ust_marker_to_static_tracepoint): New.
12558 (gdb_probe): New.
12559 (collect_ust_data_at_tracepoint): New.
12560 (gdb_ust_probe): New.
12561 (UNIX_PATH_MAX, SOCK_DIR): New.
12562 (gdb_ust_connect_sync_socket): New.
12563 (resume_thread, stop_thread): New.
12564 (run_inferior_command): New.
12565 (init_named_socket): New.
12566 (gdb_ust_socket_init): New.
12567 (cstr_to_hexstr): New.
12568 (next_st): New.
12569 (first_marker, next_marker): New.
12570 (response_ust_marker): New.
12571 (cmd_qtfstm, cmd_qtsstm): New.
12572 (unprobe_marker_at, probe_marker_at): New.
12573 (cmd_qtstmat, gdb_ust_thread): New.
12574 (gdb_ust_init): New.
12575 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12576 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12577 (ST_REGENTRY): New.
12578 (x86_64_st_collect_regmap): New.
12579 (X86_64_NUM_ST_COLLECT_GREGS): New.
12580 (AMD64_RIP_REGNUM): New.
12581 (supply_static_tracepoint_registers): New.
12582 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12583 (ST_REGENTRY): New.
12584 (i386_st_collect_regmap): New.
12585 (i386_NUM_ST_COLLECT_GREGS): New.
12586 (supply_static_tracepoint_registers): New.
12587 * server.c (handle_query): Handle qXfer:statictrace:read.
12588 <qSupported>: Report support for StaticTracepoints, and
12589 qXfer:statictrace:read features.
12590 * server.h (traceframe_read_sdata)
12591 (supply_static_tracepoint_registers): Declare.
12592 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12593 (unpack_varlen_hex): Include in IPA build.
12594 * Makefile.in (ustlibs, ustinc): New.
12595 (IPA_OBJS): Add remote-utils-ipa.o.
12596 ($(IPA_LIB)): Link -ldl and -lpthread.
12597 (UST_CFLAGS): New.
12598 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12599 * config.in, configure: Regenerate.
12600
12601 2010-06-20 Ian Lance Taylor <iant@google.com>
12602 Pedro Alves <pedro@codesourcery.com>
12603
12604 * linux-x86-low.c (always_true): Delete.
12605 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12606 trying to fool the compiler with always_true.
12607
12608 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12609
12610 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12611 conditions in gdbserver.
12612
12613 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12614
12615 * spu-low.c (spu_read_memory): Wrap around local store limit.
12616 (spu_write_memory): Likewise.
12617
12618 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12619
12620 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12621 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12622 LONGEST uses.
12623 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12624 uses.
12625 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12626 uses with LONGEST uses.
12627
12628 2010-06-14 Stan Shebs <stan@codesourcery.com>
12629 Pedro Alves <pedro@codesourcery.com>
12630
12631 Bytecode compiler.
12632
12633 * linux-x86-low.c: Include limits.h.
12634 (add_insns): New.
12635 (always_true): New.
12636 (EMIT_ASM): New.
12637 (EMIT_ASM32): New.
12638 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12639 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12640 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12641 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12642 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12643 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12644 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12645 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12646 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12647 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12648 (amd64_emit_void_call_2): New.
12649 (amd64_emit_ops): New.
12650 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12651 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12652 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12653 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12654 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12655 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12656 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12657 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12658 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12659 (i386_emit_stack_adjust, i386_emit_int_call_1)
12660 (i386_emit_void_call_2): New.
12661 (i386_emit_ops): New.
12662 (x86_emit_ops): New.
12663 (the_low_target): Install x86_emit_ops.
12664 * server.h (struct emit_ops): New.
12665 (get_raw_reg_func_addr): Declare.
12666 (current_insn_ptr, emit_error): Declare.
12667 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12668 (set_trace_state_variable_value): New defines.
12669 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12670 addr_get_trace_state_variable_value and
12671 addr_set_trace_state_variable_value.
12672 (symbol_list): New fields for get_raw_reg,
12673 get_trace_state_variable_value and set_trace_state_variable_value.
12674 (condfn): New typedef.
12675 (struct tracepoint): New field `compiled_cond'.
12676 (do_action_at_tracepoint): Clear compiled_cond.
12677 (get_trace_state_variable_value, set_trace_state_variable_value):
12678 Export in the IPA.
12679 (condition_true_at_tracepoint): If there's a compiled condition,
12680 run that.
12681 (current_insn_ptr, emit_error): New globals.
12682 (struct bytecode_address): New.
12683 (get_raw_reg_func_addr): New.
12684 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12685 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12686 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12687 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12688 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12689 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12690 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12691 (compile_tracepoint_condition, compile_bytecodes): New.
12692 * target.h (emit_ops): Forward declare.
12693 (struct target_ops): New field emit_ops.
12694 (target_emit_ops): New.
12695 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12696 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12697 * linux-low.c (linux_emit_ops): New.
12698 (linux_target_ops): Install it.
12699 * linux-low.h (struct linux_target_ops): New field emit_ops.
12700
12701 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12702
12703 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12704 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12705
12706 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12707 Stan Shebs <stan@codesourcery.com>
12708
12709 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12710 (all): Depend on $(extra_libraries).
12711 (install-only): Install the IPA.
12712 (IPA_OBJS, IPA_LIB): New.
12713 (clean): Remove the IPA lib.
12714 (IPAGENT_CFLAGS): New.
12715 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12716 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12717 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12718 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12719 * configure.ac: Check for atomic builtins support in the compiler.
12720 (IPA_DEPFILES, extra_libraries): Define.
12721 * configure.srv (ipa_obj): Add description.
12722 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12723 (i[34567]86-*-linux*): Set ipa_obj.
12724 (x86_64-*-linux*): Set ipa_obj.
12725 * linux-low.c (stabilizing_threads): New.
12726 (supports_fast_tracepoints): New.
12727 (linux_detach): Stabilize threads before detaching.
12728 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12729 the lwp is either not stabilizing, or is moving out of a jump pad.
12730 (linux_fast_tracepoint_collecting): New.
12731 (maybe_move_out_of_jump_pad): New.
12732 (enqueue_one_deferred_signal): New.
12733 (dequeue_one_deferred_signal): New.
12734 (linux_wait_for_event_1): If moving out of a jump pad, defer
12735 pending signals to later.
12736 (linux_stabilize_threads): New.
12737 (linux_wait_1): Check if threads need moving out of jump pads, and
12738 do it if so.
12739 (stuck_in_jump_pad_callback): New.
12740 (move_out_of_jump_pad_callback): New.
12741 (lwp_running): New.
12742 (linux_resume_one_lwp): Handle moving out of jump pads.
12743 (linux_set_resume_request): Dequeue deferred signals.
12744 (need_step_over_p): Also step over fast tracepoint jumps.
12745 (start_step_over): Also uninsert fast tracepoint jumps.
12746 (finish_step_over): Also reinsert fast tracepoint jumps.
12747 (linux_install_fast_tracepoint_jump): New.
12748 (linux_target_ops): Install linux_stabilize_threads and
12749 linux_install_fast_tracepoint_jump_pad.
12750 * linux-low.h (linux_target_ops) <get_thread_area,
12751 install_fast_tracepoint_jump_pad>: New fields.
12752 (struct lwp_info) <collecting_fast_tracepoint,
12753 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12754 (linux_get_thread_area): Declare.
12755 * linux-x86-low.c (jump_insn): New.
12756 (x86_get_thread_area): New.
12757 (append_insns): New.
12758 (push_opcode): New.
12759 (amd64_install_fast_tracepoint_jump_pad): New.
12760 (i386_install_fast_tracepoint_jump_pad): New.
12761 (x86_install_fast_tracepoint_jump_pad): New.
12762 (the_low_target): Install x86_get_thread_area and
12763 x86_install_fast_tracepoint_jump_pad.
12764 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12765 (struct fast_tracepoint_jump): New.
12766 (fast_tracepoint_jump_insn): New.
12767 (fast_tracepoint_jump_shadow): New.
12768 (find_fast_tracepoint_jump_at): New.
12769 (fast_tracepoint_jump_here): New.
12770 (delete_fast_tracepoint_jump): New.
12771 (set_fast_tracepoint_jump): New.
12772 (uninsert_fast_tracepoint_jumps_at): New.
12773 (reinsert_fast_tracepoint_jumps_at): New.
12774 (set_breakpoint_at): Use write_inferior_memory.
12775 (uninsert_raw_breakpoint): Use write_inferior_memory.
12776 (check_mem_read): Mask out fast tracepoint jumps.
12777 (check_mem_write): Mask out fast tracepoint jumps.
12778 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12779 (set_fast_tracepoint_jump): Declare.
12780 (delete_fast_tracepoint_jump)
12781 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12782 (reinsert_fast_tracepoint_jumps_at): Declare.
12783 * regcache.c: Don't compile many functions when building the
12784 in-process agent library.
12785 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12786 the register buffer in the heap.
12787 (free_register_cache): If the register buffer isn't owned by the
12788 regcache, don't free it.
12789 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12790 pre-existing register caches.
12791 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12792 type.
12793 (convert_ascii_to_int): : Constify `from' parameter type.
12794 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12795 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12796 the needed buffer in-place.
12797 (relocate_instruction): New.
12798 * server.c (handle_query) <qSymbols>: If the target supports
12799 tracepoints, give it a chance of looking up symbols. Report
12800 support for fast tracepoints.
12801 (handle_status): Stabilize threads.
12802 (process_serial_event): Adjust.
12803 * server.h (struct fast_tracepoint_jump): Forward declare.
12804 (struct process_info) <fast_tracepoint_jumps>: New field.
12805 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12806 (decode_X_packet, decode_M_packet): Adjust.
12807 (relocate_instruction): Declare.
12808 (in_process_agent_loaded): Declare.
12809 (tracepoint_look_up_symbols): Declare.
12810 (struct fast_tpoint_collect_status): Declare.
12811 (fast_tracepoint_collecting): Declare.
12812 (force_unlock_trace_buffer): Declare.
12813 (handle_tracepoint_bkpts): Declare.
12814 (initialize_low_tracepoint)
12815 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12816 * target.h (struct target_ops) <stabilize_threads,
12817 install_fast_tracepoint_jump_pad>: New fields.
12818 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12819 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12820 [HAVE_STDINT_H]: Include stdint.h.
12821 (trace_debug_1): Rename to ...
12822 (trace_vdebug): ... this.
12823 (trace_debug): Rename to ...
12824 (trace_debug_1): ... this. Add `level' parameter.
12825 (trace_debug): New.
12826 (ATTR_USED, ATTR_NOINLINE): New.
12827 (IP_AGENT_EXPORT): New.
12828 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12829 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12830 (about_to_request_buffer_space, trace_buffer_is_full)
12831 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12832 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12833 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12834 (traceframe_write_count, traceframes_created)
12835 (trace_state_variables)
12836 New renaming defines.
12837 (struct ipa_sym_addresses): New.
12838 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12839 (symbol_list): New.
12840 (ipa_sym_addrs): New.
12841 (all_tracepoint_symbols_looked_up): New.
12842 (in_process_agent_loaded): New.
12843 (write_e_ipa_not_loaded): New.
12844 (maybe_write_ipa_not_loaded): New.
12845 (tracepoint_look_up_symbols): New.
12846 (debug_threads) [IN_PROCESS_AGENT]: New.
12847 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12848 (UNKNOWN_SIDE_EFFECTS): New.
12849 (stop_tracing): New.
12850 (flush_trace_buffer): New.
12851 (stop_tracing_bkpt): New.
12852 (flush_trace_buffer_bkpt): New.
12853 (read_inferior_integer): New.
12854 (read_inferior_uinteger): New.
12855 (read_inferior_data_pointer): New.
12856 (write_inferior_data_pointer): New.
12857 (write_inferior_integer): New.
12858 (write_inferior_uinteger): New.
12859 (struct collect_static_trace_data_action): Delete.
12860 (enum tracepoint_type): New.
12861 (struct tracepoint) <type>: New field `type'.
12862 <actions_str, step_actions, step_actions_str>: Only include in
12863 GDBserver.
12864 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12865 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12866 (tracepoints): Use IP_AGENT_EXPORT.
12867 (last_tracepoint): Don't include in the IPA.
12868 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12869 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12870 (alloced_trace_state_variables): New.
12871 (trace_state_variables): Use IP_AGENT_EXPORT.
12872 (traceframe_t): Delete unused variable.
12873 (circular_trace_buffer): Don't include in the IPA.
12874 (trace_buffer_start): Delete.
12875 (struct trace_buffer_control): New.
12876 (trace_buffer_free): Delete.
12877 (struct ipa_trace_buffer_control): New.
12878 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12879 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12880 New.
12881 (trace_buffer_ctrl): New.
12882 (TRACE_BUFFER_CTRL_CURR): New.
12883 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12884 Reimplement as macros.
12885 (trace_buffer_wrap): Delete.
12886 (traceframe_write_count, traceframe_read_count)
12887 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12888 (struct tracepoint_hit_ctx) <type>: New field.
12889 (struct fast_tracepoint_ctx): New.
12890 (memory_barrier): New.
12891 (cmpxchg): New.
12892 (record_tracepoint_error): Update atomically in the IPA.
12893 (clear_inferior_trace_buffer): New.
12894 (about_to_request_buffer_space): New.
12895 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12896 updating the same buffer.
12897 (add_tracepoint): Default the tracepoint's type to trap
12898 tracepoint, and orig_size to -1.
12899 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12900 internal variables.
12901 (create_trace_state_variable): New parameter `gdb'. Handle it.
12902 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12903 (cmd_qtdp): Handle fast tracepoints.
12904 (cmd_qtdv): Adjust.
12905 (max_jump_pad_size): New.
12906 (gdb_jump_pad_head): New.
12907 (get_jump_space_head): New.
12908 (claim_jump_space): New.
12909 (sort_tracepoints): New.
12910 (MAX_JUMP_SIZE): New.
12911 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12912 IPA.
12913 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12914 support. Upload fast traceframes, and delete internal IPA
12915 breakpoints.
12916 (stop_tracing_handler): New.
12917 (flush_trace_buffer_handler): New.
12918 (cmd_qtstop): Upload fast tracepoints.
12919 (response_tracepoint): Handle fast tracepoints.
12920 (tracepoint_finished_step): Upload fast traceframes. Set the
12921 tracepoint hit context's tracepoint type.
12922 (handle_tracepoint_bkpts): New.
12923 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12924 type. Add comment about fast tracepoints.
12925 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12926 non-existing action_str field.
12927 (get_context_regcache): Handle fast tracepoints.
12928 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12929 to the regcache.
12930 (fast_tracepoint_from_jump_pad_address): New.
12931 (fast_tracepoint_from_ipa_tpoint_address): New.
12932 (collecting_t): New.
12933 (force_unlock_trace_buffer): New.
12934 (fast_tracepoint_collecting): New.
12935 (collecting): New.
12936 (gdb_collect): New.
12937 (write_inferior_data_ptr): New.
12938 (target_tp_heap): New.
12939 (target_malloc): New.
12940 (download_agent_expr): New.
12941 (UALIGN): New.
12942 (download_tracepoints): New.
12943 (download_trace_state_variables): New.
12944 (upload_fast_traceframes): New.
12945 (IPA_FIRST_TRACEFRAME): New.
12946 (IPA_NEXT_TRACEFRAME_1): New.
12947 (IPA_NEXT_TRACEFRAME): New.
12948 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12949 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12950 (gdb_jump_pad_buffer_end): New.
12951 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12952 (initialize_tracepoint): Adjust.
12953 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12954 buffer. Initialize the low module.
12955 * utils.c (PREFIX, TOOLNAME): New.
12956 (malloc_failure): Use PREFIX.
12957 (error): In the IPA, an error causes an exit.
12958 (fatal, warning): Use PREFIX.
12959 (internal_error): Use TOOLNAME.
12960 (NUMCELLS): Increase to 10.
12961 * configure, config.in: Regenerate.
12962
12963 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12964
12965 * server.c (handle_query) <qSupported>: Do two passes over the
12966 qSupported string to avoid nesting strtok.
12967
12968 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12969
12970 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12971 (CDEPS): New.
12972 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12973 -Wl,--dynamic-list.
12974 * configure: Regenerate.
12975 * proc-service.list: New.
12976
12977 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12978
12979 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12980 New comment.
12981
12982 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12983
12984 * gdbreplay.c (remote_open): Check error return from socket() call by
12985 its equality to -1 not by it being negative.
12986 * remote-utils.c (remote_open): Likewise.
12987
12988 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12989
12990 * config.h: Regenerate.
12991
12992 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12993
12994 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12995 doesn't provide PTRACE_GET_THREAD_AREA.
12996
12997 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12998
12999 * linux-m68k-low.c: Include <asm/ptrace.h>
13000 (ps_get_thread_area): Implement.
13001
13002 2010-05-03 Doug Evans <dje@google.com>
13003
13004 * event-loop.c (struct callback_event): New struct.
13005 (callback_list): New global.
13006 (append_callback_event, delete_callback_event): New functions.
13007 (process_callback): New function.
13008 (start_event_loop): Call it.
13009 * remote-utils.c (NOT_SCHEDULED): Define.
13010 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13011 moved out of readchar.
13012 (readchar): Rewrite. Call reschedule before returning.
13013 (reset_readchar): New function.
13014 (remote_close): Call it.
13015 (process_remaining, reschedule): New functions.
13016 * server.h (callback_handler_func): New typedef.
13017 (append_callback_event, delete_callback_event): Declare.
13018
13019 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13020
13021 * proc-service.c (ps_pglobal_lookup): Use
13022 thread_db_look_up_one_symbol.
13023 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13024 parameter. Use it instead of all_symbols_looked_up.
13025 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13026 field.
13027 (all_symbols_looked_up): Don't declare.
13028 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13029 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13030 field.
13031 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13032 Set all_symbols_looked_up here.
13033 (thread_db_look_up_one_symbol): New.
13034 (thread_db_get_tls_address): Adjust.
13035 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13036 thread_db object on the heap, and tentatively set it in the
13037 process structure.
13038 (thread_db_init): Don't set all_symbols_looked_up here.
13039 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13040
13041 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13042
13043 * linux-low.c (linux_kill, linux_detach): Adjust.
13044 (status_pending_p_callback): Remove redundant statement. Check
13045 for !TARGET_WAITIKIND_IGNORE, instead of
13046 TARGET_WAITKIND_STOPPED.
13047 (handle_tracepoints): Make sure LWP is locked. Adjust.
13048 (linux_wait_for_event_1): Adjust.
13049 (linux_cancel_breakpoints): New.
13050 (unsuspend_one_lwp): New.
13051 (unsuspend_all_lwps): New.
13052 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13053 (send_sigstop_callback): Change return type to int, add new
13054 `except' parameter and handle it.
13055 (suspend_and_send_sigstop_callback): New.
13056 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13057 pass them down. If SUSPEND, also increment the lwp's suspend
13058 count.
13059 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13060 (need_step_over_p): Don't consider suspended LWPs.
13061 (start_step_over): Adjust.
13062 (proceed_one_lwp): Change return type to int, add new `except'
13063 parameter and handle it.
13064 (unsuspend_and_proceed_one_lwp): New.
13065 (proceed_all_lwps): Use find_inferior instead of
13066 for_each_inferior.
13067 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13068 also decrement the suspend count of LWPs. Pass `except' down,
13069 instead of hacking its suspend count.
13070 (linux_pause_all): Add `freeze' parameter. Adjust.
13071 (linux_unpause_all): New.
13072 (linux_target_ops): Install linux_unpause_all.
13073 * server.c (handle_status): Adjust.
13074 * target.h (struct target_ops): New fields `unpause_all' and
13075 `cancel_breakpoints'. Add new parameter to `pause_all'.
13076 (pause_all): Add new `freeze' parameter.
13077 (unpause_all): New.
13078 (cancel_breakpoints): New.
13079 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13080 cancel breakpoints.
13081 (cmd_qtstart): Pause threads.
13082 (stop_tracing): Pause threads, and cancel breakpoints.
13083 * win32-low.c (win32_target_ops): Adjust.
13084
13085 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13086
13087 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13088 the inferior right away from here...
13089 (linux_wait_1): ... to here, and adjust to check the thread's
13090 last_resume_kind instead of the lwp's step or stop_expected flags.
13091
13092 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13093
13094 * README: Use consistent `GDB' and `GDBserver' spellings.
13095
13096 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13097
13098 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13099 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13100 (linux_detach_one_lwp): Assume the lwp is stopped.
13101 (any_thread_of): Delete.
13102 (linux_detach): Stop all lwps here. Don't blindly delete all
13103 breakpoints.
13104 (delete_lwp_callback): New.
13105 (linux_mourn): Delete all lwps of the process that is gone.
13106 (linux_wait_1): Don't delete the last lwp of the process here.
13107 * mem-break.h (mark_breakpoints_out): Declare.
13108 * mem-break.c (mark_breakpoints_out): New.
13109 (free_all_breakpoints): Use it.
13110 * server.c (handle_target_event): If the process is gone, mark
13111 breakpoints out.
13112 * thread-db.c (struct thread_db) <create_bp>: New field.
13113 (thread_db_enable_reporting): Fix prototype. Store a thread event
13114 breakpoint reference in the thread_db struct.
13115 (thread_db_load_search): Clear the thread_db object.
13116 (try_thread_db_load_1): Ditto.
13117 (switch_to_process): New.
13118 (disable_thread_event_reporting): Use it.
13119 (remove_thread_event_breakpoints): New.
13120 (thread_db_detach, thread_db_mourn): Use it.
13121
13122 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13123
13124 * linux-low.c (linux_enable_event_reporting): New.
13125 (linux_wait_for_event_1, handle_extended_wait): Use it.
13126
13127 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13128
13129 * linux-low.c (linux_kill_one_lwp, linux_kill)
13130 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13131 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13132 SIGSTOP even if the LWP is stopped.
13133 (send_sigstop_callback): New.
13134 (stop_all_lwps): Use send_sigstop_callback instead.
13135 (linux_resume_one_thread): Adjust.
13136 (proceed_one_lwp): Still proceed an LWP that the client has
13137 requested to stop, if we haven't reported it as stopped yet. Make
13138 sure that LWPs the client want stopped, have a pending SIGSTOP.
13139
13140 2010-04-26 Doug Evans <dje@google.com>
13141
13142 * server.c (handle_general_set): Make static.
13143
13144 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13145 Print received char after testing for error/eof instead of before.
13146 (input_interrupt): Tweak comment.
13147
13148 2010-04-23 Doug Evans <dje@google.com>
13149
13150 * server.c (start_inferior): Print inferior argv if --debug.
13151
13152 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13153
13154 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13155 * nto-x86-low.c: Include server.h
13156
13157 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13158
13159 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13160 be consistent with other sources of this directory.
13161 (init_registers_amd64): Correct name of source file of this function
13162 in the comment.
13163
13164 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13165
13166 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13167 64-bit executables.
13168
13169 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13170
13171 * win32-i386-low.c: Add 64-bit support.
13172 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13173 (init_registers_amd64): Declare.
13174 (mappings): Add 64-bit version of array.
13175 (init_windows_x86): New function.
13176 (the_low_target): Change init_arch field to init_windows_x86.
13177
13178 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13179
13180 * win32-low.c: Adapt to support also 64-bit architecture.
13181 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13182 (get_image_name): Use SIZE_T type for local variable `done'.
13183 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13184 (toolhelp_get_dll_name): Idem.
13185 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13186 Use uintptr_t typecast to avoid warning.
13187 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13188 (handle_exception): Use phex_nz to avoid warning.
13189 (win32_wait): Remove unused local variable `process'.
13190
13191 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13192
13193 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13194 `amd64-avx.o'.
13195
13196 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13197
13198 * configure.ac: Use `ws2_32' library for srv_mingw.
13199 * configure: Regenerate.
13200 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13201 * remote-utils.c: Likewise.
13202
13203 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13204
13205 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13206 if __x86_64__ is defined.
13207
13208 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13209
13210 * configure: Regenerate.
13211
13212 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13213
13214 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13215 * target.h (target_ops): New get_tib_address field.
13216 * win32-low.h (win32_thread_info): Add thread_local_base field.
13217 * win32-low.c (child_add_thread): Add tlb argument.
13218 Set thread_local_base field to TLB.
13219 (get_child_debug_event): Adapt to child_add_thread change.
13220 (win32_get_tib_address): New function.
13221 (win32_target_ops): Set get_tib_address field to
13222 win32_get_tib_address.
13223 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13224
13225 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13226
13227 * linux-low.c (linux_mourn): Also remove the process.
13228 * server.c (handle_target_event): Don't remove the process here.
13229 * nto-low.c (nto_mourn): New.
13230 (nto_target_ops): Install it.
13231 * spu-low.c (spu_mourn): New.
13232 (spu_target_ops): Install it.
13233 * win32-low.c (win32_mourn): New.
13234 (win32_target_ops): Install it.
13235
13236 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13237
13238 * server.h (buffer_xml_printf): Remove redundant `;'.
13239
13240 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13241
13242 * regcache.c (set_register_cache): Invalidate regcaches before
13243 changing the register cache layout.
13244 (regcache_invalidate_one): Allow a NULL regcache.
13245 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13246 regcaches before changing the register cache layout or the target
13247 regsets.
13248
13249 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13250
13251 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13252 variable warning on Linux/x86-64.
13253
13254 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13255
13256 GDBserver disconnected tracing support.
13257
13258 * linux-low.c (linux_remove_process): Delete.
13259 (add_lwp): Don't set last_resume_kind here.
13260 (linux_kill): Use `mourn'.
13261 (linux_detach): Use `thread_db_detach', and `mourn'.
13262 (linux_mourn): New.
13263 (linux_attach_lwp_1): Adjust comment.
13264 (linux_attach): last_resume_kind moved the thread_info; adjust.
13265 (status_pending_p_callback): Adjust.
13266 (linux_wait_for_event_1): Adjust.
13267 (count_events_callback, select_singlestep_lwp_callback)
13268 (select_event_lwp_callback, cancel_breakpoints_callback)
13269 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13270 (proceed_one_lwp): Adjust.
13271 (linux_async): Add debug output.
13272 (linux_thread_stopped): New.
13273 (linux_pause_all): New.
13274 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13275 linux_pause_all.
13276 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13277 (thread_db_free): Delete declaration.
13278 (thread_db_detach, thread_db_mourn): Declare.
13279 * thread-db.c (thread_db_init): Use thread_db_mourn.
13280 (thread_db_free): Delete, split in two.
13281 (disable_thread_event_reporting): New.
13282 (thread_db_detach): New.
13283 (thread_db_mourn): New.
13284
13285 * server.h (struct thread_info) <last_resume_kind>: New field.
13286 <attached>: Add comment.
13287 <gdb_detached>: New field.
13288 (handler_func): Change return type to int.
13289 (handle_serial_event, handle_target_event): Ditto.
13290 (gdb_connected): Declare.
13291 (tracing): Delete.
13292 (disconnected_tracing): Declare.
13293 (stop_tracing): Declare.
13294
13295 * server.c (handle_query) <qSupported>: Report support for
13296 disconnected tracing.
13297 (queue_stop_reply_callback): Account for running threads.
13298 (gdb_wants_thread_stopped): New.
13299 (gdb_wants_all_threads_stopped): New.
13300 (gdb_reattached_process): New.
13301 (handle_status): Clear the `gdb_detached' flag of all processes.
13302 In all-stop, stop all threads.
13303 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13304 (process_serial_event): If the remote connection breaks, or if an
13305 exit was forced with "monitor exit", force an event loop exit.
13306 Handle disconnected tracing on detach.
13307 (handle_serial_event): Adjust.
13308 (handle_target_event): If GDB isn't connected, forward events back
13309 to the inferior, unless the last process exited, in which case,
13310 exit gdbserver. Adjust interface.
13311
13312 * remote-utils.c (remote_open): Don't block in accept. Instead
13313 register an event loop source on the listen socket file
13314 descriptor. Refactor bits into ...
13315 (listen_desc): ... this new global.
13316 (gdb_connected): ... this new function.
13317 (enable_async_notification): ... this new function.
13318 (handle_accept_event): ... this new function.
13319 (remote_close): Clear remote_desc.
13320
13321 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13322
13323 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13324 New fields.
13325 (mourn_inferior): Define.
13326 (target_process_qsupported): Avoid the dangling else problem.
13327 (thread_stopped): Define.
13328 (pause_all): Define.
13329 (target_waitstatus_to_string): Declare.
13330 * target.c (target_waitstatus_to_string): New.
13331
13332 * tracepoint.c (tracing): Make extern.
13333 (disconnected_tracing): New.
13334 (stop_tracing): Make extern. Handle tracing stops due to GDB
13335 disconnecting.
13336 (cmd_qtdisconnected): New.
13337 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13338 (handle_tracepoint_general_set): Handle QTDisconnected.
13339
13340 * event-loop.c (event_handler_func): Change return type to int.
13341 (process_event): Bail out if the event handler wants the event
13342 loop to stop.
13343 (handle_file_event): Ditto.
13344 (start_event_loop): Bail out if the event handler wants the event
13345 loop to stop.
13346
13347 * nto-low.c (nto_target_ops): Adjust.
13348 * spu-low.c (spu_wait): Don't remove the process here.
13349 (spu_target_ops): Adjust.
13350 * win32-low.c (win32_wait): Don't remove the process here.
13351 (win32_target_ops): Adjust.
13352
13353 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13354
13355 * regcache.c (realloc_register_cache): Invalidate inferior's
13356 regcache before recreating it.
13357
13358 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13359
13360 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13361
13362 2010-04-09 Stan Shebs <stan@codesourcery.com>
13363 Pedro Alves <pedro@codesourcery.com>
13364
13365 * server.h (LONGEST): New.
13366 (struct thread_info) <while_stepping>: New field.
13367 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13368 Declare.
13369 (initialize_tracepoint, handle_tracepoint_general_set)
13370 (handle_tracepoint_query, tracepoint_finished_step)
13371 (tracepoint_was_hit, release_while_stepping_state_list):
13372 (current_traceframe): Declare.
13373 * server.c (handle_general_set): Handle tracepoint packets.
13374 (read_memory): New.
13375 (write_memory): New.
13376 (handle_search_memory_1): Use read_memory.
13377 (handle_query): Report support for conditional tracepoints, trace
13378 state variables, and tracepoint sources. Handle tracepoint
13379 queries.
13380 (main): Initialize the tracepoints module.
13381 (process_serial_event): Handle traceframe reads/writes.
13382
13383 * linux-low.c (handle_tracepoints): New.
13384 (linux_wait_1): Call it.
13385 (linux_resume_one_lwp): Handle while-stepping.
13386 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13387 (linux_target_ops): Install them.
13388 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13389 New field.
13390 * linux-x86-low.c (x86_supports_tracepoints): New.
13391 (the_low_target). Install it.
13392
13393 * mem-break.h (delete_breakpoint): Declare.
13394 * mem-break.c (delete_breakpoint): Make external.
13395
13396 * target.h (struct target_ops): Add `supports_tracepoints',
13397 `read_pc', and `write_pc' fields.
13398 (target_supports_tracepoints): Define.
13399 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13400 (phex_nz): New.
13401
13402 * regcache.h (struct regcache) <registers_owned>: New field.
13403 (init_register_cache, regcache_cpy): Declare.
13404 (regcache_read_pc, regcache_write_pc): Declare.
13405 (register_cache_size): Declare.
13406 (supply_regblock): Declare.
13407 * regcache.c (init_register_cache): New.
13408 (new_register_cache): Use it.
13409 (regcache_cpy): New.
13410 (register_cache_size): New.
13411 (supply_regblock): New.
13412 (regcache_read_pc, regcache_write_pc): New.
13413
13414 * tracepoint.c: New.
13415
13416 * Makefile.in (OBS): Add tracepoint.o.
13417 (tracepoint.o): New rule.
13418
13419 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13420
13421 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13422 (i386-mmx.o): New.
13423 (i386-mmx.c): Likewise.
13424 (i386-mmx-linux.o): Likewise.
13425 (i386-mmx-linux.c): Likewise.
13426
13427 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13428 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13429 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13430 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13431
13432 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13433 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13434 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13435
13436 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13437
13438 * Makefile.in (clean): Updated.
13439 (i386-avx.o): New.
13440 (i386-avx.c): Likewise.
13441 (i386-avx-linux.o): Likewise.
13442 (i386-avx-linux.c): Likewise.
13443 (amd64-avx.o): Likewise.
13444 (amd64-avx.c): Likewise.
13445 (amd64-avx-linux.o): Likewise.
13446 (amd64-avx-linux.c): Likewise.
13447
13448 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13449 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13450 (srv_amd64_regobj): Add amd64-avx.o.
13451 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13452 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13453 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13454 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13455 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13456 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13457 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13458
13459 * i387-fp.c: Include "i386-xstate.h".
13460 (i387_xsave): New.
13461 (i387_cache_to_xsave): Likewise.
13462 (i387_xsave_to_cache): Likewise.
13463 (x86_xcr0): Likewise.
13464
13465 * i387-fp.h (i387_cache_to_xsave): Likewise.
13466 (i387_xsave_to_cache): Likewise.
13467 (x86_xcr0): Likewise.
13468
13469 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13470 * linux-crisv32-low.c (target_regsets): Likewise.
13471 * linux-m68k-low.c (target_regsets): Likewise.
13472 * linux-mips-low.c (target_regsets): Likewise.
13473 * linux-ppc-low.c (target_regsets): Likewise.
13474 * linux-s390-low.c (target_regsets): Likewise.
13475 * linux-sh-low.c (target_regsets): Likewise.
13476 * linux-sparc-low.c (target_regsets): Likewise.
13477 * linux-xtensa-low.c (target_regsets): Likewise.
13478
13479 * linux-low.c: Include <sys/uio.h>.
13480 (regsets_fetch_inferior_registers): Support nt_type.
13481 (regsets_store_inferior_registers): Likewise.
13482 (linux_process_qsupported): New.
13483 (linux_target_ops): Add linux_process_qsupported.
13484
13485 * linux-low.h (regset_info): Add nt_type.
13486 (linux_target_ops): Add process_qsupported.
13487
13488 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13489 and <sys/uio.h>.
13490 (init_registers_i386_avx_linux): New.
13491 (init_registers_amd64_avx_linux): Likewise.
13492 (xmltarget_i386_linux_no_xml): Likewise.
13493 (xmltarget_amd64_linux_no_xml): Likewise.
13494 (PTRACE_GETREGSET): Likewise.
13495 (PTRACE_SETREGSET): Likewise.
13496 (x86_fill_xstateregset): Likewise.
13497 (x86_store_xstateregset): Likewise.
13498 (use_xml): Likewise.
13499 (x86_linux_update_xmltarget): Likewise.
13500 (x86_linux_process_qsupported): Likewise.
13501 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13502 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13503 init_registers_i386_linux here. Call
13504 x86_linux_update_xmltarget.
13505 (the_low_target): Add x86_linux_process_qsupported.
13506
13507 * server.c (handle_query): Call target_process_qsupported.
13508
13509 * target.h (target_ops): Add process_qsupported.
13510 (target_process_qsupported): New.
13511
13512 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13513
13514 * inferiors.c (add_thread): Set last_status kind to
13515 TARGET_WAITKIND_IGNORE.
13516 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13517 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13518 (linux_wait_1): Move `thread' local definition to block that uses
13519 it. Don't NULL initialize `event_child'.
13520 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13521 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13522 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13523
13524 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13525
13526 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13527 an extended waitstatus, or by a watchpoint.
13528 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13529 thread was stepping or has been stopped by a watchpoint.
13530
13531 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13532
13533 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13534 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13535 of another, then delete the previous, and validate all
13536 breakpoints.
13537 (validate_inserted_breakpoint): New.
13538 (delete_disabled_breakpoints): New.
13539 (validate_breakpoints): New.
13540 (check_mem_read): Validate breakpoints before trusting their
13541 shadow. Delete disabled breakpoints.
13542 (check_mem_write): Validate breakpoints before trusting they
13543 should be inserted. Delete disabled breakpoints.
13544 * mem-break.h (validate_breakpoints):
13545 * server.c (handle_query): Validate breakpoints when we see a
13546 qSymbol query.
13547
13548 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13549
13550 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13551 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13552 if we could tell there's a GDB breakpoint at stop_pc.
13553 (need_step_over_p): Don't do a step over if we find a GDB
13554 breakpoint at the resume PC.
13555
13556 * mem-break.c (struct raw_breakpoint): New.
13557 (enum bkpt_type): New type `gdb_breakpoint'.
13558 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13559 fields. New field `raw'.
13560 (find_raw_breakpoint_at): New.
13561 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13562 breakpoint instead.
13563 (set_breakpoint_at): Adjust.
13564 (delete_raw_breakpoint): New.
13565 (release_breakpoint): New.
13566 (delete_breakpoint): Rename to...
13567 (delete_breakpoint_1): ... this. Add proc parameter. Use
13568 release_breakpoint. Return ENOENT.
13569 (delete_breakpoint): Reimplement.
13570 (find_breakpoint_at): Delete.
13571 (find_gdb_breakpoint_at): New.
13572 (delete_breakpoint_at): Delete.
13573 (set_gdb_breakpoint_at): New.
13574 (delete_gdb_breakpoint_at): New.
13575 (gdb_breakpoint_here): New.
13576 (set_reinsert_breakpoint): Use release_breakpoint.
13577 (uninsert_breakpoint): Rename to ...
13578 (uninsert_raw_breakpoint): ... this.
13579 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13580 (reinsert_raw_breakpoint): Change parameter type to
13581 raw_breakpoint.
13582 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13583 instead.
13584 (check_breakpoints): Adjust. Use release_breakpoint.
13585 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13586 (breakpoint_inserted_here): Ditto.
13587 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13588 Don't trust the breakpoint's shadow if it is not inserted.
13589 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13590 (delete_all_breakpoints): Adjust.
13591 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13592 use delete_breakpoint_1.
13593
13594 * mem-break.h (breakpoints_supported): Delete declaration.
13595 (set_gdb_breakpoint_at): Declare.
13596 (gdb_breakpoint_here): Declare.
13597 (delete_breakpoint_at): Delete.
13598 (delete_gdb_breakpoint_at): Declare.
13599
13600 * server.h (struct raw_breakpoint): Forward declare.
13601 (struct process_info): New field `raw_breakpoints'.
13602
13603 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13604 breakpoints.
13605
13606 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13607
13608 * linux-low.c (status_pending_p_callback): Fix comment.
13609 (linux_wait_for_event_1): Move most of the internal breakpoint
13610 handling from here...
13611 (linux_wait_1): ... to here.
13612 (count_events_callback): New.
13613 (select_singlestep_lwp_callback): New.
13614 (select_event_lwp_callback): New.
13615 (cancel_breakpoints_callback): New.
13616 (select_event_lwp): New.
13617 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13618 priority to all LWPs that have had events that should be reported
13619 to the client. Cancel breakpoints when about to reporting the
13620 event to the client, not while stopping lwps. No longer cancel
13621 finished single-steps here.
13622 (cancel_finished_single_step): Delete.
13623 (cancel_finished_single_steps): Delete.
13624
13625 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13626
13627 * mem-break.c (enum bkpt_type): New.
13628 (struct breakpoint): New field `type'.
13629 (set_breakpoint_at): Change return type to struct breakpoint
13630 pointer. Set type to `other_breakpoint' by default.
13631 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13632 in the breakpoint list.
13633 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13634 (reinsert_breakpoint): Rename to ...
13635 (reinsert_raw_breakpoint): ... this.
13636 (reinsert_breakpoints_at): Adjust.
13637 * mem-break.h (struct breakpoint): Declare.
13638 (set_breakpoint_at): Change return type to struct breakpoint
13639 pointer.
13640
13641 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13642
13643 * server.c (handle_query): Assign, not compare.
13644
13645 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13646
13647 Teach linux gdbserver to step-over-breakpoints.
13648
13649 * linux-low.c (can_hardware_single_step): New.
13650 (supports_breakpoints): New.
13651 (handle_extended_wait): If stopping threads, read the stop pc of
13652 the new cloned LWP.
13653 (get_pc): New.
13654 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13655 low target doesn't support retrieving the PC.
13656 (add_lwp): Set last_resume_kind to resume_continue.
13657 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13658 (linux_attach): Don't clear stop_expected. Set the lwp's
13659 last_resume_kind to resume_stop.
13660 (linux_detach_one_lwp): Don't check for removed breakpoints.
13661 (check_removed_breakpoint): Delete.
13662 (status_pending_p): Rename to ...
13663 (status_pending_p_callback): ... this. Don't check for removed
13664 breakpoints. Don't consider threads that are stopped from GDB's
13665 perspective.
13666 (linux_wait_for_lwp): Always read the stop_pc here.
13667 (cancel_breakpoint): New.
13668 (step_over_bkpt): New global.
13669 (linux_wait_for_event_1): Implement stepping over breakpoints.
13670 (gdb_wants_lwp_stopped): New.
13671 (gdb_wants_all_stopped): New.
13672 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13673 single-step traps here. Store the thread's last reported target
13674 wait status.
13675 (send_sigstop): Don't clear stop_expected. Always set it,
13676 instead.
13677 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13678 (cancel_finished_single_step): New.
13679 (cancel_finished_single_steps): New.
13680 (wait_for_sigstop): Don't cancel finished single-step traps here.
13681 (linux_resume_one_lwp): Don't check for removed breakpoints.
13682 Don't set `step' on non-hardware step archs.
13683 (linux_set_resume_request): Ignore resume_stop requests if already
13684 stopping or stopped. Set the lwp's last_resume_kind.
13685 (resume_status_pending_p): Don't check for removed breakpoints.
13686 (need_step_over_p): New.
13687 (start_step_over): New.
13688 (finish_step_over): New.
13689 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13690 requests. Clear the thread's last reported target waitstatus.
13691 Don't use the `suspended' flag. Don't consider pending breakpoints.
13692 (linux_resume): Start a step-over if necessary.
13693 (proceed_one_lwp): New.
13694 (proceed_all_lwps): New.
13695 (unstop_all_lwps): New.
13696 * linux-low.h (struct lwp_info): Rewrite comment for the
13697 `suspended' flag. Add the `stop_pc' field. Delete the
13698 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13699 Add `'last_resume_kind' and `need_step_over' fields.
13700 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13701 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13702 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13703 (set_raw_breakpoint_at): New.
13704 (set_breakpoint_at): Rewrite to use it.
13705 (reinsert_breakpoint_handler): Delete.
13706 (set_reinsert_breakpoint): New.
13707 (reinsert_breakpoint_by_bp): Delete.
13708 (delete_reinsert_breakpoints): New.
13709 (uninsert_breakpoint): Rewrite.
13710 (uninsert_breakpoints_at): New.
13711 (reinsert_breakpoint): Rewrite.
13712 (reinsert_breakpoints_at): New.
13713 (check_breakpoints): Rewrite.
13714 (breakpoint_here): New.
13715 (breakpoint_inserted_here): New.
13716 (check_mem_read): Adjust.
13717 * mem-break.h (breakpoints_supported, breakpoint_here)
13718 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13719 (reinsert_breakpoint_by_bp): Delete declaration.
13720 (delete_reinsert_breakpoints): Declare.
13721 (reinsert_breakpoint): Delete declaration.
13722 (reinsert_breakpoints_at): Declare.
13723 (uninsert_breakpoint): Delete declaration.
13724 (uninsert_breakpoints_at): Declare.
13725 (check_breakpoints): Adjust prototype.
13726 * server.h: Adjust include order.
13727 (struct thread_info): Declare here. Add a `last_status' field.
13728
13729 2010-03-23 Michael Snyder <msnyder@vmware.com>
13730
13731 * server.c (crc32): New function.
13732 (handle_query): Add handling for 'qCRC:' request.
13733
13734 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13735
13736 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13737 lwp had been stopped by a watchpoint.
13738
13739 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13740
13741 * server.h (internal_error): Declare.
13742 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13743 * utils.c (internal_error): New function.
13744
13745 2010-03-15 Andreas Schwab <schwab@redhat.com>
13746
13747 * configure.srv: Fix typo setting srv_regobj.
13748
13749 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13750
13751 * linux-low.c (fetch_register): Avoid passing a non string literal
13752 format to `error'.
13753 (usr_store_inferior_registers): Ditto.
13754
13755 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13756
13757 * linux-low.c (linux_write_memory): Bail out early if peeking
13758 memory failed.
13759
13760 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13761
13762 * linux-low.h (struct lwp_info): New fields
13763 `stopped_by_watchpoint' and `stopped_data_address'.
13764 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13765 here, and cache them in the lwp object.
13766 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13767 directly.
13768 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13769 field.
13770 (linux_stopped_by_watchpoint): Rewrite.
13771 (linux_stopped_data_address): Rewrite.
13772
13773 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13774
13775 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13776 switching the current inferior, not before.
13777
13778 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13779
13780 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13781 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13782 i386-linux.c and amd64-linux.c.
13783 (reg-i386.o): Removed.
13784 (reg-i386.c): Likewise.
13785 (reg-i386-linux.o): Likewise.
13786 (reg-i386-linux.c): Likewise.
13787 (reg-x86-64.o): Likewise.
13788 (reg-x86-64.c): Likewise.
13789 (reg-x86-64-linux.o): Likewise.
13790 (reg-x86-64-linux.c): Likewise.
13791 (i386.o): New.
13792 (i386.c): Likewise.
13793 (i386-linux.o): Likewise.
13794 (i386-linux.c): Likewise.
13795 (amd64.o): Likewise.
13796 (amd64.c): Likewise.
13797 (amd64-linux.o): Likewise.
13798 (amd64-linux.c): Likewise.
13799
13800 * configure.srv (srv_i386_regobj): New.
13801 (srv_i386_linux_regobj): Likewise.
13802 (srv_amd64_regobj): Likewise.
13803 (srv_amd64_linux_regobj): Likewise.
13804 (srv_i386_32bit_xmlfiles): Likewise.
13805 (srv_i386_64bit_xmlfiles): Likewise.
13806 (srv_i386_xmlfiles): Likewise.
13807 (srv_amd64_xmlfiles): Likewise.
13808 (srv_i386_linux_xmlfiles): Likewise.
13809 (srv_amd64_linux_xmlfiles): Likewise.
13810 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13811 srv_xmlfiles to $srv_i386_xmlfiles.
13812 (i[34567]86-*-mingw32ce*): Likewise.
13813 (i[34567]86-*-mingw*): Likewise.
13814 (i[34567]86-*-nto*): Likewise.
13815 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13816 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13817 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13818 (x86_64-*-linux*): Likewise.
13819
13820 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13821 (init_registers_amd64_linux): New.
13822 (x86_arch_setup): Replace init_registers_x86_64_linux with
13823 init_registers_amd64_linux.
13824
13825 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13826
13827 * configure.ac: Check for libdl. If it is not available link against
13828 static libthread_db.
13829 * configure: Regenerate.
13830
13831 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13832
13833 PR9605
13834
13835 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13836 handing a read watchpoint.
13837 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13838
13839 2010-02-12 Doug Evans <dje@google.com>
13840
13841 * linux-low.c (linux_supports_tracefork_flag): Document.
13842 (linux_look_up_symbols): Add comment.
13843
13844 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13845
13846 * regcache.c (supply_register): Clear regcache if buf is NULL.
13847
13848 2010-02-02 Nicolas Roche <roche@sourceware.org>
13849 Joel Brobecker <brobecker@adacore.com>
13850
13851 * inferiors.c (find_inferior): Add function documentation.
13852 (unloaded_dll): Handle the case where the unloaded dll has not
13853 been previously registered in the dll list.
13854
13855 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13856
13857 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13858 (thumb2_breakpoint): New.
13859 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13860
13861 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13862
13863 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13864 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13865 breakpoints.
13866
13867 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13868
13869 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13870
13871 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13872
13873 * linux-s390-low.c (s390_collect_ptrace_register)
13874 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13875
13876 2010-01-21 Doug Evans <dje@google.com>
13877
13878 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13879 (PTRACE_ARG4_TYPE): New macro.
13880 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13881 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13882 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13883 (usr_store_inferior_registers): Ditto.
13884 (linux_read_memory, linux_write_memory): Ditto.
13885 (linux_test_for_tracefork): Ditto.
13886
13887 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13888 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13889
13890 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13891
13892 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13893 target.
13894
13895 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13896
13897 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13898 prototype to take a regcache. Adjust.
13899
13900 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13901
13902 * regcache.h (struct thread_info): Forward declare.
13903 (struct regcache): New.
13904 (new_register_cache): Adjust prototype.
13905 (get_thread_regcache): Declare.
13906 (free_register_cache): Adjust prototype.
13907 (registers_to_string, registers_from_string): Ditto.
13908 (supply_register, supply_register_by_name, collect_register)
13909 (collect_register_as_string, collect_register_by_name): Ditto.
13910 * regcache.c (struct inferior_regcache_data): Delete.
13911 (get_regcache): Rename to ...
13912 (get_thread_regcache): ... this. Adjust. Switch inferior before
13913 fetching registers.
13914 (regcache_invalidate_one): Adjust.
13915 (regcache_invalidate): Fix prototype.
13916 (new_register_cache): Return the new register cache.
13917 (free_register_cache): Change prototype.
13918 (realloc_register_cache): Adjust.
13919 (registers_to_string): Change prototype to take a regcache. Adjust.
13920 (registers_from_string): Ditto.
13921 (register_data): Ditto.
13922 (supply_register): Ditto.
13923 (supply_register_by_name): Ditto.
13924 (collect_register): Ditto.
13925 (collect_register_as_string): Ditto.
13926 (collect_register_by_name): Ditto.
13927 * server.c (process_serial_event): Adjust.
13928 * linux-low.h (regset_fill_func, regset_store_func): Change
13929 prototype.
13930 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13931 Change prototype.
13932 * linux-low.c (get_stop_pc): Adjust.
13933 (check_removed_breakpoint): Adjust.
13934 (linux_wait_for_event): Adjust.
13935 (linux_resume_one_lwp): Adjust.
13936 (fetch_register): Add regcache parameter. Adjust.
13937 (usr_store_inferior_registers): Ditto.
13938 (regsets_fetch_inferior_registers): Ditto.
13939 (regsets_store_inferior_registers): Ditto.
13940 (linux_fetch_registers, linux_store_registers): Ditto.
13941 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13942 regcache. Adjust.
13943 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13944 Ditto.
13945 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13946 prototype to take a regcache.
13947 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13948 * remote-utils.c (convert_ascii_to_int, outreg)
13949 (prepare_resume_reply): Change prototype to take a regcache.
13950 Adjust.
13951 * target.h (struct target_ops) <fetch_registers, store_registers>:
13952 Change prototype to take a regcache.
13953 (fetch_inferior_registers, store_inferior_registers): Change
13954 prototype to take a regcache. Adjust.
13955 * proc-service.c (ps_lgetregs): Adjust.
13956 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13957 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13958 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13959 take a regcache. Adjust.
13960 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13961 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13962 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13963 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13964 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13965 (cris_cannot_fetch_register):
13966 (cris_breakpoint_at): Change prototype to take a regcache.
13967 Adjust.
13968 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13969 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13970 to take a regcache. Adjust.
13971 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13972 Adjust.
13973 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13974 take a regcache. Adjust.
13975 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13976 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13977 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13978 * linux-mips-low.c (mips_get_pc):
13979 (mips_set_pc): Change prototype to take a regcache. Adjust.
13980 (mips_reinsert_addr): Adjust.
13981 (mips_collect_register): Change prototype to take a regcache.
13982 Adjust.
13983 (mips_supply_register):
13984 (mips_collect_register_32bit, mips_supply_register_32bit)
13985 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13986 (mips_store_fpregset): Ditto.
13987 * linux-ppc-low.c (ppc_supply_ptrace_register)
13988 (ppc_supply_ptrace_register): Ditto.
13989 (parse_spufs_run): Adjust.
13990 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13991 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13992 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13993 take a regcache. Adjust.
13994 * linux-s390-low.c (s390_collect_ptrace_register)
13995 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13996 (s390_set_pc): Change prototype to take a regcache. Adjust.
13997 (s390_arch_setup): Adjust.
13998 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13999 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14000 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14001 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14002 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14003 regcache. Adjust.
14004 (sparc_breakpoint_at): Adjust.
14005 * linux-xtensa-low.c (xtensa_fill_gregset):
14006 (xtensa_store_gregset):
14007 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14008 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14009 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14010 prototype to take a regcache. Adjust.
14011 * win32-arm-low.c (arm_fetch_inferior_register)
14012 (arm_store_inferior_register): Change prototype to take a
14013 regcache. Adjust.
14014 * win32-i386-low.c (i386_fetch_inferior_register)
14015 (i386_store_inferior_register): Change prototype to take a
14016 regcache. Adjust.
14017 * win32-low.c (child_fetch_inferior_registers)
14018 (child_store_inferior_registers): Change prototype to take a
14019 regcache. Adjust.
14020 (win32_wait): Adjust.
14021 (win32_fetch_inferior_registers): Change prototype to take a
14022 regcache. Adjust.
14023 (win32_store_inferior_registers): Adjust.
14024 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14025 store_inferior_register>: Change prototype to take a regcache.
14026
14027 2010-01-20 Doug Evans <dje@google.com>
14028
14029 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14030 #ifdef.
14031 (linux_wait_for_event1, linux_init_signals): Ditto.
14032 (W_STOPCODE): Provide definition if missing.
14033
14034 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14035
14036 * linux-low.c (linux_core_of_thread): New.
14037 (compare_ints, show_process, list_threads): New.
14038 (linux_qxfer_osdata): Report threads and cores.
14039 (linux_target_op): Register linux_core_of_thread.
14040 * remote-utils.c (prepare_resume_reply): Report the core.
14041 (buffer_xml_printf): Support %d specifier.
14042 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14043 New.
14044 (handle_query): Handle qXfer:threads. Announce availability
14045 thereof.
14046 * target.h (struct target_ops): New field core_of_thread.
14047
14048 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14049
14050 * Makefile.in (clean): Remove new generated files.
14051 (reg-s390.o, reg-s390.c): Remove rules.
14052 (reg-s390x.o, reg-s390x.c): Likewise.
14053 (s390-linux32.o, s390-linux32.c): Add rules.
14054 (s390-linux64.o, s390-linux64.c): Likewise.
14055 (s390x-linux64.o, s390x-linux64.c): Likewise.
14056 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14057 * linux-s390-low.c: Include <elf.h>.
14058 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14059 (init_registers_s390): Remove prototype.
14060 (init_registers_s390x): Likewise.
14061 (init_registers_s390_linux32): Add prototype.
14062 (init_registers_s390_linux64): Likewise.
14063 (init_registers_s390x_linux64): Likewise.
14064 (s390_num_regs_3264): New define.
14065 (s390_regmap_3264): New global variable.
14066 (s390_cannot_fetch_register): Remove obsolete check.
14067 (s390_cannot_store_register): Likewise.
14068 (s390_collect_ptrace_register): Handle upper/lower register halves.
14069 (s390_supply_ptrace_register): Likewise.
14070 (s390_fill_gregset): Update to register number changes.
14071 (s390_get_hwcap): New routine.
14072 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14073 Install appropriate regmap and register set.
14074
14075 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14076
14077 * server.c (gdbserver_version): Update copyright year to 2010.
14078 * gdbreplay.c (gdbreplay_version): Likewise.
14079
14080 2009-12-28 Doug Evans <dje@google.com>
14081
14082 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14083 elf/external.h. Include <elf.h> instead but only if necessary.
14084
14085 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14086
14087 * linux-low.c (linux_remove_process): Remove `detaching'
14088 parameter. Don't release/detach from thread_db here.
14089 (linux_kill): Release/detach from thread_db here, ...
14090 (linux_detach): ... and here, before actually detaching.
14091 (linux_wait_1): ... and here, when a process exits.
14092 * thread-db.c (any_thread_of): New.
14093 (thread_db_free): Switch the current inferior to a thread of the
14094 passed in process.
14095
14096 2009-12-21 Doug Evans <dje@google.com>
14097
14098 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14099
14100 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14101 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14102 warning ifndef __NR_tkill. Move setting of errno there too.
14103 Delete unnecessary resetting of errno after syscall.
14104 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14105
14106 * configure.ac: Check for dladdr.
14107 * config.in: Regenerate.
14108 * configure: Regenerate.
14109 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14110 (try_thread_db_load): Update.
14111
14112 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14113
14114 2009-12-18 Doug Evans <dje@google.com>
14115
14116 * event-loop.c: Include unistd.h if it exists.
14117
14118 * linux-low.c (my_waitpid): Move definition away from being in
14119 between linux_tracefork_child/linux_test_for_tracefork.
14120
14121 * gdb_proc_service.h (psaddr_t): Fix type.
14122 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14123 signature to match glibc.
14124
14125 2009-12-16 Doug Evans <dje@google.com>
14126
14127 * linux-low.c (linux_read_memory): Fix argument to read.
14128
14129 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14130
14131 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14132 events, don't leave current_inferior pointing at null.
14133
14134 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14135
14136 * win32-low.c (LOG): Delete.
14137 (OUTMSG): Output to stderr.
14138 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14139 on compile time LOG macro.
14140 (win32_wait): Fix debug output.
14141
14142 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14143
14144 * win32-low.c (win32_add_one_solib): If the dll name is
14145 "ntdll.dll", prepend the system directory to the dll path.
14146
14147 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14150
14151 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14152 Vladimir Prus <vladimir@codesourcery.com>
14153
14154 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14155 * configure.ac: Check for __mcoldfire__ and set
14156 gdb_cv_m68k_is_coldfire.
14157 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14158 reg-cf.o and reg-m68k.o.
14159 * configure: Regenerated.
14160
14161 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14162
14163 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14164 Pass it to thread_db_free.
14165 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14166 proper `detaching' argument to linux_remove_process.
14167 * linux-low.h (thread_db_free): Add `detaching' parameter.
14168 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14169 to thread_db_free.
14170 (thread_db_free): Add `detaching' parameter. Only
14171 call td_ta_clear_event if detaching from process.
14172
14173 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14174
14175 * thread-db.c (thread_db_free): Fix typo.
14176
14177 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14178
14179 PR gdb/10838
14180 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14181
14182 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14183
14184 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14185 with an i686 compiler.
14186 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14187 needed.
14188 * configure: Rebuilt.
14189
14190 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14191
14192 PR gdb/10783
14193
14194 * server.c (handle_search_memory_1): Correct read_addr initialization
14195 in loop for searching subsequent chunks.
14196
14197 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14198
14199 * configure.ac: New --with-libthread-db option.
14200 * thread-db.c: Allow direct dependence on libthread_db.
14201 (thread_db_free): Adjust.
14202 * config.in: Regenerate.
14203 * configure: Likewise.
14204
14205 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14206
14207 PR gdb/10757
14208 * thread-db.c (attach_thread): New function.
14209 (maybe_attach_thread): Return success/failure.
14210 (find_new_threads_callback): Adjust.
14211 (thread_db_find_new_threads): Loop until no new threads.
14212
14213 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14214
14215 * proc-service.c (ps_lgetregs): Formatting.
14216
14217 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14218
14219 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14220 * configure.ac: Adjust.
14221 * linux-low.h (struct process_info_private): Move members to struct
14222 thread_db.
14223 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14224 * linux-low.c (linux_remove_process): Adjust.
14225 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14226 * server.c (handle_query): Move code ...
14227 (handle_monitor_command): ... here. New function.
14228 * target.h (struct target_ops): New member.
14229 * thread-db.c (struct thread_db): New.
14230 (libthread_db_search_path): New variable.
14231 (thread_db_create_event, thread_db_enable_reporting)
14232 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14233 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14234 (try_thread_db_load_1, dladdr_to_soname): New functions.
14235 (try_thread_db_load, thread_db_load_search): New functions.
14236 (thread_db_init): Search for libthread_db.
14237 (thread_db_free): New function.
14238 (thread_db_handle_monitor_command): Likewise.
14239 * config.in: Regenerate.
14240 * configure: Regenerate.
14241
14242 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14243
14244 * spu-low.c (spu_kill): Wait for inferior to terminate.
14245 Call clear_inferiors.
14246 (spu_detach): Call clear_inferiors.
14247
14248 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14249
14250 * aclocal.m4: Regenerate.
14251 * config.in: Likewise.
14252 * configure: Likewise.
14253
14254 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14255
14256 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14257 (parse_spufs_run): New function.
14258 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14259 (ppc_breakpoint_at): Handle SPU breakpoints.
14260
14261 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14262
14263 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14264 (SPUFS_MAGIC): Define.
14265 (spu_enumerate_spu_ids): New function.
14266 (linux_qxfer_spu): New function.
14267 (linux_target_ops): Install linux_qxfer_spu.
14268
14269 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14270
14271 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14272 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14273 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14274 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14275 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14276 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14277 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14278 (init_registers_powerpc_cell32l): Add prototype.
14279 (init_registers_powerpc_cell64l): Likewise.
14280 (ppc_arch_setup): Detect Cell/B.E. architecture.
14281
14282 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14283
14284 * Makefile.in (datarootdir): New variable.
14285
14286 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * linux-low.c (linux_write_memory): Update debugging output.
14289 * Makefile.in (clean): Add new descriptions.
14290 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14291 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14292 * configure.srv: Add new files for arm*-*-linux*.
14293 * linux-arm-low.c: Add new declarations.
14294 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14295 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14296 (HWCAP_VFPv3D16): New.
14297 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14298 instead of __IWMMXT__.
14299 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14300 (arm_arch_setup): New.
14301 (target_regsets): Remove #ifdef. Add VFP regset.
14302 (the_low_target): Use arm_arch_setup.
14303
14304 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14307 the main thread again.
14308
14309 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14310
14311 Adding Neutrino gdbserver.
14312 * configure: Regenerated.
14313 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14314 * configure.srv (i[34567]86-*-nto*): New target.
14315 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14316 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14317 (nto_comctrl) [__QNX__]: New function.
14318 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14319
14320 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14321
14322 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14323 srv_tgtobj.
14324
14325 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14326 Pedro Alves <pedro@codesourcery.com>
14327
14328 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14329 don't support CONTEXT_EXTENDED_REGISTERS.
14330 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14331 (the_low_target): Install them.
14332 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14333 failing with ERROR_PIPE_NOT_CONNECTED.
14334
14335 2009-06-30 Doug Evans <dje@google.com>
14336 Pierre Muller <muller@ics.u-strasbg.fr>
14337
14338 Add h/w watchpoint support to x86-linux, win32-i386.
14339 * Makefile.in (SFILES): Add i386-low.c
14340 (i386_low_h): Define.
14341 (i386-low.o): Add dependencies.
14342 (linux-x86-low.o): Add i386-low.h dependency.
14343 (win32-i386-low.o): Ditto.
14344 * i386-low.c: New file.
14345 * i386-low.h: New file.
14346 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14347 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14348 * linux-low.c (linux_add_process): Initialize arch_private.
14349 (linux_remove_process): Free arch_private.
14350 (add_lwp): Initialize arch_private.
14351 (delete_lwp): Free arch_private.
14352 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14353 provided.
14354 * linux-low.h (process_info_private): New member arch_private.
14355 (lwp_info): New member arch_private.
14356 (linux_target_ops): New members new_process, new_thread,
14357 prepare_to_resume.
14358 (ptid_of): New macro.
14359 * linux-x86-low.c: Include stddef.h, i386-low.h.
14360 (arch_process_info): New struct.
14361 (arch_lwp_info): New struct.
14362 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14363 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14364 (i386_dr_low_get_status): New function.
14365 (x86_insert_point, x86_remove_point): New functions.
14366 (x86_stopped_by_watchpoint): New function.
14367 (x86_stopped_data_address): New function.
14368 (x86_linux_new_process, x86_linux_new_thread): New functions.
14369 (x86_linux_prepare_to_resume): New function.
14370 (the_low_target): Add entries for insert_point, remove_point,
14371 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14372 prepare_to_resume.
14373 * server.c (debug_hw_points): New global.
14374 (monitor_show_help): Document set debug-hw-points.
14375 (handle_query): Process "set debug-hw-points".
14376 * server.h (debug_hw_points): Declare.
14377 (paddress): Declare.
14378 * utils.c (NUMCELLS, CELLSIZE): New macros.
14379 (get_sell, xsnprintf, paddress): New functions.
14380 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14381 remove_point, stopped_by_watchpoint, stopped_data_address.
14382 * win32-i386-low.c: Include i386-low.h.
14383 (debug_reg_state): Replaces dr.
14384 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14385 (i386_dr_low_get_status): New function.
14386 (i386_insert_point, i386_remove_point): New functions.
14387 (i386_stopped_by_watchpoint): New function.
14388 (i386_stopped_data_address): New function.
14389 (i386_initial_stuff): Update.
14390 (get_thread_context,set_thread_context,i386_thread_added): Update.
14391 (the_low_target): Add entries for insert_point,
14392 remove_point, stopped_by_watchpoint, stopped_data_address.
14393 * win32-low.c (win32_insert_watchpoint): New function.
14394 (win32_remove_watchpoint): New function.
14395 (win32_stopped_by_watchpoint): New function.
14396 (win32_stopped_data_address): New function.
14397 (win32_target_ops): Add entries for insert_watchpoint,
14398 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14399 * win32-low.h (win32_target_ops): New members insert_point,
14400 remove_point, stopped_by_watchpoint, stopped_data_address.
14401
14402 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14403
14404 * server.c (process_serial_event): Re-return unsupported, not
14405 error, if the type isn't recognized. Re-allow supporting only
14406 insert or remove packets. Also call require_running for
14407 breakpoints. Add missing break statement to default case. Tidy.
14408 * target.h (struct target_ops): Rename insert_watchpoint to
14409 insert_point, and remove_watchpoint to remove_point.
14410
14411 * linux-low.h (struct linux_target_ops): Likewise.
14412 * linux-low.c (linux_insert_watchpoint): Rename to ...
14413 (linux_insert_point): ... this. Adjust.
14414 (linux_remove_watchpoint): Rename to ...
14415 (linux_remove_point): ... this. Adjust.
14416 (linux_target_ops): Adjust.
14417 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14418 (cris_insert_point): ... this.
14419 (cris_remove_watchpoint): Rename to ...
14420 (cris_remove_point): ... this.
14421 (the_low_target): Adjust.
14422
14423 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14424
14425 * server.c (handle_v_kill): Pass signal_pid to
14426 kill_inferior if multi_process is zero.
14427
14428 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14429
14430 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14431 * target.h (target_ops): Comment for *_watchpoint to make it clear
14432 the functions can get types '0' and '1'.
14433
14434 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14435
14436 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14437 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14438 * regcache.c (get_regcache): Likewise.
14439 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14440 * win32-low.c (child_fetch_inferior_registers): Remove check for
14441 regno 0.
14442
14443 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14444 Pedro Alves <pedro@codesourcery.com>
14445
14446 * target.h (struct target_ops) <supports_multi_process>: New
14447 callback.
14448 (target_supports_multi_process): New.
14449 * server.c (handle_query): Even if GDB reports support, only
14450 enable multi-process if the target also supports it. Report
14451 multi-process support only if the target backend supports it.
14452 * linux-low.c (linux_supports_multi_process): New function.
14453 (linux_target_ops): Install it as target_supports_multi_process
14454 callback.
14455
14456 2009-05-24 Doug Evans <dje@google.com>
14457
14458 Global renaming of find_thread_pid to find_thread_ptid.
14459 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14460 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14461 All callers updated.
14462
14463 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14464 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14465 directly.
14466
14467 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14468 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14469 (linux_resume_one_lwp): Ditto.
14470
14471 2009-05-23 Doug Evans <dje@google.com>
14472
14473 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14474 from struct inferior_list_entry * to struct lwp_info *.
14475 All callers updated.
14476
14477 2009-05-13 Doug Evans <dje@google.com>
14478
14479 * linux-x86-low.c: Don't include assert.h.
14480 (x86_siginfo_fixup): Use fatal, not assert.
14481 (x86_arch_setup): Fix comment.
14482
14483 2009-05-12 Doug Evans <dje@google.com>
14484
14485 Biarch support for i386/amd64 gdbserver.
14486 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14487 Add linux-x86-low.c.
14488 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14489 (linux-x86-low.o): Add.
14490 * linux-x86-64-low.c: Delete.
14491 * linux-i386-low.c: Delete.
14492 * linux-x86-low.c: New file.
14493 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14494 linux-x86-low.o.
14495 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14496 linux-x86-low.o.
14497 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14498 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14499 (linux_child_pid_to_exec_file): New function.
14500 (elf_64_header_p, elf_64_file_p): New functions.
14501 (siginfo_fixup): New function.
14502 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14503 give target a chance to convert layout.
14504 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14505 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14506
14507 2009-05-07 Doug Evans <dje@google.com>
14508
14509 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14510 (regsets_store_inferior_registers): Ditto.
14511
14512 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14513
14514 PR server/10048
14515
14516 * linux-low.c (must_set_ptrace_flags): Delete.
14517 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14518 of the global.
14519 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14520 `lwp->must_set_ptrace_flags' instead.
14521 (linux_wait_for_event_1): Set ptrace options here.
14522 (linux_wait_1): ... not here.
14523
14524 2009-04-30 Doug Evans <dje@google.com>
14525
14526 * inferiors.c (started_inferior_callback): New function.
14527 (attached_inferior_callback): New function.
14528 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14529 * server.c (print_started_pid, print_attached_pid): New functions.
14530 (detach_or_kill_for_exit): New function.
14531 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14532 * server.h (have_started_inferiors_p): Declare.
14533 (have_attached_inferiors_p): Declare.
14534
14535 * inferiors.c (remove_process): Fix memory leak, free process.
14536 * linux-low.c (linux_remove_process): New function.
14537 (linux_kill): Call it instead of remove_process.
14538 (linux_detach, linux_wait_1): Ditto.
14539
14540 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14541
14542 * configure.srv: Add x86 Windows CE target.
14543
14544 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14545
14546 * inferiors.c (get_thread_process): Make global.
14547 * server.h (get_thread_process): Add prototype.
14548 * thread-db.c (find_one_thread): Use get_thread_process
14549 instead of current_process.
14550 (thread_db_get_tls_address): Do not crash if called when
14551 thread layer is not yet initialized.
14552
14553 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14554
14555 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14556 * spu-low.c (current_tid): Rename to ...
14557 (current_ptid): ... this.
14558 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14559 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14560 ptid_get_lwp (current_ptid) instead of current_tid.
14561 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14562 instead of current_tid. Use find_process_pid to verify pid
14563 argument is valid. Pass proper argument to remove_process.
14564 (spu_thread_alive): Compare current_ptid instead of current_tid.
14565 (spu_resume): Likewise.
14566
14567 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14568
14569 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14570 variable.
14571
14572 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14573
14574 Implement the multiprocess extensions, and add linux multiprocess
14575 support.
14576
14577 * server.h (ULONGEST): Declare.
14578 (struct ptid, ptid_t): New.
14579 (minus_one_ptid, null_ptid): Declare.
14580 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14581 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14582 (struct inferior_list_entry): Change `id' type from unsigned from
14583 to ptid_t.
14584 (struct sym_cache, struct breakpoint, struct
14585 process_info_private): Forward declare.
14586 (struct process_info): Declare.
14587 (current_process): Declare.
14588 (all_processes): Declare.
14589 (initialize_inferiors): Declare.
14590 (add_thread): Adjust to use ptid_t.
14591 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14592 (add_process, remove_process, find_thread_pid): Declare.
14593 (find_inferior_id): Adjust to use ptid_t.
14594 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14595 (multi_process): Declare.
14596 (push_event): Adjust to use ptid_t.
14597 (read_ptid, write_ptid): Declare.
14598 (prepare_resume_reply): Adjust to use ptid_t.
14599 (clear_symbol_cache): Declare.
14600 * inferiors.c (all_processes): New.
14601 (null_ptid, minus_one_ptid): New.
14602 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14603 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14604 (add_thread): Change unsigned long to ptid. Remove gdb_id
14605 parameter. Adjust.
14606 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14607 (gdb_id_to_thread): Rename to ...
14608 (find_thread_pid): ... this. Change unsigned long to ptid.
14609 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14610 (loaded_dll, pull_pid_from_list): Adjust.
14611 (add_process, remove_process, find_process_pid)
14612 (get_thread_process, current_process, initialize_inferiors): New.
14613 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14614 (struct target_waitstatus) <related_pid>: Ditto.
14615 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14616 return type to int.
14617 (struct target_ops) <join>: Add `pid' argument.
14618 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14619 (struct target_ops) <wait>: Add `ptid' field. Change return type
14620 to ptid.
14621 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14622 (mywait): Add `ptid' argument. Change return type to ptid_t.
14623 (target_pid_to_str): Declare.
14624 * target.c (set_desired_inferior): Adjust to use ptids.
14625 (mywait): Add new `ptid' argument. Adjust.
14626 (target_pid_to_str): New.
14627 * mem-break.h (free_all_breakpoints): Declare.
14628 * mem-break.c (breakpoints): Delelete.
14629 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14630 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14631 to use per-process breakpoint list.
14632 (free_all_breakpoints): New.
14633 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14634 (symbol_cache, all_symbols_looked_up): Delete.
14635 (hexchars): New.
14636 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14637 read_ptid): New.
14638 (prepare_resume_reply): Change ptid argument's type from unsigned
14639 long to ptid_t. Adjust. Implement W;process and X;process.
14640 (free_sym_cache, clear_symbol_cache): New.
14641 (look_up_one_symbol): Adjust to per-process symbol cache. *
14642 * server.c (cont_thread, general_thread, step_thread): Change type
14643 to ptid_t.
14644 (attached): Delete.
14645 (multi_process): New.
14646 (last_ptid): Change type to ptid_t.
14647 (struct vstop_notif) <ptid>: Change type to ptid_t.
14648 (queue_stop_reply, push_event): Change `ptid' argument's type to
14649 ptid_t.
14650 (discard_queued_stop_replies): Add `pid' argument.
14651 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14652 changes. Don't reference the `attached' global.
14653 (attach_inferior): Adjust to mywait interface changes.
14654 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14655 features. Handle and report "multiprocess+". Handle
14656 "qAttached:PID".
14657 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14658 changes.
14659 (handle_v_kill): New.
14660 (handle_v_stopped): Adjust to use target_pid_to_str.
14661 (handle_v_requests): Allow multiple attaches and runs when
14662 multiprocess extensions are in effect. Handle "vKill".
14663 (myresume): Adjust to use ptids.
14664 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14665 (handle_status): Adjust to discard_queued_stop_replies interface
14666 change.
14667 (first_thread_of, kill_inferior_callback)
14668 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14669 (main): Call initialize_inferiors. Adjust to use ptids, killing
14670 and detaching from all inferiors. Handle multiprocess packet
14671 variants.
14672 * linux-low.h: Include gdb_proc_service.h.
14673 (struct process_info_private): New.
14674 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14675 <lwpid_of>: Use ptid_get_lwp.
14676 (get_lwp_thread): Adjust.
14677 (struct lwp_info): Add `dead' member.
14678 (find_lwp_pid): Declare.
14679 * linux-low.c (thread_db_active): Delete.
14680 (new_inferior): Adjust comment.
14681 (inferior_pid): Delete.
14682 (linux_add_process): New.
14683 (handle_extended_wait): Adjust.
14684 (add_lwp): Change unsigned long to ptid.
14685 (linux_create_inferior): Add process to processes table. Adjust
14686 to use ptids. Don't set new_inferior here.
14687 (linux_attach_lwp): Rename to ...
14688 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14689 it. Adjust to use ptids.
14690 (linux_attach_lwp): New.
14691 (linux_attach): Add process to processes table. Don't set
14692 new_inferior here.
14693 (struct counter): New.
14694 (second_thread_of_pid_p, last_thread_of_process_p): New.
14695 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14696 multiple processes.
14697 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14698 processes. Remove process from process table.
14699 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14700 to multiple processes.
14701 (any_thread_of): New.
14702 (linux_detach): Add `pid' argument, and handle it. Remove process
14703 from processes table.
14704 (linux_join): Add `pid' argument. Handle it.
14705 (linux_thread_alive): Change unsighed long argument to ptid_t.
14706 Consider dead lwps as not being alive.
14707 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14708 threads we're not interested in.
14709 (same_lwp, find_lwp_pid): New.
14710 (linux_wait_for_lwp): Change `pid' argument's type from int to
14711 ptid_t. Adjust.
14712 (linux_wait_for_event): Rename to ...
14713 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14714 from int to ptid_t. Adjust.
14715 (linux_wait_for_event): New.
14716 (linux_wait_1): Add `ptid' argument. Change return type to
14717 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14718 that exit from the process table.
14719 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14720 Adjust.
14721 (mark_lwp_dead): New.
14722 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14723 stopping all threads, mark its main lwp as dead.
14724 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14725 ptids.
14726 (fetch_register, usr_store_inferior_registers)
14727 (regsets_fetch_inferior_registers)
14728 (regsets_store_inferior_registers, linux_read_memory)
14729 (linux_write_memory): Inline `inferior_pid'.
14730 (linux_look_up_symbols): Adjust to use per-process
14731 `thread_db_active'.
14732 (linux_request_interrupt): Adjust to use ptids.
14733 (linux_read_auxv): Inline `inferior_pid'.
14734 (initialize_low): Don't reference thread_db_active.
14735 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14736 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14737 (ps_getpid): Return the pid of the current inferior.
14738 * thread-db.c (proc_handle, thread_agent): Delete.
14739 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14740 per-process data.
14741 (find_one_thread): Change argument type to ptid_t. Adjust to
14742 per-process data.
14743 (maybe_attach_thread): Adjust to per-process data and ptids.
14744 (thread_db_find_new_threads): Ditto.
14745 (thread_db_init): Ditto.
14746 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14747 processes table. Adjust to use ptids.
14748 (spu_kill, spu_detach): Adjust interface. Remove process from
14749 processes table.
14750 (spu_join, spu_thread_alive): Adjust interface.
14751 (spu_wait): Adjust interface. Remove process from processes
14752 table. Adjust to use ptids.
14753 * win32-low.c (current_inferior_tid): Delete.
14754 (current_inferior_ptid): New.
14755 (debug_event_ptid): New.
14756 (thread_rec): Take a ptid. Adjust.
14757 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14758 (child_delete_thread): Ditto.
14759 (do_initial_child_stuff): Add `attached' argument. Add process to
14760 processes table.
14761 (child_fetch_inferior_registers, child_store_inferior_registers):
14762 Adjust.
14763 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14764 (win32_attach): Pass 1 to do_initial_child_stuff.
14765 (win32_kill): Adjust interface. Remove process from processes
14766 table.
14767 (win32_detach): Ditto.
14768 (win32_join): Adjust interface.
14769 (win32_thread_alive): Take a ptid.
14770 (win32_resume): Adjust to use ptids.
14771 (get_child_debug_event): Ditto.
14772 (win32_wait): Adjust interface. Remove exiting process from
14773 processes table.
14774
14775 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14776
14777 Non-stop mode support.
14778
14779 * server.h (non_stop): Declare.
14780 (gdb_client_data, handler_func): Declare.
14781 (delete_file_handler, add_file_handler, start_event_loop):
14782 Declare.
14783 (handle_serial_event, handle_target_event, push_event)
14784 (putpkt_notif): Declare.
14785 * target.h (enum resume_kind): New.
14786 (struct thread_resume): Replace `step' field by `kind' field.
14787 (TARGET_WNOHANG): Define.
14788 (struct target_ops) <wait>: Add `options' argument.
14789 <supports_non_stop, async, start_non_stop>: New fields.
14790 (target_supports_non_stop, target_async): New.
14791 (start_non_stop): Declare.
14792 (mywait): Add `options' argument.
14793 * target.c (mywait): Add `options' argument. Print child exit
14794 notifications here.
14795 (start_non_stop): New.
14796 * server.c (non_stop, own_buf, mem_buf): New globals.
14797 (struct vstop_notif): New.
14798 (notif_queue): New global.
14799 (queue_stop_reply, push_event, discard_queued_stop_replies)
14800 (send_next_stop_reply): New.
14801 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14802 interface changes.
14803 (attach_inferior): In non-stop mode, don't wait for the target
14804 here.
14805 (handle_general_set): Handle QNonStop.
14806 (handle_query): When handling qC, return the current general
14807 thread, instead of the first thread of the list.
14808 (handle_query): If the backend supports non-stop mode, include
14809 QNonStop+ in the qSupported query response.
14810 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14811 and non-stop mode.
14812 (handle_v_attach, handle_v_run): Handle non-stop mode.
14813 (handle_v_stopped): New.
14814 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14815 (myresume): Adjust to use resume_kind. Handle non-stop.
14816 (queue_stop_reply_callback): New.
14817 (handle_status): Handle non-stop mode.
14818 (main): Clear non_stop flag on reconnection. Use the event-loop.
14819 Refactor serial protocol handling from here ...
14820 (process_serial_event): ... to this new function. When GDB
14821 selects any thread, select one here. In non-stop mode, wait until
14822 GDB acks all pending events before exiting.
14823 (handle_serial_event, handle_target_event): New.
14824 * remote-utils.c (remote_open): Install remote_desc in the event
14825 loop.
14826 (remote_close): Remove remote_desc from the event loop.
14827 (putpkt_binary): Rename to...
14828 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14829 (putpkt_binary): New as wrapper around putpkt_binary_1.
14830 (putpkt_notif): New.
14831 (prepare_resume_reply): In non-stop mode, don't change the
14832 general_thread.
14833 * event-loop.c: New.
14834 * Makefile.in (OBJ): Add event-loop.o.
14835 (event-loop.o): New rule.
14836
14837 * linux-low.h (pid_of): Moved here.
14838 (lwpid_of): New.
14839 (get_lwp_thread): Use lwpid_of.
14840 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14841 * linux-low.c (pid_of): Delete.
14842 (inferior_pid): Use lwpid_of.
14843 (linux_event_pipe): New.
14844 (target_is_async_p): New.
14845 (delete_lwp): New.
14846 (handle_extended_wait): Use lwpid_of.
14847 (add_lwp): Don't set lwpid field.
14848 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14849 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14850 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14851 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14852 first. Adjust to linux_wait_for_event interface changes. Use
14853 lwpid_of.
14854 (linux_detach): Don't delete the main lwp here.
14855 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14856 (status_pending_p): Don't consider explicitly suspended lwps.
14857 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14858 pointer. Add OPTIONS argument. Change return type to int. Use
14859 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14860 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14861 pointer. Add status pointer argument. Return a pid instead of a
14862 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14863 changes. In non-stop mode, don't switch to a random thread.
14864 (linux_wait): Rename to...
14865 (linux_wait_1): ... this. Add target_options argument, and handle
14866 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14867 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14868 clean exit and signal exit code. Don't stop all threads in
14869 non-stop mode. In all-stop mode, only stop all threads when
14870 reporting a stop to GDB. Handle explicit thread stop requests.
14871 (async_file_flush, async_file_mark): New.
14872 (linux_wait): New.
14873 (send_sigstop): Use lwpid_of.
14874 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14875 interface changes. In non-stop mode, don't switch to a random
14876 thread.
14877 (linux_resume_one_lwp): Use lwpid_of.
14878 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14879 (linux_resume_one_thread): ... this. Handle resume_stop. In
14880 non-stop mode, don't look for pending flag in all threads.
14881 (resume_status_pending_p): Don't consider explicitly suspended
14882 threads.
14883 (my_waitpid): Reimplement. Emulate __WALL.
14884 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14885 Use lwpid_of.
14886 (sigchld_handler, linux_supports_non_stop, linux_async)
14887 (linux_start_non_stop): New.
14888 (linux_target_ops): Register linux_supports_non_stop, linux_async
14889 and linux_start_non_stop.
14890 (initialize_low): Install SIGCHLD handler.
14891 * thread-db.c (thread_db_create_event, find_one_thread)
14892 (thread_db_get_tls_address): Use lwpid_of.
14893 * win32-low.c (win32_detach): Adjust to use resume_kind.
14894 (win32_wait): Add `options' argument.
14895 * spu-low.c (spu_resume): Adjust to use resume_kind.
14896 (spu_wait): Add `options' argument.
14897
14898 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14899
14900 Decouple target code from remote protocol.
14901
14902 * target.h (enum target_waitkind): New.
14903 (struct target_waitstatus): New.
14904 (struct target_ops) <wait>: Return an unsigned long. Take a
14905 target_waitstatus pointer instead of a char pointer.
14906 (mywait): Likewise.
14907 * target.c (mywait): Change prototype to return an unsigned long.
14908 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14909 * server.h (thread_from_wait, old_thread_from_wait): Delete
14910 declarations.
14911 (prepare_resume_reply): Change prototype to take a
14912 target_waitstatus.
14913 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14914 (last_status, last_ptid): New.
14915 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14916 pid instead of a signal.
14917 (attach_inferior): Remove "status" and "signal" parameters.
14918 Adjust.
14919 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14920 not as an address.
14921 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14922 (handle_v_requests, myresume): Remove "status" and "signal"
14923 parameters. Adjust.
14924 (handle_status): New.
14925 (main): Delete local `status'. Adjust.
14926 * remote-utils.c: Include target.h.
14927 (prepare_resume_reply): Change prototype to take a
14928 target_waitstatus. Adjust.
14929
14930 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14931 interface.
14932 * spu-low.c (spu_wait): Adjust.
14933 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14934 Delete.
14935 (win32_wait): Adjust.
14936
14937 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14938
14939 * target.h (struct thread_resume): Delete leave_stopped member.
14940 (struct target_ops): Add a `n' argument to the `resume' callback.
14941 * server.c (start_inferior): Adjust.
14942 (handle_v_cont, myresume): Adjust.
14943 * linux-low.c (check_removed_breakpoint): Adjust to resume
14944 interface change, and to removed leave_stopped field.
14945 (resume_ptr): Delete.
14946 (struct thread_resume_array): New.
14947 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14948 resume interface change.
14949 (linux_continue_one_thread, linux_queue_one_thread)
14950 (resume_status_pending_p): Check if the resume field is NULL
14951 instead of checking the leave_stopped member.
14952 (linux_resume): Adjust to the target resume interface change.
14953 * spu-low.c (spu_resume): Adjust to the target resume interface
14954 change.
14955 * win32-low.c (win32_detach, win32_resume): Ditto.
14956
14957 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14958
14959 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14960 flag.
14961 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14962 pending.
14963 (linux_continue_one_thread): Only preserve the stepping flag if
14964 there's a pending breakpoint.
14965
14966 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14967
14968 * server.c (main): After the inferior having exited, call
14969 remote_close before exiting gdbserver.
14970
14971 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14972
14973 Fix size of FPSCR in Power 7 processors.
14974 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14975 (PPC_FEATURE_HAS_DFP): New #define.
14976 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14977 size of the FPSCR.
14978
14979 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14980
14981 * server.c (handle_query) Whitespace and formatting.
14982
14983 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14984
14985 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14986 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14987 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14988 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14989 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14990 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14991 Makefile.in, configure.ac: Fix whitespace throughout.
14992 * configure: Regenerate.
14993
14994 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14995
14996 * inferiors.c (find_inferior): Make it safe for the callback
14997 function to delete the currently iterated inferior.
14998
14999 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15000
15001 * Makefile.in (linuw_low_h): Move higher.
15002 (thread-db.o): Depend on $(linux_low_h).
15003
15004 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15005
15006 Rename "process" to "lwp" throughout.
15007
15008 * linux-low.c (all_processes): Rename to...
15009 (all_lwps): ... this.
15010 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15011 (add_process): Rename to ...
15012 (add_lwp): ... this. Adjust.
15013 (linux_create_inferior): Adjust.
15014 (linux_attach_lwp): Adjust.
15015 (linux_attach): Adjust.
15016 (linux_kill_one_process): Rename to ...
15017 (linux_kill_one_lwp): ... this. Adjust.
15018 (linux_kill): Adjust.
15019 (linux_detach_one_process): Rename to ...
15020 (linux_detach_one_lwp): ... this. Adjust.
15021 (linux_detach): Adjust.
15022 (check_removed_breakpoint): Adjust.
15023 (status_pending_p): Adjust.
15024 (linux_wait_for_process): Rename to ...
15025 (linux_wait_for_lwp): ... this. Adjust.
15026 (linux_wait_for_event): Adjust.
15027 (send_sigstop): Adjust.
15028 (wait_for_sigstop): Adjust.
15029 (stop_all_processes): Rename to ...
15030 (stop_all_lwps): ... this.
15031 (linux_resume_one_process): Rename to ...
15032 (linux_resume_one_lwp): ... this. Adjust.
15033 (linux_set_resume_request, linux_continue_one_thread)
15034 (linux_queue_one_thread, resume_status_pending_p)
15035 (usr_store_inferior_registers, regsets_store_inferior_registers)
15036 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15037 Adjust.
15038 * linux-low.h (get_process): Rename to ...
15039 (get_lwp): ... this. Adjust.
15040 (get_thread_process): Rename to ...
15041 (get_thread_lwp): ... this. Adjust.
15042 (get_process_thread): Rename to ...
15043 (get_lwp_thread): ... this. Adjust.
15044 (struct process_info): Rename to ...
15045 (struct lwp_info): ... this.
15046 (all_processes): Rename to ...
15047 (all_lwps): ... this.
15048 * proc-service.c (ps_lgetregs): Adjust.
15049 * thread-db.c (thread_db_create_event, find_one_thread)
15050 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15051
15052 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15053
15054 * server.c (handle_query): Handle "qAttached".
15055
15056 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15057
15058 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15059 GPLv3, update license URL.
15060
15061 2009-03-01 Doug Evans <dje@google.com>
15062
15063 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15064 (server_h): Add gdb_signals.h.
15065 (signals.o): Update.
15066 * server.h (target_signal_from_host,target_signal_to_host_p)
15067 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15068
15069 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15070
15071 * remote-utils.c (getpkt): Also generate remote-debug
15072 information if noack_mode is set.
15073
15074 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15075
15076 * server.c (handle_query): Report qXfer:siginfo:read and
15077 qXfer:siginfo:write as supported and handle them.
15078 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15079 * linux-low.c (linux_xfer_siginfo): New.
15080 (linux_target_ops): Set it.
15081
15082 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15083
15084 * server.c (gdbserver_usage): Mention --remote-debug.
15085 (main): Accept '--remote-debug' switch.
15086
15087 2009-01-18 Doug Evans <dje@google.com>
15088
15089 * regcache.c (new_register_cache): No need to check result of xcalloc.
15090 * server.c (handle_search_memory): Back out calls to xmalloc,
15091 result is checked and error is returned to user upon failure.
15092 (handle_query): Ditto. Add more checks for result of malloc.
15093 (handle_v_cont): Check result of malloc, report error back to
15094 user upon failure.
15095 (handle_v_run): Ditto. Call freeargv.
15096 * server.h (freeargv): Declare.
15097 * utils.c (freeargv): New fn.
15098
15099 2009-01-15 Doug Evans <dje@google.com>
15100
15101 * gdbreplay.c (perror_with_name): Make arg const char *.
15102 * server.h (target_signal_to_name): Make return type const char *.
15103 * thread-db.c (thread_db_err_str): Make return type const char *.
15104 * utils.c (perror_with_name): Make arg const char *.
15105
15106 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15107
15108 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15109 when handling a EXIT_PROCESS_DEBUG_EVENT.
15110
15111 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15112
15113 * gdbreplay.c (gdbreplay_version): Update copyright year.
15114 * server.c (gdbserver_version): Likewise.
15115
15116 2009-01-05 Doug Evans <dje@google.com>
15117
15118 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15119 (handle_extended_wait): Improve comment.
15120
15121 2008-12-13 Doug Evans <dje@google.com>
15122
15123 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15124 * server.h (ATTR_MALLOC): New macro.
15125 (xmalloc,xcalloc,xstrdup): Declare.
15126 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15127 * inferiors.c: Ditto.
15128 * linux-low.c: Ditto.
15129 * mem-break.c: Ditto.
15130 * regcache.c: Ditto.
15131 * remote-utils.c: Ditto.
15132 * server.c: Ditto.
15133 * target.c: Ditto.
15134 * win32-low.c: Ditto.
15135
15136 2008-12-12 Doug Evans <dje@google.com>
15137
15138 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15139 in debugging printf.
15140
15141 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15142
15143 2008-12-09 Doug Evans <dje@google.com>
15144
15145 * linux-low.h (struct process_info): Delete member tid, unused.
15146 * thread-db.c (find_one_thread): Update.
15147 (maybe_attach_thread): Update.
15148
15149 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15150
15151 * target.h (struct target_ops): Add qxfer_osdata member.
15152 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15153 and dirent.h.
15154 (linux_qxfer_osdata): New functions.
15155 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15156 callback.
15157 * server.c (handle_query): Handle "qXfer:osdata:read:".
15158 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15159 (buffer_xml_printf): New functions.
15160 * server.h (struct buffer): New.
15161 (buffer_grow_str, buffer_grow_str0): New macros.
15162 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15163 (buffer_xml_printf): Declare.
15164
15165 2008-11-24 Doug Evans <dje@google.com>
15166
15167 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15168
15169 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * server.c (handle_v_run): Always use the supplied argument list.
15172
15173 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15174
15175 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15176 (xtensa_regmap_table): Add entry for scompare1.
15177
15178 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15179
15180 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15181 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15182 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15183 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15184 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15185 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15186 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15187 XML target descriptions.
15188 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15189 when inferior is running on an ISA 2.05 or later processor. Add
15190 special case to return offset for full 64-bit slot of FPSCR when
15191 in 32-bits.
15192
15193 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15194
15195 * Makefile.in (SFILES, clean): Added sparc64 files.
15196 (reg-sparc64.o, reg-sparc64.c): New.
15197 * configure.srv (sparc*-*-linux*): New configuration.
15198 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15199 syscall arguments for SPARC.
15200 (regsets_store_inferior_registers): Likewise.
15201 * linux-sparc-low.c: New file.
15202
15203 2008-10-21 Doug Evans <dje@google.com>
15204
15205 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15206 (READLINE_DIR,READLINE_DEP): Delete.
15207 (INTERNAL_CFLAGS): Update.
15208 (LINTFLAGS): Update.
15209
15210 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15211
15212 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15213 whole argv from the last run, not just argv[0].
15214
15215 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15216
15217 * regcache.c (new_register_cache): Return NULL if the register
15218 cache size isn't known yet.
15219 (free_register_cache): Avoid dereferencing a NULL regcache.
15220
15221 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15222
15223 * configure.srv: Merge MIPS and MIPS64.
15224
15225 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15226
15227 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15228
15229 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15230
15231 * Makefile.in: Add required vsx dependencies.
15232
15233 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15234 Declare init_registers_powerpc_vsx32l.
15235 Declare init_registers_powerpc_vsx64l.
15236 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15237 (ppc_arch_setup): Check for VSX in hwcap.
15238 (ppc_fill_vsxregset): New function.
15239 (ppc_store_vsxregset): New function.
15240 Add new VSX entry in regset_info target_regsets.
15241
15242 * configure.srv: Add new VSX dependencies.
15243
15244 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15245
15246 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15247 (remote_open): Set or clear transport_is_reliable.
15248 (putpkt_binary): Don't expect acks in noack mode.
15249 (getpkt): Don't send ack/nac in noack mode.
15250 * server.c (handle_general_set): Handle QStartNoAckMode.
15251 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15252 qSupported.
15253 (main): Reset noack_mode on every connection.
15254 * server.h (noack_mode): Declare.
15255
15256 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15257
15258 * Makefile.in (GDBREPLAY_OBS): New variable.
15259 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15260
15261 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15262 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15265 (usr_store_inferior_registers): Likewise.
15266 (regsets_store_inferior_registers): Likewise.
15267
15268 2008-07-31 Rolf Jansen <rj@surtec.com>
15269 Pedro Alves <pedro@codesourcery.com>
15270
15271 * configure.ac: Check for memmem declaration.
15272 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15273 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15274 (disable_packet_qfThreadInfo): Unconditionally compile.
15275 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15276 * configure, config.in: Regenerate.
15277
15278 2008-07-28 Doug Kwan <dougkwan@google.com>
15279
15280 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15281 (linux_write_memory): Remove declaration of errno.
15282
15283 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15284
15285 * linux-low.c (handle_extended_wait): Do not use "status"
15286 variable uninitialized.
15287
15288 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15289
15290 * server.c (handle_v_attach): Inhibit reporting dll changes.
15291
15292 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15293
15294 * remote-utils.c (prepare_resume_reply): If requested, don't
15295 output "thread:TID" in the T stop reply.
15296
15297 * server.c (disable_packet_vCont, disable_packet_Tthread)
15298 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15299 (handle_query): If requested, disable support for qC, qfThreadInfo
15300 and qsThreadInfo.
15301 (handle_v_requests): If requested, disable support for vCont.
15302 (gdbserver_show_disableable): New.
15303 (main): Handle --disable-packet and --disable-packet=LIST.
15304
15305 * server.h (disable_packet_vCont, disable_packet_Tthread)
15306 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15307
15308 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15309
15310 * server.c (gdbserver_usage): Mention --version.
15311
15312 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15313
15314 * Makefile.in (gdbreplay.o): New rule.
15315
15316 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15317
15318 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15319 message, not gdbserver.
15320
15321 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15322 Nathan Sidwell <nathan@codesourcery.com>
15323 Joseph Myers <joseph@codesourcery.com>
15324
15325 * acinclude.m4: Include ../../config/acx.m4.
15326 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15327 * configure, config.in: Regenerate.
15328 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15329 * server.c (gdbserver_version): Print PKGVERSION.
15330 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15331 (main): Adjust gdbserver_usage calls.
15332 * gdbreplay.c (version, host_name): Add declarations.
15333 (gdbreplay_version, gdbreplay_usage): New.
15334 (main): Accept --version and --help options.
15335
15336 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15339 (arm_breakpoint_at): Handle Thumb.
15340 (the_low_target): Add comment.
15341
15342 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15343
15344 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15345
15346 2008-05-09 Doug Evans <dje@google.com>
15347
15348 * server.h (decode_search_memory_packet): Declare.
15349 * remote-utils.c (decode_search_memory_packet): New fn.
15350 * server.c (handle_search_memory_1): New fn.
15351 (handle_search_memory): New fn.
15352 (handle_query): Process qSearch:memory packets.
15353
15354 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15355
15356 * regcache.c (registers_length): Remove.
15357 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15358 full register packet.
15359 * regcache.h (registers_length): Remove prototype.
15360 * server.h (PBUFSIZ): Define to 16384.
15361
15362 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15363
15364 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15365 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15366 powerpc-64l.o, and powerpc-altivec64l.o.
15367 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15368 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15369 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15370 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15371 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15372 to srv_xmlfiles.
15373
15374 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15375 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15376 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15377 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15378 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15379 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15380 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15381 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15382 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15383 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15384 (clean): Update.
15385
15386 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15387 (init_registers_powerpc_32l): ... this new prototype.
15388 (init_registers_powerpc_32): Remove, replace by ...
15389 (init_registers_powerpc_altivec32l): ... this new prototype.
15390 (init_registers_powerpc_e500): Remove, replace by ...
15391 (init_registers_powerpc_e500l): ... this new prototype.
15392 (init_registers_ppc64): Remove, replace by ...
15393 (init_registers_powerpc_64l): ... this new prototype.
15394 (init_registers_powerpc_64): Remove, replace by ...
15395 (init_registers_powerpc_altivec64l): ... this new prototype.
15396 (ppc_num_regs): Set to 73.
15397 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15398 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15399 (ppc_cannot_store_register): Handle orig_r3 and trap.
15400 (ppc_arch_setup): Update init_registers_... calls.
15401 (ppc_fill_gregset): Handle orig_r3 and trap.
15402
15403 * inferiors.c (clear_inferiors): Reset current_inferior.
15404
15405 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15406
15407 * acinclude.m4: Add override.m4.
15408 * configure: Regenerate.
15409
15410 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15411
15412 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15413 initial call to init_register_ppc64.
15414
15415 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15416
15417 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15418 single powerpc*-*-linux* case.
15419 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15420
15421 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15422
15423 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15424 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15425 from reg_xmlfiles.
15426 * linux-ppc-low.c: Include <elf.h>.
15427 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15428 (ppc_hwcap): New global variable.
15429 (ppc_regmap): Remove __SPE__ #ifdef sections.
15430 (ppc_regmap_e500): New global variable.
15431 (ppc_cannot_store_register): Update __SPE__ special case.
15432 (ppc_get_hwcap): New function.
15433 (ppc_arch_setup): Use it to determine whether inferior supports
15434 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15435 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15436 Do not access registers if target does not support AltiVec.
15437 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15438 Do not access registers if target does not support SPE.
15439 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15440
15441 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15442
15443 * linux-low.c (disabled_regsets, num_regsets): New.
15444 (use_regsets_p): Delete.
15445 (linux_wait_for_process): Clear disabled_regsets.
15446 (regsets_fetch_inferior_registers): Check and set it.
15447 (regsets_store_inferior_registers): Likewise.
15448 (linux_fetch_registers, linux_store_registers): Do not use
15449 use_regsets_p.
15450 (initialize_low): Allocate disabled_regsets.
15451
15452 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15453
15454 * Makefile.in (LIBOBJS): New.
15455 (OBS): Use LIBOBJS.
15456 (memmem.o): New rule.
15457 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15458 * configure: Regenerated.
15459
15460 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15461
15462 * server.c (handle_query): Never return "unsupported" for
15463 qXfer:features:read queries.
15464
15465 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15466
15467 * server.c (get_features_xml): Fix inverted condition.
15468 (handle_query): Always support qXfer:feature:read.
15469
15470 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * server.c (wrapper_argv): New.
15473 (start_inferior): Handle wrapper_argv. If set, expect an extra
15474 trap.
15475 (gdbserver_usage): Document --wrapper.
15476 (main): Parse --wrapper.
15477
15478 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15479
15480 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15481 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15482 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15483 (ppc_set_pc): Likewise.
15484 (ppc_arch_setup): New function.
15485 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15486 of collect_register.
15487 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15488
15489 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15490
15491 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15492 instead of linux-ppc64-low.o.
15493 * linux-ppc64-low.c: Remove file.
15494 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15495 (linux-ppc64-low.o): Remove rule.
15496
15497 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15498 (init_registers_powerpc_64): Likewise.
15499 (ppc_regmap): Conditionally define depending on __powerpc64__.
15500 (ppc_cannot_store_register): Do not special-case "fpscr" when
15501 compiled on __powerpc64__.
15502 (ppc_collect_ptrace_register): New function.
15503 (ppc_supply_ptrace_register): New function.
15504 (ppc_breakpoint): Change type to "unsigned int".
15505 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15506 (the_low_target): Conditionally provide initializers for the
15507 arch_setup member depending on __powerpc64__. Install
15508 collect_ptrace_register and supply_ptrace_register members.
15509
15510 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15511
15512 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15513 * server.c (gdbserver_xmltarget): Define.
15514 (get_features_xml): Use it to replace "target.xml" and arch_string.
15515
15516 * configure.srv: Remove srv_xmltarget. Add XML files that were
15517 mentioned there to srv_xmlfiles instead. Remove conditional tests
15518 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15519 srv_xmlfiles and srv_regobj to include all possible choices.
15520 * configure.ac (srv_xmltarget): Remove.
15521 (srv_xmlfiles): Do not add "target.xml".
15522 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15523 checks for supplementary target information.
15524 * configure: Regenerate.
15525 * Makefile.in (XML_TARGET): Remove.
15526 (target.xml): Remove rule.
15527 (clean): Do not clean up target.xml.
15528 (.PRECIOUS): Do not mention target.xml.
15529
15530 * target.h (struct target_ops): Remove arch_string member.
15531 * linux-low.c (linux_arch_string): Remove.
15532 (linux_target_ops): Remove arch_string initializer.
15533 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15534 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15535 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15536 * spu-low.c (spu_arch_string): Remove.
15537 (spu_target_ops): Remove arch_string initializer.
15538 * win32-low.c (win32_arch_string): Remove.
15539 (win32_target_ops): Remove arch_string initializer.
15540 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15541 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15542 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15543
15544 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15545
15546 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15547 by collect_ptrace_register and supply_ptrace_register hooks.
15548 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15549 instead of checking for the_low_target.left_pad_xfer.
15550 (usr_store_inferior_registers): Use collect_ptrace_register callback
15551 instead of checking for the_low_target.left_pad_xfer.
15552
15553 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15554 (s390_supply_ptrace_register): Likewise.
15555 (s390_fill_gregset): Call s390_collect_ptrace_register.
15556 (the_low_target): Update.
15557
15558 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15559 (ppc_supply_ptrace_register): Likewise.
15560 (the_low_target): Update.
15561
15562 * linux-i386-low.c (the_low_target): Update.
15563 * linux-x86-64-low.c (the_low_target): Update.
15564
15565 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15566
15567 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15568 reg-s390.o and reg-s390x.o.
15569
15570 * linux-low.c (new_inferior): New global variable.
15571 (linux_create_inferior, linux_attach): Set it.
15572 (linux_wait_for_process): Call the_low_target.arch_setup after the
15573 target has stopped for the first time.
15574 (initialize_low): Do not call the_low_target.arch_setup.
15575
15576 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15577 (s390_set_pc): Likewise.
15578 (s390_arch_setup): New function.
15579 (the_low_target): Use s390_arch_setup as arch_setup routine.
15580
15581 * regcache.c (realloc_register_cache): New function.
15582 (set_register_cache): Call it for each existing regcache.
15583
15584 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15585
15586 * server.h (init_registers): Remove prototype.
15587
15588 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15589 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15590 instead of init_registers ().
15591 * linux-arm-low.c (init_registers_arm): Add prototype.
15592 (init_registers_arm_with_iwmmxt): Likewise.
15593 (the_low_target): Add initializer for arch_setup field.
15594 * linux-cris-low.c (init_registers_cris): Add prototype.
15595 (the_low_target): Add initializer for arch_setup field.
15596 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15597 (the_low_target): Add initializer for arch_setup field.
15598 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15599 (the_low_target): Add initializer for arch_setup field.
15600 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15601 (the_low_target): Add initializer for arch_setup field.
15602 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15603 (the_low_target): Add initializer for arch_setup field.
15604 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15605 (the_low_target): Add initializer for arch_setup field.
15606 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15607 (init_registers_mips64_linux): Likewise.
15608 (the_low_target): Add initializer for arch_setup field.
15609 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15610 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15611 (the_low_target): Add initializer for arch_setup field.
15612 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15613 (init_registers_powerpc_64): Likewise.
15614 (the_low_target): Add initializer for arch_setup field.
15615 * linux-s390-low.c (init_registers_s390): Add prototype.
15616 (init_registers_s390x): Likewise.
15617 (the_low_target): Add initializer for arch_setup field.
15618 * linux-sh-low.c (init_registers_sh): Add prototype.
15619 (the_low_target): Add initializer for arch_setup field.
15620 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15621 (the_low_target): Add initializer for arch_setup field.
15622 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15623 (the_low_target): Add initializer for arch_setup field.
15624
15625 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15626 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15627 instead of init_registers ().
15628 * win32-arm-low.c (init_registers_arm): Add prototype.
15629 (the_low_target): Add initializer for arch_setup field.
15630 * win32-i386-low.c (init_registers_i386): Add prototype.
15631 (the_low_target): Add initializer for arch_setup field.
15632
15633 * spu-low.c (init_registers_spu): Add prototype.
15634 (initialize_low): Call initialie_registers_spu () instead of
15635 initialize_registers ().
15636
15637 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15638
15639 * server.c (handle_v_requests): When handling the vRun and vAttach
15640 packets, if already debugging a process, don't kill it. Return an
15641 error instead.
15642
15643 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15644
15645 * server.c (handle_query): Correct length check.
15646
15647 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15648
15649 * win32-low.c (do_initial_child_stuff): Add process handle
15650 parameter. Set current_process_handle and current_process_id from the
15651 parameters. Clear globals.
15652 (win32_create_inferior): Don't set current_process_handle and
15653 current_process_id here. Instead pass them on the call to
15654 do_initial_child_stuff.
15655 (win32_attach): Likewise.
15656 (win32_clear_inferiors): New.
15657 (win32_kill): Don't close the current process handle or the
15658 current thread handle here. Instead call win32_clear_inferiors.
15659 (win32_detach): Don't open a new handle to the process. Call
15660 win32_clear_inferiors.
15661 (win32_join): Don't rely on current_process_handle; open a new
15662 handle using the process id.
15663 (win32_wait): Call win32_clear_inferiors when the inferior process
15664 has exited.
15665
15666 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15667
15668 * server.c (monitor_show_help): Add "exit".
15669
15670 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15671
15672 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15673 (clean): Add reg-xtensa.c.
15674 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15675 * configure.srv (xtensa*-*-linux*) New target.
15676 * linux-xtensa-low.c: New.
15677 * xtensa-xtregs.c: New.
15678
15679 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15680
15681 * hostio.c: Don't include errno.h.
15682 (errno_to_fileio_errno): Move to hostio-errno.
15683 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15684 error number outputting to the target->hostio_last_error callback.
15685 (hostio_packet_error): Use FILEIO_EINVAL directly.
15686 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15687 calls to hostio_error.
15688 * hostio-errno.c: New.
15689 * server.h (hostio_last_error_from_errno): Declare.
15690 * target.h (target_ops): Add hostio_last_error member.
15691 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15692 as hostio_last_error handler.
15693 * spu-low.c (spu_target_ops): Likewise.
15694 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15695 (wince_hostio_last_error): New functions.
15696 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15697 as hostio_last_error handler.
15698 (win32_target_ops) [!_WIN32_WCE]: Register
15699 hostio_last_error_from_errno as hostio_last_error handler.
15700 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15701 (hostio-errno.o): New rule.
15702 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15703 * configure.srv (srv_hostio_err_objs): New variable. Default to
15704 hostio-errno.o.
15705 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15706 * configure: Regenerate.
15707
15708 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15709
15710 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15711 (linux_kill, linux_detach): Clean up the process list.
15712 * remote-utils.c (remote_open): Improve port number parsing.
15713 (putpkt_binary, input_interrupt): Only send interrupts if the target
15714 is running.
15715 * server.c (extended_protocol): Make static.
15716 (attached): Define earlier.
15717 (exit_requested, response_needed, program_argv): New variables.
15718 (target_running): New.
15719 (start_inferior): Clear attached here.
15720 (attach_inferior): Set attached here.
15721 (require_running): Define.
15722 (handle_query): Use require_running and target_running. Implement
15723 "monitor exit".
15724 (handle_v_attach, handle_v_run): New.
15725 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15726 (gdbserver_usage): Update.
15727 (main): Redo argument parsing. Handle --debug and --multi. Handle
15728 --attach along with other options or after the port. Save
15729 program_argv. Support no initial program. Resynchronize
15730 communication with GDB after an error. Handle "monitor exit".
15731 Use require_running and target_running. Always allow the extended
15732 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15733 restart in extended mode.
15734 * README: Refer to the GDB manual. Update --attach usage.
15735
15736 2007-12-20 Andreas Schwab <schwab@suse.de>
15737
15738 * linux-low.c (STACK_SIZE): Define.
15739 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15740 (linux_test_for_tracefork): Likewise.
15741
15742 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15743
15744 * linux-low.c (linux_wait_for_event): Update messages. Do not
15745 reinsert auto-delete breakpoints.
15746 * mem-break.c (struct breakpoint): Change return type of handler to
15747 int.
15748 (set_breakpoint_at): Update handler type.
15749 (reinsert_breakpoint_handler): Return 1 instead of calling
15750 delete_breakpoint.
15751 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15752 setting a new one.
15753 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15754 * mem-break.h (set_breakpoint_at): Update handler type.
15755 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15756 * win32-low.c (auto_delete_breakpoint): New.
15757 (get_child_debug_event): Use it.
15758
15759 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15760
15761 * configure.ac: Check for pread and pwrite.
15762 * hostio.c (handle_pread): Fall back to lseek and read.
15763 (handle_pwrite): Fall back to lseek and write.
15764 * config.in, configure: Regenerated.
15765
15766 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15767
15768 * server.c (myresume): Add own_buf argument.
15769 (main): Update calls.
15770
15771 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15774 * remote-utils.c (remote_open): Do not call disable_async_io.
15775 (block_async_io): Delete.
15776 (unblock_async_io): Make static.
15777 (initialize_async_io): New.
15778 * server.c (handle_v_cont): Handle async I/O here.
15779 (myresume): Likewise. Move other common resume tasks here...
15780 (main): ... from here. Call initialize_async_io. Disable async
15781 I/O before the main loop.
15782 * server.h (initialize_async_io): Declare.
15783 (block_async_io, unblock_async_io): Delete prototypes.
15784 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15785
15786 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15787
15788 * remote-utils.c (readchar): Allow binary data in received messages.
15789
15790 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15791
15792 * win32-low.c (attaching): New global.
15793 (win32_create_inferior): Clear the `attaching' global.
15794 (win32_attach): Set the `attaching' global.
15795 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15796 attaching. Only set a breakpoint at the entry point if not
15797 attaching.
15798
15799 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15800
15801 * server.c (main): Don't report dll events on the initial
15802 connection on attaches.
15803
15804 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15805
15806 * server.c (main): Relax numerical bases supported for the pid of
15807 the --attach command line argument.
15808
15809 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15810
15811 * win32-low.c (win32_attach): Call OpenProcess before
15812 DebugActiveProcess, not after. Add last error output to error
15813 call.
15814
15815 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15816
15817 * win32-low.c (win32_get_thread_context)
15818 (win32_set_thread_context): New functions.
15819 (thread_rec): Use win32_get_thread_context.
15820 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15821 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15822 field.
15823
15824 2007-12-03 Leo Zayas
15825 Pedro Alves <pedro_alves@portugalmail.pt>
15826
15827 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15828 global variables.
15829 (child_add_thread): Minor cleanup.
15830 (child_continue): Resume artificially suspended threads before
15831 calling ContinueDebugEvent.
15832 (suspend_one_thread): New.
15833 (fake_breakpoint_event): New.
15834 (get_child_debug_event): Change return type to int. Check here if
15835 gdb sent an interrupt request. If a soft interrupt was requested,
15836 fake a breakpoint event. Return 0 if there is no event to handle,
15837 and 1 otherwise.
15838 (win32_wait): Don't check here if gdb sent an interrupt request.
15839 Ensure there is a valid event to handle.
15840 (win32_request_interrupt): Add soft interruption method as last
15841 resort.
15842
15843 2007-12-03 Leo Zayas
15844 Pedro Alves <pedro_alves@portugalmail.pt>
15845
15846 * win32-low.h (win32_thread_info): Add descriptions to the
15847 structure members. Replace `suspend_count' counter by a
15848 `suspended' flag.
15849 * win32-low.c (thread_rec): Update condition of when to get the
15850 context from the inferior. Rely on ContextFlags being set if it
15851 has already been retrieved. Only suspend the inferior thread if
15852 we haven't already. Warn if that fails.
15853 (continue_one_thread): s/suspend_count/suspended/. Only call
15854 ResumeThread once. Warn if that fails.
15855
15856 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15857
15858 * win32-low.c (win32_wait): Don't read from the inferior when it
15859 has already exited.
15860
15861 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15862
15863 * Makefile.in (win32_low_h): New variable.
15864 (win32-low.o): Add dependency on $(win32_low_h).
15865 (win32-arm-low.o, win32-i386-low.o): New rules.
15866
15867 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15868
15869 * hostio.c: Correct copyright year.
15870
15871 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15872
15873 * Makefile.in (OBS): Add hostio.o.
15874 (hostio.o): New rule.
15875 * server.h (handle_vFile): Declare.
15876 * hostio.c: New file.
15877 * server.c (handle_v_requests): Take packet_len and new_packet_len
15878 for binary packets. Call handle_vFile.
15879 (main): Update call to handle_v_requests.
15880
15881 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * linux-low.c: Include <sched.h>.
15884
15885 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15886
15887 * linux-low.c (linux_tracefork_grandchild): New.
15888 (linux_tracefork_child): Use clone.
15889 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15890
15891 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15892
15893 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15894
15895 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15896
15897 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15898
15899 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15900
15901 * inferiors.c (change_inferior_id): Delete.
15902 (add_pid_to_list, pull_pid_from_list): New.
15903 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15904 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15905 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15906 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15907 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15908 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15909 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15910 (using_threads): Always set to 1.
15911 (handle_extended_wait): New.
15912 (add_process): Do not set TID.
15913 (linux_create_inferior): Set must_set_ptrace_flags.
15914 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15915 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15916 (linux_thread_alive): Rename TID argument to LWPID.
15917 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15918 (linux_wait_for_event): Do not use TID or check using_threads. Update
15919 call to dead_thread_notify. Call handle_extended_wait.
15920 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15921 (send_sigstop): Delete sigstop_sent.
15922 (wait_for_sigstop): Avoid TID.
15923 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15924 (linux_test_for_tracefork): New.
15925 (linux_lookup_signals): Use thread_db_active and
15926 linux_supports_tracefork_flag.
15927 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15928 * linux-low.h (get_process_thread): Avoid TID.
15929 (struct process_ifo): Move thread_known and tid to the end. Remove
15930 sigstop_sent.
15931 (linux_attach_lwp, thread_db_init): Update prototypes.
15932 * server.h (change_inferior_id): Delete prototype.
15933 (add_pid_to_list, pull_pid_from_list): New prototypes.
15934 * thread-db.c (thread_db_use_events): New.
15935 (find_first_thread): Rename to...
15936 (find_one_thread): ...this. Update callers and messages. Do not
15937 call fatal. Check thread_db_use_events. Do not call
15938 change_inferior_id or new_thread_notify.
15939 (maybe_attach_thread): Update. Do not call new_thread_notify.
15940 (thread_db_init): Set thread_db_use_events. Check use_events.
15941 * utils.c (fatal, warning): Correct message prefix.
15942
15943 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15944
15945 * Makefile.in (clean): Remove new files.
15946 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15947 (powerpc-64.o, powerpc-64.c): New rules.
15948 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15949 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15950 with SPE.
15951 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15952 SPE targets.
15953 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15954 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15955 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15956 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15957 (target_regsets): Add AltiVec and SPE register sets.
15958 * configure.ac: Check for AltiVec and SPE.
15959 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15960 (ppc_fill_vrregset, ppc_store_vrregset): New.
15961 (target_regsets): Add AltiVec register set.
15962 * configure: Regenerated.
15963
15964 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15965
15966 * linux-low.c (O_LARGEFILE): Define.
15967 (linux_read_memory): Use /proc/PID/mem.
15968 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15969 * configure, config.in: Regenerated.
15970
15971 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15972
15973 * linux-low.c (linux_wait_for_event): Do not pass signals while
15974 single-stepping.
15975
15976 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15977
15978 * win32-low.c (create_process): New.
15979 (win32_create_inferior): Use create_process instead of
15980 CreateProcess. If create_process failed retry appending an ".exe"
15981 suffix. Store the GetLastError result immediatelly after
15982 create_process calls and use it on the call to error.
15983
15984 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15985
15986 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15987
15988 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15989
15990 * configure.ac: Switch license to GPLv3.
15991
15992 2007-08-01 Michael Snyder <msnyder@access-company.com>
15993
15994 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15995
15996 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15997
15998 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15999 typedef.
16000 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16001 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16002 CloseToolhelp32Snapshot.
16003 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16004 CloseToolhelp32Snapshot.
16005
16006 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16007
16008 * server.c (main): Check for inferior exit before main loop.
16009
16010 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16011
16012 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16013 instead of on tmp_desc.
16014
16015 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16016 Daniel Jacobowitz <dan@codesourcery.com>
16017
16018 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16019 (add_thread): Minor cleanups.
16020 (clear_inferiors): Move lower in the file. Clear the DLL
16021 list.
16022 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16023 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16024 (xml_escape_text): New.
16025 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16026 for qSupported.
16027 (handle_v_cont): Report errors.
16028 (gdbserver_version): Update.
16029 (main): Correct size of own_buf. Do not report initial DLL events.
16030 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16031 (unloaded_dll, xml_escape_text): New.
16032 * win32-low.c (enum target_waitkind): Update comments.
16033 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16034 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16035 (win32_EnumProcessModules, win32_GetModuleInformation)
16036 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16037 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16038 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16039 (win32_Module32First, win32_Module32Next, load_toolhelp)
16040 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16041 (get_child_debug_event): Handle DLL events.
16042 (win32_wait): Likewise.
16043
16044 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16045
16046 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16047 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16048
16049 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16050
16051 * win32-low.c (handle_output_debug_string): Ignore event if not
16052 waiting.
16053
16054 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16055
16056 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16057
16058 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16059
16060 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16061
16062 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16063
16064 * inferiors.c (change_inferior_id): Add comment.
16065 * linux-low.c (check_removed_breakpoint): Add an early
16066 prototype. Improve debug output.
16067 (linux_attach): Doc update.
16068 (linux_detach_one_process, linux_detach): Clean up before releasing
16069 each process.
16070 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16071 * linux-low.h (struct process_info): Doc improvement.
16072 * mem-break.c (delete_all_breakpoints): New.
16073 * mem-break.h (delete_all_breakpoints): New prototype.
16074 * thread-db.c (find_first_thread): New.
16075 (thread_db_create_event): Call it instead of
16076 thread_db_find_new_threads. Clean up unused variables.
16077 (maybe_attach_thread): Remove first thread handling.
16078 (thread_db_find_new_threads): Use find_first_thread.
16079 (thread_db_get_tls_address): Likewise.
16080
16081 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16082
16083 * thread-db.c (thread_db_find_new_threads): Add prototype.
16084 (thread_db_create_event): Check for the main thread before adding
16085 a new thread.
16086 (maybe_attach_thread): Only enable event reporting if TID == 0.
16087 (thread_db_get_tls_address): Check for new threads.
16088
16089 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16090
16091 * linux-low.c (linux_create_inferior): Try execv before execvp.
16092 * spu-low.c (spu_create_inferior): Likewise.
16093
16094 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16095
16096 * linux-low.c (linux_create_inferior): Change execv to execvp.
16097 * spu-low.c (spu_create_inferior): Likewies.
16098
16099 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16100
16101 * Makefile.in (clean): Clean new files instead of deleted ones.
16102 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16103 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16104 rules.
16105 * configure.srv: Specify XML files and new regformats for MIPS and
16106 MIPS64 GNU/Linux.
16107 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16108 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16109 an entry for the restart register.
16110 (mips_cannot_fetch_register, mips_cannot_store_register)
16111 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16112 register names to match the XML descriptions.
16113 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16114 restart register instead of $0.
16115
16116 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16117 Markus Deuling <deuling@de.ibm.com>
16118
16119 * remote-utils.c (decode_xfer_write): New function.
16120 * server.h (decode_xfer_write): Add prototype.
16121 * server.c (handle_query): Add PACKET_LEN argument. Support
16122 qXfer:spu:read and qXfer:spu:write packets.
16123 (main): Pass packet_len to handle_query.
16124 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16125 * target.h (target_ops): Add qxfer_spu.
16126
16127 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16128
16129 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16130 accessing non-seekable spufs files.
16131
16132 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16133
16134 * server.c (handle_query): Add reply for qC packet.
16135
16136 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16137 Leo Zayas <lerele@champenstudios@com>
16138
16139 * server.h (check_remote_input_interrupt_request): New function.
16140 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16141 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16142 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16143 (check_remote_input_interrupt_request): New function.
16144 * server.h (check_remote_input_interrupt_request): Declare.
16145 * win32-low.c (winapi_DebugBreakProcess,
16146 winapi_GenerateConsoleCtrlEvent): New typedefs.
16147 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16148 to 250 ms.
16149 (win32_wait): Check for remote interrupt request
16150 with check_remote_input_interrupt_request.
16151 (win32_request_interrupt): New function.
16152 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16153
16154 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16155
16156 * win32-low.c (debug_registers_changed,
16157 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16158 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16159 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16160 (thread_rec): Get context using the low target.
16161 (child_add_thread): Call thread_added on the low target,
16162 which does the same thing.
16163 (regptr): Delete.
16164 (do_initial_child_stuff): Remove debug registers references.
16165 Set context using the low target. Resume threads after
16166 setting the contexts.
16167 (child_continue): Remove dead variable. Remove debug
16168 registers references.
16169 (child_fetch_inferior_registers): Go through the low target.
16170 (do_child_store_inferior_registers): Remove.
16171 (child_store_inferior_registers): Go through the low target.
16172 (win32_resume): Remove debug registers references.
16173 Set context using the low target.
16174 (handle_exception): Change return type to void. Don't record
16175 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16176 first chance exception.
16177 (get_child_debug_event): Change return type to void. Remove
16178 goto loop. Always return after waiting for debug event.
16179 (win32_wait): Convert to switch statement. Handle spurious
16180 events.
16181
16182 * win32-i386-low.c (debug_registers_changed,
16183 debug_registers_used): New.
16184 (initial_stuff): Rename to ...
16185 (i386_initial_stuff): ... this. Clear debug registers
16186 state variables.
16187 (store_debug_registers): Delete.
16188 (i386_get_thread_context): New.
16189 (load_debug_registers): Delete.
16190 (i386_set_thread_context): New.
16191 (i386_thread_added): New.
16192 (single_step): Rename to ...
16193 (i386_single_step): ... this.
16194 (do_fetch_inferior_registers): Rename to ...
16195 (i386_fetch_inferior_register): ... this.
16196 (i386_store_inferior_register): New.
16197 (the_low_target): Adapt to new interface.
16198
16199 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16200 (arm_get_thread_context): New.
16201 (arm_set_thread_context): New.
16202 (regptr): New.
16203 (do_fetch_inferior_registers): Rename to ...
16204 (arm_fetch_inferior_register): ... this.
16205 (arm_store_inferior_register): New.
16206 (arm_wince_breakpoint): Reimplement as unsigned long.
16207 (arm_wince_breakpoint_len): Define.
16208 (the_low_target): Adapt to new interface.
16209
16210 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16211 load_debug_registers. Add get_thread_context, set_thread_context,
16212 thread_added and store_inferior_register. Rename
16213 fetch_inferior_registers to fetch_inferior_register.
16214 (regptr): Remove declaration.
16215
16216 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16217
16218 * linux-low.c (linux_detach): Change return type to int. Return 0.
16219 * spu-low.c (spu_detach): Likewise.
16220
16221 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16222
16223 * target.h (target_ops): Change return type of detach to int.
16224 Add join.
16225 (join_inferior): New.
16226 * server.c (main): Don't skip detach support on mingw32.
16227 If the inferior doesn't support detaching return error.
16228 Call join_inferior instead of using waitpid.
16229 * linux-low.c (linux_join): New.
16230 (linux_target_op): Add linux_join.
16231 * spu-low.c (spu_join): New.
16232 (spu_target_ops): Add spu_join.
16233 * win32-low.c (win32_detach): Adapt to new interface.
16234 Reopen current_process_handle before detaching. Issue a child
16235 resume before detaching.
16236 (win32_join): New.
16237 (win32_target_op): Add win32_join.
16238
16239 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16240
16241 * win32-low.c (win32-attach): Fix return value.
16242 * target.h (target_ops): Describe ATTACH return values.
16243
16244 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16245
16246 * win32-low.c (GETPROCADDRESS): Define.
16247 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16248 (winapi_DebugSetProcessKillOnExit): Likewise.
16249 (win32_create_inferior): Force usage of ansi CreateProcessA.
16250 (win32_attach): Use GETPROCADDRESS.
16251 (win32_detach): Likewise.
16252
16253 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16254
16255 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16256
16257 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16258
16259 * win32-low.c: Commit leftover changes from 2007-03-29.
16260
16261 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16264 fields short instead of int. Add explicit padding.
16265 (i387_cache_to_fsave): Remove unnecessary casts.
16266 (i387_fsave_to_cache): Doc fix.
16267 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16268
16269 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16270
16271 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16272 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16273
16274 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16275
16276 * configure.srv (arm*-*-mingw32ce*): Move near the other
16277 arm targets.
16278
16279 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16280
16281 * configure.ac: Add errno checking.
16282 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16283 sys/file.h and malloc.h.
16284 (AC_CHECK_DECLS): Add perror.
16285 (srv_mingwce): Handle.
16286 * configure.srv (i[34567]86-*-cygwin*): Add
16287 win32-i386-low.o to srv_tgtobj.
16288 (i[34567]86-*-mingw*): Likewise.
16289 (arm*-*-mingw32ce*): Add case.
16290 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16291 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16292 [__MINGW32CE__] (strerror): New function.
16293 [__MINGW32CE__] (errno): Define to GetLastError.
16294 [__MINGW32CE__] (COUNTOF): New macro.
16295 (remote_open): Remove extra close call.
16296 * mem-break.c (delete_breakpoint_at): New function.
16297 * mem-break.h (delete_breakpoint_at): Declare.
16298 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16299 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16300 [USE_WIN32API] (read, write): Add char* casts.
16301 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16302 * server.h: Include wincecompat.h on Windows CE.
16303 [HAVE_ERRNO_H]: Check.
16304 (perror): Declare if not declared.
16305 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16306 (perror_with_name): Remove errno declaration.
16307 * wincecompat.h: New.
16308 * wincecompat.c: New.
16309 * win32-low.h: New.
16310 * win32-arm-low.c: New.
16311 * win32-i386-low.c: New.
16312 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16313 (OUTMSG2): Make it safe.
16314 (_T): New macro.
16315 (COUNTOF): New macro.
16316 (NUM_REGS): Get it from the low target.
16317 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16318 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16319 (thread_rec): Let low target handle debug registers.
16320 (child_add_thread): Likewise.
16321 (child_init_thread_list): Likewise.
16322 (continue_one_thread): Likewise.
16323 (regptr): New.
16324 (do_child_fetch_inferior_registers): Move to ...
16325 * win32-i386-low.c: ... here, and rename to ...
16326 (do_fetch_inferior_registers): ... this.
16327 * win32-low.c (child_fetch_inferior_registers):
16328 Go through the low target.
16329 (do_child_store_inferior_registers): Use regptr.
16330 (strwinerror): New function.
16331 (win32_create_inferior): Handle Windows CE.
16332 Use strwinerror instead of strerror on Windows error
16333 codes. Add program to the error output.
16334 Don't close the main thread handle on Windows CE.
16335 (win32_attach): Use coredll.dll on Windows CE.
16336 (win32_kill): Close current process and current
16337 thread handles.
16338 (win32_detach): Use coredll.dll on Windows CE.
16339 (win32_resume): Let low target handle debug registers, and
16340 step request.
16341 (handle_exception): Add/Remove initial breakpoint. Avoid
16342 non-existant WSTOPSIG on Windows CE.
16343 (win32_read_inferior_memory): Cast to remove warning.
16344 (win32_arch_string): Go through the low target.
16345 (initialize_low): Call set_breakpoint_data with the low
16346 target's breakpoint.
16347 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16348 FOP_REGNUM, mappings): Move to ...
16349 * win32-i386-low.c: ... here.
16350 * win32-low.c (win32_thread_info): Move to ...
16351 * win32-low.h: ... here.
16352 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16353 win32-arm-low.c and wincecompat.c.
16354 (all:): Add $EXEEXT.
16355 (install-only:): Likewise.
16356 (gdbserver:): Likewise.
16357 (gdbreplay:): Likewise.
16358 * config.in: Regenerate.
16359 * configure: Regenerate.
16360
16361 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16362
16363 * win32-low.c: Rename typedef thread_info to
16364 win32_thread_info throughout.
16365
16366 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16367
16368 * win32-i386-low.c: Rename to ...
16369 * win32-low.c: ... this.
16370 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16371 * Makefile.in: Likewise.
16372
16373 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16374
16375 * remote-utils.c (monitor_output): Constify msg parameter.
16376 * server.h (monitor_output): Likewise.
16377 * win32-i386-low.c (handle_output_debug_string): New.
16378 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16379 handle_output_debug_string.
16380 (get_child_debug_event): Likewise.
16381
16382 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16383
16384 * server.c (main): Correct strtoul check.
16385
16386 2007-03-27 Jon Ringle <jon@ringle.org>
16387
16388 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16389
16390 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16391
16392 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16393
16394 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16395
16396 * terminal.h: Check HAVE_SGTTY_H.
16397
16398 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16399
16400 * remote-utils.c (remote_open): Print out the assigned port number.
16401
16402 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16403
16404 * remote-utils.c (monitor_output): New function.
16405 * server.c (debug_threads): Define here.
16406 (monitor_show_help): New function.
16407 (handle_query): Handle qRcmd.
16408 (main): Do not handle 'd' packet.
16409 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16410 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16411 of debug_threads.
16412
16413 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16414
16415 * Makefile.in (EXEEXT): New.
16416 (clean): Use $(EXEEXT).
16417
16418 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16419
16420 * target.h (target_ops): Rename send_signal to request_interrupt,
16421 and remove enum target_signal parameter.
16422 * linux-low.c (linux_request_interrupt): Rename from
16423 linux_send_signal, and always send SIGINT.
16424 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16425 and always send SIGINT.
16426 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16427 of send_signal.
16428 (input_interrupt): Likewise.
16429
16430 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16431
16432 * server.c (get_features_xml): Check if target implemented
16433 arch_string.
16434 * win32-i386-low.c (win32_arch_string): New.
16435 (win32_target_ops): Add win32_arch_string as arch_string member.
16436
16437 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16438
16439 * spu-low.c (spu_arch_string): New.
16440 (spu_target_ops): Add spu_arch_string.
16441
16442 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16443
16444 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16445 * configure.ac: Do not check for terminal.h.
16446 * configure, config.in: Regenerated.
16447
16448 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16449
16450 * Makefile.in (OBS): Add $(XML_BUILTIN).
16451 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16452 (clean): Update.
16453 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16454 (arm-with-iwmmxt.c): New.
16455 * config.in, configure: Regenerate.
16456 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16457 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16458 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16459 (arm*-*-linux*): Add iWMMXt and regset support.
16460 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16461 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16462 (arm_store_wmmxregset, target_regsets): New.
16463 * server.c (get_features_xml): Take annex argument. Check builtin
16464 XML documents.
16465 (handle_query): Handle multiple annexes.
16466
16467 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16468
16469 * remote-utils.c [USE_WIN32API] (read, write): Define.
16470 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16471 write.
16472
16473 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16474
16475 * linux-i386-low.c (the_low_target): Set arch_string.
16476 * linux-x86-64-low.c (the_low_target): Likewise.
16477 * linux-low.c (linux_arch_string): New.
16478 (linux_target_ops): Add it.
16479 * linux-low.h (struct linux_target_ops): Add arch_string.
16480 * server.c (write_qxfer_response): Use const void * for DATA.
16481 (get_features_xml): New.
16482 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16483 * target.h (struct target_ops): Add arch_string method.
16484
16485 2007-01-03 Denis Pilat <denis.pilat@st.com>
16486 Daniel Jacobowitz <dan@codesourcery.com>
16487
16488 * linux-low.c (linux_kill): Handle being called with no threads.
16489 * win32-i386-low.c (win32_kill): Likewise.
16490 (get_child_debug_event): Clear current_process_handle.
16491
16492 2006-12-30 Denis PILAT <denis.pilat@st.com>
16493 Daniel Jacobowitz <dan@codesourcery.com>
16494
16495 * remote-utils.c (remote_open): Check the type of specified
16496 serial port devices before opening them.
16497 * server.c (main): Kill the inferior if an error occurs during
16498 the first remote_open.
16499
16500 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16501
16502 * README: Update supported targets.
16503
16504 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16505
16506 * Makefile.in (clean): Remove reg-mips64.c.
16507 (reg-mips64.c, reg-mips64.o): New rules.
16508 * configure.srv: Handle mips64. Include regset support for mips.
16509 * linux-mips-low.c (union mips_register): New.
16510 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16511 (mips_breakpoint, mips_breakpoint_at): Use int.
16512 (mips_collect_register, mips_supply_register)
16513 (mips_collect_register_32bit, mips_supply_register_32bit)
16514 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16515 (mips_store_fpregset, target_regsets): New.
16516 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16517
16518 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16519
16520 * configure.srv: Add target "spu*-*-*".
16521 * Makefile.in (clean): Remove reg-spu.c.
16522 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16523 * spu-low.c: New file.
16524
16525 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16526
16527 * configure.ac: Correct td_thr_tls_get_addr test.
16528 * configure: Regenerated.
16529
16530 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16531
16532 * linux-low.c (linux_wait_for_event): Reformat. Use the
16533 pass_signals array.
16534 * remote-utils.c (decode_address_to_semicolon): New.
16535 * server.c (pass_signals, handle_general_set): New.
16536 (handle_query): Mention QPassSignals for qSupported.
16537 (main): Call handle_general_set.
16538 * server.h (pass_signals, decode_address_to_semicolon): New.
16539
16540 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16541
16542 * server.c (handle_query): Correct error handling for read_auxv.
16543
16544 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16545
16546 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16547 and srv_linux_thread_db to yes.
16548 * linux-s390-low.c (s390_fill_gregset): New function.
16549 (target_regsets): Define data structure.
16550
16551 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16552
16553 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16554 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16555 * config.in, configure: Regenerated.
16556 * inferiors.c (gdb_id_to_thread): New function.
16557 (gdb_id_to_thread_id): Use it.
16558 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16559 * linux-low.h (struct process_info): Add th member.
16560 (thread_db_get_tls_address): New prototype.
16561 * remote-utils.c (decode_address): Make non-static.
16562 * server.c (handle_query): Handle qGetTLSAddr.
16563 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16564 * target.h (struct target_ops): Add get_tls_address.
16565 * thread-db.c (maybe_attach_thread): Save the thread handle.
16566 (thread_db_get_tls_address): New.
16567
16568 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16569
16570 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16571 (linux_resume_one_process): Take a siginfo_t *. Update all
16572 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16573 (struct pending_signals): Add a siginfo_t.
16574 (linux_wait_for_process): Always set last_status.
16575 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16576 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16577 * linux-low.h (struct process_info): Add last_status.
16578
16579 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16580
16581 * remote-utils.c (try_rle): New function.
16582 (putpkt_binary): Use it.
16583
16584 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16585
16586 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16587 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16588 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16589 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16590 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16591 point registers.
16592
16593 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16594
16595 * server.c (terminal_fd): New variable.
16596 (old_foreground_pgrp): Likewise.
16597 (restore_old_foreground_pgrp): New function.
16598 (start_inferior): Record the terminal file descriptor in terminal_fd
16599 and its original foreground group in old_foreground_pgrp. Register
16600 restore_old_foreground_pgrp with atexit().
16601
16602 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16603
16604 * server.c (handle_query): Correct qPart to qXfer.
16605
16606 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16607
16608 * configure.ac: Check for more headers which are missing on
16609 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16610 * configure.srv: Add Cygwin and mingw32.
16611 * remote-utils.c: Don't include headers unconditionally which
16612 are missing on mingw32. Include <winsock.h> for mingw32.
16613 (remote_open): Adjust for mingw32 support. Flush
16614 standard error after writing to it.
16615 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16616 (unblock_async_io, enable_async_io, disable_async_io)
16617 (readchar, getpkt): Update for Winsock support.
16618 (prepare_resume_reply): Expect a protocol signal number.
16619 * server.c: Disable <sys/wait.h> on mingw32.
16620 (start_inferior): Adjust for mingw32 support. Flush
16621 standard error after writing to it.
16622 (attach_inferior): Likewise. Use protocol signal
16623 numbers.
16624 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16625 and names.
16626 * win32-i386-low.c: New file.
16627 * Makefile.in (XM_CLIBS): Set.
16628 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16629 (win32-i386-low.o): New dependency rule.
16630 * linux-low.c (linux_wait): Use target signal numbers.
16631 * target.h (struct target_ops): Doc fix.
16632 * server.h (target_signal_to_name): New prototype.
16633 * gdbreplay.c: Don't include headers unconditionally which
16634 are missing on mingw32. Include <winsock.h> for mingw32.
16635 (remote_close, remote_open): Adjust for Winsock support.
16636 * configure, config.in: Regenerated.
16637
16638 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16639
16640 * server.c (decode_xfer_read, write_qxfer_response): New.
16641 (handle_query): Take a packet length argument. Handle
16642 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16643 the qSupported response.
16644 (main): Update call to handle_query.
16645
16646 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16647
16648 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16649 (putpkt_binary): Renamed from putpkt and adjusted for binary
16650 data.
16651 (putpkt): New wrapper for putpkt_binary.
16652 (readchar): Don't mask off the high bit.
16653 (decode_X_packet): New function.
16654 * server.c (main): Call putpkt_binary if a handler sets the packet
16655 length. Save the length of the incoming packet. Handle 'X'.
16656 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16657
16658 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * server.c (handle_query): Handle qSupported.
16661
16662 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16663
16664 * remote-utils.c (all_symbols_looked_up): New variable.
16665 (look_up_one_symbol): Check it.
16666 * server.h (look_up_one_symbol): New declaration.
16667 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16668
16669 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * Makefile.in (linux-arm-low.o): Update dependencies.
16672 * linux-arm-low.c: Include "gdb_proc_service.h".
16673 (PTRACE_GET_THREAD_AREA): Define.
16674 (ps_get_thread_area): New function.
16675
16676 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16677
16678 * configure.srv (m68k*-*-uclinux*): New target.
16679 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16680 (linux_resume_one_process): Remove extraneous cast.
16681 (linux_read_offsets): New.
16682 (linux_target_op): Add linux_read_offsets on mmuless systems.
16683 * server.c (handle_query): Add qOffsets logic.
16684 * target.h (struct target_ops): Add read_offsets.
16685
16686 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16687
16688 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16689 (PTRACE_GET_THREAD_AREA): Define.
16690 (ps_get_thread_area): New function.
16691 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16692 (linux-x86-64-low.o): Update.
16693
16694 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16695
16696 * configure.ac: Remove checks for prfpregset_t.
16697 * gdb_proc_service.h: New file.
16698 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16699 new "gdb_proc_service.h".
16700 * proc-service.c: Likewise.
16701 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16702 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16703 * Makefile.in (gdb_proc_service_h): Updated.
16704 * configure, config.in: Regenerated.
16705
16706 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16707
16708 * remote-utils.c (prepare_resume_reply): Move declaration
16709 of gdb_id_from_wait to the top of the block.
16710
16711 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16712
16713 * linux-low.c (regsets_store_inferior_registers): Read the regset
16714 from the target before filling it.
16715
16716 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16717
16718 * server.c (attach_inferior): Return SIGTRAP for a successful
16719 attach.
16720
16721 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16722
16723 * Makefile.in (OBS): Add version.o.
16724 (STAGESTUFF): Delete.
16725 (version.o): Add dependencies.
16726 (version.c): Replace rule.
16727 (clean): Remove version.c.
16728 * server.c (gdbserver_version): New.
16729 (gdbserver_usage): Use printf.
16730 (main): Handle --version and --help.
16731 * server.h (version, host_name): Add declarations.
16732
16733 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16734
16735 * linux-arm-low.c:
16736 * linux-arm-low.c:
16737 * inferiors.c:
16738 * i387-fp.h:
16739 * i387-fp.c:
16740 * gdbreplay.c:
16741 * regcache.c:
16742 * proc-service.c:
16743 * mem-break.h:
16744 * mem-break.c:
16745 * linux-x86-64-low.c:
16746 * linux-sh-low.c:
16747 * linux-s390-low.c:
16748 * linux-ppc64-low.c:
16749 * linux-ppc-low.c:
16750 * linux-mips-low.c:
16751 * linux-m68k-low.c:
16752 * linux-m32r-low.c:
16753 * linux-low.h:
16754 * linux-low.c:
16755 * linux-ia64-low.c:
16756 * linux-i386-low.c:
16757 * linux-crisv32-low.c:
16758 * thread-db.c:
16759 * terminal.h:
16760 * target.h:
16761 * target.c:
16762 * server.h:
16763 * server.c:
16764 * remote-utils.c:
16765 * regcache.h:
16766 * utils.c:
16767 * Makefile.in:
16768 * configure.ac:
16769 * gdbserver.1: Add (C) after Copyright. Update the FSF
16770 address.
16771
16772 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16773
16774 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16775 (arm_breakpoint_at): Recognize both breakpoints.
16776 (the_low_target): Use the correct breakpoint instruction.
16777
16778 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16779
16780 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16781 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16782 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16783 (the_low_target): Update.
16784
16785 2005-10-25 Andreas Schwab <schwab@suse.de>
16786
16787 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16788
16789 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16790 (ia64_num_regs): Reduce to 462.
16791
16792 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16793
16794 * acinclude.m4: Correct quoting.
16795 * aclocal.m4: Regenerated.
16796
16797 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16798 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16799 (thread_db_init): Call thread_db_err_str.
16800 * configure.ac: Check for TD_VERSION.
16801 * config.in, configure: Regenerated.
16802
16803 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16804
16805 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16806
16807 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16808
16809 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16810 is not available. Define HAVE_PTRACE_GETREGS if it is.
16811 * config.in, configure: Regenerated.
16812 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16813 * linux-i386-low.c, linux-m68k-low.c: Update to use
16814 HAVE_PTRACE_GETREGS.
16815 * linux-low.c (regsets_fetch_inferior_registers)
16816 (regsets_store_inferior_registers): Only return 0 if we processed
16817 GENERAL_REGS.
16818 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16819 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16820
16821 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16822
16823 * inferiors.c (struct thread_info): Add gdb_id.
16824 (add_thread): Add gdb_id argument.
16825 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16826 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16827 calls to add_thread.
16828 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16829 * server.c (handle_query): Use thread_to_gdb_id.
16830 (handle_v_cont, main): Use gdb_id_to_thread_id.
16831 * server.h (add_thread): Update prototype.
16832 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16833 prototypes.
16834
16835 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16836
16837 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16838 left-padded registers.
16839 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16840 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16841
16842 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16843
16844 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16845 * configure: Regenerate.
16846 * config.in: Regenerate.
16847 * server.h (NEED_DECLARATION_STRERROR):
16848 Replace with !HAVE_DECL_STRERROR.
16849
16850 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16851
16852 * linux-low.c (linux_wait, linux_send_signal): Don't test
16853 an unsigned long variable for > 0 if it could be MAX_ULONG.
16854 * server.c (myresume): Likewise.
16855 * target.c (set_desired_inferior): Likewise.
16856
16857 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16858
16859 * configure.ac: Simplify and improve check for socklen_t.
16860 * configure, config.in: Regenerate.
16861
16862 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16863
16864 * acconfig.h: Remove.
16865 * configure.ac: Add a test for socklen_t. Use three-argument
16866 AC_DEFINE throughout.
16867 * config.in: Regenerated using autoheader 2.59.
16868 * configure: Regenerated.
16869
16870 * gdbreplay.c (socklen_t): Provide a default.
16871 (remote_open): Use socklen_t.
16872 * remote-utils.c (socklen_t): Provide a default.
16873 (remote_open): Use socklen_t.
16874 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16875 unsigned char.
16876
16877 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16878 char for buffers.
16879 * linux-low.c (linux_read_memory, linux_write_memory)
16880 (linux_read_auxv): Likewise.
16881 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16882 (check_mem_write): Likewise.
16883 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16884 Likewise.
16885 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16886 (registers_from_string, register_data): Likewise.
16887 * server.c (handle_query, main): Likewise.
16888 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16889 (decode_M_packet): Likewise.
16890 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16891 * target.h (struct target_ops): Update read_memory, write_memory,
16892 and read_auxv.
16893 (read_inferior_memory, write_inferior_memory): Update.
16894 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16895 to unsigned char *.
16896 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16897 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16898 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16899 linux-s390-low.c, linux-sh-low.c: Update for changes in
16900 read_inferior_memory and the_low_target->breakpoint.
16901
16902 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16903
16904 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16905 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16906 * configure.srv: Add powerpc64-*-linux*.
16907 * linux-ppc64-low.c: New file.
16908
16909 2005-05-23 Orjan Friberg <orjanf@axis.com>
16910
16911 * linux-cris-low.c: New file with support for CRIS.
16912 * linux-crisv32-low.c: Ditto for CRISv32.
16913 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16914 (clean): Add reg-cris.c and reg-crisv32.c.
16915 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16916 reg-crisv32.o, and reg-crisv32.c to make rules.
16917 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16918 recognized targets.
16919
16920 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16921
16922 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16923 of sizeof (PTRACE_XFER_TYPE).
16924 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16925
16926 2005-05-12 Orjan Friberg <orjanf@axis.com>
16927
16928 * target.h (struct target_ops): Add insert_watchpoint,
16929 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16930 pointers for hardware watchpoint support.
16931 * linux-low.h (struct linux_target_ops): Ditto.
16932 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16933 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16934 to linux_target_ops.
16935 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16936 reply packet.
16937 * server.c (main): Recognize 'Z' and 'z' packets.
16938
16939 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16940
16941 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16942 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16943 (the_low_target): Add new members.
16944
16945 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16946
16947 * proc-service.c (ps_lgetregs): Search all_processes instead of
16948 all_threads.
16949
16950 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16951
16952 * server.c (start_inferior): Change return type to int.
16953 (attach_inferior): Change sigptr to int *.
16954 (handle_v_cont, handle_v_requests): Change signal to int *.
16955 (main): Change signal to int.
16956
16957 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16958
16959 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16960 * configure.srv: Add m32r*-*-linux*.
16961 * linux-m32r-low.c: New file.
16962
16963 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16964
16965 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16966
16967 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16968
16969 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16970 Take unsigned long arguments for PIDs.
16971 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16972 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16973 (wait_for_sigstop, linux_resume_one_process)
16974 (regsets_fetch_inferior_registers, linux_send_signal)
16975 (linux_read_auxv): Likewise. Update the types of variables holding
16976 PIDs. Update format string specifiers.
16977 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16978 * remote-utils.c (prepare_resume_reply): Likewise.
16979 * server.c (cont_thread, general_thread, step_thread)
16980 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16981 unsigned long.
16982 (handle_query): Update format specifiers.
16983 (handle_v_cont, main): Use strtoul for thread IDs.
16984 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16985 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16986 (general_thread, step_thread, thread_from_wait)
16987 (old_thread_from_wait): Update.
16988 * target.h (struct thread_resume): Use unsigned long for THREAD.
16989 (struct target_ops): Use unsigned long for arguments to attach and
16990 thread_alive.
16991
16992 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16993
16994 * acinclude.m4: Include bfd/bfd.m4 directly.
16995 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16996 <agriffis@toolchain.org>.
16997 * aclocal.m4, configure: Regenerated.
16998
16999 2005-01-07 Andrew Cagney <cagney@gnu.org>
17000
17001 * configure.ac: Rename configure.in, require autoconf 2.59.
17002 * configure: Re-generate.
17003
17004 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17005
17006 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17007 LIBS when finished.
17008 * aclocal.m4: Regenerated.
17009 * configure: Regenerated.
17010
17011 2004-11-21 Andreas Schwab <schwab@suse.de>
17012
17013 * linux-m68k-low.c (m68k_num_gregs): Define.
17014 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17015 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17016 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17017 (m68k_breakpoint_at): New. Add to the_low_target.
17018
17019 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17020 srv_linux_thread_db to yes.
17021
17022 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17023
17024 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17025 (ARCH_SET_FS): Likewise.
17026 (ARCH_GET_FS): Likewise.
17027 (ARCH_GET_GS): Likewise.
17028
17029 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17030
17031 * linux-i386-low.c (ps_get_thread_area): New.
17032 * linux-x86-64-low.c (ps_get_thread_area): New.
17033 * linux-low.c: Include <sys/syscall.h>.
17034 (linux_kill_one_process): Don't kill the first thread here.
17035 (linux_kill): Kill the first thread here.
17036 (kill_lwp): New function.
17037 (send_sigstop, linux_send_signal): Use it.
17038 * proc-service.c: Clean up #ifdefs.
17039 (fpregset_info): Delete.
17040 (ps_lgetregs): Update and enable implementation.
17041 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17042 implementations.
17043 * remote-utils.c (struct sym_cache, symbol_cache): New.
17044 (input_interrupt): Print a clearer message.
17045 (async_io_enabled): New variable.
17046 (enable_async_io, disable_async_io): Use it. Update comments.
17047 (look_up_one_symbol): Use the symbol cache.
17048 * thread-db.c (thread_db_look_up_symbols): New function.
17049 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17050
17051 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17052
17053 * configure.in: Test for -rdynamic.
17054 * configure: Regenerated.
17055 * Makefile (INTERNAL_LDFLAGS): New.
17056 (gdbserver, gdbreplay): Use it.
17057
17058 2004-09-02 Andrew Cagney <cagney@gnu.org>
17059
17060 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17061
17062 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17063
17064 * linux-low.c (linux_wait): Clear all_processes list also.
17065
17066 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17067
17068 * linux-low.c: Include <errno.h>. Remove extern declaration of
17069 errno.
17070
17071 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17072
17073 * gdbreplay.c, server.h, utils.c: Update copyright years.
17074
17075 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17076
17077 * server.c (main): Print child status or termination signal from
17078 variable 'signal', not 'sig'.
17079
17080 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17081
17082 * linux-low.c (linux_read_memory): Change return type to
17083 int. Check for and return error from ptrace().
17084 * target.c (read_inferior_memory): Change return type to int. Pass
17085 back return status from the_target->read_memory().
17086 * target.h (struct target_ops): Adapt *read_memory() prototype.
17087 Update comment.
17088 (read_inferior_memory): Adapt prototype.
17089 * server.c (main): Return an error packet if
17090 read_inferior_memory() returns an error.
17091
17092 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17093
17094 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17095 Unify with other clean targets.
17096
17097 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17098
17099 * server.c (handle_v_cont): Call set_desired_inferior.
17100
17101 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17102
17103 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17104
17105 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17106
17107 * linux-low.c (linux_wait): Unblock async I/O.
17108 (linux_resume): Block and enable async I/O.
17109 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17110 * server.h (block_async_io, unblock_async_io): Add prototypes.
17111
17112 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17113
17114 * remote-utils.c (remote_open): Print a status notice after
17115 opening a TCP port.
17116 * server.c (attach_inferior): Print a status notice after
17117 attaching.
17118
17119 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17120
17121 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17122
17123 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17124
17125 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17126 error packet.
17127 * server.c, target.h: Update copyright years.
17128
17129 2004-02-25 Roland McGrath <roland@redhat.com>
17130
17131 * target.h (struct target_ops): New member `read_auxv'.
17132 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17133 * linux-low.c (linux_read_auxv): New function.
17134 (linux_target_ops): Initialize `read_auxv' member to that.
17135
17136 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17137
17138 Committed by Jim Blandy <jimb@redhat.com>.
17139
17140 * linux-s390-low.c (s390_num_regs): Update.
17141 (s390_regmap): Remove control registers. Use __s390x__ predefine
17142 instead of GPR_SIZE to distiguish s390 and s390x targets.
17143
17144 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17145
17146 * linux-low.c: Update copyright year.
17147 (check_removed_breakpoint): Clear pending_is_breakpoint.
17148 (linux_set_resume_request, linux_queue_one_thread)
17149 (resume_status_pending_p): New functions.
17150 (linux_continue_one_thread): Use process->resume.
17151 (linux_resume): Only resume threads if there are no pending events.
17152 * linux-low.h (struct process_info): Add resume request
17153 pointer.
17154
17155 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17156
17157 * regcache.c (new_register_cache): Clear the allocated register
17158 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17159
17160 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17161
17162 * linux-low.c (linux_resume): Take a struct thread_resume *
17163 argument.
17164 (linux_wait): Update call.
17165 (resume_ptr): New static variable.
17166 (linux_continue_one_thread): Renamed from
17167 linux_continue_one_process. Use resume_ptr.
17168 (linux_resume): Use linux_continue_one_thread.
17169 * server.c (handle_v_cont, handle_v_requests): New functions.
17170 (myresume): New function.
17171 (main): Handle 'v' case.
17172 * target.h (struct thread_resume): New type.
17173 (struct target_ops): Change argument of "resume" to struct
17174 thread_resume *.
17175 (myresume): Delete macro.
17176
17177 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17178
17179 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17180 (uninstall): Support DESTDIR.
17181
17182 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17183
17184 * configure.srv: Add xscale*linux copy of arm*linux entry.
17185
17186 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17187
17188 * linux-arm-low.c (arm_reinsert_addr): New function.
17189 (the_low_target): Add arm_reinsert_addr.
17190
17191 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17192
17193 * mem-break.c: Remove whitespace at end of file.
17194
17195 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17196
17197 * configure.in: Check whether we need to prototype strerror.
17198 * server.h: Optionally prototype strerror.
17199 * gdbreplay.c (perror_with_name): Use strerror.
17200 * linux-low.c (linux_attach_lwp): Use strerror.
17201 * utils.c (perror_with_name): Use strerror.
17202 * config.in, configure: Regenerated.
17203
17204 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17205
17206 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17207 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17208
17209 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17210
17211 * Makefile.in (SFILES): Update.
17212 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17213 low-sun3.c: Remove files.
17214
17215 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17216
17217 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17218 (linux_detach_one_process, linux_detach): New functions.
17219 (linux_target_ops): Add linux_detach.
17220 * server.c (main): Handle 'D' packet.
17221 * target.h (struct target_ops): Add "detach" member.
17222 (detach_inferior): Define.
17223
17224 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17225
17226 From Kelley Cook <kelleycook@wideopenwest.com>:
17227 * configure.srv: Accept i[34567]86 variants.
17228
17229 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17230
17231 * linux-low.c (linux_wait_for_event): Correct comment typos.
17232 (linux_resume_one_process): Call check_removed_breakpoint.
17233 (linux_send_signal): New function.
17234 (linux_target_ops): Add linux_send_signal.
17235 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17236 of kill.
17237 * target.h (struct target_ops): Add send_signal.
17238
17239 2003-05-29 Jim Blandy <jimb@redhat.com>
17240
17241 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17242 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17243 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17244 away part of the register's value.
17245
17246 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17247
17248 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17249 (linux_wait_for_event, linux_init_signals): Likewise.
17250
17251 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17252
17253 * configure.in: Check for stdlib.h.
17254 * configure: Regenerated.
17255 * config.in: Regenerated.
17256
17257 2003-01-04 Andreas Schwab <schwab@suse.de>
17258
17259 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17260
17261 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17262
17263 * Makefile.in: Remove obsolete code.
17264
17265 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17266
17267 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17268 defined(PT_FPR0_HI).
17269
17270 2002-11-17 Stuart Hughes <seh@zee2.com>
17271
17272 * linux-arm-low.c (arm_num_regs): Increase.
17273 (arm_regmap): Include status register.
17274
17275 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17276
17277 * linux-low.c (register_addr): Remove incorrect -1 check.
17278
17279 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17280
17281 * linux-low.c (linux_create_inferior): Call setpgid. Return
17282 the new PID.
17283 (unstopped_p, linux_signal_pid): Remove.
17284 (linux_target_ops): Remove linux_signal_pid.
17285 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17286 global instead of target method.
17287 * target.h (struct target_ops): Remove signal_pid. Update comment
17288 for create_inferior.
17289 * server.c (signal_pid): New variable.
17290 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17291 gdbserver. Set the child to be the foreground process group.
17292 (attach_inferior): Set signal_pid.
17293
17294 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17295
17296 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17297
17298 2002-08-20 Jim Blandy <jimb@redhat.com>
17299
17300 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17301 default for this.
17302
17303 2002-08-01 Andrew Cagney <cagney@redhat.com>
17304
17305 * Makefile.in: Make chill references obsolete.
17306
17307 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17308
17309 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17310 * configure: Regenerate.
17311 * config.in: Regenerate.
17312
17313 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17314
17315 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17316 (perror_with_name, remote_close, remote_open, expect, play): Static.
17317
17318 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17319
17320 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17321 byte offsets instead of an array of indexes.
17322 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17323
17324 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17325
17326 * regcache.c: Add comment.
17327
17328 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17329
17330 * thread-db.c: New file.
17331 * proc-service.c: New file.
17332 * acinclude.m4: New file.
17333 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17334 proc-service.o, and thread-db.o.
17335 (linux-low.o): Add USE_THREAD_DB.
17336 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17337 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17338 * aclocal.m4: Regenerated.
17339 * config.in: Regenerated.
17340 * configure: Regenerated.
17341 * configure.in: Check for proc_service.h, sys/procfs.h,
17342 thread_db.h, and linux/elf.h headrs.
17343 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17344 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17345 Check for -lthread_db and thread support.
17346 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17347 PowerPC, and SuperH.
17348 * i387-fp.c: Constify arguments.
17349 * i387-fp.h: Likewise.
17350 * inferiors.c: (struct thread_info): Renamed from
17351 `struct inferior_info'. Remove PID member. Use generic inferior
17352 list header. All uses updated.
17353 (inferiors, signal_pid): Removed.
17354 (all_threads): New variable.
17355 (get_thread): Define.
17356 (add_inferior_to_list): New function.
17357 (for_each_inferior): New function.
17358 (change_inferior_id): New function.
17359 (add_inferior): Removed.
17360 (remove_inferior): New function.
17361 (add_thread): New function.
17362 (free_one_thread): New function.
17363 (remove_thread): New function.
17364 (clear_inferiors): Use for_each_inferior and free_one_thread.
17365 (find_inferior): New function.
17366 (find_inferior_id): New function.
17367 (inferior_target_data): Update argument type.
17368 (set_inferior_target_data): Likewise.
17369 (inferior_regcache_data): Likewise.
17370 (set_inferior_regcache_data): Likewise.
17371 * linux-low.c (linux_bp_reinsert): Remove.
17372 (all_processes, stopping_threads, using_thrads)
17373 (struct pending_signals, debug_threads, pid_of): New.
17374 (inferior_pid): Replace with macro.
17375 (struct inferior_linux_data): Remove.
17376 (get_stop_pc, add_process): New functions.
17377 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17378 Use add_process and add_thread.
17379 (linux_attach_lwp): New function, based on old linux_attach. Use
17380 add_process and add_thread. Set stop_expected for new threads.
17381 (linux_attach): New function.
17382 (linux_kill_one_process): New function.
17383 (linux_kill): Kill all LWPs.
17384 (linux_thread_alive): Use find_inferior_id.
17385 (check_removed_breakpoints, status_pending_p): New functions.
17386 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17387 Update. Use WNOHANG. Wait for cloned processes also. Update process
17388 struct for the found process.
17389 (linux_wait_for_event): New function.
17390 (linux_wait): Use it. Support LWPs.
17391 (send_sigstop, wait_for_sigstop, stop_all_processes)
17392 (linux_resume_one_process, linux_continue_one_process): New functions.
17393 (linux_resume): Support LWPs.
17394 (REGISTER_RAW_SIZE): Remove.
17395 (fetch_register): Use register_size instead. Call supply_register.
17396 (usr_store_inferior_registers): Likewise. Call collect_register.
17397 Fix recursive case.
17398 (regsets_fetch_inferior_registers): Improve error message.
17399 (regsets_store_inferior_registers): Add debugging.
17400 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17401 (unstopped_p, linux_signal_pid): New functions.
17402 (linux_target_ops): Add linux_signal_pid.
17403 (linux_init_signals): New function.
17404 (initialize_low): Call it. Initialize using_threads.
17405 * regcache.c (inferior_regcache_data): Add valid
17406 flag.
17407 (get_regcache): Fetch registers lazily. Add fetch argument
17408 and update all callers.
17409 (regcache_invalidate_one, regcache_invalidate): New
17410 functions.
17411 (new_register_cache): Renamed from create_register_cache.
17412 Return the new regcache.
17413 (free_register_cache): Change argument to a void *.
17414 (registers_to_string, registers_from_string): Call get_regcache
17415 with fetch flag set.
17416 (register_data): Make static. Pass fetch flag to get_regcache.
17417 (supply_register): Call get_regcache with fetch flag clear.
17418 (collect_register): Call get_regcache with fetch flag set.
17419 (collect_register_as_string): New function.
17420 * regcache.h: Update.
17421 * remote-utils.c (putpkt): Flush after debug output and use
17422 stderr.
17423 Handle input interrupts while waiting for an ACK.
17424 (input_interrupt): Use signal_pid method.
17425 (getpkt): Flush after debug output and use stderr.
17426 (outreg): Use collect_register_as_string.
17427 (new_thread_notify, dead_thread_notify): New functions.
17428 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17429 and general_thread.
17430 (look_up_one_symbol): Flush after debug output.
17431 * server.c (step_thread, server_waiting): New variables.
17432 (start_inferior): Don't use signal_pid. Update call to mywait.
17433 (attach_inferior): Update call to mywait.
17434 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17435 (main): Don't fetch/store registers explicitly. Use
17436 set_desired_inferior. Support proposed ``Hs'' packet. Update
17437 calls to mywait.
17438 * server.h: Update.
17439 (struct inferior_list, struct_inferior_list_entry): New.
17440 * target.c (set_desired_inferior): New.
17441 (write_inferior_memory): Constify.
17442 (mywait): New function.
17443 * target.h: Update.
17444 (struct target_ops): New signal_pid method.
17445 (mywait): Removed macro, added prototype.
17446
17447 * linux-low.h (regset_func): Removed.
17448 (regset_fill_func, regset_store_func): New.
17449 (enum regset_type): New.
17450 (struct regset_info): Add type field. Use new operation types.
17451 (struct linux_target_ops): stop_pc renamed to get_pc.
17452 Add decr_pc_after_break and breakpoint_at.
17453 (get_process, get_thread_proess, get_process_thread)
17454 (strut process_info, all_processes, linux_attach_lwp)
17455 (thread_db_init): New.
17456
17457 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17458 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17459 (the_low_target): Add new members.
17460 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17461 (i386_store_fpxregset): Constify.
17462 (target_regsets): Add new kind identifier.
17463 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17464 (i386_set_pc): Add debugging.
17465 (i386_breakpoint_at): New function.
17466 (the_low_target): Add new members.
17467 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17468 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17469 (mips_breakpoint_at): New.
17470 (the_low_target): Add new members.
17471 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17472 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17473 (the_low_target): Add new members.
17474 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17475 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17476 (the_low_target): Add new members.
17477 * linux-x86-64-low.c (target_regsets): Add new kind
17478 identifier.
17479
17480 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17481
17482 From Martin Pool <mbp@samba.org>:
17483 * server.c (gdbserver_usage): New function.
17484 (main): Call it.
17485
17486 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17487
17488 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17489 stop_at -> stop_pc.
17490
17491 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17492
17493 * Makefile.in: Remove obsolete code.
17494
17495 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17496
17497 * linux-low.c (regsets_fetch_inferior_registers),
17498 (regsets_store_inferior_registers): Removed cast to int from
17499 ptrace() calls.
17500 * regcache.h: Added declaration of struct inferior_info.
17501
17502 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17503
17504 * inferiors.c (struct inferior_info): Add regcache_data.
17505 (add_inferior): Call create_register_cache.
17506 (clear_inferiors): Call free_register_cache.
17507 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17508 * regcache.c (struct inferior_regcache_data): New.
17509 (registers): Remove.
17510 (get_regcache): New function.
17511 (create_register_cache, free_register_cache): New functions.
17512 (set_register_cache): Don't initialize the register cache here.
17513 (registers_to_string, registers_from_string, register_data): Call
17514 get_regcache.
17515 * regcache.h: Add prototypes.
17516 * server.h: Likewise.
17517
17518 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17519
17520 * mem-break.c: New file.
17521 * mem-break.h: New file.
17522 * Makefile.in: Add mem-break.o rule; update server.h
17523 dependencies.
17524 * inferiors.c (struct inferior_info): Add target_data
17525 member.
17526 (clear_inferiors): Free target_data member if set.
17527 (inferior_target_data, set_inferior_target_data): New functions.
17528 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17529 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17530 * linux-low.c (linux_bp_reinsert): New variable.
17531 (struct inferior_linux_data): New.
17532 (linux_create_inferior): Use set_inferior_target_data.
17533 (linux_attach): Likewise. Call add_inferior.
17534 (linux_wait_for_one_inferior): New function.
17535 (linux_wait): Call it.
17536 (linux_write_memory): Add const.
17537 (initialize_low): Call set_breakpoint_data.
17538 * linux-low.h (struct linux_target_ops): Add breakpoint
17539 handling members.
17540 * server.c (attach_inferior): Remove extra add_inferior
17541 call.
17542 * server.h: Include mem-break.h. Update inferior.c
17543 prototypes.
17544 * target.c (read_inferior_memory)
17545 (write_inferior_memory): New functions.
17546 * target.h (read_inferior_memory)
17547 (write_inferior_memory): Change macros to prototypes.
17548 (struct target_ops): Update comments. Add const to write_memory
17549 definition.
17550
17551 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17552
17553 * linux-low.c (usr_store_inferior_registers): Support
17554 registers which are allowed to fail to store.
17555 * linux-low.h (linux_target_ops): Likewise.
17556 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17557 (ppc_cannot_store_register): FPSCR may not be storable.
17558
17559 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17560
17561 * server.h: Include <string.h> if HAVE_STRING_H.
17562 * ChangeLog: Correct paths in last ChangeLog entry.
17563
17564 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17565
17566 * linux-low.h: Remove obsolete prototypes.
17567 (struct linux_target_ops): New.
17568 (extern the_low_target): New.
17569 * linux-low.c (num_regs, regmap): Remove declarations.
17570 (register_addr): Use the_low_target explicitly.
17571 (fetch_register): Likewise.
17572 (usr_fetch_inferior_registers): Likewise.
17573 (usr_store_inferior_registers): Likewise.
17574 * linux-arm-low.c (num_regs): Remove.
17575 (arm_num_regs): Define.
17576 (arm_regmap): Renamed from regmap, made static.
17577 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17578 made static.
17579 (arm_cannot_store_register): Renamed from cannot_store_register,
17580 made static.
17581 (the_low_target): New.
17582 * linux-i386-low.c (num_regs): Remove.
17583 (i386_num_regs): Define.
17584 (i386_regmap): Renamed from regmap, made static.
17585 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17586 made static.
17587 (i386_cannot_store_register): Renamed from cannot_store_register,
17588 made static.
17589 (the_low_target): New.
17590 * linux-ia64-low.c (num_regs): Remove.
17591 (ia64_num_regs): Define.
17592 (ia64_regmap): Renamed from regmap, made static.
17593 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17594 made static.
17595 (ia64_cannot_store_register): Renamed from cannot_store_register,
17596 made static.
17597 (the_low_target): New.
17598 * linux-m68k-low.c (num_regs): Remove.
17599 (m68k_num_regs): Define.
17600 (m68k_regmap): Renamed from regmap, made static.
17601 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17602 made static.
17603 (m68k_cannot_store_register): Renamed from cannot_store_register,
17604 made static.
17605 (the_low_target): New.
17606 * linux-mips-low.c (num_regs): Remove.
17607 (mips_num_regs): Define.
17608 (mips_regmap): Renamed from regmap, made static.
17609 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17610 made static.
17611 (mips_cannot_store_register): Renamed from cannot_store_register,
17612 made static.
17613 (the_low_target): New.
17614 * linux-ppc-low.c (num_regs): Remove.
17615 (ppc_num_regs): Define.
17616 (ppc_regmap): Renamed from regmap, made static.
17617 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17618 made static.
17619 (ppc_cannot_store_register): Renamed from cannot_store_register,
17620 made static.
17621 (the_low_target): New.
17622 * linux-s390-low.c (num_regs): Remove.
17623 (s390_num_regs): Define.
17624 (s390_regmap): Renamed from regmap, made static.
17625 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17626 made static.
17627 (s390_cannot_store_register): Renamed from cannot_store_register,
17628 made static.
17629 (the_low_target): New.
17630 * linux-sh-low.c (num_regs): Remove.
17631 (sh_num_regs): Define.
17632 (sh_regmap): Renamed from regmap, made static.
17633 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17634 made static.
17635 (sh_cannot_store_register): Renamed from cannot_store_register,
17636 made static.
17637 (the_low_target): New.
17638 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17639 (the_low_target): New.
17640
17641 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17642
17643 * Makefile.in: Add stamp-h target.
17644 * configure.in: Create stamp-h.
17645 * configure: Regenerated.
17646
17647 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17648
17649 * inferiors.c: New file.
17650 * target.c: New file.
17651 * target.h: New file.
17652 * Makefile.in: Add target.o and inferiors.o. Update
17653 dependencies.
17654 * linux-low.c (inferior_pid): New static variable,
17655 moved from server.c.
17656 (linux_create_inferior): Renamed from create_inferior.
17657 Call add_inferior. Return 0 on success instead of a PID.
17658 (linux_attach): Renamed from myattach.
17659 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17660 (linux_thread_alive): Renamed from mythread_alive.
17661 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17662 child dies.
17663 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17664 (regsets_store_inferior_registers): Correct error message.
17665 Add missing ``return 0''.
17666 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17667 (linux_store_registers): Renamed from store_inferior_registers.
17668 (linux_read_memory): Renamed from read_inferior_memory.
17669 (linux_write_memory): Renamed from write_inferior_memory.
17670 (linux_target_ops): New structure.
17671 (initialize_low): Call set_target_ops ().
17672 * remote-utils.c (unhexify): New function.
17673 (hexify): New function.
17674 (input_interrupt): Send signals to ``signal_pid''.
17675 * server.c (inferior_pid): Remove.
17676 (start_inferior): Update create_inferior call.
17677 (attach_inferior): Call add_inferior.
17678 (handle_query): New function.
17679 (main): Call handle_query for `q' packets.
17680 * server.h: Include "target.h". Remove obsolete prototypes.
17681 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17682
17683 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17684
17685 * Makefile.in: Add WARN_CFLAGS. Update configury
17686 dependencies.
17687 * configure.in: Check for <string.h>
17688 * configure: Regenerate.
17689 * config.in: Regenerate.
17690 * gdbreplay.c: Include needed system headers.
17691 (remote_open): Remove strchr prototype.
17692 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17693 * regcache.c (supply_register): Change buf argument to const void *.
17694 (supply_register_by_name): Likewise.
17695 (collect_register): Change buf argument to void *.
17696 (collect_register_by_name): Likewise.
17697 * regcache.h: Add missing prototypes.
17698 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17699 * server.c (handle_query): New function.
17700 (attached): New static variable, moved out of main.
17701 (main): Quiet longjmp clobber warnings.
17702 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17703 * utils.c (error): Remove NORETURN.
17704 (fatal): Likewise.
This page took 0.586028 seconds and 5 git commands to generate.